cloud-web-corejs 1.1.0-dev.81 → 1.1.0-dev.83
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/VabUpload/mixins.js +5 -0
- package/src/components/VabUpload/view.vue +4 -0
- package/src/components/baseAttachment/index.vue +1 -0
- package/src/components/baseAttachment/mixins.js +17 -0
- package/src/components/baseAttachment/showList.vue +12 -2
- package/src/components/baseAttachment/uploadDialog.vue +2 -1
- package/src/components/hiprint/hiprint.bundle.js +5 -1
- package/src/components/obsUpload/mixins.js +45 -50
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +7 -0
- 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 +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +22 -9
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +13 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/showDownloadButton-editor.vue +29 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +3 -0
- package/src/microRouter/index.js +5 -0
- package/src/store/modules/permission.js +2 -0
package/package.json
CHANGED
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
</div>
|
|
96
96
|
<div class="el-icon-tagEdit" v-if="attachment.h5 !== 1">
|
|
97
97
|
<el-tooltip
|
|
98
|
+
v-if="showDownloadButton"
|
|
98
99
|
class="item"
|
|
99
100
|
effect="dark"
|
|
100
101
|
:content="$t2('下载', 'system.button.download')"
|
|
@@ -226,6 +227,9 @@ export default {
|
|
|
226
227
|
ElImageViewer: () => import("./image-viewer"),
|
|
227
228
|
},
|
|
228
229
|
computed: {
|
|
230
|
+
showDownloadButton() {
|
|
231
|
+
return this.showDownload !== false && this.showDownload !== "false";
|
|
232
|
+
},
|
|
229
233
|
classList() {
|
|
230
234
|
// 'upload-img': this.dataType || (this.$attrs.hideInfo == true || this.$attrs.hideInfo == 'true')
|
|
231
235
|
let arr = [];
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
</template>
|
|
28
28
|
<uploadDialog v-if="showUploadDialog" :visiable.sync="showUploadDialog"
|
|
29
29
|
:rows.sync="rows" :title="title" :edit="edit" :param.sync="option.uploadConfig"
|
|
30
|
+
:showDownload="showDownloadButton"
|
|
30
31
|
:onConfirm="confirmInsertAttachment"/>
|
|
31
32
|
</template>
|
|
32
33
|
</span>
|
|
@@ -47,6 +47,11 @@ indexMixin = {
|
|
|
47
47
|
showViewButton() {
|
|
48
48
|
return this.option && this.option.showViewButton !== false ? true : false;
|
|
49
49
|
},
|
|
50
|
+
/* 未传或非 false 时显示下载按钮 */
|
|
51
|
+
showDownloadButton() {
|
|
52
|
+
let value = this.option && this.option.showDownloadButton;
|
|
53
|
+
return value !== false && value !== "false";
|
|
54
|
+
},
|
|
50
55
|
fileServerPreviewEnabled(){
|
|
51
56
|
return this.getFileServerPreviewEnabled();
|
|
52
57
|
},
|
|
@@ -269,6 +274,11 @@ uploadDialogMixin = {
|
|
|
269
274
|
type: Boolean,
|
|
270
275
|
default: false,
|
|
271
276
|
},
|
|
277
|
+
/* 附件弹窗里的下载按钮,默认显示 */
|
|
278
|
+
showDownload: {
|
|
279
|
+
type: Boolean,
|
|
280
|
+
default: true,
|
|
281
|
+
},
|
|
272
282
|
title: {
|
|
273
283
|
type: String,
|
|
274
284
|
default: () => this.$t2("凭证信息", "components.baseAttachment.title"),
|
|
@@ -283,6 +293,13 @@ uploadDialogMixin = {
|
|
|
283
293
|
},
|
|
284
294
|
mounted() {
|
|
285
295
|
},
|
|
296
|
+
computed: {
|
|
297
|
+
resolvedShowDownload() {
|
|
298
|
+
if (this.showDownload === false) return false;
|
|
299
|
+
let configValue = this.param && this.param.showDownload;
|
|
300
|
+
return configValue !== false && configValue !== "false";
|
|
301
|
+
},
|
|
302
|
+
},
|
|
286
303
|
data() {
|
|
287
304
|
var that = this;
|
|
288
305
|
return {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{{ attachment.name }}
|
|
15
15
|
</a>
|
|
16
16
|
</el-tooltip>
|
|
17
|
-
<el-tooltip class="item" effect="dark" :content="$t2('下载', 'system.button.preview')" placement="top"
|
|
17
|
+
<el-tooltip v-if="showDownloadButton" class="item" effect="dark" :content="$t2('下载', 'system.button.preview')" placement="top"
|
|
18
18
|
:enterable="false">
|
|
19
19
|
<a
|
|
20
20
|
href="javascript:void(0);"
|
|
@@ -34,7 +34,17 @@
|
|
|
34
34
|
export default {
|
|
35
35
|
name: "attachmentShowList",
|
|
36
36
|
props: {
|
|
37
|
-
rows: Array
|
|
37
|
+
rows: Array,
|
|
38
|
+
/* 未传或非 false 时显示下载按钮 */
|
|
39
|
+
showDownload: {
|
|
40
|
+
type: [Boolean, String],
|
|
41
|
+
default: true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
computed: {
|
|
45
|
+
showDownloadButton() {
|
|
46
|
+
return this.showDownload !== false && this.showDownload !== "false";
|
|
47
|
+
}
|
|
38
48
|
}
|
|
39
49
|
}
|
|
40
50
|
</script>
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
>
|
|
16
16
|
<div id="containt">
|
|
17
17
|
<div class="detail-wrap" style="height: 450px;padding: 10px 10px;">
|
|
18
|
-
<baseUpload v-if="showUpload" v-bind="option" :file.sync="checkRows" :edit="edit"
|
|
18
|
+
<baseUpload v-if="showUpload" v-bind="option" :file.sync="checkRows" :edit="edit"
|
|
19
|
+
:showDownload="resolvedShowDownload" multi="true"></baseUpload>
|
|
19
20
|
</div>
|
|
20
21
|
</div>
|
|
21
22
|
<span slot="footer" class="dialog-footer">
|
|
@@ -8920,7 +8920,11 @@ var hiprint = function (t) {
|
|
|
8920
8920
|
}, t.prototype.getPrintStyle = function () {
|
|
8921
8921
|
return " <style printStyle>\n @page\n {\n border:0;\n padding:0cm;\n margin:0cm;\n " + this.getPrintSizeStyle() + "\n }\n </style>\n";
|
|
8922
8922
|
}, t.prototype.getPrintSizeStyle = function () {
|
|
8923
|
-
|
|
8923
|
+
if (this.paperType) {
|
|
8924
|
+
return "size:" + this.paperType + " " + (this.height > this.width ? "portrait" : "landscape") + ";";
|
|
8925
|
+
}
|
|
8926
|
+
// 自定义纸张由最终宽高决定方向;长度值不能与 portrait/landscape 混用。
|
|
8927
|
+
return "size: " + this.width + "mm " + this.height + "mm;";
|
|
8924
8928
|
}, t.prototype.deletePrintElement = function (t) {
|
|
8925
8929
|
var e = this;
|
|
8926
8930
|
this.printElements.filter(function (n, i) {
|
|
@@ -102,16 +102,11 @@ tmixins = {
|
|
|
102
102
|
editFileSuffix: null,
|
|
103
103
|
beforeUploadFlag: false,
|
|
104
104
|
uploadUrl: null,
|
|
105
|
-
|
|
106
|
-
access_key_id: "HPUAQ1TAFXWGOKSNKCGW", // 你的ak
|
|
107
|
-
secret_access_key: "Ns1nwPwikK67Acbhj3wlfUambjbdroqpk0TFv7qg", // 你的sk
|
|
108
|
-
server: "https://obs.cn-south-1.myhuaweicloud.com", // 你的endPoint 记得加入https://
|
|
109
|
-
Bucket: "gztw-file01", // 你的桶名
|
|
110
105
|
};
|
|
111
106
|
},
|
|
112
|
-
beforeDestroy() {
|
|
113
|
-
this.removePasteEvent();
|
|
114
|
-
this.revokeUploadObjectUrls();
|
|
107
|
+
beforeDestroy() {
|
|
108
|
+
this.removePasteEvent();
|
|
109
|
+
this.revokeUploadObjectUrls();
|
|
115
110
|
},
|
|
116
111
|
filters: {
|
|
117
112
|
btnText(btn) {
|
|
@@ -348,7 +343,7 @@ tmixins = {
|
|
|
348
343
|
blurPasteEvent() {
|
|
349
344
|
this.pasteAreaStatus = false;
|
|
350
345
|
},
|
|
351
|
-
handleClose() {
|
|
346
|
+
handleClose() {
|
|
352
347
|
let target = this.$refs.upload;
|
|
353
348
|
(target.uploadFiles || []).forEach((uploadFile) => {
|
|
354
349
|
if (uploadFile.status == "uploading" || uploadFile.status == "ready") {
|
|
@@ -357,15 +352,15 @@ tmixins = {
|
|
|
357
352
|
this.$t2("取消上传", "components.VabUpload.cancelUpload")
|
|
358
353
|
);
|
|
359
354
|
}
|
|
360
|
-
});
|
|
361
|
-
this.revokeUploadObjectUrls();
|
|
362
|
-
this.pasteList = [];
|
|
363
|
-
this.removePasteEvent();
|
|
364
|
-
this.picture = "picture";
|
|
365
|
-
this.clearFileInfo();
|
|
366
|
-
this.dialogFormVisible = false;
|
|
367
|
-
const destroyRoot = this.$destroyOnDialogClose;
|
|
368
|
-
if (destroyRoot) this.$nextTick(destroyRoot);
|
|
355
|
+
});
|
|
356
|
+
this.revokeUploadObjectUrls();
|
|
357
|
+
this.pasteList = [];
|
|
358
|
+
this.removePasteEvent();
|
|
359
|
+
this.picture = "picture";
|
|
360
|
+
this.clearFileInfo();
|
|
361
|
+
this.dialogFormVisible = false;
|
|
362
|
+
const destroyRoot = this.$destroyOnDialogClose;
|
|
363
|
+
if (destroyRoot) this.$nextTick(destroyRoot);
|
|
369
364
|
},
|
|
370
365
|
clearFileInfo() {
|
|
371
366
|
this.fileList = [];
|
|
@@ -1208,33 +1203,33 @@ tmixins = {
|
|
|
1208
1203
|
}
|
|
1209
1204
|
},
|
|
1210
1205
|
//end
|
|
1211
|
-
getShowImage(file, fileName) {
|
|
1206
|
+
getShowImage(file, fileName) {
|
|
1212
1207
|
fileName = fileName || file.name;
|
|
1213
1208
|
if (this.$commonFileUtil.isPictureFile(fileName)) {
|
|
1214
1209
|
return file.showUrl || file.url;
|
|
1215
1210
|
} else {
|
|
1216
1211
|
return this.$commonFileUtil.getFileIconRequire(fileName);
|
|
1217
1212
|
}
|
|
1218
|
-
},
|
|
1219
|
-
revokeUploadObjectUrl(url) {
|
|
1220
|
-
if (typeof url === "string" && url.startsWith("blob:")) {
|
|
1221
|
-
URL.revokeObjectURL(url);
|
|
1222
|
-
}
|
|
1223
|
-
},
|
|
1224
|
-
revokeUploadObjectUrls() {
|
|
1225
|
-
const files = [
|
|
1226
|
-
...(this.fileList || []),
|
|
1227
|
-
...(this.pasteList || []),
|
|
1228
|
-
...(this.$refs.upload?.uploadFiles || []),
|
|
1229
|
-
];
|
|
1230
|
-
const urls = new Set();
|
|
1231
|
-
files.forEach((file) => {
|
|
1232
|
-
if (file?.showUrl) urls.add(file.showUrl);
|
|
1233
|
-
if (file?.url) urls.add(file.url);
|
|
1234
|
-
});
|
|
1235
|
-
urls.forEach((url) => this.revokeUploadObjectUrl(url));
|
|
1236
|
-
},
|
|
1237
|
-
removeFile(sfile) {
|
|
1213
|
+
},
|
|
1214
|
+
revokeUploadObjectUrl(url) {
|
|
1215
|
+
if (typeof url === "string" && url.startsWith("blob:")) {
|
|
1216
|
+
URL.revokeObjectURL(url);
|
|
1217
|
+
}
|
|
1218
|
+
},
|
|
1219
|
+
revokeUploadObjectUrls() {
|
|
1220
|
+
const files = [
|
|
1221
|
+
...(this.fileList || []),
|
|
1222
|
+
...(this.pasteList || []),
|
|
1223
|
+
...(this.$refs.upload?.uploadFiles || []),
|
|
1224
|
+
];
|
|
1225
|
+
const urls = new Set();
|
|
1226
|
+
files.forEach((file) => {
|
|
1227
|
+
if (file?.showUrl) urls.add(file.showUrl);
|
|
1228
|
+
if (file?.url) urls.add(file.url);
|
|
1229
|
+
});
|
|
1230
|
+
urls.forEach((url) => this.revokeUploadObjectUrl(url));
|
|
1231
|
+
},
|
|
1232
|
+
removeFile(sfile) {
|
|
1238
1233
|
var target = this.$refs.upload;
|
|
1239
1234
|
var index;
|
|
1240
1235
|
var fileList = target.uploadFiles;
|
|
@@ -1255,8 +1250,8 @@ tmixins = {
|
|
|
1255
1250
|
}
|
|
1256
1251
|
}
|
|
1257
1252
|
|
|
1258
|
-
this.revokeUploadObjectUrl(sfile?.showUrl || sfile?.url);
|
|
1259
|
-
target.uploadFiles.splice(index, 1);
|
|
1253
|
+
this.revokeUploadObjectUrl(sfile?.showUrl || sfile?.url);
|
|
1254
|
+
target.uploadFiles.splice(index, 1);
|
|
1260
1255
|
this.handleChange(sfile, target.uploadFiles);
|
|
1261
1256
|
},
|
|
1262
1257
|
submitImage() {
|
|
@@ -1466,10 +1461,10 @@ tmixins = {
|
|
|
1466
1461
|
this.pasteList.push(...fileList);
|
|
1467
1462
|
}
|
|
1468
1463
|
},
|
|
1469
|
-
deletePasteFile(index) {
|
|
1470
|
-
const file = this.pasteList[index];
|
|
1471
|
-
this.revokeUploadObjectUrl(file?.showUrl || file?.url);
|
|
1472
|
-
this.pasteList.splice(index, 1);
|
|
1464
|
+
deletePasteFile(index) {
|
|
1465
|
+
const file = this.pasteList[index];
|
|
1466
|
+
this.revokeUploadObjectUrl(file?.showUrl || file?.url);
|
|
1467
|
+
this.pasteList.splice(index, 1);
|
|
1473
1468
|
},
|
|
1474
1469
|
confirmPasteFile() {
|
|
1475
1470
|
let target = this.$refs.upload;
|
|
@@ -1481,10 +1476,10 @@ tmixins = {
|
|
|
1481
1476
|
fileRaw.fileName = name;
|
|
1482
1477
|
return fileRaw;
|
|
1483
1478
|
});
|
|
1484
|
-
innerTarget.uploadFiles(files);
|
|
1485
|
-
this.pasteList.forEach((file) =>
|
|
1486
|
-
this.revokeUploadObjectUrl(file?.showUrl || file?.url)
|
|
1487
|
-
);
|
|
1479
|
+
innerTarget.uploadFiles(files);
|
|
1480
|
+
this.pasteList.forEach((file) =>
|
|
1481
|
+
this.revokeUploadObjectUrl(file?.showUrl || file?.url)
|
|
1482
|
+
);
|
|
1488
1483
|
this.$nextTick(() => {
|
|
1489
1484
|
target.uploadFiles.forEach((uploadFile) => {
|
|
1490
1485
|
let fileRaw = uploadFile.raw;
|
|
@@ -1494,7 +1489,7 @@ tmixins = {
|
|
|
1494
1489
|
}
|
|
1495
1490
|
});
|
|
1496
1491
|
});
|
|
1497
|
-
this.pasteList = [];
|
|
1492
|
+
this.pasteList = [];
|
|
1498
1493
|
},
|
|
1499
1494
|
changeFileName(file) {
|
|
1500
1495
|
if (file.fileSuffix) {
|
package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue
CHANGED
|
@@ -93,6 +93,9 @@ export default {
|
|
|
93
93
|
'field.options.disabled'(val) {
|
|
94
94
|
this.option.edit = !val;
|
|
95
95
|
},
|
|
96
|
+
'field.options.showDownloadButton'(val) {
|
|
97
|
+
this.option.showDownloadButton = val !== false;
|
|
98
|
+
},
|
|
96
99
|
'option':function(){
|
|
97
100
|
|
|
98
101
|
}
|
|
@@ -170,10 +173,14 @@ export default {
|
|
|
170
173
|
if (!this.field.options.hasOwnProperty('disabled')) {
|
|
171
174
|
this.$set(this.field.options, 'disabled', false);
|
|
172
175
|
}
|
|
176
|
+
if (!this.field.options.hasOwnProperty('showDownloadButton')) {
|
|
177
|
+
this.$set(this.field.options, 'showDownloadButton', true);
|
|
178
|
+
}
|
|
173
179
|
this.option = {
|
|
174
180
|
title: this.$t1('附件'),
|
|
175
181
|
edit: !this.field.options.disabled,
|
|
176
182
|
showViewButton: this.field.options.showViewButton !== false,
|
|
183
|
+
showDownloadButton: this.field.options.showDownloadButton !== false,
|
|
177
184
|
uploadConfig: {
|
|
178
185
|
limit: this.field.options.limit,
|
|
179
186
|
fileTypes: this.field.options.fileTypes || [],
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
resultType="Array"
|
|
35
35
|
:edit="!field.options.disabled && !isReadMode"
|
|
36
36
|
:remove="!field.options.hideRemoveButton && !isReadMode"
|
|
37
|
+
:showDownload="field.options.showDownload !== false"
|
|
37
38
|
@callback="submitFile"
|
|
38
39
|
:hideInfo="field.options.hideFileInfo"
|
|
39
40
|
:hideName="field.options.hideFileName"
|
|
@@ -30,22 +30,35 @@
|
|
|
30
30
|
<el-form-item :label="i18nt('隐藏删除按钮')">
|
|
31
31
|
<el-switch v-model="optionModel.hideRemoveButton"></el-switch>
|
|
32
32
|
</el-form-item>
|
|
33
|
+
<el-form-item :label="i18nt('隐藏下载按钮')">
|
|
34
|
+
<el-switch :value="hideDownloadButton" @change="handleHideDownloadChange"></el-switch>
|
|
35
|
+
</el-form-item>
|
|
33
36
|
|
|
34
37
|
</div>
|
|
35
38
|
</template>
|
|
36
39
|
|
|
37
40
|
<script>
|
|
38
|
-
|
|
41
|
+
import i18n from "../../../../../../components/xform/utils/i18n";
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
export default {
|
|
44
|
+
name: "field-vabUpload-editor",
|
|
45
|
+
mixins: [i18n],
|
|
46
|
+
props: {
|
|
47
|
+
designer: Object,
|
|
48
|
+
selectedWidget: Object,
|
|
49
|
+
optionModel: Object,
|
|
50
|
+
},
|
|
51
|
+
computed: {
|
|
52
|
+
hideDownloadButton() {
|
|
53
|
+
return this.optionModel.showDownload === false;
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
methods: {
|
|
57
|
+
handleHideDownloadChange(hidden) {
|
|
58
|
+
this.$set(this.optionModel, "showDownload", !hidden);
|
|
47
59
|
},
|
|
48
|
-
}
|
|
60
|
+
},
|
|
61
|
+
};
|
|
49
62
|
</script>
|
|
50
63
|
|
|
51
64
|
<style scoped>
|
|
@@ -40,6 +40,9 @@
|
|
|
40
40
|
<el-form-item :label="i18nt('隐藏删除按钮')">
|
|
41
41
|
<el-switch v-model="optionModel.hideRemoveButton"></el-switch>
|
|
42
42
|
</el-form-item>
|
|
43
|
+
<el-form-item :label="i18nt('隐藏下载按钮')">
|
|
44
|
+
<el-switch :value="hideDownloadButton" @change="handleHideDownloadChange"></el-switch>
|
|
45
|
+
</el-form-item>
|
|
43
46
|
</div>
|
|
44
47
|
</template>
|
|
45
48
|
|
|
@@ -60,6 +63,16 @@ export default {
|
|
|
60
63
|
deleteParam: ["dataId", "formCode", "param"],
|
|
61
64
|
};
|
|
62
65
|
},
|
|
66
|
+
computed: {
|
|
67
|
+
hideDownloadButton() {
|
|
68
|
+
return this.optionModel.showDownload === false;
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
methods: {
|
|
72
|
+
handleHideDownloadChange(hidden) {
|
|
73
|
+
this.$set(this.optionModel, "showDownload", !hidden);
|
|
74
|
+
},
|
|
75
|
+
},
|
|
63
76
|
};
|
|
64
77
|
</script>
|
|
65
78
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form-item :label="i18nt('隐藏下载按钮')">
|
|
3
|
+
<el-switch :value="hideDownloadButton" @change="handleChange"></el-switch>
|
|
4
|
+
</el-form-item>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: "showDownloadButton-editor",
|
|
12
|
+
mixins: [i18n],
|
|
13
|
+
props: {
|
|
14
|
+
designer: Object,
|
|
15
|
+
selectedWidget: Object,
|
|
16
|
+
optionModel: Object,
|
|
17
|
+
},
|
|
18
|
+
computed: {
|
|
19
|
+
hideDownloadButton() {
|
|
20
|
+
return this.optionModel.showDownloadButton === false;
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
methods: {
|
|
24
|
+
handleChange(hidden) {
|
|
25
|
+
this.$set(this.optionModel, "showDownloadButton", !hidden);
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
</script>
|
|
@@ -199,6 +199,7 @@ const COMMON_PROPERTIES = {
|
|
|
199
199
|
colorClass: "colorClass-editor",
|
|
200
200
|
downloadButtonFlag: "downloadButtonFlag-editor",
|
|
201
201
|
showViewButton: "showViewButton-editor",
|
|
202
|
+
showDownloadButton: "showDownloadButton-editor",
|
|
202
203
|
urlValueEnabled: "urlValueEnabled-editor",
|
|
203
204
|
};
|
|
204
205
|
|
|
@@ -3171,6 +3171,7 @@ export const advancedFields = [
|
|
|
3171
3171
|
limit: null,
|
|
3172
3172
|
fileTypes: [],
|
|
3173
3173
|
hideRemoveButton: false,
|
|
3174
|
+
showDownload: true,
|
|
3174
3175
|
accessType: "1",
|
|
3175
3176
|
entityTableCode: null,
|
|
3176
3177
|
entityTableDesc: null,
|
|
@@ -3748,6 +3749,7 @@ export const advancedFields = [
|
|
|
3748
3749
|
limit: null,
|
|
3749
3750
|
fileTypes: [],
|
|
3750
3751
|
showViewButton: true,
|
|
3752
|
+
showDownloadButton: true,
|
|
3751
3753
|
accessType: "1",
|
|
3752
3754
|
entityTableCode: null,
|
|
3753
3755
|
entityTableDesc: null,
|
|
@@ -4497,6 +4499,7 @@ export const businessFields = [
|
|
|
4497
4499
|
labelHidden: !0,
|
|
4498
4500
|
limit: null,
|
|
4499
4501
|
hideRemoveButton: false,
|
|
4502
|
+
showDownload: true,
|
|
4500
4503
|
accessType: "1",
|
|
4501
4504
|
entityTableCode: null,
|
|
4502
4505
|
entityTableDesc: null,
|
package/src/microRouter/index.js
CHANGED
|
@@ -92,6 +92,10 @@ export function registerSubApps(apps, options = {}) {
|
|
|
92
92
|
const subAppMenus = options.subAppMenus || {};
|
|
93
93
|
const mainAdapter = options.mainAdapter || createDefaultMainAdapter();
|
|
94
94
|
const userInfo = options.userInfo || null;
|
|
95
|
+
// 按钮/菜单禁用名单(menuCode)。登录时已写入 user.dispermissions,这里做快照下发
|
|
96
|
+
const dispermissions = Array.isArray(options.dispermissions)
|
|
97
|
+
? options.dispermissions.slice()
|
|
98
|
+
: [];
|
|
95
99
|
microAppConfigs = {};
|
|
96
100
|
(apps || []).forEach((app) => {
|
|
97
101
|
const menus = subAppMenus[app.appCode] || [];
|
|
@@ -100,6 +104,7 @@ export function registerSubApps(apps, options = {}) {
|
|
|
100
104
|
token: getToken(),
|
|
101
105
|
lang: localStorage.getItem("i18n-lang") || "",
|
|
102
106
|
userInfo,
|
|
107
|
+
dispermissions,
|
|
103
108
|
mainAdapter,
|
|
104
109
|
};
|
|
105
110
|
const entry = resolveEntry(app.entry);
|
|
@@ -267,6 +267,8 @@ const actions = {
|
|
|
267
267
|
registerSubApps(hostRegistryApps, {
|
|
268
268
|
subAppMenus,
|
|
269
269
|
userInfo: buildUserInfoSnapshot(rootState.user),
|
|
270
|
+
dispermissions:
|
|
271
|
+
(rootState.user && rootState.user.dispermissions) || [],
|
|
270
272
|
});
|
|
271
273
|
}
|
|
272
274
|
return dispatch("setSidebarRoute", rows);
|