ludc
2023-09-04 8af9599937d281a4dffcc4ac7cda1b81b4b8d6a7
Source/UBCS-WEB/src/views/docking/infoForm.vue
@@ -92,7 +92,7 @@
                  field: 'sourceSystemOid',
                  fieldMap:{'sourceSystemId':'id'},
                  placeholder: '请选择',
                  options: {isMuti: false, type: 'default', url: 'api/ubcs-code/dockingManagement/gridDockingSystem'},
                  options: {isMuti: false, type: 'default', url: referUrl},
                }"
              :value="formData.sourceSystemOid"
              :text="formData.sourceSystemName"
@@ -203,7 +203,6 @@
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitAttribute">确定</el-button>
        <el-button @click="cancelSubmit">取消</el-button>
      </div>
    </el-dialog>
@@ -386,16 +385,52 @@
          // 选定行
          selectRow: ''
        },
        dictEnums: []
        dictEnums: [],
      }
    }
  },
  watch:{
    formData:{
      handler(newval,oldval){
        console.log('newval',newval.dataFlowTypeText)
    formData: {
      handler(newval, oldval) {
        // console.log(newval)
        if (newval && newval.type === 'edit') {
          if (this.formData.dataFlowType == 'accept') {
            this.pushTypeList = [
              { value: '3', label: '编码申请' },
              { value: '4', label: '编码更改(状态、回收)' },
              { value: '5', label: '分类查询' },
              { value: '6', label: '含规则信息的分类查询' },
              { value: '7', label: '数据查询' }
            ];
            this.$nextTick(() => {
              // this.formData.pushType = '';
              this.formData.targetSystemName = '编码系统';
              this.formData.targetSystemOid = 'code00000001';
              this.formData.targetSystemId = 'CODE';
              // this.formData.sourceSystemName = '';
              // this.formData.sourceSystemOid = '';
              // this.formData.sourceSystemId = '';
            });
          } else {
            this.pushTypeList = [
              { value: '1', label: '数据推送' },
              { value: '2', label: '分类推送' }
            ];
            this.$nextTick(() => {
              this.formData.pushType = '1';
              this.formData.sourceSystemName = '编码系统';
              this.formData.sourceSystemOid = 'code00000001';
              this.formData.sourceSystemId = 'CODE';
              // this.formData.targetSystemName = '';
              // this.formData.targetSystemOid = '';
              // this.formData.targetSystemId = '';
            });
          }
        }
      }
    }
    },
  },
  created() {
    //this.geDictData('interfaceType', this.interfaceTypeList)
@@ -414,7 +449,7 @@
        {value: '5', label: '分类查询'},
        {value: '6', label: '含规则信息的分类查询'},
        {value: '7', label: '数据查询'}]
      this.formData.pushType=''
      // this.formData.pushType=''
      this.formData.targetSystemName='编码系统';
      this.formData.targetSystemOid='code00000001';
      this.formData.targetSystemId='CODE';
@@ -436,15 +471,14 @@
  },
  methods: {
    closeSubmitDialog() {
      this.resetForm();
      // this.resetForm();
      this.showSubmitDialog = false;
    },
    resetForm() {
      this.formData={}
      // this.formData = {
      //   sysIntParamVOs: [],
      //   sysIntHeaderVOs: []
      // };
      this.formData = {
        sysIntParamVOs: [],
        sysIntHeaderVOs: []
      };
      this.$refs.form.resetFields();
    },
    setReferValue(data) {
@@ -490,7 +524,6 @@
      }
    },
    submitAttribute() {
      console.log()
      const that = this;
      let pass=true
      if(this.formData.dataFlowType=='push' && (validatenull(this.formData.classifyName)||validatenull(this.formData.targetSystemName))){
@@ -525,7 +558,7 @@
          })
          const apiCall = that.formData.type == 'edit' ? edit : add;
          const Message = that.formData.type == 'edit' ? "修改成功" : "保存成功";
          console.log( that.formData)
          // console.log( that.formData)
          apiCall(that.formData).then(res => {
            that.$message.success(Message);
            that.showSubmitDialog = false;