centaline-data-driven 1.3.33 → 1.3.34
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/src/centaline/api/index.js +9 -2
- package/src/centaline/dynamicForm/src/dynamicForm.vue +37 -3
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +69 -40
- package/src/centaline/loader/src/ctl/SearchScreen.js +33 -15
- package/src/centaline/loader/src/ctl/SearchTable.js +5 -1
- package/src/centaline/progress/src/progress.vue +15 -4
- package/src/main.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
|
@@ -201,12 +201,19 @@ const api = {
|
|
|
201
201
|
progressAction: data.content.action,
|
|
202
202
|
progressKey: data.content.key,
|
|
203
203
|
progressType:'export',
|
|
204
|
-
width: '
|
|
205
|
-
height: '
|
|
204
|
+
width: '350px',
|
|
205
|
+
height: '165px'
|
|
206
206
|
},
|
|
207
207
|
on: {
|
|
208
208
|
finished() {
|
|
209
209
|
Vue.prototype.$common.closeDialog(dialogOption.dialog);
|
|
210
|
+
},
|
|
211
|
+
error(data) {
|
|
212
|
+
Vue.prototype.$common.closeDialog(dialogOption.dialog);
|
|
213
|
+
Vue.prototype.$message({
|
|
214
|
+
message: data.rtnMsg,
|
|
215
|
+
type: 'info'
|
|
216
|
+
});
|
|
210
217
|
}
|
|
211
218
|
}
|
|
212
219
|
}]
|
|
@@ -427,6 +427,36 @@
|
|
|
427
427
|
});
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
+
else if (field.flagAsync) {
|
|
431
|
+
field.doAction(submitData, (res) => {
|
|
432
|
+
if(res.content && res.content.action){
|
|
433
|
+
var dialogOption = {
|
|
434
|
+
title: field.pageTitle == undefined ? field.label : field.pageTitle,
|
|
435
|
+
content: [{
|
|
436
|
+
component: 'ct-progress',
|
|
437
|
+
attrs: {
|
|
438
|
+
progressAction: res.content.action,
|
|
439
|
+
progressKey: res.content.key,
|
|
440
|
+
progressType:'import',
|
|
441
|
+
width: '350px',
|
|
442
|
+
height: '165px'
|
|
443
|
+
},
|
|
444
|
+
on: {
|
|
445
|
+
finished() {
|
|
446
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
447
|
+
self.getPage(1);
|
|
448
|
+
},
|
|
449
|
+
error(data) {
|
|
450
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
451
|
+
self.$message.warning(data.rtnMsg);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}]
|
|
455
|
+
};
|
|
456
|
+
self.$common.openDialog(dialogOption);
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
}
|
|
430
460
|
else {
|
|
431
461
|
submitData = field.getActionPara(submitData).para;
|
|
432
462
|
field.doAction(submitData, (data) => {
|
|
@@ -496,18 +526,22 @@
|
|
|
496
526
|
progressAction: res.content.action,
|
|
497
527
|
progressKey: res.content.key,
|
|
498
528
|
progressType:'import',
|
|
499
|
-
width: '
|
|
500
|
-
height: '
|
|
529
|
+
width: '350px',
|
|
530
|
+
height: '165px'
|
|
501
531
|
},
|
|
502
532
|
on: {
|
|
503
533
|
finished(data) {
|
|
504
534
|
self.$common.closeDialog(dialogOption.dialog);
|
|
505
535
|
if(field && field.changeCallBackFunName){
|
|
506
|
-
self.changeCallBackHandler(field, field.changeCallBackFunName, data.content
|
|
536
|
+
self.changeCallBackHandler(field, field.changeCallBackFunName, data.content);
|
|
507
537
|
}
|
|
508
538
|
else{
|
|
509
539
|
self.model.doAction(data);
|
|
510
540
|
}
|
|
541
|
+
},
|
|
542
|
+
error(data) {
|
|
543
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
544
|
+
self.$message.warning(data.rtnMsg);
|
|
511
545
|
}
|
|
512
546
|
}
|
|
513
547
|
}]
|
|
@@ -929,6 +929,36 @@ export default {
|
|
|
929
929
|
}
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
|
+
else if (field.flagAsync) {
|
|
933
|
+
field.doAction(submitData, (res) => {
|
|
934
|
+
if(res.content && res.content.action){
|
|
935
|
+
var dialogOption = {
|
|
936
|
+
title: field.pageTitle == undefined ? field.label : field.pageTitle,
|
|
937
|
+
content: [{
|
|
938
|
+
component: 'ct-progress',
|
|
939
|
+
attrs: {
|
|
940
|
+
progressAction: res.content.action,
|
|
941
|
+
progressKey: res.content.key,
|
|
942
|
+
progressType:'import',
|
|
943
|
+
width: '350px',
|
|
944
|
+
height: '165px'
|
|
945
|
+
},
|
|
946
|
+
on: {
|
|
947
|
+
finished() {
|
|
948
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
949
|
+
self.getPage(1);
|
|
950
|
+
},
|
|
951
|
+
error(data) {
|
|
952
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
953
|
+
self.$message.warning(data.rtnMsg);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}]
|
|
957
|
+
};
|
|
958
|
+
self.$common.openDialog(dialogOption);
|
|
959
|
+
}
|
|
960
|
+
});
|
|
961
|
+
}
|
|
932
962
|
else {
|
|
933
963
|
//self.operationLoading = true;
|
|
934
964
|
|
|
@@ -952,42 +982,40 @@ export default {
|
|
|
952
982
|
submit(ev) {
|
|
953
983
|
if (ev.responseData.notification == 24) {
|
|
954
984
|
//更新列
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
}
|
|
985
|
+
self.model.selectIndex=0;
|
|
986
|
+
if (self.currentRow !== null) {
|
|
987
|
+
for (var i = 0; i < self.currentRow.children.length; i++) {
|
|
988
|
+
self.currentRow.children[i].classList.remove("select");
|
|
960
989
|
}
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
990
|
+
}
|
|
991
|
+
if (typeof self.$refs.tableParent !== "undefined") {
|
|
992
|
+
self.$refs.tableParent.scrollTop = 0;
|
|
993
|
+
self.$refs.tableParent.scrollLeft = 0;
|
|
994
|
+
self.scrollTop = 0;
|
|
995
|
+
self.scrollLeft = 0;
|
|
996
|
+
}
|
|
997
|
+
self.$forceUpdate();
|
|
998
|
+
self.$nextTick(() => {
|
|
999
|
+
if (
|
|
1000
|
+
self.$refs.tableParent.scrollHeight <=
|
|
1001
|
+
self.$refs.tableParent.offsetHeight
|
|
1002
|
+
) {
|
|
1003
|
+
self.tableLoading = true;
|
|
1004
|
+
self.model.nextPage(next);
|
|
1005
|
+
} else {
|
|
1006
|
+
self.tableLoading = false;
|
|
1007
|
+
self.rowColorChange();
|
|
1008
|
+
self.resetScroll();
|
|
1009
|
+
self.calculatingRowHeight();
|
|
1010
|
+
self.getScrollAttr();
|
|
1011
|
+
}
|
|
1012
|
+
self.setfixedSize();
|
|
1013
|
+
});
|
|
984
1014
|
self.loaderObj.SearchTable(self.api,self.load,self.model.searchModel,true);
|
|
985
1015
|
self.$common.closeDialog(dialogOption.dialog);
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
!field.flagAddRowAfterAction
|
|
990
|
-
) {
|
|
1016
|
+
}
|
|
1017
|
+
else {
|
|
1018
|
+
if (!field.flagFreshCurrentRow &&!field.flagAddRowAfterAction) {
|
|
991
1019
|
self.model.doAction(ev);
|
|
992
1020
|
}
|
|
993
1021
|
self.$forceUpdate();
|
|
@@ -1063,10 +1091,7 @@ export default {
|
|
|
1063
1091
|
self.operationLoading = true;
|
|
1064
1092
|
field.doAction(submitData, (data) => {
|
|
1065
1093
|
self.operationLoading = false;
|
|
1066
|
-
if (
|
|
1067
|
-
!field.flagFreshCurrentRow &&
|
|
1068
|
-
!field.flagAddRowAfterAction
|
|
1069
|
-
) {
|
|
1094
|
+
if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
|
|
1070
1095
|
self.model.doAction({ responseData: data });
|
|
1071
1096
|
self.$emit("refreshRowHandle");
|
|
1072
1097
|
}
|
|
@@ -1421,19 +1446,23 @@ export default {
|
|
|
1421
1446
|
progressAction: res.content.action,
|
|
1422
1447
|
progressKey: res.content.key,
|
|
1423
1448
|
progressType:'import',
|
|
1424
|
-
width: '
|
|
1425
|
-
height: '
|
|
1449
|
+
width: '350px',
|
|
1450
|
+
height: '165px'
|
|
1426
1451
|
},
|
|
1427
1452
|
on: {
|
|
1428
1453
|
finished() {
|
|
1429
1454
|
self.$common.closeDialog(dialogOption.dialog);
|
|
1430
1455
|
self.getPage(1);
|
|
1456
|
+
},
|
|
1457
|
+
error(data) {
|
|
1458
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
1459
|
+
self.$message.warning(data.rtnMsg);
|
|
1431
1460
|
}
|
|
1432
1461
|
}
|
|
1433
1462
|
}]
|
|
1434
1463
|
};
|
|
1435
1464
|
self.$common.openDialog(dialogOption);
|
|
1436
|
-
|
|
1465
|
+
}
|
|
1437
1466
|
}
|
|
1438
1467
|
else{
|
|
1439
1468
|
if(field && field.changeCallBackFunName){
|
|
@@ -148,8 +148,7 @@ const SearchScreen = function (source, callBack, screenPara) {
|
|
|
148
148
|
});
|
|
149
149
|
},
|
|
150
150
|
//如果是复选框则searchValue1格式为 1,2
|
|
151
|
-
get searchData() {
|
|
152
|
-
|
|
151
|
+
get searchData() {
|
|
153
152
|
let that=this;
|
|
154
153
|
var rtn = {
|
|
155
154
|
fields: []
|
|
@@ -157,19 +156,16 @@ const SearchScreen = function (source, callBack, screenPara) {
|
|
|
157
156
|
this.screen.forEach((v) => {
|
|
158
157
|
var tempObj = common.deepClone(v.searchObj);
|
|
159
158
|
if ((tempObj.searchValue1 && tempObj.searchValue1 !== '') || (tempObj.searchValue2 && tempObj.searchValue2 !== '')) {
|
|
160
|
-
if(that.isHandle(v.type))
|
|
161
|
-
{
|
|
159
|
+
if(that.isHandle(v.type)){
|
|
162
160
|
tempObj.searchValue1=that.getNewSearchValue(tempObj);
|
|
163
161
|
}
|
|
164
|
-
rtn.fields.push(tempObj);
|
|
165
|
-
|
|
162
|
+
rtn.fields.push(tempObj);
|
|
166
163
|
}
|
|
167
164
|
});
|
|
168
165
|
this.highScreen.forEach((v) => {
|
|
169
166
|
var tempObj = common.deepClone(v.searchObj);
|
|
170
167
|
if ((tempObj.searchValue1 && tempObj.searchValue1 !== '') || (tempObj.searchValue2 && tempObj.searchValue2 !== '')) {
|
|
171
|
-
if(that.isHandle(v.type))
|
|
172
|
-
{
|
|
168
|
+
if(that.isHandle(v.type)){
|
|
173
169
|
tempObj.searchValue1=that.getNewSearchValue(tempObj);
|
|
174
170
|
}
|
|
175
171
|
rtn.fields.push(tempObj);
|
|
@@ -177,6 +173,35 @@ const SearchScreen = function (source, callBack, screenPara) {
|
|
|
177
173
|
});
|
|
178
174
|
return rtn;
|
|
179
175
|
},
|
|
176
|
+
get searchDataOfHide() {
|
|
177
|
+
let that=this;
|
|
178
|
+
var rtn = {
|
|
179
|
+
fields: []
|
|
180
|
+
};
|
|
181
|
+
this.screen.forEach((v) => {
|
|
182
|
+
if(v.type===Enum.ControlType.Hidden){
|
|
183
|
+
var tempObj = common.deepClone(v.searchObj);
|
|
184
|
+
if ((tempObj.searchValue1 && tempObj.searchValue1 !== '') || (tempObj.searchValue2 && tempObj.searchValue2 !== '')) {
|
|
185
|
+
if(that.isHandle(v.type)){
|
|
186
|
+
tempObj.searchValue1=that.getNewSearchValue(tempObj);
|
|
187
|
+
}
|
|
188
|
+
rtn.fields.push(tempObj);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
this.highScreen.forEach((v) => {
|
|
193
|
+
if(v.type===Enum.ControlType.Hidden){
|
|
194
|
+
var tempObj = common.deepClone(v.searchObj);
|
|
195
|
+
if ((tempObj.searchValue1 && tempObj.searchValue1 !== '') || (tempObj.searchValue2 && tempObj.searchValue2 !== '')) {
|
|
196
|
+
if(that.isHandle(v.type)){
|
|
197
|
+
tempObj.searchValue1=that.getNewSearchValue(tempObj);
|
|
198
|
+
}
|
|
199
|
+
rtn.fields.push(tempObj);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
return rtn;
|
|
204
|
+
},
|
|
180
205
|
getNewSearchValue(tempObj)
|
|
181
206
|
{
|
|
182
207
|
let codeList=JSON.parse(tempObj.searchValue1);
|
|
@@ -264,13 +289,6 @@ const SearchScreen = function (source, callBack, screenPara) {
|
|
|
264
289
|
});
|
|
265
290
|
},
|
|
266
291
|
export(btn, submitData) {
|
|
267
|
-
//Axios.post(common.globalUri(), { action: btn.action, search: this.searchData }).then((response) => {
|
|
268
|
-
// var fileName = response.data.content.fieldName1;
|
|
269
|
-
// var fileContent = window.atob(response.data.content.code1);
|
|
270
|
-
// common.saveFile(fileName, fileContent);
|
|
271
|
-
//}).catch((ex) => {
|
|
272
|
-
// console.log(ex);
|
|
273
|
-
//});
|
|
274
292
|
Vue.prototype.$api.postHandler(common.globalUri(),
|
|
275
293
|
{
|
|
276
294
|
action: btn.action,
|
|
@@ -558,7 +558,11 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
558
558
|
var self = this;
|
|
559
559
|
var searchFields = {
|
|
560
560
|
fields: []
|
|
561
|
-
};
|
|
561
|
+
};
|
|
562
|
+
//this.searchModel ? this.searchModel.searchData : { fields: [] };
|
|
563
|
+
if(this.searchModel && this.searchModel.searchDataOfHide){
|
|
564
|
+
searchFields=this.searchModel.searchDataOfHide
|
|
565
|
+
}
|
|
562
566
|
var searchValue1 = router.flagAddRowAfterAction ? rtnData.responseData.content : rtn.listData[rtn.selectIndex][self.primaryKey];
|
|
563
567
|
if (self.primaryKey) {
|
|
564
568
|
searchFields.fields.push({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ct-progress">
|
|
3
3
|
<div style="padding: 5px;">
|
|
4
|
-
<el-progress
|
|
5
|
-
<span
|
|
4
|
+
<el-progress type="circle" :percentage="percentage"></el-progress>
|
|
5
|
+
<span class="progressMsg">{{ message }}</span>
|
|
6
6
|
</div>
|
|
7
7
|
</div>
|
|
8
8
|
</template>
|
|
@@ -50,8 +50,11 @@
|
|
|
50
50
|
else if(data.rtnMsg){
|
|
51
51
|
self.message = data.rtnMsg;
|
|
52
52
|
}
|
|
53
|
+
else if(response.rtnMsg){
|
|
54
|
+
self.message = response.rtnMsg;
|
|
55
|
+
}
|
|
53
56
|
}
|
|
54
|
-
if (response.rtnCode === 200) {
|
|
57
|
+
if (response.rtnCode === 200 && data.rtnCode === 200) {
|
|
55
58
|
this.percentage = data.percentage;
|
|
56
59
|
if (data.flagFinished) {
|
|
57
60
|
if(this.progressType=='export'){
|
|
@@ -64,7 +67,7 @@
|
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
else {
|
|
67
|
-
|
|
70
|
+
self.$emit('error',data);
|
|
68
71
|
}
|
|
69
72
|
});
|
|
70
73
|
}
|
|
@@ -78,4 +81,12 @@
|
|
|
78
81
|
}
|
|
79
82
|
</script>
|
|
80
83
|
<style>
|
|
84
|
+
.ct-progress {
|
|
85
|
+
text-align: center;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.progressMsg {
|
|
89
|
+
margin-top: 5px;
|
|
90
|
+
display: block;
|
|
91
|
+
}
|
|
81
92
|
</style>
|
package/src/main.js
CHANGED
|
@@ -12,11 +12,11 @@ Vue.use(ElementUI, { size: 'mini'});
|
|
|
12
12
|
// 关闭生产模式下给出的提示
|
|
13
13
|
Vue.config.productionTip = false;
|
|
14
14
|
Vue.use(centaline, {
|
|
15
|
-
|
|
15
|
+
baseUrl: "http://10.88.22.46:7070/v1/form/router",
|
|
16
16
|
// baseUrl: "http://10.88.23.22:9999/v1/form/router",
|
|
17
|
-
baseUrl: "http://tjcptest.centaline.com.cn/",
|
|
17
|
+
// baseUrl: "http://tjcptest.centaline.com.cn/",
|
|
18
18
|
// baseUrl: "http://10.88.22.69:8080/",
|
|
19
|
-
flagRouterSelf: true,
|
|
19
|
+
// flagRouterSelf: true,
|
|
20
20
|
zindex: 999,
|
|
21
21
|
showRequestSuccessMessage: true,
|
|
22
22
|
showRequestErrorMessage: true,
|