145 lines
4.3 KiB
Vue
145 lines
4.3 KiB
Vue
<template>
|
||
<div class="warning-card flex align-center" :class="changeBG(item.yjJb)">
|
||
<div class="warning-image">
|
||
<template v-if="!item.yjTp || item.yjTp.includes('baidu')">
|
||
<img src="@/assets/images/car.png" width="65" height="70" v-if="item.yjLx == 2" />
|
||
<img src="@/assets/images/default_male.png" width="65" height="70" v-else />
|
||
</template>
|
||
<el-image v-else style="width: 80px; height:120px" :src="item.yjTp" :preview-src-list="[item.yjTp]" show-progress>
|
||
<template #error>
|
||
<div class="image-slot error">
|
||
<img src="@/assets/images/car.png" width="65" height="70" v-if="item.yjLx == 2" />
|
||
<img src="@/assets/images/default_male.png" width="65" height="70" v-else />
|
||
</div>
|
||
</template>
|
||
</el-image>
|
||
<!-- <el-image style="width: 80px; height:120px" :src="item.yjTp" :preview-src-list="[item.yjTp]" show-progress>
|
||
<template #error>
|
||
<div class="image-slot error">
|
||
<img src="@/assets/images/car.png" width="65" height="70" v-if="item.yjLx == 2"/>
|
||
<img src="@/assets/images/default_male.png" width="65" height="70" v-else/>
|
||
</div>
|
||
</template>
|
||
</el-image> -->
|
||
<!-- <img :src="item.yjTp" width="80" height="120" alt="" /> -->
|
||
</div>
|
||
<div class="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" :style="{ 'background': `${changeBG(item.yjJb)}` }">{{ 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 class="mt4 one_text_detail">预警地址:{{ item.yjDz }}</div>
|
||
<div class="mt4 two_text_detail">预警内容:{{ item.yjNr }}</div>
|
||
<div class="mt4 two_text_detail">
|
||
<el-button type="primary">全息档案</el-button>
|
||
<el-button color="#ef7762" style="color: #fff;">转合成</el-button>
|
||
<el-button type="warning">转基管</el-button>
|
||
<el-button type="danger">转会商</el-button>
|
||
<el-button type="success">查看反馈</el-button>
|
||
<el-button type="success">轨迹上图</el-button>
|
||
|
||
</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 "#b5b522";
|
||
default: return "blue";
|
||
}
|
||
};
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.warning-card {
|
||
background: url("~@/assets/images/GroupBlue.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;
|
||
}
|
||
}
|
||
}
|
||
|
||
.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>
|