From 3931e2728f618d0090f129b2665bc1285c4440c3 Mon Sep 17 00:00:00 2001 From: gaoshp <291585735@qq.com> Date: 星期日, 03 十一月 2024 17:27:32 +0800 Subject: [PATCH] update --- src/views/console/tooling/tray-fixturePreview.vue | 55 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 49 insertions(+), 6 deletions(-) diff --git a/src/views/console/tooling/tray-fixturePreview.vue b/src/views/console/tooling/tray-fixturePreview.vue index 4c1a2e5..408fb00 100644 --- a/src/views/console/tooling/tray-fixturePreview.vue +++ b/src/views/console/tooling/tray-fixturePreview.vue @@ -1,13 +1,13 @@ <!-- * @Date: 2024-05-12 20:02:31 * @LastEditors: Sneed - * @LastEditTime: 2024-05-12 20:53:16 + * @LastEditTime: 2024-06-16 16:18:09 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/tooling/tray-fixturePreview.vue --> <template> <el-container> <el-aside width="200px"> - <el-tree default-expand-all ref="group" node-key="id" :data="treeData" :props="{ + <el-tree :expand-on-click-node="false" default-expand-all ref="group" node-key="id" :data="treeData" :props="{ label: 'name', disabled: 'isGroup' }" @node-click="nodeClick"> @@ -22,7 +22,8 @@ <!-- <el-main> --> <el-container> <el-header> - <import-table style="margin:0 8px" :exportUrl="exportUrl" :uploadUrl="uploadUrl"></import-table> + <import-table style="margin:0 8px" exportUrl="/api/smis/tray-fixture/excel/template" + uploadUrl="/api/smis/tray-fixture/excel/import"></import-table> </el-header> <el-main v-if="selectNode.id"> <el-row> @@ -49,6 +50,29 @@ 鎵樼洏鎻忚堪: {{ info?.description || '-' }} </el-col> </el-row> + <el-row> + <el-col style="margin: 20px 0"> + <h2>鎵樼洏闈�</h2> + </el-col> + <el-col :span="24"> + <el-collapse v-model="activeNames" style="margin-top: 20px;"> + <el-collapse-item v-for="item in surfaceList" :key="item.id" :title="item.name" + :name="item.id"> + <el-table stripe :data="item.list"> + <el-table-column label="澶瑰叿缂栧彿" prop="fixtureCode"></el-table-column> + <el-table-column label="澶瑰叿鍚嶇О" prop="fixtureName"></el-table-column> + </el-table> + </el-collapse-item> + </el-collapse> + </el-col> + </el-row> + + <el-row> + <el-col style="margin: 20px 0"> + <h2>鎵樼洏宸ヨ壓鏂囦欢</h2> + + </el-col> + </el-row> </el-main> <el-main class="empty" v-else> <el-empty></el-empty> @@ -68,7 +92,10 @@ return { treeData: [], info: {}, + surfaceList: [], //鎵樼洏闈� + fileList: [], //闄勪欢 selectNode: {}, + activeNames: '' } }, watch: { @@ -87,17 +114,33 @@ }, methods: { init() { - this.$HTTP.post(`/api/blade-cps/tray/tray-tree`, { + this.$HTTP.post(`/api/smis/tray/tray-tree`, { groupCategory: 1, groupType: "group_tray" }).then(res => { this.treeData = res.data }) }, - queryInfo() { - this.$HTTP.get(`/api/blade-cps/tray/${this.selectNode.id}`).then(res => { + async queryInfo() { + this.$HTTP.get(`/api/smis/tray/${this.selectNode.id}`).then(res => { this.info = res.data }) + + this.$HTTP.post(`/api/smis/tray/tool-appendix?id=${this.selectNode.id}`).then(res => { + this.fileList = res.data + }) + await this.$HTTP.get(`/api/smis/tray-surface/list/${this.selectNode.id}`).then(res => { + this.surfaceList = res.data + this.activeNames = res.data?.[0]?.id + }) + Promise.all(this.surfaceList.map(item => { + return this.$HTTP.get(`/api/smis/tray-fixture/list/fixture?faceId=${item.id}`) + })).then(data => { + data.forEach((v, i) => { + this.surfaceList[i].list = v.data + }) + }) + console.log(this.surfaceList) }, nodeClick(node) { if (!node.isGroup) this.selectNode = node -- Gitblit v1.9.3