|
@@ -1,6 +1,6 @@
|
|
|
<script setup name="WarResearchReport">
|
|
|
import {setHightLightText} from '@/hooks/common'
|
|
|
-import {computed, nextTick, onMounted, reactive,ref} from 'vue'
|
|
|
+import {computed, nextTick, onMounted, reactive,ref,watch} from 'vue'
|
|
|
import apiReport from '@/api/report'
|
|
|
import {reportExternalInterface} from '@/api/reportExternal'
|
|
|
import moment from 'moment'
|
|
@@ -28,6 +28,8 @@ const showCleanFilterBox=computed(()=>{
|
|
|
) return true
|
|
|
})
|
|
|
|
|
|
+const isSearch=ref(false) // 是否为搜索状态
|
|
|
+
|
|
|
|
|
|
const isClickClose=ref(false)//是否点击过关闭一键清空模块
|
|
|
function handleCleanFilter(){
|
|
@@ -109,6 +111,16 @@ const listState = reactive({
|
|
|
finished:false,
|
|
|
loading:false
|
|
|
})
|
|
|
+
|
|
|
+watch(
|
|
|
+ ()=>listState.keyWord,
|
|
|
+ (val)=>{
|
|
|
+ console.log(val)
|
|
|
+ if(!val){
|
|
|
+ isSearch.value=false
|
|
|
+ }
|
|
|
+ }
|
|
|
+)
|
|
|
async function getList(){
|
|
|
const res = isRise.value
|
|
|
? await reportExternalInterface.getRiseReportList({
|
|
@@ -148,6 +160,7 @@ function onLoad(){
|
|
|
}
|
|
|
function refreshList(){
|
|
|
document.documentElement.scrollTop=0
|
|
|
+ isSearch.value=true
|
|
|
listState.page=1
|
|
|
listState.list=[]
|
|
|
listState.finished=false
|
|
@@ -491,7 +504,7 @@ function goDetail(item){
|
|
|
>
|
|
|
<div class="list-top">
|
|
|
<h2 class="van-ellipsis title">
|
|
|
- <span v-html="setHightLightText(item.Title,listState.keyWord)"></span>
|
|
|
+ <span v-html="isSearch?setHightLightText(item.Title,listState.keyWord):item.Title"></span>
|
|
|
<template v-if="isRise">
|
|
|
({{ moment(item.MsgSendTime||item.PublishTime||item.CreateTime).format('MMDD')}})
|
|
|
</template>
|