FenXiNspBackControl/src/views/appmana/water/hisdata/SurvHisdataSoil.data.ts

240 lines
5.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {getDeviceList} from "/@/views/appmana/deploy/SurvDeviceDeploy.api";
import { getStationList } from '../../station/SurvStationInfo.api';
//列表数据
export const columns: BasicColumn[] = [
{
title: '站点名称',
align: "center",
dataIndex: 'stationName',
},
// {
// title: '设备部署编号',
// align: "center",
// dataIndex: 'deployCode',
// },
{
title: '设备名称',
align: "center",
dataIndex: 'deviceName',
},
{
title: '数据更新时间',
align: "center",
dataIndex: 'dataDateTime',
},
{
title: '水温(℃)',
align: "center",
dataIndex: 'dataWaterTemp'
},
{
title: 'pH',
align: "center",
dataIndex: 'dataWaterPh'
},
{
title: '电导率(uS/cm)',
align: "center",
dataIndex: 'dataWaterDdl'
},
{
title: '浊度(ntu)',
align: "center",
dataIndex: 'dataWaterNtu'
},
{
title: '溶解氧(mg/L)',
align: "center",
dataIndex: 'dataWaterDo'
},
// {
// title: '数据类型',
// align: "center",
// dataIndex: 'dataGatherType'
// },
// {
// title: '转储时间',
// align: "center",
// dataIndex: 'transDate',
// },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
field: 'stationCode',
component: 'ApiSelect',
label: '监测站点',
componentProps: {
// more details see /src/components/Form/src/components/ApiSelect.vue
api: getStationList,
params: {
id: 1,
stationType: 'watershed'
},
resultField: 'list',
// use name as label
labelField: 'stationName',
// use id as value
valueField: 'stationCode',
// not request untill to select
immediate: false,
onChange: (e) => {
console.log('selected:', e);
},
// atfer request callback
onOptionsChange: (options) => {
console.log('get options', options.length, options);
},
},
colProps: {
span: 8,
},
},
// {
// field: 'deployId',
// component: 'ApiSelect',
// label: '选择设备',
// componentProps: {
// // more details see /src/components/Form/src/components/ApiSelect.vue
// api: getDeviceList,
// params: {
// id: 1,
// deployTypes: ["6_water"]
// },
// resultField: 'list',
// // use name as label
// labelField: 'deployDes',
// // use id as value
// valueField: 'id',
// // not request untill to select
// immediate: false,
// onChange: (e) => {
// console.log('selected:', e);
// },
// // atfer request callback
// onOptionsChange: (options) => {
// console.log('get options', options.length, options);
// },
// },
// colProps: {
// span: 8,
// },
// },
{
field: 'dataDateTime',
label: '监测时间',
component: 'RangePicker',
colProps: { span: 8 },
componentProps: {
picker: 'date',
valueFormat: 'YYYY-MM-DD',
},
},
{
field: 'deployType',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: '6_water',
},
{
field: 'column',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: 'dataDateTime',
},
{
field: 'order',
label: '',
component: 'JInput',
colProps: { span: 8 },
show: false,
defaultValue: 'desc',
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '租户号',
field: 'tenantId',
component: 'Input',
},
{
label: '乐观锁',
field: 'reVision',
component: 'InputNumber',
},
{
label: '创建人',
field: 'createdBy',
component: 'Input',
},
{
label: '创建时间',
field: 'createTime',
component: 'DatePicker',
},
{
label: '更新人',
field: 'updatedBy',
component: 'Input',
},
{
label: '逻辑删除',
field: 'isDel',
component: 'InputNumber',
},
{
label: '更新时间',
field: 'updatedTime',
component: 'DatePicker',
},
{
label: '土壤温度;106',
field: 'dataSoilTemp',
component: 'Input',
},
{
label: '土壤湿度;107',
field: 'dataSoilWet',
component: 'Input',
},
{
label: '土壤盐分;198',
field: 'dataSoilSalt',
component: 'Input',
},
{
label: '数据更新时间',
field: 'dataDateTime',
component: 'DatePicker',
},
{
label: '数据类型;realTime=实时dayTime=日数据month=月数据year=年数据',
field: 'dataGatherType',
component: 'Input',
},
{
label: '转储时间',
field: 'transDate',
component: 'DatePicker',
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];