From dd5bef0fd97322b5455401e106dc6382502ec81c Mon Sep 17 00:00:00 2001
From: lzhe <181968431@qq.com>
Date: 星期一, 13 五月 2024 23:07:33 +0800
Subject: [PATCH] Merge branch 'master' of http://www.beijingsoft.cn:9090/r/smart-web

---
 src/views/console/tooling/Tray.vue |  126 +++++++++++++++++++++++++++---------------
 1 files changed, 81 insertions(+), 45 deletions(-)

diff --git a/src/views/console/tooling/Tray.vue b/src/views/console/tooling/Tray.vue
index 7234ccd..f1766d7 100644
--- a/src/views/console/tooling/Tray.vue
+++ b/src/views/console/tooling/Tray.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2024-05-12 20:02:31
  * @LastEditors: Sneed
- * @LastEditTime: 2024-05-12 21:34:13
+ * @LastEditTime: 2024-05-13 22:35:52
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/tooling/Tray.vue
 -->
 <template>
@@ -32,12 +32,12 @@
                 <el-button @click="table_add" type="primary" icon="el-icon-plus"></el-button>
                 <import-table style="margin:0 8px" :exportUrl="exportUrl" :uploadUrl="uploadUrl"></import-table>
                 <el-button type="danger" plain icon="el-icon-delete" @click="batchDel"></el-button>
-                <el-input v-model="params.keyWord" style="width: 240px;margin-left: auto;" placeholder="璇疯緭鍏ユ绱㈠唴瀹�"
+                <el-input v-model="params.keyword" style="width: 240px;margin-left: auto;" placeholder="璇疯緭鍏ユ绱㈠唴瀹�"
                     clearable></el-input>
                 <el-button @click="search" type="primary" icon="el-icon-search"></el-button>
             </el-header>
             <el-main>
-                <el-row>
+                <el-row :gutter="20">
                     <el-col :span="10">
                         <scTable highlight-current-row @dataChange="dataChange" @row-click="rowClick" ref="table"
                             :params="params" :apiObj="apiObj" @selection-change="selectionChange" stripe>
@@ -62,42 +62,65 @@
                     </el-col>
                     <el-col :span="14">
                         <h2>鎵樼洏淇℃伅</h2>
-                        <el-container>
-                            <el-main>
-                                <div class="tuopan-info">
-                                    <div>
-                                        tup
-                                    </div>
-                                    <el-row>
-                                        <el-col :span="12">
-                                            鎵樼洏闈㈡暟: {{ }}
-                                        </el-col>
-                                        <el-col :span="12">
-                                            鎵樼洏闈㈡暟: {{ }}
-                                        </el-col>
-                                        <el-col :span="12">
-                                            鎵樼洏闈㈡暟: {{ }}
-                                        </el-col>
-                                        <el-col :span="12">
-                                            鎵樼洏闈㈡暟: {{ }}
-                                        </el-col>
-                                        <el-col :span="12">
-                                            鎵樼洏闈㈡暟: {{ }}
-                                        </el-col>
-                                        <el-col :span="12">
-                                            鎵樼洏闈㈡暟: {{ }}
-                                        </el-col>
-                                        <el-col :span="12">
-                                            鎵樼洏闈㈡暟: {{ }}
-                                        </el-col>
-                                        <el-col :span="12">
-                                            鎵樼洏闈㈡暟: {{ }}
-                                        </el-col>
-                                    </el-row>
-                                </div>
+                        <div class="tuopan-info">
+                            <el-row>
+                                <el-col :span="12">
+                                    鎵樼洏缂栧彿: {{ info.code }}
+                                </el-col>
+                                <el-col :span="12">
+                                    鎵樼洏鍚嶇О: {{ info.name || '-' }}
+                                </el-col>
+                                <el-col :span="12">
+                                    鎵樼洏闈㈡暟: {{ info.faceNumber || '-' }}
+                                </el-col>
+                                <el-col :span="12">
+                                    鍙敤鐘舵��: {{ info.availability === 1 ? '鍙敤' : '鍐荤粨' }}
+                                </el-col>
+                                <el-col :span="12">
+                                    鎵樼洏鎻忚堪: {{ info.description || '-' }}
+                                </el-col>
+                                <el-col :span="12">
+                                    鎵樼洏绫诲埆: {{ info.category || '-' }}
+                                </el-col>
+                                <el-col :span="12">
+                                    鎵樼洏瑙勬牸: {{ info.standardModel || '-' }}
+                                </el-col>
+                                <el-col :span="12">
+                                    鎵樼洏缁�: {{ info.groupName || '-' }}
+                                </el-col>
+                                <el-col :span="12">
+                                    鎵樼洏鐘舵��: {{ info.trayStatus === 1 ? '绌鸿浇' : '璐熻浇' }}
+                                </el-col>
+                                <el-col :span="12">
+                                    澶囨敞: {{ info.remark || '-' }}
+                                </el-col>
+                            </el-row>
+                        </div>
 
-                            </el-main>
-                        </el-container>
+                        <h2 style="margin-top: 14px;">鎵樼洏闈㈠垪琛�</h2>
+                        <div>
+                            <el-button type="primary">鏂板缓鎵樼洏闈�</el-button>
+                        </div>
+                        <el-table :data="infoList" style="width: 100%">
+                            <el-table-column label="鎵樼洏闈㈢紪鍙�" prop="code"></el-table-column>
+                            <el-table-column label="鎵樼洏闈㈠悕绉�" prop="name"></el-table-column>
+                            <el-table-column label="鍏宠仈澶瑰叿" prop="type"></el-table-column>
+                            <el-table-column label="渚垮疁绋嬪簭缂栧彿" prop="type"></el-table-column>
+                            <el-table-column label="渚垮疁绋嬪簭缂栧彿" prop="type"></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_edit1(scope.row, scope.$index)">缂栬緫</el-button>
+                                        <el-popconfirm title="纭畾鍒犻櫎鍚楋紵" @confirm="table_del1([scope.row], '0')">
+                                            <template #reference>
+                                                <el-button text type="primary" size="small">鍒犻櫎</el-button>
+                                            </template>
+                                        </el-popconfirm>
+                                    </el-button-group>
+                                </template>
+                            </el-table-column>
+                        </el-table>
                     </el-col>
                 </el-row>
             </el-main>
@@ -119,13 +142,15 @@
                 keyword: ''
             },
             info: {},
+            infoList: [],
             selectNode: {},
             apiObj: {
                 get: async (data) => {
                     let params = {
-                        ...data
+                        ...data,
+                        ...this.params
                     }
-                    return await this.$HTTP.get(`/api/blade-cps/tray/page/${this.selectNode.id}`, { keyword: this.params.keyword }, { params }).then(res => {
+                    return await this.$HTTP.get(`/api/blade-cps/tray/page/${this.selectNode.id}`, {}, { params }).then(res => {
                         return res
                     })
                 }
@@ -139,6 +164,7 @@
                     this.queryInfo()
                 } else {
                     this.info = {}
+                    this.infoList = []
                 }
             }
         }
@@ -147,6 +173,9 @@
         this.init()
     },
     methods: {
+        search() {
+            this.$refs.table.reload(this.params)
+        },
         init() {
             this.$HTTP.post(`/api/blade-cps/tray/tooling-tree`, {
                 groupCategory: 1,
@@ -166,13 +195,20 @@
             //     this.info = res.data
             // })
         },
-        queryChildInfo() {
-            if (!this.selectNode.id) return
-            this.$HTTP.get(`/api/blade-cps/tray/${this.selectNode.id}`).then(res => {
+        dataChange(res, data) {
+            this.rowClick(data?.[0])
+        },
+        rowClick(row) {
+            console.log(row.id)
+            this.queryChildInfo(row.id)
+        },
+        queryChildInfo(id) {
+            if (!id) return
+            this.$HTTP.get(`/api/blade-cps/tray/${id}`).then(res => {
                 this.info = res.data
             })
-            this.$HTTP.get(`/api/blade-cps/tray-surface/list/${this.selectNode.id}`).then(res => {
-                this.info = res.data
+            this.$HTTP.get(`/api/blade-cps/tray-surface/list/${id}`).then(res => {
+                this.infoList = res.data
             })
         },
         nodeClick(node) {

--
Gitblit v1.9.3