修改搜索中心

This commit is contained in:
qq787203167
2022-03-21 16:48:59 +08:00
parent 8b753f4a66
commit 9b13e2ff6f
5 changed files with 79 additions and 57 deletions
+3 -3
View File
@@ -38,7 +38,7 @@
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload', uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl, myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl,
upDataList: [], upDataList: [],
downLoadFileUrl: window._CONFIG['domianURL'] + '/sys/common/pdf/viewFile', downLoadFileUrl: window._CONFIG['domianURL'] + '/sys/common/fileView',
fileList: [], fileList: [],
myfileList: [], myfileList: [],
isLoding: false isLoding: false
@@ -182,10 +182,10 @@
if (fileSuffix === '.pdf') { if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
} else if (fileSuffix === '.docx') { } else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + fileQuery.id) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '?id=' + fileQuery.id)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') { } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + fileQuery.id) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '?id=' + fileQuery.id)
window.open(url, '_blank') window.open(url, '_blank')
} else { } else {
downloadFile('/sys/common/download', fileQuery.fileName, { id: fileQuery.id }) downloadFile('/sys/common/download', fileQuery.fileName, { id: fileQuery.id })
@@ -243,10 +243,10 @@
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
} else if (fileSuffix == '.docx') { } else if (fileSuffix == '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + fileQuery.id) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '?id=' + fileQuery.id)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + fileQuery.id) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '?id=' + fileQuery.id)
window.open(url, '_blank') window.open(url, '_blank')
} else { } else {
downloadFile('/sys/common/download', fileQuery.fileName, { id: fileQuery.id }) downloadFile('/sys/common/download', fileQuery.fileName, { id: fileQuery.id })
@@ -288,7 +288,7 @@
loading: false, loading: false,
selectModel: '', selectModel: '',
fileList: [], fileList: [],
downLoadFileUrl: window._CONFIG['domianURL'] + '/sys/common/pdf/viewFile', downLoadFileUrl: window._CONFIG['domianURL'] + '/sys/common/fileView',
} }
}, },
watch: { watch: {
@@ -469,10 +469,10 @@
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
} else if (fileSuffix == '.docx') { } else if (fileSuffix == '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + fileQuery.id) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '?id=' + fileQuery.id)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + fileQuery.id) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '?id=' + fileQuery.id)
window.open(url, '_blank') window.open(url, '_blank')
} else { } else {
downloadFile('/sys/common/download', fileQuery.fileName, { id: fileQuery.id }) downloadFile('/sys/common/download', fileQuery.fileName, { id: fileQuery.id })
@@ -19,8 +19,8 @@
@click="checkedClick(item)" @click="checkedClick(item)"
:class="{ 'null-input':item.checked }"> :class="{ 'null-input':item.checked }">
<div class="text-header"> <div class="text-header">
<span>{{item.type}}</span> <span>{{item.module_type}}</span>
<span>{{item.number}}</span> <span>{{item.serial_number}}</span>
<span>{{item.title}}</span> <span>{{item.title}}</span>
</div> </div>
<div class="text-content"> <div class="text-content">
@@ -45,51 +45,22 @@
</template> </template>
<script> <script>
import { getAction, postAction, downloadFile } from '@/api/manage'
export default { export default {
name: 'whole', name: 'whole',
data() { data() {
return { return {
checkboxText: [], checkboxText: [],
conList: [ url: {
{ getInfoList: 'search/document/getFullTextInfoList'
id: 1, },
type: '文档库', conList: [],
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, 能源种类:汽油,纯电, 起草单位: 起草人: 关键词: 备注:-- 责任部门:-- 所属专业领域:-- '
}
],
total: 0, total: 0,
pageSize: 10, pageSize: 10,
pageNo: 1 pageNo: 1,
loading: false,
queryParam: {}
} }
}, },
watch: { watch: {
@@ -109,6 +80,9 @@
this.conList = [...this.conList] this.conList = [...this.conList]
} }
}, },
mounted() {
this.getList()
},
methods: { methods: {
checkedClick(item) { checkedClick(item) {
if (item.checked) { if (item.checked) {
@@ -125,6 +99,42 @@
SizeChange(page, pageSize) { SizeChange(page, pageSize) {
this.pageNo = 1 this.pageNo = 1
this.pageSize = pageSize this.pageSize = pageSize
},
searchData(value) {
this.queryParam.selectValue = value
this.queryParam.selectValueTwo = undefined
this.getList()
},
searchDataTwo(value) {
this.queryParam.selectValueTwo = value
this.getList()
},
getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) {
queryParam[val] = queryParam[val].join(',')
}
})
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...queryParam
}
postAction(this.url.getInfoList, query).then((res) => {
if (res.success) {
this.conList = res.result.records
this.conList.forEach((val) => {
if (val['selectValueTwo'] && val['selectValueTwo'].includes(this.queryParam['selectValueTwo'])) {
val['selectValueTwo'] = val['selectValueTwo'].replace(this.queryParam['selectValueTwo'], `<text style="color:#21c9cc">${this.queryParam['selectValueTwo']}</text>`)
}
})
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
} }
} }
} }
@@ -175,6 +185,7 @@
color: #040B29; color: #040B29;
opacity: 0.7; opacity: 0.7;
} }
.page { .page {
text-align: right; text-align: right;
margin-top: 20px; margin-top: 20px;
@@ -7,26 +7,26 @@
<a-input-group class="input-group" compact v-if="active === $t('DocumentLibrary')"> <a-input-group class="input-group" compact v-if="active === $t('DocumentLibrary')">
<a-select v-model="selectModel"> <a-select v-model="selectModel">
<a-select-option :value="item.db_field_name" <a-select-option :value="item.db_field_name"
@change="selectChange"
v-for="(item,index) in searchOption" :key="index"> v-for="(item,index) in searchOption" :key="index">
{{item.db_field_txt}} {{item.db_field_txt}}
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-input-search <a-input-search
allowClear allowClear
@change="onChange"
style="width: 70%" style="width: 70%"
placeholder="请输入搜索内容" placeholder="请输入搜索内容"
@search="onSearch" @search="onSearch"
></a-input-search> ></a-input-search>
</a-input-group> </a-input-group>
<a-input-search <a-input-search
v-model="selectValueTwo"
v-else-if="active === $t('whole')" v-else-if="active === $t('whole')"
class="inputSearch" class="inputSearch"
allow-clear allow-clear
placeholder="请输入搜索内容" placeholder="请输入搜索内容"
@search="onSearch" @search="wholeOnSearch"
></a-input-search> ></a-input-search>
<span class="textSearch" @click="wholeTextSearch(this.selectValueTwo)">结果中检索</span>
</div> </div>
</div> </div>
<div class="search-center-content"> <div class="search-center-content">
@@ -42,7 +42,7 @@
</a-tabs> </a-tabs>
</div> </div>
</div> </div>
<whole :url="url" v-if="active === $t('whole')"/> <whole ref="wholeRef" :url="url" v-if="active === $t('whole')"/>
<DocumentLibrary ref="DocumentLibraryRef" v-else-if="active === $t('DocumentLibrary')"/> <DocumentLibrary ref="DocumentLibraryRef" v-else-if="active === $t('DocumentLibrary')"/>
</div> </div>
</div> </div>
@@ -69,7 +69,8 @@
queryCondition: 'search/document/queryCondition' queryCondition: 'search/document/queryCondition'
}, },
selectModel: '', selectModel: '',
queryParam: {} queryParam: {},
selectValueTwo:'',
} }
}, },
mounted() { mounted() {
@@ -85,11 +86,15 @@
this.$refs.DocumentLibraryRef.searchData(this.queryParam,this.selectModel) this.$refs.DocumentLibraryRef.searchData(this.queryParam,this.selectModel)
} }
}, },
onChange(e){ wholeOnSearch(event){
console.log(e) if (this.$refs.wholeRef){
this.$refs.wholeRef.searchData(event)
}
}, },
selectChange(event) { wholeTextSearch(event){
console.log(event) if (this.$refs.wholeRef){
this.$refs.wholeRef.searchDataTwo(event)
}
}, },
getCondition() { getCondition() {
let query = { let query = {
@@ -197,4 +202,10 @@
.input-group .ant-select { .input-group .ant-select {
background: #F6F7FA; background: #F6F7FA;
} }
.textSearch{
line-height: 40px;
display: inline-block;
margin-left: 8px;
color: #21c9cc;
}
</style> </style>