|
|
@@ -200,92 +200,92 @@
|
|
|
async function getDataList() {
|
|
|
spinningT.value = true;
|
|
|
try {
|
|
|
- const values1 = await getSegmentsList();
|
|
|
- const values2 = await getProjectsList();
|
|
|
- const values3 = await getMonitorsList();
|
|
|
- const values4 = await getDevicesList();
|
|
|
- const values5 = await getSensorsList();
|
|
|
- const values6 = await getMultiDatasList();
|
|
|
- const values7 = await getRutList();
|
|
|
- if (values1 && values2 && values3 && values4 && values5 && values6 && values7) {
|
|
|
- segmentsOptions.value = values1.result.map((e) => {
|
|
|
- return {
|
|
|
- id: e.id,
|
|
|
- value: e.id,
|
|
|
- label: e.lymc,
|
|
|
- };
|
|
|
- });
|
|
|
- projectsOptions.value = values2.result.map((e) => {
|
|
|
- return {
|
|
|
- id: e.id,
|
|
|
- value: e.id,
|
|
|
- label: e.gcmc,
|
|
|
- sshdid: e.sshdid,
|
|
|
- };
|
|
|
- });
|
|
|
- monitorsOptions.value = values3.result.map((e) => {
|
|
|
- return {
|
|
|
- id: e.id,
|
|
|
- value: e.id,
|
|
|
- label: e.dzmc,
|
|
|
- ssgcid: e.ssgcid,
|
|
|
- ssgcmc: e.ssgcmc,
|
|
|
- sshdid: e.sshdid,
|
|
|
- sshdmc: e.sshdmc,
|
|
|
- };
|
|
|
- });
|
|
|
- devicesOptions.value = values4.result.map((e) => {
|
|
|
- return {
|
|
|
- id: e.id,
|
|
|
- value: e.id,
|
|
|
- label: e.deviceName,
|
|
|
- deviceRtu: e.deviceRtu,
|
|
|
- monitorPointId: e.monitorPointId, //地灾点ID
|
|
|
- };
|
|
|
- });
|
|
|
- rutOptions.value = values7.result.map((e) => {
|
|
|
- return {
|
|
|
- id: e.id,
|
|
|
- value: e.id,
|
|
|
- label: e.rtuName,
|
|
|
- rtuCode: e.rtuCode,
|
|
|
- monitorPointId: e.monitorPointId, //地灾点ID
|
|
|
- };
|
|
|
- });
|
|
|
- sensorsOptions.value = values5.result.map((e) => {
|
|
|
- return {
|
|
|
- id: e.sensorInnerCode,
|
|
|
- value: e.sensorInnerCode,
|
|
|
- label: e.sensorType_dictText,
|
|
|
- deviceId: e.deviceId, //设备ID
|
|
|
- };
|
|
|
- });
|
|
|
- multiDatasOptions.value = values6.result.map((e) => {
|
|
|
- return {
|
|
|
- id: e.id,
|
|
|
- value: e.id,
|
|
|
- label: e.zymc,
|
|
|
- sshdid: e.sshdid,
|
|
|
- sshdmc: e.sshdid,
|
|
|
- ssgcid: e.deviceId,
|
|
|
- ssgcmc: e.deviceId,
|
|
|
- ssdzdid: e.deviceId,
|
|
|
- ssdzdmc: e.deviceId,
|
|
|
- };
|
|
|
- });
|
|
|
-
|
|
|
- // console.log(segmentsOptions.value);
|
|
|
- // console.log(projectsOptions.value);
|
|
|
- // console.log(monitorsOptions.value);
|
|
|
- // console.log(devicesOptions.value);
|
|
|
- // console.log(rutOptions.value);
|
|
|
- // console.log(sensorsOptions.value);
|
|
|
- // console.log(multiDatasOptions.value);
|
|
|
- TreeSelectData.value = processData(rutOptions.value, devicesOptions.value);
|
|
|
- console.log('TreeSelectData.value', TreeSelectData.value);
|
|
|
- } else {
|
|
|
- message.error('接口请求超时,请刷新页面重试!');
|
|
|
- }
|
|
|
+ // const values1 = await getSegmentsList();
|
|
|
+ // const values2 = await getProjectsList();
|
|
|
+ // const values3 = await getMonitorsList();
|
|
|
+ // const values4 = await getDevicesList();
|
|
|
+ // const values5 = await getSensorsList();
|
|
|
+ // const values6 = await getMultiDatasList();
|
|
|
+ // const values7 = await getRutList();
|
|
|
+ // if (values1 && values2 && values3 && values5 && values6 && values7) {
|
|
|
+ // segmentsOptions.value = values1.result.map((e) => {
|
|
|
+ // return {
|
|
|
+ // id: e.id,
|
|
|
+ // value: e.id,
|
|
|
+ // label: e.lymc,
|
|
|
+ // };
|
|
|
+ // });
|
|
|
+ // projectsOptions.value = values2.result.map((e) => {
|
|
|
+ // return {
|
|
|
+ // id: e.id,
|
|
|
+ // value: e.id,
|
|
|
+ // label: e.gcmc,
|
|
|
+ // sshdid: e.sshdid,
|
|
|
+ // };
|
|
|
+ // });
|
|
|
+ // monitorsOptions.value = values3.result.map((e) => {
|
|
|
+ // return {
|
|
|
+ // id: e.id,
|
|
|
+ // value: e.id,
|
|
|
+ // label: e.dzmc,
|
|
|
+ // ssgcid: e.ssgcid,
|
|
|
+ // ssgcmc: e.ssgcmc,
|
|
|
+ // sshdid: e.sshdid,
|
|
|
+ // sshdmc: e.sshdmc,
|
|
|
+ // };
|
|
|
+ // });
|
|
|
+ // devicesOptions.value = values4.result.map((e) => {
|
|
|
+ // return {
|
|
|
+ // id: e.id,
|
|
|
+ // value: e.id,
|
|
|
+ // label: e.deviceName,
|
|
|
+ // deviceRtu: e.deviceRtu,
|
|
|
+ // monitorPointId: e.monitorPointId, //地灾点ID
|
|
|
+ // };
|
|
|
+ // });
|
|
|
+ // rutOptions.value = values7.result.map((e) => {
|
|
|
+ // return {
|
|
|
+ // id: e.id,
|
|
|
+ // value: e.id,
|
|
|
+ // label: e.rtuName,
|
|
|
+ // rtuCode: e.rtuCode,
|
|
|
+ // monitorPointId: e.monitorPointId, //地灾点ID
|
|
|
+ // };
|
|
|
+ // });
|
|
|
+ // sensorsOptions.value = values5.result.map((e) => {
|
|
|
+ // return {
|
|
|
+ // id: e.sensorInnerCode,
|
|
|
+ // value: e.sensorInnerCode,
|
|
|
+ // label: e.sensorType_dictText,
|
|
|
+ // deviceId: e.deviceId, //设备ID
|
|
|
+ // };
|
|
|
+ // });
|
|
|
+ // multiDatasOptions.value = values6.result.map((e) => {
|
|
|
+ // return {
|
|
|
+ // id: e.id,
|
|
|
+ // value: e.id,
|
|
|
+ // label: e.zymc,
|
|
|
+ // sshdid: e.sshdid,
|
|
|
+ // sshdmc: e.sshdid,
|
|
|
+ // ssgcid: e.deviceId,
|
|
|
+ // ssgcmc: e.deviceId,
|
|
|
+ // ssdzdid: e.deviceId,
|
|
|
+ // ssdzdmc: e.deviceId,
|
|
|
+ // };
|
|
|
+ // });
|
|
|
+
|
|
|
+ // // console.log(segmentsOptions.value);
|
|
|
+ // // console.log(projectsOptions.value);
|
|
|
+ // // console.log(monitorsOptions.value);
|
|
|
+ // // console.log(devicesOptions.value);
|
|
|
+ // // console.log(rutOptions.value);
|
|
|
+ // // console.log(sensorsOptions.value);
|
|
|
+ // // console.log(multiDatasOptions.value);
|
|
|
+ // TreeSelectData.value = processData(rutOptions.value, devicesOptions.value);
|
|
|
+ // console.log('TreeSelectData.value', TreeSelectData.value);
|
|
|
+ // } else {
|
|
|
+ // message.error('接口请求超时,请刷新页面重试!');
|
|
|
+ // }
|
|
|
} finally {
|
|
|
spinningT.value = false;
|
|
|
}
|
|
|
@@ -335,7 +335,7 @@
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
- getDataList();
|
|
|
+ // getDataList();
|
|
|
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
|
|
labelWidth: 100,
|
|
|
schemas: formSchema,
|