Procházet zdrojové kódy

1. 新增局部风机echarts 图表,图标的字段可以在设备字段里灵活配置
2. 修改主风机echarts图标逻辑

hongrunxia před 5 měsíci
rodič
revize
8c11c108d1

+ 2 - 0
package.json

@@ -60,6 +60,8 @@
     "mky-svg": "^1.0.2",
     "mockjs": "^1.1.0",
     "moment": "^2.29.4",
+    "mxcad": "^1.0.261",
+    "mxdraw": "^0.1.306",
     "nprogress": "^0.2.0",
     "path-to-regexp": "^6.2.1",
     "pinia": "2.1.6",

+ 54 - 0
pnpm-lock.yaml

@@ -122,6 +122,12 @@ dependencies:
   moment:
     specifier: ^2.29.4
     version: 2.30.1
+  mxcad:
+    specifier: ^1.0.261
+    version: 1.0.261(three@0.162.0)
+  mxdraw:
+    specifier: ^0.1.306
+    version: 0.1.306(three@0.162.0)
   nprogress:
     specifier: ^0.2.0
     version: 0.2.0
@@ -2279,6 +2285,12 @@ packages:
     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
     dev: true
 
+  /@fingerprintjs/fingerprintjs@4.5.0:
+    resolution: {integrity: sha512-mFSQoxyt8SGGRp1QUlhcnVtquW2HzCKfHKxAoIurR6soIJpuK3VvZuH0sg8eNaHH2dJhI3mZOEUx4k+P4GqXzw==}
+    dependencies:
+      tslib: 2.6.2
+    dev: false
+
   /@fullcalendar/common@5.10.1:
     resolution: {integrity: sha512-EumKIJcQTvQdTs75/9dmeREFgjcRVWzqHJS1Xvlz5mNsmB+w9EINCHETRjChtAQg1WD/lTQyVj4sHsKO7vCMSw==, tarball: http://registry.npm.taobao.org/@fullcalendar/common/-/common-5.10.1.tgz}
     dependencies:
@@ -6818,6 +6830,12 @@ packages:
       batch-processor: 1.0.0
     dev: false
 
+  /element-resize-event-polyfill@1.0.5:
+    resolution: {integrity: sha512-HWjhWQIi8Ilw8YWyX5O4b7L2AIQE9SMP+LFoHrr6b1ZLIUIpqybA5eU3v2uWAnE0ptCxyLTT92IgLTehWldIfQ==}
+    dependencies:
+      resize-observer-polyfill: 1.5.1
+    dev: false
+
   /emittery@0.13.1:
     resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==, tarball: http://registry.npm.taobao.org/emittery/-/emittery-0.13.1.tgz}
     engines: {node: '>=12'}
@@ -9909,6 +9927,10 @@ packages:
     hasBin: true
     dev: true
 
+  /jquery@3.7.1:
+    resolution: {integrity: sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==}
+    dev: false
+
   /js-base64@2.6.4:
     resolution: {integrity: sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==, tarball: http://registry.npm.taobao.org/js-base64/-/js-base64-2.6.4.tgz}
     dev: true
@@ -10716,6 +10738,30 @@ packages:
     engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
     dev: true
 
+  /mxcad@1.0.261(three@0.162.0):
+    resolution: {integrity: sha512-wgnLAbAxZDdqQ3j4vPUfeH9zqxVn4bhjXszTQBQd7I8CwrQidyp5XDFF4R8+AFa7+JjQ9mOG5CJT6rad6KCeDQ==}
+    dependencies:
+      '@fingerprintjs/fingerprintjs': 4.5.0
+      iconv-lite: 0.6.3
+      mxdraw: 0.1.306(three@0.162.0)
+      threebox-plugin: 2.2.7
+    transitivePeerDependencies:
+      - three
+    dev: false
+
+  /mxdraw@0.1.306(three@0.162.0):
+    resolution: {integrity: sha512-gqVEksaCW9P6wSM3iNtFyhtAOF7JUdOrCXqybBWjt/0TSXyiG8dAhDO+tSSNVnhWro4VX3uOsh25kzUp7jKFrg==}
+    engines: {node: '>=6.0.0'}
+    peerDependencies:
+      three: ^0.113.2
+    dependencies:
+      element-resize-event-polyfill: 1.0.5
+      jquery: 3.7.1
+      lodash: 4.17.21
+      three: 0.162.0
+      three-gif-texture: 1.0.15
+    dev: false
+
   /nanoid@3.3.6:
     resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==}
     engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
@@ -12810,10 +12856,18 @@ packages:
     resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==, tarball: http://registry.npm.taobao.org/text-table/-/text-table-0.2.0.tgz}
     dev: true
 
+  /three-gif-texture@1.0.15:
+    resolution: {integrity: sha512-GzTF6OtgdjqKOF+AtA0WgLguJ8/iqE5u9KQQadmgWLusM2ML82XvQJuoGD6MqQalC33prUeaf2zqTWCP8fR4rw==}
+    dev: false
+
   /three@0.162.0:
     resolution: {integrity: sha512-xfCYj4RnlozReCmUd+XQzj6/5OjDNHBy5nT6rVwrOKGENAvpXe2z1jL+DZYaMu4/9pNsjH/4Os/VvS9IrH7IOQ==}
     dev: false
 
+  /threebox-plugin@2.2.7:
+    resolution: {integrity: sha512-H87Nm4w1PfisHPHzavTGXlwIoJpx2+QU57GooQYIhF51lsg+U5A0KGf3Jrv/HWsLCGOwV2BTnv7UTLfpO1EccQ==}
+    dev: false
+
   /throat@6.0.2:
     resolution: {integrity: sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ==, tarball: http://registry.npm.taobao.org/throat/-/throat-6.0.2.tgz}
     dev: false

+ 1 - 1
src/hooks/web/useWebColumns.ts

@@ -26,7 +26,7 @@ const arrToColumns = (tableHeaderColumns = []) => {
 
 const arrToChartColumns = (tableHeaderColumns = []) => {
   const colors = ['#FDB146', '#00FFA8', '#AE19FF', '#DA3914', '#03C2EC', '#749f83', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'];
-  const columns: BasicColumn[] = [];
+  const columns: [] = [];
   tableHeaderColumns.forEach((item: any, i) => {
     const columnsItem = {
       legend: item.legend,

+ 10 - 10
src/qiankun/index.ts

@@ -54,16 +54,16 @@ const mountMicroApp = (path, toPath?) => {
               credentials: 'include',
             });
           }
-          return window.fetch(url, {
-            ...args,
-            headers: {
-              // 'Access-Control-Allow-Origin': '*',
-              'Content-Type': 'text/plain',
-            },
-            mode: 'cors',
-            credentials: 'include',
-          });
-          // return window.fetch(url, ...args);
+          // return window.fetch(url, {
+          //   ...args,
+          //   headers: {
+          //     // 'Access-Control-Allow-Origin': '*',
+          //     'Content-Type': 'text/plain',
+          //   },
+          //   mode: 'cors',
+          //   credentials: 'include',
+          // });
+          return window.fetch(url, ...args);
         },
       }); // 手动加载子应用
     }

+ 5 - 15
src/views/vent/monitorManager/fanLocalMonitor/fanLocal.data.ts

@@ -3570,23 +3570,14 @@ export const option = reactive<EChartsOption>({
   series: [],
 });
 export const echatsOption = {
-  // tooltip: {
-  //   show: true,
-  //   formatter: function (datas: []) {
-  //     return datas.map((item) => {
-  //       item['data'] = item['data'].toFixed(2);
-  //       return item;
-  //     });
-  //   },
-  // },
   legend: {
     top: -10,
   },
   grid: {
-    top: '15%',
-    left: '20',
-    right: '25',
-    bottom: '0',
+    top: '13%',
+    left: '30',
+    right: '35',
+    bottom: '10%',
     containLabel: true,
   },
   toolbox: {
@@ -3602,7 +3593,7 @@ export const echatsOption = {
       margin: 10,
       color: '#f1f1f199',
     },
-    name: 'm³/min',
+    name: '',
   },
   yAxis: {
     axisLabel: {
@@ -3610,7 +3601,6 @@ export const echatsOption = {
     },
   },
 };
-
 export const chartsColumnList = [
   {
     legend: '瓦斯浓度',

+ 74 - 53
src/views/vent/monitorManager/fanLocalMonitor/index.vue

@@ -419,39 +419,32 @@
               />
             </div>
           </a-tab-pane>
-          <a-tab-pane key="2" tab="风量实时曲线图" force-render v-if="hasPermission('echart:show')">
-            <!-- <a-tab-pane key="2" tab="风量实时曲线图" force-render> -->
-            <div class="tab-item" v-if="activeKey === '2'">
-              <!-- <div class="vent-flex-row-between" style="height: 100%">
-                <BarSingle
-                  :xAxisData="xAxisDataGas"
-                  :dataSource="dataSource[selectRowIndex]"
-                  height="100%"
-                  :chartsColumns="chartsColumns"
-                  style="flex: 3"
-                />
-                <BarSingle
-                  v-if="globalConfig?.simulatedPassword"
-                  :xAxisData="[
-                    { key: 'F1', valueKey: 'windQuantity1' },
-                    { key: 'F2', valueKey: 'windQuantity2' },
-                  ]"
-                  :dataSource="dataSource[selectRowIndex]"
-                  height="100%"
-                  :chartsColumns="chartsColumns1"
-                  style="flex: 2"
+          <a-tab-pane key="2" tab="曲线配置" v-if="hasPermission('show:fanEcharts')">
+            <div v-if="activeKey == '2'" class="tab-item" style="display: flex">
+              <div style="width: calc(50% - 20px); height: 100%">
+                <div style="color: #fff; width: 100%; text-align: center; margin: 5px 0px">主机</div>
+                <BarAndLine
+                  class="echarts-line"
+                  xAxisPropType="readTime"
+                  :dataSource="echartsDataList"
+                  height="90%"
+                  width="100%"
+                  :chartsColumns="chartsColumnsFan1"
+                  :option="echatsOption"
+                  chartsType="detail"
                 />
-              </div> -->
-              <div class="vent-flex-row-between" style="height: 100%">
+              </div>
+              <div style="width: calc(50% - 20px); height: 100%">
+                <div style="color: #fff; width: 100%; text-align: center; margin: 5px 0px">备机</div>
                 <BarAndLine
                   class="echarts-line"
-                  xAxisPropType="time"
-                  :dataSource="historyList"
+                  xAxisPropType="readTime"
+                  :dataSource="echartsDataList"
                   height="90%"
                   width="100%"
-                  :chartsColumns="chartsColumns"
+                  :chartsColumns="chartsColumnsFan2"
                   :option="echatsOption"
-                  chartsType="listMonitor"
+                  chartsType="detail"
                 />
               </div>
             </div>
@@ -616,7 +609,7 @@
   import lodash from 'lodash';
   import { getTableList, list, autoAdjust } from '/@/views/vent/monitorManager/fanLocalMonitor/fanLocal.api';
   import { list as baseList } from '../../deviceManager/fanTabel/fan.api';
-  import { chartsColumns1, echatsOption } from './fanLocal.data';
+  import { echatsOption } from './fanLocal.data';
   import { deviceControlApi } from '/@/api/vent/index';
   import { setDivHeight } from '/@/utils/event';
   import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
@@ -636,6 +629,8 @@
   import { usePermission } from '/@/hooks/web/usePermission';
   import { useGlobSetting } from '/@/hooks/setting';
   import { useMessage } from '/@/hooks/web/useMessage';
+  import { cloneDeep } from 'lodash-es';
+
   const globalConfig = inject('globalConfig');
   const HistoryTable =
     globalConfig.History_Type == 'remote'
@@ -819,8 +814,8 @@
   const fanControl = ref('');
   const targetVolume = ref(600);
   const historyList = ref([]);
-  const remoteChartsColumns = getTableHeaderColumns('fanlocal_chart');
-  const chartsColumns = remoteChartsColumns && remoteChartsColumns.length > 0 ? remoteChartsColumns : chartsColumns1;
+  // const remoteChartsColumns = getTableHeaderColumns('fanlocal_chart');
+  // const chartsColumns = remoteChartsColumns && remoteChartsColumns.length > 0 ? remoteChartsColumns : chartsColumns1;
 
   const passWord = ref('');
   // 默认初始是第一行
@@ -867,6 +862,30 @@
 
   const { getCamera, removeCamera } = useCamera();
 
+  const echartsDataList = ref<any[]>([]);
+
+  const remoteChartsColumns = getTableHeaderColumns('fanlocal_chart');
+  const chartsColumns = remoteChartsColumns && remoteChartsColumns.length > 0 ? remoteChartsColumns : [];
+  let chartsColumnsFan1 = [],
+    chartsColumnsFan2 = [];
+
+  // 这里需要处理主备echartColumns
+  if (chartsColumns.length > 0) {
+    for (let i = 0; i < chartsColumns.length; i++) {
+      let itemColumn = chartsColumns[i];
+      let dataIndexFan1, dataIndexFan2;
+
+      if (itemColumn['dataIndex']) {
+        const dataIndex = itemColumn['dataIndex'] as string;
+
+        dataIndexFan1 = dataIndex.startsWith('Fan') ? dataIndex.replace('Fan', 'Fan1') : dataIndex.replace('fan', 'fan1');
+        dataIndexFan2 = dataIndex.startsWith('Fan') ? dataIndex.replace('Fan', 'Fan2') : dataIndex.replace('fan', 'fan2');
+        chartsColumnsFan1.push({ ...itemColumn, dataIndex: dataIndexFan1 });
+        chartsColumnsFan2.push({ ...itemColumn, dataIndex: dataIndexFan2 });
+      }
+    }
+  }
+
   watch(deviceType, (type) => {
     rightColumns.value = getTableHeaderColumns(type + '_monitor_right') as [];
     if (rightColumns.value && rightColumns.value.length < 1) {
@@ -969,23 +988,23 @@
           //   if (data['m3']) data['inletAirVolume_merge'] = (Number(data['m3']) * 1.08).toFixed(2);
           // }
           dataSource.value.push(data);
-          if (selectRowIndex.value > -1) {
-            let echartsData = dataArr[selectRowIndex.value]['history'] || [];
-            echartsData = echartsData.filter((item) => {
-              item['FanfHz'] = data['Fan1StartStatus'] == '1' ? item['Fan1fHz'] : data['Fan2StartStatus'] == '1' ? item['Fan2fHz'] : 0;
-              item['windQuantity2'] =
-                item['windQuantity2'] ||
-                item['m3'] ||
-                item['ductOutletAirVolume_merge'] ||
-                item['windOutSpeed_merge'] ||
-                item['windOutSpeed1'] ||
-                item['windOutSpeed2'] ||
-                item['windOutSpeed_merge'];
-              return true;
-            });
-            historyList.value = echartsData;
-          }
         });
+        if (selectRowIndex.value > -1) {
+          const data = dataArr[selectRowIndex.value];
+          // 存放echarts数据
+          if (data && data['readTime']) {
+            const dataList = cloneDeep(echartsDataList.value);
+            if (dataList.length == 0 || dataList[dataList.length - 1]['readTime'] !== data['readTime']) {
+              if (dataList.length < 15) {
+                dataList.push({ ...data });
+              } else {
+                dataList.shift();
+                dataList.push({ ...data });
+              }
+              echartsDataList.value = dataList;
+            }
+          }
+        }
       } else {
         return (dataSource.value = []);
       }
@@ -1128,6 +1147,7 @@
       content: '您确定要控制吗?',
       onOk: () => handerFn(),
     });
+
     const handerFn = () => {
       const handType = controlType.value;
       const data = {
@@ -1406,24 +1426,25 @@
         modalTitle.value = '';
         modalIsShow.value = false;
       } else if (handType === 'zhlk' || handType === 'gasOverSet') {
+        modalIsShow.value = false;
         if (targetVolume.value) {
           const params =
             handType === 'zhlk'
               ? { auto: 1, fanlocalId: selectData.deviceID, xufengliang: targetVolume.value }
               : { auto: 1, fanlocalId: selectData.deviceID, gasMax: gasWarningVal.value };
-          autoAdjust(params).then(() => {
-            if (res.success) {
+          autoAdjust(params)
+            .then(() => {
+              activeKey.value = '2';
               if (globalConfig.History_Type == 'remote') {
                 message.success('指令已下发至生产管控平台成功!');
               } else {
                 message.success('指令已下发成功!');
               }
               modalTitle.value = '';
-              modalIsShow.value = false;
-            } else {
-              message.error(res.message);
-            }
-          });
+            })
+            .catch(() => {
+              message.error('指令下发失败');
+            });
         }
       }
     };

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 564 - 546
src/views/vent/monitorManager/mainFanMonitor/index.vue


+ 165 - 152
src/views/vent/performance/approvalPend/index.vue

@@ -1,134 +1,144 @@
 <template>
-    <div class="approvalPend">
-        <a-table size="small" :dataSource="dataSource" :columns="columns" :scroll="{ y: 620 }" :pagination="pagination"
-            @change="pageChange">
-            <template #actionSp="{ record }">
-                <a class="table-action-link" @click="handleSpDetail(record)">审批详情</a>
-            </template>
-            <template #actionWj="{ record }">
-                <a class="table-action-link" @click="handleEdit(record)">编辑</a>
-                <a class="table-action-link" @click="handleDownLoad(record)">下载</a>
-            </template>
-        </a-table>
-        <!-- 审批详情弹窗 -->
-        <a-modal v-model:visible="visibleSp" width="1000px" :footer="null" :title="titleSp" centered destroyOnClose>
-            <HistorySp :historySpList="historySpList" :imgSrc="imgSrc" :isShow="isShow" :spInfo="spInfo"
-                @spClose="spClose">
-            </HistorySp>
-        </a-modal>
-        <DeviceModal :editID="editID" :fileType="fileType" @register="registerDeviceModal" />
-        <CADModal @register="registerCADModal" />
-    </div>
+  <div class="approvalPend">
+    <a-table size="small" :dataSource="dataSource" :columns="columns" :scroll="{ y: 620 }" :pagination="pagination" @change="pageChange">
+      <template #actionSp="{ record }">
+        <a class="table-action-link" @click="handleSpDetail(record)">审批详情</a>
+      </template>
+      <template #actionWj="{ record }">
+        <a class="table-action-link" @click="handleEdit(record)">编辑</a>
+        <a class="table-action-link" @click="handleDownLoad(record)">下载</a>
+      </template>
+    </a-table>
+    <!-- 审批详情弹窗 -->
+    <a-modal v-model:visible="visibleSp" width="1000px" :footer="null" :title="titleSp" centered destroyOnClose>
+      <HistorySp :historySpList="historySpList" :imgSrc="imgSrc" :isShow="isShow" :spInfo="spInfo" @spClose="spClose" />
+    </a-modal>
+    <DeviceModal :editID="editID" :fileType="fileType" @register="registerDeviceModal" />
+    <CADModal @register="registerCADModal" />
+  </div>
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, watch, nextTick, defineProps, onMounted, provide, toRaw } from 'vue'
-import HistorySp from '../comment/HistorySp.vue'
-import DeviceModal from '../comment/DeviceModal.vue';
-import CADModal from '../comment/CADModal.vue';
-import { columns } from './approvalPend.data'
-import { getNowUserAgencyData, downLoad, } from '../fileDetail/fileDetail.api';
-import { historicFlowNew, getHighlightImgNew, getTodoTask, } from '../comment/comment.api'
-import { useModal } from '/@/components/Modal';
+  import { ref, reactive, watch, nextTick, defineProps, onMounted, provide, toRaw } from 'vue';
+  import HistorySp from '../comment/HistorySp.vue';
+  import DeviceModal from '../comment/DeviceModal.vue';
+  import CADModal from '../comment/CADModal.vue';
+  import { columns } from './approvalPend.data';
+  import { getNowUserAgencyData, downLoad } from '../fileDetail/fileDetail.api';
+  import { historicFlowNew, getHighlightImgNew, getTodoTask } from '../comment/comment.api';
+  import { useModal } from '/@/components/Modal';
 
-let props = defineProps({
+  let props = defineProps({
     selected: {
-        type: Object,
-        default: () => {
-            return {}
-        }
-    }
-})
-//待审批列表数据
-let dataSource = ref<any[]>([])
-//分页参数配置
-let pagination = reactive({
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  });
+  //待审批列表数据
+  let dataSource = ref<any[]>([]);
+  //分页参数配置
+  let pagination = reactive({
     current: 1, // 当前页码
     pageSize: 10, // 每页显示条数
     total: 0, // 总条目数,后端返回
     // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
     showSizeChanger: true, // 是否可改变每页显示条数
-    pageSizeOptions: ['10', '20', '50',], // 可选的每页显示条数
-})
-let selectedParam = reactive({})
+    pageSizeOptions: ['10', '20', '50'], // 可选的每页显示条数
+  });
+  let selectedParam = reactive({});
 
-//审批详情弹窗数据
-let visibleSp = ref(false)
-let titleSp = ref('审批详情')
-//审批详情历史数据
-let historySpList = reactive<any[]>([])
-let imgSrc = ref('')
-//审批-是否显示撤回/驳回按钮
-let isShow = ref(true)
-//审批通过/驳回参数信息
-let spInfo = reactive({})
-const isUpdate = ref(false);
-const record = reactive<Record<string, any>>({});
-provide('formData', record);
-let fileType = ref(''); //文件类型
-let editID = ref(0); //文件ID
-// CAD预览相关的逻辑
-let [registerCADModal, { openModal: openCADModal }] = useModal();
-let [registerDeviceModal, { openModal, closeModal }] = useModal();
+  //审批详情弹窗数据
+  let visibleSp = ref(false);
+  let titleSp = ref('审批详情');
+  //审批详情历史数据
+  let historySpList = reactive<any[]>([]);
+  let imgSrc = ref('');
+  //审批-是否显示撤回/驳回按钮
+  let isShow = ref(true);
+  //审批通过/驳回参数信息
+  let spInfo = reactive({});
+  const isUpdate = ref(false);
+  const record = reactive<Record<string, any>>({});
+  provide('formData', record);
+  let fileType = ref(''); //文件类型
+  let editID = ref(0); //文件ID
+  // CAD预览相关的逻辑
+  let [registerCADModal, { openModal: openCADModal }] = useModal();
+  let [registerDeviceModal, { openModal, closeModal }] = useModal();
 
-//获取待办列表数据
-async function getNowUserAgencyDataList() {
-    let res = await getNowUserAgencyData({ pageNo: pagination.current, pageSize: pagination.pageSize, tableName: 'vent.file_server_info', parentId: selectedParam.id || '' })
-    console.log(res, '待办列表--------')
-    dataSource.value = res.records
-    pagination.total = res.total
-}
-//分页切换
-function pageChange(val) {
-    pagination.current = val.current
-    pagination.pageSize = val.pageSize
-    getNowUserAgencyDataList()
-}
+  //获取待办列表数据
+  async function getNowUserAgencyDataList() {
+    let res = await getNowUserAgencyData({
+      pageNo: pagination.current,
+      pageSize: pagination.pageSize,
+      tableName: 'vent.file_server_info',
+      parentId: selectedParam.id || '',
+    });
+    console.log(res, '待办列表--------');
+    dataSource.value = res.records;
+    pagination.total = res.total;
+  }
+  //分页切换
+  function pageChange(val) {
+    pagination.current = val.current;
+    pagination.pageSize = val.pageSize;
+    getNowUserAgencyDataList();
+  }
 
-//审批通过/驳回弹窗关闭
-function spClose() {
-    visibleSp.value = false
-    pagination.current = 1
-    getNowUserAgencyDataList()
-}
-//审批详情点击
-function handleSpDetail(data) {
-    visibleSp.value = true
-    getTodoTaskShow({ tableId: data.id, tableName: data.tableName })
-    getHistoricFlowNewList({ tableId: data.id, tableName: data.tableName })
-    getHighlightImgNewList({ tableId: data.id, tableName: data.tableName })
-}
-//判断是否显示撤回/驳回按钮
-async function getTodoTaskShow(params) {
-    let res = await getTodoTask({ ...params })
-    spInfo = Object.assign({}, res)
+  //审批通过/驳回弹窗关闭
+  function spClose() {
+    visibleSp.value = false;
+    pagination.current = 1;
+    getNowUserAgencyDataList();
+  }
+  //审批详情点击
+  function handleSpDetail(data) {
+    visibleSp.value = true;
+    getTodoTaskShow({ tableId: data.id, tableName: data.tableName });
+    getHistoricFlowNewList({ tableId: data.id, tableName: data.tableName });
+    getHighlightImgNewList({ tableId: data.id, tableName: data.tableName });
+  }
+  //判断是否显示撤回/驳回按钮
+  async function getTodoTaskShow(params) {
+    let res = await getTodoTask({ ...params });
+    spInfo = Object.assign({}, res);
     if (res.result) {
-        isShow.value = true
+      isShow.value = true;
     } else {
-        isShow.value = false
+      isShow.value = false;
     }
-}
-//审批详情-审批历史列表
-async function getHistoricFlowNewList(params) {
-    let res = await historicFlowNew({ ...params })
+  }
+  //审批详情-审批历史列表
+  async function getHistoricFlowNewList(params) {
+    let res = await historicFlowNew({ ...params });
     if (res.length != 0) {
-        historySpList.length = 0
-        res.forEach(el => {
-            historySpList.push({ name: el.name, username: el.assignees[0].username, deleteReason: el.deleteReason, comment: el.comment, startTime: el.startTime, endTime: el.endTime, status: el.assignees[0].isExecutor ? '已处理' : '待处理' })
-        })
+      historySpList.length = 0;
+      res.forEach((el) => {
+        historySpList.push({
+          name: el.name,
+          username: el.assignees[0].username,
+          deleteReason: el.deleteReason,
+          comment: el.comment,
+          startTime: el.startTime,
+          endTime: el.endTime,
+          status: el.assignees[0].isExecutor ? '已处理' : '待处理',
+        });
+      });
     }
-}
-//审批详情-流程轨迹
-async function getHighlightImgNewList(params) {
-    let res = await getHighlightImgNew({ ...params })
+  }
+  //审批详情-流程轨迹
+  async function getHighlightImgNewList(params) {
+    let res = await getHighlightImgNew({ ...params });
     let imageUrl = window.URL.createObjectURL(res);
-    imgSrc.value = imageUrl
-}
+    imgSrc.value = imageUrl;
+  }
 
-/**
- * 编辑事件
- */
-function handleEdit(data) {
+  /**
+   * 编辑事件
+   */
+  function handleEdit(data) {
     isUpdate.value = true;
     Object.assign(record, toRaw(data));
     let index = record.fileSuffix.indexOf('.');
@@ -136,65 +146,68 @@ function handleEdit(data) {
     editID.value = record.id;
     // 根据文件后缀名打开不同的模态框
     if (['.dwg', '.mxcad'].includes(data.fileSuffix)) {
-        openCADModal(true, {
-            record,
-        });
+      openCADModal(true, {
+        record,
+      });
     } else {
-        openModal(true, {
-            record,
-        });
+      openModal(true, {
+        record,
+      });
     }
-}
-//下载文件
-function handleDownLoad(record) {
+  }
+  //下载文件
+  function handleDownLoad(record) {
     downLoad({ id: record.id }).then((res) => {
-        let filename = `${record.fileName}`;
-        downFilePublic(res, filename);
+      let filename = `${record.fileName}`;
+      downFilePublic(res, filename);
     });
-}
-// 下载公用方法
-function downFilePublic(content, fileName) {
+  }
+  // 下载公用方法
+  function downFilePublic(content, fileName) {
     const blob = new Blob([content], { type: 'application/xlsx;charset=UTF-8' }); // 构造一个blob对象来处理数据
     // 对于<a>标签,只有 Firefox 和 Chrome(内核) 支持 download 属性
     // IE10以上支持blob但是依然不支持download
     if ('download' in document.createElement('a')) {
-        // 支持a标签download的浏览器
-        const link = document.createElement('a'); // 创建a标签
-        link.download = fileName; // a标签添加属性
-        link.style.display = 'none';
-        link.href = URL.createObjectURL(blob);
-        document.body.appendChild(link);
-        link.click(); // 执行下载
-        URL.revokeObjectURL(link.href); // 释放url
-        document.body.removeChild(link); // 释放标签
+      // 支持a标签download的浏览器
+      const link = document.createElement('a'); // 创建a标签
+      link.download = fileName; // a标签添加属性
+      link.style.display = 'none';
+      link.href = URL.createObjectURL(blob);
+      document.body.appendChild(link);
+      link.click(); // 执行下载
+      URL.revokeObjectURL(link.href); // 释放url
+      document.body.removeChild(link); // 释放标签
     } else {
-        // 其他浏览器
-        navigator.msSaveBlob(blob, fileName);
+      // 其他浏览器
+      navigator.msSaveBlob(blob, fileName);
     }
-}
-
-watch(() => props.selected, (newV, oldV) => {
-    console.log(newV, 'newV---=======')
-    selectedParam = newV
-    getNowUserAgencyDataList()
-}, {
-    deep: true
-})
-onMounted(() => {
-    getNowUserAgencyDataList()
-})
+  }
 
+  watch(
+    () => props.selected,
+    (newV, oldV) => {
+      console.log(newV, 'newV---=======');
+      selectedParam = newV;
+      getNowUserAgencyDataList();
+    },
+    {
+      deep: true,
+    }
+  );
+  onMounted(() => {
+    getNowUserAgencyDataList();
+  });
 </script>
 
 <style lang="less" scoped>
-.approvalPend {
+  .approvalPend {
     position: relative;
     width: 100%;
     height: 100%;
-}
+  }
 
-.zxm-form {
+  .zxm-form {
     padding-top: 20px !important;
     box-sizing: border-box;
-}
-</style>
+  }
+</style>

+ 327 - 320
src/views/vent/performance/comment/NormalTable.vue

@@ -6,7 +6,7 @@
         <!-- <a class="table-action-link" @click="handleTo(record)" :disabled="userName==record.createBy">提交</a>
         <a class="table-action-link" @click="handleSpRevoke(record)" :disabled="userName==record.createBy">撤回</a> -->
         <a class="table-action-link" @click="handleTo(record)">提交</a>
-        <a class="table-action-link" @click="handleSpRevoke(record)" >撤回</a>
+        <a class="table-action-link" @click="handleSpRevoke(record)">撤回</a>
       </template>
       <template #actionWj="{ record }">
         <a class="table-action-link" @click="handleEdit(record)">编辑</a>
@@ -27,374 +27,381 @@
       <a-form :model="formStateTj" labelAlign="right" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
         <a-form-item label="选择审批" :rules="[{ required: true, message: '请选择是否提交' }]">
           <a-select v-model:value="formStateTj.file" style="width: 260px">
-            <a-select-option v-for="file in fileList " :key="file.label" :value="file.value">{{ file.label
-              }}</a-select-option>
+            <a-select-option v-for="file in fileList" :key="file.label" :value="file.value">{{ file.label }}</a-select-option>
           </a-select>
         </a-form-item>
       </a-form>
     </a-modal>
     <!-- 审批详情弹窗 -->
     <a-modal v-model:visible="visibleSp" width="1000px" :footer="null" :title="titleSp" centered destroyOnClose>
-      <HistorySp :historySpList="historySpList" :imgSrc="imgSrc" :isShow="isShow" :spInfo="spInfo" @spClose="spClose">
-      </HistorySp>
+      <HistorySp :historySpList="historySpList" :imgSrc="imgSrc" :isShow="isShow" :spInfo="spInfo" @spClose="spClose" />
     </a-modal>
     <!-- 审批-撤销申请弹窗 -->
     <a-modal v-model:visible="visibleCx" centered :width="600" title="撤销申请" @ok="handleCxOk" @cancel="handleCxCancel">
-      <a-textarea v-model:value="revokeDes" placeholder="请输入撤回原因..." :rows="4"
-        style="width:96%;margin:10px;background-color: transparent;color: #fff;" />
+      <a-textarea
+        v-model:value="revokeDes"
+        placeholder="请输入撤回原因..."
+        :rows="4"
+        style="width: 96%; margin: 10px; background-color: transparent; color: #fff"
+      />
     </a-modal>
   </div>
 </template>
 
 <script lang="ts" name="system-user" setup>
-//ts语法
-import { ref, provide, reactive, toRaw, defineExpose, unref } from 'vue';
-import { BasicTable, TableAction } from '/@/components/Table';
-import DeviceModal from './DeviceModal.vue';
-import CADModal from './CADModal.vue';
-import HistorySp from './HistorySp.vue'
-import { useModal } from '/@/components/Modal';
-import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
-import { useListPage } from '/@/hooks/system/useListPage';
-import { commit } from '../fileDetail/fileDetail.api'
-import { historicFlowNew, getHighlightImgNew, getTodoTask, getCancelNew } from './comment.api'
-import { message } from 'ant-design-vue';
-import { useUserStore } from '/@/store/modules/user';
+  //ts语法
+  import { ref, provide, reactive, toRaw, defineExpose, unref } from 'vue';
+  import { BasicTable, TableAction } from '/@/components/Table';
+  import DeviceModal from './DeviceModal.vue';
+  import CADModal from './CADModal.vue';
+  import HistorySp from './HistorySp.vue';
+  import { useModal } from '/@/components/Modal';
+  import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
+  import { useListPage } from '/@/hooks/system/useListPage';
+  import { commit } from '../fileDetail/fileDetail.api';
+  import { historicFlowNew, getHighlightImgNew, getTodoTask, getCancelNew } from './comment.api';
+  import { message } from 'ant-design-vue';
+  import { useUserStore } from '/@/store/modules/user';
 
-
-const props = defineProps({
-  //文件审批-提交信息
-  submitInfo: {
-    type: Array,
-    default: () => {
-      return []
-    }
-  },
-  //各矿参数
-  selfParam: {
-    type: Object,
-    default: () => {
-      return {};
+  const props = defineProps({
+    //文件审批-提交信息
+    submitInfo: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    //各矿参数
+    selfParam: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+    //查询参数
+    searchParam: {
+      type: Object,
+      default: () => {
+        return {};
+      },
     },
-  },
-  //查询参数
-  searchParam: {
-    type: Object,
-    default: () => {
-      return {}
+    //菜单树传递参数
+    nodeParam: {
+      type: Object,
+      default: () => {
+        return {};
+      },
     },
-  },
-  //菜单树传递参数
-  nodeParam: {
-    type: Object,
-    default: () => {
-      return {};
+    columnsType: {
+      type: String,
+      // required: true,
+    },
+    columns: {
+      type: Array,
+      // required: true,
+      default: () => [],
     },
-  },
-  columnsType: {
-    type: String,
-    // required: true,
-  },
-  columns: {
-    type: Array,
-    // required: true,
-    default: () => [],
-  },
 
-  list: {
-    type: Function,
-    required: true,
-  },
-  //下载文件接口
-  downLoad: {
-    type: Function,
-    required: true,
-  },
+    list: {
+      type: Function,
+      required: true,
+    },
+    //下载文件接口
+    downLoad: {
+      type: Function,
+      required: true,
+    },
 
-  deleteById: {
-    type: Function,
-    required: true,
-  },
-  pointList: {
-    type: Function,
-    // required: true,
-  },
-  designScope: {
-    type: String,
-  },
-  title: {
-    type: String,
-  },
-});
+    deleteById: {
+      type: Function,
+      required: true,
+    },
+    pointList: {
+      type: Function,
+      // required: true,
+    },
+    designScope: {
+      type: String,
+    },
+    title: {
+      type: String,
+    },
+  });
 
-let resetTable = ref(0)
-let fileType = ref(''); //文件类型
-let editID = ref(0); //文件ID
-const isUpdate = ref(false);
-const record = reactive<Record<string, any>>({});
-provide('formData', record);
-const [registerDeviceModal, { openModal, closeModal }] = useModal();
-const columnList = getTableHeaderColumns(props.columnsType);
-//是否显示文件审批弹窗
-let visibleTj = ref(false)
-//文件审批-弹窗参数
-let formStateTj = reactive({
-  file: '',
-  id: '',
-})
-//文件审批-提交信息弹窗下拉选项数据
-let fileList = reactive<any[]>([])
-//审批详情弹窗数据
-let visibleSp = ref(false)
-let titleSp = ref('审批详情')
-//审批详情历史数据
-let historySpList = reactive<any[]>([])
-let imgSrc = ref('')
-//审批-是否显示撤回/驳回按钮
-let isShow = ref(true)
-//审批通过/驳回参数信息
-let spInfo = reactive({})
+  let resetTable = ref(0);
+  let fileType = ref(''); //文件类型
+  let editID = ref(0); //文件ID
+  const isUpdate = ref(false);
+  const record = reactive<Record<string, any>>({});
+  provide('formData', record);
+  const [registerDeviceModal, { openModal, closeModal }] = useModal();
+  const columnList = getTableHeaderColumns(props.columnsType);
+  //是否显示文件审批弹窗
+  let visibleTj = ref(false);
+  //文件审批-弹窗参数
+  let formStateTj = reactive({
+    file: '',
+    id: '',
+  });
+  //文件审批-提交信息弹窗下拉选项数据
+  let fileList = reactive<any[]>([]);
+  //审批详情弹窗数据
+  let visibleSp = ref(false);
+  let titleSp = ref('审批详情');
+  //审批详情历史数据
+  let historySpList = reactive<any[]>([]);
+  let imgSrc = ref('');
+  //审批-是否显示撤回/驳回按钮
+  let isShow = ref(true);
+  //审批通过/驳回参数信息
+  let spInfo = reactive({});
 
-//审批-撤销
-let visibleCx = ref(false)
-let revokeDes = ref('')
-let cxInfo = reactive({})
+  //审批-撤销
+  let visibleCx = ref(false);
+  let revokeDes = ref('');
+  let cxInfo = reactive({});
 
-let userStore = useUserStore(); //获取用户信息
-let userName = unref(userStore.getUserInfo).username;
+  let userStore = useUserStore(); //获取用户信息
+  let userName = unref(userStore.getUserInfo).username;
 
-// 列表页面公共参数、方法
-const { tableContext, doRequest } = useListPage({
-  designScope: props.designScope,
-  tableProps: {
-    title: props.title,
-    api: props.list,
-    columns: props.columns.length > 0 ? (props.columns as any[]) : columnList,
-    // size: 'small',
-    bordered: false,
-    scroll: { y: 620 },
-    // formConfig: {
-    //   // labelWidth: 100,
-    //   labelAlign: 'left',
-    //   labelCol: {
-    //     xs: 24,
-    //     sm: 24,
-    //     md: 24,
-    //     lg: 9,
-    //     xl: 7,
-    //     xxl: 5,
-    //   },
-    //   schemas: props.searchFormSchema as any[],
-    // },
-    striped: true,
-    showIndexColumn: true, //是否显示序列号
-    // actionColumn: {
-    //   width: 200,
-    // },
-    showActionColumn: false,
-    useSearchForm: false, //不使用查询条件
-    // pagination: false, //不使用分页组件
-    beforeFetch: (params) => {
-      params.parentId = props.nodeParam.id ? props.nodeParam.id : '';
-      params.selectFlag = props.nodeParam.id ? false : true;
-      params.likeFileName = props.searchParam.fileName ? props.searchParam.fileName : '';
-      params.fileSuffix = props.searchParam.fileType ? '.' + props.searchParam.fileType : '';
-      params.bpmStatus = props.selfParam.bpmStatus ? props.selfParam.bpmStatus : '';
-      params.sysOrgCode = props.selfParam.sysOrgCode ? props.selfParam.sysOrgCode : '';
+  // 列表页面公共参数、方法
+  const { tableContext, doRequest } = useListPage({
+    designScope: props.designScope,
+    tableProps: {
+      title: props.title,
+      api: props.list,
+      columns: props.columns.length > 0 ? (props.columns as any[]) : columnList,
+      // size: 'small',
+      bordered: false,
+      scroll: { y: 620 },
+      // formConfig: {
+      //   // labelWidth: 100,
+      //   labelAlign: 'left',
+      //   labelCol: {
+      //     xs: 24,
+      //     sm: 24,
+      //     md: 24,
+      //     lg: 9,
+      //     xl: 7,
+      //     xxl: 5,
+      //   },
+      //   schemas: props.searchFormSchema as any[],
+      // },
+      striped: true,
+      showIndexColumn: true, //是否显示序列号
+      // actionColumn: {
+      //   width: 200,
+      // },
+      showActionColumn: false,
+      useSearchForm: false, //不使用查询条件
+      // pagination: false, //不使用分页组件
+      beforeFetch: (params) => {
+        params.parentId = props.nodeParam.id ? props.nodeParam.id : '';
+        params.selectFlag = props.nodeParam.id ? false : true;
+        params.likeFileName = props.searchParam.fileName ? props.searchParam.fileName : '';
+        params.fileSuffix = props.searchParam.fileType ? '.' + props.searchParam.fileType : '';
+        params.bpmStatus = props.selfParam.bpmStatus ? props.selfParam.bpmStatus : '';
+        params.sysOrgCode = props.selfParam.sysOrgCode ? props.selfParam.sysOrgCode : '';
+      },
     },
-  },
-});
+  });
 
-//注册table数据
-const [registerTable, { reload }, { selectedRowKeys }] = tableContext;
-// 审批提交
-function handleTo(data) {
-  visibleTj.value = true
-  fileList.length = 0
-  props.submitInfo.forEach(el => {
-    fileList.push({ label: el.name, value: el.id })
-  })
-  formStateTj.id = data.id
-}
-//确认提交
-async function handleTjOk() {
-  if (formStateTj.file) {
-    let res = await commit({ procDefId: formStateTj.file, tableId: formStateTj.id, firstGateway: true })
-    if (res == '提交成功') {
+  //注册table数据
+  const [registerTable, { reload }, { selectedRowKeys }] = tableContext;
+  // 审批提交
+  function handleTo(data) {
+    visibleTj.value = true;
+    fileList.length = 0;
+    props.submitInfo.forEach((el) => {
+      fileList.push({ label: el.name, value: el.id });
+    });
+    formStateTj.id = data.id;
+  }
+  //确认提交
+  async function handleTjOk() {
+    if (formStateTj.file) {
+      let res = await commit({ procDefId: formStateTj.file, tableId: formStateTj.id, firstGateway: true });
+      if (res == '提交成功') {
+        message.success(res);
+        visibleTj.value = false;
+        resetTable.value = new Date().getTime();
+      } else {
+        message.warning(res.message);
+      }
+    } else {
+      message.warning('请先选择要提交的文件!');
+    }
+  }
+  //取消提交
+  function handleTjCancel() {
+    formStateTj.file = '';
+    visibleTj.value = false;
+  }
+  //审批详情点击
+  function handleSpDetail(data) {
+    visibleSp.value = true;
+    getTodoTaskShow({ tableId: data.id, tableName: data.tableName });
+    getHistoricFlowNewList({ tableId: data.id, tableName: data.tableName });
+    getHighlightImgNewList({ tableId: data.id, tableName: data.tableName });
+  }
+  //审批详情-审批历史列表
+  async function getHistoricFlowNewList(params) {
+    historySpList.length = 0;
+    let res = await historicFlowNew({ ...params });
+    if (res.length != 0) {
+      res.forEach((el) => {
+        historySpList.push({
+          name: el.name,
+          username: el.assignees[0].username,
+          deleteReason: el.deleteReason,
+          comment: el.comment,
+          startTime: el.startTime,
+          endTime: el.endTime,
+          status: el.assignees[0].isExecutor ? '已处理' : '待处理',
+        });
+      });
+    }
+  }
+  //审批详情-流程轨迹
+  async function getHighlightImgNewList(params) {
+    let res = await getHighlightImgNew({ ...params });
+    let imageUrl = window.URL.createObjectURL(res);
+    imgSrc.value = imageUrl;
+  }
+  //判断是否显示撤回/驳回按钮
+  async function getTodoTaskShow(params) {
+    let res = await getTodoTask({ ...params });
+    spInfo = Object.assign({}, res);
+    if (res.result) {
+      isShow.value = true;
+    } else {
+      isShow.value = false;
+    }
+  }
+  //审批通过/驳回弹窗关闭
+  function spClose() {
+    visibleSp.value = false;
+    resetTable.value = new Date().getTime();
+  }
+  //审批-撤回提交
+  function handleSpRevoke(data) {
+    visibleCx.value = true;
+    cxInfo = Object.assign({}, data);
+  }
+  //审批-撤销-确定
+  async function handleCxOk() {
+    let res = await getCancelNew({ reason: revokeDes.value, tableId: cxInfo.id, tableName: cxInfo.tableName });
+    if (res == '操作成功') {
       message.success(res);
-      visibleTj.value = false
-      resetTable.value = new Date().getTime()
     } else {
       message.warning(res.message);
     }
-  } else {
-    message.warning('请先选择要提交的文件!');
-  }
-}
-//取消提交
-function handleTjCancel() {
-  formStateTj.file = ''
-  visibleTj.value = false
-}
-//审批详情点击
-function handleSpDetail(data) {
-  visibleSp.value = true
-  getTodoTaskShow({ tableId: data.id, tableName: data.tableName })
-  getHistoricFlowNewList({ tableId: data.id, tableName: data.tableName })
-  getHighlightImgNewList({ tableId: data.id, tableName: data.tableName })
-}
-//审批详情-审批历史列表
-async function getHistoricFlowNewList(params) {
-  historySpList.length = 0
-  let res = await historicFlowNew({ ...params })
-  if (res.length != 0) {
-    res.forEach(el => {
-      historySpList.push({ name: el.name, username: el.assignees[0].username, deleteReason: el.deleteReason, comment: el.comment, startTime: el.startTime, endTime: el.endTime, status: el.assignees[0].isExecutor ? '已处理' : '待处理' })
-    })
-
+    visibleCx.value = false;
+    revokeDes.value = '';
+    resetTable.value = new Date().getTime();
   }
-}
-//审批详情-流程轨迹
-async function getHighlightImgNewList(params) {
-  let res = await getHighlightImgNew({ ...params })
-  let imageUrl = window.URL.createObjectURL(res);
-  imgSrc.value = imageUrl
-}
-//判断是否显示撤回/驳回按钮
-async function getTodoTaskShow(params) {
-  let res = await getTodoTask({ ...params })
-  spInfo = Object.assign({},res)
-  if (res.result) {
-    isShow.value = true
-  } else {
-    isShow.value = false
+  //审批-撤销-取消
+  function handleCxCancel() {
+    revokeDes.value = '';
+    visibleCx.value = false;
   }
-}
-//审批通过/驳回弹窗关闭
-function spClose() {
-  visibleSp.value = false
-  resetTable.value = new Date().getTime()
-}
-//审批-撤回提交
-function handleSpRevoke(data) {
-  visibleCx.value = true
-  cxInfo = Object.assign({}, data)
-}
-//审批-撤销-确定
-async function handleCxOk() {
-  let res = await getCancelNew({ reason: revokeDes.value, tableId: cxInfo.id, tableName: cxInfo.tableName })
-  if (res == '操作成功') {
-    message.success(res);
-  } else {
-    message.warning(res.message);
+  /**
+   * 编辑事件
+   */
+  function handleEdit(data) {
+    isUpdate.value = true;
+    Object.assign(record, toRaw(data));
+    let index = record.fileSuffix.indexOf('.');
+    fileType.value = record.fileSuffix.substring(index + 1);
+    editID.value = record.id;
+
+    // 根据文件后缀名打开不同的模态框
+    if (['.dwg', '.mxcad'].includes(data.fileSuffix)) {
+      openCADModal(true, {
+        record,
+      });
+    } else {
+      openModal(true, {
+        record,
+      });
+    }
   }
-  visibleCx.value = false
-  revokeDes.value = ''
-  resetTable.value = new Date().getTime()
-}
-//审批-撤销-取消
-function handleCxCancel() {
-  revokeDes.value = ''
-  visibleCx.value = false
-}
-/**
- * 编辑事件
- */
-function handleEdit(data) {
-  isUpdate.value = true;
-  Object.assign(record, toRaw(data));
-  let index = record.fileSuffix.indexOf('.');
-  fileType.value = record.fileSuffix.substring(index + 1);
-  editID.value = record.id;
 
+  /**
+   * 删除事件
+   */
+  async function handleDelete(record) {
+    await props.deleteById({ id: record.id }, reload);
+  }
 
-  // 根据文件后缀名打开不同的模态框
-  if (['.dwg', '.mxcad'].includes(data.fileSuffix)) {
-    openCADModal(true, {
-      record,
-    });
-  } else {
-    openModal(true, {
-      record,
+  //下载文件
+  function handleDownLoad(record) {
+    props.downLoad({ id: record.id }).then((res) => {
+      let filename = `${record.fileName}`;
+      downFilePublic(res, filename);
     });
   }
-}
-
-/**
- * 删除事件
- */
-async function handleDelete(record) {
-  await props.deleteById({ id: record.id }, reload);
-}
-
-//下载文件
-function handleDownLoad(record) {
-  props.downLoad({ id: record.id }).then((res) => {
-    let filename = `${record.fileName}`;
-    downFilePublic(res, filename);
-  });
-}
-// 下载公用方法
-function downFilePublic(content, fileName) {
-  const blob = new Blob([content], { type: 'application/xlsx;charset=UTF-8' }); // 构造一个blob对象来处理数据
-  // 对于<a>标签,只有 Firefox 和 Chrome(内核) 支持 download 属性
-  // IE10以上支持blob但是依然不支持download
-  if ('download' in document.createElement('a')) {
-    // 支持a标签download的浏览器
-    const link = document.createElement('a'); // 创建a标签
-    link.download = fileName; // a标签添加属性
-    link.style.display = 'none';
-    link.href = URL.createObjectURL(blob);
-    document.body.appendChild(link);
-    link.click(); // 执行下载
-    URL.revokeObjectURL(link.href); // 释放url
-    document.body.removeChild(link); // 释放标签
-  } else {
-    // 其他浏览器
-    navigator.msSaveBlob(blob, fileName);
+  // 下载公用方法
+  function downFilePublic(content, fileName) {
+    const blob = new Blob([content], { type: 'application/xlsx;charset=UTF-8' }); // 构造一个blob对象来处理数据
+    // 对于<a>标签,只有 Firefox 和 Chrome(内核) 支持 download 属性
+    // IE10以上支持blob但是依然不支持download
+    if ('download' in document.createElement('a')) {
+      // 支持a标签download的浏览器
+      const link = document.createElement('a'); // 创建a标签
+      link.download = fileName; // a标签添加属性
+      link.style.display = 'none';
+      link.href = URL.createObjectURL(blob);
+      document.body.appendChild(link);
+      link.click(); // 执行下载
+      URL.revokeObjectURL(link.href); // 释放url
+      document.body.removeChild(link); // 释放标签
+    } else {
+      // 其他浏览器
+      navigator.msSaveBlob(blob, fileName);
+    }
   }
-}
 
-// CAD预览相关的逻辑
-const [registerCADModal, { openModal: openCADModal }] = useModal();
+  // CAD预览相关的逻辑
+  const [registerCADModal, { openModal: openCADModal }] = useModal();
 
-defineExpose({
-  doRequest,
-});
+  defineExpose({
+    doRequest,
+  });
 </script>
 
 <style scoped lang="less">
-@ventSpace: zxm;
+  @ventSpace: zxm;
 
-@vent-table-no-hover: #00bfff10;
+  @vent-table-no-hover: #00bfff10;
 
-:deep(.@{ventSpace}-table-cell-row-hover) {
-  background: #264d8833 !important;
-}
+  :deep(.@{ventSpace}-table-cell-row-hover) {
+    background: #264d8833 !important;
+  }
 
-:deep(.@{ventSpace}-table-row-selected) {
-  background: #268bc522 !important;
-}
+  :deep(.@{ventSpace}-table-row-selected) {
+    background: #268bc522 !important;
+  }
 
-:deep(.@{ventSpace}-table-tbody > tr > td) {
-  background-color: #0dc3ff05;
-}
+  :deep(.@{ventSpace}-table-tbody > tr > td) {
+    background-color: #0dc3ff05;
+  }
 
-:deep(.jeecg-basic-table-row__striped) {
-  td {
-    background-color: @vent-table-no-hover !important;
+  :deep(.jeecg-basic-table-row__striped) {
+    td {
+      background-color: @vent-table-no-hover !important;
+    }
   }
-}
 
-::v-deep .zxm-table-title {
-  display: none;
-}
+  ::v-deep .zxm-table-title {
+    display: none;
+  }
 
-.zxm-form {
-  padding-top: 20px !important;
-  box-sizing: border-box;
-}
-a[disabled] {
-  color: #ccc;
-}
+  .zxm-form {
+    padding-top: 20px !important;
+    box-sizing: border-box;
+  }
+  a[disabled] {
+    color: #ccc;
+  }
 </style>

+ 166 - 153
src/views/vent/performance/endEd/index.vue

@@ -1,133 +1,143 @@
 <template>
-    <div class="endEd">
-        <a-table size="small" :dataSource="dataSource" :columns="columns" :scroll="{ y: 620 }" :pagination="pagination"
-            @change="pageChange">
-            <template #actionSp="{ record }">
-                <a class="table-action-link" @click="handleSpDetail(record)">审批详情</a>
-            </template>
-            <template #actionWj="{ record }">
-                <a class="table-action-link" @click="handleEdit(record)">编辑</a>
-                <a class="table-action-link" @click="handleDownLoad(record)">下载</a>
-            </template>
-        </a-table>
-        <!-- 审批详情弹窗 -->
-        <a-modal v-model:visible="visibleSp" width="1000px" :footer="null" :title="titleSp" centered destroyOnClose>
-            <HistorySp :historySpList="historySpList" :imgSrc="imgSrc" :isShow="isShow" :spInfo="spInfo"
-                @spClose="spClose">
-            </HistorySp>
-        </a-modal>
-        <DeviceModal :editID="editID" :fileType="fileType" @register="registerDeviceModal" />
-        <CADModal @register="registerCADModal" />
-    </div>
+  <div class="endEd">
+    <a-table size="small" :dataSource="dataSource" :columns="columns" :scroll="{ y: 620 }" :pagination="pagination" @change="pageChange">
+      <template #actionSp="{ record }">
+        <a class="table-action-link" @click="handleSpDetail(record)">审批详情</a>
+      </template>
+      <template #actionWj="{ record }">
+        <a class="table-action-link" @click="handleEdit(record)">编辑</a>
+        <a class="table-action-link" @click="handleDownLoad(record)">下载</a>
+      </template>
+    </a-table>
+    <!-- 审批详情弹窗 -->
+    <a-modal v-model:visible="visibleSp" width="1000px" :footer="null" :title="titleSp" centered destroyOnClose>
+      <HistorySp :historySpList="historySpList" :imgSrc="imgSrc" :isShow="isShow" :spInfo="spInfo" @spClose="spClose" />
+    </a-modal>
+    <DeviceModal :editID="editID" :fileType="fileType" @register="registerDeviceModal" />
+    <CADModal @register="registerCADModal" />
+  </div>
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, watch, nextTick, defineProps, onMounted, provide, toRaw } from 'vue'
-import HistorySp from '../comment/HistorySp.vue'
-import DeviceModal from '../comment/DeviceModal.vue';
-import CADModal from '../comment/CADModal.vue';
-import { columns } from './endEd.data'
-import { getNowUserApprovedData, downLoad } from '../fileDetail/fileDetail.api';
-import { historicFlowNew, getHighlightImgNew, getTodoTask, } from '../comment/comment.api'
-import { useModal } from '/@/components/Modal';
+  import { ref, reactive, watch, nextTick, defineProps, onMounted, provide, toRaw } from 'vue';
+  import HistorySp from '../comment/HistorySp.vue';
+  import DeviceModal from '../comment/DeviceModal.vue';
+  import CADModal from '../comment/CADModal.vue';
+  import { columns } from './endEd.data';
+  import { getNowUserApprovedData, downLoad } from '../fileDetail/fileDetail.api';
+  import { historicFlowNew, getHighlightImgNew, getTodoTask } from '../comment/comment.api';
+  import { useModal } from '/@/components/Modal';
 
-let props = defineProps({
+  let props = defineProps({
     selected: {
-        type: Object,
-        default: () => {
-            return {}
-        }
-    }
-})
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  });
 
-//已结束列表数据
-let dataSource = ref<any[]>([])
-//分页参数配置
-let pagination = reactive({
+  //已结束列表数据
+  let dataSource = ref<any[]>([]);
+  //分页参数配置
+  let pagination = reactive({
     current: 1, // 当前页码
     pageSize: 10, // 每页显示条数
     total: 0, // 总条目数,后端返回
     // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
     showSizeChanger: true, // 是否可改变每页显示条数
-    pageSizeOptions: ['10', '20', '50',], // 可选的每页显示条数
-})
-let selectedParam = reactive({})
-//审批详情弹窗数据
-let visibleSp = ref(false)
-let titleSp = ref('审批详情')
-//审批详情历史数据
-let historySpList = reactive<any[]>([])
-let imgSrc = ref('')
-//审批-是否显示撤回/驳回按钮
-let isShow = ref(true)
-//审批通过/驳回参数信息
-let spInfo = reactive({})
-const isUpdate = ref(false);
-const record = reactive<Record<string, any>>({});
-provide('formData', record);
-let fileType = ref(''); //文件类型
-let editID = ref(0); //文件ID
-// CAD预览相关的逻辑
-let [registerCADModal, { openModal: openCADModal }] = useModal();
-let [registerDeviceModal, { openModal, closeModal }] = useModal();
+    pageSizeOptions: ['10', '20', '50'], // 可选的每页显示条数
+  });
+  let selectedParam = reactive({});
+  //审批详情弹窗数据
+  let visibleSp = ref(false);
+  let titleSp = ref('审批详情');
+  //审批详情历史数据
+  let historySpList = reactive<any[]>([]);
+  let imgSrc = ref('');
+  //审批-是否显示撤回/驳回按钮
+  let isShow = ref(true);
+  //审批通过/驳回参数信息
+  let spInfo = reactive({});
+  const isUpdate = ref(false);
+  const record = reactive<Record<string, any>>({});
+  provide('formData', record);
+  let fileType = ref(''); //文件类型
+  let editID = ref(0); //文件ID
+  // CAD预览相关的逻辑
+  let [registerCADModal, { openModal: openCADModal }] = useModal();
+  let [registerDeviceModal, { openModal, closeModal }] = useModal();
 
-//获取待办列表数据
-async function getNowUserApprovedDataList() {
-    let res = await getNowUserApprovedData({ pageNo: pagination.current, pageSize: pagination.pageSize, tableName: 'vent.file_server_info', parentId: selectedParam.id || '' })
-    console.log(res, '已办列表--------')
-    dataSource.value = res.records
-    pagination.total = res.total
-}
-//分页切换
-function pageChange(val) {
-    pagination.current = val.current
-    pagination.pageSize = val.pageSize
-    getNowUserApprovedDataList()
-}
-//审批通过/驳回弹窗关闭
-function spClose() {
-    visibleSp.value = false
-    pagination.current = 1
-    getNowUserApprovedDataList()
-}
-//审批详情点击
-function handleSpDetail(data) {
-    visibleSp.value = true
-    getTodoTaskShow({ tableId: data.id, tableName: data.tableName })
-    getHistoricFlowNewList({ tableId: data.id, tableName: data.tableName })
-    getHighlightImgNewList({ tableId: data.id, tableName: data.tableName })
-}
-//判断是否显示撤回/驳回按钮
-async function getTodoTaskShow(params) {
-    let res = await getTodoTask({ ...params })
-    spInfo = Object.assign({}, res)
+  //获取待办列表数据
+  async function getNowUserApprovedDataList() {
+    let res = await getNowUserApprovedData({
+      pageNo: pagination.current,
+      pageSize: pagination.pageSize,
+      tableName: 'vent.file_server_info',
+      parentId: selectedParam.id || '',
+    });
+    console.log(res, '已办列表--------');
+    dataSource.value = res.records;
+    pagination.total = res.total;
+  }
+  //分页切换
+  function pageChange(val) {
+    pagination.current = val.current;
+    pagination.pageSize = val.pageSize;
+    getNowUserApprovedDataList();
+  }
+  //审批通过/驳回弹窗关闭
+  function spClose() {
+    visibleSp.value = false;
+    pagination.current = 1;
+    getNowUserApprovedDataList();
+  }
+  //审批详情点击
+  function handleSpDetail(data) {
+    visibleSp.value = true;
+    getTodoTaskShow({ tableId: data.id, tableName: data.tableName });
+    getHistoricFlowNewList({ tableId: data.id, tableName: data.tableName });
+    getHighlightImgNewList({ tableId: data.id, tableName: data.tableName });
+  }
+  //判断是否显示撤回/驳回按钮
+  async function getTodoTaskShow(params) {
+    let res = await getTodoTask({ ...params });
+    spInfo = Object.assign({}, res);
     if (res.result) {
-        isShow.value = true
+      isShow.value = true;
     } else {
-        isShow.value = false
+      isShow.value = false;
     }
-}
-//审批详情-审批历史列表
-async function getHistoricFlowNewList(params) {
-    let res = await historicFlowNew({ ...params })
+  }
+  //审批详情-审批历史列表
+  async function getHistoricFlowNewList(params) {
+    let res = await historicFlowNew({ ...params });
     if (res.length != 0) {
-        historySpList.length = 0
-        res.forEach(el => {
-            historySpList.push({ name: el.name, username: el.assignees[0].username, deleteReason: el.deleteReason, comment: el.comment, startTime: el.startTime, endTime: el.endTime, status:el.assignees[0].isExecutor ? '已处理' : '待处理' })
-        })
+      historySpList.length = 0;
+      res.forEach((el) => {
+        historySpList.push({
+          name: el.name,
+          username: el.assignees[0].username,
+          deleteReason: el.deleteReason,
+          comment: el.comment,
+          startTime: el.startTime,
+          endTime: el.endTime,
+          status: el.assignees[0].isExecutor ? '已处理' : '待处理',
+        });
+      });
     }
-}
-//审批详情-流程轨迹
-async function getHighlightImgNewList(params) {
-    let res = await getHighlightImgNew({ ...params })
+  }
+  //审批详情-流程轨迹
+  async function getHighlightImgNewList(params) {
+    let res = await getHighlightImgNew({ ...params });
     let imageUrl = window.URL.createObjectURL(res);
-    imgSrc.value = imageUrl
-}
+    imgSrc.value = imageUrl;
+  }
 
-/**
- * 编辑事件
- */
-function handleEdit(data) {
+  /**
+   * 编辑事件
+   */
+  function handleEdit(data) {
     isUpdate.value = true;
     Object.assign(record, toRaw(data));
     let index = record.fileSuffix.indexOf('.');
@@ -135,63 +145,66 @@ function handleEdit(data) {
     editID.value = record.id;
     // 根据文件后缀名打开不同的模态框
     if (['.dwg', '.mxcad'].includes(data.fileSuffix)) {
-        openCADModal(true, {
-            record,
-        });
+      openCADModal(true, {
+        record,
+      });
     } else {
-        openModal(true, {
-            record,
-        });
+      openModal(true, {
+        record,
+      });
     }
-}
-//下载文件
-function handleDownLoad(record) {
+  }
+  //下载文件
+  function handleDownLoad(record) {
     downLoad({ id: record.id }).then((res) => {
-        let filename = `${record.fileName}`;
-        downFilePublic(res, filename);
+      let filename = `${record.fileName}`;
+      downFilePublic(res, filename);
     });
-}
-// 下载公用方法
-function downFilePublic(content, fileName) {
+  }
+  // 下载公用方法
+  function downFilePublic(content, fileName) {
     const blob = new Blob([content], { type: 'application/xlsx;charset=UTF-8' }); // 构造一个blob对象来处理数据
     // 对于<a>标签,只有 Firefox 和 Chrome(内核) 支持 download 属性
     // IE10以上支持blob但是依然不支持download
     if ('download' in document.createElement('a')) {
-        // 支持a标签download的浏览器
-        const link = document.createElement('a'); // 创建a标签
-        link.download = fileName; // a标签添加属性
-        link.style.display = 'none';
-        link.href = URL.createObjectURL(blob);
-        document.body.appendChild(link);
-        link.click(); // 执行下载
-        URL.revokeObjectURL(link.href); // 释放url
-        document.body.removeChild(link); // 释放标签
+      // 支持a标签download的浏览器
+      const link = document.createElement('a'); // 创建a标签
+      link.download = fileName; // a标签添加属性
+      link.style.display = 'none';
+      link.href = URL.createObjectURL(blob);
+      document.body.appendChild(link);
+      link.click(); // 执行下载
+      URL.revokeObjectURL(link.href); // 释放url
+      document.body.removeChild(link); // 释放标签
     } else {
-        // 其他浏览器
-        navigator.msSaveBlob(blob, fileName);
+      // 其他浏览器
+      navigator.msSaveBlob(blob, fileName);
     }
-}
-
+  }
 
-watch(() => props.selected, (newV, oldV) => {
-    selectedParam = newV
-    getNowUserApprovedDataList()
-}, {
-    deep: true
-})
-onMounted(() => {
-    getNowUserApprovedDataList()
-})
+  watch(
+    () => props.selected,
+    (newV, oldV) => {
+      selectedParam = newV;
+      getNowUserApprovedDataList();
+    },
+    {
+      deep: true,
+    }
+  );
+  onMounted(() => {
+    getNowUserApprovedDataList();
+  });
 </script>
 
 <style lang="less" scoped>
-.endEd {
+  .endEd {
     position: relative;
     width: 100%;
     height: 100%;
-}
-.zxm-form {
-  padding-top: 20px !important;
-  box-sizing: border-box;
-}
-</style>
+  }
+  .zxm-form {
+    padding-top: 20px !important;
+    box-sizing: border-box;
+  }
+</style>

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů