lcw
This commit is contained in:
@ -60,7 +60,7 @@ watch(() => props.lx, (val) => {
|
||||
case 2:
|
||||
nameData.value = { title: 'qtMc' }
|
||||
case 3:
|
||||
nameData.value = { title: 'qtMc' }
|
||||
nameData.value = { title: 'jymc' }
|
||||
break;
|
||||
}
|
||||
}, { immediate: true })
|
||||
@ -76,7 +76,7 @@ watch(() => props.lx, (val) => {
|
||||
box-sizing: border-box;
|
||||
|
||||
.warning-image {
|
||||
//
|
||||
//
|
||||
// width: 80px;
|
||||
// height: 100px;
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<DialogDragger title="预警详情" top="150px" v-model="props.show" @close="close">
|
||||
|
||||
<DialogDragger title="预警详情" top="150px" v-model="props.show" @close="close">
|
||||
|
||||
<ul class="warningList" ref="gjyjList">
|
||||
<li v-for="item in props.data" :key="item.id">
|
||||
@ -7,13 +8,21 @@
|
||||
</li>
|
||||
<MOSTY.Empty :show="props.data.length <= 0" :imgSize="150"></MOSTY.Empty>
|
||||
</ul>
|
||||
|
||||
<!-- :style="{height: `calc(100vh - ${handleHs}px)`}" -->
|
||||
|
||||
<div style="position:relative;width: 100%;" :style="{height: `calc(100vh - ${handleHs}px)`}">
|
||||
<GdMap v-if="showMap"></GdMap>
|
||||
</div>
|
||||
</DialogDragger>
|
||||
</template>
|
||||
<script setup>
|
||||
import * as MOSTY from "@/components/MyComponents/index";
|
||||
import GdMap from "@/components/GdMap/index.vue";
|
||||
|
||||
import DialogDragger from "@/views/home/layout/dialogDragger.vue";
|
||||
import YjItem from "@/views/home/components/yjItem.vue";
|
||||
import { ref, defineProps } from "vue";
|
||||
import { ref, defineProps, onMounted, watch } from "vue";
|
||||
import emitter from "@/utils/eventBus.js";
|
||||
const gjyjList = ref(null); //预警列表数据
|
||||
//参数传递
|
||||
@ -28,13 +37,43 @@ const props = defineProps({
|
||||
default:false
|
||||
},
|
||||
});
|
||||
console.log(props.show);
|
||||
|
||||
//关闭
|
||||
function close() {
|
||||
emitter.emit('deletePointArea','home_yj_map');
|
||||
emitter.emit("showHomeYJ",false);
|
||||
}
|
||||
const showMap=ref(false)
|
||||
onMounted(() => {
|
||||
setTimeout(() => {
|
||||
showMap.value = true
|
||||
setTimeout(() => {
|
||||
for (let i = 0; i < props.data.length; i++) {
|
||||
|
||||
const item = props.data[i];
|
||||
console.log(item);
|
||||
|
||||
emitter.emit('showHomeYJ',[item]);
|
||||
emitter.emit('deletePointArea','home_yj_map');
|
||||
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});
|
||||
}
|
||||
}, 500);
|
||||
|
||||
|
||||
}, 200);
|
||||
})
|
||||
const handleHs=ref(0)
|
||||
watch(() => gjyjList.value, (val) => {
|
||||
console.log(val.clientHeight);
|
||||
handleHs.value=val.clientHeight+198+150+20
|
||||
},{deep:true})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div style="pointer-events: none" :class="props.parentClass">
|
||||
<el-dialog :top="props.top" style="pointer-events: auto !important" :modal="false" draggable v-model="props.modelValue" :destroy-on-close="true"
|
||||
:show-close="false" :close-on-click-modal="false" custom-class="zdy-model-dialog">
|
||||
<el-dialog :top="props.top" style="pointer-events: auto !important;" :modal="false" draggable v-model="props.modelValue" :destroy-on-close="true"
|
||||
:show-close="false" :close-on-click-modal="false" :width="width" :custom-class="coumClass">
|
||||
<template #title>
|
||||
<div class="my-header">
|
||||
<span class="imgIcon"> {{props.title}}</span>
|
||||
@ -35,7 +35,15 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
width: {
|
||||
type: String,
|
||||
default: "50%"
|
||||
},
|
||||
coumClass: {
|
||||
type: String,
|
||||
default: "zdy-model-dialog"
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// 關閉
|
||||
@ -74,14 +82,20 @@ function closeDialog(params) {
|
||||
padding: 8px 10px;
|
||||
box-sizing: border-box;
|
||||
pointer-events: auto !important;
|
||||
width: 400px;
|
||||
left: -290px;
|
||||
top: 34px;
|
||||
height:calc(100% - 300px);
|
||||
overflow: auto;
|
||||
|
||||
}
|
||||
.zdy-model-dialog .el-dialog__header {
|
||||
padding: 0 !important;
|
||||
}
|
||||
:v-deep .el-dialog__header{
|
||||
padding: 0 !important;
|
||||
}
|
||||
:v-deep .el-dialog__body{
|
||||
padding: 0 !important;
|
||||
}
|
||||
.zdy-model-dialog .el-dialog__body {
|
||||
padding: 0 !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
</div>
|
||||
<div class="comom-cnt zdryBox">
|
||||
<ul class="ryBox" v-loading="loading" v-infinite-scroll="loadList" style="overflow: auto">
|
||||
<li v-for="item in personList" :key="item.id" >
|
||||
<Assessment :item="item" :dict="{D_SG_TSYPGZ}" :lx="2"/>
|
||||
<li v-for="item in personList" :key="item.id" @click="onClickPush(item)">
|
||||
<Assessment :item="item" :dict="{D_SG_TSYPGZ}" :lx="1"/>
|
||||
</li>
|
||||
<MOSTY.Empty :show="!loading && personList.length <= 0" :imgSize="100"></MOSTY.Empty>
|
||||
</ul>
|
||||
@ -18,35 +18,19 @@ import { qcckPost } from "@/api/qcckApi.js";
|
||||
import Assessment from "@/views/home/components/assessmentItem.vue";
|
||||
import * as MOSTY from "@/components/MyComponents/index";
|
||||
import CheckBox from "@/components/checkBox/index.vue";
|
||||
import { ref ,reactive, onMounted,getCurrentInstance} from 'vue';
|
||||
import { ref, reactive, onMounted, getCurrentInstance } from 'vue';
|
||||
import {useRouter} from 'vue-router'
|
||||
const { proxy } = getCurrentInstance();
|
||||
const {D_SG_TSYPGZ} =proxy.$dict('D_SG_TSYPGZ')
|
||||
const checkData = reactive({
|
||||
list: ["人员", "车辆"],
|
||||
hasChoose: ["人员", "车辆"],
|
||||
});
|
||||
const router = useRouter()
|
||||
const total = ref(0);
|
||||
const yjJb = ref('10,20,30,40');
|
||||
const pageNum = ref(1);
|
||||
const loading = ref(false); // 加载中
|
||||
const personList = ref([]);
|
||||
onMounted(()=>{
|
||||
getList()
|
||||
})
|
||||
// 复选框切换
|
||||
function changeData(val){
|
||||
pageNum.value = 1;
|
||||
personList.value = [];
|
||||
checkData.hasChoose = val;
|
||||
let ids = [];
|
||||
val.forEach(it => {
|
||||
if(it == '人员') ids.push(1);
|
||||
if(it == '车辆') ids.push(2);
|
||||
});
|
||||
yjJb.value = ids.join(',')
|
||||
if(val.length == 0) personList.value = [];
|
||||
else getList();
|
||||
}
|
||||
|
||||
|
||||
// 触底加载
|
||||
const loadList = () =>{
|
||||
@ -67,18 +51,15 @@ const getList = () =>{
|
||||
loading.value = false;
|
||||
})
|
||||
}
|
||||
|
||||
const chooseItem = (item) =>{
|
||||
emitter.emit('showHomeYJ',[item]);
|
||||
emitter.emit('deletePointArea','home_yj_map');
|
||||
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});
|
||||
const onClickPush = (val) => {
|
||||
router.push({
|
||||
path: '/tsypHome',
|
||||
query: {
|
||||
id: val.id,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@ -71,7 +71,8 @@ const getList = () =>{
|
||||
})
|
||||
}
|
||||
|
||||
const chooseItem = (item) =>{
|
||||
const chooseItem = (item) => {
|
||||
console.log(item);
|
||||
emitter.emit('showHomeYJ',[item]);
|
||||
emitter.emit('deletePointArea','home_yj_map');
|
||||
if(!item.jd || !item.jd) return proxy.$message({ type: "warning", message: "该预警没有坐标!" });
|
||||
|
||||
Reference in New Issue
Block a user