centaline-data-driven 1.2.95 → 1.2.98
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/build/centaline/centaline.path.js +2 -1
- package/package.json +2 -1
- package/src/centaline/dynamicCompound/src/dynamicCompound.vue +1 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +15 -11
- package/src/centaline/dynamicFile/src/dynamicFile.vue +413 -325
- package/src/centaline/dynamicLayout/src/dynamicLayoutChildren.vue +1 -1
- package/src/centaline/dynamicLayout/src/dynamicLayoutChildrenFor.vue +1 -1
- package/src/centaline/dynamicLayout/src/dynamicLayoutImage.vue +2 -2
- package/src/centaline/dynamicLayout/src/dynamicLayoutLabel.vue +2 -2
- package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +7 -14
- package/src/centaline/loader/src/ctl/CellLayout.js +11 -0
- package/src/centaline/loader/src/ctl/SearchScreen.js +16 -3
- package/src/centaline/loader/src/ctl/lib/Enum.js +4 -0
- package/src/centaline/templateControls/src/dynamicTableCurrency.vue +15 -2
- package/wwwroot/static/centaline/centaline-data-driven.js +2 -2
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -1,380 +1,468 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
<div
|
|
3
|
+
style="width: 100%"
|
|
4
|
+
v-if="model !== null"
|
|
5
|
+
class="block ct-file"
|
|
6
|
+
:class="[model.attrs.size ? 'ct-checkbox-' + model.attrs.size : '']"
|
|
7
|
+
>
|
|
8
|
+
<el-upload
|
|
9
|
+
:class="disableUpload ? 'ct-upload-display-none' : ''"
|
|
10
|
+
:disabled="model.lock"
|
|
11
|
+
:accept="model.fileAccept"
|
|
12
|
+
:on-change="handleChange"
|
|
13
|
+
list-type="picture-card"
|
|
14
|
+
:file-list="model.fileList"
|
|
15
|
+
:multiple="true"
|
|
16
|
+
:auto-upload="true"
|
|
17
|
+
:action="model.action"
|
|
18
|
+
:data="model.uploadData"
|
|
19
|
+
:headers="headers"
|
|
20
|
+
:before-upload="beforeUploadProcess"
|
|
21
|
+
:on-success="handleAvatarSuccess"
|
|
22
|
+
:on-error="handleAvatarError"
|
|
23
|
+
:on-progress="uploadProcess"
|
|
24
|
+
:limit="parseInt(model.max || 999)"
|
|
25
|
+
:on-exceed="handleExceed"
|
|
26
|
+
>
|
|
20
27
|
<i slot="default" class="el-icon-plus"></i>
|
|
21
28
|
<!--<i slot="default" class="el-icon-plus" style="position: relative;"><div @click="testss($event)" class="max-ewmsc"></div></i>-->
|
|
22
29
|
|
|
23
|
-
<div slot="tip" class="el-upload__tip errorMessage" v-show="!valid">
|
|
24
|
-
|
|
30
|
+
<div slot="tip" class="el-upload__tip errorMessage" v-show="!valid">
|
|
31
|
+
{{ validMessage }}
|
|
32
|
+
</div>
|
|
33
|
+
<div slot="file" slot-scope="{ file }" :title="file.fileName">
|
|
25
34
|
<div class="cover-list-item">
|
|
26
|
-
<el-image
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
<el-image
|
|
36
|
+
fit="fill"
|
|
37
|
+
:src="file.url"
|
|
38
|
+
style="width: 100px; height: 100px"
|
|
39
|
+
:z-index="previewZIndex"
|
|
40
|
+
@click="viewerfile(file)"
|
|
41
|
+
>
|
|
31
42
|
</el-image>
|
|
32
|
-
<span
|
|
43
|
+
<span
|
|
44
|
+
class="cover-list-item-span-delete"
|
|
45
|
+
v-if="!model.lock && file.rightDel"
|
|
46
|
+
>
|
|
33
47
|
<i class="el-icon-delete" @click="handleRemove(file)"></i>
|
|
34
48
|
</span>
|
|
35
|
-
<span
|
|
49
|
+
<span
|
|
50
|
+
class="cover-list-item-span"
|
|
51
|
+
v-if="model.lock || model.paramName"
|
|
52
|
+
>
|
|
36
53
|
<!--锁定-->
|
|
37
54
|
<span v-if="model.lock || !file.rightEdit" class="el-dropdown-link">
|
|
38
|
-
<span style="width:80px;height:26px;display: inline-flex"
|
|
55
|
+
<span style="width: 80px; height: 26px; display: inline-flex"
|
|
56
|
+
> {{ file.mediaLabelName }}</span
|
|
57
|
+
>
|
|
39
58
|
</span>
|
|
40
59
|
<!--复杂分类-->
|
|
41
|
-
<span
|
|
42
|
-
|
|
60
|
+
<span
|
|
61
|
+
v-else-if="model.isComplexClassify"
|
|
62
|
+
class="el-dropdown-link"
|
|
63
|
+
@click="classifyFormClickHandle(file)"
|
|
64
|
+
>
|
|
65
|
+
<span style="width: 80px; height: 26px; display: inline-flex"
|
|
66
|
+
> {{ file.mediaLabelName }}</span
|
|
67
|
+
><i class="el-icon-arrow-down el-icon--right"></i>
|
|
43
68
|
</span>
|
|
44
69
|
<!--简单分类-->
|
|
45
|
-
<el-dropdown
|
|
70
|
+
<el-dropdown
|
|
71
|
+
v-else
|
|
72
|
+
class="el-upload-list__item-preview"
|
|
73
|
+
trigger="click"
|
|
74
|
+
placement="top"
|
|
75
|
+
@command="classifySelectedClickHandle"
|
|
76
|
+
>
|
|
46
77
|
<span class="el-dropdown-link" @click="classifyClickHandle">
|
|
47
|
-
<span style="width:80px;height:26px;display: inline-flex"
|
|
78
|
+
<span style="width: 80px; height: 26px; display: inline-flex"
|
|
79
|
+
> {{ file.mediaLabelName }}</span
|
|
80
|
+
><i class="el-icon-arrow-down el-icon--right"></i>
|
|
48
81
|
</span>
|
|
49
|
-
<el-dropdown-menu
|
|
50
|
-
|
|
51
|
-
|
|
82
|
+
<el-dropdown-menu
|
|
83
|
+
slot="dropdown"
|
|
84
|
+
class="el-upload-list__item-preview"
|
|
85
|
+
>
|
|
86
|
+
<el-dropdown-item
|
|
87
|
+
v-for="(option, index) in model.optionModel.options"
|
|
88
|
+
:key="index"
|
|
89
|
+
:command="{ option: option, file: file }"
|
|
90
|
+
>
|
|
91
|
+
{{ option[model.optionModel.optionAttrs.label] }}
|
|
52
92
|
</el-dropdown-item>
|
|
53
93
|
</el-dropdown-menu>
|
|
54
94
|
</el-dropdown>
|
|
55
95
|
</span>
|
|
56
96
|
</div>
|
|
57
|
-
<el-progress
|
|
97
|
+
<el-progress
|
|
98
|
+
type="circle"
|
|
99
|
+
v-if="file.progressFlag"
|
|
100
|
+
:percentage="file.loadProgress"
|
|
101
|
+
></el-progress>
|
|
58
102
|
</div>
|
|
59
103
|
</el-upload>
|
|
60
104
|
</div>
|
|
61
105
|
</template>
|
|
62
106
|
<script>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
107
|
+
import dynamicElement from "../../mixins/dynamicElement";
|
|
108
|
+
export default {
|
|
109
|
+
name: "ct-file",
|
|
110
|
+
mixins: [dynamicElement],
|
|
111
|
+
props: {
|
|
112
|
+
vmodel: Object,
|
|
113
|
+
api: String,
|
|
114
|
+
},
|
|
115
|
+
data() {
|
|
116
|
+
return {
|
|
117
|
+
disableUpload: false,
|
|
118
|
+
};
|
|
119
|
+
},
|
|
120
|
+
computed: {
|
|
121
|
+
headers: function () {
|
|
122
|
+
return this.$common.getDataDrivenOpts().handler.getRequestHeaders();
|
|
70
123
|
},
|
|
71
|
-
|
|
72
|
-
return
|
|
73
|
-
disableUpload:false,
|
|
74
|
-
};
|
|
124
|
+
previewZIndex: function () {
|
|
125
|
+
return this.$common.getDataDrivenOpts().zindex + 100;
|
|
75
126
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
127
|
+
},
|
|
128
|
+
created() {
|
|
129
|
+
var self = this;
|
|
130
|
+
this.$nextTick(function () {
|
|
131
|
+
if (self.vmodel) {
|
|
132
|
+
self.load(self.vmodel);
|
|
133
|
+
self.$emit("loaded");
|
|
134
|
+
} else if (typeof self.source !== "undefined") {
|
|
135
|
+
self.loaderObj.File(self.source, (data) => {
|
|
136
|
+
self.load(data);
|
|
137
|
+
});
|
|
82
138
|
}
|
|
139
|
+
this.disableUpload = this.model.lock;
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
methods: {
|
|
143
|
+
load(data) {
|
|
144
|
+
this.model = data;
|
|
83
145
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
this
|
|
87
|
-
|
|
88
|
-
if (self.vmodel) {
|
|
89
|
-
self.load(self.vmodel);
|
|
90
|
-
self.$emit('loaded');
|
|
91
|
-
}
|
|
92
|
-
else if (typeof self.source !== 'undefined') {
|
|
93
|
-
self.loaderObj.File(self.source, (data) => {
|
|
94
|
-
self.load(data);
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
this.disableUpload=this.model.lock;
|
|
98
|
-
});
|
|
146
|
+
handleExceed() {
|
|
147
|
+
this.validMessage = "附件数量最多" + this.model.max + "张";
|
|
148
|
+
this.valid = false;
|
|
99
149
|
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
handleExceed()
|
|
105
|
-
{
|
|
106
|
-
this.validMessage = "附件数量最多" + this.model.max+ "张";
|
|
107
|
-
this.valid = false;
|
|
108
|
-
},
|
|
109
|
-
//删除
|
|
110
|
-
handleRemove(file) {
|
|
111
|
-
this.$common.confirm("确定删除该附件?", "提示", {
|
|
150
|
+
//删除
|
|
151
|
+
handleRemove(file) {
|
|
152
|
+
this.$common
|
|
153
|
+
.confirm("确定删除该附件?", "提示", {
|
|
112
154
|
confirmButtonText: "确定",
|
|
113
155
|
cancelButtonText: "取消",
|
|
114
156
|
//type: 'warning'
|
|
115
|
-
})
|
|
157
|
+
})
|
|
158
|
+
.then(() => {
|
|
116
159
|
this.model.deleteFile(file, false);
|
|
117
|
-
this.selfValidExcute(
|
|
118
|
-
})
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
window.open(file.mediaUrl, "_blank");
|
|
128
|
-
}
|
|
129
|
-
return [];
|
|
160
|
+
this.selfValidExcute("remove");
|
|
161
|
+
})
|
|
162
|
+
.catch(() => {});
|
|
163
|
+
},
|
|
164
|
+
handlePictureCardPreview(file) {
|
|
165
|
+
if (this.$common.isAssetTypeAnImage(this.getSuffix(file))) {
|
|
166
|
+
// this.$openPreview([file.mediaUrl]);
|
|
167
|
+
} else {
|
|
168
|
+
if (file.rightDownload) {
|
|
169
|
+
window.open(file.mediaUrl, "_blank");
|
|
130
170
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
171
|
+
return [];
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
viewerfile(file) {
|
|
175
|
+
var self = this;
|
|
176
|
+
var MediaAlbum = [{ albumName: "媒体", medias: [] }];
|
|
177
|
+
|
|
178
|
+
let fileList = this.model.sourceList.filter((item) => {
|
|
179
|
+
return item.flagDeleted !== true;
|
|
180
|
+
});
|
|
181
|
+
fileList.forEach((v) => {
|
|
182
|
+
MediaAlbum[0].medias.push(v);
|
|
183
|
+
});
|
|
184
|
+
var index = MediaAlbum[0].medias.findIndex(
|
|
185
|
+
(v) => v.mediaID === file.source.mediaID
|
|
186
|
+
);
|
|
187
|
+
var dialogOption = {
|
|
188
|
+
title: "预览媒体",
|
|
189
|
+
pane: self.$common.getParentPane(self),
|
|
190
|
+
content: [
|
|
191
|
+
{
|
|
192
|
+
component: "ct-viewerfile",
|
|
193
|
+
attrs: {
|
|
194
|
+
showTitle: false,
|
|
195
|
+
MediaAlbum: MediaAlbum,
|
|
196
|
+
groupIndex: 0,
|
|
197
|
+
index: index,
|
|
198
|
+
// width: self.modelPhotoselect.router.pageWidth + 'px',
|
|
199
|
+
// height: self.modelPhotoselect.router.pageHeight+'px',
|
|
200
|
+
width:
|
|
201
|
+
parseInt(window.document.body.clientWidth * 0.8).toString() +
|
|
202
|
+
"px",
|
|
203
|
+
height:
|
|
204
|
+
parseInt(window.document.body.clientHeight * 0.8).toString() +
|
|
205
|
+
"px",
|
|
206
|
+
},
|
|
207
|
+
on: {
|
|
208
|
+
handlePhoto(photoList) {},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
],
|
|
212
|
+
};
|
|
213
|
+
self.$common.openDialog(dialogOption);
|
|
214
|
+
},
|
|
215
|
+
getPreviewSrcList(file) {
|
|
216
|
+
if (this.$common.isAssetTypeAnImage(this.getSuffix(file))) {
|
|
217
|
+
let arr = this.model.fileList
|
|
218
|
+
.filter((at) => this.$common.isAssetTypeAnImage(this.getSuffix(at)))
|
|
219
|
+
.map((attach) => {
|
|
135
220
|
return attach.mediaUrl;
|
|
136
|
-
})
|
|
221
|
+
});
|
|
137
222
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
return arr;
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
return [];
|
|
223
|
+
//让看起来有序
|
|
224
|
+
let nowIndex = arr.findIndex((photo) => photo === file.mediaUrl);
|
|
225
|
+
if (nowIndex > -1) {
|
|
226
|
+
let start = arr.slice(0, nowIndex);
|
|
227
|
+
let end = arr.slice(nowIndex);
|
|
228
|
+
arr = [...end, ...start];
|
|
149
229
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
230
|
+
return arr;
|
|
231
|
+
} else {
|
|
232
|
+
return [];
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
getSuffix(file) {
|
|
236
|
+
if (file.fileExtension) {
|
|
237
|
+
return file.fileExtension;
|
|
238
|
+
}
|
|
239
|
+
if (file.name) {
|
|
240
|
+
let nameArr = file.name.split(".");
|
|
241
|
+
return nameArr[nameArr.length - 1];
|
|
242
|
+
}
|
|
243
|
+
return "";
|
|
244
|
+
},
|
|
245
|
+
handleDownload(file) {
|
|
246
|
+
console.log(file);
|
|
247
|
+
},
|
|
248
|
+
handleChange(file, fileList) {
|
|
249
|
+
this.changeHandler(this.model.value);
|
|
250
|
+
},
|
|
251
|
+
//上传之前的钩子
|
|
252
|
+
beforeUploadProcess(files) {
|
|
253
|
+
let that = this;
|
|
254
|
+
|
|
255
|
+
// if (this.model.max) {
|
|
256
|
+
// console.log('beforeUploadProcess')
|
|
257
|
+
// console.log(this.model.fileList)
|
|
258
|
+
// if (this.model.getfileListLength() >= this.model.max) {
|
|
259
|
+
// this.validMessage = "附件最多" + this.model.max + "个";
|
|
260
|
+
// this.valid = false;
|
|
261
|
+
// setTimeout(() => {
|
|
262
|
+
// that.valid = true;
|
|
263
|
+
// }, 3000)
|
|
264
|
+
// return false;
|
|
265
|
+
// }
|
|
266
|
+
// }
|
|
267
|
+
return true;
|
|
268
|
+
},
|
|
269
|
+
//文件上传时的钩子
|
|
270
|
+
uploadProcess(event, file, fileList) {
|
|
271
|
+
file.progressFlag = true; // 显示进度条
|
|
272
|
+
file.loadProgress = parseInt(event.percent); // 动态获取文件上传进度
|
|
273
|
+
if (file.loadProgress >= 100) {
|
|
274
|
+
file.loadProgress = 100;
|
|
275
|
+
setTimeout(() => {
|
|
276
|
+
file.progressFlag = false;
|
|
277
|
+
}, 1000); // 一秒后关闭进度条
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
//上传完成钩子
|
|
281
|
+
handleAvatarSuccess(res, file, fileList) {
|
|
282
|
+
this.model.handleAvatarSuccess(res, file, fileList);
|
|
283
|
+
},
|
|
284
|
+
handleAvatarError(res, file, fileList) {
|
|
285
|
+
if (res.status === 404) {
|
|
286
|
+
let m = JSON.parse(res.message);
|
|
287
|
+
if (m.error) {
|
|
288
|
+
this.$message.warning("path(" + m.path + ") " + m.error);
|
|
158
289
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
beforeUploadProcess(files) {
|
|
169
|
-
let that=this;
|
|
170
|
-
|
|
171
|
-
// if (this.model.max) {
|
|
172
|
-
// console.log('beforeUploadProcess')
|
|
173
|
-
// console.log(this.model.fileList)
|
|
174
|
-
// if (this.model.getfileListLength() >= this.model.max) {
|
|
175
|
-
// this.validMessage = "附件最多" + this.model.max + "个";
|
|
176
|
-
// this.valid = false;
|
|
177
|
-
// setTimeout(() => {
|
|
178
|
-
// that.valid = true;
|
|
179
|
-
// }, 3000)
|
|
180
|
-
// return false;
|
|
181
|
-
// }
|
|
182
|
-
// }
|
|
183
|
-
return true;
|
|
184
|
-
},
|
|
185
|
-
//文件上传时的钩子
|
|
186
|
-
uploadProcess(event, file, fileList) {
|
|
187
|
-
file.progressFlag = true; // 显示进度条
|
|
188
|
-
file.loadProgress = parseInt(event.percent); // 动态获取文件上传进度
|
|
189
|
-
if (file.loadProgress >= 100) {
|
|
190
|
-
file.loadProgress = 100
|
|
191
|
-
setTimeout(() => {
|
|
192
|
-
file.progressFlag = false
|
|
193
|
-
}, 1000) // 一秒后关闭进度条
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
//不能共用的数据校验
|
|
293
|
+
selfValidExcute: function (eventName) {
|
|
294
|
+
if (this.model.required) {
|
|
295
|
+
if (this.model.getfileListLength() === 0) {
|
|
296
|
+
this.validMessage = "必须上传附件";
|
|
297
|
+
this.valid = false;
|
|
298
|
+
return false;
|
|
194
299
|
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
this.model.
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
let m=JSON.parse(res.message);
|
|
203
|
-
if(m.error){
|
|
204
|
-
this.$message.warning('path('+m.path+') '+m.error);
|
|
205
|
-
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
if (this.model.max) {
|
|
303
|
+
if (this.model.getfileListLength() >= this.model.max) {
|
|
304
|
+
this.disableUpload = true;
|
|
305
|
+
} else {
|
|
306
|
+
this.disableUpload = false;
|
|
206
307
|
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
if (this.model.getfileListLength()
|
|
212
|
-
this.validMessage =
|
|
308
|
+
}
|
|
309
|
+
if (this.model.min) {
|
|
310
|
+
if (this.model.getfileListLength() < this.model.min) {
|
|
311
|
+
//change时需要判断有没有上传图片如果没有图片则不提示
|
|
312
|
+
if (eventName == "change" && this.model.getfileListLength() > 0) {
|
|
313
|
+
this.validMessage =
|
|
314
|
+
"附件数量还差" +
|
|
315
|
+
(parseInt(this.model.min) - this.model.getfileListLength()) +
|
|
316
|
+
"张";
|
|
213
317
|
this.valid = false;
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
else{
|
|
223
|
-
this.disableUpload=false;
|
|
318
|
+
} else if (eventName == "valid") {
|
|
319
|
+
this.validMessage =
|
|
320
|
+
"附件数量还差" +
|
|
321
|
+
(parseInt(this.model.min) - this.model.getfileListLength()) +
|
|
322
|
+
"张";
|
|
323
|
+
this.valid = false;
|
|
324
|
+
} else if (eventName == "remove") {
|
|
325
|
+
this.valid = true;
|
|
224
326
|
}
|
|
327
|
+
return false;
|
|
225
328
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
329
|
+
}
|
|
330
|
+
if (eventName == "valid" && !this.validFileClass()) {
|
|
331
|
+
this.validMessage = "请选择附件分类";
|
|
332
|
+
this.valid = false;
|
|
333
|
+
return false;
|
|
334
|
+
}
|
|
335
|
+
this.valid = true;
|
|
336
|
+
return this.valid;
|
|
337
|
+
},
|
|
338
|
+
//验证附件分类是否必填
|
|
339
|
+
validFileClass() {
|
|
340
|
+
if (this.model.paramName) {
|
|
341
|
+
if (this.model.sourceList && this.model.sourceList.length > 0) {
|
|
342
|
+
let notClass = this.model.sourceList.filter((item) => {
|
|
343
|
+
return (
|
|
344
|
+
(item.mediaLabelID == undefined || item.mediaLabelID == "") &&
|
|
345
|
+
item.flagDeleted !== true
|
|
346
|
+
);
|
|
347
|
+
});
|
|
348
|
+
if (notClass.length > 0) {
|
|
240
349
|
return false;
|
|
241
350
|
}
|
|
242
351
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
352
|
+
}
|
|
353
|
+
return true;
|
|
354
|
+
},
|
|
355
|
+
classifyClickHandle: function () {
|
|
356
|
+
var self = this;
|
|
357
|
+
this.model.getOptions(() => {
|
|
358
|
+
self.$forceUpdate();
|
|
359
|
+
});
|
|
360
|
+
},
|
|
361
|
+
classifySelectedClickHandle: function (classify) {
|
|
362
|
+
classify.file.mediaLabelName =
|
|
363
|
+
classify.option[this.model.optionModel.optionAttrs.label];
|
|
364
|
+
classify.file.mediaLabelID =
|
|
365
|
+
classify.option[this.model.optionModel.optionAttrs.value];
|
|
366
|
+
this.model.setClassify(classify);
|
|
367
|
+
if (!this.validFileClass()) {
|
|
368
|
+
this.validMessage = "请选择附件分类";
|
|
369
|
+
this.valid = false;
|
|
370
|
+
} else {
|
|
248
371
|
this.valid = true;
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
classifyClickHandle: function () {
|
|
266
|
-
var self = this;
|
|
267
|
-
this.model.getOptions(() => {
|
|
268
|
-
self.$forceUpdate();
|
|
269
|
-
});
|
|
270
|
-
},
|
|
271
|
-
classifySelectedClickHandle: function (classify) {
|
|
272
|
-
classify.file.mediaLabelName = classify.option[this.model.optionModel.optionAttrs.label];
|
|
273
|
-
classify.file.mediaLabelID = classify.option[this.model.optionModel.optionAttrs.value];
|
|
274
|
-
this.model.setClassify(classify);
|
|
275
|
-
if(!this.validFileClass())
|
|
276
|
-
{
|
|
277
|
-
this.validMessage="请选择附件分类";
|
|
278
|
-
this.valid = false;
|
|
279
|
-
}else
|
|
280
|
-
{
|
|
281
|
-
this.valid = true;
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
classifyFormClickHandle: function (file) {
|
|
285
|
-
var self = this;
|
|
286
|
-
this.model.updateClassify(file, () => {
|
|
287
|
-
//self.$forceUpdate();
|
|
288
|
-
});
|
|
289
|
-
if(!this.validFileClass())
|
|
290
|
-
{
|
|
291
|
-
this.validMessage="请选择附件分类";
|
|
292
|
-
this.valid = false;
|
|
293
|
-
}else
|
|
294
|
-
{
|
|
295
|
-
this.valid = true;
|
|
296
|
-
}
|
|
297
|
-
},
|
|
298
|
-
}
|
|
299
|
-
}
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
classifyFormClickHandle: function (file) {
|
|
375
|
+
var self = this;
|
|
376
|
+
this.model.updateClassify(file, () => {
|
|
377
|
+
//self.$forceUpdate();
|
|
378
|
+
});
|
|
379
|
+
if (!this.validFileClass()) {
|
|
380
|
+
this.validMessage = "请选择附件分类";
|
|
381
|
+
this.valid = false;
|
|
382
|
+
} else {
|
|
383
|
+
this.valid = true;
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
};
|
|
300
388
|
</script>
|
|
301
389
|
<style>
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
.el-upload-list__item .is-ready{
|
|
390
|
+
.ct-upload-display-none .el-upload--picture-card {
|
|
391
|
+
display: none;
|
|
392
|
+
}
|
|
393
|
+
.el-upload-list__item .is-ready {
|
|
307
394
|
width: 100px;
|
|
308
|
-
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
|
|
395
|
+
height: 100px;
|
|
396
|
+
}
|
|
397
|
+
.ct-file .cover-list-item {
|
|
398
|
+
position: sticky;
|
|
399
|
+
}
|
|
312
400
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
401
|
+
.ct-file .cover-list-item-span {
|
|
402
|
+
position: inherit;
|
|
403
|
+
bottom: 0px;
|
|
404
|
+
left: 0px;
|
|
405
|
+
display: block;
|
|
406
|
+
background-color: #544f48;
|
|
407
|
+
opacity: 0.8;
|
|
408
|
+
}
|
|
409
|
+
.ct-file .el-dropdown-link {
|
|
410
|
+
cursor: pointer;
|
|
411
|
+
color: #fff;
|
|
412
|
+
position: relative;
|
|
413
|
+
width: 100px;
|
|
414
|
+
height: 26px;
|
|
415
|
+
display: inline-block;
|
|
416
|
+
}
|
|
417
|
+
.el-icon--right {
|
|
418
|
+
position: absolute;
|
|
419
|
+
right: 5px;
|
|
420
|
+
top: 6px;
|
|
421
|
+
}
|
|
422
|
+
.ct-file .cover-list-item-span-delete {
|
|
423
|
+
position: inherit;
|
|
424
|
+
bottom: 160px;
|
|
425
|
+
left: 130px;
|
|
426
|
+
color: #000000;
|
|
427
|
+
text-align: center;
|
|
428
|
+
}
|
|
429
|
+
.cover-list-item-span-delete i {
|
|
430
|
+
cursor: pointer;
|
|
431
|
+
}
|
|
432
|
+
.ct-file .el-dropdown-link {
|
|
433
|
+
cursor: pointer;
|
|
434
|
+
color: #fff;
|
|
435
|
+
}
|
|
348
436
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
437
|
+
.ct-file .el-icon-arrow-down {
|
|
438
|
+
font-size: 12px;
|
|
439
|
+
}
|
|
440
|
+
.el-collapse-item__content {
|
|
441
|
+
padding-bottom: 18px;
|
|
442
|
+
}
|
|
443
|
+
.el-upload--picture-card {
|
|
444
|
+
width: 100px;
|
|
445
|
+
height: 100px;
|
|
446
|
+
line-height: initial;
|
|
447
|
+
padding: 34px;
|
|
448
|
+
}
|
|
449
|
+
.el-upload--picture-card i {
|
|
450
|
+
font-size: 30px;
|
|
451
|
+
}
|
|
452
|
+
.el-upload-list--picture-card .el-upload-list__item {
|
|
453
|
+
width: 100px;
|
|
454
|
+
height: 100px;
|
|
455
|
+
}
|
|
456
|
+
.el-upload .max-ewmsc {
|
|
457
|
+
background: url("../../../assets/ewm.png") no-repeat;
|
|
458
|
+
content: "";
|
|
459
|
+
display: block;
|
|
460
|
+
width: 30px;
|
|
461
|
+
height: 30px;
|
|
462
|
+
font-size: 30px;
|
|
463
|
+
background-size: 30px;
|
|
464
|
+
position: absolute;
|
|
465
|
+
top: -35px;
|
|
466
|
+
left: 35px;
|
|
467
|
+
}
|
|
380
468
|
</style>
|