From 474817b841fcbc7bda05a6e6cdd3e3e342b5a76a Mon Sep 17 00:00:00 2001
From: qq787203167 <787203167@qq.com>
Date: Tue, 9 Aug 2022 16:50:55 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E9=97=AE=E9=A2=98=E7=9F=A5?=
=?UTF-8?q?=E8=AF=86=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jero-web/src/common/lang/en-us.js | 2 +
jero-web/src/common/lang/zh-cn.js | 2 +
jero-web/src/components/SelectedBy/index.vue | 188 ++++++++++++++++++
.../components/countryCardList.vue | 25 ++-
.../components/countryCardRelease.vue | 73 +++++--
.../components/countryCardReleaseAdd.vue | 57 +++++-
.../components/problemKnowledgeBaseList.vue | 6 +-
.../components/problemKnowledgeBaseView.vue | 41 +++-
8 files changed, 359 insertions(+), 35 deletions(-)
create mode 100644 jero-web/src/components/SelectedBy/index.vue
diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js
index 3d055af07..44c4c5517 100644
--- a/jero-web/src/common/lang/en-us.js
+++ b/jero-web/src/common/lang/en-us.js
@@ -1252,4 +1252,6 @@ module.exports = {
optionDropDownBox:'Option drop - down box',
attachmentUpload:'file',
textInput:'Text Input',
+ HaveReleased:'Have released',
+ forward:'Forward',
}
\ No newline at end of file
diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js
index ca601c3ca..a9e0cd6f6 100644
--- a/jero-web/src/common/lang/zh-cn.js
+++ b/jero-web/src/common/lang/zh-cn.js
@@ -1355,4 +1355,6 @@ module.exports = {
Paraname: '参数名称',
Parabatch: '参数批次',
freeze:'请选择冻结配置',
+ HaveReleased:'已发布',
+ forward:'转发',
}
\ No newline at end of file
diff --git a/jero-web/src/components/SelectedBy/index.vue b/jero-web/src/components/SelectedBy/index.vue
new file mode 100644
index 000000000..7ef8d1da8
--- /dev/null
+++ b/jero-web/src/components/SelectedBy/index.vue
@@ -0,0 +1,188 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardList.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardList.vue
index cd7fc3755..e3e4044bf 100644
--- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardList.vue
+++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardList.vue
@@ -8,8 +8,17 @@
{{$t('applicableMarket')}}
-
+
+
+
+ {{ item.title}}
+
+
+
@@ -89,15 +98,25 @@
return {
queryParam: {},
conList: [],
+ applyMarketList: [],
pageSize: 10,
total: 0,
pageNo: 1
}
},
mounted() {
-
+ this.getApplyMarketList()
},
methods: {
+ getApplyMarketList() {
+ getAction('/problemKnowledgeBase/countryCardManageReleaseEO/getApplyMarketList', { queryFlag: 'countryCard' }).then((res) => {
+ if (res.success) {
+ this.applyMarketList = res.result || []
+ } else {
+ this.applyMarketList = []
+ }
+ })
+ },
searchQuery() {
},
diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardRelease.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardRelease.vue
index ec96f19d0..9e34a7f28 100644
--- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardRelease.vue
+++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardRelease.vue
@@ -19,8 +19,10 @@
{{$t('applicableMarket')}}
-
+
@@ -28,8 +30,18 @@
{{$t('releaseStatus')}}
-
+
+
+
+ {{ item.name}}
+
+
+
@@ -74,8 +86,10 @@
{{!record.releaseStatus || record.releaseStatus == 'Draft' ? $t('release') :$t('withdraw')}}
{{$t('edit')}}
{{$t('delete')}}
@@ -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 {
diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardReleaseAdd.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardReleaseAdd.vue
index db4a9d6a0..a2ed72151 100644
--- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardReleaseAdd.vue
+++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardReleaseAdd.vue
@@ -10,7 +10,7 @@
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
-
+
@@ -20,6 +20,7 @@
+
+
+
+
+ {{$t('applicableMarket')}}
+
+
+
+
+
+
+
{
+ this.formInline = {}
+ this.$refs.ruleForm.clearValidate()
+ })
this.title = this.$t('newlyAdded')
this.replacePage()
this.getApplyMarketList()
},
edit(row) {
this.visible = true
+ this.$nextTick(() => {
+ this.formInline = row
+ this.formInline = { ...this.formInline }
+ this.$refs.ruleForm.clearValidate()
+ })
this.title = this.$t('edit')
this.editReplacePage(row)
- this.getApplyMarketList()
},
getApplyMarketList() {
getAction('/problemKnowledgeBase/countryCardManageReleaseEO/getApplyMarketList', {}).then((res) => {
@@ -194,20 +220,29 @@
this.$refs.ruleForm.validate(valid => {
if (valid) {
let url = ''
+ let content = []
if (this.title == this.$t('newlyAdded')) {
url = this.url.add
+ this.dataList.forEach(res => {
+ content.push({
+ countryCardTempId: res.id,
+ description: res.description,
+ content: res.content
+ })
+ })
} else {
url = this.url.edit
+ this.dataList.forEach(res => {
+ content.push({
+ countryCardTempId: res.id,
+ description: res.description,
+ content: res.content,
+ id: res.id
+ })
+ })
}
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
@@ -240,7 +275,7 @@
},
editReplacePage(row) {
this.loading = true
- getAction('/problemKnowledgeBase/countryCardManageReleaseDetailEO/list', { editReplacePage: row.id }).then((res) => {
+ getAction('/problemKnowledgeBase/countryCardManageReleaseDetailEO/list', { countryCardManageReleaseId: row.id }).then((res) => {
if (res.success) {
this.dataList = res.result || []
this.loading = false
diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue
index 6e291a5a3..d7a0ab0e4 100644
--- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue
+++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue
@@ -215,8 +215,7 @@
}
.box-content-left {
- width: 60%;
- float: left;
+ width: 100%;
font-size: 14px;
font-weight: 400;
color: #040B29;
@@ -224,8 +223,7 @@
}
.box-content-right {
- width: 40%;
- float: left;
+ width: 100%;
display: inline-block;
text-align: right;
margin-top: 20px;
diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseView.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseView.vue
index 1419c58cc..232ad441e 100644
--- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseView.vue
+++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseView.vue
@@ -8,6 +8,12 @@
{{$t('applicableInstructionsMarketList')}}
+
+