更新数据

This commit is contained in:
2025-07-14 17:31:24 +08:00
parent 09a47e5369
commit e940744dd8
9 changed files with 225 additions and 47 deletions

View File

@ -7,20 +7,22 @@
<CheckBox :data="checkData" @changeData="changeData"></CheckBox>
</div>
<ul class="ryBox" v-loading="loading" v-infinite-scroll="loadList" style="overflow: auto">
<li :class="item.isChecked ? 'active':''" v-for="item in personList" :key="item.id" >
<li v-for="item in personList" :key="item.id" @click="chooseItem(item)">
<YjItem :item="item"></YjItem>
</li>
<MOSTY.Empty :show="!loading && personList.length <= 0" :imgSize="120"></MOSTY.Empty>
<MOSTY.Empty :show="!loading && personList.length <= 0" :imgSize="100"></MOSTY.Empty>
</ul>
</div>
</template>
<script setup>
import emitter from "@/utils/eventBus.js";
import { qcckPost } from "@/api/qcckApi.js";
import YjItem from "@/views/home/components/yjItem.vue";
import * as MOSTY from "@/components/MyComponents/index";
import CheckBox from "@/components/checkBox/index.vue";
import { ref ,reactive, onMounted} from 'vue';
import { ref ,reactive, onMounted,getCurrentInstance} from 'vue';
const { proxy } = getCurrentInstance();
const checkData = reactive({
list: ["红", "橙", "黄", "蓝"],
hasChoose: ["红"]
@ -68,6 +70,18 @@ const getList = () =>{
loading.value = false;
})
}
const chooseItem = (item) =>{
emitter.emit('deletePointArea','home_yj_map');
console.log(item.jd,item.wd);
if(!item.jd || !item.jd) return proxy.$message({ type: "warning", message: "该预警没有坐标!" });
let icon = require('@/assets/point/yj.png');
if(item.yjjb == '20') icon = require('@/assets/point/yj1.png');
if(item.yjjb == '30') icon = require('@/assets/point/yj2.png');
if(item.yjjb == '40') icon = require('@/assets/point/yj3.png');
emitter.emit('addPointArea',{flag:'home_yj_map',icon,coords:[item]});
emitter.emit('setMapCenter',{location:[item.jd,item.wd],zoomLevel:10});
}
</script>
<style>