对接问题知识库

This commit is contained in:
qq787203167
2022-08-09 10:44:32 +08:00
parent bc3f1be1a0
commit 42819e62e9
6 changed files with 111 additions and 21 deletions
@@ -71,7 +71,7 @@
<a class="text-operation" @click="viewClick(record)">{{$t('view')}}</a>
<a class="text-operation"
@click="subscribe(record)">
{{!record.releaseCondition || record.releaseCondition == 'draft' ? $t('release') :$t('withdraw')}}
{{!record.releaseStatus || record.releaseStatus == 'Draft' ? $t('release') :$t('withdraw')}}
</a>
<a class="text-operation"
@click="edit(record)">{{$t('edit')}}</a>
@@ -120,8 +120,8 @@
pageSize: 10,
pageNo: 1,
url: {
list: '',
deleteBatch: ''
list: '/problemKnowledgeBase/countryCardManageReleaseEO/page',
deleteBatch: '/problemKnowledgeBase/countryCardManageReleaseEO/deleteBatch'
},
selectedRowKeys: [],
columns: [
@@ -149,6 +149,7 @@
},
mounted() {
document.title = 'Country Card-' + this.$t('managePublishing')
this.getList()
},
methods: {
searchQuery() {
@@ -226,8 +227,31 @@
edit() {
this.$refs.countryCardReleaseAddRef.edit()
},
subscribe() {
subscribe(record) {
let _this = this
this.$confirm({
content: record.releaseStatus == 'Draft' ? _this.$t('confirmRelease') : _this.$t('confirmWithdraw'),
onOk() {
let releaseCondition = ''
if (record.releaseStatus == 'Draft') {
releaseCondition = 'Have released'
} else {
releaseCondition = 'Draft'
}
let query = {
releaseStatus: releaseCondition,
ids: record.id
}
postAction('/problemKnowledgeBase/countryCardManageReleaseEO/batchUpdateReleaseStatus', query).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
viewClick() {
let newUrl = this.$router.resolve({