|
|
@ -1,5 +1,6 @@ |
|
|
|
<template> |
|
|
|
<el-upload |
|
|
|
ref="upload" |
|
|
|
class="upload-demo" |
|
|
|
:action="uploadUrl" |
|
|
|
:headers="headers" |
|
|
@ -13,7 +14,7 @@ |
|
|
|
:file-list="fileList" |
|
|
|
:disabled="disabled" |
|
|
|
> |
|
|
|
<el-button size="small" type="primary" plain :disabled="disabled"> |
|
|
|
<el-button size="small" type="primary" plain :disabled="disabled" @click="ButtonClick()" @click.stop="beforeUploadFile"> |
|
|
|
<i class="el-icon-upload el-icon--right"></i> |
|
|
|
点击上传 |
|
|
|
</el-button> |
|
|
@ -25,6 +26,7 @@ |
|
|
|
<script> |
|
|
|
import { getToken } from "@/utils/auth"; |
|
|
|
import { getFileStream } from "@/api/system/upload"; |
|
|
|
import Vue from "vue"; |
|
|
|
export default { |
|
|
|
props: { |
|
|
|
fileList: { |
|
|
@ -48,6 +50,27 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
ButtonClick() { |
|
|
|
|
|
|
|
this.$confirm('<div style="white-space: pre-wrap;">严禁在本系统处理、传输国家秘密、工作秘密及敏感文件数据资料</div>', '注意', { |
|
|
|
title: ' 注意', |
|
|
|
titleAlign: 'left', |
|
|
|
confirmButtonText: '我已知晓', |
|
|
|
cancelButtonText: '取消上传', |
|
|
|
type: 'warning', |
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
callback: action => { |
|
|
|
if (action === 'confirm') { |
|
|
|
this.$refs['upload'].$refs['upload-inner'].handleClick() |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
type: 'warning', |
|
|
|
message: '已取消' |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 上传意见附件 |
|
|
|
submitUpload(_, file) { |
|
|
|
console.log(file); |
|
|
|