centaline-data-driven 1.5.22 → 1.5.24
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 +25 -1
- package/src/Form.vue +2 -2
- package/src/SearchList.vue +11 -1
- package/src/centaline/dynamicForm/src/dynamicForm.vue +6 -0
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +32 -1
- package/src/centaline/dynamicTimeSelect/src/dynamicTimeSelect.vue +1 -1
- package/src/centaline/loader/src/ctl/Form.js +16 -22
- package/src/centaline/loader/src/ctl/SearchTable.js +20 -20
- package/src/centaline/loader/src/ctl/TimeSelect.js +2 -2
- package/src/main.js +7 -6
- package/wwwroot/static/centaline/centaline-data-driven.js +2 -2
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
package/release-log.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
|
+
## v1.5.24
|
|
2
|
+
2023-06-13
|
|
3
|
+
|
|
4
|
+
bug修复
|
|
5
|
+
|
|
6
|
+
解决固定列拖动,固定列中间出现空白
|
|
7
|
+
|
|
8
|
+
拖动某列,会改变另一列的宽
|
|
9
|
+
|
|
10
|
+
TimeSelect返回没有值处理
|
|
11
|
+
|
|
12
|
+
容器主键js赋值优化
|
|
13
|
+
|
|
14
|
+
## v1.5.23
|
|
15
|
+
2023-06-12
|
|
16
|
+
|
|
17
|
+
优化
|
|
18
|
+
|
|
19
|
+
表单保存时,根据保存按钮的actionType来关闭Tab
|
|
20
|
+
|
|
21
|
+
bug修复
|
|
22
|
+
|
|
23
|
+
合并行刷新bug处理
|
|
24
|
+
|
|
1
25
|
## v1.5.22
|
|
2
|
-
2023-06-
|
|
26
|
+
2023-06-09
|
|
3
27
|
|
|
4
28
|
优化
|
|
5
29
|
|
package/src/Form.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
|
|
3
3
|
<!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
|
|
4
|
-
<ct-form :api="'/api/
|
|
4
|
+
<ct-form :api="'/api/data-driven-file/downTemplate'" :apiParam="apiParam" :topHeight="topHeight"></ct-form>
|
|
5
5
|
<ct-dialog-list></ct-dialog-list>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
data() {
|
|
13
13
|
return {
|
|
14
14
|
apiParam:{
|
|
15
|
-
"
|
|
15
|
+
"key":"excel:12be9cb7-fd3a-4f82-a583-d7e240dc7aab"
|
|
16
16
|
},
|
|
17
17
|
topHeight:10,
|
|
18
18
|
}
|
package/src/SearchList.vue
CHANGED
|
@@ -9,6 +9,16 @@
|
|
|
9
9
|
:searchDataApi="'/api/third-dept-tran/tran-list'">
|
|
10
10
|
</ct-searchlist> -->
|
|
11
11
|
|
|
12
|
+
<!-- <ct-searchlist :apiParam="para"
|
|
13
|
+
:searchConditionApi="'/api/transaction/adjustRecord/getLayoutOfSearch'"
|
|
14
|
+
:searchDataApi="'/api/transaction/adjustRecord/getTableList'">
|
|
15
|
+
</ct-searchlist> -->
|
|
16
|
+
|
|
17
|
+
<ct-searchlist :apiParam="para"
|
|
18
|
+
:searchConditionApi="'/api/transfer_subscribe_master/layout'"
|
|
19
|
+
:searchDataApi="'/api/transfer_subscribe_master/transferSubscribeMasterList'">
|
|
20
|
+
</ct-searchlist>
|
|
21
|
+
|
|
12
22
|
<!-- <ct-searchlist :apiParam="para"
|
|
13
23
|
:searchConditionApi="'/wf/todo/wx/layout'"
|
|
14
24
|
:searchDataApi="'/wf/todo/wx/list'">
|
|
@@ -62,7 +72,7 @@
|
|
|
62
72
|
:searchDataApi="'/DistrictList/getListOfSearchModel'">
|
|
63
73
|
</ct-searchlist> -->
|
|
64
74
|
|
|
65
|
-
<ct-searchlist :searchConditionApi="'/RoleList/getLayoutOfSearch'" :searchStatsApi="'/RoleList/getListStats'" :searchDataApi="'/RoleList/getListOfSearchModel'"></ct-searchlist>
|
|
75
|
+
<!-- <ct-searchlist :searchConditionApi="'/RoleList/getLayoutOfSearch'" :searchStatsApi="'/RoleList/getListStats'" :searchDataApi="'/RoleList/getListOfSearchModel'"></ct-searchlist> -->
|
|
66
76
|
|
|
67
77
|
<ct-dialog-list></ct-dialog-list>
|
|
68
78
|
</div>
|
|
@@ -390,6 +390,12 @@
|
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
392
|
else {
|
|
393
|
+
if (self.$common.dialogList && self.$common.dialogList.List.length === 0
|
|
394
|
+
&& field.actionType && field.actionType===2 && data.notification !== 17) {
|
|
395
|
+
if (typeof self.$common.getDataDrivenOpts().handler.closeTab === 'function') {
|
|
396
|
+
self.$common.getDataDrivenOpts().handler.closeTab();
|
|
397
|
+
}
|
|
398
|
+
}
|
|
393
399
|
self.$emit('submit', { formData: self.model, responseData: data });
|
|
394
400
|
}
|
|
395
401
|
if (self.parentModel) {
|
|
@@ -52,7 +52,8 @@
|
|
|
52
52
|
column.width === undefined ? 'ct-table-auto' : null,
|
|
53
53
|
typeof column.fixed === 'undefined' ? 'right-no-fixation-th' : null,
|
|
54
54
|
model.columnWidthSaveAction ?'theadLine':'',
|
|
55
|
-
]" @mousemove="thMouseMoveHandle($event)" @mousedown="thMouseDownHandle($event, colIndex)"
|
|
55
|
+
]" @mousemove="thMouseMoveHandle($event)" @mousedown="thMouseDownHandle($event, colIndex)"
|
|
56
|
+
@mouseover="theadTitleHover" @mouseout="theadTitleLeave"
|
|
56
57
|
v-bind="column.attrs" id="thHeight">
|
|
57
58
|
<span>{{ column.name }}</span>
|
|
58
59
|
<span class="caret-wrapper" v-if="column.sort" @click="toSort($event, column)"
|
|
@@ -441,6 +442,8 @@ export default {
|
|
|
441
442
|
thMouseDownHandle(ev, colIndex) {
|
|
442
443
|
var self = this;
|
|
443
444
|
var col = self.model.columns[colIndex];
|
|
445
|
+
var PrevCol;
|
|
446
|
+
var NextCol;
|
|
444
447
|
var oldWidth=col.width;
|
|
445
448
|
if (ev.currentTarget.canResize) {
|
|
446
449
|
ev.currentTarget.isDown = true;
|
|
@@ -453,6 +456,8 @@ export default {
|
|
|
453
456
|
document.removeEventListener("mouseup", MouseUpHandle, false);
|
|
454
457
|
document.removeEventListener("mousemove", MouseMoveHandle, false);
|
|
455
458
|
|
|
459
|
+
|
|
460
|
+
|
|
456
461
|
//保存列宽
|
|
457
462
|
if(oldWidth!=col.width&&self.model.columnWidthSaveAction&&self.model.columnWidthSaveAction.length>0)
|
|
458
463
|
{
|
|
@@ -462,6 +467,7 @@ export default {
|
|
|
462
467
|
window.localStorage.setItem(self.model.title+"_"+ col.id, col.width);
|
|
463
468
|
}
|
|
464
469
|
|
|
470
|
+
|
|
465
471
|
//如果是高度可变的列,重新计算整个表的高度
|
|
466
472
|
if (col.autoRowHeight) {
|
|
467
473
|
self.model.listData.forEach((v) => {
|
|
@@ -474,6 +480,9 @@ export default {
|
|
|
474
480
|
};
|
|
475
481
|
var MouseMoveHandle = function () {
|
|
476
482
|
var ev1 = event || e;
|
|
483
|
+
if(ev1.stopPropagation) ev1.stopPropagation();
|
|
484
|
+
if(ev1.preventDefault) ev1.preventDefault();
|
|
485
|
+
|
|
477
486
|
if (self.currentTh.isDown) {
|
|
478
487
|
if (self.currentTh) {
|
|
479
488
|
if (typeof col.width === "undefined") {
|
|
@@ -505,6 +514,28 @@ export default {
|
|
|
505
514
|
) {
|
|
506
515
|
self.currentTh.style.minWidth = col.width + "px";
|
|
507
516
|
self.currentTh.style.width = col.width + "px";
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
//解决固定列拖动,列与列中间出现空白
|
|
520
|
+
if(col.attrs.style.left&&parseInt(col.attrs.style.left)>0)
|
|
521
|
+
// 解决固定列左边的空白
|
|
522
|
+
{
|
|
523
|
+
PrevCol= self.model.columns[colIndex-1];
|
|
524
|
+
if( PrevCol)
|
|
525
|
+
{
|
|
526
|
+
self.model.columns[colIndex].fixedSize=PrevCol.width;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
// 解决固定列右边的空白
|
|
530
|
+
NextCol= self.model.columns[colIndex+1];
|
|
531
|
+
if( NextCol)
|
|
532
|
+
{
|
|
533
|
+
if(NextCol.attrs.style.left)
|
|
534
|
+
{
|
|
535
|
+
self.model.columns[colIndex+1].fixedSize=col.width;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
|
|
508
539
|
self.getScrollAttr();
|
|
509
540
|
}
|
|
510
541
|
}
|
|
@@ -48,20 +48,13 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
48
48
|
rtn._fieldsDic = {};
|
|
49
49
|
if (rtn.fields) {
|
|
50
50
|
rtn.fields.forEach((f) => {
|
|
51
|
-
if (f.type == Enum.ControlType.Compound) {
|
|
51
|
+
if (f.type == Enum.ControlType.Compound || f.type == Enum.ControlType.ContainerControl) {
|
|
52
52
|
if (f.fields) {
|
|
53
53
|
f.fields.forEach((v) => {
|
|
54
54
|
rtn._fieldsDic[v.id] = v;
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
// else if (f.type == Enum.ControlType.ContainerControl) {
|
|
59
|
-
// if (f.compoundFields) {
|
|
60
|
-
// f.compoundFields.forEach((v) => {
|
|
61
|
-
// rtn._fieldsDic[v.id] = v;
|
|
62
|
-
// });
|
|
63
|
-
// }
|
|
64
|
-
// }
|
|
65
58
|
rtn._fieldsDic[f.id] = f;
|
|
66
59
|
});
|
|
67
60
|
}
|
|
@@ -227,22 +220,22 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
227
220
|
//设置Field的属性attrKey的值
|
|
228
221
|
setValueByFieldName(id, attrKey, attrValue) {
|
|
229
222
|
attrKey = this.common.initialsToLowerCase(attrKey);
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
223
|
+
var rtn1 = this.fieldsDic[id];
|
|
224
|
+
if (rtn1) {
|
|
225
|
+
if(attrKey=='code1' && rtn1.source.controlType===4
|
|
226
|
+
&& attrValue!=undefined && attrValue!=null && attrValue!=''){
|
|
227
|
+
if(rtn1.source.decimals1 != undefined && rtn1.source.decimals1 != null && rtn1.source.decimals1>-1){
|
|
228
|
+
attrValue = Number(attrValue).toFixed(rtn1.source.decimals1)
|
|
237
229
|
}
|
|
238
|
-
|
|
239
|
-
|
|
230
|
+
}
|
|
231
|
+
rtn1.source[attrKey] = attrValue;
|
|
232
|
+
this.form.hatchHandle(id, attrKey, attrValue, rtn1);
|
|
240
233
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
234
|
+
//用于处理源数据改动,强制更新视图数据 todo
|
|
235
|
+
if (rtn1.self.$forceUpdate) {
|
|
236
|
+
rtn1.self.$forceUpdate();
|
|
245
237
|
}
|
|
238
|
+
}
|
|
246
239
|
},
|
|
247
240
|
setValueByFieldNameFromParent(id, attrKey, attrValue) {
|
|
248
241
|
if(this.form && this.form.self && this.form.self.$parent){
|
|
@@ -494,7 +487,8 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
494
487
|
}
|
|
495
488
|
);
|
|
496
489
|
},
|
|
497
|
-
//消息提示 type主题:success/warning/info/error。 duration 显示时间, 毫秒。设为 0 则不会自动关闭。
|
|
490
|
+
//消息提示 type主题:success/warning/info/error。 center是否居中true/flase。 duration 显示时间, 毫秒。设为 0 则不会自动关闭。
|
|
491
|
+
//showClose 是否显示关闭按钮。dangerouslyUseHtmlString 属性设置为 true ,message 就会被当做 HTML 片段处理。
|
|
498
492
|
message(message, type, center, duration, showClose, dangerouslyUseHTMLString) {
|
|
499
493
|
if (typeof center === 'undefined') {
|
|
500
494
|
center = true;
|
|
@@ -640,7 +640,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
640
640
|
if (response.rtnCode === Enum.ReturnCode.Successful) {
|
|
641
641
|
if (response.content.rows.length > 0) {
|
|
642
642
|
if (router.flagAddRowAfterAction) {
|
|
643
|
-
rtn.setStyleRow(response.content.rows);
|
|
643
|
+
// rtn.setStyleRow(response.content.rows);
|
|
644
644
|
response.content.rows.forEach((nr) => {
|
|
645
645
|
rtn.listData.unshift(nr);
|
|
646
646
|
});
|
|
@@ -663,6 +663,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
+
rtn.setRow(rtn.listData);
|
|
666
667
|
|
|
667
668
|
if (typeof response.content.foot !== 'undefined') {
|
|
668
669
|
self.footer = response.content.foot;
|
|
@@ -786,36 +787,35 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
786
787
|
if (rtn.rowMergedColumns.length === 0) {
|
|
787
788
|
return;
|
|
788
789
|
}
|
|
790
|
+
rtn._lastRowspan=null;
|
|
789
791
|
|
|
790
792
|
for (let i = 0; i < rows.length; i++) {
|
|
791
793
|
let row = rows[i];
|
|
792
|
-
if (
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
equalNum++;
|
|
799
|
-
}
|
|
800
|
-
else {
|
|
801
|
-
break;
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
//当所有列都相等时
|
|
806
|
-
if (equalNum === rtn.rowMergedColumns.length) {
|
|
807
|
-
row.$rowspan = 0;
|
|
808
|
-
rtn._lastRowspan.$rowspan++;
|
|
794
|
+
if (rtn._lastRowspan !== null) {
|
|
795
|
+
let equalNum = 0;
|
|
796
|
+
for (let j = 0; j < rtn.rowMergedColumns.length; j++) {
|
|
797
|
+
let rowMerged = rtn.rowMergedColumns[j];
|
|
798
|
+
if (row[rowMerged] === rtn._lastRowspan[rowMerged]) {
|
|
799
|
+
equalNum++;
|
|
809
800
|
}
|
|
810
801
|
else {
|
|
811
|
-
|
|
812
|
-
rtn._lastRowspan = row;
|
|
802
|
+
break;
|
|
813
803
|
}
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
//当所有列都相等时
|
|
807
|
+
if (equalNum === rtn.rowMergedColumns.length) {
|
|
808
|
+
row.$rowspan = 0;
|
|
809
|
+
rtn._lastRowspan.$rowspan++;
|
|
814
810
|
}
|
|
815
811
|
else {
|
|
816
812
|
row.$rowspan = 1;
|
|
817
813
|
rtn._lastRowspan = row;
|
|
818
814
|
}
|
|
815
|
+
}
|
|
816
|
+
else {
|
|
817
|
+
row.$rowspan = 1;
|
|
818
|
+
rtn._lastRowspan = row;
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
821
|
},
|
|
@@ -59,7 +59,7 @@ const TimeSelect = function (source, isRange, dateType) {
|
|
|
59
59
|
var rtnFormObj = {};
|
|
60
60
|
Object.defineProperty(rtnFormObj, source.fieldName1, {
|
|
61
61
|
get: function () {
|
|
62
|
-
if(source.code1){
|
|
62
|
+
if(source.code1 && source.format != "HH:mm" && Object.prototype.toString.call(source.code1) === "[object Date]"){
|
|
63
63
|
return common.formatDate(source.code1, rtn.valueFormat);
|
|
64
64
|
}
|
|
65
65
|
return source.code1;
|
|
@@ -69,7 +69,7 @@ const TimeSelect = function (source, isRange, dateType) {
|
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(rtnFormObj, source.fieldName2, {
|
|
71
71
|
get: function () {
|
|
72
|
-
if(source.code2){
|
|
72
|
+
if(source.code2 && source.format != "HH:mm" && Object.prototype.toString.call(source.code2) === "[object Date]"){
|
|
73
73
|
return common.formatDate(source.code2, rtn.valueFormat);
|
|
74
74
|
}
|
|
75
75
|
return source.code2;
|
package/src/main.js
CHANGED
|
@@ -14,7 +14,7 @@ Vue.use(ElementUI, { size: 'mini'});
|
|
|
14
14
|
// 关闭生产模式下给出的提示
|
|
15
15
|
Vue.config.productionTip = false;
|
|
16
16
|
Vue.use(centaline, {
|
|
17
|
-
baseUrl: "http://10.88.22.46:17070/max-uplink-api/",
|
|
17
|
+
// baseUrl: "http://10.88.22.46:17070/max-uplink-api/",
|
|
18
18
|
// baseUrl: "http://10.88.22.13:17070/max-uplink-api/",
|
|
19
19
|
// baseUrl: "http://10.6.1.163:9000/max-uplink-api/v1/form/router",
|
|
20
20
|
// baseUrl: "http://10.25.10.67:9999/service-api/v1/form/router",
|
|
@@ -23,7 +23,8 @@ Vue.use(centaline, {
|
|
|
23
23
|
// baseUrl: "http://10.88.22.69:8080/api/",
|
|
24
24
|
// baseUrl: "http://10.88.22.40:8080/api/",
|
|
25
25
|
// baseUrl: "http://10.58.2.108:8080/",
|
|
26
|
-
|
|
26
|
+
baseUrl: "http://tjcptest.centaline.com.cn/",
|
|
27
|
+
// baseUrl: "http://tjcpuat.centaline.com.cn:9090/",
|
|
27
28
|
flagRouterSelf: true,
|
|
28
29
|
zindex: 999,
|
|
29
30
|
showRequestSuccessMessage: true,
|
|
@@ -52,13 +53,13 @@ Vue.use(centaline, {
|
|
|
52
53
|
// 获取请求头
|
|
53
54
|
getRequestHeaders: function () {
|
|
54
55
|
return {
|
|
55
|
-
oldToken: '
|
|
56
|
+
oldToken: '11c12506-253c-4995-83fb-84cf51cb23a0',
|
|
56
57
|
token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQRO_iOiv5s1570zn-NBwiIuBIoUIkkUCIuxMEdPRMMRq95s1dzOsgWmHIccikIFr0gKQsMJYCURKxKdKYlHr-BH7UNz26yCFkByg7Aiw2A-tYwLDtEubgUibRiHo9i1aRRy-dtdSIab-8gdNKvcA618uu3v5x7rRMm3YkOZAfR6BtAWp_3LQHBNI8KHbkqlHi8QQAAP__.RrBgBqaFlp478oO3g5k_EEtjPt_o8qpJBkzgSP78Wa4',
|
|
57
|
-
authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.
|
|
58
|
+
authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjEOwjAQBP_iOif57LPvnC62k4ZHRAk4UqgQSSQQ4u-AgI6eKbaYZvamlm1UtcrSaEqdhdQaB5TZQdOxQEwiOhq2FKUPH-DHfOkRKTD6FprACciTBcEkkMgn6nJrU8yqUuVyUjV68ayFJVRqHta38MbYl9iWct6V6z_OHdf5mS2ekSc3QgmTB9JGYERBkINDa4aw1yTq_gAAAP__.1gZ4BknjckS1IuDq6im1VqDqoeZyKfS44jQ9_8Bifs8"}',
|
|
58
59
|
|
|
59
60
|
originalRequestURL: 'http://10.88.22.67:8080',
|
|
60
|
-
EstateInfo: '{"estateId":"
|
|
61
|
-
estateId: '
|
|
61
|
+
EstateInfo: '{"estateId":"201806071109550C867184E8BCA56EC3","estateName":"C%E5%BE%A1%E6%9E%97%E5%B1%B1%E6%99%AF%E6%A5%BC"}',
|
|
62
|
+
estateId: '201806071109550C867184E8BCA56EC3',
|
|
62
63
|
|
|
63
64
|
// authObject: '{"currentEstate":{"estateId":"20191114134322C29C9B83A84F192964","estateName":"C%E5%BE%A1%E6%9E%97%E5%B1%B1%E6%99%AF%E6%A5%BC"},"platform":1,"osVersion":"","clientVersion":"","machineCode":"ce04f173da7df2e78a9da25595111387","token":"","random":"XNEYyu","time":1683686365201,"sign":"79be68006872c6a088eb49f7e3dab45a"}',
|
|
64
65
|
AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjYyOTk5ZDhjLTYwY2MtNGM0OS05MzM4LWY1MTBhNjI5OGVjYiJ9.A7lCMb4mBHjse6DlvFLVV5jEQSWzREtlbeZJ6StCW4kVyyRG4RlkhRl2FJvaBZEdtoEItI52IEgBsX4X_H1m4w',
|