Ver Fonte

执行方式管理页面完成,记录规则执行方式修改

lucw há 7 meses atrás
pai
commit
c1b96994bc

+ 7 - 0
src/components/selectReleaseRules/select-release-rules.vue

@@ -106,6 +106,13 @@
               return this.getDictValue('记录规则报工类型', row.reportWorkType);
             }
           },
+          {
+            prop: 'executeMethodName',
+            label: '执行方式',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
           {
             prop: 'version',
             label: '版本号',

+ 2 - 2
src/store/getters.js

@@ -20,7 +20,7 @@ export default {
       return item.dictCode == dictCode;
     });
 
-    if (!obj) {
+    if (!state.dict[dictEnum[enumName]]) {
       // 提交dict模块下的actions的requestDict
       store.dispatch('dict/requestDict', enumName);
       return '';
@@ -32,7 +32,7 @@ export default {
   getDictListByName: (sate) => (enumName) => {
     const dList = sate.dict[dictEnum[enumName]] || [];
 
-    if (!dList.length) {
+    if (!sate.dict[dictEnum[enumName]]) {
       // 提交dict模块下的actions的requestDict
       store.dispatch('dict/requestDict', enumName);
       return '';

+ 94 - 276
src/views/rulesManagement/releaseRules/components/permitAdd.vue

@@ -142,7 +142,7 @@
           <el-form-item label="是否有执行方式" label-width="130px">
             <el-radio-group
               v-model="formData.isExecuteMethod"
-              @change="executeMethodChange"
+              @change="isExecuteMethodChange"
             >
               <el-radio :label="1">是</el-radio>
               <el-radio :label="0">否</el-radio>
@@ -150,6 +150,30 @@
           </el-form-item>
         </el-col>
       </el-row>
+      <el-row
+        v-if="formData.isExecuteMethod == 1 && formData.reportWorkType == 2"
+        style="margin-bottom: 15px"
+      >
+        <el-col v-if="formData.isExecuteMethod == 1" :span="8">
+          <el-form-item label="执行方式" required prop="executeMethodId">
+            <el-select
+              v-model="formData.executeMethodId"
+              filterable
+              placeholder="请选择"
+              style="width: 100%"
+              @change="executeMethodIdChange"
+            >
+              <el-option
+                v-for="item in executeMethodList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
       <el-row style="margin-bottom: 15px">
         <el-col :span="24">
           <el-form-item label="周期" prop="frequencyValue" required>
@@ -163,36 +187,12 @@
         </el-col>
       </el-row>
 
-      <header-title title="规则明细">
-        <el-button
-          v-if="formData.isExecuteMethod"
-          type="primary"
-          @click="addExecuteMethod"
-          >添加执行方式</el-button
-        >
-      </header-title>
-
-      <el-tabs
-        v-if="formData.isExecuteMethod"
-        v-model="formData.executeMethodTitle"
-        type="card"
-        closable
-        @tab-remove="deleteExecuteMethod"
-      >
-        <el-tab-pane
-          :key="item"
-          v-for="item in formData.executeMethodList"
-          :label="item"
-          :name="item"
-        >
-          {{ item.content }}
-        </el-tab-pane>
-      </el-tabs>
+      <header-title title="规则明细"> </header-title>
 
       <ele-pro-table
         ref="table"
         :columns="bankColumns"
-        :datasource="detailsList"
+        :datasource="formData.details"
         :need-page="false"
         row-key="id"
         class="table_list"
@@ -208,15 +208,6 @@
             >
               新建
             </el-button>
-
-            <el-form-item
-              v-if="formData.isExecuteMethod"
-              label="编辑执行方式:"
-              label-width="110px"
-              style="margin-bottom: 0"
-            >
-              <el-input type="text" v-model="executeMethodTitleComputed" />
-            </el-form-item>
           </div>
         </template>
 
@@ -373,18 +364,6 @@
           ></el-input>
         </template>
 
-        <template v-slot:executeMethodTitle="{ row }">
-          <!-- <el-select v-model="row.executeMethodTitle" clearable size="mini">
-            <el-option
-              v-for="item in formData.executeMethodList"
-              :key="item"
-              :label="item"
-              :value="item"
-            ></el-option>
-          </el-select> -->
-          {{ row.executeMethodTitle }}
-        </template>
-
         <template v-slot:action="{ row }">
           <el-link
             v-if="type != 'detail'"
@@ -471,7 +450,7 @@
   import { getTreeByPid } from '@/api/classifyManage';
   import processModal from './processModal.vue';
   import ProductModalCorrelation from './ProductModal.vue';
-  import productionAPI from '@/api/technology/production/index.js';
+  import { recordrulesexecutemethodPage } from '@/api/recordrulesexecutemethod/index';
 
   export default {
     components: {
@@ -558,13 +537,6 @@
             slot: 'remark',
             minWidth: 110
           },
-          {
-            prop: 'executeMethodTitle',
-            label: '执行方式',
-            align: 'center',
-            slot: 'executeMethodTitle',
-            minWidth: 110
-          },
           {
             columnKey: 'action',
             label: '操作',
@@ -637,47 +609,6 @@
       },
       cacheKeyUrl() {
         return `main-permit-add-2510181429-reportWorkType`;
-      },
-      detailsList() {
-        if (this.formData.isExecuteMethod) {
-          return this.formData.details.filter(
-            (i) => i.executeMethodTitle == this.formData.executeMethodTitle
-          );
-        } else {
-          return this.formData.details;
-        }
-      },
-      executeMethodTitleComputed: {
-        get() {
-          return this.formData.executeMethodTitle;
-        },
-        set(value) {
-          // 更改 明细表的 executeMethodTitle
-          this.formData.details = this.formData.details.map((i) => {
-            if (i.executeMethodTitle == this.formData.executeMethodTitle) {
-              return {
-                ...i,
-                executeMethodTitle: value
-              };
-            }
-            return i;
-          });
-
-          this.formData.executeMethodList = this.formData.executeMethodList.map(
-            (i) => {
-              if (i == this.formData.executeMethodTitle) {
-                return value;
-              }
-              return i;
-            }
-          );
-
-          this.formData.executeMethodTitle = value;
-
-          if (!value) {
-            this.$message.warning('执行方式不能为空!');
-          }
-        }
       }
     },
     data() {
@@ -700,11 +631,9 @@
         reportWorkType: '1',
         // 执行方式
         isExecuteMethod: 0,
+        executeMethodId: null,
+        executeMethodName: '',
         produceTaskConfigs: [],
-        // 执行方式列表
-        executeMethodList: [],
-        // 执行方式 活跃项
-        executeMethodTitle: '',
         bigVersion: '',
         versionMark: '',
         smallVersion: '',
@@ -748,6 +677,10 @@
           reportWorkType: [
             { required: true, message: '请选择模块分类', trigger: 'change' },
             { required: true, message: '请选择模块分类', trigger: 'blur' }
+          ],
+          executeMethodId: [
+            { required: true, message: '请选择执行方式', trigger: 'change' },
+            { required: true, message: '请选择执行方式', trigger: 'blur' }
           ]
         },
         recordSheet: [], // 记录表
@@ -760,7 +693,9 @@
         // 产品分类
         productCategory: [],
         loading: false,
-        produceTaskCode: ''
+        produceTaskCode: '',
+        // 执行方式列表
+        executeMethodList: []
       };
     },
     mounted() {
@@ -806,25 +741,10 @@
         const data = await recordrulesGetById(row.rulesId);
 
         const info = JSON.parse(JSON.stringify(row));
-        data.executeMethodList = info.produceTaskConfigRuleDetails.map((i) => {
-          return i.executeMethodTitle;
-        });
-        // 去重
-        data.executeMethodList = [...new Set(data.executeMethodList)].filter(
-          (i) => i
-        );
 
         data.details = info.produceTaskConfigRuleDetails;
-        if (data.executeMethodList.length) {
-          data.executeMethodTitle = data.executeMethodList[0] || '';
-        } else {
-          data.executeMethodTitle = '';
-        }
 
         this.$util.assignObject(this.formData, data);
-        if (data.executeMethodList.length) {
-          this.formData.isExecuteMethod = 1;
-        }
 
         this.$nextTick(() => {
           this.$refs.cycleMultipleRef?.setRecordRulesCycleList(
@@ -832,11 +752,15 @@
           );
         });
 
+        this.formData.executeMethodId = info.recordRulesExecuteMethodId;
+        this.formData.executeMethodName = info.recordRulesExecuteMethodName;
         this.formData.startDate = new Date(info.startDate);
         this.formData.stopDate = new Date(info.stopDate);
         this.formData.classify = this.formData.classify + '';
         this.formData.reportWorkType = this.formData.reportWorkType + '';
 
+        this.getExecuteMethodList();
+
         this.loading = false;
       },
       async getDetils(id) {
@@ -844,19 +768,6 @@
         try {
           const data = await recordrulesGetById(id);
 
-          if (data.isExecuteMethod) {
-            data.executeMethodList = Object.keys(data.detailMap).map((i) => {
-              return i;
-            });
-
-            data.details = Object.values(data.detailMap).flat();
-            data.executeMethodTitle = data.executeMethodList[0] || '';
-          } else {
-            data.executeMethodList = [];
-            data.details = data.details || [];
-            data.executeMethodTitle = '';
-          }
-
           this.$util.assignObject(this.formData, data);
 
           this.$nextTick(() => {
@@ -880,8 +791,12 @@
             this.formData.id = null;
             this.formData.produceTaskId = null;
             this.formData.produceTaskName = null;
+            this.formData.executeMethodId = null;
+            this.formData.executeMethodName = '';
           }
 
+          this.getExecuteMethodList();
+
           this.loading = false;
         } catch (error) {
           this.loading = false;
@@ -924,30 +839,6 @@
             return this.$message.warning('至少条件一条规则项');
           }
 
-          if (this.formData.isExecuteMethod) {
-            // 判断 formData.executeMethodList中的item 是否在details中有一条executeMethodTitle的数据
-
-            if (this.formData.executeMethodList.length == 0) {
-              return this.$message.warning(`请添加执行方式`);
-            }
-
-            for (const item of this.formData.executeMethodList) {
-              if (!item) {
-                return this.$message.warning(`执行方式不能为空!`);
-              }
-
-              const exists = this.formData.details.some(
-                (detail) => detail.executeMethodTitle === item
-              );
-              if (!exists) {
-                this.$message.warning(
-                  `请为执行方式 "${item}" 添加至少一条规则项`
-                );
-                return false;
-              }
-            }
-          }
-
           try {
             this.btnLoading = true;
 
@@ -984,30 +875,6 @@
             return this.$message.warning('至少条件一条规则项');
           }
 
-          if (this.formData.isExecuteMethod) {
-            // 判断 formData.executeMethodList中的item 是否在details中有一条executeMethodTitle的数据
-
-            if (this.formData.executeMethodList.length == 0) {
-              return this.$message.warning(`请添加执行方式`);
-            }
-
-            for (const item of this.formData.executeMethodList) {
-              if (!item) {
-                return this.$message.warning(`执行方式不能为空!`);
-              }
-
-              const exists = this.formData.details.some(
-                (detail) => detail.executeMethodTitle === item
-              );
-              if (!exists) {
-                this.$message.warning(
-                  `请为执行方式 "${item}" 添加至少一条规则项`
-                );
-                return false;
-              }
-            }
-          }
-
           // 判断参数类型是否选择
           for (const detail of this.formData.details) {
             if (!detail.paramType) {
@@ -1132,8 +999,7 @@
           tools: [],
           unitName: null,
           productName: '',
-          productCode: '',
-          executeMethodTitle: this.formData.executeMethodTitle
+          productCode: ''
         });
         console.log('this.formData.details', this.formData.details);
       },
@@ -1229,82 +1095,41 @@
         console.log('选择的工序', process);
         this.formData.produceTaskId = process.id;
         this.formData.produceTaskName = process.name;
-      },
-      // 添加执行方式
-      addExecuteMethod() {
-        this.$prompt('', '请输入执行方式', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          inputValidator(value) {
-            if (!value) {
-              return '执行方式不能为空!';
-            }
-            return true;
-          }
-        })
-          .then(({ value }) => {
-            console.log('value', value);
-            if (!value) {
-              return this.$message.warning('执行方式不能为空!');
-            }
-
-            if (this.formData.executeMethodList.includes(value)) {
-              return this.$message.warning('执行方式已存在!');
-            }
-            this.formData.executeMethodList.push(value);
-
-            if (this.formData.executeMethodList.length == 1) {
-              // 默认高亮
-              this.formData.executeMethodTitle = value;
-            }
-          })
-          .catch((err) => {
-            console.log('取消输入执行方式', err);
-          });
-      },
-      // 删除执行方式
-      deleteExecuteMethod(item) {
-        // 如果this.formData.details总包含item 则不能删除
-        const exists = this.formData.details.some(
-          (detail) => detail.executeMethodTitle === item
-        );
-        if (exists) {
-          return this.$message.warning(
-            `执行方式 "${item}" 已被规则项使用,不能删除`
-          );
-        }
-        this.formData.executeMethodList =
-          this.formData.executeMethodList.filter((i) => i != item);
-      },
-      // 是否有执行方式改变
-      executeMethodChange() {
-        if (!this.formData.isExecuteMethod) {
-          this.formData.details = this.formData.details.map((i) => {
-            return {
-              ...i,
-              executeMethodTitle: ''
-            };
-          });
-          this.formData.executeMethodList = [];
-        } else {
-          if (this.formData.executeMethodList.length == 0) {
-            // 添加一个默认执行方式
-            this.formData.executeMethodList.push('无执行方式');
-
-            this.formData.details = this.formData.details.map((i) => {
-              return {
-                ...i,
-                executeMethodTitle: '无执行方式'
-              };
-            });
-
-            this.formData.executeMethodTitle = '无执行方式';
-          }
-        }
+        this.formData.executeMethodId = null;
+        this.formData.executeMethodName = '';
+        // 查询工序下的执行方式
+        this.getExecuteMethodList();
       },
       clearProductTask() {
         this.formData.produceTaskId = '';
         this.formData.produceTaskName = '';
+        this.formData.executeMethodId = null;
+        this.formData.executeMethodName = '';
+        this.executeMethodList = [];
+      },
+      // 查询执行方式
+      async getExecuteMethodList() {
+        if (
+          this.formData.produceTaskId == '' &&
+          this.formData.reportWorkType == 2
+        ) {
+          this.executeMethodList = [];
+          return;
+        }
+        const data = await recordrulesexecutemethodPage({
+          pageNum: 1,
+          size: 9999,
+          enable: 1,
+          produceTaskId: this.formData.produceTaskId
+        });
+        this.executeMethodList = data.list;
+        // 有执行方式
+        if (
+          this.executeMethodList.length &&
+          this.formData.reportWorkType == 2
+        ) {
+          this.formData.isExecuteMethod = 1;
+        }
       },
       // 过程监测修改 保存
       processEditSave() {
@@ -1313,30 +1138,6 @@
           return this.$message.warning('至少条件一条规则项');
         }
 
-        if (this.formData.isExecuteMethod) {
-          // 判断 formData.executeMethodList中的item 是否在details中有一条executeMethodTitle的数据
-
-          if (this.formData.executeMethodList.length == 0) {
-            return this.$message.warning(`请添加执行方式`);
-          }
-
-          for (const item of this.formData.executeMethodList) {
-            if (!item) {
-              return this.$message.warning(`执行方式不能为空!`);
-            }
-
-            const exists = this.formData.details.some(
-              (detail) => detail.executeMethodTitle === item
-            );
-            if (!exists) {
-              this.$message.warning(
-                `请为执行方式 "${item}" 添加至少一条规则项`
-              );
-              return false;
-            }
-          }
-        }
-
         // 判断参数类型是否选择
         for (const detail of this.formData.details) {
           if (!detail.paramType) {
@@ -1346,6 +1147,23 @@
 
         this.$emit('processSave', this.formatBody());
         this.handleClose();
+      },
+      // 执行方式改变 同步执行方式名称
+      executeMethodIdChange() {
+        const selected = this.executeMethodList.find(
+          (item) => item.id === this.formData.executeMethodId
+        );
+        if (selected) {
+          this.formData.executeMethodName = selected.name;
+        } else {
+          this.formData.executeMethodName = '';
+        }
+      },
+      isExecuteMethodChange() {
+        if (this.formData.isExecuteMethod == 0) {
+          this.formData.executeMethodId = null;
+          this.formData.executeMethodName = '';
+        }
       }
     }
   };

+ 2 - 2
src/views/rulesManagement/releaseRules/components/processModal.vue

@@ -88,7 +88,7 @@
 
         // 如果多选,添加选择列
         if (this.multiple) {
-          arr.unshift({
+          arr.push({
             columnKey: 'selection',
             type: 'selection',
             width: 50,
@@ -97,7 +97,7 @@
             fixed: 'left'
           });
         } else {
-          arr.unshift({
+          arr.push({
             width: 50,
             align: 'center',
             fixed: 'left',

+ 1 - 0
src/views/technology/production/components/user-setting-matter-add.vue

@@ -23,6 +23,7 @@
           clearable
           v-model="formData.itemType"
           @change="itemTypeChange"
+          :isProhibit="type == 'edit'"
         >
         </DictSelection>
       </el-form-item>

+ 89 - 76
src/views/technology/production/components/user-setting-matter-process.vue

@@ -154,7 +154,7 @@
           },
           {
             prop: 'executeMethod',
-            label: '执行方式',
+            label: '配置执行方式',
             align: 'center',
             formatter: (row) => {
               return this.getDictValue('记录规则执行方式', row.executeMethod);
@@ -168,6 +168,19 @@
               return row.rulesName || row.itemTaskName;
             }
           },
+          {
+            prop: 'recordRulesClassify',
+            label: '记录规则类型',
+            align: 'center',
+            formatter: (row) => {
+              return this.getDictValue('记录规则类型', row.recordRulesClassify);
+            }
+          },
+          {
+            prop: 'recordRulesExecuteMethodName',
+            label: '记录执行方式',
+            align: 'center'
+          },
           {
             columnKey: 'action',
             label: '操作',
@@ -180,16 +193,10 @@
         deletedIds: [],
         updatePOs: [],
         butLoading: false,
-        relateProductMethod: null,
         params: {
           categoryLevels: [],
           products: []
         },
-        relateProductMethodOpeions: [
-          { label: '不关联', value: 0 },
-          { label: '关联分类', value: 1 },
-          { label: '关联产品', value: 2 }
-        ],
         // 产品分类
         productCategory: [],
         currentEditRow: null
@@ -207,51 +214,6 @@
         const list = this.dict['record_rules_report_work_type'] || [];
         // 只显示过程监测
         return list.filter((item) => item.dictCode + '' == '2');
-      },
-      productColumns() {
-        return [
-          {
-            columnKey: 'index',
-            type: 'index',
-            width: 45,
-            align: 'center',
-            reserveSelection: true
-          },
-          {
-            prop: 'code',
-            label: '产品编码'
-          },
-          {
-            prop: 'name',
-            label: '产品名称',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'brandNum',
-            label: '牌号'
-          },
-          {
-            prop: 'modelType',
-            label: '型号'
-          },
-          {
-            prop: 'measuringUnit',
-            label: '计量单位'
-          },
-          {
-            prop: 'packingUnit',
-            label: '包装单位'
-          },
-          {
-            columnKey: 'action',
-            label: '操作',
-            width: 110,
-            align: 'center',
-            resizable: false,
-            slot: 'action',
-            fixed: 'right'
-          }
-        ];
       }
     },
     created() {
@@ -275,14 +237,7 @@
           reportWorkType: this.reportWorkType
         });
         // 表格数据
-        this.matterList = list.map((i) => {
-          if (!i.produceTaskConfigRuleDetails.length) {
-            i.produceTaskConfigRuleDetails = Object.values(
-              i.produceTaskConfigRuleDetailMap
-            ).flat();
-          }
-          return i;
-        });
+        this.matterList = list;
         console.log('list', this.matterList);
       },
       // 删除事项
@@ -317,29 +272,52 @@
         console.log('matter', matter, rules);
 
         if (matter.itemType == '2') {
+          const any = this.matterList.some((i) => i.rulesId == matter.rulesId);
+
+          if (any) {
+            return this.$message.warning(
+              `“${matter.rulesName}”记录规则已存在,请勿重复添加`
+            );
+          }
+
+          // 是否存在记录规则
+          const ruleItem = this.matterList.find((i) => i.itemType == '2');
+
+          if (
+            ruleItem &&
+            ruleItem.recordRulesClassify != matter.recordRulesClassify
+          ) {
+            const ruleItemClassName = this.getDictValue(
+              '记录规则类型',
+              ruleItem.recordRulesClassify
+            );
+            return this.$message.warning(
+              `已存在“${ruleItemClassName}”记录规则分类,请勿添加不同规则分类`
+            );
+          }
+
           // 判断是否存在同一分类
-          const exists = this.matterList.some(
-            (item) => item.recordRulesClassify === matter.recordRulesClassify
-          );
+          const exists = this.matterList
+            .filter((i) => i.itemType == '2')
+            .some(
+              (item) =>
+                item.recordRulesClassify == matter.recordRulesClassify &&
+                item.recordRulesExecuteMethodId == rules.executeMethodId &&
+                rules.executeMethodId != null
+            );
+
           if (exists) {
             const className = this.getDictValue(
               '记录规则类型',
               matter.recordRulesClassify
             );
             return this.$message.warning(
-              `“${className}”分类规则已存在,请勿重复添加`
+              `已存在“${className}”记录规则分类“${rules.executeMethodName}”,请勿重复添加`
             );
           }
         }
 
-        // 处理detials
-        if (rules && rules.isExecuteMethod) {
-          matter.produceTaskConfigRuleDetails = Object.values(
-            rules.detailMap
-          ).flat();
-        } else {
-          matter.produceTaskConfigRuleDetails = rules?.details || [];
-        }
+        matter.produceTaskConfigRuleDetails = rules?.details || [];
 
         // 添加事项
         this.matterList.push({
@@ -347,20 +325,25 @@
           id: id,
           produceTaskId: this.produceTaskId,
           produceTaskName: this.produceTaskName,
-          reportWorkType: this.reportWorkType
+          reportWorkType: this.reportWorkType,
+          recordRulesExecuteMethodId: rules?.executeMethodId,
+          recordRulesExecuteMethodName: rules?.executeMethodName
         });
         this.addPOs.push({
           ...matter,
           id: id,
           produceTaskId: this.produceTaskId,
           produceTaskName: this.produceTaskName,
-          reportWorkType: this.reportWorkType
+          reportWorkType: this.reportWorkType,
+          recordRulesExecuteMethodId: rules?.executeMethodId,
+          recordRulesExecuteMethodName: rules?.executeMethodName
         });
         console.log('this.matterList', this.matterList);
         this.handleSort();
       },
-      editMatter(matter) {
+      editMatter(matter, rules) {
         console.log('matter', matter);
+
         // 编辑事项
         this.matterList = this.matterList.map((item) => {
           if (item.id === matter.id) {
@@ -481,6 +464,28 @@
       processSave(info) {
         console.log('info', info);
 
+        // 排除当前行 判断是否存在相同执行方式
+        const exists = this.matterList
+          .filter((i) => i.id !== this.currentEditRow.id)
+          .some(
+            (item) =>
+              item.recordRulesExecuteMethodId == info.executeMethodId &&
+              info.executeMethodId != null &&
+              item.recordRulesClassify ==
+                this.currentEditRow.recordRulesClassify
+          );
+
+        // 提示
+        if (exists) {
+          const className = this.getDictValue(
+            '记录规则类型',
+            this.currentEditRow.recordRulesClassify
+          );
+          return this.$message.warning(
+            `已存在“${className}”记录规则分类“${info.executeMethodName}”,请勿重复添加`
+          );
+        }
+
         info.details = info.details.map((i) => {
           if (!i.rulesId) {
             i.rulesId = this.currentEditRow.rulesId;
@@ -492,6 +497,8 @@
         this.matterList = this.matterList.map((item) => {
           if (item.id === this.currentEditRow.id) {
             item.produceTaskConfigRuleDetails = info.details;
+            item.recordRulesExecuteMethodId = info.executeMethodId;
+            item.recordRulesExecuteMethodName = info.executeMethodName;
           }
           return item;
         });
@@ -505,7 +512,9 @@
             // 不存在,加入updatePOs
             this.updatePOs.push({
               ...this.currentEditRow,
-              produceTaskConfigRuleDetails: info.details
+              produceTaskConfigRuleDetails: info.details,
+              recordRulesExecuteMethodId: info.executeMethodId,
+              recordRulesExecuteMethodName: info.executeMethodName
             });
           } else {
             // 存在,更新
@@ -513,6 +522,8 @@
             this.updatePOs = this.updatePOs.map((item) => {
               if (item.id === this.currentEditRow.id) {
                 item.produceTaskConfigRuleDetails = info.details;
+                item.recordRulesExecuteMethodId = info.executeMethodId;
+                item.recordRulesExecuteMethodName = info.executeMethodName;
               }
               return item;
             });
@@ -522,6 +533,8 @@
           this.addPOs = this.addPOs.map((item) => {
             if (item.id === this.currentEditRow.id) {
               item.produceTaskConfigRuleDetails = info.details;
+              item.recordRulesExecuteMethodId = info.executeMethodId;
+              item.recordRulesExecuteMethodName = info.executeMethodName;
             }
             return item;
           });

+ 1 - 1
src/views/technology/production/components/user-setting-matter.vue

@@ -127,7 +127,7 @@
           },
           {
             prop: 'executeMethod',
-            label: '执行方式',
+            label: '配置执行方式',
             align: 'center',
             formatter: (row) => {
               return this.getDictValue('记录规则执行方式', row.executeMethod);