From 247aa6397ebdb5249a1213af11aaaf560568b0c3 Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期五, 02 八月 2024 15:43:50 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/plt-web/plt-web-ui/src/components/actions/base/uploadFile.vue | 29 ++++++++++++++---------------
1 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/components/actions/base/uploadFile.vue b/Source/plt-web/plt-web-ui/src/components/actions/base/uploadFile.vue
index dc1c5b1..6a10a70 100644
--- a/Source/plt-web/plt-web-ui/src/components/actions/base/uploadFile.vue
+++ b/Source/plt-web/plt-web-ui/src/components/actions/base/uploadFile.vue
@@ -2,7 +2,6 @@
<el-dialog
v-dialogDrag
:close-on-click-modal="false"
- :destroy-on-close="true"
:visible.sync="visible"
:width="width"
append-to-body
@@ -11,10 +10,11 @@
style="margin-top: -20vh !important;"
>
<Divider left="30px" text="瀵煎叆鎻愮ず"></Divider>
- <ul>
- <li>
+ <ul style="color: #e73a3a">
+ <li v-if="!paramVOS.tipList">
璇风偣鍑绘祻瑙堟枃浠惰繘琛屼笂浼�
</li>
+ <li v-if="paramVOS.tipList && paramVOS.tipList.length >=1 " v-for="(item,index) in paramVOS.tipList" :key="index"> {{index+1}} : {{item}}銆�</li>
</ul>
<Divider left="30px" text="閫夋嫨鏂囦欢鍚庝細鑷姩涓婁紶"></Divider>
<el-upload
@@ -87,9 +87,9 @@
return {
ownbizOid: this.sourceData.oid,
ownBtmName: this.sourceData.btmname,
- secretGrade: -1,
- fileDocClassify: '',
- updateFileFlag: true,
+ secretGrade: this.paramVOS.secretGrade || -1,
+ fileDocClassify: this.paramVOS.fileDocClassify || "",
+ updateFileFlag: this.paramVOS.updateFileFlag || true,
}
},
width() {
@@ -118,14 +118,13 @@
async beforeUpload(file) {
// 鑾峰彇鏂囦欢鎵╁睍鍚�
const fileExtension = file.name.split(".").pop().toLowerCase(); // 杞崲涓哄皬鍐欎互閬垮厤澶у皬鍐欎笉鍖归厤鐨勯棶棰�
- const allowedExtensions = this.paramVOS.fileType || ['css', 'csv', 'doc', 'gif', 'html', 'jpe', 'jpg', 'jpeg', 'png', 'js', 'json',
- 'mp3', 'mp4', 'xlsx', 'xml', 'zip', 'xhtml', 'wps', 'ppt', 'xls', 'word', 'pdf', 'txt'];
- // 妫�鏌ユ枃浠舵墿灞曞悕鏄惁鍦ㄥ厑璁哥殑鏂囦欢鎵╁睍鍚嶆暟缁勪腑
- if (!allowedExtensions.includes(fileExtension)) {
- // 涓婁紶鏍煎紡涓嶇鍚堣姹傦紝鎻愮ず閿欒淇℃伅骞跺彇娑堜笂浼�
- this.$message.error(`鍙厑璁镐笂浼�${allowedExtensions.toString()}鏍煎紡鐨勬枃浠禶);
- return Promise.reject(false);
+ if(this.paramVOS.fileType){
+ if (!this.paramVOS.fileType.includes(fileExtension)) {
+ // 涓婁紶鏍煎紡涓嶇鍚堣姹傦紝鎻愮ず閿欒淇℃伅骞跺彇娑堜笂浼�
+ this.$message.error(`鍙厑璁镐笂浼�${this.paramVOS.fileType.toString()}鏍煎紡鐨勬枃浠禶);
+ return Promise.reject(false);
+ }
}
this.pageLoading = this.$loading({
@@ -141,7 +140,7 @@
onSuccess(resbonse) {
if (resbonse.code === 200) {
this.$message.success("涓婁紶鎴愬姛锛�");
- this.dialogVisible = false;
+ this.visible = false;
}else {
this.$message.error(resbonse.msg);
}
@@ -156,7 +155,7 @@
if (file.status === "success" || file.status === "error") {
this.pageLoading.close();
}
- }
+ },
}
}
</script>
--
Gitblit v1.9.3