| | |
| | | <!-- |
| | | * @Date: 2024-05-12 20:02:31 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-05-12 20:53:16 |
| | | * @LastEditTime: 2024-05-16 22:38:31 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/tooling/tray-fixturePreview.vue |
| | | --> |
| | | <template> |
| | |
| | | <!-- <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/blade-cps/tray-fixture/excel/template" |
| | | uploadUrl="/api/blade-cps/tray-fixture/excel/import"></import-table> |
| | | </el-header> |
| | | <el-main v-if="selectNode.id"> |
| | | <el-row> |
| | |
| | | 托盘描述: {{ 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> |
| | |
| | | return { |
| | | treeData: [], |
| | | info: {}, |
| | | surfaceList: [], //托盘面 |
| | | fileList: [], //附件 |
| | | selectNode: {}, |
| | | activeNames: '' |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.treeData = res.data |
| | | }) |
| | | }, |
| | | queryInfo() { |
| | | async queryInfo() { |
| | | this.$HTTP.get(`/api/blade-cps/tray/${this.selectNode.id}`).then(res => { |
| | | this.info = res.data |
| | | }) |
| | | |
| | | this.$HTTP.post(`/api/blade-cps/tray/tool-appendix?id=${this.selectNode.id}`).then(res => { |
| | | this.fileList = res.data |
| | | }) |
| | | await this.$HTTP.get(`/api/blade-cps/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/blade-cps/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 |