更新大屏

This commit is contained in:
2025-07-14 18:15:09 +08:00
parent 694ad9a54c
commit 446304ae1b
6 changed files with 18 additions and 30 deletions

View File

@ -38,6 +38,7 @@ export function resetForm(refName) {
//当type=1时获取出生日期,type=2时获取性别,type=3时获取年龄 //当type=1时获取出生日期,type=2时获取性别,type=3时获取年龄
export function IdCard(IdCard, type) { export function IdCard(IdCard, type) {
//获取出生日期 //获取出生日期
if(!IdCard) return;
if (type === 1) { if (type === 1) {
return IdCard.substring(6, 10) + "-" + IdCard.substring(10, 12) + "-" + IdCard.substring(12, 14) return IdCard.substring(6, 10) + "-" + IdCard.substring(10, 12) + "-" + IdCard.substring(12, 14)
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="warning-card flex align-center" :class="changeBG(item.yjjb)"> <div class="warning-card flex align-center" :class="changeBG(item.yjjb)">
<div class="warning-image"> <div class="warning-image">
<img :src="item.yjTp" alt="预警图片" /> <img :src="item.yjTp" width="80" height="120" alt="" />
</div> </div>
<div class="warning-info"> <div class="warning-info">
<div class="flex just-between align-center"> <div class="flex just-between align-center">

View File

@ -1,10 +1,10 @@
<template> <template>
<DialogDragger :title="props.data.type" top="150px" v-model="props.show" @close="close"> <DialogDragger title="预警详情" top="150px" v-model="props.show" @close="close">
<ul class="warningList" ref="gjyjList" v-loading="loading"> <ul class="warningList" ref="gjyjList">
<li v-for="item in warningList" :key="item.id"> <li v-for="item in props.data" :key="item.id">
<YjItem :data="item"/> <YjItem :data="item"/>
</li> </li>
<MOSTY.Empty :show="!loading && warningList.length <= 0" :imgSize="150"></MOSTY.Empty> <MOSTY.Empty :show="props.data.length <= 0" :imgSize="150"></MOSTY.Empty>
</ul> </ul>
</DialogDragger> </DialogDragger>
</template> </template>
@ -12,46 +12,34 @@
import * as MOSTY from "@/components/MyComponents/index"; import * as MOSTY from "@/components/MyComponents/index";
import DialogDragger from "@/views/home/layout/dialogDragger.vue"; import DialogDragger from "@/views/home/layout/dialogDragger.vue";
import YjItem from "@/views/home/components/yjItem.vue"; import YjItem from "@/views/home/components/yjItem.vue";
import { ref, onMounted, getCurrentInstance, defineProps, watch } from "vue"; import { ref, defineProps } from "vue";
import emitter from "@/utils/eventBus.js"; import emitter from "@/utils/eventBus.js";
const { proxy } = getCurrentInstance();
const warningList = ref([]); //预警列表数据
const pageCurrent = ref(1);
const gjyjList = ref(null); //预警列表数据 const gjyjList = ref(null); //预警列表数据
const loading = ref(false);
//参数传递 //参数传递
const props = defineProps({ const props = defineProps({
//某条预警详情 //某条预警详情
data: { data: {
type:Object, type:Array,
default:{} default:[]
}, },
show: { show: {
type:Boolean, type:Boolean,
default:false default:false
}, },
//标题数据
title: String
}); });
onMounted(() => {
});
// 监听视频地址变化
watch(() => props.data,(val) => {
pageCurrent.value = 1;
},{ immediate: true, deep: true });
//关闭 //关闭
function close() { function close() {
emitter.emit('deletePointArea','home_yj_map'); emitter.emit('deletePointArea','home_yj_map');
emitter.emit("showHomeYJ",false); emitter.emit("showHomeYJ",false);
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/css/homeScreen.scss"; @import "@/assets/css/homeScreen.scss";
.dialogBox { .dialogBox {
z-index: 999;
ul.warningList{ ul.warningList{
height: calc(100vh - 198px); height: calc(100vh - 198px);
overflow: hidden; overflow: hidden;

View File

@ -1,12 +1,11 @@
<template> <template>
<div class="noScollLine"> <div class="noScollLine">
<!-- 预警信息弹框 --> <!-- 预警信息弹框 -->
<Home_YJ v-if="isShow.showYj" :show="isShow.showYj" :data="list.yjxqInfo" /> <Home_YJ v-if="isShow.showYj" :show="isShow.showYj" :data="list.Info_YJ" />
</div> </div>
</template> </template>
<script setup> <script setup>
import { qcckPost, qcckGet } from "@/api/qcckApi.js";
import emitter from "@/utils/eventBus.js"; import emitter from "@/utils/eventBus.js";
import Home_YJ from "./components/home_yj.vue"; import Home_YJ from "./components/home_yj.vue";
import { ref, onMounted, onUnmounted, reactive, getCurrentInstance } from "vue"; import { ref, onMounted, onUnmounted, reactive, getCurrentInstance } from "vue";
@ -22,8 +21,7 @@ onMounted(() => {
// 展示预警 // 展示预警
emitter.on("showHomeYJ", (res) => { emitter.on("showHomeYJ", (res) => {
isShow.value.showYj = res ? true : false; isShow.value.showYj = res ? true : false;
console.log(res,'===='); if (res) list.Info_YJ = res;
// if (res) list.Info_YJ = res;
}); });
}); });
onUnmounted(() => { onUnmounted(() => {

View File

@ -30,11 +30,11 @@
</div> </div>
<!-- 左边弹窗 --> <!-- 左边弹窗 -->
<!-- <LeftDialog></LeftDialog> --> <LeftDialog></LeftDialog>
</template> </template>
<script setup> <script setup>
// import LeftDialog from './dialog/leftDialog' import LeftDialog from './dialog/leftDialog'
import GdMap from "@/components/GdMap/index.vue"; import GdMap from "@/components/GdMap/index.vue";
import Head from './layout/head.vue' import Head from './layout/head.vue'
import DbCount from './model/dbCount.vue' import DbCount from './model/dbCount.vue'

View File

@ -72,8 +72,8 @@ const getList = () =>{
} }
const chooseItem = (item) =>{ const chooseItem = (item) =>{
emitter.emit('showHomeYJ',[item]);
emitter.emit('deletePointArea','home_yj_map'); emitter.emit('deletePointArea','home_yj_map');
console.log(item.jd,item.wd);
if(!item.jd || !item.jd) return proxy.$message({ type: "warning", message: "该预警没有坐标!" }); if(!item.jd || !item.jd) return proxy.$message({ type: "warning", message: "该预警没有坐标!" });
let icon = require('@/assets/point/yj.png'); let icon = require('@/assets/point/yj.png');
if(item.yjjb == '20') icon = require('@/assets/point/yj1.png'); if(item.yjjb == '20') icon = require('@/assets/point/yj1.png');
@ -94,6 +94,7 @@ const chooseItem = (item) =>{
@import "@/assets/css/homeScreen.scss"; @import "@/assets/css/homeScreen.scss";
.zdryBox{ .zdryBox{
background: #052249; background: #052249;
height: 100%;
.ryBox{ .ryBox{
height: calc(100% - 33px); height: calc(100% - 33px);
overflow: hidden; overflow: hidden;