From 82a5da6bbeeadf1c5f448158dae7d1838efc9d2e Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期日, 26 五月 2024 16:06:09 +0800
Subject: [PATCH] 工位文件

---
 src/views/dnc/station-file/Log.vue   |   57 +++++++++++++------
 src/views/dnc/station-file/index.vue |   42 +++++++++----
 src/views/dnc/station-file/File.vue  |   24 ++++++-
 src/views/mdc/MYTree.vue             |   22 ++++++-
 4 files changed, 106 insertions(+), 39 deletions(-)

diff --git a/src/views/dnc/station-file/File.vue b/src/views/dnc/station-file/File.vue
index b5e3240..a114307 100644
--- a/src/views/dnc/station-file/File.vue
+++ b/src/views/dnc/station-file/File.vue
@@ -1,13 +1,29 @@
 <!--
  * @Date: 2024-05-22 23:37:07
  * @LastEditors: Sneed
- * @LastEditTime: 2024-05-22 23:37:12
+ * @LastEditTime: 2024-05-26 15:42:35
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/station-file/File.vue
 -->
 <template>
-    <div>
-        宸ヤ綅鏂囦欢
-    </div>
+    <el-container>
+        <el-header>
+            <el-button type="primary">褰掓。</el-button>
+        </el-header>
+        <el-main>
+            <h2>绋嬪簭</h2>
+            <el-table :data="tableData" style="width: 100%">
+                <el-table-column label="鏂囦欢鍚嶇О" prop="" width=""></el-table-column>
+                <el-table-column label="鐗堟湰" prop="" width=""></el-table-column>
+                <el-table-column label="澶у皬" prop="" width=""></el-table-column>
+            </el-table>
+            <h2>鏂囦欢</h2>
+            <el-table :data="tableData" style="width: 100%">
+                <el-table-column label="鏂囦欢鍚嶇О" prop="" width=""></el-table-column>
+                <el-table-column label="鐗堟湰" prop="" width=""></el-table-column>
+                <el-table-column label="澶у皬" prop="" width=""></el-table-column>
+            </el-table>
+        </el-main>
+    </el-container>
 </template>
 
 <script>
diff --git a/src/views/dnc/station-file/Log.vue b/src/views/dnc/station-file/Log.vue
index 4dabb06..9c36765 100644
--- a/src/views/dnc/station-file/Log.vue
+++ b/src/views/dnc/station-file/Log.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2024-05-22 23:18:15
  * @LastEditors: Sneed
- * @LastEditTime: 2024-05-22 23:35:38
+ * @LastEditTime: 2024-05-26 16:04:41
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/station-file/Log.vue
 -->
 <template>
@@ -26,25 +26,18 @@
                 <el-option v-for="item in options.typeId" :key="item.value" :label="item.label" :value="item.value" />
             </el-select>
         </el-header>
-        <el-main>
-            <scTable highlight-current-row @dataChange="dataChange" @row-click="rowClick" ref="table" :params="params"
+        <el-main >
+            <scTable v-if="id" highlight-current-row @dataChange="dataChange" @row-click="rowClick" ref="table" :params="params"
                 :apiObj="apiObj" @selection-change="selectionChange" stripe>
-                <el-table-column type="selection" width="50"></el-table-column>
-                <el-table-column label="鏂囦欢鍚嶇О" prop="name">
+                <el-table-column label="鏂囦欢鍚嶇О" prop="fileName">
                 </el-table-column>
-                <el-table-column label="鏂囦欢璺緞" prop="allPathName"></el-table-column>
-                <el-table-column label="澶у皬" prop="contentLength"></el-table-column>
-                <el-table-column label="鏂囦欢绫诲瀷" prop="suffix"></el-table-column>
-                <el-table-column label="鏇存柊鏃堕棿" prop="updateTime"></el-table-column>
-                <el-table-column label="鎿嶄綔" fixed="right" align="right" width="160">
-                    <template #default="scope">
-                        <el-button-group>
-                            <el-button text type="primary" size="small"
-                                @click="table_edit(scope.row, scope.$index)">缂栬緫</el-button>
-                            <el-button text type="primary" size="small" @click="del([scope.row])">鍒犻櫎</el-button>
-                        </el-button-group>
-                    </template>
-                </el-table-column>
+                <el-table-column label="鐗堟湰" prop="version"></el-table-column>
+                <el-table-column label="鎿嶄綔浜哄憳" prop="operatorName"></el-table-column>
+                <el-table-column label="鎿嶄綔绫诲瀷" prop="operationTypeDesc"></el-table-column>
+                <el-table-column label="鎿嶄綔缁撴灉" prop="operationResponse"></el-table-column>
+                <el-table-column label="婧愯矾寰�" prop="sourcePathName"></el-table-column>
+                <el-table-column label="鐩爣璺緞" prop="targetPathName"></el-table-column>
+                <el-table-column label="鎿嶄綔鏃堕棿" prop="operationTime"></el-table-column>
             </scTable>
         </el-main>
     </el-container>
@@ -52,6 +45,18 @@
 
 <script>
 export default {
+    props: {
+        id: {
+            type: String
+        }
+    },
+    watch: {
+        id(val) {
+            this.$nextTick(() => {
+                val && this.$refs?.table?.reload()
+            })
+        }
+    },
     data() {
         return {
             params: {
@@ -59,9 +64,25 @@
             },
             options: {
                 typeId: []
+            },
+            apiObj: {
+                get: async (data) => {
+                    let params = {
+                        current: data.current,
+                        size: data.size
+                    }
+                    return await this.$HTTP.post(`/api/blade-dnc/operation-file/page/${this.id}`, {}, { params,data:this.params }).then(res => {
+                        return res
+                    })
+                }
             }
         }
     },
+    methods: {
+        dataChange (data) {
+            console.log(data)
+        }
+    }
 }
 </script>
 
diff --git a/src/views/dnc/station-file/index.vue b/src/views/dnc/station-file/index.vue
index dcf3023..8f2757b 100644
--- a/src/views/dnc/station-file/index.vue
+++ b/src/views/dnc/station-file/index.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2024-05-20 21:43:10
  * @LastEditors: Sneed
- * @LastEditTime: 2024-05-22 23:37:00
+ * @LastEditTime: 2024-05-26 16:02:09
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/station-file/index.vue
 -->
 <template>
@@ -11,16 +11,7 @@
                 <el-aside width="200px">
                     <el-container>
                         <el-main>
-                            <el-tree default-expand-all ref="tree" node-key="id" :data="treeData" :props="{
-                                label: 'name',
-                            }" @node-click="nodeClick" highlight-current :current-node-key="selectNode.id">
-                                <template #default="{ node, data }">
-                                    <span :class="data.isGroup ? 'active' : ''" class="custom-tree-node">
-                                        <span>{{
-                                            node.label || data.code }}</span>
-                                    </span>
-                                </template>
-                            </el-tree>
+                            <MYTree :props="props" v-model="treeChecked" @loaded="query"></MYTree>
                         </el-main>
                         <!-- <el-footer>
                             <el-button type="primary" round @click="addFolder">鏂板鏂囦欢澶�</el-button>
@@ -33,7 +24,7 @@
                             <File></File>
                         </el-tab-pane>
                         <el-tab-pane label="鎿嶄綔鏃ュ織" name="2">
-                            <Log />
+                            <Log :id="id"/>
                         </el-tab-pane>
                     </el-tabs>
                 </el-main>
@@ -45,10 +36,35 @@
 <script>
 import Log from './Log.vue'
 import File from './File.vue'
+import MYTree from '@/views/mdc/MYTree.vue'
 export default {
     components: {
         Log,
-        File
+        File,
+        MYTree
+    },
+    data() {
+        return {
+            id: '',
+            activeName: '2',
+            treeChecked: {},
+            props: {
+                disabled: function (data,node) {
+                    return !data.ftpCatalogue
+                }
+            }
+        }
+    },
+    watch: {
+        treeChecked(val) {
+            console.log(val,'>>>>>>')
+            this.id = val?.[0]
+        }
+    },
+    methods: {
+        query () {
+
+        }
     }
 }
 </script>
diff --git a/src/views/mdc/MYTree.vue b/src/views/mdc/MYTree.vue
index 687ad0d..4e70583 100644
--- a/src/views/mdc/MYTree.vue
+++ b/src/views/mdc/MYTree.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2024-04-18 19:53:35
  * @LastEditors: Sneed
- * @LastEditTime: 2024-04-23 23:09:18
+ * @LastEditTime: 2024-05-26 15:49:11
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/MYTree.vue
 -->
 <template>
@@ -21,6 +21,12 @@
         getAll: {
             type: Boolean,
             default: false
+        },
+        props: {
+            type: Object,
+            default: () => {
+                return {}
+            }
         }
     },
     data() {
@@ -34,7 +40,8 @@
                 disabled: 'disabled',
                 class: (data, node) => {
                     return this.value.includes(data.id) ? 'active' : ''
-                }
+                },
+                ...this.props
             },
             data: [],
             value: [],
@@ -54,10 +61,13 @@
         this.getList()
     },
     methods: {
-        renderContent(h, { data }) {
+        renderContent(h, { data,node }) {
             let img = data.groupTag == 'fms_beltline'
             return h('a', {
-                disabled: data.disabled
+                class: {
+                    disabled: this.props.disabled ? this.props.disabled(data,node) : data.disabled
+                },
+                disabled: this.props.disabled ? this.props.disabled(data,node) : data.disabled
             },
                 img ? h('img', {
                     src: pmsPng
@@ -74,6 +84,7 @@
                     this.$nextTick(() => {
                         this.currentNodeKey = this.firstWorkKey
                         this.$emit('loaded', this.firstWorkKey)
+                        this.$emit('request', data)
                     })
                 }
             })
@@ -131,4 +142,7 @@
 .active .el-tree-node__content {
     background: var(--el-color-primary) !important;
 }
+a.disabled {
+    color: #ccc;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3