licp
2024-04-24 18f93f25e8aea5eb0a35a5526fa8de7f4553b75f
src/views/technology/routing/routing-form.vue
@@ -1200,15 +1200,15 @@
                ...this.dataForm.operations.slice(obj.index - 1)
                ]
            }
            this.dataForm.operations.forEach((e, idx) => {
                e.index = idx + 1
                })
                this.$forceUpdate()
                this.$refs.operationTable.sort('index')
                Promise.all([this.save()]).then((res) => {
                    this.selectByIndex(obj.index)
                })
            })
        })
        this.dataForm.operations.forEach((e, idx) => {
            e.index = idx + 1
        })
        this.$forceUpdate()
        this.$refs.operationTable.sort('index')
        Promise.all([this.save()]).then((res) => {
            this.selectByIndex(obj.index)
        })
      }else{
        operation.operationName = operation.name
        operation.operationId = operation.id
@@ -1429,18 +1429,15 @@
    },
    // 保存所有参数的修改
    saveAllParamChange() {
      const paramJson = { routingOperationParam: this.paramData }
      let num = 0
      this.paramData.forEach(e=>{
        var regex=/^[^\(\)|^,]+$/;
        if(!regex.test(e.paramValue)){
            num+=1
        if(e.paramValue!=null){
        e.paramValue=e.paramValue.replace(',',',').replace('(','(').replace(')',')')
          if (!isNaN(e.paramValue)) {
            e.paramValue='='+e.paramValue
          }
        }
      })
      if(num>0){
        this.$message.error("参数值不能包含英文括号或逗号,请检查")
        return
      }
      const paramJson = { routingOperationParam: this.paramData }
      putRoutingTemplateParam(paramJson).then((response) => {
        const data = response.data
        if (data.code == 0) {