Commit c0a7ded9 authored by 高宇's avatar 高宇

1.优化代码

parent 8fac37b5
......@@ -447,7 +447,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button :loading="loading" type="primary" @click="submitForm">确 定</el-button>
</div>
</el-dialog>
</div>
......@@ -476,7 +476,8 @@ export default {
computed: {
},
data() {
return {
return{
loading: false,
index: this.defaultIndex,
form: this.defaultObject,
// 是否上传按钮
......@@ -499,6 +500,7 @@ export default {
// 提交按钮
submitForm() {
console.log('sheetIndex',this.sheetForm.sheetIndex)
this.loading = true
if (this.sheetForm.sheetIndex !== null && this.sheetForm.sheetIndex !== '') {
console.log('111')
// 获取要预览的表格内容
......@@ -741,6 +743,7 @@ export default {
this.$emit('sheetIndex',this.index)
this.$emit('tarFrom',this.form)
})
this.loading = false
} else {
this.form.LD = []
this.form.LDA = []
......@@ -755,6 +758,7 @@ export default {
this.dialogController.open = false
this.$emit('sheetIndex','')
this.$emit('tarFrom',this.form)
this.loading = false
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment