fix(问答库): 关闭弹窗时去掉路由中的参数

This commit is contained in:
zyn
2024-01-04 11:54:51 +08:00
parent 00f1846d25
commit 4a0476e2a6
@@ -611,6 +611,7 @@
:visible.sync="answerListDrawer"
size="900px"
custom-class="demo-drawer"
:before-close="beforeClose"
>
<div class="demo-drawer-content">
<!-- <loading :loading="lawInfoTableLoading">数据获取中</loading>-->
@@ -624,7 +625,7 @@
</template>
</div>
<div slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" size="mini" @click="answerListDrawer = false">取消</el-button>
<el-button class="common-button-default" size="mini" @click="close">取消</el-button>
</div>
</div>
</el-drawer>
@@ -765,6 +766,20 @@ export default {
this.toAnswer()
},
methods: {
close () {
this.$router.push({
name: 'StandQA',
query: {}
})
this.answerListDrawer = false
},
beforeClose (done) {
this.$router.push({
name: 'StandQA',
query: {}
})
done()
},
toAnswer () {
if (this.$route.query && this.$route.query.id) {
this.$http._getData('/lawss/AskQuestions/askQuestionById', {