qinzhipeng_v 5 年之前
父节点
当前提交
4d665a8783
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      src/views/mock/httprule.vue

+ 6 - 5
src/views/mock/httprule.vue

@@ -246,7 +246,7 @@ export default {
       dialogStatus: '',
       textMap: {
         update: '编辑',
-        create: '新增规则'
+        create: '新增'
       },
       desc: true,
       dataFrom: {}
@@ -410,6 +410,7 @@ export default {
       this.showSubmit = true
       this.ruleForm = {}
       this.$set(this.ruleForm, 'whenScript', 'any')
+      this.$set(this.ruleForm, 'expression1', 'any')
       this.$set(this.ruleForm, 'execSort', '1')
       this.$set(this.ruleForm, 'returnMessage', '')
 
@@ -509,10 +510,10 @@ export default {
           this.isNotAnyRequest = true
           this.showguiz = false
           for (var a of this.ruleForm.metaRuleList) {
-            this.ruleForm.expression1 = a.expression.split('.')[0]
-            this.ruleForm.expression2 = a.expression.split('.')[1]
-            this.ruleForm.judgeType = a.judgeType
-            this.ruleForm.judgeValue = a.judgeValue
+            this.$set(this.ruleForm, 'expression1', a.expression.split('.')[0])
+            this.$set(this.ruleForm, 'expression2', a.expression.split('.')[1])
+            this.$set(this.ruleForm, 'judgeType', a.judgeType)
+            this.$set(this.ruleForm, 'judgeValue', a.judgeValue)
           }
         }
         this.dialogStatus = 'create'