소스 검색

[Mod 000000] 解决了文件导出由于路径有特殊符号导致的下载失败问题

hongrunxia 2 일 전
부모
커밋
33b65aade5

+ 1 - 1
src/hooks/system/useMethods.ts

@@ -65,7 +65,7 @@ export function useMethods() {
         debugger;
         if (data.code == 200 && data.result) {
           const messageArr = data.result.split('/');
-          const fileUrl = messageArr[messageArr.length - 1];
+          const fileUrl = encodeURIComponent(messageArr[messageArr.length - 1]);
           if (fileUrl) {
             const baseApiUrl = glob.domainUrl;
             // 下载文件

+ 10 - 8
src/views/vent/monitorManager/comment/GroupMonitorTable.vue

@@ -207,7 +207,7 @@
       width: 40,
       align: 'center',
       customCell: (_, index) => {
-        const columnNum = _.modalTyoe === 'lijing_3' ? 3 : 2;
+        const columnNum = _.modalTyoe ? (_.modalTyoe.endsWith('_3') ? 3 : _.modalTyoe.endsWith('_1') ? 1 : 2) : 2;
         if (_.rowIndex % columnNum == 0) {
           return { rowSpan: columnNum };
         } else {
@@ -221,8 +221,7 @@
       width: 80,
       align: 'center',
       customCell: (_, index) => {
-        debugger;
-        const columnNum = _.modalTyoe === 'lijing_3' ? 3 : 2;
+        const columnNum = _.modalTyoe ? (_.modalTyoe.endsWith('_3') ? 3 : _.modalTyoe.endsWith('_1') ? 1 : 2) : 2;
         if (_.rowIndex % columnNum == 0) {
           return { rowSpan: columnNum };
         } else {
@@ -230,7 +229,6 @@
         }
       },
       customRender: ({ text, record, index }) => {
-        const columnNum = record.modalTyoe === 'lijing_3' ? 3 : 2;
         return record.index + 1;
       },
     };
@@ -252,7 +250,8 @@
     });
     if (strinstallpos) {
       strinstallpos.customCell = (_, index) => {
-        const columnNum = _.modalTyoe === 'lijing_3' ? 3 : 2;
+        debugger;
+        const columnNum = _.modalTyoe ? (_.modalTyoe.endsWith('_3') ? 3 : _.modalTyoe.endsWith('_1') ? 1 : 2) : 2;
         if (_.rowIndex % columnNum == 0) {
           return { rowSpan: columnNum };
         } else {
@@ -263,7 +262,7 @@
     columns.value.forEach((item) => {
       if (item.dataIndex === 'strinstallpos' || item.dataIndex === 'strname' || item.dataIndex.endsWith('_merge')) {
         item.customCell = (_, index) => {
-          const columnNum = _.modalTyoe === 'lijing_3' ? 3 : 2;
+          const columnNum = _.modalTyoe ? (_.modalTyoe.endsWith('_3') ? 3 : _.modalTyoe.endsWith('_1') ? 1 : 2) : 2;
           if (_.rowIndex % columnNum == 0) {
             return { rowSpan: columnNum };
           } else {
@@ -290,7 +289,7 @@
           align: 'center',
           slots: { customRender: 'operation' },
           customCell: (_, index) => {
-            const columnNum = _.modalTyoe === 'lijing_3' ? 3 : 2;
+            const columnNum = _.modalTyoe ? (_.modalTyoe.endsWith('_3') ? 3 : _.modalTyoe.endsWith('_1') ? 1 : 2) : 2;
             if (_.rowIndex % columnNum == 0) {
               return { rowSpan: columnNum };
             } else {
@@ -392,6 +391,7 @@
           }
         });
         resultData1['deviceID'] = resultData2['deviceID'] = data['deviceID'];
+        debugger;
         if (props.columnsType.startsWith('fanlocal') && sysOrgCode !== 'zmhjhzmy') {
           resultData1['runDevice'] = '主机';
           resultData2['runDevice'] = '备机';
@@ -415,8 +415,10 @@
           resultData2['index'] = index;
           resultData3['index'] = index;
         }
-        if (modalTyoe === 'lijing_3') {
+        if (modalTyoe && modalTyoe.endsWith('_3')) {
           list.push(resultData1, resultData2, resultData3);
+        } else if (modalTyoe && modalTyoe.endsWith('_1')) {
+          list.push(resultData1);
         } else {
           list.push(resultData1, resultData2);
         }

+ 11 - 1
src/views/vent/monitorManager/deviceMonitor/components/device/index.vue

@@ -941,7 +941,7 @@
         //   deviceActive.value = deviceArr[0].deviceType
         //   monitorChange(0)
         // }
-        deviceActive.value = deviceArr[0].deviceType;
+        // deviceActive.value = route.query['deviceActive'] || deviceArr[0].deviceType;
         monitorChange(0);
       }
     } else {
@@ -1350,6 +1350,7 @@
   function monitorChange(index) {
     dataSource.value = [];
     deviceActive.value = deviceList.value[index].deviceType;
+    router.replace({ path: route.path, query: { ...route.query, deviceActive: deviceActive.value } });
     if (deviceType.value != deviceActive.value) deviceType.value = deviceActive.value;
     if (activeKey.value == 'monitor' && monitorTable.value) {
       monitorTable.value.setLoading(true);
@@ -1400,6 +1401,15 @@
     { immediate: true }
   );
 
+  watch(
+    () => deviceActive.value,
+    async (val) => {
+      if (val) {
+        router.push({ path: route.path, query: { ...route.query, deviceActive: deviceActive.value } });
+      }
+    }
+  );
+
   onMounted(async () => {
     const pageObj = props.pageData;
     if (!pageObj) return;

+ 1 - 1
src/views/vent/monitorManager/deviceMonitor/index.vue

@@ -37,7 +37,7 @@
   };
 
   watch(
-    () => route.fullPath,
+    () => route.query.type + '' + route.query.deviceType,
     () => {
       const { type, deviceType, deviceid } = route.query;
       if (type === 'tunMonitor') {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 687 - 626
src/views/vent/monitorManager/fanLocalMonitor/index.vue


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 722 - 617
src/views/vent/monitorManager/mainFanMonitor/index.vue


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.