centaline-data-driven 1.5.3 → 1.5.5
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 +3 -16
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +1 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +16 -0
- package/src/centaline/dynamicSearchListTab/src/dynamicSearchListOne.vue +5 -0
- package/src/centaline/dynamicSearchListTab/src/dynamicSearchListTab.vue +6 -7
- package/src/centaline/dynamicTree/src/dynamicTree.vue +37 -8
- package/src/centaline/loader/src/ctl/FormList.js +3 -3
- package/src/main.js +2 -1
- 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
|
@@ -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/agenttrans/transaction/readDetail'" :apiParam="apiParam" :topHeight="topHeight"></ct-form>
|
|
5
5
|
<ct-dialog-list></ct-dialog-list>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
@@ -11,21 +11,8 @@
|
|
|
11
11
|
name: 'DataDrivenForm',
|
|
12
12
|
data() {
|
|
13
13
|
return {
|
|
14
|
-
apiParam:{
|
|
15
|
-
:
|
|
16
|
-
"2",
|
|
17
|
-
commAdjustCategory
|
|
18
|
-
:
|
|
19
|
-
"CC01020020",
|
|
20
|
-
originalTraId
|
|
21
|
-
:
|
|
22
|
-
"1650403741662187522",
|
|
23
|
-
pageOnly
|
|
24
|
-
:
|
|
25
|
-
"true",
|
|
26
|
-
pageStyle
|
|
27
|
-
:
|
|
28
|
-
"2"
|
|
14
|
+
apiParam:{
|
|
15
|
+
propertyId: "202107291113120FACCA4E24992E8B26", actionType: 2
|
|
29
16
|
},
|
|
30
17
|
topHeight:10,
|
|
31
18
|
}
|
|
@@ -779,6 +779,22 @@ export default {
|
|
|
779
779
|
self.scrollTop = self.$refs.tableParent.scrollTop;
|
|
780
780
|
}
|
|
781
781
|
},
|
|
782
|
+
resetScrollActivated: function () {
|
|
783
|
+
if(this.$refs.tableParent){
|
|
784
|
+
if(this.scrollTop>this.$refs.tableParent.scrollTop) {
|
|
785
|
+
this.$refs.tableParent.scrollTop = this.scrollTop;
|
|
786
|
+
}
|
|
787
|
+
else if(this.model.selectIndex > 5 && this.$refs.tableParent.scrollTop===0){
|
|
788
|
+
let index = 0;
|
|
789
|
+
let topHeigth = 0;
|
|
790
|
+
for (; index < this.model.selectIndex; index++) {
|
|
791
|
+
topHeigth = topHeigth + (this.model.listData[index].$heigth ? this.model.listData[index].$heigth : 31);
|
|
792
|
+
}
|
|
793
|
+
this.scrollTop = topHeigth;
|
|
794
|
+
this.$refs.tableParent.scrollTop = this.scrollTop;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
},
|
|
782
798
|
rowKeyDownHandle(ev, action) {
|
|
783
799
|
var self = this;
|
|
784
800
|
if (action === 1) {
|
|
@@ -191,6 +191,11 @@
|
|
|
191
191
|
this.$refs.table.setTableHeight();
|
|
192
192
|
}
|
|
193
193
|
},
|
|
194
|
+
resetScrollActivated() {
|
|
195
|
+
if(this.$refs.table){
|
|
196
|
+
this.$refs.table.resetScrollActivated();
|
|
197
|
+
}
|
|
198
|
+
},
|
|
194
199
|
resizeSearchList() {
|
|
195
200
|
if(this.flagSideBar && this.flagSideBarOfData){
|
|
196
201
|
if(this.sideBarStatus=='open' && this.$refs.main){
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<div v-if="categorySource" class="el-tabs__content">
|
|
23
23
|
<div v-for="(col, index) in categorySource.selectItems1" v-show="activeIndex===index" v-loading="isLoading" :key="index" :index="index" class="el-tab-pane" role="tabpanel" aria-hidden="true">
|
|
24
24
|
<ct-searchlistOne v-if="col.loaded" :ref="'searchlist'+index" :searchConditionApi="searchConditionApi" :pageHeight="listHeight"
|
|
25
|
-
:searchStatsApi="searchStatsApi" :searchDataApi="searchDataApi" :apiParam="screenPara" @tableLoaded="tableLoaded">
|
|
25
|
+
:searchStatsApi="searchStatsApi" :searchDataApi="searchDataApi" :apiParam="col.screenPara" @tableLoaded="tableLoaded">
|
|
26
26
|
</ct-searchlistOne>
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
@@ -76,10 +76,8 @@
|
|
|
76
76
|
},
|
|
77
77
|
activated() {
|
|
78
78
|
this.$nextTick(() => {
|
|
79
|
-
if(this
|
|
80
|
-
|
|
81
|
-
this.$refs.detail.$children[0].refreshPage();
|
|
82
|
-
}
|
|
79
|
+
if(this.categorySource) {
|
|
80
|
+
this.$refs['searchlist'+this.activeIndex][0].resetScrollActivated();
|
|
83
81
|
}
|
|
84
82
|
})
|
|
85
83
|
},
|
|
@@ -119,7 +117,7 @@
|
|
|
119
117
|
let parm={};
|
|
120
118
|
parm[self.categorySource.fieldName1]=self.categorySource.selectItems1[self.activeIndex].code;
|
|
121
119
|
self.label=self.categorySource.selectItems1[self.activeIndex].displayName;
|
|
122
|
-
self.screenPara=parm;
|
|
120
|
+
self.categorySource.selectItems1[0].screenPara=parm;
|
|
123
121
|
self.listHeight=(self.$refs.main.offsetHeight-42)+'px';
|
|
124
122
|
self.categorySource.selectItems1[0].loaded=true;
|
|
125
123
|
}
|
|
@@ -136,9 +134,10 @@
|
|
|
136
134
|
this.label=this.categorySource.selectItems1[i].displayName;
|
|
137
135
|
if(this.categorySource.selectItems1[i].loaded){
|
|
138
136
|
this.$refs['searchlist'+i][0].resize();
|
|
137
|
+
this.$refs['searchlist'+i][0].resetScrollActivated();
|
|
139
138
|
}
|
|
140
139
|
else {
|
|
141
|
-
this.screenPara=parm;
|
|
140
|
+
this.categorySource.selectItems1[i].screenPara=parm;
|
|
142
141
|
this.categorySource.selectItems1[i].loaded=true;
|
|
143
142
|
this.isLoading=true;
|
|
144
143
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class='mytree' style="overflow:auto" :style="{height:treeHeight}">
|
|
3
|
-
<el-tree
|
|
3
|
+
<el-tree class="tree-line" :props="defaultProps" :load="loadNode" :indent="0"
|
|
4
4
|
:expand-on-click-node="false" @node-click="handleNodeClick" lazy ref="Tree">
|
|
5
5
|
</el-tree>
|
|
6
6
|
</div>
|
|
@@ -26,7 +26,8 @@ export default {
|
|
|
26
26
|
LastClickNode: {},
|
|
27
27
|
para: {},
|
|
28
28
|
filterText: '',
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
lastData:[],
|
|
30
31
|
defaultProps: {
|
|
31
32
|
label: 'name',
|
|
32
33
|
key: 'Key',
|
|
@@ -34,7 +35,8 @@ export default {
|
|
|
34
35
|
isLeaf: "isLeaf",
|
|
35
36
|
id: 'code'
|
|
36
37
|
},
|
|
37
|
-
treeHeight:'100%'
|
|
38
|
+
treeHeight:'100%',
|
|
39
|
+
searchStatus:[]
|
|
38
40
|
};
|
|
39
41
|
},
|
|
40
42
|
methods: {
|
|
@@ -42,12 +44,36 @@ export default {
|
|
|
42
44
|
this.treeHeight='100%';
|
|
43
45
|
},
|
|
44
46
|
search(m) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
var self=this;
|
|
48
|
+
var timer=null;
|
|
49
|
+
if(self.loadComplate()&&self.searchStatus.length==0)
|
|
50
|
+
{
|
|
51
|
+
clearTimeout(timer);
|
|
52
|
+
self.searchStatus.push(1);
|
|
53
|
+
self.treeNode.childNodes = [];
|
|
54
|
+
self.searchComplate(m, undefined, self.treeResolve);
|
|
55
|
+
}
|
|
56
|
+
else{
|
|
57
|
+
timer = setTimeout(() => {
|
|
58
|
+
self.search();
|
|
59
|
+
},200);
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
loadComplate(){
|
|
63
|
+
var flag=false;
|
|
64
|
+
this.treeNode.childNodes.forEach((item, index) => {
|
|
65
|
+
if(item.data.code==this.model.modeltree[index].code){
|
|
66
|
+
flag=true;
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
return flag;
|
|
47
71
|
},
|
|
48
72
|
loadNode(node, resolve) { // 加载 树数据
|
|
73
|
+
|
|
49
74
|
let self = this;
|
|
50
75
|
if (node.level === 0) {
|
|
76
|
+
|
|
51
77
|
self.treeNode = node;
|
|
52
78
|
self.treeResolve = resolve;
|
|
53
79
|
return self.loadtreeData(resolve);
|
|
@@ -66,14 +92,17 @@ export default {
|
|
|
66
92
|
};
|
|
67
93
|
this.searchComplate(model, undefined, resolve);
|
|
68
94
|
},
|
|
69
|
-
|
|
95
|
+
async load(data, resolve) {
|
|
70
96
|
var self = this;
|
|
71
97
|
self.model = data;
|
|
72
98
|
var treeResolve = resolve || self.treeResolve;
|
|
73
|
-
|
|
99
|
+
treeResolve(data.modeltree);
|
|
100
|
+
if(self.searchStatus.length>0)
|
|
101
|
+
{
|
|
102
|
+
self.searchStatus=self.searchStatus.slice(1)
|
|
103
|
+
}
|
|
74
104
|
self.LastResolve = treeResolve;
|
|
75
105
|
|
|
76
|
-
|
|
77
106
|
},
|
|
78
107
|
searchComplate(m, defaultSearch, resolve) {
|
|
79
108
|
var self = this;
|
|
@@ -361,7 +361,7 @@ const FormList = function (source, master) {
|
|
|
361
361
|
self.currentRowIndex=index;
|
|
362
362
|
var dialogOption = {
|
|
363
363
|
title: '修改',
|
|
364
|
-
pane: common.getParentPane(self
|
|
364
|
+
pane: common.getParentPane(self),
|
|
365
365
|
content: [{
|
|
366
366
|
component: 'ct-form',
|
|
367
367
|
attrs: {
|
|
@@ -451,8 +451,8 @@ const FormList = function (source, master) {
|
|
|
451
451
|
}
|
|
452
452
|
]
|
|
453
453
|
},
|
|
454
|
-
width: '
|
|
455
|
-
height: '
|
|
454
|
+
width: rtn.pageWidth+'px',
|
|
455
|
+
height: rtn.pageHeight+'px'
|
|
456
456
|
},
|
|
457
457
|
on: {
|
|
458
458
|
submit: function (ev) {
|
package/src/main.js
CHANGED
|
@@ -17,6 +17,7 @@ Vue.use(centaline, {
|
|
|
17
17
|
// baseUrl: "http://10.88.22.46:7070/max-uplink-api/v1/form/router",
|
|
18
18
|
baseUrl: "http://10.6.1.163:9000/max-uplink-api/v1/form/router",
|
|
19
19
|
// baseUrl: "http://10.25.10.67:9999/service-api/v1/form/router",
|
|
20
|
+
// baseUrl: "http://10.25.10.67:8080/",
|
|
20
21
|
// baseUrl: "http://10.88.22.42:9999/v1/form/router",
|
|
21
22
|
// baseUrl: "http://10.88.22.69:8080/api/",
|
|
22
23
|
// baseUrl: "http://10.88.22.40:8080/api/",
|
|
@@ -49,7 +50,7 @@ Vue.use(centaline, {
|
|
|
49
50
|
// 获取请求头
|
|
50
51
|
getRequestHeaders: function () {
|
|
51
52
|
return {
|
|
52
|
-
oldToken: '
|
|
53
|
+
oldToken: '7227389b-a6c5-4c0a-bc24-d629eaece3cb',
|
|
53
54
|
token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjr0OgjAURt-lMzdpe3_KZYPSLj4EAQIJTkYg0RjfXY26uXuGbzjL-W5m3QdTGZSgdRIHkakEEseglDNEK6KYLWLbdvoBfsyXjkLUuk4ByDYClDmB-pgBlZuWUh3aJKYw0-VkKielF0JkV5il396CWfQl9nU6H6brP84dt-WZ1ZFtL0TAQRGoVw9D8Aw0DzzPOgYUNfcHAAAA__8.sJA4ggjcul71iwN0kmGK210TEUKaipDHTsvmEHQSHBM',
|
|
54
55
|
|
|
55
56
|
originalRequestURL: 'http://10.88.22.67:8080',
|