This commit is contained in:
lcw
2025-08-01 17:16:03 +08:00
parent 42e9bd894c
commit 2b06febd8e
18 changed files with 1615 additions and 369 deletions

View File

@ -0,0 +1,131 @@
<template>
<div class="warning-card ">
<div class="warning-info warning-boder pb5">
<div class="mt4 two_text_detail">{{ item[nameData.title] }}</div>
</div>
<!-- 态势研判预警 -->
<div class="warning-info pt5 pb5 flex align-center just-between" v-if="lx == 1">
<div class="mt4 two_text_detail flex align-center">预警类别
<DictTag :tag="false" :value="item.ypLx" color="#fff" :options="dict.D_SG_TSYPGZ" />
</div>
<div class="mt4 two_text_detail">预警次数{{ item.num }}</div>
</div>
<!-- 群体预警 -->
<div class="warning-info pt5 pb5 flex align-center just-between" v-if="lx == 2">
<div class="mt4 two_text_detail flex align-center">群体类别
<DictTag :tag="false" :value="item.qtlb" color="#fff" :options="dict.D_GS_ZDQT_LB" />
</div>
<div class="mt4 two_text_detail flex align-center">风险等级
<DictTag :tag="false" :value="item.yjJb" color="#fff" :options="dict.D_BZ_TYJB" />
</div>
</div>
<!-- 经验分享 -->
<div class="warning-info pt5 pb5 flex align-center just-between" v-if="lx == 3">
<div class="mt4 two_text_detail">经验发布人{{ item.fbr }}</div>
</div>
<div class="warning-info pt5 pb5 warning-boder" v-if="lx == 1 || lx == 2">
<div class="mt4 two_text_detail">预警时间{{ item.yjsj }}</div>
</div>
<div class="warning-info pt5 pb5 warning-boder" v-if="lx == 3">
<div class="mt4 two_text_detail">经验内容{{ item.fbnr }}</div>
</div>
</div>
</template>
<script setup>
import { IdCard } from '@/utils/validate.js'
import { reactive, ref, watch } from "vue";
const props = defineProps({
item: {
type: Object,
default: {}
}, dict: {
tupe: Object,
default: {}
},
lx: {
type: Number,
default: 1
}
});
let nameData = ref({
title: "ypMc",
lbNoe: "预警类别:",
})
watch(() => props.lx, (val) => {
switch (val) {
case 1:
nameData.value = { title: 'ypMc' }
break;
case 2:
nameData.value = { title: 'qtMc' }
case 3:
nameData.value = { title: 'qtMc' }
break;
}
}, { immediate: true })
</script>
<style lang="scss" scoped>
.warning-card {
background: url("~@/assets/images/xxxxxx.png") no-repeat center center;
background-size: 100% 100%;
gap: 12px;
margin-bottom: 4px;
padding: 10px;
box-sizing: border-box;
.warning-image {
//
// width: 80px;
// height: 100px;
// img {
// width: 100%;
// height: 100%;
// object-fit: cover;
// }
}
.warning-info {
flex: 1;
.tag {
padding: 1px 6px;
background: #0072FF;
border-radius: 2px 2px 2px 2px;
font-size: 12px;
}
.gapline {
width: 2px;
height: 14px;
background: #e9e9e9;
}
}
.warning-boder {
border-bottom: 2px dashed #0958b2;
}
}
.red {
background: url("~@/assets/images/GroupRed.png") no-repeat center center;
background-size: 100% 100%;
}
.orange {
background: url("~@/assets/images/GroupOrange.png") no-repeat center center;
background-size: 100% 100%;
}
.yellow {
background: url("~@/assets/images/GroupYellow.png") no-repeat center center;
background-size: 100% 100%;
}
.blue {
background: url("~@/assets/images/GroupBlue.png") no-repeat center center;
background-size: 100% 100%;
}
</style>

View File

@ -0,0 +1,125 @@
<template>
<div class="warning-card ">
<div class="warning-image flex">
<img :src="item.yjTp" width="65" height="70" />
<div class="ml10 warning-info">
<div class="flex just-between align-center">
<div class="flex align-center mt4" v-if="item.yjLx == 2">
<span >{{ item.yjClcph }}</span>
</div>
<div class="flex align-center mt4" v-else>
<span>{{ item.yjRyxm }}</span>
<span class="gapline mr10 ml10"></span>
<span>{{ IdCard(item.yjRysfzh, 2) }}</span>
<span class="gapline mr10 ml10"></span>
<span>{{ IdCard(item.yjRysfzh, 3) }}</span>
</div>
<span class="tag" v-if="item.yjbqmc">{{ item.yjbqmc }}</span>
</div>
<div v-if="item.yjLx == 2" class="flex">车牌类型
<DictTag :tag="false" :value="item.yjHplx" color="#fff" :options="dict.D_BZ_HPZL"/>
</div>
<div class="mt4" v-else>身份证{{ item.yjRysfzh }}</div>
<div class="mt4 two_text_detail">预警时间{{ item.yjSj }}</div>
</div>
</div>
<div class="warning-info warning-boder pb5">
<div class="mt4 two_text_detail">预警内容{{ item.yjNr }}</div>
</div>
<div class="warning-info pt5 pb5 warning-boder">
<div class="mt4 two_text_detail">处置结果{{ item.yjNr }}</div>
</div>
<div class="warning-info pt5 ">
<div class="two_text_detail flex lh25"><img src="@/assets/images/ddtb.png" width="20" height="25" alt="" srcset="">{{ item.yjNr }}</div>
</div>
</div>
</template>
<script setup>
import { IdCard } from '@/utils/validate.js'
import { reactive, ref } from "vue";
const props = defineProps({
item: {
type: Object,
default: {}
}, dict: {
tupe: Object,
default: {}
}
});
const changeBG = (str) => {
switch (str) {
case "10":
return "red";
case "20":
return "orange";
case "30":
return "yellow";
default: return "blue";
}
};
</script>
<style lang="scss" scoped>
.warning-card {
background: url("~@/assets/images/xxxxxx.png") no-repeat center center;
background-size: 100% 100%;
gap: 12px;
margin-bottom: 4px;
padding: 10px;
box-sizing: border-box;
.warning-image {
//
// width: 80px;
// height: 100px;
// img {
// width: 100%;
// height: 100%;
// object-fit: cover;
// }
}
.warning-info {
flex: 1;
.tag {
padding: 1px 6px;
background: #0072FF;
border-radius: 2px 2px 2px 2px;
font-size: 12px;
}
.gapline {
width: 2px;
height: 14px;
background: #e9e9e9;
}
}
.warning-boder{
border-bottom: 2px dashed #0958b2;
}
}
.red {
background: url("~@/assets/images/GroupRed.png") no-repeat center center;
background-size: 100% 100%;
}
.orange {
background: url("~@/assets/images/GroupOrange.png") no-repeat center center;
background-size: 100% 100%;
}
.yellow {
background: url("~@/assets/images/GroupYellow.png") no-repeat center center;
background-size: 100% 100%;
}
.blue {
background: url("~@/assets/images/GroupBlue.png") no-repeat center center;
background-size: 100% 100%;
}
</style>

View File

@ -5,16 +5,24 @@
</div>
<div class="warning-info">
<div class="flex just-between align-center">
<div class="flex align-center mt4">
<span>{{ item.yjRyxm }}</span>
<span class="gapline mr10 ml10"></span>
<span>{{ IdCard(item.yjRysfzh,2) }}</span>
<span class="gapline mr10 ml10"></span>
<span>{{ IdCard(item.yjRysfzh,3) }}</span>
</div>
<div class="flex align-center mt4" v-if="item.yjLx == 2">
<span >{{ item.yjClcph }}</span>
</div>
<div class="flex align-center mt4" v-else>
<span>{{ item.yjRyxm }}</span>
<span class="gapline mr10 ml10"></span>
<span>{{ IdCard(item.yjRysfzh, 2) }}</span>
<span class="gapline mr10 ml10"></span>
<span>{{ IdCard(item.yjRysfzh, 3) }}</span>
</div>
<span class="tag" v-if="item.yjbqmc">{{ item.yjbqmc }}</span>
</div>
<div class="mt4">身份证{{ item.yjRysfzh }}</div>
<div v-if="item.yjLx == 2" class="flex">车牌类型
<DictTag :tag="false" :value="item.yjHplx" color="#fff" :options="dict.D_BZ_HPZL"/>
</div>
<div class="mt4" v-else>身份证{{ item.yjRysfzh }}</div>
<div class="mt4 two_text_detail">预警时间{{ item.yjSj }}</div>
<div class="mt4 one_text_detail">预警地址{{ item.yjDz }}</div>
<div class="mt4 two_text_detail">预警内容{{ item.yjNr }}</div>
</div>
@ -28,19 +36,22 @@ const props = defineProps({
item: {
type: Object,
default: {}
}, dict: {
tupe: Object,
default: {}
}
});
const changeBG = (str) => {
switch(str){
case "10":
return "red";
case "20":
return "orange";
case "30":
return "yellow";
default: return "blue";
}
switch (str) {
case "10":
return "red";
case "20":
return "orange";
case "30":
return "yellow";
default: return "blue";
}
};
</script>
@ -52,31 +63,36 @@ const changeBG = (str) => {
margin-bottom: 4px;
padding: 10px;
box-sizing: border-box;
.warning-image {
width: 80px;
height: 100px;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
.warning-info {
flex: 1;
.tag {
padding: 1px 6px;
background: #0072FF;
border-radius: 2px 2px 2px 2px;
font-size: 12px;
}
.warning-info {
flex: 1;
.tag{
padding: 1px 6px;
background: #0072FF;
border-radius: 2px 2px 2px 2px;
font-size: 12px;
}
.gapline{
width: 2px;
height: 14px;
background: #e9e9e9;
}
.gapline {
width: 2px;
height: 14px;
background: #e9e9e9;
}
}
}
.red {
background: url("~@/assets/images/GroupRed.png") no-repeat center center;
background-size: 100% 100%;
@ -86,13 +102,14 @@ const changeBG = (str) => {
background: url("~@/assets/images/GroupOrange.png") no-repeat center center;
background-size: 100% 100%;
}
.yellow {
background: url("~@/assets/images/GroupYellow.png") no-repeat center center;
background-size: 100% 100%;
}
.blue {
background: url("~@/assets/images/GroupBlue.png") no-repeat center center;
background-size: 100% 100%;
}
</style>