| | |
| | | <el-container v-if="selectNode.id"> |
| | | <el-header> |
| | | <el-button @click="table_add" type="primary" icon="el-icon-plus"></el-button> |
| | | <import-table style="margin:0 8px" exportUrl="/api/blade-cps/fixture/export/template" |
| | | uploadUrl="/api/blade-cps/fixture/import-fixture"></import-table> |
| | | <import-table style="margin:0 8px" exportUrl="/api/smis/fixture/export/template" |
| | | uploadUrl="/api/smis/fixture/import-fixture"></import-table> |
| | | <el-popconfirm title="确定删除吗?" @confirm="del(selection, '0')"> |
| | | <template #reference> |
| | | <el-button type="danger" :disabled="selection.length === 0" plain icon="el-icon-delete" |
| | |
| | | groupId: this.selectNode.id, |
| | | ...this.params |
| | | } |
| | | return await this.$HTTP.get(`/api/blade-cps/fixture/page`, {}, { params }).then(res => { |
| | | return await this.$HTTP.get(`/api/smis/fixture/page`, {}, { params }).then(res => { |
| | | return res |
| | | }) |
| | | } |
| | |
| | | 'trayForm.trayId': { |
| | | handler(val) { |
| | | if (val) { |
| | | this.$HTTP.get(`/api/blade-cps/tray-surface/list/${val}`).then(res => { |
| | | this.$HTTP.get(`/api/smis/tray-surface/list/${val}`).then(res => { |
| | | this.surfaceId = res.data |
| | | if (!this.surfaceId.find(v => v.id === this.trayForm.surfaceId)) { |
| | | this.trayForm.surfaceId = '' |
| | |
| | | }, |
| | | created() { |
| | | this.init() |
| | | this.$HTTP.post(`/api/blade-cps/tray/list`).then(res => { |
| | | this.$HTTP.post(`/api/smis/tray/list`).then(res => { |
| | | this.trayId = res.data |
| | | }) |
| | | }, |
| | |
| | | console.log(options) |
| | | formData.append('file', options.file) |
| | | this.$HTTP.post(`/api/blade-resource/oss/endpoint/put-file`, formData).then(resFile => { |
| | | this.$HTTP.post(`/api/blade-cps/fixture/file`, { |
| | | this.$HTTP.post(`/api/smis/fixture/file`, { |
| | | contentType: options.file.type, |
| | | fileLength: options.file.size, |
| | | fileLink: resFile.data.link, |
| | |
| | | }) |
| | | }, |
| | | delFile(row) { |
| | | this.$HTTP.delete(`/api/blade-cps/tool-appendix/remove`, [row.id]).then(res => { |
| | | this.$HTTP.delete(`/api/smis/tool-appendix/remove`, [row.id]).then(res => { |
| | | if (res.success) { |
| | | this.rowClick(this.row) |
| | | } else { |
| | |
| | | this.visibleGroup = true |
| | | }, |
| | | delArea(data) { |
| | | this.$HTTP.delete(`/api/blade-cps/tray/remove-tree?id=${data.id}`).then(res => { |
| | | this.$HTTP.delete(`/api/smis/tray/remove-tree?id=${data.id}`).then(res => { |
| | | this.init() |
| | | }) |
| | | }, |
| | | saveGroup() { |
| | | if (!this.formGroup.id) { |
| | | this.$HTTP.post(`/api/blade-cps/group`, { |
| | | this.$HTTP.post(`/api/smis/group`, { |
| | | groupCategory: 1, |
| | | groupType: "group_fixture", |
| | | parentId: this.selectNode.id, |
| | |
| | | this.init() |
| | | }) |
| | | } else { |
| | | this.$HTTP.put(`/api/blade-cps/group`, { |
| | | this.$HTTP.put(`/api/smis/group`, { |
| | | groupCategory: 1, |
| | | groupType: "group_fixture", |
| | | parentId: this.selectNode.id, |
| | |
| | | }, |
| | | confirm() { |
| | | if (this.trayForm.id) { |
| | | return this.$HTTP.put(`/api/blade-cps/fixture/update`, { |
| | | return this.$HTTP.put(`/api/smis/fixture/update`, { |
| | | ...this.trayForm |
| | | }).then(res => { |
| | | this.dialog = false |
| | | this.queryInfo() |
| | | }) |
| | | } |
| | | this.$HTTP.post(`/api/blade-cps/fixture/${this.trayForm.fixtureGroupId}/insert`, { |
| | | this.$HTTP.post(`/api/smis/fixture/${this.trayForm.fixtureGroupId}/insert`, { |
| | | ...this.trayForm |
| | | }).then(res => { |
| | | this.dialog = false |
| | |
| | | }) |
| | | }, |
| | | del(ids) { |
| | | this.$HTTP.delete(`/api/blade-cps/fixture/remove`, ids.map(v => v.id)).then(res => { |
| | | this.$HTTP.delete(`/api/smis/fixture/remove`, ids.map(v => v.id)).then(res => { |
| | | this.queryInfo() |
| | | }) |
| | | }, |
| | | init() { |
| | | this.$HTTP.post(`/api/blade-cps/tray/tooling-tree`, { |
| | | this.$HTTP.post(`/api/smis/tray/tooling-tree`, { |
| | | groupCategory: 1, |
| | | groupType: "group_fixture" |
| | | }).then(res => { |
| | |
| | | queryInfo() { |
| | | if (!this.selectNode.id) return |
| | | this.$refs?.table?.reload() |
| | | // this.$HTTP.get(`/api/blade-cps/tray/${this.selectNode.id}`).then(res => { |
| | | // this.$HTTP.get(`/api/smis/tray/${this.selectNode.id}`).then(res => { |
| | | // this.info = res.data |
| | | // }) |
| | | // this.$HTTP.get(`/api/blade-cps/tray-surface/list/${this.selectNode.id}`).then(res => { |
| | | // this.$HTTP.get(`/api/smis/tray-surface/list/${this.selectNode.id}`).then(res => { |
| | | // this.info = res.data |
| | | // }) |
| | | }, |
| | |
| | | async queryChildInfo(id) { |
| | | if (!id) return |
| | | this.showLoading = true |
| | | await this.$HTTP.get(`/api/blade-cps/fixture/get/${id}`).then(res => { |
| | | await this.$HTTP.get(`/api/smis/fixture/get/${id}`).then(res => { |
| | | this.info = res.data |
| | | this.infoList = [ |
| | | { |
| | |
| | | ] |
| | | this.fileList = res.data.toolAppendixVOList |
| | | }) |
| | | // await this.$HTTP.get(`/api/blade-cps/tray-surface/list/${id}`).then(res => { |
| | | // await this.$HTTP.get(`/api/smis/tray-surface/list/${id}`).then(res => { |
| | | // this.infoList = res.data |
| | | // }) |
| | | this.showLoading = false |
| | |
| | | this.selectNode = node |
| | | }, |
| | | table_del1(row) { |
| | | this.$HTTP.delete(`/api/blade-cps/tray-fixture`, [{ id: row.id, othersId: row.othersId }]).then(res => { |
| | | this.$HTTP.delete(`/api/smis/tray-fixture`, [{ id: row.id, othersId: row.othersId }]).then(res => { |
| | | this.$message.success('操作成功') |
| | | this.queryChildInfo(this.info.id) |
| | | }) |