{{$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 @@