wangting
2025-01-14 59ff9baa407775998954f271f7ed2cde8db01a26
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue
@@ -143,7 +143,16 @@
        }, {
          label: '反向',
          value: 'opposite'
        }]
        }],
        control: (val, form) => {
          const dicData=this.getDicData(val);
          this.form.btmType=dicData[0].value
          return {
            btmType: {
              dicData: dicData
            }
          };
        }
      },{
        label: '业务类型',
        prop: 'btmType',
@@ -155,7 +164,14 @@
          message: "请选择业务类型",
          trigger: "blur"
        }],
        dicData: []
        dicData: [],
        change: ({ value, column, item, dic }) => {
          this.form.btmType=value;
          if(value){
            this.getAllAttr();
            this.getTemp(value,false);
          }
        },
      }, {
        label: '版本版次',
        prop: 'version',
@@ -315,54 +331,7 @@
    };
  },
  watch: {
    //方向
    'form.direction': {
      handler(val) {
        if(val=='positive'){
          //正向
          const dicData=this.treeData.btmItemsTo.map(item=>{
            return {
              label: item,
              value: item
            }
          })
          dicData.push({
            label: '所有类型',
            value: '*'
          })
          this.$refs.form.updateDic('btmType', dicData);
          this.form.btmType=dicData[0].value
          this.getAllAttr();
        }else if(val=='opposite'){
          //反向
          const dicData=this.treeData.btmItemsFrom.map(item=>{
            return {
              label: item,
              value: item
            }
          })
          dicData.push({
            label: '所有类型',
            value: '*'
          })
          this.$refs.form.updateDic('btmType', dicData);
          this.form.btmType=dicData[0].value
          this.getAllAttr();
        }
      },
      immediate: true,
    },
    //业务类型
    'form.btmType': {
      handler(val) {
        if(val && val!='*'){
          this.getTemp(val,false);
        }
      },
      immediate: true,
    }
  },
  watch: {},
  methods: {
    openDialog(btmName, title, mode, data) {
      this.dialog.title = title;
@@ -384,6 +353,9 @@
        this.queryCondition=this.selectData.queryTemplate.condition;
        this.queryTree=this.selectData.tree;
        this.form.levelFlag=this.selectData.levelFlag;
        const dicData=this.getDicData(this.form.direction);
        this.formItems[2].dicData=dicData;
      } else {
        this.form.direction='positive';
        this.selectData = {};
@@ -393,10 +365,39 @@
          connector:'并且',
          child:[]
        };
        const dicData=this.getDicData(this.form.direction);
        this.formItems[2].dicData=dicData;
        this.form.btmType=dicData[0].value;
      }
      this.dialog.showDialog = true;
      this.treeOption.defaultExpandedKeys=[data.treeData.label]
      this.getTemp(data.treeData.label, true)
    },
    //获取业务类型下拉数据
    getDicData(directionVal){
      let dicData=[];
      if(directionVal=='positive'){
        //正向
        dicData=this.treeData.btmItemsTo.map(item=>{
          return {
            label: item,
            value: item
          }
        })
      }else if(directionVal=='opposite'){
        //反向
        dicData=this.treeData.btmItemsFrom.map(item=>{
          return {
            label: item,
            value: item
          }
        })
      }
      dicData.push({
        label: '所有类型',
        value: '*'
      })
      return dicData;
    },
    cancelDialog() {
      this.dialog.loading = false;
@@ -497,7 +498,7 @@
      this.orderFieldList.unshift({
        id: data.row.orderField
      });
      this.tableFormOption.column[0].dicData= this.orderFieldList
      this.$refs.tableForm.updateDic('orderField',this.orderFieldList);
    },
    //获取排序设置中所有排序字段
    getAllAttr() {