|
@@ -92,7 +92,11 @@
|
|
|
</template>
|
|
|
|
|
|
<template #extra>
|
|
|
- <el-button size="small" type="success" @click="addRowClick"
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="success"
|
|
|
+ @click="addRowClick"
|
|
|
+ v-if="type != 0"
|
|
|
>新增</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -366,15 +370,23 @@ watch(
|
|
|
|
|
|
if (val) {
|
|
|
getEditEleList();
|
|
|
- tableColumn.value = [
|
|
|
- { key: "eName", name: "元素名称", width: 150 },
|
|
|
- { key: "eType", name: "数据类型", width: 120 },
|
|
|
- { key: "eLength", name: "长度" },
|
|
|
- { key: "eAllowDeviation", name: "允许偏差值", width: 180 },
|
|
|
- { key: "eInspectionMethod", name: "检查方法和频率" },
|
|
|
- { key: "dynamicDict", name: "动态字典" },
|
|
|
- { key: "action", name: "操作", width: 80, align: "center" },
|
|
|
- ];
|
|
|
+ if (type.value === 0) {
|
|
|
+ tableColumn.value = [
|
|
|
+ { key: "eName", name: "元素名称", width: 150 },
|
|
|
+
|
|
|
+ { key: "dynamicDict", name: "动态字典" },
|
|
|
+ ];
|
|
|
+ } else {
|
|
|
+ tableColumn.value = [
|
|
|
+ { key: "eName", name: "元素名称", width: 150 },
|
|
|
+ { key: "eType", name: "数据类型", width: 120 },
|
|
|
+ { key: "eLength", name: "长度" },
|
|
|
+ { key: "eAllowDeviation", name: "允许偏差值", width: 180 },
|
|
|
+ { key: "eInspectionMethod", name: "检查方法和频率" },
|
|
|
+ { key: "dynamicDict", name: "动态字典" },
|
|
|
+ { key: "action", name: "操作", width: 80, align: "center" },
|
|
|
+ ];
|
|
|
+ }
|
|
|
} else {
|
|
|
editEleList.value = [];
|
|
|
tableColumn.value = [
|