FenXiNspBackControl/src/views/appmana/wuxiang/livestock/SurvHisdataLivestockwater.d...

244 lines
5.1 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 {getStationList} from "/@/views/appmana/station/SurvStationInfo.api";
//列表数据
export const columns: BasicColumn[] = [
{
title: '站点名称',
align: 'center',
dataIndex: 'stationName',
},
{
title: '设备编号',
align: 'center',
dataIndex: 'deployCode',
},
{
title: '数据更新时间',
align: 'center',
dataIndex: 'dataDateTime',
},
// {
// title: '数据ID',
// align: "center",
// dataIndex: 'dataId'
// },
{
title: '总磷(mg/L)',
align: 'center',
dataIndex: 'dataWaterTpSy',
},
{
title: '总氮(mg/L)',
align: 'center',
dataIndex: 'dataWaterTnSy',
},
// {
// title: '氨氮(mg/L)',
// align: "center",
// dataIndex: 'dataWaterNh'
// },
{
title: '化学需氧量(mg/L)',
align: 'center',
dataIndex: 'dataWaterCodSy',
},
// {
// title: '数据类型;realTime=实时dayTime=日数据month=月数据year=年数据',
// 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: 'livestock'
},
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: 'standard',
},
{
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: '数据ID',
field: 'dataId',
component: 'Input',
},
{
label: '总磷',
field: 'dataWaterTpSy',
component: 'Input',
},
{
label: '总氮',
field: 'dataWaterTnSy',
component: 'Input',
},
{
label: '化学需氧量',
field: 'dataWaterCodSy',
component: 'Input',
},
// {
// label: '硝态氮',
// field: 'dataWaterNo',
// 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,
},
];