Browse Source

工序beforeOpenDialog添加type逻辑。

jiaxiaoqiang 8 months ago
parent
commit
1805e6154b
1 changed files with 7 additions and 4 deletions
  1. 7 4
      src/views/base/craftManagement/process/index.vue

+ 7 - 4
src/views/base/craftManagement/process/index.vue

@@ -151,10 +151,13 @@ const customFieldChange = (val) => {
   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
-  );
+  if (type === "edit") {
+    customFieldOptions.value = JSON.parse(form.value.customFieldName);
+    customFieldNameValues.value = customFieldOptions.value.map(
+      (item) => item.value
+    );
+  }
+
   done();
 };