From 7713e63365e74047c08f3416b5a95108fdee7002 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期一, 20 一月 2025 10:53:02 +0800
Subject: [PATCH] 产品结构树: 1、工序和工步层级新增加工设备型号和加工设备类型字段 2、各层级详细信息调整创建人及修改人字段 3、指派到设备窗口布局完成100%

---
 src/views/dnc/base/modules/ProductStructure/Document/DocumentVersionTableList.vue |   82 ++++++++++++++++++++++++++++++++--------
 1 files changed, 65 insertions(+), 17 deletions(-)

diff --git a/src/views/dnc/base/modules/ProductStructure/Document/DocumentVersionTableList.vue b/src/views/dnc/base/modules/ProductStructure/Document/DocumentVersionTableList.vue
index 14f5344..b909b4c 100644
--- a/src/views/dnc/base/modules/ProductStructure/Document/DocumentVersionTableList.vue
+++ b/src/views/dnc/base/modules/ProductStructure/Document/DocumentVersionTableList.vue
@@ -1,39 +1,87 @@
 <template>
-  <a-table :columns="columns" :data-source="dataSource" bordered :pagination="false">
-
+  <a-table :columns="columns" :data-source="dataSource" bordered :pagination="false" :size="size" rowKey="fileId">
+    <template slot="rowIndex" slot-scope="text,record,index">
+      <span :style="{color:setCurrentVersionColor(record.publishFlag)}">{{parseInt(index) + 1}}</span>
+    </template>
+    <template slot="fileName" slot-scope="text,record,index">
+      <span :style="{color:setCurrentVersionColor(record.publishFlag)}">
+        {{text}}.{{record.fileSuffix}}
+        <span v-if="record.publishFlag">[褰撳墠鐗堟湰]</span>
+      </span>
+    </template>
+    <template slot="docVersion" slot-scope="text,record">
+      <span :style="{color:setCurrentVersionColor(record.publishFlag)}">{{text}}</span>
+    </template>
+    <template slot="fileSize" slot-scope="text,record">
+      <span :style="{color:setCurrentVersionColor(record.publishFlag)}">{{(text/1024).toFixed(2)}}KB</span>
+    </template>
   </a-table>
 </template>
 
 <script>
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import { getAction } from '@/api/manage'
 
   export default {
     name: 'DocumentVersionTableList',
     mixins: [JeecgListMixin],
     components: {},
+    props: {
+      currentDocumentInfo: {
+        type: Object
+      },
+      size: {
+        type: String
+      }
+    },
     data() {
       return {
+        disableMixinCreated: true,
+        queryParams: {},
         columns: [
-          {
-            title: '搴忓彿',
-            dataIndex: 'rowIndex',
-            key: 'rowIndex',
-            width: 65,
-            align: 'center',
-            customRender: function(t, r, index) {
-              return parseInt(index) + 1
-            }
-          },
-          { title: '鏂囦欢鍚嶇О', dataIndex: 'fileName', align: 'center' },
-          { title: '鐗堟湰鍙�', dataIndex: 'docVersion', align: 'center' },
-          { title: '鏂囦欢澶у皬', dataIndex: 'fileSize', align: 'center' }
+          { title: '搴忓彿', dataIndex: 'rowIndex', width: 65, align: 'center', scopedSlots: { customRender: 'rowIndex' } },
+          { title: '鏂囦欢鍚嶇О', dataIndex: 'fileName', align: 'center', scopedSlots: { customRender: 'fileName' } },
+          { title: '鐗堟湰鍙�', dataIndex: 'docVersion', align: 'center', scopedSlots: { customRender: 'docVersion' } },
+          { title: '鏂囦欢澶у皬', dataIndex: 'fileSize', align: 'center', scopedSlots: { customRender: 'fileSize' } }
         ],
         url: {
-          list: ''
+          list: '/nc/file/find/list'
         }
       }
     },
-    methods: {}
+    methods: {
+      loadData() {
+        this.dataSource = []
+        if (!this.url.list) {
+          this.$message.error('璇疯缃畊rl.list灞炴��!')
+          return
+        }
+        var params = this.getQueryParams()//鏌ヨ鏉′欢
+        params.docId = this.currentDocumentInfo.docId
+        if (!params) {
+          return false
+        }
+        this.loading = true
+        getAction(this.url.list, params).then((res) => {
+          if (res.success) {
+            this.dataSource = res.list
+          } else {
+            this.$message.warning(res.message)
+          }
+        }).finally(() => {
+          this.loading = false
+        })
+      },
+
+      /**
+       * 璁剧疆琛ㄦ牸涓负褰撳墠鐗堟湰鐨勬枃浠惰〃鏍艰棰滆壊鏍囪瘑
+       * @param publishFlag 鏄惁涓哄綋鍓嶇増鏈�
+       * @returns {string} 棰滆壊鏍囪瘑
+       */
+      setCurrentVersionColor(publishFlag) {
+        return publishFlag ? '#DB9538' : ''
+      }
+    }
   }
 </script>
 

--
Gitblit v1.9.3