From 6f9ac9a2da1ca4a0fdb5c24a6f47648026e275d7 Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期五, 18 十月 2024 16:18:57 +0800
Subject: [PATCH] 1、修改获取权限模块,仅返回按钮数据
---
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue
index 3c3da9d..f8bf56f 100644
--- a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue
+++ b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue
@@ -2,7 +2,6 @@
<el-dialog
v-dialogDrag
:close-on-click-modal="false"
- :destroy-on-close="true"
:title="title"
:visible.sync="visible"
width="40%"
@@ -23,6 +22,7 @@
</ul>
<Divider left="30px" text="閫夋嫨鏂囦欢鍚庝細鑷姩涓婁紶"></Divider>
<el-upload
+ :name="fileName"
:action="fileUrl"
:before-upload="beforeUpload"
:data="fileData"
@@ -53,6 +53,10 @@
type: Array,
default: () => []
},
+ fileName: {
+ type: String,
+ default: () => "file"
+ },
// 瀵硅瘽妗嗗ご閮ㄥ悕绉�
title: {
type: String,
@@ -65,8 +69,8 @@
},
// 璇锋眰鍦板潃 鎼哄甫鍙傛暟
fileData: {
- type: Array,
- default: () => []
+ type: Object,
+ default: () => {}
},
// 瀵煎叆鎻愮ず鏂囧瓧 tipList:["瀵煎叆妯℃澘涓爣鏄庣孩鑹插瓧浣撶殑涓哄繀杈撻」","閮ㄩ棬鍒椾笂涓嬬骇鍏崇郴蹇呴』鎸夌収鍙嶆枩鏉犻殧寮�(/)"]
tipList:{
@@ -120,14 +124,14 @@
return true;
},
// 鏂囦欢涓婁紶鎴愬姛
- onSuccess(resbonse) {
- console.log(resbonse);
- if (resbonse.code === 200) {
+ onSuccess(response) {
+ if (response.code === 200) {
this.$message.success("瀵煎叆鎴愬姛锛�");
this.visible = false;
- this.$emit('updata');
+ this.$emit('updata',response);
} else {
- this.$message.error(resbonse.msg);
+ this.$emit('upfaildata',response);
+ this.$message.error(response.msg);
}
},
//鏂囦欢涓婁紶澶辫触
@@ -137,7 +141,6 @@
},
//鏂囦欢鐘舵�佹敼鍙�
uploadChange(file) {
- console.log( this.pageLoading);
if (file.status === "success" || file.status === "error") {
this.pageLoading.close();
}
--
Gitblit v1.9.3