ocpview-plus 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/dist/efviewplus.min.esm.js +99954 -0
- package/dist/efviewplus.min.js +142 -0
- package/dist/locale/lang.js +1 -0
- package/dist/locale/zh-CN.js +1 -0
- package/dist/locale/zh-TW.js +1 -0
- package/dist/locale/zh-UG.js +1 -0
- package/dist/style.css +9 -0
- package/dist/styles/efviewplus.css +1 -0
- package/package.json +144 -0
- package/src/components/base/controlbase.vue +191 -0
- package/src/components/base/controlbox.vue +102 -0
- package/src/components/base/index.js +3 -0
- package/src/components/base/load.js +20 -0
- package/src/components/base/probase.js +220 -0
- package/src/components/base/size.js +78 -0
- package/src/components/billbox/billbox.vue +68 -0
- package/src/components/billbox/index.js +2 -0
- package/src/components/cascaderbox/cascaderbox.vue +184 -0
- package/src/components/cascaderbox/index.js +2 -0
- package/src/components/checkbox/checkbox.vue +76 -0
- package/src/components/checkbox/checkgroupbox.vue +104 -0
- package/src/components/checkbox/index.js +3 -0
- package/src/components/colorbox/colorbox.vue +44 -0
- package/src/components/colorbox/index.js +2 -0
- package/src/components/combobox/combobox.vue +220 -0
- package/src/components/combobox/index.js +2 -0
- package/src/components/conditionbox/conditionbase.vue +195 -0
- package/src/components/conditionbox/conditionbox.vue +63 -0
- package/src/components/conditionbox/conditionfilterbox.vue +477 -0
- package/src/components/conditionbox/conditionselectorbox.vue +237 -0
- package/src/components/conditionbox/index.js +5 -0
- package/src/components/conditionbox/queryconditionbox.vue +26 -0
- package/src/components/conditionbox/queryconditionboxbase.vue +124 -0
- package/src/components/conditionbox/searchconditionbox.vue +114 -0
- package/src/components/conditionbox/searchgrid.vue +391 -0
- package/src/components/datebox/datebox.vue +129 -0
- package/src/components/datebox/daterangebox.vue +155 -0
- package/src/components/datebox/index.js +3 -0
- package/src/components/form/baseform.vue +677 -0
- package/src/components/form/detailsbox.vue +487 -0
- package/src/components/form/formbox.vue +29 -0
- package/src/components/form/formcardbox.vue +268 -0
- package/src/components/form/formcardgroupbox.vue +252 -0
- package/src/components/form/formcompro.js +19 -0
- package/src/components/form/formdetail.vue +129 -0
- package/src/components/form/formdetailtwo.vue +302 -0
- package/src/components/form/index.js +8 -0
- package/src/components/form/toolanchor.js +46 -0
- package/src/components/form/workform.vue +168 -0
- package/src/components/grid/basegrid.vue +1061 -0
- package/src/components/grid/editgrid.vue +51 -0
- package/src/components/grid/editgridbase.vue +947 -0
- package/src/components/grid/editgridcard.vue +193 -0
- package/src/components/grid/expandrow.vue +137 -0
- package/src/components/grid/index.js +6 -0
- package/src/components/grid/viewgrid.vue +122 -0
- package/src/components/grid/viewgridbase.vue +1284 -0
- package/src/components/icon/common-icon.vue +53 -0
- package/src/components/icon/eicon.vue +29 -0
- package/src/components/icon/icons.vue +42 -0
- package/src/components/icon/index.js +2 -0
- package/src/components/label/index.js +3 -0
- package/src/components/label/showtext.vue +95 -0
- package/src/components/load/loadcartoon.vue +228 -0
- package/src/components/map/index.js +2 -0
- package/src/components/map/mapbox.vue +348 -0
- package/src/components/masterplate/appendix.vue +586 -0
- package/src/components/masterplate/approval.vue +803 -0
- package/src/components/masterplate/base.vue +985 -0
- package/src/components/masterplate/billasyncimport.vue +614 -0
- package/src/components/masterplate/billconditionbox.vue +224 -0
- package/src/components/masterplate/billconditionsbox.vue +427 -0
- package/src/components/masterplate/billdetailform.vue +990 -0
- package/src/components/masterplate/billimport.vue +263 -0
- package/src/components/masterplate/billquerygrid.vue +316 -0
- package/src/components/masterplate/billsinglegrid.vue +234 -0
- package/src/components/masterplate/birtreport.vue +185 -0
- package/src/components/masterplate/detailbtntoolbar.vue +311 -0
- package/src/components/masterplate/detailsbox.vue +386 -0
- package/src/components/masterplate/editgridcard.vue +222 -0
- package/src/components/masterplate/editgridcard2.vue +109 -0
- package/src/components/masterplate/formcard.vue +106 -0
- package/src/components/masterplate/formcardgroupbox.vue +168 -0
- package/src/components/masterplate/formdetailtwo.vue +356 -0
- package/src/components/masterplate/gridcolset.vue +227 -0
- package/src/components/masterplate/index.js +23 -0
- package/src/components/masterplate/layouttemplate.vue +33 -0
- package/src/components/masterplate/leftlistrightdetails.vue +474 -0
- package/src/components/masterplate/leftlistrightlist.vue +465 -0
- package/src/components/masterplate/lefttreerightdetails.vue +619 -0
- package/src/components/masterplate/levelreport.vue +510 -0
- package/src/components/masterplate/listbtntoolbar.vue +257 -0
- package/src/components/masterplate/listdetails.vue +769 -0
- package/src/components/masterplate/operlog.vue +272 -0
- package/src/components/masterplate/options.vue +110 -0
- package/src/components/masterplate/page.vue +102 -0
- package/src/components/masterplate/promptmessage.vue +74 -0
- package/src/components/masterplate/querybar.vue +490 -0
- package/src/components/masterplate/report.vue +357 -0
- package/src/components/masterplate/rowbtntoolbar.vue +126 -0
- package/src/components/masterplate/simpletree.vue +129 -0
- package/src/components/masterplate/simpleviewgrid.vue +144 -0
- package/src/components/mychart/bar/bar.vue +202 -0
- package/src/components/mychart/basechart.vue +190 -0
- package/src/components/mychart/complexmychart/barline.vue +154 -0
- package/src/components/mychart/gauge/gauge.vue +83 -0
- package/src/components/mychart/index.js +9 -0
- package/src/components/mychart/line/line.vue +202 -0
- package/src/components/mychart/liquidfill/liquidfill.vue +109 -0
- package/src/components/mychart/pie/pie.vue +96 -0
- package/src/components/mychart/radar/radar.vue +122 -0
- package/src/components/mychart/scatter/scatter.vue +76 -0
- package/src/components/numberbox/append.js +11 -0
- package/src/components/numberbox/index.js +3 -0
- package/src/components/numberbox/numberbox.vue +303 -0
- package/src/components/numberbox/numberrangebox.vue +423 -0
- package/src/components/picturebox/filebox.vue +365 -0
- package/src/components/picturebox/index.js +3 -0
- package/src/components/picturebox/picturebox.vue +541 -0
- package/src/components/picturebox/uploadbox.vue +164 -0
- package/src/components/poptagbox/index.js +2 -0
- package/src/components/poptagbox/poptagbox.vue +389 -0
- package/src/components/poptextbox/index.js +2 -0
- package/src/components/poptextbox/poptextbox.vue +601 -0
- package/src/components/radiobox/index.js +2 -0
- package/src/components/radiobox/radiogroupbox.vue +76 -0
- package/src/components/richtextbox/editor.vue +150 -0
- package/src/components/richtextbox/index.js +2 -0
- package/src/components/richtextbox/richtextbox.vue +448 -0
- package/src/components/textbox/index.js +2 -0
- package/src/components/textbox/textbox.vue +98 -0
- package/src/components/timebox/index.js +2 -0
- package/src/components/timebox/timebox.vue +76 -0
- package/src/components/toolbar/ebutton.vue +169 -0
- package/src/components/toolbar/index.js +3 -0
- package/src/components/toolbar/toolbar.vue +446 -0
- package/src/components/tree/basetree.vue +725 -0
- package/src/components/tree/index.js +3 -0
- package/src/components/tree/treedata.vue +51 -0
- package/src/components/tree/treedatabase.vue +189 -0
- package/src/components/upload/billimport.vue +233 -0
- package/src/components/upload/index.js +2 -0
- package/src/components/videobox/index.js +2 -0
- package/src/components/videobox/uploadbox.vue +148 -0
- package/src/components/videobox/videobox.vue +503 -0
- package/src/components/wrichtextbox/editor.vue +219 -0
- package/src/components/wrichtextbox/index.js +2 -0
- package/src/components/wrichtextbox/wrichtextbox.vue +63 -0
- package/src/index.js +215 -0
- package/src/locale/format.js +51 -0
- package/src/locale/index.js +63 -0
- package/src/locale/lang/zh-CN.js +123 -0
- package/src/locale/lang/zh-TW.js +114 -0
- package/src/locale/lang/zh-UG.js +115 -0
- package/src/locale/lang.js +15 -0
- package/src/method/case/case.js +1180 -0
- package/src/method/config/queryconfig.js +24 -0
- package/src/method/const/const.js +815 -0
- package/src/method/index.js +8 -0
- package/src/static/excel/exportexcel.js +627 -0
- package/src/static/iview/coustom.js +463 -0
- package/src/store/index.js +19 -0
- package/src/store/modules/app.js +53 -0
- package/src/styles/README.md +3 -0
- package/src/styles/common.less +75 -0
- package/src/styles/components/anchor.less +74 -0
- package/src/styles/components/approval.less +136 -0
- package/src/styles/components/button.less +208 -0
- package/src/styles/components/card.less +51 -0
- package/src/styles/components/content.less +38 -0
- package/src/styles/components/font.less +314 -0
- package/src/styles/components/form.less +72 -0
- package/src/styles/components/iconfont/fonts/iconfont.less +1376 -0
- package/src/styles/components/iconfont/fonts/iconfont.svg +699 -0
- package/src/styles/components/iconfont/fonts/iconfont.ttf +0 -0
- package/src/styles/components/iconfont/fonts/iconfont.woff +0 -0
- package/src/styles/components/iconfont/fonts/iconfont.woff2 +0 -0
- package/src/styles/components/index.less +16 -0
- package/src/styles/components/input.less +290 -0
- package/src/styles/components/modal.less +203 -0
- package/src/styles/components/page.less +340 -0
- package/src/styles/components/select.less +361 -0
- package/src/styles/components/steps.less +367 -0
- package/src/styles/components/table.less +544 -0
- package/src/styles/components/tabs.less +249 -0
- package/src/styles/components/upload.less +83 -0
- package/src/styles/custom.less +67 -0
- package/src/styles/index.less +6 -0
- package/src/styles/pack.less +6 -0
- package/src/utils/EfuMessenger.js +155 -0
- package/src/utils/assist.js +353 -0
- package/src/utils/index.js +1 -0
- package/src/utils/random_str.js +10 -0
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="querybar" >
|
|
3
|
+
<Row type="flex" :gutter="0">
|
|
4
|
+
<Col span='16'>
|
|
5
|
+
<Row type="flex" :gutter="0">
|
|
6
|
+
<Col span='6' style="margin-right:12px">
|
|
7
|
+
<ControlBox ref="field" :config="fieldConfig" ></ControlBox>
|
|
8
|
+
</Col>
|
|
9
|
+
<Col span='6' style="margin-right:20px">
|
|
10
|
+
<ControlBox v-if="hackReset" ref="editors" :config="editorsConfig" ></ControlBox>
|
|
11
|
+
</Col>
|
|
12
|
+
<Col style="margin-right:10px">
|
|
13
|
+
<Button customIcon="iconfont icon-custom-search" type="primary" @click="search" >查询</Button>
|
|
14
|
+
</Col>
|
|
15
|
+
<Col>
|
|
16
|
+
<Button customIcon="iconfont icon-custom-reset" @click="clear">重置</Button>
|
|
17
|
+
</Col>
|
|
18
|
+
<Col>
|
|
19
|
+
<Divider type="vertical" class="dividercommon"/>
|
|
20
|
+
</Col>
|
|
21
|
+
<Col>
|
|
22
|
+
<Dropdown trigger="custom" :visible="filterSceneFlag" @on-click="filterAction" placement="bottom-start" @on-clickoutside="closeFilterScene">
|
|
23
|
+
<Badge class-name="badgeclass" :count="sceneNum">
|
|
24
|
+
<ButtonGroup>
|
|
25
|
+
<Button customIcon="iconfont icon-custom-filter" @click="updataFilterScene">高级查询</Button>
|
|
26
|
+
<Button v-if="!filterSceneFlag && sceneFlag" icon="ios-arrow-down" @click="openFilterScene"> </Button>
|
|
27
|
+
<Button v-if="filterSceneFlag && sceneFlag" icon="ios-arrow-up" @click="closeFilterScene"> </Button>
|
|
28
|
+
</ButtonGroup>
|
|
29
|
+
</Badge>
|
|
30
|
+
<template #list>
|
|
31
|
+
<DropdownMenu>
|
|
32
|
+
<DropdownItem v-for="(temp,index) in sceneData" :selected="temp.scenename == selectedScence" :name="temp.scenename" :key="'scene_' + index">{{temp.scenename}}</DropdownItem>
|
|
33
|
+
</DropdownMenu>
|
|
34
|
+
</template>
|
|
35
|
+
</Dropdown>
|
|
36
|
+
</Col>
|
|
37
|
+
</Row>
|
|
38
|
+
</Col>
|
|
39
|
+
<Col span='8'>
|
|
40
|
+
<Row type="flex" justify="end" :gutter="0" >
|
|
41
|
+
<Col style="padding-right:10px;">
|
|
42
|
+
<Dropdown trigger="custom" :visible="btnFlag" @on-click="action" placement="bottom-start" @on-clickoutside="closeBtn">
|
|
43
|
+
<ButtonGroup>
|
|
44
|
+
<Button customIcon="iconfont icon-custom-add" v-if="addDataBtnFlag" @click="addData">新增</Button>
|
|
45
|
+
<Button v-if="!btnFlag && moreBtnFlag" icon="ios-arrow-down" @click="openBtn"> </Button>
|
|
46
|
+
<Button v-if="btnFlag && moreBtnFlag" icon="ios-arrow-up" @click="closeBtn"> </Button>
|
|
47
|
+
</ButtonGroup>
|
|
48
|
+
<template #list>
|
|
49
|
+
<DropdownMenu>
|
|
50
|
+
<DropdownItem v-for="(item,index) in btnData" style="padding-left:0px;" :key="'btn_' + index">
|
|
51
|
+
<Button :icon="item.icon" type="text" :customIcon="item.customIcon" @click="action(item.name)" >{{item.text}}</Button>
|
|
52
|
+
</DropdownItem>
|
|
53
|
+
</DropdownMenu>
|
|
54
|
+
</template>
|
|
55
|
+
</Dropdown>
|
|
56
|
+
</Col>
|
|
57
|
+
<Col>
|
|
58
|
+
<PromptMessages style="height:100%"/>
|
|
59
|
+
</COl>
|
|
60
|
+
</Row>
|
|
61
|
+
</Col>
|
|
62
|
+
</Row>
|
|
63
|
+
<div v-show="filterFlag" style="margin-top:20px">
|
|
64
|
+
<BillConditionsBox ref="filter" @doAction="doAction" @conditionAction="conditionAction" :config="config" :dictData="dictData"/>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
<script>
|
|
69
|
+
import PromptMessages from './promptmessage.vue';
|
|
70
|
+
import BillConditionsBox from './billconditionsbox.vue';
|
|
71
|
+
export default {
|
|
72
|
+
name: 'mquerybar',
|
|
73
|
+
components:{
|
|
74
|
+
BillConditionsBox,PromptMessages
|
|
75
|
+
},
|
|
76
|
+
props:{
|
|
77
|
+
config: {
|
|
78
|
+
type: Object,
|
|
79
|
+
default () {
|
|
80
|
+
return {};
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
dictData: {
|
|
84
|
+
type: Object,
|
|
85
|
+
default:null
|
|
86
|
+
},
|
|
87
|
+
moduleMethod:{
|
|
88
|
+
type:Array,
|
|
89
|
+
default: () => {
|
|
90
|
+
return [];
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
} ,
|
|
94
|
+
data () {
|
|
95
|
+
return {
|
|
96
|
+
globalConfig:{
|
|
97
|
+
},
|
|
98
|
+
myConfig: {
|
|
99
|
+
},
|
|
100
|
+
conditionPrior:[],
|
|
101
|
+
condition:[],
|
|
102
|
+
dataType:{},
|
|
103
|
+
hackReset:true,
|
|
104
|
+
addDataBtnFlag:true,
|
|
105
|
+
enablePermissions:false,
|
|
106
|
+
showCondition:true,
|
|
107
|
+
showHelpBtn:false,
|
|
108
|
+
showbatchBtn:true,
|
|
109
|
+
btnFlag:false,
|
|
110
|
+
filterFlag:false,
|
|
111
|
+
sceneFlag:true,
|
|
112
|
+
filterSceneFlag:false,
|
|
113
|
+
fieldConfig: {
|
|
114
|
+
name:'field',
|
|
115
|
+
type:'ComboBox',
|
|
116
|
+
codeWithName:false,
|
|
117
|
+
placeholder:'请选择',
|
|
118
|
+
valueChanged:this.fieldChanged
|
|
119
|
+
},
|
|
120
|
+
editorsConfig:{
|
|
121
|
+
name:'editors',
|
|
122
|
+
type:'TextBox',
|
|
123
|
+
readOnly:true
|
|
124
|
+
},
|
|
125
|
+
searchDictData:{},
|
|
126
|
+
showModuleCode:false,
|
|
127
|
+
selectedScence:'',
|
|
128
|
+
sceneData:[],
|
|
129
|
+
moreBtnFlag:false,
|
|
130
|
+
btnData:[]
|
|
131
|
+
};
|
|
132
|
+
},
|
|
133
|
+
created () {
|
|
134
|
+
this.init();
|
|
135
|
+
},
|
|
136
|
+
computed:{
|
|
137
|
+
sceneNum () {
|
|
138
|
+
return this.sceneData.length;
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
methods:{
|
|
142
|
+
init () {
|
|
143
|
+
//获取初期默认值
|
|
144
|
+
this.myConfig = Object.assign({}, this.globalConfig, this.myConfig);
|
|
145
|
+
//获取配置
|
|
146
|
+
if (this.config) {
|
|
147
|
+
this.myConfig = Object.assign({}, this.myConfig, this.config);
|
|
148
|
+
}
|
|
149
|
+
//处理下拉框
|
|
150
|
+
if (this.myConfig.items) {
|
|
151
|
+
this.myConfig.items.forEach(el => {
|
|
152
|
+
if (this.dictData) {
|
|
153
|
+
this.initDictkey(el);
|
|
154
|
+
}
|
|
155
|
+
if (el.vtype === 'datetime') {
|
|
156
|
+
delete el.vtype;
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (this.myConfig.btnData !== undefined) {
|
|
162
|
+
this.btnData = this.$Method.copy(this.myConfig.btnData);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
this.btnData.forEach(el => {
|
|
166
|
+
if (el.icon && el.icon.startsWith('custom')) {
|
|
167
|
+
el.customIcon='iconfont icon-' + el.icon;
|
|
168
|
+
el.icon = null;
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
if (this.myConfig.sceneData !== undefined) {
|
|
173
|
+
this.sceneData = this.$Method.copy(this.myConfig.sceneData);
|
|
174
|
+
}
|
|
175
|
+
if (this.myConfig.enablePermissions !== undefined) {
|
|
176
|
+
this.enablePermissions = this.myConfig.enablePermissions;
|
|
177
|
+
}
|
|
178
|
+
this.initField();
|
|
179
|
+
this.fieldConfig.data = this.conditionPrior;
|
|
180
|
+
if (this.dictData != null) {
|
|
181
|
+
this.searchDictData = this.$Method.copy(this.dictData);
|
|
182
|
+
}
|
|
183
|
+
if (this.myConfig.curHelpUrl) {
|
|
184
|
+
this.showHelpBtn = true;
|
|
185
|
+
}
|
|
186
|
+
if (this.myConfig.modulecode) {
|
|
187
|
+
this.showModuleCode = true;
|
|
188
|
+
}
|
|
189
|
+
this.searchDictData.FIELD = this.condition;
|
|
190
|
+
|
|
191
|
+
if (this.enablePermissions) {
|
|
192
|
+
let temp = this.moduleMethod.find(el => el.name === 'addData');
|
|
193
|
+
if (temp) {
|
|
194
|
+
this.addDataBtnFlag = true;
|
|
195
|
+
} else {
|
|
196
|
+
this.addDataBtnFlag = false;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
let btnData = [];
|
|
200
|
+
this.moduleMethod.forEach(el => {
|
|
201
|
+
let t = this.btnData.find(el2 => el2.name === el.name);
|
|
202
|
+
if (t) {
|
|
203
|
+
btnData.push(t);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
this.btnData = btnData;
|
|
207
|
+
}
|
|
208
|
+
if (this.btnData.length > 0) {
|
|
209
|
+
this.moreBtnFlag = true;
|
|
210
|
+
} else {
|
|
211
|
+
this.moreBtnFlag = false;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if (this.sceneData.length > 0) {
|
|
215
|
+
this.sceneFlag = true;
|
|
216
|
+
} else {
|
|
217
|
+
this.sceneFlag = false;
|
|
218
|
+
}
|
|
219
|
+
if (this.myConfig.sceneData) {
|
|
220
|
+
this.sceneData = JSON.parse(this.myConfig.sceneData);
|
|
221
|
+
}
|
|
222
|
+
if (this.addDataBtnFlag) {
|
|
223
|
+
if (this.myConfig.addDataflag !== 'Y') {
|
|
224
|
+
this.addDataBtnFlag = false;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
initDictkey(el) {
|
|
229
|
+
if (el.children && el.children.length > 0) {
|
|
230
|
+
for (let i=0;i<el.children.length; i++) {
|
|
231
|
+
this.initDictkey(el.children[i]);
|
|
232
|
+
}
|
|
233
|
+
} else {
|
|
234
|
+
if (el.dictkey) {
|
|
235
|
+
if (el.data === undefined) {
|
|
236
|
+
let dictkey = el.dictkey;
|
|
237
|
+
if (el.customDictkey) {
|
|
238
|
+
dictkey = el.customDictkey;
|
|
239
|
+
}
|
|
240
|
+
el.data = this.dictData[dictkey];
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
initField() {
|
|
246
|
+
let condition = [];
|
|
247
|
+
let datatype = {};
|
|
248
|
+
let conditionPrior = [];
|
|
249
|
+
if (this.myConfig.items) {
|
|
250
|
+
this.myConfig.items.forEach(el => {
|
|
251
|
+
this.initComnonField(el,condition,datatype,conditionPrior);
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
this.condition = condition;
|
|
255
|
+
this.dataType = datatype;
|
|
256
|
+
this.conditionPrior = conditionPrior;
|
|
257
|
+
},
|
|
258
|
+
initComnonField(el,condition,datatype,conditionPrior) {
|
|
259
|
+
if (el.children && el.children.length > 0) {
|
|
260
|
+
for (let i=0;i<el.children.length; i++) {
|
|
261
|
+
this.initComnonField(el.children[i],condition,datatype,conditionPrior);
|
|
262
|
+
}
|
|
263
|
+
} else {
|
|
264
|
+
if (el.condition || el.conditionPrior) {
|
|
265
|
+
let obj = {};
|
|
266
|
+
obj.code = el.name;
|
|
267
|
+
if (el.label) {
|
|
268
|
+
obj.name = el.label;
|
|
269
|
+
} else {
|
|
270
|
+
obj.name = el.name;
|
|
271
|
+
}
|
|
272
|
+
let tempObj = this.$Method.copy(el);
|
|
273
|
+
tempObj.readOnly = false;
|
|
274
|
+
tempObj.visible = true;
|
|
275
|
+
tempObj.defaultValue = '';
|
|
276
|
+
tempObj.required = false;
|
|
277
|
+
obj.config = tempObj;
|
|
278
|
+
datatype[obj.code] = tempObj;
|
|
279
|
+
condition.push(obj);
|
|
280
|
+
if (el.conditionPrior) {
|
|
281
|
+
conditionPrior.push(obj);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
clear() {
|
|
287
|
+
this.customClear();
|
|
288
|
+
let temp = {};
|
|
289
|
+
temp.name = 'condition_clear';
|
|
290
|
+
this.$emit('conditionAction',temp);
|
|
291
|
+
},
|
|
292
|
+
search() {
|
|
293
|
+
let temp = {};
|
|
294
|
+
temp.name = 'condition_search';
|
|
295
|
+
temp.para = this.getQuerySearchParam();
|
|
296
|
+
this.closeFilterScene();
|
|
297
|
+
this.$emit('conditionAction',temp);
|
|
298
|
+
},
|
|
299
|
+
conditionAction(obj) {
|
|
300
|
+
this.filterFlag = false;
|
|
301
|
+
let data = this.$refs.filter.getData();
|
|
302
|
+
this.updateScene(data.scenename,data);
|
|
303
|
+
this.$emit('conditionAction',obj);
|
|
304
|
+
},
|
|
305
|
+
getQuerySearchParam() {
|
|
306
|
+
if (this.customGetQuerySearchParam) {
|
|
307
|
+
return this.customGetQuerySearchParam();
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
fieldChanged(e) {
|
|
311
|
+
const index = this.conditionPrior.findIndex(el => el.code === e.value);
|
|
312
|
+
if (index > -1) {
|
|
313
|
+
this.editorsConfig = Object.assign({},{},this.conditionPrior[index].config);
|
|
314
|
+
} else {
|
|
315
|
+
this.editorsConfig = {
|
|
316
|
+
name:'editors',
|
|
317
|
+
type:'TextBox',
|
|
318
|
+
readOnly:true
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
this.hackReset = false;
|
|
322
|
+
this.$nextTick(() =>{
|
|
323
|
+
this.hackReset = true;
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
},
|
|
327
|
+
customClear () {
|
|
328
|
+
this.$refs.field.setValue('');
|
|
329
|
+
let e = {};
|
|
330
|
+
e.value = '';
|
|
331
|
+
this.fieldChanged(e);
|
|
332
|
+
},
|
|
333
|
+
customGetQuerySearchParam() {
|
|
334
|
+
let searchParam = {};
|
|
335
|
+
let obj = {};
|
|
336
|
+
let el = {};
|
|
337
|
+
el.field = this.$refs.field.getValue();
|
|
338
|
+
el.editors = this.$refs.editors.getValue();
|
|
339
|
+
el.calculator = '==';
|
|
340
|
+
if (el.field && el.editors) {
|
|
341
|
+
if (this.dataType[el.field].calculator) {
|
|
342
|
+
el.calculator = this.dataType[el.field].calculator;
|
|
343
|
+
}
|
|
344
|
+
obj = this.getConditionValue(el.field,el.editors,el.calculator,this.dataType[el.field]);
|
|
345
|
+
}
|
|
346
|
+
let highObj = {};
|
|
347
|
+
/*let highObj = this.$refs.searchgrid.getResultCondition();
|
|
348
|
+
if (highObj['$and']) {
|
|
349
|
+
if (obj !== {}) {
|
|
350
|
+
highObj['$and'].push(obj);
|
|
351
|
+
}
|
|
352
|
+
searchParam = Object.assign({},{},highObj);
|
|
353
|
+
} else {
|
|
354
|
+
searchParam = Object.assign({},obj,highObj);
|
|
355
|
+
}*/
|
|
356
|
+
searchParam = obj;
|
|
357
|
+
return searchParam;
|
|
358
|
+
},
|
|
359
|
+
openHelp () {
|
|
360
|
+
window.open(this.myConfig.curHelpUrl);
|
|
361
|
+
},
|
|
362
|
+
openBtn() {
|
|
363
|
+
this.btnFlag = true;
|
|
364
|
+
this.openBtnFlag = true;
|
|
365
|
+
},
|
|
366
|
+
closeBtn() {
|
|
367
|
+
if (!this.openBtnFlag) {
|
|
368
|
+
this.btnFlag = false;
|
|
369
|
+
} else {
|
|
370
|
+
this.openBtnFlag = false;
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
openFilterScene() {
|
|
374
|
+
this.filterSceneFlag = true;
|
|
375
|
+
this.openFilterSceneFlag = true;
|
|
376
|
+
},
|
|
377
|
+
closeFilterScene() {
|
|
378
|
+
if (!this.openFilterSceneFlag) {
|
|
379
|
+
this.filterSceneFlag = false;
|
|
380
|
+
} else {
|
|
381
|
+
this.openFilterSceneFlag = false;
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
doAction (obj) {
|
|
385
|
+
if (obj.name == 'saveScene' || obj.name == 'delScene') {
|
|
386
|
+
if (obj.para.flag === 'I') {
|
|
387
|
+
let index = this.sceneData.findIndex(el => el.scenename === obj.para.scenename);
|
|
388
|
+
if (index > -1) {
|
|
389
|
+
this.alert('场景名称[' + obj.para.scenename + ']已存在,请检查');
|
|
390
|
+
return false;
|
|
391
|
+
} else {
|
|
392
|
+
this.sceneData.push(obj.para);
|
|
393
|
+
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
if (obj.para.flag === 'U') {
|
|
397
|
+
if (this.selectedScence !== obj.para.scenename) {
|
|
398
|
+
let index = this.sceneData.findIndex(el => el.scenename === obj.para.scenename);
|
|
399
|
+
if (index > -1) {
|
|
400
|
+
this.alert('场景名称[' + obj.para.scenename + ']已存在,请检查');
|
|
401
|
+
return false;
|
|
402
|
+
}
|
|
403
|
+
} else {
|
|
404
|
+
let index = this.sceneData.findIndex(el => el.scenename === obj.para.scenename);
|
|
405
|
+
if (index > -1) {
|
|
406
|
+
this.sceneData.splice(index,1,obj.para)
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
if (obj.para.flag === 'D') {
|
|
411
|
+
let index = this.sceneData.findIndex(el => el.scenename === obj.para.scenename);
|
|
412
|
+
if (index > -1) {
|
|
413
|
+
this.sceneData.splice(index,1)
|
|
414
|
+
}
|
|
415
|
+
this.filterFlag = false;
|
|
416
|
+
}
|
|
417
|
+
if (this.sceneData.length > 0) {
|
|
418
|
+
this.sceneFlag = true;
|
|
419
|
+
} else {
|
|
420
|
+
this.sceneFlag = false;
|
|
421
|
+
}
|
|
422
|
+
obj.para = this.$Method.copy(this.sceneData);
|
|
423
|
+
this.$emit('doAction', obj);
|
|
424
|
+
} else if (obj.name == 'closeFilter') {
|
|
425
|
+
this.closeFilterScene();
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
this.$emit('doAction', obj);
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
action(name) {
|
|
432
|
+
let para = {};
|
|
433
|
+
para.name = name;
|
|
434
|
+
this.$emit('doAction', para);
|
|
435
|
+
this.btnFlag = false;
|
|
436
|
+
},
|
|
437
|
+
addData () {
|
|
438
|
+
let para = {};
|
|
439
|
+
para.name = 'addData';
|
|
440
|
+
this.$emit('doAction', para);
|
|
441
|
+
},
|
|
442
|
+
filterAction(name) {
|
|
443
|
+
let temp = this.sceneData.find(el => el.scenename === name);
|
|
444
|
+
if (temp) {
|
|
445
|
+
this.selectedScence = temp.scenename;
|
|
446
|
+
this.$refs.filter.setData(temp);
|
|
447
|
+
this.$nextTick(() => {
|
|
448
|
+
this.filterFlag = true;
|
|
449
|
+
this.filterSceneFlag = false;
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
updataFilterScene() {
|
|
454
|
+
this.filterFlag = !this.filterFlag
|
|
455
|
+
if (!this.selectedScence && this.filterFlag) {
|
|
456
|
+
this.$refs.filter.addScene();
|
|
457
|
+
this.selectedScence = false;
|
|
458
|
+
}
|
|
459
|
+
this.filterSceneFlag = false;
|
|
460
|
+
this.btnFlag = false;
|
|
461
|
+
},
|
|
462
|
+
addScene (tmp) {
|
|
463
|
+
this.sceneData.push(tmp);
|
|
464
|
+
this.selectedScence = tmp.scenename;
|
|
465
|
+
},
|
|
466
|
+
updateScene(name,tmp) {
|
|
467
|
+
let index = this.sceneData.findIndex(el => el.scenename === name);
|
|
468
|
+
if (index > -1) {
|
|
469
|
+
this.sceneData.splice(index,1,tmp);
|
|
470
|
+
this.selectedScence = tmp.scenename;
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
delScence(name) {
|
|
474
|
+
let index = this.sceneData.findIndex(el => el.scenename === name);
|
|
475
|
+
if (index > -1) {
|
|
476
|
+
this.sceneData.splice(index,1);
|
|
477
|
+
this.selectedScence ='';
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
};
|
|
484
|
+
</script>
|
|
485
|
+
<style lang="less" scoped>
|
|
486
|
+
.dividercommon {
|
|
487
|
+
margin:1px 12px 0 12px;
|
|
488
|
+
height:32px;
|
|
489
|
+
}
|
|
490
|
+
</style>
|