add:提交问题按钮新增loading
This commit is contained in:
@@ -132,7 +132,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button class="common-button-default" size="mini" @click="dialogVisible = false">取 消</el-button>
|
<el-button class="common-button-default" size="mini" @click="dialogVisible = false">取 消</el-button>
|
||||||
<el-button class="common-button-primary" size="mini" type="primary" @click="queSubmit">提 交</el-button>
|
<el-button class="common-button-primary" size="mini" :loading="isSubmit" type="primary" @click="queSubmit">提 交</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 选择标准抽屉-->
|
<!-- 选择标准抽屉-->
|
||||||
@@ -586,6 +586,7 @@ export default {
|
|||||||
activeName: 'INLAND',
|
activeName: 'INLAND',
|
||||||
activeType: 'INLAND',
|
activeType: 'INLAND',
|
||||||
activestand: '',
|
activestand: '',
|
||||||
|
isSubmit: false,
|
||||||
activeQue: '',
|
activeQue: '',
|
||||||
standType: 'INLAND',
|
standType: 'INLAND',
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
@@ -1035,6 +1036,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//提交问题
|
//提交问题
|
||||||
queSubmit(){
|
queSubmit(){
|
||||||
|
this.isSubmit = true
|
||||||
if(this.standType === 'OTHER'){
|
if(this.standType === 'OTHER'){
|
||||||
this.questionForm.standardId = this.questionForm.pubQue
|
this.questionForm.standardId = this.questionForm.pubQue
|
||||||
this.questionForm.standardName = this.questionForm.pubQue
|
this.questionForm.standardName = this.questionForm.pubQue
|
||||||
@@ -1049,6 +1051,7 @@ export default {
|
|||||||
_this: this
|
_this: this
|
||||||
}, res => {
|
}, res => {
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
|
this.isSubmit = false
|
||||||
this.searchBtn()
|
this.searchBtn()
|
||||||
}, e => {
|
}, e => {
|
||||||
|
|
||||||
|
|||||||
@@ -320,7 +320,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button class="common-button-default" size="mini" @click="dialogVisible = false">取 消</el-button>
|
<el-button class="common-button-default" size="mini" @click="dialogVisible = false">取 消</el-button>
|
||||||
<el-button class="common-button-primary" size="mini" type="primary" @click="queSubmit">提 交</el-button>
|
<el-button class="common-button-primary" :loading="queSubmitLading" size="mini" type="primary" @click="queSubmit">提 交</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 选择标准抽屉-->
|
<!-- 选择标准抽屉-->
|
||||||
@@ -766,6 +766,7 @@ export default {
|
|||||||
{required: true, message: '请输入问题', trigger: 'blur'},
|
{required: true, message: '请输入问题', trigger: 'blur'},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
queSubmitLading: false,
|
||||||
questionSerach:{
|
questionSerach:{
|
||||||
classification: 'INLAND',
|
classification: 'INLAND',
|
||||||
standardName: '', //标准名称
|
standardName: '', //标准名称
|
||||||
@@ -1226,6 +1227,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//提交问题
|
//提交问题
|
||||||
queSubmit(){
|
queSubmit(){
|
||||||
|
this.queSubmitLading = true
|
||||||
if(this.standType === 'OTHER'){
|
if(this.standType === 'OTHER'){
|
||||||
this.questionForm.standardId = this.questionForm.pubQue
|
this.questionForm.standardId = this.questionForm.pubQue
|
||||||
this.questionForm.standardName = this.questionForm.pubQue
|
this.questionForm.standardName = this.questionForm.pubQue
|
||||||
@@ -1260,15 +1262,18 @@ export default {
|
|||||||
this.standSearch2()
|
this.standSearch2()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
this.queSubmitLading = false
|
||||||
this.queSearch()
|
this.queSearch()
|
||||||
}, e => {
|
}, e => {
|
||||||
|
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
this.queSubmitLading = false
|
||||||
return this.$message.warning('请输入问题')
|
return this.$message.warning('请输入问题')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
this.queSubmitLading = false
|
||||||
this.$message.warning('请选择至少一条标准')
|
this.$message.warning('请选择至少一条标准')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user