|
|
|
|
@ -1,6 +1,9 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<el-dialog :visible.sync="dialogVisible" title="import" width="740px">
|
|
|
|
|
<el-dialog v-loading="loading"
|
|
|
|
|
element-loading-text="Loading..."
|
|
|
|
|
element-loading-spinner="el-icon-loading"
|
|
|
|
|
element-loading-background="rgba(0, 0, 0, 0.4)" :visible.sync="dialogVisible" title="import" width="740px">
|
|
|
|
|
<div class="title">Download The Template</div>
|
|
|
|
|
<el-button
|
|
|
|
|
style="margin-top: 10px"
|
|
|
|
|
@ -23,6 +26,7 @@
|
|
|
|
|
:headers="{
|
|
|
|
|
Authorization: `Bearer ${getToken()}`,
|
|
|
|
|
}"
|
|
|
|
|
:before-upload="uploadBefore"
|
|
|
|
|
:on-success="uploadSuccess"
|
|
|
|
|
:on-error="uploadFail"
|
|
|
|
|
>
|
|
|
|
|
@ -60,6 +64,7 @@ export default {
|
|
|
|
|
headers: [],
|
|
|
|
|
tableList: [],
|
|
|
|
|
table: [],
|
|
|
|
|
loading:false,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
@ -79,7 +84,13 @@ export default {
|
|
|
|
|
type: "error",
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
uploadBefore(){
|
|
|
|
|
console.log("123")
|
|
|
|
|
this.loading = true
|
|
|
|
|
// return
|
|
|
|
|
},
|
|
|
|
|
uploadSuccess(response) {
|
|
|
|
|
|
|
|
|
|
this.tableList = response;
|
|
|
|
|
this.$message({
|
|
|
|
|
message: `Upload successful`,
|
|
|
|
|
@ -87,6 +98,7 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
this.hidden();
|
|
|
|
|
this.$emit('refresh')
|
|
|
|
|
this.loading = false
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
exportExcel(sheetName) {
|
|
|
|
|
|