From b9f3e4a899013ce21de3fc1ac127d137c7494595 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期一, 02 九月 2024 15:21:20 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue | 149 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 149 insertions(+), 0 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue new file mode 100644 index 0000000..20164a4 --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue @@ -0,0 +1,149 @@ +<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" @drop="drop" @dragover.prevent style="height: 220px;text-align: center;"> + <div v-for="condition in conditionList" class="el-input--small" style="margin-bottom: 5px;"> + <span style="width: 150px;display: inline-block;text-align: right" :title="condition.clause">{{condition.clause}}</span> + <avue-select v-model="condition.operator" type="tree" :dic="operatorDic" :clearable="false" style="width: 80px;margin: 0 5px;"></avue-select> + <avue-input v-model="condition.ordinaryValue" placeholder="" style="width: 300px;margin-right: 5px;"></avue-input> + <el-button plain size="mini" type="primary" @click="delAll">閫夋嫨鏌ヨ妯℃澘</el-button> + </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", + props: { + queryCondition: { + type: Array, + default: [] + }, + queryTree: { + type: Object, + default: {} + }, + }, + data() { + return { + radioForm: 0, + radioDic: [{ + label: '鏅��', + value: 0 + }, { + label: '楂樼骇', + value: 1 + }], + conditionList:this.queryCondition, + treeOption:{ + defaultExpandAll:true, + menu: false, + addBtn: false, + filter:false, + }, + treeData:this.queryTree, + //VTInteger銆乂TDouble銆乂TLong + 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銆乂TDate銆乂TTime + 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' + }] + } + }, + methods:{ + // 鎷栨嫿鍒版椂 + drop(event) { + // 浣跨敤 getData 鏂规硶鑾峰彇鏁版嵁 + const data = JSON.parse(event.dataTransfer.getData('item')); + const params = { + clause: data.value, + operator: '=', + ordinaryValue: '' + } + this.conditionList.push(params) + } + } +} +</script> + +<style scoped> +::v-deep .el-input--small .el-input__inner{ + height: 28px; + line-height: 28px; +} +</style> -- Gitblit v1.9.3