|
|
|
@ -41,7 +41,7 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
|
|
|
|
|
import { MessageBox } from 'element-ui'
|
|
|
|
|
export default {
|
|
|
|
|
name: "FileUpload",
|
|
|
|
|
props: {
|
|
|
|
@ -149,6 +149,19 @@ export default {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
this.uploadList.push({ name: res.originalFilename, url: res.fileName });
|
|
|
|
|
this.uploadedSuccessfully();
|
|
|
|
|
} else {
|
|
|
|
|
this.$modal.closeLoading();
|
|
|
|
|
if(res.code == 401) {
|
|
|
|
|
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
|
|
|
|
this.$store.dispatch('LogOut').then(() => {
|
|
|
|
|
location.href = '/tczzpc';
|
|
|
|
|
})
|
|
|
|
|
}).catch(err=>{
|
|
|
|
|
this.number--;
|
|
|
|
|
this.$refs.fileUpload.handleRemove(file);
|
|
|
|
|
this.uploadedSuccessfully();
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
this.number--;
|
|
|
|
|
this.$modal.closeLoading();
|
|
|
|
@ -156,6 +169,7 @@ export default {
|
|
|
|
|
this.$refs.fileUpload.handleRemove(file);
|
|
|
|
|
this.uploadedSuccessfully();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 删除文件
|
|
|
|
|
handleDelete(index) {
|
|
|
|
|