centaline-data-driven 1.2.18 → 1.2.19
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/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +18 -6
- package/src/centaline/dynamicFile/src/dynamicFile.vue +46 -15
- package/src/centaline/loader/src/ctl/File.js +7 -1
- 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 +19 -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
|
|
@@ -30,15 +30,17 @@
|
|
|
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"
|
|
43
|
+
<button type="button" class="el-button el-button--info el-button--mini max-report rel w64"
|
|
42
44
|
v-if="model.actionRoutersMoreList !== null">
|
|
43
45
|
<img src="../../../assets/dian.png" alt="" class="report">
|
|
44
46
|
<ul class="report-cont">
|
|
@@ -264,7 +266,7 @@
|
|
|
264
266
|
<div class="t-item">
|
|
265
267
|
<span class="i">{{col.operationName}}</span>
|
|
266
268
|
</div>
|
|
267
|
-
<div class="t-item"><span class="i">{{col.desc}}</span></div>
|
|
269
|
+
<div class="t-item"><span class="i" :class="'operation'+col.flagKey">{{col.desc}}</span></div>
|
|
268
270
|
<div class="t-item" style="height: 50px;">
|
|
269
271
|
<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
272
|
</div>
|
|
@@ -698,9 +700,17 @@
|
|
|
698
700
|
}
|
|
699
701
|
</script>
|
|
700
702
|
<style lang="scss" scoped>
|
|
703
|
+
.operation0{
|
|
704
|
+
color: #000000;
|
|
705
|
+
}
|
|
706
|
+
.operation1{
|
|
707
|
+
color: #ff503f;
|
|
708
|
+
}
|
|
709
|
+
.operation2{
|
|
710
|
+
color: #388cd3;
|
|
711
|
+
}
|
|
701
712
|
.main{
|
|
702
|
-
background: #ECEFF2;
|
|
703
|
-
|
|
713
|
+
background: #ECEFF2;
|
|
704
714
|
}
|
|
705
715
|
.rel{
|
|
706
716
|
position: relative;
|
|
@@ -709,6 +719,8 @@
|
|
|
709
719
|
overflow-y: auto;
|
|
710
720
|
overflow-x: auto;
|
|
711
721
|
}
|
|
722
|
+
.w64{width: 64px!important}
|
|
723
|
+
.w93{width: 93px!important}
|
|
712
724
|
.w300 {
|
|
713
725
|
width: 300px;
|
|
714
726
|
}
|
|
@@ -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,11 @@
|
|
|
14
14
|
:before-upload="beforeUploadProcess"
|
|
15
15
|
:on-success="handleAvatarSuccess"
|
|
16
16
|
:on-progress="uploadProcess"
|
|
17
|
+
:limit="parseInt(model.max||999)"
|
|
18
|
+
:on-exceed="handleExceed"
|
|
17
19
|
>
|
|
18
20
|
<i slot="default" class="el-icon-plus"></i>
|
|
19
|
-
<div slot="tip" class="el-upload__tip errorMessage" v-show="!
|
|
21
|
+
<div slot="tip" class="el-upload__tip errorMessage" v-show="!valid">{{validMessage}}</div>
|
|
20
22
|
<div slot="file" slot-scope="{file}" :title="file.fileName">
|
|
21
23
|
<div class="cover-list-item">
|
|
22
24
|
<el-image fit="fill" :src="file.url"
|
|
@@ -66,7 +68,7 @@
|
|
|
66
68
|
},
|
|
67
69
|
data() {
|
|
68
70
|
return {
|
|
69
|
-
|
|
71
|
+
disableUpload:false,
|
|
70
72
|
};
|
|
71
73
|
},
|
|
72
74
|
computed: {
|
|
@@ -90,12 +92,18 @@
|
|
|
90
92
|
self.load(data);
|
|
91
93
|
});
|
|
92
94
|
}
|
|
95
|
+
this.disableUpload=this.model.lock;
|
|
93
96
|
});
|
|
94
97
|
},
|
|
95
98
|
methods: {
|
|
96
99
|
load(data) {
|
|
97
100
|
this.model = data;
|
|
98
101
|
},
|
|
102
|
+
handleExceed()
|
|
103
|
+
{
|
|
104
|
+
this.validMessage = "附件数量最多" + this.model.max+ "个";
|
|
105
|
+
this.valid = false;
|
|
106
|
+
},
|
|
99
107
|
//删除
|
|
100
108
|
handleRemove(file) {
|
|
101
109
|
this.$common.confirm("确定删除该附件?", "提示", {
|
|
@@ -104,6 +112,7 @@
|
|
|
104
112
|
//type: 'warning'
|
|
105
113
|
}).then(() => {
|
|
106
114
|
this.model.deleteFile(file, false);
|
|
115
|
+
this.selfValidExcute();
|
|
107
116
|
}).catch(() => {
|
|
108
117
|
});
|
|
109
118
|
},
|
|
@@ -156,16 +165,19 @@
|
|
|
156
165
|
//上传之前的钩子
|
|
157
166
|
beforeUploadProcess(files) {
|
|
158
167
|
let that=this;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
168
|
+
|
|
169
|
+
// if (this.model.max) {
|
|
170
|
+
// console.log('beforeUploadProcess')
|
|
171
|
+
// console.log(this.model.fileList)
|
|
172
|
+
// if (this.model.getfileListLength() >= this.model.max) {
|
|
173
|
+
// this.validMessage = "附件最多" + this.model.max + "个";
|
|
174
|
+
// this.valid = false;
|
|
175
|
+
// setTimeout(() => {
|
|
176
|
+
// that.valid = true;
|
|
177
|
+
// }, 3000)
|
|
178
|
+
// return false;
|
|
179
|
+
// }
|
|
180
|
+
// }
|
|
169
181
|
return true;
|
|
170
182
|
},
|
|
171
183
|
//文件上传时的钩子
|
|
@@ -185,6 +197,7 @@
|
|
|
185
197
|
},
|
|
186
198
|
//不能共用的数据校验
|
|
187
199
|
selfValidExcute: function (eventName) {
|
|
200
|
+
|
|
188
201
|
if (this.model.required) {
|
|
189
202
|
if (this.model.getfileListLength() === 0) {
|
|
190
203
|
this.validMessage = "必须上传附件";
|
|
@@ -194,15 +207,33 @@
|
|
|
194
207
|
}
|
|
195
208
|
|
|
196
209
|
if (this.model.max) {
|
|
210
|
+
|
|
211
|
+
if(this.model.getfileListLength() >= this.model.max)
|
|
212
|
+
{
|
|
213
|
+
this.disableUpload=true;
|
|
214
|
+
}else
|
|
215
|
+
{
|
|
216
|
+
this.disableUpload=false;
|
|
217
|
+
}
|
|
218
|
+
|
|
197
219
|
if (this.model.getfileListLength() > this.model.max) {
|
|
198
|
-
this.validMessage = "
|
|
220
|
+
this.validMessage = "附件数量";
|
|
221
|
+
if(this.model.min)
|
|
222
|
+
{
|
|
223
|
+
this.validMessage += "最少" + this.model.min + "个"+",";
|
|
224
|
+
}
|
|
225
|
+
this.validMessage += "最多" + this.model.max+ "个";
|
|
199
226
|
this.valid = false;
|
|
200
227
|
return false;
|
|
201
228
|
}
|
|
202
229
|
}
|
|
203
230
|
if (this.model.min) {
|
|
204
231
|
if (this.model.getfileListLength() < this.model.min) {
|
|
205
|
-
this.validMessage = "
|
|
232
|
+
this.validMessage = "附件数量最少" + this.model.min + "个";
|
|
233
|
+
if(this.model.max)
|
|
234
|
+
{
|
|
235
|
+
this.validMessage += ",最多" + this.model.max + "个"+"";
|
|
236
|
+
}
|
|
206
237
|
this.valid = false;
|
|
207
238
|
return false;
|
|
208
239
|
}
|
|
@@ -41,7 +41,10 @@ const box = function (source, fileSourceList, router, optionApi) {
|
|
|
41
41
|
return rtn._fileList;
|
|
42
42
|
},
|
|
43
43
|
getfileListLength() {
|
|
44
|
-
|
|
44
|
+
let fileList = fileSourceList.filter(item=>{
|
|
45
|
+
return item.flagDeleted != true
|
|
46
|
+
})
|
|
47
|
+
return fileList.length;
|
|
45
48
|
},
|
|
46
49
|
optionModel: {
|
|
47
50
|
options: [],
|
|
@@ -210,6 +213,7 @@ const box = function (source, fileSourceList, router, optionApi) {
|
|
|
210
213
|
classify.file.source.mediaLabelID = classify.option[rtn.optionModel.optionAttrs.value];
|
|
211
214
|
},
|
|
212
215
|
handleAvatarSuccess(res, file, fileList) {
|
|
216
|
+
|
|
213
217
|
if (res.rtnCode === Enum.ReturnCode.Successful) {
|
|
214
218
|
//下面的方式绑定,会有一些问题 todo 不强与页面关联
|
|
215
219
|
fileSourceList.push(res.content[0]);
|
|
@@ -238,6 +242,7 @@ const box = function (source, fileSourceList, router, optionApi) {
|
|
|
238
242
|
}
|
|
239
243
|
},
|
|
240
244
|
deleteFile(file, forceDelete) {
|
|
245
|
+
|
|
241
246
|
for (let i = 0; i < rtn.fileList.length; i++) {
|
|
242
247
|
if (rtn.fileList[i].uid === file.uid) {
|
|
243
248
|
if (forceDelete) {
|
|
@@ -268,6 +273,7 @@ const box = function (source, fileSourceList, router, optionApi) {
|
|
|
268
273
|
break;
|
|
269
274
|
}
|
|
270
275
|
}
|
|
276
|
+
console.log(rtn.fileList)
|
|
271
277
|
},
|
|
272
278
|
getFormObj() {
|
|
273
279
|
var rtnFormObj = {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ct-quickInput">
|
|
3
3
|
|
|
4
|
-
<el-popover ref="pop" placement="bottom-start" v-model="showDrop" trigger="click">
|
|
4
|
+
<el-popover ref="pop" placement="bottom-start" v-model="showDrop" trigger="click" @show="searchInputHandle">
|
|
5
5
|
<div>
|
|
6
6
|
<div>
|
|
7
7
|
<el-input ref="searchInput" size="mini" suffix-icon="el-icon-search" v-model="searchText" @input="searchInputHandle"></el-input>
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
else {
|
|
43
43
|
this.model = this.vmodel;
|
|
44
44
|
}
|
|
45
|
-
this.searchInputHandle();
|
|
46
45
|
},
|
|
47
46
|
data() {
|
|
48
47
|
return {
|
|
@@ -125,7 +125,16 @@ const actions = {
|
|
|
125
125
|
} else {
|
|
126
126
|
return false;
|
|
127
127
|
}
|
|
128
|
-
}
|
|
128
|
+
},
|
|
129
|
+
requiredFile(v, o) {
|
|
130
|
+
debugger
|
|
131
|
+
if (v.fileList === undefined || v.fileList === null || v.fileList === ''||v.getfileListLength()<=0) {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
},
|
|
129
138
|
};
|
|
130
139
|
|
|
131
140
|
const valid = {
|
|
@@ -162,6 +171,11 @@ const valid = {
|
|
|
162
171
|
message: '值必须是数字',
|
|
163
172
|
ticker:'input'
|
|
164
173
|
},
|
|
174
|
+
requiredFile: {
|
|
175
|
+
action: actions.requiredFile,
|
|
176
|
+
message: '必须上传附件',
|
|
177
|
+
ticker: 'input'
|
|
178
|
+
},
|
|
165
179
|
//numberDecimal: {
|
|
166
180
|
// action: actions.numberDecimal,
|
|
167
181
|
// message: '小数点位数错误',
|
|
@@ -232,6 +246,7 @@ const valid = {
|
|
|
232
246
|
this._validate = v;
|
|
233
247
|
},
|
|
234
248
|
validating(ticker, old1, old2) {
|
|
249
|
+
debugger
|
|
235
250
|
var rtnValidate = [];
|
|
236
251
|
switch (model.type) {
|
|
237
252
|
case Enum.ControlType.NumericTextBox:
|
|
@@ -262,6 +277,9 @@ const valid = {
|
|
|
262
277
|
case Enum.ControlType.Address:
|
|
263
278
|
rtnValidate.push(valid.requiredMultiCombo);
|
|
264
279
|
break;
|
|
280
|
+
case Enum.ControlType.File:
|
|
281
|
+
rtnValidate.push(valid.requiredFile);
|
|
282
|
+
break;
|
|
265
283
|
default:
|
|
266
284
|
rtnValidate.push(valid.required);
|
|
267
285
|
break;
|