1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
| <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>
|
|