lcw
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<!-- <template>
|
||||
<div>
|
||||
<el-dialog :title="titleValue" width="1400px" :model-value="modelValue" :destroy-on-close="true" @close="closed">
|
||||
<div v-if="modelValue">
|
||||
@ -198,4 +198,4 @@ const handleCurrentChange = (currentPage) => {
|
||||
.tabBoxRadio .el-table__header-wrapper .el-checkbox {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</style> -->
|
||||
|
||||
@ -127,7 +127,7 @@ function delFile(index) {
|
||||
}
|
||||
// 文件下载
|
||||
function downloadFile(url) {
|
||||
window.open('/mosty-base/minio/image/download/'+url, "_blank");
|
||||
window.open('/bagl/mosty-base/minio/image/download/'+url, "_blank");
|
||||
}
|
||||
// 选择文件
|
||||
function fileChange(e) {
|
||||
@ -136,7 +136,7 @@ function fileChange(e) {
|
||||
let formData = new FormData();
|
||||
formData.append("file", file);
|
||||
axios
|
||||
.post("/mosty-base/minio/image/upload/id", formData, {
|
||||
.post("/bagl/mosty-base/minio/image/upload/id", formData, {
|
||||
"Content-type": "multipart/form-data"
|
||||
})
|
||||
.then((res) => {
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<div class="form-item-box" :class="props.showBtn ? 'showBtn-upload' : ''" :style="{ width: width }">
|
||||
<el-upload
|
||||
v-bind="$attrs"
|
||||
:headers="headers"
|
||||
:multiple="false"
|
||||
class="avatar-uploader"
|
||||
<el-upload
|
||||
v-bind="$attrs"
|
||||
:headers="headers"
|
||||
:multiple="false"
|
||||
class="avatar-uploader"
|
||||
:limit="props.limit"
|
||||
:action="actionUrl"
|
||||
:list-type="props.showBtn ? '' : 'picture-card'"
|
||||
:file-list="fileList"
|
||||
:action="actionUrl"
|
||||
:list-type="props.showBtn ? '' : 'picture-card'"
|
||||
:file-list="fileList"
|
||||
show-file-list
|
||||
:on-exceed="handleExceed"
|
||||
:on-success="handlerSuccess"
|
||||
:on-exceed="handleExceed"
|
||||
:on-success="handlerSuccess"
|
||||
:before-upload="beforeImgUpload">
|
||||
<template #default>
|
||||
<el-button v-if="props.showBtn" size="small" type="primary">上传文件</el-button>
|
||||
@ -98,18 +98,18 @@ watch(() => props.modelValue,(val) => {
|
||||
if(arr.length == 0 ) return fileList.value = [];
|
||||
fileList.value = arr.map((el) => {
|
||||
if (Object.prototype.toString.call(el) === "[object Object]") {
|
||||
return props.isAll ? { url: `/mosty-base/minio/image/download/` + el.id, name: el.name } : { url:el,name:el.name};
|
||||
return props.isAll ? { url: `/bagl/mosty-base/minio/image/download/` + el.id, name: el.name } : { url:el,name:el.name};
|
||||
} else {
|
||||
return { url: `/mosty-base/minio/image/download/` + el };
|
||||
return { url: `/bagl/mosty-base/minio/image/download/` + el };
|
||||
}
|
||||
});
|
||||
},{ immediate: true,deep:true });
|
||||
|
||||
const actionUrl = computed(() => {
|
||||
if (props.isAll) {
|
||||
return "/mosty-base/minio/image/upload/id";
|
||||
return "/bagl/mosty-base/minio/image/upload/id";
|
||||
} else {
|
||||
return props.isImg ? "/mosty-base/minio/image/upload/id": "/mosty-base/minio/file/upload";
|
||||
return props.isImg ? "/bagl/mosty-base/minio/image/upload/id": "/bagl/mosty-base/minio/file/upload";
|
||||
}
|
||||
});
|
||||
|
||||
@ -156,7 +156,7 @@ const getSuffix = (fileName) => {
|
||||
};
|
||||
|
||||
const handlerSuccess = (res, file) => {
|
||||
// file.url = `/mosty-base/minio/image/download/` + res.data;
|
||||
// file.url = `/bagl/mosty-base/minio/image/download/` + res.data;
|
||||
file.id = res.data;
|
||||
fileList.value.push(file);
|
||||
let arr = []
|
||||
|
||||
Reference in New Issue
Block a user