centaline-data-driven 1.5.28 → 1.5.30
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/package.json +1 -1
- package/release-log.md +35 -0
- package/src/centaline/common/index.js +4 -1
- package/src/centaline/css/max.css +404 -295
- package/src/centaline/dynamicBtn/src/dynamicBtn.vue +121 -22
- package/src/centaline/dynamicFile/src/dynamicFile.vue +2 -2
- package/src/centaline/dynamicForm/src/dynamicForm.vue +6 -2
- package/src/centaline/dynamicInputNumber/src/dynamicInputNumber.vue +1 -0
- package/src/centaline/dynamicPhotoSelect/src/dynamicPhotoSelect.vue +1 -1
- package/src/centaline/dynamicRepeat/src/dynamicRepeat.vue +24 -16
- package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +14 -13
- package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +523 -6
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +1 -0
- package/src/centaline/dynamicSearchList/src/dynamicTableStats.vue +26 -14
- package/src/centaline/dynamicSos/src/dynamicSos.vue +3 -1
- package/src/centaline/dynamicTree/src/dynamicTree.vue +221 -60
- package/src/centaline/formData/index.js +4 -1
- package/src/centaline/loader/src/ctl/Button.js +42 -1
- package/src/centaline/loader/src/ctl/Repeat.js +43 -4
- package/src/centaline/loader/src/ctl/SearchScreen.js +126 -1
- package/src/centaline/loader/src/ctl/SearchTable.js +3 -1
- package/src/centaline/loader/src/ctl/Sos.js +1 -0
- package/src/centaline/loader/src/ctl/Tree.js +19 -1
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +2 -2
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
<div :class="isLayout === true ? 'ct-ptl0 max-ptb5' : 'ct-ptb5 max-ptb5'" v-if="showScreen">
|
|
5
5
|
<template v-for="(col, index) in model.screen" v-if="col.show !== false">
|
|
6
6
|
<br v-if="col.is === 'ct-linefeed'" />
|
|
7
|
-
<component v-else class="list-field max-list-field" v-bind="col.listBind" :is="col.is" :vmodel="col" :api="model.optionApi" :key="col.keyScreen"
|
|
8
|
-
|
|
7
|
+
<component v-else class="list-field max-list-field" v-bind="col.listBind" :is="col.is" :vmodel="col" :api="model.optionApi" :key="col.keyScreen" :actionRouters="model.actionRouters"
|
|
8
|
+
@click="clickHandler(col)" @change="changeHandler(col,$event)"></component>
|
|
9
9
|
</template>
|
|
10
|
-
<component v-for="(col, index) in model.btnScreen" :key="index" :is="col.is" :vmodel="col" :api="model.optionApi"
|
|
11
|
-
|
|
10
|
+
<component v-for="(col, index) in model.btnScreen" :key="index" :is="col.is" :vmodel="col" :api="model.optionApi" :actionRouters="model.actionRouters"
|
|
11
|
+
@click="clickHandler(col)" @change="changeHandler(col,$event)" @SaveSearchWhere="SaveSearchWhere" @SearchWhereManage="SearchWhereManage" @clichSearchWhere="clichSearchWhere"></component>
|
|
12
12
|
</div>
|
|
13
13
|
<div class="shortcutFollow max-shortcutFollow" style="padding-left: 20px;" v-if="model.shortcutForm">
|
|
14
14
|
<ct-form :source="model.shortcutForm.code1" @submit="saveShortcut"></ct-form>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<div style="width:100%">
|
|
18
18
|
<template v-for="(col, index) in highScreenRow" v-if="col.show !== false">
|
|
19
19
|
<br v-if="col.is === 'ct-linefeed'" />
|
|
20
|
-
<component v-else class="list-field" v-bind="col.listBind" :key="col.keyScreen" :is="col.is" :vmodel="col" :api="model.optionApi" @click="clickHandler(col)"></component>
|
|
20
|
+
<component v-else class="list-field" v-bind="col.listBind" :key="col.keyScreen" :is="col.is" :vmodel="col" :api="model.optionApi" :actionRouters="model.actionRouters" @click="clickHandler(col)"></component>
|
|
21
21
|
</template>
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
</div>
|
|
29
29
|
</template>
|
|
30
30
|
<script>
|
|
31
|
-
import
|
|
31
|
+
import common from '../../common';
|
|
32
|
+
import dynamicElement from '../../mixins/dynamicElement';
|
|
32
33
|
export default {
|
|
33
34
|
name: 'ct-searchscreen',
|
|
34
35
|
mixins: [dynamicElement],
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
},
|
|
47
48
|
data() {
|
|
48
49
|
return {
|
|
50
|
+
LabelName:'',
|
|
49
51
|
isLoading: true,
|
|
50
52
|
screenRow: [],
|
|
51
53
|
highScreenRow: [],
|
|
@@ -98,6 +100,511 @@
|
|
|
98
100
|
break;
|
|
99
101
|
}
|
|
100
102
|
},
|
|
103
|
+
clichSearchWhere(col) {
|
|
104
|
+
if (typeof col.scripts !== 'undefined') {
|
|
105
|
+
this.model.reset();
|
|
106
|
+
this.model.scripts.formData = this.model.formData;
|
|
107
|
+
this.model.scripts.formData.form = this.model;
|
|
108
|
+
this.model.scripts.formData.excuteData = this.model.screen;
|
|
109
|
+
this.model.scripts.formData.fieldsDic = this.model.screenDic;
|
|
110
|
+
this.$common.excute.call(this.model.scripts, col.scripts);
|
|
111
|
+
this.$emit('search', this.model.scripts.formData.form);
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
SaveSearchWhere(field) {
|
|
115
|
+
if (this.model.searchDataOfShow.fields.length == 0) {
|
|
116
|
+
this.$message({
|
|
117
|
+
message: "没有选择任何搜索条件,无需保存!",
|
|
118
|
+
type: 'warning',
|
|
119
|
+
showClose: true,
|
|
120
|
+
});
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
var submitData = {};
|
|
124
|
+
submitData["jsonData"] = JSON.stringify(this.model.searchData.fields);
|
|
125
|
+
this.clickHandlerfield(field, submitData)
|
|
126
|
+
},
|
|
127
|
+
SearchWhereManage(model) {
|
|
128
|
+
let field = this.model.actionRouters.find((b) => {
|
|
129
|
+
return b.id === model.routerKey;
|
|
130
|
+
});
|
|
131
|
+
this.clickHandlerfieldManage(field);
|
|
132
|
+
},
|
|
133
|
+
clickHandlerfield(field, submitData) {
|
|
134
|
+
var self = this;
|
|
135
|
+
this.model.scripts.$fd = field.id;
|
|
136
|
+
this.model.scripts.$result = [];
|
|
137
|
+
|
|
138
|
+
var clickAcion = function (field) {
|
|
139
|
+
//若不是客户端方法,则直接访问接口
|
|
140
|
+
if (!field.isClientFuntion) {
|
|
141
|
+
let verified = true;
|
|
142
|
+
if (field.isSubmit) {
|
|
143
|
+
if (field.flagVerifyData) {
|
|
144
|
+
verified = self.validExcute();
|
|
145
|
+
}
|
|
146
|
+
if (verified) {
|
|
147
|
+
if (field.flagVerifyData && typeof field.onClick !== 'undefined') {
|
|
148
|
+
verified = self.$common.excute.call(self.model.scripts, field.onClick);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (verified) {
|
|
152
|
+
//action有值,提交到后台
|
|
153
|
+
if (field.action) {
|
|
154
|
+
field.disabled = true;//提交按钮禁用
|
|
155
|
+
self.model.pageDisabled = true;
|
|
156
|
+
|
|
157
|
+
if (field.flagAsync) {
|
|
158
|
+
field.doAction(self.getFormObj(), (res) => {
|
|
159
|
+
if (res.content && res.content.action) {
|
|
160
|
+
var dialogOption = {
|
|
161
|
+
title: field.pageTitle || field.label,
|
|
162
|
+
content: [{
|
|
163
|
+
component: 'ct-progress',
|
|
164
|
+
attrs: {
|
|
165
|
+
progressAction: res.content.action,
|
|
166
|
+
progressKey: res.content.key,
|
|
167
|
+
progressType: field.isExport ? 'export' : 'import',
|
|
168
|
+
width: '350px',
|
|
169
|
+
height: '165px'
|
|
170
|
+
},
|
|
171
|
+
on: {
|
|
172
|
+
finished(data) {
|
|
173
|
+
field.disabled = false;
|
|
174
|
+
self.model.pageDisabled = false;
|
|
175
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
176
|
+
if (data.rtnMsg) {
|
|
177
|
+
self.$message({
|
|
178
|
+
message: data.rtnMsg,
|
|
179
|
+
type: 'success',
|
|
180
|
+
showClose: true,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
if (data.notification === 17) {
|
|
184
|
+
self.clickHandler(self.model.getRtnRouter(data.content), null)
|
|
185
|
+
}
|
|
186
|
+
self.$emit('submit', { formData: self.model, responseData: data });
|
|
187
|
+
},
|
|
188
|
+
error(data) {
|
|
189
|
+
field.disabled = false;
|
|
190
|
+
self.model.pageDisabled = false;
|
|
191
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
192
|
+
self.$message({
|
|
193
|
+
message: data.rtnMsg,
|
|
194
|
+
type: 'warning',
|
|
195
|
+
showClose: true,
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}]
|
|
200
|
+
};
|
|
201
|
+
self.$common.openDialog(dialogOption);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
field.doAction(self.getFormObj(), (data) => {
|
|
207
|
+
field.disabled = false;
|
|
208
|
+
self.model.pageDisabled = false;
|
|
209
|
+
if (data.rtnCode === 200) {
|
|
210
|
+
if (data.notification === 17) {
|
|
211
|
+
self.clickHandler(self.model.getRtnRouter(data.content), null)
|
|
212
|
+
}
|
|
213
|
+
if (self.model.flagAlertClose) {
|
|
214
|
+
self.$common.confirm('操作成功,是否关闭本页面?', '提示', {
|
|
215
|
+
confirmButtonText: '确定',
|
|
216
|
+
cancelButtonText: '取消',
|
|
217
|
+
type: 'warning'
|
|
218
|
+
}).then(() => {
|
|
219
|
+
//如果没有弹框 则关闭tab页
|
|
220
|
+
if (self.$common.dialogList && self.$common.dialogList.List.length === 0) {
|
|
221
|
+
if (typeof self.$common.getDataDrivenOpts().handler.closeTab === 'function') {
|
|
222
|
+
self.$common.getDataDrivenOpts().handler.closeTab();
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
self.$emit('submit', { formData: self.model, responseData: data });
|
|
226
|
+
}).catch(() => {
|
|
227
|
+
self.init();
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
if (self.$common.dialogList && self.$common.dialogList.List.length === 0 && self.openType !== 'detail'
|
|
232
|
+
&& field.actionType && field.actionType === 2 && data.notification !== 17) {
|
|
233
|
+
if (typeof self.$common.getDataDrivenOpts().handler.closeTab === 'function') {
|
|
234
|
+
self.$common.getDataDrivenOpts().handler.closeTab();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
self.$emit('submit', { formData: self.model, responseData: data });
|
|
238
|
+
}
|
|
239
|
+
if (self.parentModel) {
|
|
240
|
+
self.parentModel.$vue.closeTabThen(data);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
else if (data.rtnCode === 202) {
|
|
244
|
+
self.$common.confirm(data.rtnMsg, '提示', {
|
|
245
|
+
confirmButtonText: '确定',
|
|
246
|
+
cancelButtonText: '取消',
|
|
247
|
+
type: 'warning'
|
|
248
|
+
}).then(() => {
|
|
249
|
+
field.doAction(self.getFormObj({ flagHaveAlert: '1' }), (res) => {
|
|
250
|
+
if (res.rtnCode === 200) {
|
|
251
|
+
if (res.notification === 17) {
|
|
252
|
+
self.clickHandler(self.model.getRtnRouter(res.content), null)
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
self.$emit('submit', { formData: self.model, responseData: res });
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
}).catch(() => {
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
}, self.model.scripts);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
}
|
|
266
|
+
//无值,触发submit事件
|
|
267
|
+
else {
|
|
268
|
+
self.$emit('submit', { formData: self.model, responseData: {} });
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
if (field.flagAttachSearchCondition) {
|
|
275
|
+
if (!self.validExcute()) {
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
if (typeof field.onClick !== 'undefined') {
|
|
280
|
+
verified = self.$common.excute.call(self.model.scripts, field.onClick);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if (!submitData) {
|
|
284
|
+
submitData = self.getFileData(field);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if (field.isTabInSystem) {
|
|
288
|
+
if (field.isOpenBaiduMap) {
|
|
289
|
+
submitData = field.getActionPara(submitData).para;
|
|
290
|
+
self.$common.getDataDrivenOpts().handler.openTabBaiduMap(submitData, field.pageTitle || field.label);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
else if (field.isTabInBrowse) {
|
|
294
|
+
|
|
295
|
+
}
|
|
296
|
+
else if (field.isLayerInSystem) {
|
|
297
|
+
if (field.isOpenBaiduMap) {
|
|
298
|
+
var dialogOption = {
|
|
299
|
+
title: field.pageTitle,
|
|
300
|
+
pane: self.$common.getParentPane(self),
|
|
301
|
+
content: [
|
|
302
|
+
{
|
|
303
|
+
component: "ct-mapBaidu",
|
|
304
|
+
attrs: {
|
|
305
|
+
field: field,
|
|
306
|
+
apiParam: field.getActionPara(submitData).para,
|
|
307
|
+
width: field.dialogWidth + "px",
|
|
308
|
+
height: field.dialogHeight + "px",
|
|
309
|
+
},
|
|
310
|
+
on: {
|
|
311
|
+
submit(ev) {
|
|
312
|
+
if (callBack) {
|
|
313
|
+
callBack(field);
|
|
314
|
+
}
|
|
315
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
316
|
+
},
|
|
317
|
+
closeDialog(ev) {
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
],
|
|
322
|
+
};
|
|
323
|
+
self.$common.openDialog(dialogOption);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
else if (field.isOpenForm) {
|
|
327
|
+
var dialogOption = {
|
|
328
|
+
title: field.pageTitle,
|
|
329
|
+
pane: self.$common.getParentPane(self),
|
|
330
|
+
content: [{
|
|
331
|
+
component: 'ct-form',
|
|
332
|
+
attrs: {
|
|
333
|
+
api: field.action,
|
|
334
|
+
apiParam: field.getActionPara(submitData).para,
|
|
335
|
+
showTitle: false,
|
|
336
|
+
width: field.dialogWidth + 'px',
|
|
337
|
+
height: field.dialogHeight + 'px',
|
|
338
|
+
documentHeight: self.documentHeight,
|
|
339
|
+
documentWidth: self.documentWidth,
|
|
340
|
+
},
|
|
341
|
+
on: {
|
|
342
|
+
submit(ev) {
|
|
343
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}]
|
|
347
|
+
};
|
|
348
|
+
self.$common.openDialog(dialogOption);
|
|
349
|
+
}
|
|
350
|
+
else if (field.isOpenList) {
|
|
351
|
+
var dialogOption = {
|
|
352
|
+
title: field.pageTitle,
|
|
353
|
+
pane: self.$common.getParentPane(self),
|
|
354
|
+
content: [{
|
|
355
|
+
component: 'ct-searchlist',
|
|
356
|
+
attrs: {
|
|
357
|
+
searchConditionApi: field.actionForSearchLayout,
|
|
358
|
+
searchDataApi: field.actionForSearch,
|
|
359
|
+
apiParam: submitData,
|
|
360
|
+
width: field.dialogWidth + 'px',
|
|
361
|
+
height: field.dialogHeight + 'px'
|
|
362
|
+
},
|
|
363
|
+
on: {
|
|
364
|
+
submit(ev) {
|
|
365
|
+
self.model.updateFields(ev, () => {
|
|
366
|
+
self.$refs.Fields.forEach((fd) => {
|
|
367
|
+
fd.$forceUpdate();
|
|
368
|
+
});
|
|
369
|
+
});
|
|
370
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}]
|
|
374
|
+
};
|
|
375
|
+
self.$common.openDialog(dialogOption);
|
|
376
|
+
}
|
|
377
|
+
else if (field.isFormPageInTab) {// 外部框架tab页打开
|
|
378
|
+
submitData = field.getActionPara(submitData).para;
|
|
379
|
+
self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle, self.model, field.dialogWidth);
|
|
380
|
+
}
|
|
381
|
+
else if (field.isSearchPageInTab) {// 外部框架tab页打开
|
|
382
|
+
submitData = field.getActionPara(submitData).para;
|
|
383
|
+
self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
384
|
+
}
|
|
385
|
+
else if (field.isOpenUrlInBrowse) {// 浏览器打开
|
|
386
|
+
window.open(submitData[field.submitFormField], "_blank");
|
|
387
|
+
}
|
|
388
|
+
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
389
|
+
submitData = field.getActionPara(submitData).para;
|
|
390
|
+
let query = self.$common.objectToQueryStr(submitData);
|
|
391
|
+
window.open(field.action + query, "_blank");
|
|
392
|
+
}
|
|
393
|
+
else if (field.isUrlInSystemTab) {//外部框架tab页打开URl
|
|
394
|
+
submitData = field.getActionPara(submitData).para;
|
|
395
|
+
let query = self.$common.objectToQueryStr(submitData);
|
|
396
|
+
let urlTab = field.action + query;
|
|
397
|
+
if (field.action.indexOf('?') > -1 && query.indexOf('?') > -1) {
|
|
398
|
+
urlTab = field.action + '&' + query.substr(1, query.length);
|
|
399
|
+
}
|
|
400
|
+
self.$common.getDataDrivenOpts().handler.openTabUrl(urlTab, field.pageTitle || field.label);
|
|
401
|
+
}
|
|
402
|
+
else if (field.isSeeVoice) {//看视频
|
|
403
|
+
self.$common.browseVideo(field, submitData)
|
|
404
|
+
}
|
|
405
|
+
else if (field.isExport || field.flagAsync) {
|
|
406
|
+
submitData = field.getActionPara(submitData).para;
|
|
407
|
+
if (field.flagAsync) {
|
|
408
|
+
field.doAction(submitData, (res) => {
|
|
409
|
+
if (res.content && res.content.action) {
|
|
410
|
+
var dialogOption = {
|
|
411
|
+
title: field.pageTitle || field.label,
|
|
412
|
+
content: [{
|
|
413
|
+
component: 'ct-progress',
|
|
414
|
+
attrs: {
|
|
415
|
+
progressAction: res.content.action,
|
|
416
|
+
progressKey: res.content.key,
|
|
417
|
+
progressType: field.isExport ? 'export' : 'import',
|
|
418
|
+
width: '350px',
|
|
419
|
+
height: '165px'
|
|
420
|
+
},
|
|
421
|
+
on: {
|
|
422
|
+
finished(data) {
|
|
423
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
424
|
+
if (data.rtnMsg) {
|
|
425
|
+
self.$message({
|
|
426
|
+
message: data.rtnMsg,
|
|
427
|
+
type: 'success',
|
|
428
|
+
showClose: true,
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
if (field && field.changeCallBackFunName) {
|
|
432
|
+
self.changeCallBackHandler(field, field.changeCallBackFunName, data.content);
|
|
433
|
+
}
|
|
434
|
+
else {
|
|
435
|
+
self.model.doAction(data);
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
error(data) {
|
|
439
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
440
|
+
self.$message({
|
|
441
|
+
message: data.rtnMsg,
|
|
442
|
+
type: 'warning',
|
|
443
|
+
showClose: true,
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}]
|
|
448
|
+
};
|
|
449
|
+
self.$common.openDialog(dialogOption);
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
else {
|
|
454
|
+
if (field.action.indexOf("http://") === 0 || field.action.indexOf("https://") === 0) {
|
|
455
|
+
//var tempwindow = window.open('about:blank');
|
|
456
|
+
//tempwindow.location = field.action;
|
|
457
|
+
if (field.action.indexOf("?") > -1) {
|
|
458
|
+
self.downloadUrl = field.action + "&" + Math.random();
|
|
459
|
+
}
|
|
460
|
+
else {
|
|
461
|
+
self.downloadUrl = field.action + "?" + Math.random();
|
|
462
|
+
}
|
|
463
|
+
// document.body.addEventListener('click', function() {
|
|
464
|
+
// window.open(field.action, "_blank");
|
|
465
|
+
// });
|
|
466
|
+
}
|
|
467
|
+
else {
|
|
468
|
+
field.doAction(submitData, (data) => {
|
|
469
|
+
if (data.content) {
|
|
470
|
+
if (data.content.indexOf("http://") === 0 || data.content.indexOf("https://") === 0) {
|
|
471
|
+
//var tempwindow = window.open('about:blank');
|
|
472
|
+
//tempwindow.location = data.content;
|
|
473
|
+
if (data.content.indexOf("?") > -1) {
|
|
474
|
+
self.downloadUrl = data.content + "&" + Math.random();
|
|
475
|
+
}
|
|
476
|
+
else {
|
|
477
|
+
self.downloadUrl = data.content + "?" + Math.random();
|
|
478
|
+
}
|
|
479
|
+
// document.body.addEventListener('click', function() {
|
|
480
|
+
// window.open(data.content, "_blank");
|
|
481
|
+
// });
|
|
482
|
+
}
|
|
483
|
+
else {
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
else {
|
|
491
|
+
submitData = field.getActionPara(submitData).para;
|
|
492
|
+
field.doAction(submitData, (data) => {
|
|
493
|
+
if (data.rtnCode === 200 || data.isSuccess) {
|
|
494
|
+
if (field && field.changeCallBackFunName) {
|
|
495
|
+
self.changeCallBackHandler(field, field.changeCallBackFunName, data.content);
|
|
496
|
+
}
|
|
497
|
+
else if (field.isRefersh) {
|
|
498
|
+
self.collapse.splice(0, self.collapse.length);
|
|
499
|
+
self.collapseActiveNames.splice(0, self.collapseActiveNames.length);
|
|
500
|
+
self.collapseFieldsRow.splice(0, self.collapseFieldsRow.length);
|
|
501
|
+
self.independentItem.splice(0, self.independentItem.length);
|
|
502
|
+
self.load(self.loaderObj.Form(data.content));
|
|
503
|
+
self.formKey = self.formKey + 1;
|
|
504
|
+
}
|
|
505
|
+
else {
|
|
506
|
+
self.model.doAction(data);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}, self.model.scripts);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
//执行客户端脚本
|
|
514
|
+
else {
|
|
515
|
+
if (!submitData) {
|
|
516
|
+
submitData = {};
|
|
517
|
+
var tempFormData = self.model.getFormObj();
|
|
518
|
+
field.submitFormField.forEach((v) => {
|
|
519
|
+
submitData[v] = self.$common.getDataOfUpperLower(tempFormData, v);
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
submitData = field.getActionPara(submitData).para;
|
|
523
|
+
let title = field.pageTitle == undefined ? field.label : field.pageTitle;
|
|
524
|
+
submitData.actionType = field.actionType;
|
|
525
|
+
var fun = self.$common.getDataDrivenOpts().handler[field.action];
|
|
526
|
+
fun(submitData, title, self.model);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
if (field.isSubmit && field.flagVerifyData && !self.validExcute()) {
|
|
531
|
+
return;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
if (field.alert) {
|
|
535
|
+
self.$common.confirm(field.alertMsg, field.alertCaption, {
|
|
536
|
+
confirmButtonText: field.alertOKButtonText,
|
|
537
|
+
cancelButtonText: field.alertCancelButtonText,
|
|
538
|
+
//type: 'warning'
|
|
539
|
+
center: field.alertCenter
|
|
540
|
+
}).then(() => {
|
|
541
|
+
clickAcion(field, submitData);
|
|
542
|
+
}).catch(() => {
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
else {
|
|
546
|
+
clickAcion(field, submitData);
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
clickHandlerfieldManage(field, submitData) {
|
|
550
|
+
var self = this;
|
|
551
|
+
var clickAcion = function (field) {
|
|
552
|
+
//若不是客户端方法,则直接访问接口
|
|
553
|
+
if (!field.isClientFuntion) {
|
|
554
|
+
if (!submitData) {
|
|
555
|
+
submitData = {};
|
|
556
|
+
field.getSearchPara().fields.forEach((f) => {
|
|
557
|
+
submitData[common.initialsToLowerCase(f.fieldName1)] = f.searchValue1;
|
|
558
|
+
});
|
|
559
|
+
submitData["sourceFrom"] = "setting";
|
|
560
|
+
}
|
|
561
|
+
var dialogOption = {
|
|
562
|
+
title: field.pageTitle,
|
|
563
|
+
pane: self.$common.getParentPane(self),
|
|
564
|
+
content: [{
|
|
565
|
+
component: 'ct-searchlist',
|
|
566
|
+
attrs: {
|
|
567
|
+
searchConditionApi: field.actionForSearchLayout,
|
|
568
|
+
searchDataApi: field.actionForSearch,
|
|
569
|
+
apiParam: submitData,
|
|
570
|
+
width: field.dialogWidth + 'px',
|
|
571
|
+
height: field.dialogHeight + 'px'
|
|
572
|
+
},
|
|
573
|
+
on: {
|
|
574
|
+
submit(ev) {
|
|
575
|
+
self.model.updateFields(ev, () => {
|
|
576
|
+
self.$refs.Fields.forEach((fd) => {
|
|
577
|
+
fd.$forceUpdate();
|
|
578
|
+
});
|
|
579
|
+
});
|
|
580
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}]
|
|
584
|
+
};
|
|
585
|
+
self.$common.openDialog(dialogOption);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
if (field.isSubmit && field.flagVerifyData && !self.validExcute()) {
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
if (field.alert) {
|
|
594
|
+
self.$common.confirm(field.alertMsg, field.alertCaption, {
|
|
595
|
+
confirmButtonText: field.alertOKButtonText,
|
|
596
|
+
cancelButtonText: field.alertCancelButtonText,
|
|
597
|
+
//type: 'warning'
|
|
598
|
+
center: field.alertCenter
|
|
599
|
+
}).then(() => {
|
|
600
|
+
clickAcion(field, submitData);
|
|
601
|
+
}).catch(() => {
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
else {
|
|
605
|
+
clickAcion(field, submitData);
|
|
606
|
+
}
|
|
607
|
+
},
|
|
101
608
|
loadScreen() {
|
|
102
609
|
var self = this;
|
|
103
610
|
var hasParent = self.model.screen.filter((v) => {
|
|
@@ -163,6 +670,13 @@
|
|
|
163
670
|
self.loadScreen();
|
|
164
671
|
self.loadHighScreen();
|
|
165
672
|
self.setScreenShow();
|
|
673
|
+
if (self.model.onload) {
|
|
674
|
+
self.model.scripts.formData = self.model.formData;
|
|
675
|
+
self.model.scripts.formData.form = self.model;
|
|
676
|
+
self.model.scripts.formData.excuteData = self.model.screen;
|
|
677
|
+
self.model.scripts.formData.fieldsDic = self.model.screenDic;
|
|
678
|
+
self.$common.excute.call(self.model.scripts, self.model.onload);
|
|
679
|
+
}
|
|
166
680
|
self.isLoading = false;
|
|
167
681
|
self.$emit('loaded', self.model.defaultSearch);
|
|
168
682
|
self.$emit('showTitle');
|
|
@@ -254,4 +768,7 @@
|
|
|
254
768
|
border-bottom-right-radius: 6px !important;
|
|
255
769
|
-webkit-box-shadow: #cfcece 0px 7px 9px 0px!important;
|
|
256
770
|
}
|
|
771
|
+
.el-message-box .el-button--small {
|
|
772
|
+
padding: 7px 15px;
|
|
773
|
+
}
|
|
257
774
|
</style>
|