|
|
@ -31,6 +31,7 @@
|
|
|
|
icon-class="Excel"
|
|
|
|
icon-class="Excel"
|
|
|
|
class="iconFont"
|
|
|
|
class="iconFont"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<span class="el-upload-list__item-actions">
|
|
|
|
<span class="el-upload-list__item-actions">
|
|
|
|
<span
|
|
|
|
<span
|
|
|
|
v-if="typeImgShow(file)"
|
|
|
|
v-if="typeImgShow(file)"
|
|
|
@ -102,9 +103,9 @@ export default {
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
|
requestUrl() {
|
|
|
|
requestUrl() {
|
|
|
|
if (this.upLoadUrl != null && this.upLoadUrl.trim() != "") {
|
|
|
|
if (this.upLoadUrl != null && this.upLoadUrl.trim() != "") {
|
|
|
|
return process.env.VUE_APP_BASE_API + this.upLoadUrl;
|
|
|
|
return process.env.BASE_API + this.upLoadUrl;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return process.env.VUE_APP_BASE_API + "/meta/file/upload";
|
|
|
|
return process.env.BASE_API + "/file/upload";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
headers() {
|
|
|
|
headers() {
|
|
|
@ -113,15 +114,9 @@ export default {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
mounted() {
|
|
|
|
value: {
|
|
|
|
this.echoUpload(this.value);
|
|
|
|
handler(val) {
|
|
|
|
|
|
|
|
this.echoUpload(val);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
immediate: true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
// 图片
|
|
|
|
// 图片
|
|
|
|
typeImgShow(file) {
|
|
|
|
typeImgShow(file) {
|
|
|
@ -175,7 +170,6 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 上传成功的回调
|
|
|
|
// 上传成功的回调
|
|
|
|
handleSuccess(response, file, fileList) {
|
|
|
|
handleSuccess(response, file, fileList) {
|
|
|
|
console.log(fileList);
|
|
|
|
|
|
|
|
if (response.code != 200) {
|
|
|
|
if (response.code != 200) {
|
|
|
|
this.$message.error("上传失败");
|
|
|
|
this.$message.error("上传失败");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -185,6 +179,7 @@ export default {
|
|
|
|
fileId: file.response.data.fileId,
|
|
|
|
fileId: file.response.data.fileId,
|
|
|
|
fileType: file.response.data.fileType
|
|
|
|
fileType: file.response.data.fileType
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
console.log(this.fileList);
|
|
|
|
this.change();
|
|
|
|
this.change();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 回传出去
|
|
|
|
// 回传出去
|
|
|
@ -248,7 +243,7 @@ export default {
|
|
|
|
width: 60px;
|
|
|
|
width: 60px;
|
|
|
|
height: 60px;
|
|
|
|
height: 60px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.hide_box .el-upload--picture-card {
|
|
|
|
.hide_box /deep/.el-upload--picture-card {
|
|
|
|
display: none;
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.el-upload-list__item {
|
|
|
|
.el-upload-list__item {
|
|
|
|