修改搜索中心
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
|
||||
myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl,
|
||||
upDataList: [],
|
||||
downLoadFileUrl: window._CONFIG['domianURL'] + '/sys/common/pdf/viewFile',
|
||||
downLoadFileUrl: window._CONFIG['domianURL'] + '/sys/common/fileView',
|
||||
fileList: [],
|
||||
myfileList: [],
|
||||
isLoding: false
|
||||
@@ -182,10 +182,10 @@
|
||||
if (fileSuffix === '.pdf') {
|
||||
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
|
||||
} 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')
|
||||
} 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')
|
||||
} else {
|
||||
downloadFile('/sys/common/download', fileQuery.fileName, { id: fileQuery.id })
|
||||
|
||||
@@ -243,10 +243,10 @@
|
||||
if (fileSuffix == '.pdf') {
|
||||
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
|
||||
} 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')
|
||||
} 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')
|
||||
} else {
|
||||
downloadFile('/sys/common/download', fileQuery.fileName, { id: fileQuery.id })
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
loading: false,
|
||||
selectModel: '',
|
||||
fileList: [],
|
||||
downLoadFileUrl: window._CONFIG['domianURL'] + '/sys/common/pdf/viewFile',
|
||||
downLoadFileUrl: window._CONFIG['domianURL'] + '/sys/common/fileView',
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -469,10 +469,10 @@
|
||||
if (fileSuffix == '.pdf') {
|
||||
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
|
||||
} 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')
|
||||
} 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')
|
||||
} else {
|
||||
downloadFile('/sys/common/download', fileQuery.fileName, { id: fileQuery.id })
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
@click="checkedClick(item)"
|
||||
:class="{ 'null-input':item.checked }">
|
||||
<div class="text-header">
|
||||
<span>{{item.type}}</span>
|
||||
<span>{{item.number}}</span>
|
||||
<span>{{item.module_type}}</span>
|
||||
<span>{{item.serial_number}}</span>
|
||||
<span>{{item.title}}</span>
|
||||
</div>
|
||||
<div class="text-content">
|
||||
@@ -45,51 +45,22 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'whole',
|
||||
data() {
|
||||
return {
|
||||
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, 能源种类:汽油,纯电, 起草单位: 起草人: 关键词: 备注:-- 责任部门:-- 所属专业领域:-- '
|
||||
}
|
||||
],
|
||||
url: {
|
||||
getInfoList: 'search/document/getFullTextInfoList'
|
||||
},
|
||||
conList: [],
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
pageNo: 1
|
||||
pageNo: 1,
|
||||
loading: false,
|
||||
queryParam: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -109,6 +80,9 @@
|
||||
this.conList = [...this.conList]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
checkedClick(item) {
|
||||
if (item.checked) {
|
||||
@@ -125,6 +99,42 @@
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
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;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
|
||||
@@ -7,26 +7,26 @@
|
||||
<a-input-group class="input-group" compact v-if="active === $t('DocumentLibrary')">
|
||||
<a-select v-model="selectModel">
|
||||
<a-select-option :value="item.db_field_name"
|
||||
@change="selectChange"
|
||||
v-for="(item,index) in searchOption" :key="index">
|
||||
{{item.db_field_txt}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<a-input-search
|
||||
allowClear
|
||||
@change="onChange"
|
||||
style="width: 70%"
|
||||
placeholder="请输入搜索内容"
|
||||
@search="onSearch"
|
||||
></a-input-search>
|
||||
</a-input-group>
|
||||
<a-input-search
|
||||
v-model="selectValueTwo"
|
||||
v-else-if="active === $t('whole')"
|
||||
class="inputSearch"
|
||||
allow-clear
|
||||
placeholder="请输入搜索内容"
|
||||
@search="onSearch"
|
||||
@search="wholeOnSearch"
|
||||
></a-input-search>
|
||||
<span class="textSearch" @click="wholeTextSearch(this.selectValueTwo)">结果中检索</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-center-content">
|
||||
@@ -42,7 +42,7 @@
|
||||
</a-tabs>
|
||||
</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')"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -69,7 +69,8 @@
|
||||
queryCondition: 'search/document/queryCondition'
|
||||
},
|
||||
selectModel: '',
|
||||
queryParam: {}
|
||||
queryParam: {},
|
||||
selectValueTwo:'',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -85,11 +86,15 @@
|
||||
this.$refs.DocumentLibraryRef.searchData(this.queryParam,this.selectModel)
|
||||
}
|
||||
},
|
||||
onChange(e){
|
||||
console.log(e)
|
||||
wholeOnSearch(event){
|
||||
if (this.$refs.wholeRef){
|
||||
this.$refs.wholeRef.searchData(event)
|
||||
}
|
||||
},
|
||||
selectChange(event) {
|
||||
console.log(event)
|
||||
wholeTextSearch(event){
|
||||
if (this.$refs.wholeRef){
|
||||
this.$refs.wholeRef.searchDataTwo(event)
|
||||
}
|
||||
},
|
||||
getCondition() {
|
||||
let query = {
|
||||
@@ -197,4 +202,10 @@
|
||||
.input-group .ant-select {
|
||||
background: #F6F7FA;
|
||||
}
|
||||
.textSearch{
|
||||
line-height: 40px;
|
||||
display: inline-block;
|
||||
margin-left: 8px;
|
||||
color: #21c9cc;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user