| | |
| | | .avue-dialog .el-dialog__body .avue-form{ |
| | | margin: 0px auto 40px; // åç¬ç»å¯¹è¯æ¡éçavue表åå ä¸ä¸è¾¹è· |
| | | } |
| | | .dialog-footer{ |
| | | background-color: #ffffff; |
| | | } |
| | | .avue-crud .avue-form { |
| | | margin: 0px auto !important; // è¡¨æ ¼å
ç表åï¼æ¯å¦:æç´¢æ ï¼ åæ¶ä¸è¾¹è· |
| | | } |
| | |
| | | showProp:item.showField, |
| | | type: type, |
| | | labelWidth: this.labelWidth || (item.text.length >= 6 ? 115 : 90), |
| | | disabled: !this.isEdit || item.readOnly || this.disabled, |
| | | disabled: item.readOnly || this.disabled, |
| | | span: item.span |
| | | ? item.span |
| | | : item.type === "textarea" |
| | |
| | | }; |
| | | if(!this.isEdit){ |
| | | col.placeholder=col.label; |
| | | col.disabled=true; |
| | | } |
| | | if(col.type === 'richText'){ |
| | | this.subitemName = col.field; |
| | |
| | | <el-main> |
| | | <fieldset style="margin: 0 10px"> |
| | | <legend> æ¥è¯¢æ¡ä»¶ </legend> |
| | | <div style="height: 300px;"> |
| | | |
| | | </div> |
| | | <form-query-dialog style="height: 300px;"></form-query-dialog> |
| | | </fieldset> |
| | | </el-main> |
| | | <el-aside style="width:350px"> |
| | |
| | | import {linkSave} from "@/api/queryTemplate/linkTypeQuery"; |
| | | import basicOption from "@/util/basic-option"; |
| | | import {gridTemplate} from "@/api/queryTemplate/queryDefine"; |
| | | import {deleteAttributes} from "@/api/modeling/attributePool/api"; |
| | | import formQueryDialog from "./formQueryDialog.vue"; |
| | | export default { |
| | | name: "formDialog", |
| | | components:{formQueryDialog}, |
| | | data(){ |
| | | return { |
| | | dialog: { |
| | |
| | | form:{ |
| | | btmName:'', |
| | | qtName: '', |
| | | queryTemplate:{ |
| | | |
| | | } |
| | | }, |
| | | formTemplate:{ |
| | | btmName:'', |
| | | qtName: '', |
| | | queryTemplate:{ |
| | | |
| | | } |
| | | queryTemplate:{} |
| | | }, |
| | | //å·²ææåºå表é
ç½® |
| | | crudOption: { |
| | |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | 'dialog.type': { |
| | | handler(val) { |
| | | if(val=='edit'){ |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | methods: { |
| | | openDialog(btmName, title, mode, data) { |
| | | this.dialog.title = title; |
| | | this.dialog.showDialog = true; |
| | | this.dialog.type = mode; |
| | | this.form.btmName = btmName; |
| | | this.treeData = data.treeData; |
| | | |
| | | if (data.selectData) { |
| | | this.selectData = data.selectData; |
| | | this.orderInfoList = JSON.parse(JSON.stringify(data.selectData.queryTemplate.orderInfoList));//å·²ææåº |
| | | this.formItems[0].disabled = true |
| | | this.form.qtName = this.selectData.qtName; |
| | | this.form.direction = this.selectData.queryTemplate.direction; |
| | | this.form.btmType = this.selectData.queryTemplate.btmType; |
| | | this.form.version = this.selectData.queryTemplate.version; |
| | | this.form.queryISLeaf = this.selectData.queryTemplate.queryISLeaf; |
| | | this.form.level = this.selectData.queryTemplate.level; |
| | | if (data.selectData.queryTemplate.orderInfoList && data.selectData.queryTemplate.orderInfoList.length > 0) { |
| | | this.orderInfoList = JSON.parse(JSON.stringify(data.selectData.queryTemplate.orderInfoList));//å·²ææåº |
| | | } |
| | | } else { |
| | | this.selectData = {}; |
| | | this.orderInfoList =[]; |
| | | this.orderInfoList = []; |
| | | this.formItems[0].disabled = false; |
| | | } |
| | | this.getTemp(data.treeData.label,true) |
| | | this.getTemp(data.treeData.label, true) |
| | | this.$nextTick(()=>{ |
| | | this.dialog.showDialog = true; |
| | | }); |
| | | |
| | | }, |
| | | cancelDialog() { |
| | | this.dialog.loading = false; |
| | | this.dialog.showDialog = false; |
| | | this.$nextTick(() => { |
| | | this.form = this.formTemplate; |
| | | this.form = { |
| | | btmName: '', |
| | | qtName: '', |
| | | queryTemplate: {} |
| | | }; |
| | | this.orderInfoList =[]; |
| | | this.dialog.loading = false; |
| | | this.dialog.showDialog = false; |
| | | this.$refs.form.resetFields(); |
| | | this.$refs.form.clearValidate(); |
| | | this.businessQueryDefineForm=''; |
| | | this.linkQueryDefineForm=''; |
| | | }); |
| | |
| | | submitDialog() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | linkSave(this.form).then(res => { |
| | | if (res.success) { |
| | | let formData={ |
| | | btmName:this.form.btmName, |
| | | qtName:this.form.qtName, |
| | | queryTemplate:{ |
| | | btmType:this.form.btmType, |
| | | clauseList:['*'], |
| | | direction:this.form.direction, |
| | | id:this.form.qtName, |
| | | level:this.form.level, |
| | | linkType:this.form.btmName, |
| | | orderInfoList:this.orderInfoList, |
| | | queryISLeaf:this.form.queryISLeaf, |
| | | recReturnMode:1,//éå½è¿åæ°æ®æ¨¡å¼:1ï¼RECRETURNMODE_FLAT, 2ï¼RECRETURNMODE_FILTER |
| | | rightFlag:true, |
| | | secretFlag:true, |
| | | type:'link', |
| | | version:this.form.version |
| | | } |
| | | } |
| | | formData.condition=[] |
| | | linkSave(formData).then(res => { |
| | | if (res.data.success) { |
| | | this.$message.success("ä¿åæå"); |
| | | this.cancelDialog(); |
| | | this.$emit("refresh"); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="padding: 0 10px"> |
| | | <div style="text-align: center;margin-bottom: 10px"> |
| | | <avue-radio v-model="radioForm" :dic="radioDic" style="margin: 0 20px 0 0;display: inline-block"></avue-radio> |
| | | <el-button plain size="mini" type="primary" @click="clearValue">æ¸
空å¼</el-button> |
| | | <el-button plain size="mini" type="primary" @click="delAll">å é¤å
¨é¨æ¡ä»¶</el-button> |
| | | </div> |
| | | <div v-if="radioForm==0" style="height: 220px;text-align: center;"> |
| | | <div v-for="condition in conditionList" class="el-input--small"> |
| | | <span>condition.clause</span> |
| | | <avue-select v-model="condition.operator" type="tree" :dic="operatorDic" style="width: 80px;margin: 0 5px"></avue-select> |
| | | <avue-input v-model="condition.ordinaryValue" placeholder="" style="width: 400px"></avue-input> |
| | | </div> |
| | | </div> |
| | | <div v-else style="height: 220px;text-align: left"> |
| | | <avue-tree style="height: 220px" :data="treeData" :option="treeOption"></avue-tree> |
| | | </div> |
| | | <div 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="del">ä¿®æ¹æ¡ä»¶</el-button> |
| | | <el-button v-if="radioForm==1" plain size="mini" type="primary" @click="del">å é¤</el-button> |
| | | <el-button plain size="mini" type="primary" @click="del">æ¥è¯¢</el-button> |
| | | <el-button plain size="mini" type="primary" @click="del">åæ¶</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "formQueryDialog", |
| | | data() { |
| | | return { |
| | | radioForm: 0, |
| | | radioDic: [{ |
| | | label: 'æ®é', |
| | | value: 0 |
| | | }, { |
| | | label: 'é«çº§', |
| | | value: 1 |
| | | }], |
| | | conditionList:[{ |
| | | clause:'OID' |
| | | }], |
| | | treeOption:{ |
| | | defaultExpandAll:true, |
| | | menu: false, |
| | | addBtn: false, |
| | | filter:false, |
| | | }, |
| | | treeData:{}, |
| | | //VTIntegerãVTDoubleãVTLong |
| | | operatorIntDic:[{ |
| | | label:'=', |
| | | value:'=' |
| | | },{ |
| | | label:'!=', |
| | | value:'!=' |
| | | },{ |
| | | label:'å
å«', |
| | | value:'å
å«' |
| | | },{ |
| | | label:'in', |
| | | value:'in' |
| | | },{ |
| | | label:'not in', |
| | | value:'not in' |
| | | },{ |
| | | label:'>=', |
| | | value:'>=' |
| | | },{ |
| | | label:'>', |
| | | value:'>' |
| | | },{ |
| | | label:'<=', |
| | | value:'<=' |
| | | },{ |
| | | label:'<', |
| | | value:'<' |
| | | }], |
| | | //VTDateTimeãVTDateãVTTime |
| | | operatorTimeDic:[{ |
| | | label:'=', |
| | | value:'=' |
| | | },{ |
| | | label:'!=', |
| | | value:'!=' |
| | | },{ |
| | | label:'in', |
| | | value:'in' |
| | | },{ |
| | | label:'not in', |
| | | value:'not in' |
| | | },{ |
| | | label:'>=', |
| | | value:'>=' |
| | | },{ |
| | | label:'<=', |
| | | value:'<=' |
| | | }], |
| | | //å
¶å® |
| | | operatorDic:[{ |
| | | label:'=', |
| | | value:'=' |
| | | },{ |
| | | label:'!=', |
| | | value:'!=' |
| | | },{ |
| | | label:'å
å«', |
| | | value:'å
å«' |
| | | },{ |
| | | label:'in', |
| | | value:'in' |
| | | },{ |
| | | label:'not in', |
| | | value:'not in' |
| | | }] |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | <el-container> |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 154px);!important;"> |
| | | <div ref="TreeBox" style="height: calc(100vh - 164px);!important;"> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 190px);"> |
| | | <div style="height: calc(100vh - 200px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | |
| | | <form-dialog ref="formRef" @refresh="getTemp"></form-dialog> |
| | | </basic-container> |
| | | </el-main> |
| | | <div style="width: 300px;">111</div> |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {gridLink} from "@/api/modeling/linkType/api"; |
| | | import { gridTemplate, saveTemplate, updateTemplate} from "@/api/queryTemplate/queryDefine"; |
| | | import {getObjTypeQTs,deleteLinkTemplate} from "@/api/queryTemplate/linkTypeQuery"; |
| | | import func from "@/util/func"; |
| | | import {dateFormat} from "@/util/date"; |
| | | import basicOption from "@/util/basic-option"; |
| | | import FormDialog from "./formDialog.vue" |
| | | |
| | |
| | | formatter:function (row, value) { |
| | | return row.queryTemplate.btmType; |
| | | } |
| | | }, { |
| | | label: 'çæ¬çæ¬¡', |
| | | prop: 'version', |
| | | formatter:function (row, value) { |
| | | if(row.queryTemplate.version==1){ |
| | | return 'å½åçæ¬å½åçæ¬¡' |
| | | }else if(row.queryTemplate.version==2){ |
| | | return 'å½åçæ¬ææ°çæ¬¡' |
| | | }else if(row.queryTemplate.version==3){ |
| | | return 'ææ°çæ¬ææ°çæ¬¡' |
| | | }else if(row.queryTemplate.version==7){ |
| | | return 'å·²åå¸çææ°çæ¬' |
| | | }else { |
| | | return '' |
| | | } |
| | | } |
| | | }, { |
| | | label: 'æ¥è¯¢æ¯å¦æä¸çº§', |
| | | prop: 'queryISLeaf', |
| | | formatter:function (row, value) { |
| | | return row.queryTemplate.queryISLeaf |
| | | } |
| | | }, { |
| | | label: 'åèç¹å±æ¬¡æ°', |
| | | prop: 'level', |
| | | formatter:function (row, value) { |
| | | return row.queryTemplate.level; |
| | | } |
| | | }] |
| | | }, |
| | | selectionRow: [], |
| | |
| | | let names=this.selectionRow.map(item=>{ |
| | | return item.qtName |
| | | }) |
| | | deleteLinkTemplate(names).then(res => { |
| | | deleteLinkTemplate({names:names.join(',')}).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTemp(); |
| | | } |
| | | }) |
| | | }).catch(() => { |