From 46c7cc49b11e8a8e2c75ff3aef96f2f14df66b2e Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Wed, 10 Aug 2022 18:09:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 1 + jero-web/src/common/lang/zh-cn.js | 1 + .../components/countryCardView.vue | 1 - .../components/problemKnowledgeBaseAdd.vue | 26 +++++++++++++------ .../components/problemKnowledgeBaseList.vue | 18 +++++++++++-- .../problemKnowledgeBaseRelease.vue | 22 +++++++++++----- .../components/problemKnowledgeBaseView.vue | 21 +++++++++++++-- 7 files changed, 71 insertions(+), 19 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 9c36fbf2f..7596c76db 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1255,4 +1255,5 @@ module.exports = { deleteNode:'If there is any file information, the file will be deleted. Are you sure to delete this data?', HaveReleased:'Have released', forward:'Forward', + issuedBy:'Issued by', } \ 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 459a1e4b5..413c5702b 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1358,4 +1358,5 @@ module.exports = { deleteNode:'若有文件信息将同步删除,确认删除该条数据?', HaveReleased:'已发布', forward:'转发', + issuedBy:'发布人', } \ No newline at end of file diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardView.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardView.vue index e73433631..ace355e4f 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardView.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardView.vue @@ -190,7 +190,6 @@ }) }) }) - console.log(this.contentList) }, queryCountry(callback) { this.loading = true diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseAdd.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseAdd.vue index 8b17b5343..4b5d678f1 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseAdd.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseAdd.vue @@ -92,12 +92,11 @@ {{$t('market')}} - + @@ -110,6 +109,7 @@ @@ -133,11 +133,12 @@
{{$t('content')}}
- + @@ -239,6 +240,13 @@ message: this.$t('market') + this.$t('cannotEmpty'), trigger: 'change' } + ], + content: [ + { + max: 5000, + message: this.$t('content') + this.$t('cannotExceed') + 5000 + this.$t('Characters'), + trigger: 'change' + } ] }, url: { @@ -276,6 +284,9 @@ } }, methods: { + quilleditorBlur() { + this.$refs.ruleForm.validateField('content') + }, getBase() { getAction('/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/list', {}).then((res) => { if (res.success) { @@ -340,7 +351,6 @@ } , onEditorChange({ quill, html, text }) { - console.log('editor change!', quill, html, text) this.formInline.content = html } , diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue index e723872d4..9b6df4de4 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue @@ -53,7 +53,7 @@
- {{item.content}} + {{item.contentOne}}
@@ -130,6 +130,7 @@ ? [...selectedTags, tag] : selectedTags.filter(t => t !== tag) this.selectedTags = nextSelectedTags + this.getList() }, ResetSearch() { this.searchStr = '' @@ -160,16 +161,29 @@ this.pageSize = pageSize this.getList() }, + getText(str) { + let words = str.replace(/<[^<>]+>/g, '').replace(/ /gi, '') //这里是去除标签 + return words.replace(/\s/g, '') //这里是去除空格 + }, getList() { + let selectedTags = JSON.parse(JSON.stringify(this.selectedTags)) let query = { pageNo: this.pageNo, pageSize: this.pageSize, - searchStr: this.searchStr + searchStr: this.searchStr, + problemTypes: selectedTags.join(',') } this.loading = true getAction(this.url.getInfoList, query).then((res) => { if (res.success) { this.conList = res.result.records + if (this.conList && this.conList.length > 0) { + this.conList.forEach(val => { + if (val.content) { + val.contentOne = this.getText(val.content) + } + }) + } this.total = res.result.total this.loading = false } else { diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseRelease.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseRelease.vue index 4e824890c..cda30770c 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseRelease.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseRelease.vue @@ -22,7 +22,7 @@ {{$t('reset')}} -
+
@@ -36,7 +36,8 @@
-
+
+ {{item.contentOne}}
{{$t('edit')}} @@ -113,6 +114,10 @@ this.pageNo = 1 this.getList() }, + getText(str) { + let words = str.replace(/<[^<>]+>/g, '').replace(/ /gi, '') //这里是去除标签 + return words.replace(/\s/g, '') //这里是去除空格 + }, getList() { let query = { pageNo: this.pageNo, @@ -124,6 +129,13 @@ getAction(this.url.getInfoList, query).then((res) => { if (res.success) { this.conList = res.result.records + if (this.conList && this.conList.length > 0) { + this.conList.forEach(val => { + if (val.content) { + val.contentOne = this.getText(val.content) + } + }) + } this.total = res.result.total this.loading = false } else { @@ -139,11 +151,9 @@ }, titleClick(item) { let newUrl = this.$router.resolve({ - path: '/docManage/library/detail', + path: '/problemKnowledgeBaseView', query: { - id: item.id.slice(0, 32), - title: item.title, - serial_number: item.serial_number + id: item.id } }) window.open(newUrl.href, '_blank') diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseView.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseView.vue index 232ad441e..b651cfbe3 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseView.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseView.vue @@ -17,6 +17,14 @@
+
+ + {{$t('issuedBy')}}:{{this.queryForm.createBy}} + + + {{$t('releaseDate')}}:{{this.queryForm.createTime}} + +
{{item.title}} @@ -104,11 +112,11 @@ standardContentList: [ { title: this.$t('problemClassification'), - value: 'problemType' + value: 'problemTypeName' }, { title: this.$t('market'), - value: 'targetMarket' + value: 'targetMarket_dicText' }, { title: this.$t('standardNo'), @@ -493,4 +501,13 @@ overflow: hidden; text-align: right; } + + .content-text-top { + width: 100%; + text-align: right; + color: #040B29; + font-weight: 400; + font-size: 16px; + margin-bottom: 20px; + } \ No newline at end of file