Browse Source

运管立项

master
zth 1 month ago
parent
commit
8791ce9374
  1. 25
      src/components/myUpload/index.vue
  2. 1
      src/main.js

25
src/components/myUpload/index.vue

@ -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);

1
src/main.js

@ -83,6 +83,7 @@ Vue.prototype.$formatAdcd=function(row) {
}
}
import { fileBeforeUpload } from "@/utils/fileUpload";
Vue.prototype.$fileBeforeUpload=fileBeforeUpload
import select from "@/utils/directives/select";

Loading…
Cancel
Save