|
@@ -46,6 +46,7 @@
|
|
|
>取消</el-button>
|
|
|
|
|
|
<el-button
|
|
|
+ :disabled="!visible || isSave"
|
|
|
type="primary"
|
|
|
@click="onImportDataBtnClick"
|
|
|
>确定</el-button>
|
|
@@ -71,7 +72,8 @@ export default {
|
|
|
activeCollapseName: '1',
|
|
|
uploadData: {
|
|
|
file: null
|
|
|
- }
|
|
|
+ },
|
|
|
+ isSave: false
|
|
|
}),
|
|
|
methods: {
|
|
|
open () {
|
|
@@ -96,7 +98,10 @@ export default {
|
|
|
if (!flag) {
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ if (this.isSave) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.isSave = true
|
|
|
this.$$request(this.api, this.uploadData).then((data) => {
|
|
|
if (data) {
|
|
|
this.$notify({
|
|
@@ -109,7 +114,9 @@ export default {
|
|
|
this.close()
|
|
|
this.$emit('imported', data)
|
|
|
}
|
|
|
- }).catch(console.error).finally(() => {})
|
|
|
+ }).catch(console.error).finally(() => {
|
|
|
+ this.isSave = false
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
close () {
|