|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<el-upload :accept="accept" :action="action" :before-remove="delUploadData" :before-upload="beforeUpload"
|
|
<el-upload :accept="accept" :action="action" :before-remove="delUploadData" :before-upload="beforeUpload"
|
|
:data="uploadData"
|
|
:data="uploadData"
|
|
- :disabled="uploadDisabled" :file-list="fileListData" :headers="getTokenHeader()" :on-error="uploadError"
|
|
|
|
|
|
+ :disabled="isCanupload" :file-list="fileListData" :headers="getTokenHeader()" :on-error="uploadError"
|
|
:on-exceed="uploadExceed" :on-preview="uploadPreview" :on-progress="uploadprogress"
|
|
:on-exceed="uploadExceed" :on-preview="uploadPreview" :on-progress="uploadprogress"
|
|
:on-remove="uploadRemove" :on-success="uploadSuccess" class="hc-upload-border"
|
|
:on-remove="uploadRemove" :on-success="uploadSuccess" class="hc-upload-border"
|
|
drag multiple>
|
|
drag multiple>
|
|
@@ -31,6 +31,12 @@ const props = defineProps({
|
|
type: Object,
|
|
type: Object,
|
|
default: () => ({})
|
|
default: () => ({})
|
|
},
|
|
},
|
|
|
|
+ isCanupload:{
|
|
|
|
+ type:Boolean,
|
|
|
|
+ default:false,
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
})
|
|
})
|
|
|
|
|
|
//变量
|
|
//变量
|
|
@@ -39,14 +45,17 @@ const fileListData = ref(props.fileList);
|
|
const action = '/api/blade-manager/exceltab/add-buss-file';
|
|
const action = '/api/blade-manager/exceltab/add-buss-file';
|
|
const accept = 'image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword';
|
|
const accept = 'image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword';
|
|
const uploadDisabled = ref(false)
|
|
const uploadDisabled = ref(false)
|
|
|
|
+const isCanuploadVal=ref(props.isCanupload)
|
|
|
|
|
|
//监听
|
|
//监听
|
|
watch(() => [
|
|
watch(() => [
|
|
props.fileList,
|
|
props.fileList,
|
|
props.datas,
|
|
props.datas,
|
|
-], ([fileList, datas]) => {
|
|
|
|
|
|
+ props.isCanupload
|
|
|
|
+], ([fileList, datas,isCanupload]) => {
|
|
uploadData.value = datas
|
|
uploadData.value = datas
|
|
fileListData.value = fileList
|
|
fileListData.value = fileList
|
|
|
|
+ isCanuploadVal.value=isCanupload
|
|
})
|
|
})
|
|
|
|
|
|
//渲染完成
|
|
//渲染完成
|