| | |
| | | <el-button size="small" @click="cancleQueryDialog">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!--查询--> |
| | | <el-dialog v-dialogDrag |
| | | :title="queryResultDialog.title" |
| | | :visible.sync="queryResultDialog.showDialog" |
| | |
| | | class="avue-dialog" |
| | | :destroy-on-close="true" |
| | | :close-on-click-modal="false" |
| | | @close="queryResultDialog.showDialog='false'"> |
| | | @close="queryResultDialog.showDialog=false"> |
| | | <div class="el-input--small"> |
| | | <avue-crud ref="crud" :data="resultData" :option="resultOption" |
| | | :table-loading="queryResultDialog.loading"> |
| | |
| | | const data = JSON.parse(event.dataTransfer.getData('item')); |
| | | if (this.radioForm == 0) { |
| | | const params = { |
| | | clause: data.value, |
| | | clause: data.name, |
| | | operator: '=', |
| | | ordinaryValue: '' |
| | | } |
| | | if (data.atttributes.vtDataType == 'VTInteger' || data.atttributes.vtDataType == 'VTDouble' || data.atttributes.vtDataType == 'VTLong') { |
| | | if (data.vtDataType == 'VTInteger' || data.vtDataType == 'VTDouble' || data.vtDataType == 'VTLong') { |
| | | params.operatorDic =JSON.parse(JSON.stringify(this.operatorIntDic)) ; |
| | | } else if (data.atttributes.vtDataType == 'VTDateTime' || data.atttributes.vtDataType == 'VTDate' || data.atttributes.vtDataType == 'VTTime') { |
| | | } else if (data.vtDataType == 'VTDateTime' || data.vtDataType == 'VTDate' || data.vtDataType == 'VTTime') { |
| | | params.operatorDic = JSON.parse(JSON.stringify(this.operatorDateDic)) |
| | | } else { |
| | | params.operatorDic = JSON.parse(JSON.stringify(this.operatorDic)) |
| | | } |
| | | params.type=data.atttributes.vtDataType; |
| | | params.type=data.vtDataType; |
| | | this.conditionList.push(params) |
| | | }else { |
| | | if (this.clickNode.label != '并且' && this.clickNode.label != '或者') { |
| | |
| | | initItem(data){ |
| | | this.treeIndex++; |
| | | let item={ |
| | | label: data.value, |
| | | value: data.value + this.treeIndex, |
| | | label: data.name, |
| | | value: data.name + this.treeIndex, |
| | | valueIndex: 'v' + this.treeIndex, |
| | | type:data.vtDataType, |
| | | children: [], |
| | | inputValue:data.value, |
| | | inputValue:'', |
| | | operator:'=', |
| | | showLabel:data.value |
| | | showLabel:data.name |
| | | }; |
| | | let showLabel=''; |
| | | if(data.value.indexOf('.')!=-1){ |
| | | const labels=data.value.split('.') |
| | | if(data.name.indexOf('.')!=-1){ |
| | | const labels=data.name.split('.') |
| | | showLabel=labels[labels.length-1]; |
| | | }else { |
| | | showLabel=data.value; |
| | | showLabel=data.name; |
| | | } |
| | | item.showLabel=showLabel; |
| | | return item |
| | |
| | | }, |
| | | //查询 |
| | | queryHandler(){ |
| | | this.$parent.$parent.$parent.$parent.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | this.queryResultDialog.loading=true; |
| | | const formData=this.$parent.$parent.$parent.$parent.initFormData(); |
| | | getCriteria(formData).then(res => { |
| | | if (res.data.success) { |
| | | this.resultData=res.data.data; |
| | | this.queryResultDialog.showDialog=true; |
| | | this.queryResultDialog.loading=false; |
| | | } |
| | | }); |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | this.$emit('queryHandler'); |
| | | }, |
| | | //选择查询模板 |
| | | checkTemp(index) { |