修改搜索中心的段落

This commit is contained in:
qq787203167
2022-03-25 18:04:28 +08:00
parent 02c48169c3
commit 72d89b6bb7
2 changed files with 171 additions and 73 deletions
@@ -126,13 +126,55 @@
@click="checkedClick(item)"
:class="{ 'null-input':item.checked }">
<div class="text-header">
<span :title="item.module_type">{{item.module_type}}</span>
<span :title="item.serial_number">{{item.serial_number}}</span>
<span :title="item.title">{{item.title}}</span>
</div>
<div class="text-content">
{{item.content}}
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5">
<template slot="title">
<span v-html="item.module_type"></span>
</template>
<span v-html="item.module_type"></span>
</a-tooltip>
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5">
<template slot="title">
<span v-html="item.serial_number"></span>
</template>
<span style="cursor: pointer"
@click="titleClick(item)" v-html="item.serial_number"></span>
</a-tooltip>
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5">
<template slot="title">
<span v-html="item.title"></span>
</template>
<span style="cursor: pointer" v-html="item.title" @click="titleClick(item)"></span>
</a-tooltip>
</div>
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5" v-if="!queryParam.selectValue">
<template slot="title">
<span v-html="item.content"></span>
</template>
<div class="text-content" @click="checkedClick(item)" v-html="item.content"
>
</div>
</a-tooltip>
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5"
v-else-if="(item.file_text instanceof Array) && queryParam.selectValue">
<template slot="title">
<span v-html="item.content"></span>
</template>
<div class="text-content" @click="checkedClick(item)" v-html="item.content"></div>
</a-tooltip>
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5"
v-else-if="!item.file_text && queryParam.selectValue">
<template slot="title">
<span v-html="item.content"></span>
</template>
<div class="text-content" @click="checkedClick(item)" v-html="item.content"></div>
</a-tooltip>
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5" v-else>
<template slot="title">
<span v-html="item.file_text"></span>
</template>
<div class="text-content" @click="checkedClick(item)" v-html="item.file_text">
</div>
</a-tooltip>
</div>
</div>
</li>
@@ -191,7 +233,8 @@
url: {
queryCondition: 'search/document/queryCondition',
getInfoList: 'search/document/getInfoList',
pullMessage: 'document/bussDocumentLibraryEO/pullMessage'//推送
pullMessage: 'document/bussDocumentLibraryEO/pullMessage',//推送
getParagraphInfoList: 'search/document/getParagraphInfoList'//段落
},
columns: [
{
@@ -253,43 +296,7 @@
selectedRowKeys: [],
isTrue: true,
checkboxText: [],
conList: [
{
id: 1,
type: '文档库',
number: 'GB20999-2019',
title: '内饰件阻燃特性',
content: '区域:东亚 国家/地区:中国 标准性质:-- 标准状态:现行 内容摘要: 标准文: 标准类别:-- 标准号: 1229导入-中国市场11-中国市场11 标准名称:1229导入-中国市场11 标准英文名称:Englist 发布日期:2021-12-26 实施日期:2021-12-30 新定型车实施日期:2021-12-26 新生产车实施日期:-- 注册登记车实施日期:-- 在产车实施日期:-- 适用认证:公告, 发布部门: 代替标准号:1229导入 被代替标准号:1229导入-中国市场11 采用国际标准号: 采标程度:-- 适用车型:M1,M2,M3, 能源种类:汽油,纯电, 起草单位: 起草人: 关键词: 备注:-- 责任部门:-- 所属专业领域:-- '
},
{
id: 2,
type: '文档库',
number: 'GB20999-2019',
title: '内饰件阻燃特性',
content: '区域:东亚 国家/地区:中国 标准性质:-- 标准状态:现行 内容摘要: 标准文: 标准类别:-- 标准号: 1229导入-中国市场11-中国市场11 标准名称:1229导入-中国市场11 标准英文名称:Englist 发布日期:2021-12-26 实施日期:2021-12-30 新定型车实施日期:2021-12-26 新生产车实施日期:-- 注册登记车实施日期:-- 在产车实施日期:-- 适用认证:公告, 发布部门: 代替标准号:1229导入 被代替标准号:1229导入-中国市场11 采用国际标准号: 采标程度:-- 适用车型:M1,M2,M3, 能源种类:汽油,纯电, 起草单位: 起草人: 关键词: 备注:-- 责任部门:-- 所属专业领域:-- '
},
{
id: 3,
type: '文档库',
number: 'GB20999-2019',
title: '内饰件阻燃特性',
content: '区域:东亚 国家/地区:中国 标准性质:-- 标准状态:现行 内容摘要: 标准文: 标准类别:-- 标准号: 1229导入-中国市场11-中国市场11 标准名称:1229导入-中国市场11 标准英文名称:Englist 发布日期:2021-12-26 实施日期:2021-12-30 新定型车实施日期:2021-12-26 新生产车实施日期:-- 注册登记车实施日期:-- 在产车实施日期:-- 适用认证:公告, 发布部门: 代替标准号:1229导入 被代替标准号:1229导入-中国市场11 采用国际标准号: 采标程度:-- 适用车型:M1,M2,M3, 能源种类:汽油,纯电, 起草单位: 起草人: 关键词: 备注:-- 责任部门:-- 所属专业领域:-- '
},
{
id: 4,
type: '文档库',
number: 'GB20999-2019',
title: '内饰件阻燃特性',
content: '区域:东亚 国家/地区:中国 标准性质:-- 标准状态:现行 内容摘要: 标准文: 标准类别:-- 标准号: 1229导入-中国市场11-中国市场11 标准名称:1229导入-中国市场11 标准英文名称:Englist 发布日期:2021-12-26 实施日期:2021-12-30 新定型车实施日期:2021-12-26 新生产车实施日期:-- 注册登记车实施日期:-- 在产车实施日期:-- 适用认证:公告, 发布部门: 代替标准号:1229导入 被代替标准号:1229导入-中国市场11 采用国际标准号: 采标程度:-- 适用车型:M1,M2,M3, 能源种类:汽油,纯电, 起草单位: 起草人: 关键词: 备注:-- 责任部门:-- 所属专业领域:-- '
},
{
id: 5,
type: '文档库',
number: 'GB20999-2019',
title: '内饰件阻燃特性',
content: '区域:东亚 国家/地区:中国 标准性质:-- 标准状态:现行 内容摘要: 标准文: 标准类别:-- 标准号: 1229导入-中国市场11-中国市场11 标准名称:1229导入-中国市场11 标准英文名称:Englist 发布日期:2021-12-26 实施日期:2021-12-30 新定型车实施日期:2021-12-26 新生产车实施日期:-- 注册登记车实施日期:-- 在产车实施日期:-- 适用认证:公告, 发布部门: 代替标准号:1229导入 被代替标准号:1229导入-中国市场11 采用国际标准号: 采标程度:-- 适用车型:M1,M2,M3, 能源种类:汽油,纯电, 起草单位: 起草人: 关键词: 备注:-- 责任部门:-- 所属专业领域:-- '
}
],
conList: [],
total: 0,
pageSize: 10,
pageNo: 1,
@@ -322,6 +329,7 @@
mounted() {
this.getCondition()
this.getInfoList()
},
methods: {
handleChange() {
@@ -329,6 +337,11 @@
},
selectListModel(val) {
this.isTrue = val == 'list' ? true : false
if (this.isTrue){
this.getInfoList(1)
}else{
this.getParagraphInfoList(1)
}
},
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys
@@ -344,12 +357,20 @@
},
pageOnChange(page, pageSize) {
this.pageNo = page
this.getInfoList()
if (this.isTrue){
this.getInfoList(1)
}else{
this.getParagraphInfoList(1)
}
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.getInfoList()
if (this.isTrue){
this.getInfoList(1)
}else{
this.getParagraphInfoList(1)
}
},
//收藏按钮
Collection(val) {
@@ -430,12 +451,20 @@
this.pageNo = 1
this.queryParam = {}
this.queryParamSeach = ''
this.getInfoList(1)
if (this.isTrue){
this.getInfoList(1)
}else{
this.getParagraphInfoList(1)
}
},
searchQuery() {
this.ParamSeach()
this.pageNo = 1
this.getInfoList(1)
if (this.isTrue){
this.getInfoList(1)
}else{
this.getParagraphInfoList(1)
}
},
treeChange(value, text) {
this.queryParam[this.db_field_name + '_name'] = text
@@ -461,14 +490,22 @@
this.selectModel = selectModel
this.ParamSeach()
this.pageNo = 1
this.getInfoList(1)
if (this.isTrue){
this.getInfoList(1)
}else{
this.getParagraphInfoList(1)
}
},
searchDataTwo(data, selectModel) {
this.queryParam = { ...this.queryParam, ...data }
this.selectModel = selectModel
this.ParamSeach()
this.pageNo = 1
this.getInfoList(2)
if (this.isTrue){
this.getInfoList(2)
}else{
this.getParagraphInfoList(2)
}
},
changeQuery(val, name) {
this.queryParam[name + '_name'] = val
@@ -512,7 +549,40 @@
}
})
},
getParagraphInfoList(num){
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) {
queryParam[val] = queryParam[val].join(',')
}
if (val.includes('_name')) {
delete queryParam[val]
}
})
if (num == 1) {
this.mapOne = queryParam
} else if (num == 2) {
this.mapTwo = queryParam
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
this.mapTwo.ids = selectedRowKeys.join(',')
}
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
mapOne: this.mapOne,
mapTwo: this.mapTwo
}
this.loading = true
postAction(this.url.getParagraphInfoList, query).then((res) => {
if (res.success) {
this.conList = res.result.records
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
fileNameClick(row) {
this.fileList = row.file_name || []
if (this.fileList.length > 0) {