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