|
@@ -80,7 +80,8 @@
|
|
:show-overflow-tooltip="true"
|
|
:show-overflow-tooltip="true"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span>{{ scope.row.cuttingToolType['data'] ? scope.row.cuttingToolType['data'] : scope.row.cuttingToolType['key'] }}</span>
|
|
|
|
|
|
+ <span>{{ scope.row}}</span>
|
|
|
|
+ <!-- <span>{{ scope.row.cuttingToolType['data'] ? scope.row.cuttingToolType['data'] : scope.row.cuttingToolType['key'] }}</span> -->
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
@@ -132,7 +133,6 @@
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
<el-tooltip class="item" :content='$t("common.edit")' effect="dark" placement="top-start">
|
|
<el-tooltip class="item" :content='$t("common.edit")' effect="dark" placement="top-start">
|
|
<i
|
|
<i
|
|
- v-if="row.cutterNo==0"
|
|
|
|
class="el-icon-edit table-operation"
|
|
class="el-icon-edit table-operation"
|
|
style="color: #2db7f5;"
|
|
style="color: #2db7f5;"
|
|
@click="edit(row)"
|
|
@click="edit(row)"
|
|
@@ -140,7 +140,6 @@
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
<el-tooltip class="item" content='对刀参数维护' effect="dark" placement="top-start">
|
|
<el-tooltip class="item" content='对刀参数维护' effect="dark" placement="top-start">
|
|
<i
|
|
<i
|
|
- v-if="row.cutterNo==0"
|
|
|
|
class="el-icon-setting table-operation"
|
|
class="el-icon-setting table-operation"
|
|
style="color: #2db7f5;"
|
|
style="color: #2db7f5;"
|
|
@click="addParWin(row)"
|
|
@click="addParWin(row)"
|
|
@@ -148,7 +147,6 @@
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
<el-tooltip class="item" :content='$t("common.delete")' effect="dark" placement="top-start">
|
|
<el-tooltip class="item" :content='$t("common.delete")' effect="dark" placement="top-start">
|
|
<i
|
|
<i
|
|
- v-if="row.cutterNo==0"
|
|
|
|
class="el-icon-delete table-operation"
|
|
class="el-icon-delete table-operation"
|
|
style="color: #f50;"
|
|
style="color: #f50;"
|
|
@click="singleDelete(row)"
|
|
@click="singleDelete(row)"
|
|
@@ -196,7 +194,7 @@
|
|
import machineCustomizeCuttingToolMgrApi from "@/api/prepareProductMgr/machineCustomizeCuttingTool"
|
|
import machineCustomizeCuttingToolMgrApi from "@/api/prepareProductMgr/machineCustomizeCuttingTool"
|
|
import customizeCuttingToolMgrApi from "@/api/prepareProductMgr/customizeCuttingTool"
|
|
import customizeCuttingToolMgrApi from "@/api/prepareProductMgr/customizeCuttingTool"
|
|
import elDragDialog from '@/directive/el-drag-dialog'
|
|
import elDragDialog from '@/directive/el-drag-dialog'
|
|
- import { initDicts,initQueryParams } from '@/utils/commons'
|
|
|
|
|
|
+ import { initDicts,initDicts2,initQueryParams } from '@/utils/commons'
|
|
export default {
|
|
export default {
|
|
name: "CustomizeCuttingTool",
|
|
name: "CustomizeCuttingTool",
|
|
directives: { elDragDialog },
|
|
directives: { elDragDialog },
|
|
@@ -233,11 +231,11 @@
|
|
},
|
|
},
|
|
// 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
|
|
// 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
|
|
created() {
|
|
created() {
|
|
- // 加载【字典】
|
|
|
|
- initDicts(['CUTTING_TOOL_TYPE','CUTTING_TOOL_CATEGORY'], this.dicts);
|
|
|
|
|
|
+ // 加载【字典】
|
|
|
|
+ initDicts2(['CUTTING_TOOL_TYPE','CUTTING_TOOL_CATEGORY'], this.dicts);
|
|
// 加载列表数据
|
|
// 加载列表数据
|
|
this.fetch()
|
|
this.fetch()
|
|
- this.device()
|
|
|
|
|
|
+ this.device()
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
cuttingToolTypeList() {
|
|
cuttingToolTypeList() {
|
|
@@ -277,6 +275,12 @@
|
|
this.search()
|
|
this.search()
|
|
},
|
|
},
|
|
add () {
|
|
add () {
|
|
|
|
+ if(this.dicts.CUTTING_TOOL_TYPE[0].code != ""){
|
|
|
|
+ // 添加表头
|
|
|
|
+ const newItem = { code: '刀具类型', name: '对刀仪类型' , describe:'机床类型',disabled: true}
|
|
|
|
+ this.dicts.CUTTING_TOOL_TYPE.unshift(newItem);
|
|
|
|
+ }
|
|
|
|
+
|
|
this.$refs.edit.type = "add"
|
|
this.$refs.edit.type = "add"
|
|
this.$refs.edit.setCustomizeCuttingTool(false, this.dicts)
|
|
this.$refs.edit.setCustomizeCuttingTool(false, this.dicts)
|
|
this.dialog.title = this.$t("common.add")
|
|
this.dialog.title = this.$t("common.add")
|
|
@@ -346,13 +350,24 @@
|
|
},
|
|
},
|
|
edit (row) {
|
|
edit (row) {
|
|
//查询刀具可执行设备
|
|
//查询刀具可执行设备
|
|
-
|
|
|
|
|
|
+ if(this.dicts.CUTTING_TOOL_TYPE[0].code != "对刀仪类型"){
|
|
|
|
+ // 添加表头
|
|
|
|
+ const newItem = { code: '对刀仪类型', name: '刀具类型' , describe:'机床类型',disabled: true}
|
|
|
|
+ this.dicts.CUTTING_TOOL_TYPE.unshift(newItem);
|
|
|
|
+ }
|
|
|
|
+
|
|
this.$refs.edit.setCustomizeCuttingTool(row, this.dicts)
|
|
this.$refs.edit.setCustomizeCuttingTool(row, this.dicts)
|
|
this.$refs.edit.type = "edit"
|
|
this.$refs.edit.type = "edit"
|
|
this.dialog.title = this.$t("common.edit")
|
|
this.dialog.title = this.$t("common.edit")
|
|
this.dialog.isVisible = true
|
|
this.dialog.isVisible = true
|
|
},
|
|
},
|
|
addParWin (row) {
|
|
addParWin (row) {
|
|
|
|
+ if(this.dicts.CUTTING_TOOL_TYPE[0].code != "对刀仪类型"){
|
|
|
|
+ // 添加表头
|
|
|
|
+ const newItem = { code: '对刀仪类型', name: '刀具类型' , describe:'机床类型',disabled: true}
|
|
|
|
+ this.dicts.CUTTING_TOOL_TYPE.unshift(newItem);
|
|
|
|
+ }
|
|
|
|
+
|
|
// this.$refs.addPar.setCustomizeCuttingTool(row, this.dicts)
|
|
// this.$refs.addPar.setCustomizeCuttingTool(row, this.dicts)
|
|
//this.$refs.addPar.type = "edit"
|
|
//this.$refs.addPar.type = "edit"
|
|
this.$refs.addPar.setCustomizeCuttingTool(row, this.dicts)
|
|
this.$refs.addPar.setCustomizeCuttingTool(row, this.dicts)
|