From e48436b9c5dd3f0365f77339f84b37eea95b56e2 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期一, 16 六月 2025 15:22:19 +0800
Subject: [PATCH] 提取刀具选择刀具 修改文件名称展示

---
 src/views/dnc/base/modules/DeviceStructure/Document/HasSentDocumentTableList.vue |   93 ++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 84 insertions(+), 9 deletions(-)

diff --git a/src/views/dnc/base/modules/DeviceStructure/Document/HasSentDocumentTableList.vue b/src/views/dnc/base/modules/DeviceStructure/Document/HasSentDocumentTableList.vue
index 4272858..443a97a 100644
--- a/src/views/dnc/base/modules/DeviceStructure/Document/HasSentDocumentTableList.vue
+++ b/src/views/dnc/base/modules/DeviceStructure/Document/HasSentDocumentTableList.vue
@@ -1,8 +1,11 @@
 <template>
   <div>
-    <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination"
-             :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange">
-
+    <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" :loading="loading"
+             :scroll="{y:265}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange">
+      <!-- 瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず-->
+      <span slot="docName" slot-scope="text">
+          <j-ellipsis :value="text"/>
+        </span>
     </a-table>
 
     <DocumentModal ref="modalForm" @ok="modalFormOk"/>
@@ -22,6 +25,9 @@
       currentTreeNodeInfo: {
         type: Object
       },
+      currentTypeOfDevice:{
+        type:Number
+      },
       size: {
         type: String
       }
@@ -40,12 +46,56 @@
               return parseInt(index) + 1
             }
           },
-          { title: '鏂囦欢鍚嶇О', dataIndex: 'docName', align: 'center' },
-          { title: '浠g爜鐗堟湰', dataIndex: 'docAlias', align: 'center' },
-          { title: '鍑哄簱鐘舵��', dataIndex: 'pullStatus_dictText', align: 'center' },
-          { title: '鐘�  鎬�', dataIndex: 'docStatus_dictText', align: 'center' },
+          {
+            title: '鏂囦欢鍚嶇О',
+            dataIndex: 'docName',
+            key: 'docName',
+            align: 'center',
+            scopedSlots: {customRender: 'docName'},
+            width: 300,
+            sorter: true
+          },
+          {
+            title: '鍑哄簱鐘舵��',
+            dataIndex: 'pullStatus_dictText',
+            key: 'pullStatus',
+            align: 'center',
+            filters: [
+              { text: '鏈嚭搴�', value: 1 },
+              { text: '宸插嚭搴�', value: 2 }
+            ]
+          },
+          {
+            title: '鐘�  鎬�',
+            dataIndex: 'docDispatchStatus_dictText',
+            key: 'docDispatchStatus',
+            align: 'center',
+            filters: [
+              { text: '缂栧埗', value: 1 },
+              { text: '鏍″', value: 2 },
+              { text: '鎵瑰噯', value: 3 },
+              { text: '璇曞垏', value: 4 },
+              { text: '瀹氬瀷', value: 5 }
+            ]
+          },
           { title: '绯荤粺鎸囧畾鐗堟湰', dataIndex: 'publishVersion', align: 'center' },
-          { title: '涓婁紶鏃堕棿', dataIndex: 'createTime', align: 'center' }
+          {
+            title: '鍚屾鐘舵��',
+            dataIndex: 'syncStatus_dictText',
+            key: 'syncStatus',
+            align: 'center',
+            filters: [
+              { text: '鏈悓姝�', value: 1 },
+              { text: '宸插悓姝�', value: 2 }
+            ]
+          },
+          {
+            title: '鍒涘缓鏃堕棿',
+            dataIndex: 'createTime',
+            align: 'center',
+            width: 200,
+            sorter: true
+          }
         ],
         dataSource: [],
         currentRightClickedDocumentInfo: {},
@@ -77,7 +127,7 @@
         var params = this.getQueryParams()//鏌ヨ鏉′欢
         console.log('currentTreeNodeInfo', this.currentTreeNodeInfo)
         params.attributionId = this.currentTreeNodeInfo.key
-        params.attributionType = 4
+        params.attributionType = this.currentTypeOfDevice
         params.docClassCode = 'SEND'
         if (!params) return false
         this.dataSource = []
@@ -100,6 +150,9 @@
 
       customRow(record) {
         return {
+          style: {
+            backgroundColor: this.currentClickedDocumentInfo.docId === record.docId ? '#BAE7FF' : 'transparent'
+          },
           on: {
             contextmenu: event => {
               event.preventDefault()
@@ -115,7 +168,29 @@
         }
       },
 
+      /**
+       * 琛ㄦ牸鍒嗛〉銆佹帓搴忔敼鍙樸�佺瓫閫夋椂瑙﹀彂
+       * @param pagination 鍒嗛〉鍣ㄩ�夐」
+       * @param filters 绛涢�夐�夐」
+       * @param sorter 鎺掑簭閫夐」
+       */
+      handleTableChange(pagination, filters, sorter) {
+        if (sorter.order) {
+          this.isorter.column = sorter.field
+          this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc'
+        } else {
+          this.isorter.column = 'createTime'
+          this.isorter.order = 'desc'
+        }
+        for (let key in filters) {
+          this.filters[key] = filters[key].join(',')
+        }
+        this.ipagination = pagination
+        this.loadData()
+      },
+
       handleDocumentEdit(record, modalTitle) {
+        if (!this.$refs.modalForm) return
         this.$refs.modalForm.edit(record)
         this.$refs.modalForm.title = modalTitle
       },

--
Gitblit v1.9.3