|
|
|
|
@ -204,13 +204,13 @@ export default {
|
|
|
|
|
Authorization: "Bearer " + getToken(),
|
|
|
|
|
},
|
|
|
|
|
accept:
|
|
|
|
|
".rar,.zip,.doc,.docx,.pdf,.jpg,.png,.gif,.mp4,.xls,.xlsx",
|
|
|
|
|
".rar,.zip,.doc,.docx,.pdf,.jpg,.png,.gif,.xls,.xlsx",
|
|
|
|
|
"on-success": (response, file, fileList) => {
|
|
|
|
|
this.fileList = fileList;
|
|
|
|
|
form.file = response?.id;
|
|
|
|
|
},
|
|
|
|
|
"before-upload": (file) => {
|
|
|
|
|
if (file.size / 1000 > 5 * 1024) {
|
|
|
|
|
if (file.size / 1000 > 50 * 1024) {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "warning",
|
|
|
|
|
message: "上传文件大小超过5M!",
|
|
|
|
|
@ -241,7 +241,7 @@ export default {
|
|
|
|
|
class: "el-upload__tip",
|
|
|
|
|
slot: "tip",
|
|
|
|
|
},
|
|
|
|
|
"只能上传jpg/png文件,且不超过5Mb"
|
|
|
|
|
"支持文件格式:.docx,.xlsx,.pdf,.png,.jpg\n单个文件不能超过50M"
|
|
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
@ -269,6 +269,13 @@ export default {
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
beforeClose: (action, instance, done) => {
|
|
|
|
|
if (action === "confirm") {
|
|
|
|
|
if (!form.file) {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'warning',
|
|
|
|
|
message: '请上传附件'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
instance.confirmButtonLoading = true;
|
|
|
|
|
instance.confirmButtonText = "保存中...";
|
|
|
|
|
this.detail.attachment_list = [
|
|
|
|
|
|