修改搜索中心
This commit is contained in:
+2
-1
@@ -277,8 +277,9 @@ public class CommonController {
|
||||
// 文件名称
|
||||
fileName = file.getName();
|
||||
inputStream = new BufferedInputStream(new FileInputStream(filePath));
|
||||
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(fileName.getBytes("UTF-8"),"iso-8859-1"));
|
||||
response.setContentType("application/force-download");// 设置强制下载不打开
|
||||
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));
|
||||
inputStream = new BufferedInputStream(new FileInputStream(filePath));
|
||||
outputStream = response.getOutputStream();
|
||||
byte[] buf = new byte[1024];
|
||||
int len;
|
||||
|
||||
@@ -2,17 +2,10 @@
|
||||
<div class="box">
|
||||
<div class="search-text-title">
|
||||
<span>检索范围:</span>
|
||||
<span>纯电动</span>
|
||||
<!-- <div class="search-header-right" v-if="showList">-->
|
||||
<!-- <!– <a-icon type="appstore" />–>-->
|
||||
<!-- <a-icon :type="item.type" v-for="item in listOption" class="header-list"-->
|
||||
<!-- :class="{'header-list-active':selectList.indexOf(item.value) !== -1 }"-->
|
||||
<!-- @click="selectListModel(item.value)"-->
|
||||
<!-- ></a-icon>-->
|
||||
<!-- </div>-->
|
||||
<span>{{ queryParam.selectValue }}</span>
|
||||
</div>
|
||||
<a-checkbox-group v-model="checkboxText">
|
||||
<li v-for="item in conList" :key="item.id">
|
||||
<li v-for="(item,index) in conList" :key="index">
|
||||
<div style="margin-bottom: 10px;position: relative">
|
||||
<a-checkbox :value="item.id" class="checkbox-left"></a-checkbox>
|
||||
<div class="text-text-right"
|
||||
@@ -23,13 +16,26 @@
|
||||
<span>{{item.serial_number}}</span>
|
||||
<span>{{item.title}}</span>
|
||||
</div>
|
||||
<div class="text-content">
|
||||
{{item.content}}
|
||||
<div class="text-content" v-html="item.content" v-if="!queryParam.selectValue">
|
||||
|
||||
</div>
|
||||
<div class="text-content" v-html="item.content"
|
||||
v-else-if="(item.file_text instanceof Array) && queryParam.selectValue">
|
||||
|
||||
</div>
|
||||
<div class="text-content" v-html="item.content" v-else-if="!item.file_text && queryParam.selectValue">
|
||||
|
||||
</div>
|
||||
<div class="text-content" v-html="item.file_text" v-else>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</a-checkbox-group>
|
||||
<div>
|
||||
暂无数据
|
||||
</div>
|
||||
<div class="page">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
@@ -101,7 +107,7 @@
|
||||
this.pageSize = pageSize
|
||||
},
|
||||
searchData(value) {
|
||||
this.queryParam.selectValue = value
|
||||
this.queryParam.selectValue = value || undefined
|
||||
this.queryParam.selectValueTwo = undefined
|
||||
this.getList()
|
||||
},
|
||||
@@ -124,11 +130,6 @@
|
||||
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 {
|
||||
@@ -139,7 +140,11 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.highlight-class {
|
||||
color: #21c9cc;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
.box {
|
||||
padding: 0 0 0 18px;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
placeholder="请输入搜索内容"
|
||||
@search="wholeOnSearch"
|
||||
></a-input-search>
|
||||
<span class="textSearch" @click="wholeTextSearch(this.selectValueTwo)">结果中检索</span>
|
||||
<span v-if="active === $t('whole')" class="textSearch" @click="wholeTextSearch(selectValueTwo)">结果中检索</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-center-content">
|
||||
@@ -92,6 +92,7 @@
|
||||
}
|
||||
},
|
||||
wholeTextSearch(event){
|
||||
console.log(event)
|
||||
if (this.$refs.wholeRef){
|
||||
this.$refs.wholeRef.searchDataTwo(event)
|
||||
}
|
||||
@@ -207,5 +208,6 @@
|
||||
display: inline-block;
|
||||
margin-left: 8px;
|
||||
color: #21c9cc;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user