增加五常界面

This commit is contained in:
zy 2025-11-29 18:13:50 +08:00
parent cdc393d461
commit 805a0fbd03
25 changed files with 2018 additions and 385 deletions

View File

@ -9,10 +9,15 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'stationName',
},
// {
// title: '设备编号',
// align: "center",
// dataIndex: 'deviceCode',
// },
{
title: '设备编号',
title: '设备名称',
align: "center",
dataIndex: 'deviceCode',
dataIndex: 'deviceName',
},
{
title: '数据更新时间',

View File

@ -9,10 +9,15 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'stationName',
},
// {
// title: '设备编号',
// align: "center",
// dataIndex: 'deviceCode',
// },
{
title: '设备编号',
title: '设备名称',
align: "center",
dataIndex: 'deviceCode',
dataIndex: 'deviceName',
},
{
title: '数据更新时间',

View File

@ -20,6 +20,7 @@ enum Api {
cameraStartApi = '/appmana/survDeviceDeploy/cameraStart',
cameraStopApi = '/appmana/survDeviceDeploy/cameraStop',
getDeviceCateList = '/appmana/fDictDeviceCate/getDeviceCateList',
getDeviceList='/appmana/survDeviceDeploy/getDeviceList',
}
/**
@ -171,3 +172,10 @@ export const cameraStop = (params) => {
* @param params
*/
export const getDeviceCateList = (params) => defHttp.get({ url: Api.getDeviceCateList, params });
/**
*
* @param params
*/
export const getDeviceList = (params) => defHttp.post({ url: Api.getDeviceList, params });

View File

@ -211,6 +211,12 @@
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="自定义配置" v-bind="validateInfos.configJsonStr">
<a-textarea v-model:value="formData.configJsonStr" placeholder="设备配置" :disabled="disabled"></a-textarea>
</a-form-item>
</a-col>
<!-- <a-col :span="24">
<a-form-item label="上次同步时间" v-bind="validateInfos.lastsyncTime" >
<a-date-picker placeholder="" v-model:value="formData.lastsyncTime" value-format="YYYY-MM-DD" style="width: 100%" disabled="true"/>
@ -282,6 +288,7 @@
deviceLatitude: '',
deviceLongitude: '',
deviceLonglat: '112.502657,33.073635',//
configJsonStr:'',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });

View File

@ -12,7 +12,7 @@ export const columns: BasicColumn[] = [
{
title: '设备编号',
align: "center",
dataIndex: 'deviceCode',
dataIndex: 'deployCode',
},
{
title: '数据更新时间',
@ -35,34 +35,39 @@ export const columns: BasicColumn[] = [
dataIndex: 'dataWaterTn'
},
{
title: '硝态氮(mg/L)',
title: '化学需氧量(mg/L)',
align: "center",
dataIndex: 'dataWaterNo'
},
{
title: '1#球阀状态',
align: "center",
dataIndex: 'firstValveStatus',
customRender: ({ text }) => {
if (!text || text == '00') {
return '开';
} else if (text == '01') {
return '关';
}
},
},
{
title: '2#球阀状态',
align: "center",
dataIndex: 'secondValveStatus',
customRender: ({ text }) => {
if (!text || text == '00') {
return '开';
} else if (text == '01') {
return '关';
}
},
dataIndex: 'dataWaterCod'
},
// {
// title: '硝态氮(mg/L)',
// align: "center",
// dataIndex: 'dataWaterNo'
// },
// {
// title: '1#球阀状态',
// align: "center",
// dataIndex: 'firstValveStatus',
// customRender: ({ text }) => {
// if (!text || text == '00') {
// return '开';
// } else if (text == '01') {
// return '关';
// }
// },
// },
// {
// title: '2#球阀状态',
// align: "center",
// dataIndex: 'secondValveStatus',
// customRender: ({ text }) => {
// if (!text || text == '00') {
// return '开';
// } else if (text == '01') {
// return '关';
// }
// },
// },
// {
// title: '数据类型;realTime=实时dayTime=日数据month=月数据year=年数据',

View File

@ -13,8 +13,8 @@
</a-form-item>
</a-col> -->
<a-col :span="24">
<a-form-item label="设备编号" v-bind="validateInfos.deviceCode">
<a-input v-model:value="formData.deviceCode" placeholder="" :disabled="disabled"></a-input>
<a-form-item label="设备编号" v-bind="validateInfos.deployCode">
<a-input v-model:value="formData.deployCode" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :span="24">
@ -32,61 +32,66 @@
<a-input v-model:value="formData.dataWaterTn" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-item label="硝态氮(mg/L)" v-bind="validateInfos.dataWaterNo">-->
<!-- <a-input v-model:value="formData.dataWaterNo" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-item label="硝态氮(mg/L)" v-bind="validateInfos.dataWaterNo">
<a-input v-model:value="formData.dataWaterNo" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="总磷水样" v-bind="validateInfos.dataWaterTpSy">
<a-input v-model:value="formData.dataWaterTpSy" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="总磷零点" v-bind="validateInfos.dataWaterTpLd">
<a-input v-model:value="formData.dataWaterTpLd" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="总氮水样" v-bind="validateInfos.dataWaterTnSy">
<a-input v-model:value="formData.dataWaterTnSy" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="总氮零点" v-bind="validateInfos.dataWaterTnLd">
<a-input v-model:value="formData.dataWaterTnLd" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="总氮零点" v-bind="validateInfos.fluidLevel">
<a-input v-model:value="formData.fluidLevel" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="1#球阀状态" v-bind="validateInfos.firstValveStatus">
<a-input v-model:value="formData.firstValveStatus" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="2#球阀状态" v-bind="validateInfos.secondValveStatus">
<a-input v-model:value="formData.secondValveStatus" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="急停状态" v-bind="validateInfos.crashStopStatus">
<a-input v-model:value="formData.crashStopStatus" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="水泵状态" v-bind="validateInfos.waterPumpStatus">
<a-input v-model:value="formData.waterPumpStatus" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="主副泵状态" v-bind="validateInfos.mainSideStatus">
<a-input v-model:value="formData.mainSideStatus" placeholder="" :disabled="disabled"></a-input>
<a-form-item label="化学需氧量(mg/L)" v-bind="validateInfos.dataWaterCod">
<a-input v-model:value="formData.dataWaterCod" placeholder="请输入化学需氧量" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-item label="总磷水样" v-bind="validateInfos.dataWaterTpSy">-->
<!-- <a-input v-model:value="formData.dataWaterTpSy" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="总磷零点" v-bind="validateInfos.dataWaterTpLd">-->
<!-- <a-input v-model:value="formData.dataWaterTpLd" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="总氮水样" v-bind="validateInfos.dataWaterTnSy">-->
<!-- <a-input v-model:value="formData.dataWaterTnSy" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="总氮零点" v-bind="validateInfos.dataWaterTnLd">-->
<!-- <a-input v-model:value="formData.dataWaterTnLd" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="总氮零点" v-bind="validateInfos.fluidLevel">-->
<!-- <a-input v-model:value="formData.fluidLevel" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="1#球阀状态" v-bind="validateInfos.firstValveStatus">-->
<!-- <a-input v-model:value="formData.firstValveStatus" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="2#球阀状态" v-bind="validateInfos.secondValveStatus">-->
<!-- <a-input v-model:value="formData.secondValveStatus" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="急停状态" v-bind="validateInfos.crashStopStatus">-->
<!-- <a-input v-model:value="formData.crashStopStatus" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="水泵状态" v-bind="validateInfos.waterPumpStatus">-->
<!-- <a-input v-model:value="formData.waterPumpStatus" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="主副泵状态" v-bind="validateInfos.mainSideStatus">-->
<!-- <a-input v-model:value="formData.mainSideStatus" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-item label="数据更新时间" v-bind="validateInfos.dataDateTime">
<a-date-picker placeholder="" v-model:value="formData.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" show-time="{ format: 'YYYY-MM-DD HH:mm:ss' }" style="width: 100%" :disabled="disabled"/>
@ -114,7 +119,7 @@
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../SurvHisdataOrientwater.api';
import { Form } from 'ant-design-vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: ()=>{} },
@ -125,23 +130,23 @@
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
tenantId: '',
tenantId: '',
reVision: undefined,
createdBy: '',
createTime: '',
updatedBy: '',
createdBy: '',
createTime: '',
updatedBy: '',
isDel: undefined,
updatedTime: '',
dataId: '',
dataWaterTp: '',
dataWaterTn: '',
dataWaterNo: '',
dataDateTime: '',
dataGatherType: '',
transDate: '',
deviceName: '',
deviceCode: '',
stationName: '',
updatedTime: '',
dataId: '',
dataWaterTp: '',
dataWaterTn: '',
dataWaterNo: '',
dataDateTime: '',
dataGatherType: '',
transDate: '',
deviceName: '',
deviceCode: '',
stationName: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
@ -164,7 +169,7 @@
return props.formDisabled;
});
/**
* 新增
*/

View File

@ -12,7 +12,7 @@ export const columns: BasicColumn[] = [
{
title: '设备编号',
align: "center",
dataIndex: 'deviceCode',
dataIndex: 'deployCode',
},
{
title: '数据更新时间',
@ -34,36 +34,41 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'dataWaterTn'
},
// {
// title: '硝态氮(mg/L)',
// align: "center",
// dataIndex: 'dataWaterNo'
// },
{
title: '硝态氮(mg/L)',
title: '化学需氧量(mg/L)',
align: "center",
dataIndex: 'dataWaterNo'
},
{
title: '1#球阀状态',
align: "center",
dataIndex: 'firstValveStatus',
customRender: ({ text }) => {
if (!text || text == '00') {
return '开';
} else if (text == '01') {
return '关';
}
},
},
{
title: '2#球阀状态',
align: "center",
dataIndex: 'secondValveStatus',
customRender: ({ text }) => {
if (!text || text == '00') {
return '开';
} else if (text == '01') {
return '关';
}
},
dataIndex: 'dataWaterCod'
},
// {
// title: '1#球阀状态',
// align: "center",
// dataIndex: 'firstValveStatus',
// customRender: ({ text }) => {
// if (!text || text == '00') {
// return '开';
// } else if (text == '01') {
// return '关';
// }
// },
// },
// {
// title: '2#球阀状态',
// align: "center",
// dataIndex: 'secondValveStatus',
// customRender: ({ text }) => {
// if (!text || text == '00') {
// return '开';
// } else if (text == '01') {
// return '关';
// }
// },
// },
// {
// title: '数据类型;realTime=实时dayTime=日数据month=月数据year=年数据',
// align: "center",
// dataIndex: 'dataGatherType'

View File

@ -32,61 +32,66 @@
<a-input v-model:value="formData.dataWaterTn" placeholder="请输入总氮" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-item label="硝态氮(mg/L)" v-bind="validateInfos.dataWaterNo">-->
<!-- <a-input v-model:value="formData.dataWaterNo" placeholder="请输入硝态氮" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-item label="硝态氮(mg/L)" v-bind="validateInfos.dataWaterNo">
<a-input v-model:value="formData.dataWaterNo" placeholder="请输入硝态氮" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="总磷水样" v-bind="validateInfos.dataWaterTpSy">
<a-input v-model:value="formData.dataWaterTpSy" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="总磷零点" v-bind="validateInfos.dataWaterTpLd">
<a-input v-model:value="formData.dataWaterTpLd" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="总氮水样" v-bind="validateInfos.dataWaterTnSy">
<a-input v-model:value="formData.dataWaterTnSy" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="总氮零点" v-bind="validateInfos.dataWaterTnLd">
<a-input v-model:value="formData.dataWaterTnLd" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="总氮零点" v-bind="validateInfos.fluidLevel">
<a-input v-model:value="formData.fluidLevel" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="1#球阀状态" v-bind="validateInfos.firstValveStatus">
<a-input v-model:value="formData.firstValveStatus" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="2#球阀状态" v-bind="validateInfos.secondValveStatus">
<a-input v-model:value="formData.secondValveStatus" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="急停状态" v-bind="validateInfos.crashStopStatus">
<a-input v-model:value="formData.crashStopStatus" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="水泵状态" v-bind="validateInfos.waterPumpStatus">
<a-input v-model:value="formData.waterPumpStatus" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="主副泵状态" v-bind="validateInfos.mainSideStatus">
<a-input v-model:value="formData.mainSideStatus" placeholder="" :disabled="disabled"></a-input>
<a-form-item label="化学需氧量(mg/L)" v-bind="validateInfos.dataWaterCod">
<a-input v-model:value="formData.dataWaterCod" placeholder="请输入化学需氧量" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-item label="总磷水样" v-bind="validateInfos.dataWaterTpSy">-->
<!-- <a-input v-model:value="formData.dataWaterTpSy" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="总磷零点" v-bind="validateInfos.dataWaterTpLd">-->
<!-- <a-input v-model:value="formData.dataWaterTpLd" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="总氮水样" v-bind="validateInfos.dataWaterTnSy">-->
<!-- <a-input v-model:value="formData.dataWaterTnSy" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="总氮零点" v-bind="validateInfos.dataWaterTnLd">-->
<!-- <a-input v-model:value="formData.dataWaterTnLd" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="总氮零点" v-bind="validateInfos.fluidLevel">-->
<!-- <a-input v-model:value="formData.fluidLevel" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="1#球阀状态" v-bind="validateInfos.firstValveStatus">-->
<!-- <a-input v-model:value="formData.firstValveStatus" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="2#球阀状态" v-bind="validateInfos.secondValveStatus">-->
<!-- <a-input v-model:value="formData.secondValveStatus" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="急停状态" v-bind="validateInfos.crashStopStatus">-->
<!-- <a-input v-model:value="formData.crashStopStatus" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="水泵状态" v-bind="validateInfos.waterPumpStatus">-->
<!-- <a-input v-model:value="formData.waterPumpStatus" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-item label="主副泵状态" v-bind="validateInfos.mainSideStatus">-->
<!-- <a-input v-model:value="formData.mainSideStatus" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-item label="数据更新时间" v-bind="validateInfos.dataDateTime">
<a-date-picker placeholder="" v-model:value="formData.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" show-time="{ format: 'YYYY-MM-DD HH:mm:ss' }" style="width: 100%" :disabled="disabled"/>
@ -109,7 +114,7 @@
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../SurvTransdataOrientwater.api';
import { Form } from 'ant-design-vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: ()=>{} },
@ -120,22 +125,22 @@
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
tenantId: '',
tenantId: '',
reVision: undefined,
createdBy: '',
createTime: '',
updatedBy: '',
createdBy: '',
createTime: '',
updatedBy: '',
isDel: undefined,
updatedTime: '',
dataId: '',
dataWaterTp: '',
dataWaterTn: '',
dataWaterNo: '',
dataDateTime: '',
updatedTime: '',
dataId: '',
dataWaterTp: '',
dataWaterTn: '',
dataWaterNo: '',
dataDateTime: '',
dataGatherType: '',
deviceName: '',
deviceCode: '',
stationName: '',
deviceName: '',
deviceCode: '',
stationName: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
@ -158,7 +163,7 @@
return props.formDisabled;
});
/**
* 新增
*/

View File

@ -4,15 +4,20 @@ import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
// {
// title: '站点名称',
// align: "center",
// dataIndex: 'stationName',
// },
// {
// title: '设备部署编号',
// align: "center",
// dataIndex: 'deployCode',
// },
{
title: '站点名称',
title: '设备名称',
align: "center",
dataIndex: 'stationName',
},
{
title: '设备部署编号',
align: "center",
dataIndex: 'deviceCode',
dataIndex: 'deployDes',
},
{
title: '数据更新时间',
@ -20,20 +25,35 @@ export const columns: BasicColumn[] = [
dataIndex: 'dataDateTime',
},
{
title: '20CM土壤温度(℃)',
title: '土壤温度(℃)',
align: "center",
dataIndex: 'dataSoilTemp'
},
{
title: '20CM土壤湿度(%)',
title: '土壤湿度(%)',
align: "center",
dataIndex: 'dataSoilWet'
},
{
title: '20CM土壤盐分(uS/cm)',
title: '电导率(uS/cm)',
align: "center",
dataIndex: 'dataSoilDdl'
},
{
title: '氮离子(mg/KG)',
align: "center",
dataIndex: 'dataSoilNion'
},
{
title: '磷离子(mg/KG)',
align: "center",
dataIndex: 'dataSoilPion'
},
{
title: '钾离子(mg/KG)',
align: "center",
dataIndex: 'dataSoilKion'
},
// {
// title: '数据类型',

View File

@ -4,21 +4,37 @@
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-form-item label="选择监测站" name="stationCode">-->
<!-- <ApiSelect-->
<!-- :api="getStationList"-->
<!-- :params = stationType-->
<!-- showSearch-->
<!-- v-model:value="queryParam.stationCode"-->
<!-- optionFilterProp="label"-->
<!-- resultField="list"-->
<!-- labelField="stationName"-->
<!-- valueField="stationCode"-->
<!-- placeholder="请选择"-->
<!-- />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="选择监测站" name="stationCode">
<ApiSelect
:api="getStationList"
:params = stationType
showSearch
v-model:value="queryParam.stationCode"
optionFilterProp="label"
resultField="list"
labelField="stationName"
valueField="stationCode"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-form-item label="选择设备" name="deployId">
<ApiSelect
:api="getDeviceList"
:params = deployType
showSearch
v-model:value="queryParam.deployId"
optionFilterProp="label"
resultField="list"
labelField="deployDes"
valueField="id"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="数据更新时间" name="dataDateTime">
@ -107,12 +123,14 @@
import { ApiSelect} from '/@/components/Form/index';
import { getStationList } from '../../station/SurvStationInfo.api';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { getDeviceList } from '/@/views/appmana/deploy/SurvDeviceDeploy.api';
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const stationType = { stationType: 'orient' };
const deployType = { deployTypes: ['soil'] };
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
@ -126,6 +144,7 @@
fixed: 'right',
},
beforeFetch: (params) => {
params.deployType = 'soil';
return Object.assign(params, queryParam);
},
},
@ -156,7 +175,7 @@
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
@ -164,7 +183,7 @@
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
@ -172,28 +191,28 @@
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
@ -217,7 +236,7 @@
},
];
}
/**
* 下拉操作栏
*/
@ -242,7 +261,7 @@
function searchQuery() {
reload();
}
/**
* 重置
*/
@ -252,7 +271,7 @@
//
reload();
}

View File

@ -2,64 +2,49 @@
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<!-- <a-col :span="24">-->
<!-- <a-form-item label="站点名称" v-bind="validateInfos.stationName">-->
<!-- <a-input v-model:value="formData.stationName" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-item label="站点名称" v-bind="validateInfos.stationName">
<a-input v-model:value="formData.stationName" placeholder="" :disabled="disabled"></a-input>
<a-form-item label="设备名称" v-bind="validateInfos.deployDes">
<a-input v-model:value="formData.deployDes" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="设备名称" v-bind="validateInfos.deviceName">
<a-input v-model:value="formData.deviceName" placeholder="" :disabled="disabled"></a-input>
<a-form-item label="设备编号" v-bind="validateInfos.deployCode">
<a-input v-model:value="formData.deployCode" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="设备编号" v-bind="validateInfos.deviceCode">
<a-input v-model:value="formData.deviceCode" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="20CM土壤温度(℃)" v-bind="validateInfos.dataSoilTemp">
<a-form-item label="土壤温度(℃)" v-bind="validateInfos.dataSoilTemp">
<a-input v-model:value="formData.dataSoilTemp" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="20CM土壤湿度(%)" v-bind="validateInfos.dataSoilWet">
<a-form-item label="土壤湿度(%)" v-bind="validateInfos.dataSoilWet">
<a-input v-model:value="formData.dataSoilWet" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="20CM土壤盐分(uS/cm)" v-bind="validateInfos.dataSoilSalt">
<a-form-item label="电导率(uS/cm)" v-bind="validateInfos.dataSoilDdl">
<a-input v-model:value="formData.dataSoilDdl" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="40CM土壤温度(℃)" v-bind="validateInfos.dataSoilTemp">
<a-input v-model:value="formData.dataSoilTemp2" placeholder="" :disabled="disabled"></a-input>
<a-form-item label="氮离子(mg/KG)" v-bind="validateInfos.dataSoilNion">
<a-input v-model:value="formData.dataSoilNion" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="40CM土壤湿度(%)" v-bind="validateInfos.dataSoilWet">
<a-input v-model:value="formData.dataSoilWet2" placeholder="" :disabled="disabled"></a-input>
<a-form-item label="磷离子(mg/KG)" v-bind="validateInfos.dataSoilPion">
<a-input v-model:value="formData.dataSoilPion" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="40CM土壤盐分(uS/cm)" v-bind="validateInfos.dataSoilSalt">
<a-input v-model:value="formData.dataSoilDdl2" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="60CM土壤温度(℃)" v-bind="validateInfos.dataSoilTemp">
<a-input v-model:value="formData.dataSoilTemp3" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="60CM土壤湿度(%)" v-bind="validateInfos.dataSoilWet">
<a-input v-model:value="formData.dataSoilWet3" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="60CM土壤盐分(uS/cm)" v-bind="validateInfos.dataSoilSalt">
<a-input v-model:value="formData.dataSoilDdl3" placeholder="" :disabled="disabled"></a-input>
<a-form-item label="钾离子(mg/KG)" v-bind="validateInfos.dataSoilKion">
<a-input v-model:value="formData.dataSoilKion" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :span="24">
@ -89,7 +74,7 @@
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../SurvHisdataSoil.api';
import { Form } from 'ant-design-vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: ()=>{} },
@ -100,22 +85,22 @@
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
tenantId: '',
tenantId: '',
reVision: undefined,
createdBy: '',
createTime: '',
updatedBy: '',
createdBy: '',
createTime: '',
updatedBy: '',
isDel: undefined,
updatedTime: '',
dataSoilTemp: '',
dataSoilWet: '',
dataSoilSalt: '',
dataDateTime: '',
dataGatherType: '',
transDate: '',
deviceName: '',
deviceCode: '',
stationName: '',
updatedTime: '',
dataSoilTemp: '',
dataSoilWet: '',
dataSoilSalt: '',
dataDateTime: '',
dataGatherType: '',
transDate: '',
deviceName: '',
deployCode: '',
stationName: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
@ -138,7 +123,7 @@
return props.formDisabled;
});
/**
* 新增
*/

View File

@ -4,15 +4,20 @@ import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
// {
// title: '站点名称',
// align: "center",
// dataIndex: 'stationName',
// },
// {
// title: '设备部署编号',
// align: "center",
// dataIndex: 'deployCode',
// },
{
title: '站点名称',
title: '设备名称',
align: "center",
dataIndex: 'stationName',
},
{
title: '设备部署编号',
align: "center",
dataIndex: 'deviceCode',
dataIndex: 'deployDes',
},
{
title: '数据更新时间',
@ -20,20 +25,35 @@ export const columns: BasicColumn[] = [
dataIndex: 'dataDateTime',
},
{
title: '20CM土壤温度(℃)',
title: '土壤温度(℃)',
align: "center",
dataIndex: 'dataSoilTemp'
},
{
title: '20CM土壤湿度(%)',
title: '土壤湿度(%)',
align: "center",
dataIndex: 'dataSoilWet'
},
{
title: '20CM土壤盐分(uS/cm)',
title: '电导率(uS/cm)',
align: "center",
dataIndex: 'dataSoilDdl'
},
{
title: '氮离子(mg/KG)',
align: "center",
dataIndex: 'dataSoilNion'
},
{
title: '磷离子(mg/KG)',
align: "center",
dataIndex: 'dataSoilPion'
},
{
title: '钾离子(mg/KG)',
align: "center",
dataIndex: 'dataSoilKion'
},
// {
// title: '数据类型',

View File

@ -4,21 +4,36 @@
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">-->
<!-- <a-form-item label="选择监测站" name="stationCode">-->
<!-- <ApiSelect-->
<!-- :api="getStationList"-->
<!-- :params = stationType-->
<!-- showSearch-->
<!-- v-model:value="queryParam.stationCode"-->
<!-- optionFilterProp="label"-->
<!-- resultField="list"-->
<!-- labelField="stationName"-->
<!-- valueField="stationCode"-->
<!-- placeholder="请选择"-->
<!-- />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="选择监测站" name="stationCode">
<ApiSelect
:api="getStationList"
:params = stationType
showSearch
v-model:value="queryParam.stationCode"
optionFilterProp="label"
resultField="list"
labelField="stationName"
valueField="stationCode"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-form-item label="选择设备" name="deployId">
<ApiSelect
:api="getDeviceList"
:params = deployType
showSearch
v-model:value="queryParam.deployId"
optionFilterProp="label"
resultField="list"
labelField="deployDes"
valueField="id"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="数据更新时间" name="dataDateTime">
@ -104,6 +119,7 @@
import SurvTransdataSoilModal from './components/SurvTransdataSoilModal.vue'
import { ApiSelect} from '/@/components/Form/index';
import { getStationList } from '../../station/SurvStationInfo.api';
import {getDeviceList} from '../../deploy/SurvDeviceDeploy.api';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
const formRef = ref();
@ -111,6 +127,7 @@
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const stationType = { stationType: 'orient' };
const deployType = { deployTypes: ['soil'] };
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
@ -124,6 +141,7 @@
fixed: 'right',
},
beforeFetch: (params) => {
params.deployType = 'soil';
return Object.assign(params, queryParam);
},
},
@ -154,7 +172,7 @@
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
@ -162,7 +180,7 @@
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
@ -170,28 +188,28 @@
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
@ -203,7 +221,7 @@
},
];
}
/**
* 下拉操作栏
*/
@ -241,7 +259,7 @@
function searchQuery() {
reload();
}
/**
* 重置
*/
@ -251,7 +269,7 @@
//
reload();
}

View File

@ -2,64 +2,49 @@
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<!-- <a-col :span="24">-->
<!-- <a-form-item label="站点名称" v-bind="validateInfos.stationName">-->
<!-- <a-input v-model:value="formData.stationName" placeholder="请输入站点名称" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-item label="站点名称" v-bind="validateInfos.stationName">
<a-input v-model:value="formData.stationName" placeholder="请输入站点名称" :disabled="disabled"></a-input>
<a-form-item label="设备名称" v-bind="validateInfos.deployDes">
<a-input v-model:value="formData.deployDes" placeholder="请输入设备名称" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="设备名称" v-bind="validateInfos.deviceName">
<a-input v-model:value="formData.deviceName" placeholder="请输入设备名称" :disabled="disabled"></a-input>
<a-form-item label="设备编号" v-bind="validateInfos.deployCode">
<a-input v-model:value="formData.deployCode" placeholder="请输入设备编号" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="设备编号" v-bind="validateInfos.deviceCode">
<a-input v-model:value="formData.deviceCode" placeholder="请输入设备编号" :disabled="disabled"></a-input>
<a-form-item label="土壤温度(℃)" v-bind="validateInfos.dataSoilTemp">
<a-input v-model:value="formData.dataSoilTemp" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="20CM土壤温度(℃)" v-bind="validateInfos.dataSoilTemp">
<a-input v-model:value="formData.dataSoilTemp" placeholder="请输入土壤温度" :disabled="disabled"></a-input>
<a-form-item label="土壤湿度(%)" v-bind="validateInfos.dataSoilWet">
<a-input v-model:value="formData.dataSoilWet" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="20CM土壤湿度(%)" v-bind="validateInfos.dataSoilWet">
<a-input v-model:value="formData.dataSoilWet" placeholder="请输入土壤湿度" :disabled="disabled"></a-input>
<a-form-item label="电导率(uS/cm)" v-bind="validateInfos.dataSoilDdl">
<a-input v-model:value="formData.dataSoilDdl" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="20CM土壤盐分(uS/cm)" v-bind="validateInfos.dataSoilSalt">
<a-input v-model:value="formData.dataSoilDdl" placeholder="请输入土壤盐分" :disabled="disabled"></a-input>
<a-form-item label="氮离子(mg/KG)" v-bind="validateInfos.dataSoilNion">
<a-input v-model:value="formData.dataSoilNion" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="40CM土壤温度(℃)" v-bind="validateInfos.dataSoilTemp">
<a-input v-model:value="formData.dataSoilTemp2" placeholder="" :disabled="disabled"></a-input>
<a-form-item label="磷离子(mg/KG)" v-bind="validateInfos.dataSoilPion">
<a-input v-model:value="formData.dataSoilPion" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="40CM土壤湿度(%)" v-bind="validateInfos.dataSoilWet">
<a-input v-model:value="formData.dataSoilWet2" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="40CM土壤盐分(uS/cm)" v-bind="validateInfos.dataSoilSalt">
<a-input v-model:value="formData.dataSoilDdl2" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="60CM土壤温度(℃)" v-bind="validateInfos.dataSoilTemp">
<a-input v-model:value="formData.dataSoilTemp3" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="60CM土壤湿度(%)" v-bind="validateInfos.dataSoilWet">
<a-input v-model:value="formData.dataSoilWet3" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="60CM土壤盐分(uS/cm)" v-bind="validateInfos.dataSoilSalt">
<a-input v-model:value="formData.dataSoilDdl3" placeholder="" :disabled="disabled"></a-input>
<a-form-item label="钾离子(mg/KG)" v-bind="validateInfos.dataSoilKion">
<a-input v-model:value="formData.dataSoilKion" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :span="24">
@ -84,7 +69,7 @@
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../SurvTransdataSoil.api';
import { Form } from 'ant-design-vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: ()=>{} },
@ -95,21 +80,21 @@
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
tenantId: '',
tenantId: '',
reVision: undefined,
createdBy: '',
createTime: '',
updatedBy: '',
createdBy: '',
createTime: '',
updatedBy: '',
isDel: undefined,
updatedTime: '',
dataSoilTemp: '',
dataSoilWet: '',
dataSoilSalt: '',
dataDateTime: '',
dataGatherType: '',
deviceName: '',
deviceCode: '',
stationName: '',
updatedTime: '',
dataSoilTemp: '',
dataSoilWet: '',
dataSoilSalt: '',
dataDateTime: '',
dataGatherType: '',
deviceName: '',
deployCode: '',
stationName: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
@ -132,7 +117,7 @@
return props.formDisabled;
});
/**
* 新增
*/

View File

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/appmana/survHisdataSoil/list',
save='/appmana/survHisdataSoil/add',
edit='/appmana/survHisdataSoil/edit',
deleteOne = '/appmana/survHisdataSoil/delete',
deleteBatch = '/appmana/survHisdataSoil/deleteBatch',
importExcel = '/appmana/survHisdataSoil/importExcel',
exportXls = '/appmana/survHisdataSoil/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
*
* @param params
* @param handleSuccess
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
* @param handleSuccess
*/
export const batchDelete = (params, handleSuccess) => {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
* @param isUpdate
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

View File

@ -0,0 +1,143 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
// {
// title: '站点名称',
// align: "center",
// dataIndex: 'stationName',
// },
// {
// title: '设备部署编号',
// align: "center",
// dataIndex: 'deployCode',
// },
{
title: '设备名称',
align: "center",
dataIndex: 'deployDes',
},
{
title: '数据更新时间',
align: "center",
dataIndex: 'dataDateTime',
},
{
title: '浊度(ntu)',
align: "center",
dataIndex: 'dataWaterNtu'
},
{
title: '溶解氧(mg/L)',
align: "center",
dataIndex: 'dataWaterDo'
},
{
title: 'pH',
align: "center",
dataIndex: 'dataWaterPh'
},
{
title: '水温(℃)',
align: "center",
dataIndex: 'dataWaterTemp'
},
{
title: '电导率(uS/cm)',
align: "center",
dataIndex: 'dataWaterDdl'
},
// {
// title: '数据类型',
// align: "center",
// dataIndex: 'dataGatherType'
// },
// {
// title: '转储时间',
// align: "center",
// dataIndex: 'transDate',
// },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
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,
},
];

View File

@ -0,0 +1,297 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="选择监测站" name="stationCode">
<ApiSelect
:api="getStationList"
:params = stationType
showSearch
v-model:value="queryParam.stationCode"
optionFilterProp="label"
resultField="list"
labelField="stationName"
valueField="stationCode"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="选择设备" name="deployId">
<ApiSelect
:api="getDeviceList"
:params = deployType
showSearch
v-model:value="queryParam.deployId"
optionFilterProp="label"
resultField="list"
labelField="deployDes"
valueField="id"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="数据更新时间" name="dataDateTime">
<a-date-picker placeholder="" v-model:value="queryParam.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="设备部署编号" name="deviceCode">
<a-input placeholder="请输入设备部署编号查询" v-model:value="queryParam.deviceCode"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="污染物类型" name="pollution">
<JDictSelectTag type="select" v-model:value="queryParam.pollution" dictCode="surv_soil_pullution" placeholder="请选择污染物类型" />
</a-form-item>
</a-col> -->
</template>
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> -->
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<!-- <a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button> -->
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<!-- <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> -->
<TableAction :actions="getDetailAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<!--省市区字段回显插槽-->
<template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }}
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<SurvHisdataSoilModal ref="registerModal" @success="handleSuccess"></SurvHisdataSoilModal>
</div>
</template>
<script lang="ts" name="appmana-survHisdataSoil" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './SurvHisdataSoil.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './SurvHisdataSoil.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import SurvHisdataSoilModal from './components/SurvHisdataSoilModal.vue'
import { ApiSelect} from '/@/components/Form/index';
import { getStationList } from '../../station/SurvStationInfo.api';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { getDeviceList } from '/@/views/appmana/deploy/SurvDeviceDeploy.api';
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const stationType = { stationType: 'orient' };
const deployType = { deployTypes: ['6_water'] };
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: 'surv_hisdata_soil',
api: list,
columns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
params.deployType = '6_water';
return Object.assign(params, queryParam);
},
},
exportConfig: {
name: "surv_hisdata_soil",
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
},
];
}
/**
* 操作栏
*/
function getDetailAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
</style>

View File

@ -0,0 +1,193 @@
<template>
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<!-- <a-col :span="24">-->
<!-- <a-form-item label="站点名称" v-bind="validateInfos.stationName">-->
<!-- <a-input v-model:value="formData.stationName" placeholder="" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-item label="设备名称" v-bind="validateInfos.deployDes">
<a-input v-model:value="formData.deployDes" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="设备编号" v-bind="validateInfos.deployCode">
<a-input v-model:value="formData.deployCode" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="浊度(ntu)" v-bind="validateInfos.dataWaterNtu">
<a-input v-model:value="formData.dataWaterNtu" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="溶解氧(mg/L)" v-bind="validateInfos.dataWaterDo">
<a-input v-model:value="formData.dataWaterDo" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="pH" v-bind="validateInfos.dataWaterPh">
<a-input v-model:value="formData.dataWaterPh" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="水温(℃)" v-bind="validateInfos.dataWaterTemp">
<a-input v-model:value="formData.dataWaterTemp" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="电导率(uS/cm)" v-bind="validateInfos.dataWaterDdl">
<a-input v-model:value="formData.dataWaterDdl" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :span="24">
<a-form-item label="数据更新时间" v-bind="validateInfos.dataDateTime">
<a-date-picker placeholder="请选择数据更新时间" v-model:value="formData.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" show-time="{ format: 'YYYY-MM-DD HH:mm:ss' }" style="width: 100%" :disabled="disabled"/>
</a-form-item>
</a-col> -->
<!-- <a-col :span="24">
<a-form-item label="数据类型">
<a-input v-model:value="formData.dataGatherType" placeholder="请输入数据类型" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="转储时间" v-bind="validateInfos.transDate">
<a-date-picker placeholder="请选择转储时间" v-model:value="formData.transDate" value-format="YYYY-MM-DD HH:mm:ss" show-time="{ format: 'YYYY-MM-DD HH:mm:ss' }" style="width: 100%" :disabled="disabled"/>
</a-form-item>
</a-col> -->
</a-row>
</a-form>
</a-spin>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../SurvHisdataSoil.api';
import { Form } from 'ant-design-vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: ()=>{} },
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
tenantId: '',
reVision: undefined,
createdBy: '',
createTime: '',
updatedBy: '',
isDel: undefined,
updatedTime: '',
dataSoilTemp: '',
dataSoilWet: '',
dataSoilSalt: '',
dataDateTime: '',
dataGatherType: '',
transDate: '',
deviceName: '',
deployCode: '',
stationName: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = {
};
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
//
const disabled = computed(()=>{
if(props.formBpm === true){
if(props.formData.disabled === false){
return false;
}else{
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
*/
function edit(record) {
nextTick(() => {
resetFields();
//
Object.assign(formData, record);
});
}
/**
* 提交数据
*/
async function submitForm() {
//
await validate();
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
let model = formData;
if (model.id) {
isUpdate.value = true;
}
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
await saveOrUpdate(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
min-height: 500px !important;
overflow-y: auto;
padding: 24px 24px 24px 24px;
}
</style>

View File

@ -0,0 +1,75 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<SurvHisdataSoilForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></SurvHisdataSoilForm>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import SurvHisdataSoilForm from './SurvHisdataSoilForm.vue'
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style>
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>

View File

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/appmana/survTransdataSoil/list',
save='/appmana/survTransdataSoil/add',
edit='/appmana/survTransdataSoil/edit',
deleteOne = '/appmana/survTransdataSoil/delete',
deleteBatch = '/appmana/survTransdataSoil/deleteBatch',
importExcel = '/appmana/survTransdataSoil/importExcel',
exportXls = '/appmana/survTransdataSoil/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
*
* @param params
* @param handleSuccess
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
* @param handleSuccess
*/
export const batchDelete = (params, handleSuccess) => {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
* @param isUpdate
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

View File

@ -0,0 +1,133 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
// {
// title: '站点名称',
// align: "center",
// dataIndex: 'stationName',
// },
// {
// title: '设备部署编号',
// align: "center",
// dataIndex: 'deployCode',
// },
{
title: '设备名称',
align: "center",
dataIndex: 'deployDes',
},
{
title: '数据更新时间',
align: "center",
dataIndex: 'dataDateTime',
},
{
title: '浊度(ntu)',
align: "center",
dataIndex: 'dataWaterNtu'
},
{
title: '溶解氧(mg/L)',
align: "center",
dataIndex: 'dataWaterDo'
},
{
title: 'pH',
align: "center",
dataIndex: 'dataWaterPh'
},
{
title: '水温(℃)',
align: "center",
dataIndex: 'dataWaterTemp'
},
{
title: '电导率(uS/cm)',
align: "center",
dataIndex: 'dataWaterDdl'
},
// {
// title: '数据类型',
// align: "center",
// dataIndex: 'dataGatherType'
// },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
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',
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];

View File

@ -0,0 +1,295 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="选择监测站" name="stationCode">
<ApiSelect
:api="getStationList"
:params = stationType
showSearch
v-model:value="queryParam.stationCode"
optionFilterProp="label"
resultField="list"
labelField="stationName"
valueField="stationCode"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="选择设备" name="deployId">
<ApiSelect
:api="getDeviceList"
:params = deployType
showSearch
v-model:value="queryParam.deployId"
optionFilterProp="label"
resultField="list"
labelField="deployDes"
valueField="id"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="数据更新时间" name="dataDateTime">
<a-date-picker placeholder="" v-model:value="queryParam.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="设备部署编号" name="deviceCode">
<a-input placeholder="请输入设备部署编号查询" v-model:value="queryParam.deviceCode"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-form-item label="污染物类型" name="pollution">
<JDictSelectTag type="select" v-model:value="queryParam.pollution" dictCode="surv_soil_pullution" placeholder="请选择污染物类型" />
</a-form-item>
</a-col> -->
</template>
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> -->
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<!-- <a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button> -->
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<!-- <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> -->
<TableAction :actions="getDetailAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<!--省市区字段回显插槽-->
<template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }}
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<SurvTransdataSoilModal ref="registerModal" @success="handleSuccess"></SurvTransdataSoilModal>
</div>
</template>
<script lang="ts" name="appmana-survTransdataSoil" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './SurvTransdataSoil.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './SurvTransdataSoil.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import SurvTransdataSoilModal from './components/SurvTransdataSoilModal.vue'
import { ApiSelect} from '/@/components/Form/index';
import { getStationList } from '../../station/SurvStationInfo.api';
import {getDeviceList} from '../../deploy/SurvDeviceDeploy.api';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const stationType = { stationType: 'orient' };
const deployType = { deployTypes: ['6_water'] };
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: 'surv_transdata_soil',
api: list,
columns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
params.deployType = '6_water';
return Object.assign(params, queryParam);
},
},
exportConfig: {
name: "surv_transdata_soil",
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
/**
* 操作栏
*/
function getDetailAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
];
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
</style>

View File

@ -0,0 +1,186 @@
<template>
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<!-- <a-col :span="24">-->
<!-- <a-form-item label="站点名称" v-bind="validateInfos.stationName">-->
<!-- <a-input v-model:value="formData.stationName" placeholder="请输入站点名称" :disabled="disabled"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-item label="设备名称" v-bind="validateInfos.deployDes">
<a-input v-model:value="formData.deployDes" placeholder="请输入设备名称" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="设备编号" v-bind="validateInfos.deployCode">
<a-input v-model:value="formData.deployCode" placeholder="请输入设备编号" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="浊度(ntu)" v-bind="validateInfos.dataWaterNtu">
<a-input v-model:value="formData.dataWaterNtu" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="溶解氧(mg/L)" v-bind="validateInfos.dataWaterDo">
<a-input v-model:value="formData.dataWaterDo" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="pH" v-bind="validateInfos.dataWaterPh">
<a-input v-model:value="formData.dataWaterPh" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="水温(℃)" v-bind="validateInfos.dataWaterTemp">
<a-input v-model:value="formData.dataWaterTemp" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="电导率(uS/cm)" v-bind="validateInfos.dataWaterDdl">
<a-input v-model:value="formData.dataWaterDdl" placeholder="" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :span="24">
<a-form-item label="数据更新时间" v-bind="validateInfos.dataDateTime">
<a-date-picker placeholder="请选择数据更新时间" v-model:value="formData.dataDateTime" value-format="YYYY-MM-DD HH:mm:ss" show-time="{ format: 'YYYY-MM-DD HH:mm:ss' }" style="width: 100%" :disabled="disabled"/>
</a-form-item>
</a-col> -->
<!-- <a-col :span="24">
<a-form-item label="数据类型" v-bind="validateInfos.dataGatherType">
<a-input v-model:value="formData.dataGatherType" placeholder="请输入数据类型" :disabled="disabled"></a-input>
</a-form-item>
</a-col> -->
</a-row>
</a-form>
</a-spin>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../SurvTransdataSoil.api';
import { Form } from 'ant-design-vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: ()=>{} },
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
tenantId: '',
reVision: undefined,
createdBy: '',
createTime: '',
updatedBy: '',
isDel: undefined,
updatedTime: '',
dataSoilTemp: '',
dataSoilWet: '',
dataSoilSalt: '',
dataDateTime: '',
dataGatherType: '',
deviceName: '',
deployCode: '',
stationName: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = {
};
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
//
const disabled = computed(()=>{
if(props.formBpm === true){
if(props.formData.disabled === false){
return false;
}else{
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
*/
function edit(record) {
nextTick(() => {
resetFields();
//
Object.assign(formData, record);
});
}
/**
* 提交数据
*/
async function submitForm() {
//
await validate();
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
let model = formData;
if (model.id) {
isUpdate.value = true;
}
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
await saveOrUpdate(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
min-height: 500px !important;
overflow-y: auto;
padding: 24px 24px 24px 24px;
}
</style>

View File

@ -0,0 +1,75 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<SurvTransdataSoilForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></SurvTransdataSoilForm>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import SurvTransdataSoilForm from './SurvTransdataSoilForm.vue'
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style>
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>

View File

@ -71,7 +71,7 @@ onMounted(() => {
}else{
value=value.format(dateFormat)
}
getSummary(searchStationCode.value,value);
};
@ -161,17 +161,17 @@ onMounted(() => {
color: '#019680',
},
},
{
smooth: true,
name: '硝态氮',
stack: 'mg/L',
data: summaryNoDataList.value,
type: 'line',
areaStyle: {},
itemStyle: {
color: '#019634',
},
},
// {
// smooth: true,
// name: '',
// stack: 'mg/L',
// data: summaryNoDataList.value,
// type: 'line',
// areaStyle: {},
// itemStyle: {
// color: '#019634',
// },
// },
{
smooth: true,
name: '化学需氧量',
@ -183,17 +183,17 @@ onMounted(() => {
color: '#a65107',
},
},
{
smooth: true,
name: '氨氮',
stack: 'mg/L',
data: summaryNhDataList.value,
type: 'line',
areaStyle: {},
itemStyle: {
color: '#075ca6',
},
},
// {
// smooth: true,
// name: '',
// stack: 'mg/L',
// data: summaryNhDataList.value,
// type: 'line',
// areaStyle: {},
// itemStyle: {
// color: '#075ca6',
// },
// },
],
});
} else {