瀏覽代碼

fix: 修复参数绑定及清理逻辑中的引用错误

修正了处理 substanceName 类型时引用了错误的表单数据对象,将 formData 修改为 add 以确保数据正确。
将 clear
yusheng 1 月之前
父節點
當前提交
2244b68242
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/views/recordComponents/programRulesDialog.vue

+ 4 - 4
src/views/recordComponents/programRulesDialog.vue

@@ -1307,9 +1307,9 @@
         this.currentIndex = index;
         if (type=='substanceName') {
           this.$refs.bindSubstanceRef.open(
-            this.formData.deviceId,
-            this.formData.deviceName,
-            this.formData.deviceCode
+            this.addForm.deviceId,
+            this.addForm.deviceName,
+            this.addForm.deviceCode
           );
         } else {
           this.$refs.toolModalRef.open(row.toolCodes);
@@ -1375,7 +1375,7 @@
       clearTool(row, index) {
        if (type=='substanceName') {
           substanceKey.forEach((key) => {
-            this.$set(this.formData.details[index], key, '');
+            this.$set(this.addForm.details[index], key, '');
           });
         } else {
           row.tools = [];