对接问题知识库
This commit is contained in:
+57
-16
@@ -19,8 +19,10 @@
|
||||
<div class="title-text" :title="$t('applicableMarket')">
|
||||
<span>{{$t('applicableMarket')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('applicableMarket')"
|
||||
v-model="queryParam.applicableMarket"></a-input>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.applyMarket"
|
||||
:placeholder="$t('PleaseSelect')+$t('applicableMarket')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'region'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -28,8 +30,18 @@
|
||||
<div class="title-text" :title="$t('releaseStatus')">
|
||||
<span>{{$t('releaseStatus')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('releaseStatus')"
|
||||
v-model="queryParam.releaseStatus"></a-input>
|
||||
<a-select class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+$t('releaseStatus')"
|
||||
style="width: 100%"
|
||||
v-model="queryParam.releaseStatus">
|
||||
<a-select-option v-for="(item, key) in releaseStatusList"
|
||||
:key="key"
|
||||
:value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.name ">
|
||||
{{ item.name}}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
@@ -74,8 +86,10 @@
|
||||
{{!record.releaseStatus || record.releaseStatus == 'Draft' ? $t('release') :$t('withdraw')}}
|
||||
</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userInfoQuery.username && record.releaseStatus == 'Draft'"
|
||||
@click="edit(record)">{{$t('edit')}}</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userInfoQuery.username && record.releaseStatus == 'Draft'"
|
||||
@click="deleteData(record)">{{$t('delete')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
@@ -104,6 +118,7 @@
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
import countryCardReleaseModel from './countryCardReleaseModel'
|
||||
import countryCardReleaseAdd from './countryCardReleaseAdd'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'countryCardRelease',
|
||||
@@ -114,8 +129,19 @@
|
||||
data() {
|
||||
return {
|
||||
queryParam: {},
|
||||
releaseStatusList: [
|
||||
{
|
||||
value: 'Draft',
|
||||
name: this.$t('draft')
|
||||
},
|
||||
{
|
||||
value: 'Have released',
|
||||
name: this.$t('HaveReleased')
|
||||
}
|
||||
],
|
||||
loading: false,
|
||||
dataSource: [{}],
|
||||
dataSource: [],
|
||||
selectedRowKeysRecord: [],
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
@@ -123,12 +149,13 @@
|
||||
list: '/problemKnowledgeBase/countryCardManageReleaseEO/page',
|
||||
deleteBatch: '/problemKnowledgeBase/countryCardManageReleaseEO/deleteBatch'
|
||||
},
|
||||
userInfoQuery: {},
|
||||
selectedRowKeys: [],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('applicableMarket'),
|
||||
align: 'center',
|
||||
dataIndex: 'applyMarket',
|
||||
dataIndex: 'applyMarket_dictText',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
@@ -150,8 +177,10 @@
|
||||
mounted() {
|
||||
document.title = 'Country Card-' + this.$t('managePublishing')
|
||||
this.getList()
|
||||
this.userInfoQuery = this.userInfo()
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
@@ -197,8 +226,9 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectChange(value) {
|
||||
onSelectChange(value, record) {
|
||||
this.selectedRowKeys = value
|
||||
this.selectedRowKeysRecord = record
|
||||
},
|
||||
newlyAddedClick() {
|
||||
this.$refs.countryCardReleaseAddRef.add()
|
||||
@@ -212,16 +242,27 @@
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmBatchDeletion'),
|
||||
onOk() {
|
||||
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
||||
getAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.selectedRowKeys = []
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
let idList = []
|
||||
let selectedRowKeysRecord = JSON.parse(JSON.stringify(_this.selectedRowKeysRecord))
|
||||
for (let i = 0; i < selectedRowKeysRecord.length; i++) {
|
||||
if (selectedRowKeysRecord[i].createBy == _this.userInfo().username &&
|
||||
selectedRowKeysRecord[i].releaseStatus == 'Draft') {
|
||||
idList.push(selectedRowKeysRecord[i].id)
|
||||
}
|
||||
})
|
||||
}
|
||||
if (idList.length > 0) {
|
||||
deleteAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.selectedRowKeys = []
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('doNotHavePermissionDeleteData'))
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user