|
@@ -15,6 +15,7 @@
|
|
|
@size-change="dataList"
|
|
|
@current-change="dataList"
|
|
|
@selection-change="selectionChange"
|
|
|
+ :before-open="beforeOpenDialog"
|
|
|
>
|
|
|
<template #menu-left="{ size }">
|
|
|
<el-button
|
|
@@ -26,6 +27,27 @@
|
|
|
>删除</el-button
|
|
|
>
|
|
|
</template>
|
|
|
+
|
|
|
+ <template #customFieldName-form="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="customFieldNameValues"
|
|
|
+ multiple
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ :reserve-keyword="false"
|
|
|
+ placeholder="请输入名称,按回车创建"
|
|
|
+ @change="customFieldChange"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in customFieldOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template #menu-right="{}">
|
|
|
<el-dropdown split-button
|
|
|
>导入
|
|
@@ -113,6 +135,29 @@ const switchOp = [
|
|
|
value: 1,
|
|
|
},
|
|
|
];
|
|
|
+
|
|
|
+// 自定义工序项目字段名称相关方法
|
|
|
+const customFieldNameValues = ref([]);
|
|
|
+const customFieldOptions = [];
|
|
|
+const customFieldChange = (val) => {
|
|
|
+ let result = Array.from(val);
|
|
|
+ result = result.map((item) => {
|
|
|
+ return {
|
|
|
+ value: item,
|
|
|
+ isSelected: true,
|
|
|
+ };
|
|
|
+ });
|
|
|
+
|
|
|
+ form.value.customFieldName = JSON.stringify(result);
|
|
|
+};
|
|
|
+const beforeOpenDialog = (done, type, loading) => {
|
|
|
+ customFieldOptions.value = JSON.parse(form.value.customFieldName);
|
|
|
+ customFieldNameValues.value = customFieldOptions.value.map(
|
|
|
+ (item) => item.value
|
|
|
+ );
|
|
|
+ done();
|
|
|
+};
|
|
|
+
|
|
|
option.value = Object.assign(option.value, {
|
|
|
selection: true,
|
|
|
labelWidth: 120,
|
|
@@ -289,6 +334,16 @@ option.value = Object.assign(option.value, {
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
+ label: "方法",
|
|
|
+ prop: "method",
|
|
|
+ span: 12,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "试验规程编号",
|
|
|
+ prop: "testPlanCode",
|
|
|
+ span: 12,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "是否可跳过",
|
|
|
prop: "skipped",
|
|
|
span: 8,
|
|
@@ -306,6 +361,14 @@ option.value = Object.assign(option.value, {
|
|
|
value: 0,
|
|
|
},
|
|
|
{
|
|
|
+ label: "是否特殊工序",
|
|
|
+ prop: "isSpecial",
|
|
|
+ span: 8,
|
|
|
+ type: "switch",
|
|
|
+ dicData: switchOp,
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "是否禁用",
|
|
|
prop: "enabled",
|
|
|
hide: true,
|
|
@@ -394,6 +457,30 @@ option.value = Object.assign(option.value, {
|
|
|
};
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ label: "是否自定义名称",
|
|
|
+ prop: "customEnable",
|
|
|
+ span: 8,
|
|
|
+ hide: true,
|
|
|
+ type: "switch",
|
|
|
+ dicData: switchOp,
|
|
|
+ value: 0,
|
|
|
+ //联动隐藏
|
|
|
+ control: (val, form) => {
|
|
|
+ return {
|
|
|
+ customFieldName: {
|
|
|
+ display: val == 1 ? true : false,
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "自定义工序项目字段名称",
|
|
|
+ prop: "customFieldName",
|
|
|
+ hide: true,
|
|
|
+ span: 24,
|
|
|
+ },
|
|
|
+
|
|
|
/*{
|
|
|
label: "是否委外",
|
|
|
prop: "outsourcing",
|