Commit b770fc2e authored by zhengke's avatar zhengke

定时保存

parent 1d94e02d
...@@ -257,7 +257,7 @@ const goBack = (type:any) =>{ ...@@ -257,7 +257,7 @@ const goBack = (type:any) =>{
}else if(model.value==2){ }else if(model.value==2){
clearInterval(intervalId.value); clearInterval(intervalId.value);
intervalId.value = null; intervalId.value = null;
UpdateItinerary() setTemplate(0)
if(type==1) { if(type==1) {
searchData.value.SalesEditor = router.currentRoute.value.params searchData.value.SalesEditor = router.currentRoute.value.params
if(searchData.value.sellId)searchData.value.TempId2 = queryObj.value.TempId if(searchData.value.sellId)searchData.value.TempId2 = queryObj.value.TempId
...@@ -669,8 +669,8 @@ watch(()=>autoSave.value,(newVal)=>{ ...@@ -669,8 +669,8 @@ watch(()=>autoSave.value,(newVal)=>{
}) })
watch(()=>slides.value,(newVal,oldVal)=>{ watch(()=>slides.value,(newVal,oldVal)=>{
if(model.value==2&&SalesEditor.value>0){ if(model.value==2&&SalesEditor.value>0){
if(!MonitoringNumber.value||MonitoringNumber.value<2) MonitoringNumber.value++ if(!MonitoringNumber.value||MonitoringNumber.value<3) MonitoringNumber.value++
if(MonitoringNumber.value>1) { if(MonitoringNumber.value>2) {
Countdown.value = timer Countdown.value = timer
benginTimer() benginTimer()
} }
...@@ -683,8 +683,8 @@ watch(()=>slides.value,(newVal,oldVal)=>{ ...@@ -683,8 +683,8 @@ watch(()=>slides.value,(newVal,oldVal)=>{
}) })
watch(()=>queryObj.value.Title,(newVal,oldVal)=>{ watch(()=>queryObj.value.Title,(newVal,oldVal)=>{
if(model.value==2&&SalesEditor.value>0){ if(model.value==2&&SalesEditor.value>0){
if(!MonitoringTNumber.value||MonitoringTNumber.value<2) MonitoringTNumber.value++ if(!MonitoringTNumber.value||MonitoringTNumber.value<3) MonitoringTNumber.value++
if(MonitoringTNumber.value>1) { if(MonitoringTNumber.value>2) {
Countdown.value = timer Countdown.value = timer
benginTimer() benginTimer()
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
@input="SearchCloudInfo" @input="SearchCloudInfo"
> >
<template #prefix> <template #prefix>
<IconSearch class="cusor-pointer" @click.stop="SearchCloudInfo"></IconSearch> <IconSearch class="cusor-pointer" @click.stop="searchData"></IconSearch>
</template> </template>
</el-input> </el-input>
<div v-loading="loading" style="height: calc(100%-40px);overflow: auto;"> <div v-loading="loading" style="height: calc(100%-40px);overflow: auto;">
...@@ -75,7 +75,6 @@ ...@@ -75,7 +75,6 @@
cn: '', cn: '',
}) })
const keywords = ref('') const keywords = ref('')
const slidesStore = useSlidesStore() const slidesStore = useSlidesStore()
const dataList = ref([]) const dataList = ref([])
const dataListAll = ref([]) const dataListAll = ref([])
...@@ -86,7 +85,7 @@ ...@@ -86,7 +85,7 @@
const SearchCloudInfo = () => { const SearchCloudInfo = () => {
if(keywords.value){ if(keywords.value){
dataList.value = dataListAll.value.filter(x=>{ dataList.value = dataListAll.value.filter(x=>{
return x.Feature.toLowerCase().includes(keywords.value.toLowerCase()) return x.Name .toLowerCase().includes(keywords.value.toLowerCase())
}) })
}else dataList.value = dataListAll.value }else dataList.value = dataListAll.value
} }
...@@ -97,7 +96,7 @@ ...@@ -97,7 +96,7 @@
const setElText = (item:any,index:Number) => { const setElText = (item:any,index:Number) => {
current.value = item.Feature current.value = item.Feature
const contentStr = handleElement.value.contentStr const contentStr = handleElement.value.contentStr
if(contentStr!=item.Feature) { if(contentStr!=item.Feature&&item.Feature) {
const content = handleElement.value.content.replace(getHtmlPlainText(handleElement.value.content),item.Feature) const content = handleElement.value.content.replace(getHtmlPlainText(handleElement.value.content),item.Feature)
const props = { const props = {
content, content,
...@@ -110,16 +109,21 @@ ...@@ -110,16 +109,21 @@
} }
} }
const searchData = () => {
if(!keywords.value) return
params.kw = keywords.value
getDatas()
}
const getDatas = async () => { const getDatas = async () => {
loading.value = true loading.value = true
const response = await MatchingData.ScenicSearch(params) const response = await MatchingData.ScenicSearch(params)
if (response.data.resultCode == 1) { if (response.data.resultCode == 1) {
dataList.value = checkPoiCoverImg(response.data.data) dataListAll.value = dataList.value = checkPoiCoverImg(response.data.data)
dataListAll.value = checkPoiCoverImg(response.data.data)
} }
loading.value = false loading.value = false
} }
const checkPoiCoverImg = (array:any[])=>{ const checkPoiCoverImg = (array:any[])=>{
if(array.length==0) return
array.forEach((x,index)=>{ array.forEach((x,index)=>{
if(x.Feature==handleElement.value.contentStr) current.value = x.Feature if(x.Feature==handleElement.value.contentStr) current.value = x.Feature
if((!x.PicPath||x.PicPath=='') && x.ImgArray && x.ImgArray.length>0){ if((!x.PicPath||x.PicPath=='') && x.ImgArray && x.ImgArray.length>0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment