centaline-data-driven 1.3.32 → 1.3.33
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/Form.vue +6 -2
- package/src/centaline/api/index.js +1 -0
- package/src/centaline/dynamicForm/src/dynamicForm.vue +36 -3
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +2 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +35 -4
- package/src/centaline/dynamicSearchList/src/dynamicTableToolbar.vue +2 -2
- package/src/centaline/loader/src/ctl/FormList.js +53 -21
- package/src/centaline/loader/src/ctl/SearchTable.js +2 -1
- package/src/centaline/progress/src/progress.vue +17 -6
- 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
package/src/Form.vue
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
|
|
3
3
|
<!-- <ct-form :api="'/PropertyRET/getLayoutOfNew'" :apiParam="apiParam"></ct-form> -->
|
|
4
4
|
<!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
|
|
5
|
-
<ct-form :api="'/api/third-dept-tran/transaction/
|
|
5
|
+
<ct-form :api="'/api/third-dept-tran/transaction/task'" :apiParam="apiParam"></ct-form>
|
|
6
6
|
<!--<ct-form :api="'api/Form/formdata'"></ct-form>-->
|
|
7
7
|
<ct-dialog-list></ct-dialog-list>
|
|
8
8
|
</div>
|
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
data() {
|
|
15
15
|
return {
|
|
16
16
|
apiParam:{
|
|
17
|
-
|
|
17
|
+
actionType: "1",
|
|
18
|
+
businessId: "1550013042447081473",
|
|
19
|
+
pageOnly: "true",
|
|
20
|
+
pageStyle: "2",
|
|
21
|
+
stepId: "1550014106894327810"
|
|
18
22
|
}
|
|
19
23
|
}
|
|
20
24
|
},
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
<component v-for="(btn, index) in model.buttons" :key="index" :is="btn.is" :vmodel="btn" @click="clickHandler" v-if="btn.show"></component>
|
|
75
75
|
</el-col>
|
|
76
76
|
</el-row>
|
|
77
|
+
<div v-if="isScroll" style="height: 34px;"></div>
|
|
77
78
|
</component>
|
|
78
79
|
</div>
|
|
79
80
|
<div style="min-height:200px" v-if="loading"></div>
|
|
@@ -484,11 +485,43 @@
|
|
|
484
485
|
}
|
|
485
486
|
},
|
|
486
487
|
importComplete(res,field) {
|
|
487
|
-
|
|
488
|
-
|
|
488
|
+
var self=this;
|
|
489
|
+
if(field.flagAsync){
|
|
490
|
+
if(res.content && res.content.action){
|
|
491
|
+
var dialogOption = {
|
|
492
|
+
title: "导入",
|
|
493
|
+
content: [{
|
|
494
|
+
component: 'ct-progress',
|
|
495
|
+
attrs: {
|
|
496
|
+
progressAction: res.content.action,
|
|
497
|
+
progressKey: res.content.key,
|
|
498
|
+
progressType:'import',
|
|
499
|
+
width: '300px',
|
|
500
|
+
height: '60px'
|
|
501
|
+
},
|
|
502
|
+
on: {
|
|
503
|
+
finished(data) {
|
|
504
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
505
|
+
if(field && field.changeCallBackFunName){
|
|
506
|
+
self.changeCallBackHandler(field, field.changeCallBackFunName, data.content.content);
|
|
507
|
+
}
|
|
508
|
+
else{
|
|
509
|
+
self.model.doAction(data);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}]
|
|
514
|
+
};
|
|
515
|
+
self.$common.openDialog(dialogOption);
|
|
516
|
+
}
|
|
489
517
|
}
|
|
490
518
|
else{
|
|
491
|
-
|
|
519
|
+
if(field && field.changeCallBackFunName){
|
|
520
|
+
this.changeCallBackHandler(field, field.changeCallBackFunName, res.content);
|
|
521
|
+
}
|
|
522
|
+
else{
|
|
523
|
+
this.model.doAction(res);
|
|
524
|
+
}
|
|
492
525
|
}
|
|
493
526
|
},
|
|
494
527
|
changeHandler(field) {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
var ctSpan = {//临时的span组件对象,用于vue双向绑定,强制更新
|
|
72
72
|
props: {
|
|
73
73
|
vmodel: Object,
|
|
74
|
-
rowNum:
|
|
74
|
+
rowNum: String,
|
|
75
75
|
},
|
|
76
76
|
data: function () {
|
|
77
77
|
return {
|
|
@@ -105,6 +105,7 @@
|
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
created() {
|
|
108
|
+
|
|
108
109
|
let self = this;
|
|
109
110
|
this.model = this.vmodel;
|
|
110
111
|
this.model.OptApi = this.api;
|
|
@@ -842,8 +842,7 @@ export default {
|
|
|
842
842
|
else if (field.isSeeVoice) {//看视频
|
|
843
843
|
self.$common.browseVideo(field, submitData);
|
|
844
844
|
}
|
|
845
|
-
else if (field.isBrowseAttachment) {
|
|
846
|
-
//浏览附件
|
|
845
|
+
else if (field.isBrowseAttachment) {//浏览附件
|
|
847
846
|
var MediaAlbum = [
|
|
848
847
|
{ albumName: self.model.title || "媒体", medias: [] },
|
|
849
848
|
];
|
|
@@ -1410,8 +1409,40 @@ export default {
|
|
|
1410
1409
|
);
|
|
1411
1410
|
}
|
|
1412
1411
|
},
|
|
1413
|
-
importComplete(res) {
|
|
1414
|
-
this
|
|
1412
|
+
importComplete(res,field) {
|
|
1413
|
+
var self=this;
|
|
1414
|
+
if(field.flagAsync){
|
|
1415
|
+
if(res.content && res.content.action){
|
|
1416
|
+
var dialogOption = {
|
|
1417
|
+
title: "导入",
|
|
1418
|
+
content: [{
|
|
1419
|
+
component: 'ct-progress',
|
|
1420
|
+
attrs: {
|
|
1421
|
+
progressAction: res.content.action,
|
|
1422
|
+
progressKey: res.content.key,
|
|
1423
|
+
progressType:'import',
|
|
1424
|
+
width: '300px',
|
|
1425
|
+
height: '60px'
|
|
1426
|
+
},
|
|
1427
|
+
on: {
|
|
1428
|
+
finished() {
|
|
1429
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
1430
|
+
self.getPage(1);
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
}]
|
|
1434
|
+
};
|
|
1435
|
+
self.$common.openDialog(dialogOption);
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
else{
|
|
1439
|
+
if(field && field.changeCallBackFunName){
|
|
1440
|
+
this.changeCallBackHandler(field, field.changeCallBackFunName, res.content);
|
|
1441
|
+
}
|
|
1442
|
+
else{
|
|
1443
|
+
this.model.doAction(res);
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1415
1446
|
},
|
|
1416
1447
|
tdRowspan(column, row) {
|
|
1417
1448
|
if (!column.show) {
|
|
@@ -116,9 +116,10 @@ const FormList = function (source, master) {
|
|
|
116
116
|
this._rows = [];
|
|
117
117
|
//遍历每一行
|
|
118
118
|
source.rows.forEach((r) => {
|
|
119
|
+
var gid = rtn.guid();
|
|
120
|
+
r.$sourceIndex = gid;
|
|
119
121
|
var row = rtn.initRow(r);
|
|
120
|
-
this._rows.push(row);
|
|
121
|
-
rtn._rows[rtn._rows.length - 1].$sourceIndex = rtn._rows.length - 1;
|
|
122
|
+
this._rows.push(row);
|
|
122
123
|
});
|
|
123
124
|
return this._rows;
|
|
124
125
|
}
|
|
@@ -135,6 +136,8 @@ const FormList = function (source, master) {
|
|
|
135
136
|
},
|
|
136
137
|
get deleted() {//是否已删除
|
|
137
138
|
return r.flagDeleted === true;
|
|
139
|
+
}, get deleted() {//是否已删除
|
|
140
|
+
return r.flagDeleted === true;
|
|
138
141
|
},
|
|
139
142
|
set deleted(v) {
|
|
140
143
|
if (v) {
|
|
@@ -143,7 +146,13 @@ const FormList = function (source, master) {
|
|
|
143
146
|
else {
|
|
144
147
|
r.flagDeleted = false;
|
|
145
148
|
}
|
|
149
|
+
}, get $sourceIndex() {//GID
|
|
150
|
+
return r.$sourceIndex||"";
|
|
151
|
+
},
|
|
152
|
+
set $sourceIndex(v) {//GID
|
|
153
|
+
return r.$sourceIndex=v;
|
|
146
154
|
}
|
|
155
|
+
,
|
|
147
156
|
};
|
|
148
157
|
//遍历每一列
|
|
149
158
|
let rowIndex = 0;
|
|
@@ -179,8 +188,8 @@ const FormList = function (source, master) {
|
|
|
179
188
|
var row = {};
|
|
180
189
|
for (let i = 1; i < rows.length; i++) {//遍历每一行
|
|
181
190
|
if (!rows[i].deleted) {
|
|
182
|
-
row = {};
|
|
183
|
-
Vue.set(row, '$sourceIndex', i);
|
|
191
|
+
row = {};
|
|
192
|
+
Vue.set(row, '$sourceIndex', rows[i].$sourceIndex);
|
|
184
193
|
for (let j = 0; j < rows[i].field.length; j++) {//遍历每一列
|
|
185
194
|
Vue.set(row, field[j].id, rows[i].field[j]);
|
|
186
195
|
}
|
|
@@ -208,12 +217,20 @@ const FormList = function (source, master) {
|
|
|
208
217
|
},
|
|
209
218
|
getCloneRowData(index) {
|
|
210
219
|
let row = {};
|
|
211
|
-
let sourceRow =
|
|
220
|
+
let sourceRow = {};
|
|
221
|
+
if (typeof index == "number") {
|
|
222
|
+
sourceRow = source.rows[index];
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
let i = source.rows.findIndex(v => v.$sourceIndex ===index);
|
|
226
|
+
sourceRow = source.rows[i];
|
|
227
|
+
}
|
|
228
|
+
|
|
212
229
|
let rowData = rtn.initRow(JSON.parse(JSON.stringify(sourceRow)));
|
|
213
230
|
for (let j = 0; j < rowData.field.length; j++) {//遍历每一列
|
|
214
231
|
row[rowData.field[j].id] = rowData.field[j];
|
|
215
232
|
}
|
|
216
|
-
row.$sourceIndex =
|
|
233
|
+
row.$sourceIndex = sourceRow.$sourceIndex+"";
|
|
217
234
|
return row;
|
|
218
235
|
},
|
|
219
236
|
fieldsToTableData(fields) {
|
|
@@ -235,7 +252,11 @@ const FormList = function (source, master) {
|
|
|
235
252
|
updateListField(refs, rowNum, fiedlId) {
|
|
236
253
|
if (refs) {
|
|
237
254
|
let ref = refs.find((v) => {
|
|
238
|
-
|
|
255
|
+
try {
|
|
256
|
+
return v.rowNum === rowNum && v.vmodel.id === fiedlId;
|
|
257
|
+
}
|
|
258
|
+
catch (e) {
|
|
259
|
+
}
|
|
239
260
|
});
|
|
240
261
|
if (ref) {
|
|
241
262
|
ref.$forceUpdate();
|
|
@@ -250,12 +271,11 @@ const FormList = function (source, master) {
|
|
|
250
271
|
//是否是复制的
|
|
251
272
|
isDuplicated(row, index) {
|
|
252
273
|
let isDuplicated = false;
|
|
253
|
-
|
|
254
274
|
if (rtn.primaryKeys && rtn.primaryKeys.length > 0) {
|
|
255
275
|
for (let i = 1; i < source.rows.length; i++) {//遍历数据源的每一行
|
|
256
276
|
let srow = source.rows[i].columns;
|
|
257
277
|
if (!source.rows[i].flagDeleted) {//该行已删除,跳过
|
|
258
|
-
if (index === -1 || i !== index) {
|
|
278
|
+
if (index === -1 || source.rows[i].$sourceIndex !== index) {
|
|
259
279
|
let temp = 0;
|
|
260
280
|
let tempLabel = '';
|
|
261
281
|
for (let j = 0; j < srow.length; j++) {//遍历数据源每一列
|
|
@@ -358,7 +378,7 @@ const FormList = function (source, master) {
|
|
|
358
378
|
setValueByFieldName:function(id, attrKey, attrValue){
|
|
359
379
|
return self.$self.parentModel.setValueByFieldName(id, attrKey, attrValue);
|
|
360
380
|
},
|
|
361
|
-
getListFieldValue:function(tableName, rowNum, fiedlId, attrName, defaultValue){
|
|
381
|
+
getListFieldValue: function (tableName, rowNum, fiedlId, attrName, defaultValue) {
|
|
362
382
|
return self.$self.parentModel.getListFieldValue(tableName, rowNum, fiedlId, attrName, defaultValue);
|
|
363
383
|
},
|
|
364
384
|
}
|
|
@@ -367,18 +387,20 @@ const FormList = function (source, master) {
|
|
|
367
387
|
common.openDialog(dialogOption);
|
|
368
388
|
},
|
|
369
389
|
addSourceRow(row) {
|
|
390
|
+
var gid = rtn.guid();
|
|
370
391
|
let sourceRow = JSON.parse(JSON.stringify(source.rows[0]));
|
|
371
392
|
for (let k in sourceRow.columns) {
|
|
372
393
|
sourceRow.columns[k] = row[sourceRow.columns[k].fieldName1].source;
|
|
373
394
|
};
|
|
395
|
+
sourceRow.$sourceIndex = gid;
|
|
374
396
|
source.rows.push(sourceRow);
|
|
375
397
|
let iRow = this.initRow(sourceRow);
|
|
376
398
|
iRow.isNewFlag = true;
|
|
377
|
-
rtn._rows.push(iRow);
|
|
378
|
-
rtn._rows[rtn._rows.length - 1].$sourceIndex = rtn._rows.length - 1;
|
|
399
|
+
rtn._rows.push(iRow);
|
|
379
400
|
Vue.set(row, 'edit', iRow.edit);
|
|
380
401
|
Vue.set(row, 'delete', iRow.delete);
|
|
381
|
-
row.$sourceIndex =
|
|
402
|
+
row.$sourceIndex =gid;
|
|
403
|
+
|
|
382
404
|
},
|
|
383
405
|
addRow(callback) {
|
|
384
406
|
var self = this;
|
|
@@ -419,8 +441,9 @@ const FormList = function (source, master) {
|
|
|
419
441
|
if (!isRepeat) {
|
|
420
442
|
source.rows.push(row);
|
|
421
443
|
rtn.rows.push(rowItem);
|
|
422
|
-
|
|
423
|
-
|
|
444
|
+
var gid = rtn.guid();
|
|
445
|
+
rtn._rows[rtn._rows.length - 1].$sourceIndex =gid;
|
|
446
|
+
rowData.$sourceIndex =gid;
|
|
424
447
|
rowData.edit = rowItem.edit;
|
|
425
448
|
rowData.delete = rowItem.delete;
|
|
426
449
|
rowItem.isNewFlag = true;
|
|
@@ -435,7 +458,7 @@ const FormList = function (source, master) {
|
|
|
435
458
|
setValueByFieldName:function(id, attrKey, attrValue){
|
|
436
459
|
return self.$self.parentModel.setValueByFieldName(id, attrKey, attrValue);
|
|
437
460
|
},
|
|
438
|
-
getListFieldValue:function(tableName, rowNum, fiedlId, attrName, defaultValue){
|
|
461
|
+
getListFieldValue: function (tableName, rowNum, fiedlId, attrName, defaultValue) {
|
|
439
462
|
return self.$self.parentModel.getListFieldValue(tableName, rowNum, fiedlId, attrName, defaultValue);
|
|
440
463
|
},
|
|
441
464
|
}
|
|
@@ -472,11 +495,12 @@ const FormList = function (source, master) {
|
|
|
472
495
|
rtn._rows.push(iRow);
|
|
473
496
|
Vue.set(r, 'edit', iRow.edit);
|
|
474
497
|
Vue.set(r, 'delete', iRow.delete);
|
|
475
|
-
|
|
476
|
-
|
|
498
|
+
var gid = rtn.guid();
|
|
499
|
+
rtn._rows[rtn._rows.length - 1].$sourceIndex = gid;
|
|
500
|
+
r.$sourceIndex = gid;
|
|
477
501
|
|
|
478
502
|
let rowData = rtn.rowsItemToTableData(iRow)
|
|
479
|
-
rowData.$sourceIndex =
|
|
503
|
+
rowData.$sourceIndex = gid;
|
|
480
504
|
rowData.edit = iRow.edit;
|
|
481
505
|
rowData.delete = iRow.delete;
|
|
482
506
|
rtn._tableData.push(rowData);
|
|
@@ -484,7 +508,7 @@ const FormList = function (source, master) {
|
|
|
484
508
|
}
|
|
485
509
|
},
|
|
486
510
|
insertOrUpdateRow(row) {
|
|
487
|
-
if(row){
|
|
511
|
+
if (row) {
|
|
488
512
|
if(rtn.primaryKeys && rtn.primaryKeys.length>0){
|
|
489
513
|
let iRow = rtn.initRow(row);
|
|
490
514
|
let flagAdd=true;
|
|
@@ -520,7 +544,8 @@ const FormList = function (source, master) {
|
|
|
520
544
|
}
|
|
521
545
|
else{
|
|
522
546
|
let rowData = rtn.rowsItemToTableData(iRow)
|
|
523
|
-
iRow.$sourceIndex=r.$sourceIndex;
|
|
547
|
+
iRow.$sourceIndex = r.$sourceIndex;
|
|
548
|
+
row.$sourceIndex = r.$sourceIndex;
|
|
524
549
|
rowData.$sourceIndex=r.$sourceIndex;
|
|
525
550
|
rowData.edit = iRow.edit;
|
|
526
551
|
rowData.delete = iRow.delete;
|
|
@@ -581,6 +606,13 @@ const FormList = function (source, master) {
|
|
|
581
606
|
});
|
|
582
607
|
}
|
|
583
608
|
},
|
|
609
|
+
guid() {
|
|
610
|
+
return (rtn.S4() + rtn.S4() + '-' + rtn.S4() + '-' + rtn.S4() + '-' + rtn.S4() + '-' + rtn.S4() + rtn.S4() + rtn.S4()
|
|
611
|
+
);
|
|
612
|
+
},
|
|
613
|
+
S4() {
|
|
614
|
+
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
615
|
+
}
|
|
584
616
|
};
|
|
585
617
|
return rtn;
|
|
586
618
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ct-progress">
|
|
3
|
-
<div>
|
|
3
|
+
<div style="padding: 5px;">
|
|
4
4
|
<el-progress :text-inside="true" :stroke-width="18" :percentage="percentage"></el-progress>
|
|
5
|
-
<span>{{message}}</span>
|
|
5
|
+
<span style="margin-top: 5px;">{{message}}</span>
|
|
6
6
|
</div>
|
|
7
7
|
</div>
|
|
8
8
|
</template>
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
props: {
|
|
14
14
|
progressAction: String,
|
|
15
15
|
progressKey: String,
|
|
16
|
+
progressType: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: 'export'
|
|
19
|
+
},
|
|
16
20
|
},
|
|
17
21
|
data() {
|
|
18
22
|
return {
|
|
@@ -39,14 +43,21 @@
|
|
|
39
43
|
|
|
40
44
|
this.$api.postHandler(this.$common.globalUri(), params, null).then((response) => {
|
|
41
45
|
const data = response.content;
|
|
42
|
-
if (data
|
|
43
|
-
|
|
46
|
+
if (data) {
|
|
47
|
+
if(data.processTaskName){
|
|
48
|
+
self.message = data.processTaskName;
|
|
49
|
+
}
|
|
50
|
+
else if(data.rtnMsg){
|
|
51
|
+
self.message = data.rtnMsg;
|
|
52
|
+
}
|
|
44
53
|
}
|
|
45
54
|
if (response.rtnCode === 200) {
|
|
46
55
|
this.percentage = data.percentage;
|
|
47
56
|
if (data.flagFinished) {
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
if(this.progressType=='export'){
|
|
58
|
+
window.open(data.content, "_blank");
|
|
59
|
+
}
|
|
60
|
+
setTimeout(() => { self.$emit('finished',data); }, 800);
|
|
50
61
|
}
|
|
51
62
|
else {
|
|
52
63
|
setTimeout(() => { self.getApiData() }, 1000);
|
package/src/main.js
CHANGED
|
@@ -14,8 +14,8 @@ 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
|
-
|
|
18
|
-
baseUrl: "http://10.88.22.69:8080/",
|
|
17
|
+
baseUrl: "http://tjcptest.centaline.com.cn/",
|
|
18
|
+
// baseUrl: "http://10.88.22.69:8080/",
|
|
19
19
|
flagRouterSelf: true,
|
|
20
20
|
zindex: 999,
|
|
21
21
|
showRequestSuccessMessage: true,
|
|
@@ -41,7 +41,7 @@ Vue.use(centaline, {
|
|
|
41
41
|
// 获取请求头
|
|
42
42
|
getRequestHeaders: function () {
|
|
43
43
|
return {
|
|
44
|
-
oldToken: '
|
|
44
|
+
oldToken: 'a0c6a2be-f79e-47ea-8490-212d5f4f4ff4',
|
|
45
45
|
originalRequestURL: 'http://10.88.22.67:8080',
|
|
46
46
|
EstateInfo: ' {"estateId":"201703020943128D8A8FCF463E4016D6","estateName":"%E4%B8%87%E7%A7%91%E4%BA%91%E5%9F%8E"}',
|
|
47
47
|
Authorization:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjYzMzZiMDJiLTZjOGEtNDIzNC05MGQ5LTliYWI2MTIyNTQzNyJ9.hOxMvGLm03QMPu9C4lgRzkEHC7ECqxJ_L6mfqQRqv39xJ42I8gzSRO-E68vWp-A99ewnxnqvTZ6H_6fOQ9DljQ',
|