wangting
2024-11-27 3b3fd904b9b34e77445d749bca8c28beadcaf3db
查询模板查询条件显示
已修改6个文件
138 ■■■■ 文件已修改
Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/dataView.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue 86 ●●●●● 补丁 | 查看 | 原始文档 | 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 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/dataView.vue
@@ -1,13 +1,15 @@
<template>
  <div style="padding: 10px 0">
    <el-tabs tab-position="left" style="height: 100%;">
    <el-tabs tab-position="left" :style="'height: '+height+';'">
      <el-tab-pane label="主体">
        <fieldset>
          <legend>&nbsp;主题&nbsp;</legend>
          <div>
            查询模板定义
            <avue-select @change="linkQueryDefineChange" class="el-input--small" v-model="linkQueryDefineForm" placeholder="请选择内容" type="tree" :dic="linkQueryDefineDic" style="width:240px"></avue-select>
            <div v-if="!readOnly">
              <el-button plain size="mini" type="primary" @click="userHandler">选中用户</el-button>
              <el-button plain size="mini" type="primary" @click="roleHandler">选择角色</el-button>
              <el-button plain size="mini" type="primary" @click="deptHandler">选择用户组</el-button>
            </div>
          </div>
        </fieldset>
      </el-tab-pane>
@@ -21,7 +23,13 @@
export default {
  name: "dataView",
  props: {
    selectData: {
    //选中的业务类型节点
    btmNode: {
      type: Object,
      default: {}
    },
    //选中行数据
    data: {
      type: Object,
      default: {}
    },
@@ -29,21 +37,19 @@
      type: Boolean,
      default: false
    },
    height: {
      type: String,
      default: '400px'
    },
  },
  data() {
    return {
      data:{
      }
    }
  },
  created() {
    this.getData();
  },
  methods: {
    getData(){
    }
  }
}
</script>
Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue
@@ -35,8 +35,25 @@
          </template>
        </avue-crud>
        <div>
          <data-view key="dataView"></data-view>
          <data-view key="dataView" :btmNode="nodeRow" :data="viewData" :readOnly="true" height="400px"></data-view>
        </div>
        <!-- 新增 && 编辑 -->
        <el-dialog
          v-dialogDrag
          :title="title === 'add' ? '创建' : '修改'"
          :visible.sync="visible"
          append-to-body="true"
          class="avue-dialog"
          width="75%"
          @close="addDialogClose">
            <div>
              <data-view key="editView" :btmNode="nodeRow" :data="viewData" :readOnly="false" height="60vh"></data-view>
            </div>
            <span slot="footer" class="dialog-footer">
               <el-button size="small" type="primary" @click="addDialogSavaHandler">确 定</el-button>
               <el-button size="small" @click="addDialogClose">取 消</el-button>
            </span>
        </el-dialog>
        <!-- 查看授权结果    -->
        <el-dialog
          v-dialogDrag
@@ -70,6 +87,7 @@
import {getTypeActionByType} from "@/api/authority/ui/typeAction";
import func from "@/util/func";
import {getUsedEnumList} from "@/api/modeling/enumType/api";
import {deleteTemplate, saveTemplate, updateTemplate} from "@/api/queryTemplate/queryDefine";
export default {
  name: "index",
  components:{dataView},
@@ -116,6 +134,10 @@
        ]
      },
      data: [],
      viewData:{},
      title: '',
      visible: false,
      form:{}
    }
  },
  created() {
@@ -164,10 +186,15 @@
          this.selectList = [row];
        }
      );
      this.getViewData(row)
    },
    // 选择框
    selectChange(row) {
      this.selectList = row;
    },
    //获取下方数据
    getViewData(row){
      this.viewData={};
    },
    // 查看授权结果
    chekView() {
@@ -206,7 +233,62 @@
      done();
    },
    //创建
    addHandler(){
      if (func.isEmptyObject(this.nodeRow)) {
        this.$message.error('请选择要添加的节点');
        return;
      }
      this.title = 'add';
      this.visible = true;
    },
    //修改
    editHandler(){
      if (func.isEmptyObject(this.nodeRow)) {
        this.$message.error('请至少选择一条数据');
        return;
      }
      this.title = 'edit';
      this.visible = true;
    },
    // 新增编辑保存
    addDialogSavaHandler() {
      saveTemplate(this.viewData).then(res => {
        if (res.data.code === 200) {
          this.$message.success(res.data.obj);
          this.getTableList();
          this.addDialogClose();
        }
      })
    },
    // 新增编辑对话框取消
    addDialogClose() {
      this.visible = false;
    },
    //删除
    delHandler(){
      if (func.isEmptyObject(this.nodeRow)) {
        this.$message.error('请选择数据');
        return;
      }
      this.$confirm('您确定要删除所选择的数据吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deleteTemplate({name:this.templateForm}).then(res => {
          if (res.data.code === 200) {
            this.$message.success(res.data.obj);
            this.getTableList();
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    // 查看使用范围重置
    checkHandleReset() {
      this.checkViewData = this.checkViewDataSearch;
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue
@@ -71,7 +71,7 @@
      </el-container>
    </div>
    <div class="dialog-footer avue-dialog__footer">
      <el-button plain size="small" type="primary" @click="submitDialog">保 存</el-button>
      <el-button size="small" type="primary" @click="submitDialog">保 存</el-button>
      <el-button size="small" @click="cancelDialog">取 消</el-button>
    </div>
  </el-dialog>
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue
@@ -79,7 +79,7 @@
      </el-container>
    </div>
    <div class="dialog-footer avue-dialog__footer">
      <el-button type="primary" plain size="small" @click="submitDialog" >保 存</el-button>
      <el-button type="primary" size="small" @click="submitDialog" >保 存</el-button>
      <el-button size="small" @click="cancelDialog">取 消</el-button>
    </div>
  </el-dialog>
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue
@@ -35,7 +35,7 @@
        <avue-input v-else v-model="condition.ordinaryValue" :disabled="readOnly" placeholder=""
                    style="width: 300px;margin-right: 5px;"></avue-input>-->
        <avue-input v-model="condition.ordinaryValue" :disabled="readOnly" placeholder=""
                    style="width: 300px;margin-right: 5px;"></avue-input>
                    style="width: 36%;margin-right: 5px;"></avue-input>
        <el-button v-if="!readOnly" plain size="mini" type="primary" @click="checkTemp(index)">选择查询模板</el-button>
        <el-button v-if="!readOnly" icon="el-icon-delete" size="mini" style="padding: 7px 8px" type="danger"
                   @click="delCondition(index)"></el-button>
@@ -357,7 +357,7 @@
                if (queryTemplate.condition.cIMap[key].leafInfo.value.queryTemplate) {
                  getValue(queryTemplate.condition.cIMap[key].leafInfo.value.queryTemplate, item)
                } else {
                  item.ordinaryValue = queryTemplate.condition.cIMap[key].leafInfo.value.ordinaryValue;
                  //item.ordinaryValue = queryTemplate.condition.cIMap[key].leafInfo.value.ordinaryValue;
                  item.type = queryTemplate.condition.cIMap[key].leafInfo.type;
                  if (['VTInteger', 'VTDouble', 'VTLong'].includes(item.type)) {
                    item.operatorDic = that.operatorIntDic;
@@ -381,8 +381,20 @@
                operatorDic: []
              }
              if (this.queryCondition.cIMap[key].leafInfo.value.queryTemplate) {
                item.ordinaryValue = this.queryCondition.cIMap[key].leafInfo.value.queryTemplate.id+';'+this.queryCondition.cIMap[key].leafInfo.value.queryTemplate.clauseList.join(',');
                if(this.queryCondition.cIMap[key].leafInfo.value.queryTemplate.id.indexOf('qt_')==0){
                getValue(this.queryCondition.cIMap[key].leafInfo.value.queryTemplate, item)
              } else {
                  item.type = this.queryCondition.cIMap[key].leafInfo.type;
                  if (['VTInteger', 'VTDouble', 'VTLong'].includes(item.type)) {
                    item.operatorDic = that.operatorIntDic;
                  } else if (['VTDateTime', 'VTDate', 'VTTime'].includes(item.type)) {
                    item.operatorDic = that.operatorDateDic;
                  } else {
                    item.operatorDic = that.operatorDic;
                  }
                }
              } else {
                item.ordinaryValue = this.queryCondition.cIMap[key].leafInfo.value.ordinaryValue;
                item.type = this.queryCondition.cIMap[key].leafInfo.type;
                if (['VTInteger', 'VTDouble', 'VTLong'].includes(item.type)) {
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue
@@ -57,8 +57,8 @@
        @select="selectHandler">
      </avue-crud>
      <span slot="footer" class="dialog-footer">
         <el-button @click="addDialogClose">取 消</el-button>
         <el-button type="primary" @click="addDialogSavaHandler">确 定</el-button>
         <el-button size="small" type="primary" @click="addDialogSavaHandler">确 定</el-button>
         <el-button size="small" @click="addDialogClose">取 消</el-button>
        </span>
    </el-dialog>
  </el-container>