对接搜索中心
This commit is contained in:
@@ -53,14 +53,14 @@
|
||||
<template slot="title">
|
||||
<span v-html="item.title"></span>
|
||||
</template>
|
||||
<span style="cursor: pointer" v-html="item.title" @click="titleClick(item)"></span>
|
||||
<span style="cursor: pointer" v-html="item.title"></span>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
|
||||
<template slot="title">
|
||||
<span v-html="item.content"></span>
|
||||
</template>
|
||||
<div class="text-content" @click="checkedClick(item)" v-html="item.content"
|
||||
<div class="text-content" v-html="item.content"
|
||||
>
|
||||
</div>
|
||||
</a-tooltip>
|
||||
@@ -171,13 +171,13 @@
|
||||
})
|
||||
},
|
||||
checkedClick(item) {
|
||||
if (item.checked) {
|
||||
this.checkboxText = this.checkboxText.filter(res => {
|
||||
return res !== item.id
|
||||
})
|
||||
} else {
|
||||
this.checkboxText.push(item.id)
|
||||
}
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/problemKnowledgeBaseView',
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
@@ -215,6 +215,10 @@
|
||||
this.pageNo = 1
|
||||
this.getParagraphInfoList()
|
||||
},
|
||||
getText(str) {
|
||||
let words = str.replace(/<[^<>]+>/g, '').replace(/ /gi, '') //这里是去除标签
|
||||
return words.replace(/\s/g, '') //这里是去除空格
|
||||
},
|
||||
getParagraphInfoList() {
|
||||
let queryParamOne = Object.assign(this.queryParam, this.queryParamOne)
|
||||
let queryParam = JSON.parse(JSON.stringify(queryParamOne))
|
||||
@@ -234,6 +238,13 @@
|
||||
postAction(this.url.getParagraphInfoList, 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.content = this.getText(val.content)
|
||||
}
|
||||
})
|
||||
}
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
@@ -415,6 +426,7 @@
|
||||
padding: 19px 28px;
|
||||
box-sizing: border-box;
|
||||
margin-left: 38px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.null-input {
|
||||
|
||||
Reference in New Issue
Block a user