Files
sgxt_web/src/views/home/model/yszs.vue

86 lines
3.0 KiB
Vue
Raw Normal View History

2025-04-15 14:38:12 +08:00
<template>
2025-05-20 16:06:20 +08:00
<div class="ww100 h80 flex just-between align-center pl10 pr10">
2026-01-26 19:54:57 +08:00
<div class="flex align-center" v-for="(item, idx) in contentItem" :key="idx">
2025-04-15 14:38:12 +08:00
<div class="mr10"><img :src="item.icon" alt=""></div>
<div class="vountItem">
2026-02-02 10:33:58 +08:00
<div style="color:#ffffff" class="f16 lh20">{{ item.label }} <span class="pointer" @click="openTc(item.type,'zs')" v-if="item.type == 'yjzs'">{{ item.value }}</span></div>
<div v-if="!item.isChild" class="mt4 f12 pointer" style="color: #ffffff;font-size: 24px;" @click="openTc(item.type,'zs')" >{{ item.value }}</div>
2026-01-26 14:38:32 +08:00
<div v-else class="mt4 flex align-center just-between" style="color: #ffffff;">
2026-01-26 19:54:57 +08:00
<span class="f12" style="color: #ff0000;" @click="openTc(item.type,'wqs')">未签收:{{ item.wqsyj }}</span>
<span class="f12" style="color: #4cf35d;" @click="openTc(item.type,'yfk')">已反馈:{{ item.yfkyj }}</span>
2026-01-26 14:38:32 +08:00
</div>
2025-04-15 14:38:12 +08:00
</div>
</div>
</div>
2025-12-26 09:39:22 +08:00
<PoliceReports v-model="openJqzs"/>
2026-01-26 19:54:57 +08:00
<NumberWarnings v-model="openYjzs" :type="yjType" />
2025-12-26 09:39:22 +08:00
<keyPerson v-model="openZdry"/>
<keyGroups v-model="openZdqt"/>
2025-04-15 14:38:12 +08:00
</template>
<script setup>
2025-07-14 10:09:55 +08:00
import { qcckPost } from "@/api/qcckApi.js";
2026-01-26 19:54:57 +08:00
import { ref, onMounted, reactive } from "vue";
2025-12-26 09:39:22 +08:00
import PoliceReports from '@/views/home/components/policeReports.vue'
import NumberWarnings from '@/views/home/components/numberWarnings.vue'
import keyPerson from "@/views/home/components/keyPerson.vue";
import keyGroups from "@/views/home/components/keyGroups.vue";
2026-01-26 19:54:57 +08:00
const contentItem = reactive([
2025-12-27 11:10:31 +08:00
{ type:"jqzs", label: "今日警情", value: "0" ,icon:require('@/assets/images/top-1.png')},
2026-01-26 19:54:57 +08:00
{ type:"yjzs", label: "今日预警", value: "0",wqsyj:"0",yfkyj:"0",isChild:true,icon:require('@/assets/images/top-2.png') },
2025-11-22 21:59:58 +08:00
{ type:"zdry", label: "重点人员总数", value: "0",icon:require('@/assets/images/top-3.png') },
{ type:"zdqt", label: "重点群体总数", value: "0" ,icon:require('@/assets/images/top-4.png')},
2025-04-15 14:38:12 +08:00
]);
2025-07-14 10:09:55 +08:00
onMounted(() => {
getCount()
});
const getCount = () =>{
qcckPost({},'/mosty-gsxt/qbcj/getXscjTjForZs').then(res=>{
for(let key in res){
2026-01-26 19:54:57 +08:00
let index = contentItem.findIndex(v=>key == v.type)
if(index != -1) contentItem[index].value = res[key];
if(key == 'wqsyj' || key == 'yfkyj') {
let inx = contentItem.findIndex(v=> v.type == 'yjzs' )
contentItem[inx][key] = res[key];
}
2025-07-14 10:09:55 +08:00
}
})
}
2025-12-26 09:39:22 +08:00
// 打开警情总数
const openJqzs = ref(false)
const openYjzs = ref(false)
const openZdry = ref(false)
const openZdqt = ref(false)
2026-01-26 19:54:57 +08:00
const yjType = ref('')
const openTc = (val,type) => {
2025-12-26 09:39:22 +08:00
switch (val) {
case 'jqzs':
openJqzs.value = true
break;
case 'yjzs':
2026-01-26 19:54:57 +08:00
yjType.value = type
2025-12-26 09:39:22 +08:00
openYjzs.value = true
break;
case 'zdry':
openZdry.value = true
break;
case 'zdqt':
openZdqt.value = true
break;
}
}
2025-04-15 14:38:12 +08:00
</script>
<style lang="scss" scoped>
.vountItem{
width: 128px;
height: 50px;
background: url('~@/assets/images/line.png') no-repeat bottom center;
}
2025-08-01 17:16:03 +08:00
</style>