From ae11615808e7c5fdc541780a687da068cd98386f Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期四, 12 六月 2025 09:53:07 +0800
Subject: [PATCH] 1、调整终端首页功能页面logo图片改为字体图标优化资源获取速度 2、新增终端合格率和程序呼叫页面 3、终端点检页面不再为独立页面,调整为与二保三保页面相同的跳转我的待办页面逻辑 4、终端所有页面完成前后端联调

---
 src/views/dnc/base/modules/TerminalIndex/ReportEquipmentClose.vue |   82 +++++++++++++++++++++++++++++++---------
 1 files changed, 63 insertions(+), 19 deletions(-)

diff --git a/src/views/dnc/base/modules/TerminalIndex/ReportEquipmentClose.vue b/src/views/dnc/base/modules/TerminalIndex/ReportEquipmentClose.vue
index 9b684d4..c90f90a 100644
--- a/src/views/dnc/base/modules/TerminalIndex/ReportEquipmentClose.vue
+++ b/src/views/dnc/base/modules/TerminalIndex/ReportEquipmentClose.vue
@@ -9,7 +9,7 @@
           <a-row :gutter="24">
             <a-col :span="5">
               <a-form-item label="璁惧">
-                <a-select placeholder="璇烽�夋嫨璁惧" v-model="queryParam.equipmentId">
+                <a-select placeholder="璇烽�夋嫨璁惧" v-model="queryParam.equipmentId" allow-clear>
                   <a-select-option v-for="item in equipmentList" :key="item.equipmentId">
                     {{item.equipmentId+`[${item.equipmentName}]`}}
                   </a-select-option>
@@ -33,7 +33,7 @@
 
             <a-col :span="5">
               <a-form-item label="鍋滄満鍘熷洜">
-                <a-select placeholder="璇烽�夋嫨鍋滄満鍘熷洜" v-model="queryParam.downtimeDescription">
+                <a-select placeholder="璇烽�夋嫨鍋滄満鍘熷洜" v-model="queryParam.downtimeDescription" allow-clear>
                   <a-select-option v-for="item in downtimeDescriptionList" :key="item.value">{{item.label}}
                   </a-select-option>
                 </a-select>
@@ -55,12 +55,11 @@
       <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
       <div class="table-operator">
         <a-button type="primary" @click="handleMaintainShutdown" :disabled="selectedRowKeys.length===0">缁存姢鍋滄満</a-button>
-        <a-button type="primary" @click="handleSplitShutdownInfo"
-                  :disabled="selectedRowKeys.length===0||selectedRowKeys.length>1">鎷嗗垎鍋滄満淇℃伅
-        </a-button>
+        <a-button type="primary" @click="handleSplitShutdownInfo" :disabled="selectionRows.length!==1">鎷嗗垎鍋滄満淇℃伅</a-button>
       </div>
 
-      <a-table :dataSource="dataSource" :columns="columns" rowKey="id" bordered :pagination="false" :loading="loading"
+      <a-table :dataSource="dataSource" :columns="columns" rowKey="id" bordered :pagination="ipagination"
+               :loading="loading" @change="handleTableChange" :customRow="customRow"
                :rowSelection="{selectedRowKeys, onChange: onSelectChange}">
         <template slot="downtimeType" slot-scope="text">
           {{ text!=null?text === 0 ? '璁″垝鍋滄満' : '闈炶鍒掑仠鏈�':'' }}
@@ -71,9 +70,8 @@
     <maintain-shutdown-modal :downtimeDescriptionList="downtimeDescriptionList" ref="maintainShutdownModal"
                              @submitSuccess="loadData"/>
 
-    <split-shutdown-info-modal ref="splitShutdownInfoModal" :selectedRow="selectionRows[0]"
-                               :downtimeDescriptionList="downtimeDescriptionList"
-                               @submitSuccess="clearSelectedRowKeysAndLoadData"/>
+    <split-shutdown-info-modal ref="splitShutdownInfoModal" :downtimeDescriptionList="downtimeDescriptionList"
+                               @submitSuccess="modalFormOk"/>
   </div>
 </template>
 
@@ -152,6 +150,7 @@
       this.getDowntimeDescriptionListByApi()
     },
     methods: {
+      // 鑾峰彇璁惧鍒楄〃
       getEquipmentListByApi() {
         const that = this
         getAction(this.url.equipmentList)
@@ -160,32 +159,77 @@
           })
       },
 
+      // 鑾峰彇鍋滄満鍘熷洜鍒楄〃
       getDowntimeDescriptionListByApi() {
         const that = this
         getAction(this.url.downtimeDescriptionList)
           .then(res => {
             if (res.success) that.downtimeDescriptionList = res.result
           })
+
       },
 
+      loadData(arg) {
+        //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
+        if (arg === 1) {
+          this.ipagination.current = 1
+        }
+        const params = this.getQueryParams()//鏌ヨ鏉′欢
+        if (!params) return false
+        this.loading = true
+        getAction(this.url.list, params)
+          .then((res) => {
+            if (res.success) {
+              this.dataSource = res.result.records || res.result
+              this.selectionRows = this.dataSource.filter(item => this.selectedRowKeys.includes(item.id))
+              if (res.result.total) {
+                this.ipagination.total = res.result.total
+              } else {
+                this.ipagination.total = 0
+              }
+            } else {
+              this.$message.warning(res.message)
+            }
+          })
+          .finally(() => {
+            this.loading = false
+          })
+      },
+
+      customRow(record) {
+        return {
+          style: {
+            cursor: 'pointer'
+          },
+          on: {
+            click: () => {
+              let selectedRowKeys = [...this.selectedRowKeys]
+              let selectionRows = [...this.selectionRows]
+              if (selectedRowKeys.includes(record.id)) {
+                selectedRowKeys = selectedRowKeys.filter(item => item !== record.id)
+                selectionRows = selectionRows.filter(item => item.id !== record.id)
+              }
+              else {
+                selectedRowKeys.push(record.id)
+                selectionRows.push(record)
+              }
+              this.onSelectChange(selectedRowKeys, selectionRows)
+            }
+          }
+        }
+      },
+
+      // 鎵撳紑缁存姢鍋滄満绐楀彛
       handleMaintainShutdown() {
         this.$refs.maintainShutdownModal.visible = true
         this.$refs.maintainShutdownModal.model = { downTimeIds: this.selectedRowKeys.join() }
       },
 
+      // 鎵撳紑鎷嗗垎鍋滄満淇℃伅绐楀彛
       handleSplitShutdownInfo() {
         this.$refs.splitShutdownInfoModal.visible = true
         this.$refs.splitShutdownInfoModal.setDateTime(this.selectionRows[0])
-      },
-
-      clearSelectedRowKeysAndLoadData() {
-        this.selectedRowKeys = this.selectionRows = []
-        this.loadData()
       }
     }
   }
-</script>
-
-<style scoped lang="less">
-
-</style>
\ No newline at end of file
+</script>
\ No newline at end of file

--
Gitblit v1.9.3