lucw 7 miesięcy temu
rodzic
commit
773a31554b

+ 23 - 1
src/views/rulesManagement/releaseRules/components/permitAdd.vue

@@ -859,6 +859,25 @@
 
         data.details = info.produceTaskConfigRuleDetails;
 
+        // 处理详情的 公式 字段
+        data.details.forEach((item) => {
+          if (item.paramType == 9 && item.formula) {
+            // formula格式为[A][+][b][*][C] 拆分 -> ['A','+','b','*','C']
+            if (item.formula) {
+              const matches = item.formula.match(/\[([^\]]+)\]/g);
+              if (matches) {
+                this.$set(
+                  item,
+                  'formulaParts',
+                  matches.map((m) => m.slice(1, -1)).filter(Boolean)
+                );
+              }
+            } else {
+              this.$set(item, 'formulaParts', []);
+            }
+          }
+        });
+
         this.$util.assignObject(this.formData, data);
 
         this.$nextTick(() => {
@@ -1277,7 +1296,10 @@
           statisticsType:
             this.formData.classify == 10 ? this.statisticsType : null,
           // 公式
-          formula: ''
+          formula: '',
+          _paramSelect: null,
+          _opSelect: null,
+          formulaParts: []
         });
         console.log('this.formData.details', this.formData.details);
       },

+ 2 - 2
vue.config.js

@@ -35,7 +35,7 @@ module.exports = {
         // target: 'http://192.168.1.105:18086',
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.1.176:18086',
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18186', // 测试环境
@@ -44,7 +44,7 @@ module.exports = {
         // target: 'http://192.168.1.251:18086',
 
         // target: 'http://192.168.1.251:18086', // 开发
-        // target: 'http://192.168.1.116:18086', // 赵沙金
+        target: 'http://192.168.1.116:18086', // 赵沙金
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {