| | |
| | | <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> 主题 </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> |
| | |
| | | export default { |
| | | name: "dataView", |
| | | props: { |
| | | selectData: { |
| | | //选中的业务类型节点 |
| | | btmNode: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | //选中行数据 |
| | | data: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '400px' |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | data:{ |
| | | |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.getData(); |
| | | }, |
| | | methods: { |
| | | getData(){ |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | </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 |
| | |
| | | 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}, |
| | |
| | | ] |
| | | }, |
| | | data: [], |
| | | viewData:{}, |
| | | title: '', |
| | | visible: false, |
| | | form:{} |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.selectList = [row]; |
| | | } |
| | | ); |
| | | this.getViewData(row) |
| | | }, |
| | | // 选择框 |
| | | selectChange(row) { |
| | | this.selectList = row; |
| | | }, |
| | | //获取下方数据 |
| | | getViewData(row){ |
| | | this.viewData={}; |
| | | }, |
| | | // 查看授权结果 |
| | | chekView() { |
| | |
| | | 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; |
| | |
| | | </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> |
| | |
| | | </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> |
| | |
| | | <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> |
| | |
| | | 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; |
| | |
| | | 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)) { |
| | |
| | | @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> |