对接问题知识库
This commit is contained in:
+68
-20
@@ -43,25 +43,26 @@
|
||||
:loading="loading">
|
||||
<span slot="content" slot-scope="text,record,index">
|
||||
<a-input class="box-input"
|
||||
v-if="false"
|
||||
v-model="record.problemLabel"
|
||||
v-if="record.lableType == 8"
|
||||
v-model="record.content"
|
||||
:placeholder="$t('PleaseEnter')"/>
|
||||
<a-select :placeholder="$t('PleaseSelect')"
|
||||
style="width: 100%"
|
||||
v-if="false"
|
||||
v-model="record.projectNameId">
|
||||
<a-select-option v-for="(item, key) in record.projectNameList"
|
||||
v-else-if="record.lableType == 3"
|
||||
v-model="record.content">
|
||||
<a-select-option v-for="(item, key) in record.countryCardTempItemEOList"
|
||||
:key="key"
|
||||
:value="item.id">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
||||
{{ item.projectName}}
|
||||
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
|
||||
{{ item.itemText}}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('verifyDeliverableTemplate',index)">
|
||||
{{ (record.verifyDeliverableTemplate === 'null' || record.verifyDeliverableTemplate === '' ||
|
||||
record.verifyDeliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
v-else-if="record.lableType == 7"
|
||||
@click="clickButtonToUpload('content',index)">
|
||||
{{ (record.content === 'null' || record.content === '' ||
|
||||
record.content == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</span>
|
||||
@@ -89,8 +90,10 @@
|
||||
data() {
|
||||
return {
|
||||
url: {
|
||||
list: '',
|
||||
deleteOne: ''
|
||||
list: '/problemKnowledgeBase/countryCardTempEO/list',
|
||||
deleteOne: '',
|
||||
add: '/problemKnowledgeBase/countryCardManageReleaseEO/add',
|
||||
edit: '/problemKnowledgeBase/countryCardManageReleaseDetailEO/editBatch'
|
||||
},
|
||||
title: '',
|
||||
formInline: {},
|
||||
@@ -98,7 +101,7 @@
|
||||
applyMarket: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('LabelType') + this.$t('cannotEmpty'),
|
||||
message: this.$t('applicableMarket') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
@@ -113,21 +116,23 @@
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('LabelName'),
|
||||
dataIndex: 'LabelName',
|
||||
dataIndex: 'lableName',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
width: 220
|
||||
},
|
||||
{
|
||||
title: this.$t('describe'),
|
||||
dataIndex: 'describe',
|
||||
dataIndex: 'description',
|
||||
align: 'center',
|
||||
width: 260,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('content'),
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 180,
|
||||
width: 260,
|
||||
scopedSlots: { customRender: 'content' }
|
||||
}
|
||||
]
|
||||
@@ -139,11 +144,13 @@
|
||||
add() {
|
||||
this.visible = true
|
||||
this.title = this.$t('newlyAdded')
|
||||
this.replacePage()
|
||||
this.getApplyMarketList()
|
||||
},
|
||||
edit() {
|
||||
edit(row) {
|
||||
this.visible = true
|
||||
this.title = this.$t('edit')
|
||||
this.editReplacePage(row)
|
||||
this.getApplyMarketList()
|
||||
},
|
||||
getApplyMarketList() {
|
||||
@@ -186,13 +193,54 @@
|
||||
handleSubmit() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
let url = ''
|
||||
if (this.title == this.$t('newlyAdded')) {
|
||||
url = this.url.add
|
||||
} else {
|
||||
url = this.url.edit
|
||||
}
|
||||
this.confirmLoading = true
|
||||
let content = []
|
||||
this.dataList.forEach(res => {
|
||||
content.push({
|
||||
countryCardTempId: res.id,
|
||||
description: res.description,
|
||||
content: res.content
|
||||
})
|
||||
})
|
||||
let query = {
|
||||
countryCardManageReleaseDetailEOList: content,
|
||||
applyMarket: this.formInline.applyMarket
|
||||
}
|
||||
postAction(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('countryCardReleaseAddForm')
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
replacePage() {
|
||||
this.loading = true
|
||||
postAction(this.url.list, {}).then((res) => {
|
||||
getAction(this.url.list, {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result || []
|
||||
this.loading = false
|
||||
} else {
|
||||
this.dataList = []
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
editReplacePage(row) {
|
||||
this.loading = true
|
||||
getAction('/problemKnowledgeBase/countryCardManageReleaseDetailEO/list', { editReplacePage: row.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result || []
|
||||
this.loading = false
|
||||
|
||||
Reference in New Issue
Block a user