centaline-data-driven 1.2.18 → 1.2.21
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/assets/B.png +0 -0
- package/src/assets/T.png +0 -0
- package/src/assets/ck.png +0 -0
- package/src/assets/succe.png +0 -0
- package/src/assets/success.png +0 -0
- package/src/centaline/css/common.css +1 -1
- package/src/centaline/css/max.css +1 -0
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +23 -10
- package/src/centaline/dynamicFile/src/dynamicFile.vue +74 -21
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +2 -3
- package/src/centaline/dynamicPhotoSelect/src/dynamicPhotoSelect.vue +271 -199
- package/src/centaline/dynamicPhotoSelectList/src/dynamicPhotoSelectList.vue +153 -52
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +4 -4
- package/src/centaline/dynamicTree/src/dynamicTree.vue +10 -0
- package/src/centaline/dynamicTree/src/dynamicTreeList.vue +1 -1
- package/src/centaline/loader/src/ctl/Detail.js +14 -14
- package/src/centaline/loader/src/ctl/File.js +10 -1
- package/src/centaline/loader/src/ctl/PhotoSelect.js +10 -7
- package/src/centaline/loader/src/ctl/PhotoSelectList.js +2 -56
- package/src/centaline/loader/src/ctl/SearchTable.js +19 -7
- package/src/centaline/loader/src/ctl/lib/Enum.js +1 -1
- package/src/centaline/quickInputSos/src/quickInput.vue +1 -2
- package/src/centaline/validate/index.js +25 -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/assets/B.png
ADDED
|
Binary file
|
package/src/assets/T.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -30,25 +30,28 @@
|
|
|
30
30
|
<div>
|
|
31
31
|
<component v-if="model.otherTradeActionRouter!==null" v-bind="model.otherTradeActionRouter" class="max-default"
|
|
32
32
|
:is="model.otherTradeActionRouter.is" :vmodel="model.otherTradeActionRouter" :api="model.optionApi" @click="fieldClickHandler(model.otherTradeActionRouter,$event)"></component>
|
|
33
|
-
<
|
|
34
|
-
|
|
33
|
+
<img src="../../../assets/T.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left:11px">
|
|
34
|
+
<img src="../../../assets/B.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left:8px">
|
|
35
35
|
</div>
|
|
36
36
|
<div class="mt5">
|
|
37
|
+
<component class="max-report w93" v-if="model.actionRouters!==null && model.actionRouters[0]!==null"
|
|
38
|
+
:is="model.actionRouters[0].is" :vmodel="model.actionRouters[0]" :api="model.optionApi" @click="fieldClickHandler(model.actionRouters[0],$event)"></component>
|
|
37
39
|
<component class="max-report" v-if="model.actionRouters!==null && model.actionRouters[1]!==null"
|
|
38
40
|
:is="model.actionRouters[1].is" :vmodel="model.actionRouters[1]" :api="model.optionApi" @click="fieldClickHandler(model.actionRouters[1],$event)"></component>
|
|
39
41
|
</div>
|
|
40
42
|
<div class="mt5">
|
|
41
|
-
<button type="button" class="el-button el-button--info el-button--mini max-report rel"
|
|
42
|
-
v-if="model.actionRoutersMoreList !== null">
|
|
43
|
+
<button type="button" class="el-button el-button--info el-button--mini max-report rel w64"
|
|
44
|
+
v-if="model.actionRoutersMoreList !== null && model.actionRoutersMoreList.length>0">
|
|
43
45
|
<img src="../../../assets/dian.png" alt="" class="report">
|
|
44
46
|
<ul class="report-cont">
|
|
45
47
|
<li v-for="(col, index) in model.actionRoutersMoreList" :key="index" v-if="col.show !== false">
|
|
46
48
|
<component class="max-report" :is="col.is" :vmodel="col" :api="model.optionApi" @click="fieldClickHandler(col,$event)"></component>
|
|
47
49
|
</li>
|
|
48
50
|
</ul>
|
|
49
|
-
</button>
|
|
50
|
-
|
|
51
|
-
:is="model.actionRouters[2].is" :vmodel="model.actionRouters[2]" :api="model.optionApi" @click="fieldClickHandler(model.actionRouters[2],$event)"
|
|
51
|
+
</button>
|
|
52
|
+
<component v-else-if="model.actionRouters!==null && model.actionRouters.legth===3" class="max-report"
|
|
53
|
+
:is="model.actionRouters[2].is" :vmodel="model.actionRouters[2]" :api="model.optionApi" @click="fieldClickHandler(model.actionRouters[2],$event)">
|
|
54
|
+
</component>
|
|
52
55
|
</div>
|
|
53
56
|
</div>
|
|
54
57
|
</div>
|
|
@@ -264,7 +267,7 @@
|
|
|
264
267
|
<div class="t-item">
|
|
265
268
|
<span class="i">{{col.operationName}}</span>
|
|
266
269
|
</div>
|
|
267
|
-
<div class="t-item"><span class="i">{{col.desc}}</span></div>
|
|
270
|
+
<div class="t-item"><span class="i" :class="'operation'+col.flagKey">{{col.desc}}</span></div>
|
|
268
271
|
<div class="t-item" style="height: 50px;">
|
|
269
272
|
<component class="el-button t-but el-button--info max-info" v-if="col.router && col.router.show" :is="col.router.is" :vmodel="col.router" :api="model.optionApi" @click="fieldClickHandler(col.router,$event)"></component>
|
|
270
273
|
</div>
|
|
@@ -698,9 +701,17 @@
|
|
|
698
701
|
}
|
|
699
702
|
</script>
|
|
700
703
|
<style lang="scss" scoped>
|
|
704
|
+
.operation0{
|
|
705
|
+
color: #000000;
|
|
706
|
+
}
|
|
707
|
+
.operation1{
|
|
708
|
+
color: #388cd3;
|
|
709
|
+
}
|
|
710
|
+
.operation2{
|
|
711
|
+
color: #388cd3;
|
|
712
|
+
}
|
|
701
713
|
.main{
|
|
702
|
-
background: #ECEFF2;
|
|
703
|
-
|
|
714
|
+
background: #ECEFF2;
|
|
704
715
|
}
|
|
705
716
|
.rel{
|
|
706
717
|
position: relative;
|
|
@@ -709,6 +720,8 @@
|
|
|
709
720
|
overflow-y: auto;
|
|
710
721
|
overflow-x: auto;
|
|
711
722
|
}
|
|
723
|
+
.w64{width: 64px!important}
|
|
724
|
+
.w93{width: 93px!important}
|
|
712
725
|
.w300 {
|
|
713
726
|
width: 300px;
|
|
714
727
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div style="width:100%" v-if="model !== null" class="block ct-file" :class="[model.attrs.size?'ct-checkbox-'+model.attrs.size:'']">
|
|
3
|
-
<el-upload :class="
|
|
3
|
+
<el-upload :class="disableUpload?'ct-upload-display-none':''"
|
|
4
4
|
:disabled="model.lock"
|
|
5
5
|
:accept="model.fileAccept"
|
|
6
6
|
:on-change="handleChange"
|
|
@@ -14,9 +14,12 @@
|
|
|
14
14
|
:before-upload="beforeUploadProcess"
|
|
15
15
|
:on-success="handleAvatarSuccess"
|
|
16
16
|
:on-progress="uploadProcess"
|
|
17
|
-
|
|
17
|
+
:limit="parseInt(model.max||999)"
|
|
18
|
+
:on-exceed="handleExceed">
|
|
18
19
|
<i slot="default" class="el-icon-plus"></i>
|
|
19
|
-
|
|
20
|
+
<!--<i slot="default" class="el-icon-plus" style="position: relative;"><div @click="testss($event)" class="max-ewmsc"></div></i>-->
|
|
21
|
+
|
|
22
|
+
<div slot="tip" class="el-upload__tip errorMessage" v-show="!valid">{{validMessage}}</div>
|
|
20
23
|
<div slot="file" slot-scope="{file}" :title="file.fileName">
|
|
21
24
|
<div class="cover-list-item">
|
|
22
25
|
<el-image fit="fill" :src="file.url"
|
|
@@ -44,7 +47,7 @@
|
|
|
44
47
|
</span>
|
|
45
48
|
<el-dropdown-menu slot="dropdown" class="el-upload-list__item-preview">
|
|
46
49
|
<el-dropdown-item v-for="(option, index) in model.optionModel.options" :key="index" :command="{option:option,file:file}">
|
|
47
|
-
|
|
50
|
+
{{option[model.optionModel.optionAttrs.label]}}
|
|
48
51
|
</el-dropdown-item>
|
|
49
52
|
</el-dropdown-menu>
|
|
50
53
|
</el-dropdown>
|
|
@@ -66,7 +69,7 @@
|
|
|
66
69
|
},
|
|
67
70
|
data() {
|
|
68
71
|
return {
|
|
69
|
-
|
|
72
|
+
disableUpload:false,
|
|
70
73
|
};
|
|
71
74
|
},
|
|
72
75
|
computed: {
|
|
@@ -90,12 +93,18 @@
|
|
|
90
93
|
self.load(data);
|
|
91
94
|
});
|
|
92
95
|
}
|
|
96
|
+
this.disableUpload=this.model.lock;
|
|
93
97
|
});
|
|
94
98
|
},
|
|
95
99
|
methods: {
|
|
96
100
|
load(data) {
|
|
97
101
|
this.model = data;
|
|
98
102
|
},
|
|
103
|
+
handleExceed()
|
|
104
|
+
{
|
|
105
|
+
this.validMessage = "附件数量最多" + this.model.max+ "张";
|
|
106
|
+
this.valid = false;
|
|
107
|
+
},
|
|
99
108
|
//删除
|
|
100
109
|
handleRemove(file) {
|
|
101
110
|
this.$common.confirm("确定删除该附件?", "提示", {
|
|
@@ -104,6 +113,7 @@
|
|
|
104
113
|
//type: 'warning'
|
|
105
114
|
}).then(() => {
|
|
106
115
|
this.model.deleteFile(file, false);
|
|
116
|
+
this.selfValidExcute('remove');
|
|
107
117
|
}).catch(() => {
|
|
108
118
|
});
|
|
109
119
|
},
|
|
@@ -156,16 +166,19 @@
|
|
|
156
166
|
//上传之前的钩子
|
|
157
167
|
beforeUploadProcess(files) {
|
|
158
168
|
let that=this;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
+
|
|
170
|
+
// if (this.model.max) {
|
|
171
|
+
// console.log('beforeUploadProcess')
|
|
172
|
+
// console.log(this.model.fileList)
|
|
173
|
+
// if (this.model.getfileListLength() >= this.model.max) {
|
|
174
|
+
// this.validMessage = "附件最多" + this.model.max + "个";
|
|
175
|
+
// this.valid = false;
|
|
176
|
+
// setTimeout(() => {
|
|
177
|
+
// that.valid = true;
|
|
178
|
+
// }, 3000)
|
|
179
|
+
// return false;
|
|
180
|
+
// }
|
|
181
|
+
// }
|
|
169
182
|
return true;
|
|
170
183
|
},
|
|
171
184
|
//文件上传时的钩子
|
|
@@ -185,6 +198,7 @@
|
|
|
185
198
|
},
|
|
186
199
|
//不能共用的数据校验
|
|
187
200
|
selfValidExcute: function (eventName) {
|
|
201
|
+
|
|
188
202
|
if (this.model.required) {
|
|
189
203
|
if (this.model.getfileListLength() === 0) {
|
|
190
204
|
this.validMessage = "必须上传附件";
|
|
@@ -194,16 +208,43 @@
|
|
|
194
208
|
}
|
|
195
209
|
|
|
196
210
|
if (this.model.max) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
211
|
+
//change
|
|
212
|
+
if(this.model.getfileListLength() >= this.model.max)
|
|
213
|
+
{
|
|
214
|
+
this.disableUpload=true;
|
|
215
|
+
}else
|
|
216
|
+
{
|
|
217
|
+
this.disableUpload=false;
|
|
201
218
|
}
|
|
219
|
+
|
|
220
|
+
// if (this.model.getfileListLength() > this.model.max) {
|
|
221
|
+
// this.validMessage = "附件数量";
|
|
222
|
+
// if(this.model.min)
|
|
223
|
+
// {
|
|
224
|
+
// this.validMessage += "最少" + this.model.min + "个"+",";
|
|
225
|
+
// }
|
|
226
|
+
// // this.validMessage += "最多" + this.model.max+ "个";
|
|
227
|
+
// this.valid = false;
|
|
228
|
+
// return false;
|
|
229
|
+
// }
|
|
202
230
|
}
|
|
203
231
|
if (this.model.min) {
|
|
204
232
|
if (this.model.getfileListLength() < this.model.min) {
|
|
205
|
-
|
|
206
|
-
|
|
233
|
+
//change时需要判断有没有上传图片如果没有图片则不提示
|
|
234
|
+
|
|
235
|
+
if(eventName=='change' && this.model.getfileListLength()>0)
|
|
236
|
+
{
|
|
237
|
+
this.validMessage = "附件数量还差" + (parseInt(this.model.min)-this.model.getfileListLength()) + "张";
|
|
238
|
+
this.valid = false;
|
|
239
|
+
}else if(eventName=='valid')
|
|
240
|
+
{
|
|
241
|
+
this.validMessage = "附件数量还差" + (parseInt(this.model.min)-this.model.getfileListLength()) + "张";
|
|
242
|
+
this.valid = false;
|
|
243
|
+
}else if(eventName=='remove')
|
|
244
|
+
{
|
|
245
|
+
this.valid = true;
|
|
246
|
+
}
|
|
247
|
+
|
|
207
248
|
return false;
|
|
208
249
|
}
|
|
209
250
|
}
|
|
@@ -286,4 +327,16 @@
|
|
|
286
327
|
width: 100px;
|
|
287
328
|
height: 100px;
|
|
288
329
|
}
|
|
330
|
+
.el-upload .max-ewmsc {
|
|
331
|
+
background: url("../../../assets/ewm.png") no-repeat;
|
|
332
|
+
content: '';
|
|
333
|
+
display: block;
|
|
334
|
+
width: 30px;
|
|
335
|
+
height: 30px;
|
|
336
|
+
font-size: 30px;
|
|
337
|
+
background-size: 30px;
|
|
338
|
+
position: absolute;
|
|
339
|
+
top: -35px;
|
|
340
|
+
left: 35px;
|
|
341
|
+
}
|
|
289
342
|
</style>
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<div class="list-title">
|
|
4
4
|
<h5>{{model.title}}</h5>
|
|
5
5
|
</div>
|
|
6
|
-
<div class="list-button
|
|
7
|
-
<el-button v-if="model.create" type="success" size="mini" icon="el-icon-circle-plus-outline" @click="addRow">
|
|
6
|
+
<div class="list-button">
|
|
7
|
+
<el-button v-if="model.create" type="success" class=" max-btn-add" size="mini" icon="el-icon-circle-plus-outline" @click="addRow">
|
|
8
8
|
新增
|
|
9
9
|
</el-button>
|
|
10
10
|
</div>
|
|
@@ -349,7 +349,6 @@
|
|
|
349
349
|
.ct-form-list .list-button {
|
|
350
350
|
padding-bottom: 5px;
|
|
351
351
|
text-align: right;
|
|
352
|
-
width: 45%;
|
|
353
352
|
display: inline-table;
|
|
354
353
|
float: right;
|
|
355
354
|
}
|