cloud-web-corejs 1.0.159 → 1.0.160
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/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +1 -0
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +17 -9
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +3 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +3 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +2 -0
package/package.json
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
<div
|
|
70
70
|
class="el-icon-close"
|
|
71
71
|
@click="deleteFile(index)"
|
|
72
|
-
v-if="!field.options.disabled"
|
|
72
|
+
v-if="!field.options.disabled && !field.options.hideRemoveButton"
|
|
73
73
|
>
|
|
74
74
|
<i
|
|
75
75
|
class="el-tooltip iconfont iconshanchu"
|
|
@@ -244,13 +244,13 @@ export default {
|
|
|
244
244
|
this.showViewer = false;
|
|
245
245
|
},
|
|
246
246
|
hasPreview(attachment) {
|
|
247
|
-
return this.$commonFileUtil.isPictureFile(attachment.
|
|
247
|
+
return this.$commonFileUtil.isPictureFile(attachment.filename);
|
|
248
248
|
},
|
|
249
249
|
openPreview(attachment, index) {
|
|
250
|
-
let typeStr = Object.prototype.toString.call(attachment);
|
|
250
|
+
/* let typeStr = Object.prototype.toString.call(attachment);
|
|
251
251
|
let url =
|
|
252
|
-
typeStr == "[object Object]" ? attachment.domain + attachment.url : attachment;
|
|
253
|
-
if (this.$commonFileUtil.isPictureFile(attachment.
|
|
252
|
+
typeStr == "[object Object]" ? attachment.domain + attachment.url : attachment; */
|
|
253
|
+
if (this.$commonFileUtil.isPictureFile(attachment.filename)) {
|
|
254
254
|
this.openImagePreView(index);
|
|
255
255
|
}
|
|
256
256
|
},
|
|
@@ -260,12 +260,12 @@ export default {
|
|
|
260
260
|
let rows = [];
|
|
261
261
|
|
|
262
262
|
this.fieldModel.forEach((item, i) => {
|
|
263
|
-
if (this.$commonFileUtil.isPictureFile(item.
|
|
263
|
+
if (this.$commonFileUtil.isPictureFile(item.filename)) {
|
|
264
264
|
rows.push(item.showUrl);
|
|
265
265
|
}
|
|
266
266
|
});
|
|
267
267
|
this.fieldModel.find((item, i) => {
|
|
268
|
-
if (this.$commonFileUtil.isPictureFile(item.
|
|
268
|
+
if (this.$commonFileUtil.isPictureFile(item.filename)) {
|
|
269
269
|
pictureIndex++;
|
|
270
270
|
}
|
|
271
271
|
return index == i;
|
|
@@ -302,7 +302,7 @@ export default {
|
|
|
302
302
|
return name;
|
|
303
303
|
},
|
|
304
304
|
getShowUrl(attachment) {
|
|
305
|
-
return this.$commonFileUtil.getFileIconRequire(attachment.
|
|
305
|
+
return this.$commonFileUtil.getFileIconRequire(attachment.filename);
|
|
306
306
|
/* if (this.$commonFileUtil.isPictureFile(attachment.name)) {
|
|
307
307
|
return attachment.showUrl;
|
|
308
308
|
} else {
|
|
@@ -374,10 +374,18 @@ export default {
|
|
|
374
374
|
},
|
|
375
375
|
});
|
|
376
376
|
},
|
|
377
|
+
getDownloadName(attachment){
|
|
378
|
+
let suffix = this.$commonFileUtil.getFileSuffix(attachment.filename)
|
|
379
|
+
let fileName = attachment.name;
|
|
380
|
+
if(fileName.lastIndexOf(`.${suffix}`)<0){
|
|
381
|
+
fileName = fileName + "." + suffix;
|
|
382
|
+
}
|
|
383
|
+
return fileName
|
|
384
|
+
},
|
|
377
385
|
downloadFile(attachment) {
|
|
378
386
|
const toDo = () => {
|
|
379
387
|
const a = document.createElement("a");
|
|
380
|
-
a.download = attachment
|
|
388
|
+
a.download = this.getDownloadName(attachment);
|
|
381
389
|
a.href = attachment.showUrl;
|
|
382
390
|
a.click();
|
|
383
391
|
};
|
|
@@ -2739,6 +2739,7 @@ export const advancedFields = [
|
|
|
2739
2739
|
labelWidth: null,
|
|
2740
2740
|
labelHidden: !0,
|
|
2741
2741
|
limit: null,
|
|
2742
|
+
hideRemoveButton: false,
|
|
2742
2743
|
accessType: "1",
|
|
2743
2744
|
entityTableCode: null,
|
|
2744
2745
|
entityTableDesc: null,
|
|
@@ -3744,6 +3745,7 @@ export const businessFields = [
|
|
|
3744
3745
|
labelWidth: null,
|
|
3745
3746
|
labelHidden: !0,
|
|
3746
3747
|
limit: null,
|
|
3748
|
+
hideRemoveButton: false,
|
|
3747
3749
|
accessType: "1",
|
|
3748
3750
|
entityTableCode: null,
|
|
3749
3751
|
entityTableDesc: null,
|