Forráskód Böngészése

提交修改X轴数据对齐方式,修改报错等问题

cl 1 éve
szülő
commit
1c22b2ddb1

+ 9 - 0
src/views/prediction/artificial/flood.vue

@@ -1416,6 +1416,9 @@ function setCharts() {
         data: dataCenter.chartsData.t.map(function (str) {
           return str.replace(' ', '\n');
         }),
+        axisTick:{
+          alignWithLabel:true
+        },
         axisLabel: {
           show: true,
           textStyle: {
@@ -1440,6 +1443,9 @@ function setCharts() {
         data: dataCenter.chartsData.t.map(function (str) {
           return str.replace(' ', '\n');
         }),
+        axisTick:{
+          alignWithLabel:true
+        },
         gridIndex: 1,
         axisLabel: {
           show: true,
@@ -1736,6 +1742,9 @@ function setCharts76() {
       data: dataCenter.chartsData.t.map(function (str) {
         return str.replace(' ', '\n');
       }),
+      axisTick:{
+        alignWithLabel:true
+      },
       axisLabel: {
         show: true,
         textStyle: {

+ 6 - 0
src/views/prediction/regular/flood.vue

@@ -281,6 +281,9 @@ function setCharts() {
         data: dataCenter.chartsData.t.map(function (str) {
           return str.replace(' ', '\n');
         }),
+        axisTick:{
+          alignWithLabel:true
+        },
         axisLabel: {
           show: true,
           textStyle: {
@@ -305,6 +308,9 @@ function setCharts() {
         data: dataCenter.chartsData.t.map(function (str) {
           return str.replace(' ', '\n');
         }),
+        axisTick:{
+          alignWithLabel:true
+        },
         gridIndex: 1,
         axisLabel: {
           show: true,

+ 10 - 1
src/views/prediction/work/flood.vue

@@ -1400,6 +1400,9 @@ function setCharts() {
         data: dataCenter.chartsData.t.map(function (str) {
           return str.replace(' ', '\n');
         }),
+        axisTick:{
+          alignWithLabel:true
+        },
         axisLabel: {
           show: true,
           textStyle: {
@@ -1425,6 +1428,10 @@ function setCharts() {
           return str.replace(' ', '\n');
         }),
         gridIndex: 1,
+        
+        axisTick:{
+          alignWithLabel:true
+        },
         axisLabel: {
           show: true,
           textStyle: {
@@ -1619,7 +1626,6 @@ function setCharts76() {
               q_forecast: '预测流量(m³/s)',
             };
             let data = [];
-            console.log();
             dataCenter.chartsData.t.forEach((item, index) => {
               let obj = {
                 time: item,
@@ -1691,6 +1697,9 @@ function setCharts76() {
         textStyle: {
           color: '#333333',
         },
+        axisTick:{
+          alignWithLabel:true
+        },
         formatter: function (val) {
           var strs = val.split(''); //字符串数组
           var str = '';

+ 87 - 87
src/views/system/role/RoleDrawer.vue

@@ -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,