wangting
2025-01-14 59ff9baa407775998954f271f7ed2cde8db01a26
查询模板下拉框数据联动,排序列表与创建表单排序字段数据联动
已修改5个文件
144 ■■■■ 文件已修改
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue 103 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue
@@ -1,6 +1,6 @@
<template>
  <!--动态模板-->
  <avue-form ref="form" :option="option" v-model="form" v-loading="loading">
  <avue-form ref="basicform" :option="option" v-model="form" v-loading="loading">
    <template v-for="item in allColumn" :slot="item.prop+ ''">
      <vciWebRefer
        v-if="item.type === 'refer'"
@@ -326,7 +326,7 @@
    // 表单校验
    validate(done) {
      return new Promise((resolve) => {
        this.$refs.form.validate((valid,fields) => {
        this.$refs.basicform.validate((valid,fields) => {
          done(valid,fields);
          if (valid) {
            resolve(true);
@@ -339,19 +339,19 @@
      });
    },
    resetFields(){
      this.$refs.form.resetFields()
      this.$refs.basicform.resetFields()
    },
    clearValidate(props){
      this.$refs.form.clearValidate(props)
      this.$refs.basicform.clearValidate(props)
    },
    updateDic(prop,data){
      this.$refs.form.updateDic(prop,data)
      this.$refs.basicform.updateDic(prop,data)
    },
    dicInit(){
      this.$refs.form.dicInit()
      this.$refs.basicform.dicInit()
    },
    getPropRef(){
      this.$refs.form.getPropRef()
      this.$refs.basicform.getPropRef()
    }
  },
};
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue
@@ -365,7 +365,7 @@
      this.orderFieldList.unshift({
        id: data.row.orderField
      });
      this.tableFormOption.column[0].dicData = this.orderFieldList
      this.$refs.tableForm.updateDic('orderField',this.orderFieldList);
    },
    //获取排序设置中所有排序字段
    getAllAttr() {
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() {
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue
@@ -49,11 +49,11 @@
                 @node-click="nodeClick"></avue-tree>
    </div>
    <div v-if="!readOnly" style="text-align: right;margin-top: 10px;">
      <el-button v-if="radioForm==1" plain size="mini" type="primary" @click="addHandler">增加逻辑</el-button>
      <el-button v-if="radioForm==1" plain size="mini" type="primary" @click="editHandler">修改条件</el-button>
      <el-button v-if="radioForm==1" plain size="mini" type="primary" @click="delHandler">删除</el-button>
      <el-button v-show="radioForm==1" plain size="mini" type="primary" @click="addHandler">增加逻辑</el-button>
      <el-button v-show="radioForm==1" plain size="mini" type="primary" @click="editHandler">修改条件</el-button>
      <el-button v-show="radioForm==1" plain size="mini" type="primary" @click="delHandler">删除</el-button>
      <el-button plain size="mini" type="primary" @click="queryHandler">查询</el-button>
      <el-button plain size="mini" type="primary" @click="">取消</el-button>
      <!--<el-button plain size="mini" type="primary" @click="">取消</el-button>-->
    </div>
    <!--修改条件-->
@@ -155,7 +155,6 @@
<script>
import basicOption from "@/util/basic-option";
import {getAllQTs} from "@/api/queryTemplate/queryDefine";
import {getCriteria} from "@/api/queryTemplate/linkTypeQuery";
import {dateFormat} from "@/util/date"
export default {
@@ -506,7 +505,9 @@
    }
  },
  created() {
    this.getTemp();
    if (!this.readOnly) {
      this.getTemp();
    }
  },
  methods: {
    // 拖拽到时
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue
@@ -141,7 +141,11 @@
          prop: 'btmType',
          width: 130,
          formatter:function (row, value) {
            return row.queryTemplate.btmType;
            if (row.queryTemplate.btmType == '*') {
              return '所有类型'
            } else {
              return row.queryTemplate.btmType;
            }
          }
        }, {
          label: '版本版次',
@@ -164,7 +168,11 @@
          prop: 'queryISLeaf',
          width: 120,
          formatter:function (row, value) {
            return row.queryTemplate.queryISLeaf
            if(row.queryTemplate.queryISLeaf=='false' || row.queryTemplate.queryISLeaf==false){
              return '否'
            }else{
              return '是'
            }
          }
        }, {
          label: '子节点层次数',