centaline-data-driven 1.5.4 → 1.5.6
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/dynamicDetail/src/dynamicDetail.vue +1 -1
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +1 -1
- package/src/centaline/dynamicPhotoSelect/src/dynamicPhotoSelect.vue +42 -35
- package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +7 -0
- package/src/centaline/dynamicSearchListTab/src/dynamicSearchListOne.vue +8 -0
- package/src/centaline/dynamicSearchListTab/src/dynamicSearchListTab.vue +9 -3
- package/src/centaline/dynamicTree/src/dynamicTree.vue +43 -17
- package/src/centaline/loader/src/ctl/FormList.js +3 -3
- package/src/centaline/loader/src/ctl/PhotoSelect.js +59 -11
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +1 -1
- package/src/main.js +3 -2
- 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
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<ct-PropertySimpleDetailRET :api="api" :apiParam="apiParam" :selectIndex="selectIndex" :rowCount="rowCount" class="ct-PropertySimpleDetailRET"
|
|
10
10
|
@loaded="loaded" @clickNextHandler="clickNextHandler" @clickPrevHandler="clickPrevHandler" @simpleRouterclickHandler="simpleRouterclickHandler"
|
|
11
|
-
v-if="pageType=='PropertySimpleDetailRET'" @closeSideHandler="closeSideHandler" :drowerClose="drowerClose"></ct-PropertySimpleDetailRET>
|
|
11
|
+
v-if="pageType=='PropertySimpleDetailRET' || pageType=='PropertySimpleDetailOFI'" @closeSideHandler="closeSideHandler" :drowerClose="drowerClose"></ct-PropertySimpleDetailRET>
|
|
12
12
|
</div>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</el-image>
|
|
23
23
|
<span
|
|
24
24
|
class="cover-list-item-span-delete"
|
|
25
|
-
v-if="!
|
|
25
|
+
v-if="!model.lock"
|
|
26
26
|
>
|
|
27
27
|
<i class="el-icon-delete" @click="handleRemove(index)"></i>
|
|
28
28
|
</span>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<span style="width: 80px; height: 26px; display: inline-flex;">
|
|
32
32
|
{{ item.mediaLabelName }} </span>
|
|
33
33
|
</span>
|
|
34
|
-
<template v-if="
|
|
34
|
+
<template v-if="model.lock">
|
|
35
35
|
<span v-if="item.flagDefault &&(item.flagDefault == true || item.flagDefault == 'true')"
|
|
36
36
|
class="checked isradio">
|
|
37
37
|
</span>
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
</ul>
|
|
48
48
|
<div
|
|
49
49
|
class="el-upload el-upload--picture-card"
|
|
50
|
-
v-if="!
|
|
50
|
+
v-if="!model.lock && photoList.length < max"
|
|
51
51
|
@click="handleOpen()"
|
|
52
52
|
>
|
|
53
53
|
<i class="el-icon-plus"></i>
|
|
@@ -78,8 +78,7 @@ export default {
|
|
|
78
78
|
radio: "1",
|
|
79
79
|
max: 99999,
|
|
80
80
|
validMessage: "",
|
|
81
|
-
photoList: [],
|
|
82
|
-
modelPhotoselect: {},
|
|
81
|
+
photoList: [],
|
|
83
82
|
};
|
|
84
83
|
},
|
|
85
84
|
computed: {
|
|
@@ -100,7 +99,7 @@ export default {
|
|
|
100
99
|
},
|
|
101
100
|
created() {
|
|
102
101
|
var self = this;
|
|
103
|
-
|
|
102
|
+
// this.$nextTick(function () {
|
|
104
103
|
if (self.vmodel) {
|
|
105
104
|
self.load(self.vmodel);
|
|
106
105
|
self.$emit("loaded");
|
|
@@ -109,23 +108,22 @@ export default {
|
|
|
109
108
|
self.load(data);
|
|
110
109
|
});
|
|
111
110
|
}
|
|
112
|
-
});
|
|
111
|
+
//});
|
|
113
112
|
},
|
|
114
113
|
methods: {
|
|
115
|
-
load(data) {
|
|
116
|
-
this.model = data;
|
|
114
|
+
load(data) {
|
|
117
115
|
this.max = data.max ? data.max : 99999;
|
|
118
|
-
this.
|
|
119
|
-
this.photoList = data.fileList;
|
|
116
|
+
this.model = data;
|
|
117
|
+
this.photoList = data.fileList;
|
|
120
118
|
},
|
|
121
119
|
handleRemove(index) {
|
|
122
|
-
this.
|
|
123
|
-
this.photoList.splice(index, 1);
|
|
120
|
+
this.model.delete(index);
|
|
121
|
+
//this.photoList.splice(index, 1);
|
|
124
122
|
},
|
|
125
123
|
handleOpen() {
|
|
126
124
|
var self = this;
|
|
127
125
|
var chooseList = new Array();
|
|
128
|
-
if (self.
|
|
126
|
+
if (self.model.action == "") {
|
|
129
127
|
self.$message({
|
|
130
128
|
message: "请配置parameterAction!",
|
|
131
129
|
type: 'warning',
|
|
@@ -134,8 +132,8 @@ export default {
|
|
|
134
132
|
return;
|
|
135
133
|
}
|
|
136
134
|
var params = {
|
|
137
|
-
paramName: self.
|
|
138
|
-
parentValue: self.
|
|
135
|
+
paramName: self.model.paramName,
|
|
136
|
+
parentValue: self.model.getFormParentFieldPara(),
|
|
139
137
|
};
|
|
140
138
|
self.photoList.forEach((n) => {
|
|
141
139
|
chooseList.push(n);
|
|
@@ -148,12 +146,12 @@ export default {
|
|
|
148
146
|
{
|
|
149
147
|
component: "ct-photoSelectList",
|
|
150
148
|
attrs: {
|
|
151
|
-
api: self.
|
|
149
|
+
api: self.model.action, // self.api,//source.xx
|
|
152
150
|
showTitle: false,
|
|
153
151
|
Selected: chooseList,
|
|
154
152
|
mediaViewPageType:(self.model.source.mediaViewPageType||0),
|
|
155
|
-
// width: self.
|
|
156
|
-
// height: self.
|
|
153
|
+
// width: self.model.router.pageWidth + 'px',
|
|
154
|
+
// height: self.model.router.pageHeight+'px',
|
|
157
155
|
width: "772px",
|
|
158
156
|
height: "550px",
|
|
159
157
|
para: params,
|
|
@@ -161,10 +159,10 @@ export default {
|
|
|
161
159
|
on: {
|
|
162
160
|
handlePhoto(photoList) {
|
|
163
161
|
self.$nextTick(function () {
|
|
164
|
-
if (this.
|
|
165
|
-
if (photoList.length > this.
|
|
162
|
+
if (this.model.max) {
|
|
163
|
+
if (photoList.length > this.model.max) {
|
|
166
164
|
self.$message({
|
|
167
|
-
message: "图片最多" + this.
|
|
165
|
+
message: "图片最多" + this.model.max + "张",
|
|
168
166
|
type: 'warning',
|
|
169
167
|
showClose:true,
|
|
170
168
|
});
|
|
@@ -172,10 +170,10 @@ export default {
|
|
|
172
170
|
setTimeout(() => {
|
|
173
171
|
self.valid = true;
|
|
174
172
|
}, 3000);
|
|
175
|
-
photoList = photoList.slice(0, this.
|
|
173
|
+
photoList = photoList.slice(0, this.model.max);
|
|
176
174
|
}
|
|
177
175
|
}
|
|
178
|
-
self.
|
|
176
|
+
self.model.setfileSourceList(photoList);
|
|
179
177
|
self.photoList = photoList;
|
|
180
178
|
|
|
181
179
|
self.$common.closeDialog(dialogOption.dialog);
|
|
@@ -202,7 +200,7 @@ export default {
|
|
|
202
200
|
onEnd(a, b) {
|
|
203
201
|
var self = this;
|
|
204
202
|
self.$nextTick(function () {
|
|
205
|
-
self.
|
|
203
|
+
self.model.setfileSourceList(self.photoList);
|
|
206
204
|
});
|
|
207
205
|
},
|
|
208
206
|
radiochecked(list, item) {
|
|
@@ -211,37 +209,46 @@ export default {
|
|
|
211
209
|
v.flagDefault = false;
|
|
212
210
|
});
|
|
213
211
|
item.flagDefault = true;
|
|
214
|
-
self.
|
|
212
|
+
self.model.setfileSourceList(list);
|
|
215
213
|
},
|
|
216
214
|
//不能共用的数据校验
|
|
217
215
|
selfValidExcute: function (eventName) {
|
|
218
|
-
if
|
|
219
|
-
|
|
216
|
+
if(!this.model.lock)
|
|
217
|
+
{
|
|
218
|
+
if (this.model.required) {
|
|
219
|
+
if (this.model.getfileListLength() === 0) {
|
|
220
220
|
this.validMessage = "必须选择图片";
|
|
221
221
|
this.valid = false;
|
|
222
222
|
return false;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
if (this.
|
|
226
|
+
if (this.model.max) {
|
|
227
227
|
if (
|
|
228
|
-
this.
|
|
228
|
+
this.model.getfileListLength() > this.model.max
|
|
229
229
|
) {
|
|
230
|
-
this.validMessage = "图片最多" + this.
|
|
230
|
+
this.validMessage = "图片最多" + this.model.max + "张";
|
|
231
231
|
this.valid = false;
|
|
232
232
|
return false;
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
if (this.
|
|
235
|
+
if (this.model.min) {
|
|
236
236
|
if (
|
|
237
|
-
this.
|
|
237
|
+
this.model.getfileListLength() < this.model.min
|
|
238
238
|
) {
|
|
239
|
-
this.validMessage = "图片最少" + this.
|
|
239
|
+
this.validMessage = "图片最少" + this.model.min + "张";
|
|
240
240
|
this.valid = false;
|
|
241
241
|
return false;
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
|
|
244
|
+
if (this.model.rightDefault && this.model.rightDefault == 1 && eventName == "valid") {
|
|
245
|
+
if (this.model.getfileDefault() <= 0) {
|
|
246
|
+
this.validMessage = "请设置默认封面";
|
|
247
|
+
this.valid = false;
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
245
252
|
this.valid = true;
|
|
246
253
|
return this.valid;
|
|
247
254
|
},
|
|
@@ -244,6 +244,12 @@
|
|
|
244
244
|
|
|
245
245
|
if(this.flagSideBar){
|
|
246
246
|
this.selectIndex=-1;
|
|
247
|
+
|
|
248
|
+
if (typeof window.localStorage !== "undefined" && !this.sideBarStatus) {
|
|
249
|
+
var tagkey = window.localStorage.getItem(this.sideBarPageType+"key");
|
|
250
|
+
this.sideBarStatus=tagkey;
|
|
251
|
+
}
|
|
252
|
+
|
|
247
253
|
if(this.flagDefaultDisplaySideBar && !this.sideBarStatus){
|
|
248
254
|
this.sideMenuClickHandler('close');
|
|
249
255
|
}
|
|
@@ -313,6 +319,7 @@
|
|
|
313
319
|
}
|
|
314
320
|
}
|
|
315
321
|
}
|
|
322
|
+
window.localStorage.setItem(this.sideBarPageType+"key", this.sideBarStatus);
|
|
316
323
|
this.$refs.table.setTableHeight();
|
|
317
324
|
},
|
|
318
325
|
closeSideHandler() {
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
Boolean,
|
|
69
69
|
default:false,
|
|
70
70
|
},
|
|
71
|
+
categorySource: String,
|
|
71
72
|
},
|
|
72
73
|
created() {
|
|
73
74
|
this.model = this.vmodel;
|
|
@@ -239,6 +240,12 @@
|
|
|
239
240
|
|
|
240
241
|
if(this.flagSideBar){
|
|
241
242
|
this.selectIndex=-1;
|
|
243
|
+
|
|
244
|
+
if (typeof window.localStorage !== "undefined" && !this.sideBarStatus) {
|
|
245
|
+
var tagkey = window.localStorage.getItem(this.sideBarPageType+this.categorySource+"key");
|
|
246
|
+
this.sideBarStatus=tagkey;
|
|
247
|
+
}
|
|
248
|
+
|
|
242
249
|
if(this.flagDefaultDisplaySideBar && !this.sideBarStatus){
|
|
243
250
|
this.sideMenuClickHandler('close');
|
|
244
251
|
}
|
|
@@ -308,6 +315,7 @@
|
|
|
308
315
|
}
|
|
309
316
|
}
|
|
310
317
|
}
|
|
318
|
+
window.localStorage.setItem(this.sideBarPageType+this.categorySource+"key", this.sideBarStatus);
|
|
311
319
|
this.$refs.table.setTableHeight();
|
|
312
320
|
},
|
|
313
321
|
closeSideHandler() {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</div>
|
|
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
|
-
<ct-searchlistOne v-if="col.loaded" :ref="'searchlist'+index" :searchConditionApi="searchConditionApi" :pageHeight="listHeight"
|
|
24
|
+
<ct-searchlistOne v-if="col.loaded" :ref="'searchlist'+index" :searchConditionApi="searchConditionApi" :pageHeight="listHeight" :categorySource="col.code"
|
|
25
25
|
:searchStatsApi="searchStatsApi" :searchDataApi="searchDataApi" :apiParam="col.screenPara" @tableLoaded="tableLoaded">
|
|
26
26
|
</ct-searchlistOne>
|
|
27
27
|
</div>
|
|
@@ -119,7 +119,10 @@
|
|
|
119
119
|
self.label=self.categorySource.selectItems1[self.activeIndex].displayName;
|
|
120
120
|
self.categorySource.selectItems1[0].screenPara=parm;
|
|
121
121
|
self.listHeight=(self.$refs.main.offsetHeight-42)+'px';
|
|
122
|
-
self.categorySource.selectItems1[0].loaded=true;
|
|
122
|
+
self.categorySource.selectItems1[0].loaded=true;
|
|
123
|
+
window.addEventListener("resize", (ev) => {
|
|
124
|
+
self.resize();
|
|
125
|
+
});
|
|
123
126
|
}
|
|
124
127
|
else{
|
|
125
128
|
self.categoryLoadedError();
|
|
@@ -134,6 +137,7 @@
|
|
|
134
137
|
this.label=this.categorySource.selectItems1[i].displayName;
|
|
135
138
|
if(this.categorySource.selectItems1[i].loaded){
|
|
136
139
|
this.$refs['searchlist'+i][0].resize();
|
|
140
|
+
this.$refs['searchlist'+i][0].resizeSearchList();
|
|
137
141
|
this.$refs['searchlist'+i][0].resetScrollActivated();
|
|
138
142
|
}
|
|
139
143
|
else {
|
|
@@ -157,8 +161,10 @@
|
|
|
157
161
|
this.$emit('refreshParent');
|
|
158
162
|
},
|
|
159
163
|
resize() {
|
|
160
|
-
|
|
164
|
+
this.listHeight=(this.$refs.main.offsetHeight-42)+'px';
|
|
165
|
+
if(this.$refs['searchlist'+this.activeIndex] && this.$refs['searchlist'+this.activeIndex][0]){
|
|
161
166
|
this.$refs['searchlist'+this.activeIndex][0].resize();
|
|
167
|
+
this.$refs['searchlist'+this.activeIndex][0].resizeSearchList();
|
|
162
168
|
}
|
|
163
169
|
},
|
|
164
170
|
},
|
|
@@ -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;
|
|
@@ -99,12 +128,7 @@ export default {
|
|
|
99
128
|
});
|
|
100
129
|
|
|
101
130
|
}
|
|
102
|
-
|
|
103
|
-
if (document.querySelector('.is-select') != null) {
|
|
104
|
-
document.querySelector('.is-select').classList.remove("is-select");
|
|
105
|
-
}
|
|
106
|
-
document.querySelector('.is-current .el-tree-node__label').classList.add("is-select");
|
|
107
|
-
})
|
|
131
|
+
|
|
108
132
|
|
|
109
133
|
}
|
|
110
134
|
},
|
|
@@ -117,10 +141,12 @@ export default {
|
|
|
117
141
|
.mytree {
|
|
118
142
|
height: 100%;
|
|
119
143
|
}
|
|
120
|
-
.mytree .is-select {
|
|
121
|
-
color: var(--centalineBlue) !important;
|
|
122
|
-
}
|
|
123
144
|
|
|
145
|
+
.mytree .el-tree-node.is-current > .el-tree-node__content {
|
|
146
|
+
color: var(--centalineBlue) !important;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
|
|
124
150
|
.tree-line:first-child div {
|
|
125
151
|
overflow: hidden;
|
|
126
152
|
}
|
|
@@ -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) {
|
|
@@ -5,7 +5,7 @@ import Vue from 'vue';
|
|
|
5
5
|
import common from '../../../common';
|
|
6
6
|
import valid from '../../../validate/index';
|
|
7
7
|
//元数据、图片选择元数据、对应router、下拉框数据api
|
|
8
|
-
const PhotoSelect = function (source, fileSourceList, router, optionApi) {
|
|
8
|
+
const PhotoSelect = function (source, fileSourceList, router, optionApi,sourceList) {
|
|
9
9
|
var self = this;
|
|
10
10
|
var init = function (data) {
|
|
11
11
|
var rtn = {
|
|
@@ -14,13 +14,23 @@ const PhotoSelect = function (source, fileSourceList, router, optionApi) {
|
|
|
14
14
|
},
|
|
15
15
|
get router() {
|
|
16
16
|
return router;
|
|
17
|
-
},
|
|
18
|
-
get sourceList() {
|
|
19
|
-
return fileSourceList;
|
|
20
|
-
},
|
|
17
|
+
},
|
|
21
18
|
set action(v) {
|
|
22
19
|
data.action = v;
|
|
23
20
|
},
|
|
21
|
+
get rightDefault() {
|
|
22
|
+
return data.rightDefault;
|
|
23
|
+
},
|
|
24
|
+
getfileDefault() {
|
|
25
|
+
if (!fileSourceList) {
|
|
26
|
+
return 0;
|
|
27
|
+
}
|
|
28
|
+
let fileList = fileSourceList.filter(item => {
|
|
29
|
+
return item.flagDeleted != true && item.flagDefault == true && item.mediaTypeID == 2
|
|
30
|
+
})
|
|
31
|
+
return fileList.length;
|
|
32
|
+
},
|
|
33
|
+
|
|
24
34
|
getfileListLength() {
|
|
25
35
|
if (!fileSourceList) {
|
|
26
36
|
return 0;
|
|
@@ -41,22 +51,60 @@ const PhotoSelect = function (source, fileSourceList, router, optionApi) {
|
|
|
41
51
|
})
|
|
42
52
|
}
|
|
43
53
|
return rtn._fileList;
|
|
54
|
+
},
|
|
55
|
+
setfileSourceList(newfileList,self) {
|
|
56
|
+
let pushArr = [];
|
|
57
|
+
let deleteItem =fileSourceList.filter((item) => {
|
|
58
|
+
return item.flagDeleted == true;
|
|
59
|
+
});
|
|
60
|
+
pushArr =common.deepClone(deleteItem) ;
|
|
61
|
+
|
|
62
|
+
for (let i = 0; i < deleteItem.length; i++) {
|
|
63
|
+
for (let j = 0; j < newfileList.length; j++) {
|
|
64
|
+
if (newfileList[j].mediaID == deleteItem[i].mediaID) {
|
|
65
|
+
pushArr.splice(i, 1);
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
fileSourceList = newfileList;
|
|
71
|
+
pushArr.forEach((n) => {
|
|
72
|
+
fileSourceList.push(n);
|
|
73
|
+
|
|
74
|
+
})
|
|
75
|
+
|
|
44
76
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
77
|
+
delete(index) {
|
|
78
|
+
let newVal = true;
|
|
79
|
+
let item =null;
|
|
80
|
+
for (let j = 0; j < sourceList.length; j++) {
|
|
81
|
+
if (fileSourceList[index].mediaID === sourceList[j].mediaID) {
|
|
82
|
+
|
|
83
|
+
fileSourceList[index].flagDefault = false;
|
|
84
|
+
fileSourceList[index].flagDeleted = true;
|
|
85
|
+
item = fileSourceList[index];
|
|
86
|
+
fileSourceList.splice(index, 1);
|
|
87
|
+
fileSourceList.push(item);
|
|
88
|
+
newVal = false;
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
rtn.fileList.splice(index, 1);
|
|
93
|
+
if (newVal) {
|
|
94
|
+
fileSourceList.splice(index, 1);
|
|
95
|
+
}
|
|
50
96
|
},
|
|
97
|
+
|
|
51
98
|
getFormObj() {
|
|
52
99
|
var rtnFormObj = {};
|
|
100
|
+
|
|
53
101
|
Object.defineProperty(rtnFormObj, source.fieldName1, {
|
|
54
102
|
get: function () {
|
|
55
103
|
return fileSourceList;
|
|
56
104
|
},
|
|
57
105
|
enumerable: true,
|
|
58
106
|
configurable: true
|
|
59
|
-
});
|
|
107
|
+
});
|
|
60
108
|
return rtnFormObj;
|
|
61
109
|
}
|
|
62
110
|
};
|
|
@@ -327,7 +327,7 @@ const LibFunction = {
|
|
|
327
327
|
}
|
|
328
328
|
})
|
|
329
329
|
}
|
|
330
|
-
item = PhotoSelect(field, files, router, source.parameterAction);
|
|
330
|
+
item = PhotoSelect(field, files, router, source.parameterAction,files);
|
|
331
331
|
item.is = 'ct-photoselect';
|
|
332
332
|
break;
|
|
333
333
|
case Enum.ControlType.RichText: //富文本框
|
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,8 +50,8 @@ Vue.use(centaline, {
|
|
|
49
50
|
// 获取请求头
|
|
50
51
|
getRequestHeaders: function () {
|
|
51
52
|
return {
|
|
52
|
-
oldToken: '
|
|
53
|
-
token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.
|
|
53
|
+
oldToken: '7227389b-a6c5-4c0a-bc24-d629eaece3cb',
|
|
54
|
+
token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe_iOivZ2bXXpnP8aThEZCMjhQqRRAIh7k4Q0NEzxSummXcX81rFTqBh55NREDRZIKM0OMoZgjTGYZaIMY7uA_yYLyNxcN4nBpKDAco6getDBnR6iJQ8x2REJ9r1LHbKWOxZsqJOTGV5C2UJX2Kd22Xfbv84d1qmLdtKZavdARo1uWWPBUrDCpJLlb2ysiGLxxMAAP__.06Kf40mgrNwq8plJUsw0kjmXgIvkx62VNnsFBTmRzSo',
|
|
54
55
|
|
|
55
56
|
originalRequestURL: 'http://10.88.22.67:8080',
|
|
56
57
|
EstateInfo: '{"estateId":"201703020943128D8A8FCF463E4016D6","estateName":"%E4%B8%87%E7%A7%91%E4%BA%91%E5%9F%8E"}',
|