Browse Source

私有wbs修改

duy 9 tháng trước cách đây
mục cha
commit
48b5125799
2 tập tin đã thay đổi với 23 bổ sung11 xóa
  1. 22 10
      src/views/desk/wbs/create-new-excel.vue
  2. 1 1
      src/views/project/list/wbs-tree.vue

+ 22 - 10
src/views/desk/wbs/create-new-excel.vue

@@ -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 = [

+ 1 - 1
src/views/project/list/wbs-tree.vue

@@ -1186,7 +1186,7 @@ const tableId = ref("");
 const handleEdit = (row) => {
     isCreateShow.value = true;
     modalTitle.value = row.tableName + "元素编辑";
-    tableId.value = row.id;
+    tableId.value = row.pkeyId;
     initTableName.value = row.initTableName;
     initTableId.value = row.initTableId;
     eKey.value = row.ekey;