瀏覽代碼

[Mod 0000] 解决车辆监测历史查询表格表头跟数据不对应问题

hongrunxia 6 天之前
父節點
當前提交
09e61216a7

+ 6 - 1
src/views/vent/monitorManager/comment/HistoryTable.vue

@@ -155,6 +155,7 @@
   watch(historyType, (type) => {
     if (!type) return;
     // if (historyTable.value) getForm().resetFields()
+
     const column = getTableHeaderColumns(type.includes('_history') ? type : type + '_history');
     if (column && column.length < 1) {
       const arr = type.split('_');
@@ -252,7 +253,11 @@
       });
 
       stationType.value = deviceOptions.value[0]['stationtype'];
-      historyType.value = deviceOptions.value[0]['strtype'] || deviceOptions.value[0]['devicekind'];
+      if (props.deviceType.startsWith('vehicle')) {
+        historyType.value = 'vehicle';
+      } else {
+        historyType.value = deviceOptions.value[0]['strtype'] || deviceOptions.value[0]['devicekind'];
+      }
     }
     if (VENT_PARAM.historyIsMultiple) {
       await getForm().setFieldsValue({

+ 5 - 25
src/views/vent/monitorManager/deviceMonitor/components/device/index.vue

@@ -139,12 +139,12 @@
           <FullscreenExitOutlined style="font-size: 18px" />
         </div>
         <!-- 是人员定位表单代码,由于放在tab中,表格对已知刷新,导致表单数据也在刷寻,造成输入一半的中文时会清空输入框的内容,导致的输入不上数据 -->
-        <div v-if="deviceType.startsWith('location') && activeKey == '1'" class="location-form" style="position: absolute; z-index: 9999; top: 50px">
+        <div v-if="(deviceType.startsWith('location') || deviceType.startsWith('vehicle')) && activeKey == '1'" class="location-form" style="position: absolute; z-index: 9999; top: 50px">
           <div class="location-form-item">
-            <span class="location-form-label">人员名称:</span>
+            <span class="location-form-label">{{ deviceType.startsWith('location') ? '人员名称:' : '车辆名称' }}</span>
             <Input style="width: 200px" v-model:value="locationForm.strname" />
           </div>
-          <div class="location-form-item">
+          <!-- <div class="location-form-item">
             <span class="location-form-label">所属部门:</span>
             <MTreeSelect
               style="width: 200px"
@@ -154,7 +154,7 @@
               :virtual="false"
               :isGetPopupContainer="false"
             />
-          </div>
+          </div> -->
           <div class="location-form-item">
             <span class="location-form-label">分站名称:</span>
             <Input style="width: 200px" v-model:value="locationForm.stationname" />
@@ -295,8 +295,8 @@
                 :isShowActionColumn="true"
                 :isShowSelect="false"
                 title="设备监测"
-                :form-config="vehicleFormConfig"
                 :scroll="{ y: scroll.y - 110 }"
+                style="margin-top: 60px"
               >
                 <template v-if="!noLocationList.includes('location')" #action="{ record }">
                   <TableAction
@@ -1173,26 +1173,6 @@ function goDetail(record?) {
     }
   }
 }
-// function goGasDayReport() {
-//   const newPage = router.resolve({ path: '/gas/gas-report-inspect/home' });
-//   window.open(newPage.href, '_blank');
-// }
-// function gogasDayReportHis() {
-//   const newPage = router.resolve({ path: '/gas/gasDayReport/home' });
-//   window.open(newPage.href, '_blank');
-// }
-// function goDustDayReport() {
-//   const newPage = router.resolve({ path: '/dustDayReport/home' });
-//   window.open(newPage.href, '_blank');
-// }
-// function goBundleDayReport() {
-//   const newPage = router.resolve({ path: '/bundleDayReport/home' });
-//   window.open(newPage.href, '_blank');
-// }
-// function goBundleSpyDayReport() {
-//   const newPage = router.resolve({ path: '/bundleSpyDayReport/home' });
-//   window.open(newPage.href, '_blank');
-// }
 function exportXls() {
   handleExportXls('瓦斯巡检记录', getExportUrl, { devicetype: deviceType.value });
 }

+ 1 - 0
src/views/vent/monitorManager/deviceMonitor/components/device/modal/HistoryTableMajorPath.vue

@@ -183,6 +183,7 @@
         current: 1,
         pageSize: 10,
         pageSizeOptions: ['10', '30', '50', '100'],
+        showQuickJumper: false,
       },
     },
   });