|
@@ -28,9 +28,17 @@
|
|
|
<template v-slot:workshop="{ row }">
|
|
<template v-slot:workshop="{ row }">
|
|
|
{{ showWorkshop(row) }}
|
|
{{ showWorkshop(row) }}
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <template v-slot:parent="{ row }">
|
|
|
|
|
+ {{ showgfactory(row, 2) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
<template v-slot:factory="{ row }">
|
|
<template v-slot:factory="{ row }">
|
|
|
- {{ showgfactory(row) }}
|
|
|
|
|
|
|
+ {{ showgfactory(row, 1) }}
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<template v-slot:enabled="{ row }">
|
|
<template v-slot:enabled="{ row }">
|
|
|
{{ dict.enabled[row.enabled] }}
|
|
{{ dict.enabled[row.enabled] }}
|
|
|
</template>
|
|
</template>
|
|
@@ -98,6 +106,12 @@ export default {
|
|
|
prop: 'extInfo.factoryId',
|
|
prop: 'extInfo.factoryId',
|
|
|
slot: 'factory'
|
|
slot: 'factory'
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '工厂编码',
|
|
|
|
|
+ prop: 'parentCode',
|
|
|
|
|
+ slot: 'parent'
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
label: '所属车间',
|
|
label: '所属车间',
|
|
|
prop: 'parentId',
|
|
prop: 'parentId',
|
|
@@ -170,15 +184,18 @@ export default {
|
|
|
this.dict.groupId = list;
|
|
this.dict.groupId = list;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- // 回显工厂名称
|
|
|
|
|
- showgfactory(row) {
|
|
|
|
|
- let result = row.parent.find((n) => n.id == row.extInfo.factoryId);
|
|
|
|
|
- if (result) {
|
|
|
|
|
- return result.name;
|
|
|
|
|
- } else {
|
|
|
|
|
- return '';
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // 回显工厂名称
|
|
|
|
|
+ showgfactory (row, type) {
|
|
|
|
|
+ let result = row.parent.find((n) => n.id == row.parentId);
|
|
|
|
|
+ if (result && type == 1) {
|
|
|
|
|
+ return result.name;
|
|
|
|
|
+ } else if(result && type == 2) {
|
|
|
|
|
+ return result.code;
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ return '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
// 回显车间
|
|
// 回显车间
|
|
|
showWorkshop(row) {
|
|
showWorkshop(row) {
|
|
|
let result = row.parent.find((n) => n.id == row.parentId);
|
|
let result = row.parent.find((n) => n.id == row.parentId);
|