2025-04-12 14:54:02 +08:00
|
|
|
<template>
|
2025-04-15 14:38:12 +08:00
|
|
|
<div class="headBox">
|
2025-09-20 19:55:19 +08:00
|
|
|
<FlowLine></FlowLine>
|
2025-04-15 18:22:42 +08:00
|
|
|
<div class="headBoxBg">
|
|
|
|
|
<!-- 左边 -->
|
2025-11-22 21:59:58 +08:00
|
|
|
<el-popover width="480px" :visible="isShowVisble" :append-to-body="true" trigger="click"
|
|
|
|
|
popper-class="bszdr-tq-Popover">
|
2025-04-15 18:22:42 +08:00
|
|
|
<template #reference>
|
2025-11-22 21:59:58 +08:00
|
|
|
<ul class="topBtn topBtn-left flex" ref="btnRefs" v-if="wekendays && wekendays.length > 0"
|
|
|
|
|
@click="openWinter">
|
|
|
|
|
<li class="flex align-center pointer mr10">
|
2025-04-15 18:22:42 +08:00
|
|
|
<img class="mr10" :src="showIcon(wekendays[0].dqtq)" alt="" />
|
|
|
|
|
<div class="">
|
|
|
|
|
<div class="f15 text">{{ wekendays[0].dqtq }}</div>
|
|
|
|
|
<div class="tests">{{ wekendays[0].fx }}</div>
|
2025-04-15 14:38:12 +08:00
|
|
|
</div>
|
2025-04-15 18:22:42 +08:00
|
|
|
</li>
|
2025-11-22 21:59:58 +08:00
|
|
|
<li class="flex align-center mr10 ml10 pointer">
|
2025-04-15 18:22:42 +08:00
|
|
|
<img class="mr10" :src="icon3" alt="" />
|
|
|
|
|
<div>
|
|
|
|
|
<div class="f16 text">{{ wekendays[0].dqwd }}°C</div>
|
|
|
|
|
<div class="tests">
|
|
|
|
|
{{ wekendays[0].btwd }}°~{{ wekendays[0].yjwd }}°
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
2025-11-22 21:59:58 +08:00
|
|
|
<li class="flex align-center pointer relative">
|
|
|
|
|
<span class="tqCount" v-if="wekendays[0].list.length > 0">{{ wekendays[0].list.length }}</span>
|
|
|
|
|
<img v-if="wekendays[0].list.length > 0" width="34" height="34" class="mr10"
|
|
|
|
|
src="@/assets/images/icon_066.gif" alt="" />
|
|
|
|
|
<img v-else class="mr10" src="@/assets/images/icon_057.png" alt="" />
|
2025-04-15 18:22:42 +08:00
|
|
|
<div>
|
|
|
|
|
<div class="f16 text"> {{ hour + ":" + minute + ":" + second }}</div>
|
|
|
|
|
<div class="tests">{{ weekenday }} {{ datatime }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</template>
|
|
|
|
|
<ul class="tqBox pt10 pl10 pr10">
|
|
|
|
|
<li class="tqItem flex align-center pointer mt10 bth">
|
|
|
|
|
<div class="ml43 tc" style="width: 100px">温度</div>
|
|
|
|
|
<div class="tc" style="width: 80px">天气</div>
|
|
|
|
|
<div class="tc" style="width: 100px">风向</div>
|
|
|
|
|
<div class="tc" style="width: 80px">风速</div>
|
|
|
|
|
<div class="tc" style="width: 100px">日期</div>
|
2025-04-15 14:38:12 +08:00
|
|
|
</li>
|
2025-11-22 21:59:58 +08:00
|
|
|
<li class="tqItem relative flex align-center pointer mb8" v-for="(iv, idx) in wekendays" :key="idx">
|
|
|
|
|
<span class="Count" v-if="iv.list.length > 0">{{ iv.list.length }}</span>
|
2025-04-15 18:22:42 +08:00
|
|
|
<img class="mr10" :src="showIcon(iv.dqtq)" alt="" />
|
|
|
|
|
<div class="tc" style="width: 100px"> {{ iv.btwd }}° ~ {{ iv.yjwd }}° </div>
|
|
|
|
|
<div class="tc" style="width: 80px">晴</div>
|
|
|
|
|
<div class="tc" style="width: 100px">{{ iv.fx }}</div>
|
|
|
|
|
<div class="tc" style="width: 80px">微风</div>
|
|
|
|
|
<div class="tc" style="width: 100px">{{ iv.tqrq.slice(0, 11) }}</div>
|
2025-04-15 14:38:12 +08:00
|
|
|
</li>
|
|
|
|
|
</ul>
|
2025-04-15 18:22:42 +08:00
|
|
|
</el-popover>
|
2025-05-26 21:03:06 +08:00
|
|
|
|
2025-04-24 11:54:38 +08:00
|
|
|
<ul class="leftBtn-yjbtn flex">
|
2025-11-22 21:59:58 +08:00
|
|
|
<li class="leftBtn-item pointer" @click.stop="handleBtns(it)" :class="btnsActive == it ? 'yjbtnActive' : ''"
|
|
|
|
|
v-for="it in btns.leftBtn" :key="it">
|
2025-04-24 11:54:38 +08:00
|
|
|
<span class="btms">{{ it }}</span>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
2025-11-22 21:59:58 +08:00
|
|
|
<div class="top-center pointer" @click="handleBtns('后台')">{{ props.title }}</div>
|
2025-04-15 18:22:42 +08:00
|
|
|
<!-- 右边 -->
|
2025-11-22 21:59:58 +08:00
|
|
|
<ul class="topBtn topBtn-right" v-if="!props.type">
|
|
|
|
|
<li class="topBtn-item" @click.stop="handleBtns(it)" :class="btnsActive == it ? 'active-topBtn' : ''"
|
|
|
|
|
v-for="it in btns.rightBtn" :key="it">
|
2025-04-15 18:22:42 +08:00
|
|
|
<span>{{ it }}</span>
|
2025-04-15 14:38:12 +08:00
|
|
|
</li>
|
|
|
|
|
</ul>
|
2025-04-15 18:22:42 +08:00
|
|
|
<!-- 右边icon -->
|
|
|
|
|
<ul class="rightIcon">
|
|
|
|
|
<div class="flex align-center">
|
|
|
|
|
<img class="mr10" src="@/assets/images/icon_046.png" alt="" />
|
2026-01-16 12:40:42 +08:00
|
|
|
<div class="f14 user-info">
|
2025-12-17 10:15:10 +08:00
|
|
|
<div :style="{color:isRed ? '#ff5500' : '#fff',fontWeight:isRed ? 'bold' : 'normal'}">{{ userName }}</div>
|
2026-01-16 12:40:42 +08:00
|
|
|
<div class="dept-text" :title="dept">{{ dept }}</div>
|
2025-04-15 18:22:42 +08:00
|
|
|
</div>
|
2025-05-26 21:03:06 +08:00
|
|
|
|
2025-11-22 21:59:58 +08:00
|
|
|
<el-popover popper-class="zdy-meuns-popover" placement="bottom" width="400" :append-to-body="true"
|
|
|
|
|
v-model:visible="showMore" trigger="click">
|
2025-04-15 18:22:42 +08:00
|
|
|
<template #reference>
|
2025-11-22 21:59:58 +08:00
|
|
|
<span @click="showMore = !showMore" class="ml10 mr10"><img style="width:10px"
|
|
|
|
|
src="@/assets/images/Polygon_right.png" alt=""></span>
|
2025-04-15 18:22:42 +08:00
|
|
|
</template>
|
2025-11-22 21:59:58 +08:00
|
|
|
<div class="settingItem" @click.stop="handleBtns(iv.name)" v-for="iv in btns.moreBtn" :key="iv.name">
|
|
|
|
|
<!-- <el-icon color="#fff" style="top:2px;">
|
|
|
|
|
<Notification />
|
|
|
|
|
</el-icon> -->
|
|
|
|
|
<i class="ml10" style="color: #fff;">{{ iv.name }}</i>
|
2025-04-15 18:22:42 +08:00
|
|
|
</div>
|
|
|
|
|
</el-popover>
|
2025-11-22 21:59:58 +08:00
|
|
|
|
|
|
|
|
<!-- <img class="mr10" src="@/assets/images/Group427322485.png" style="width: 100px" alt="" />
|
|
|
|
|
<img class="mr10" src="@/assets/images/Group427322486.png" style="width: 100px" alt="" /> -->
|
|
|
|
|
<!-- <span class="ml10 mr10"><img @click.stop="handleBtns('后台')" src="@/assets/images/meun.png" alt=""></span> -->
|
2025-04-15 14:38:12 +08:00
|
|
|
</div>
|
2025-04-15 18:22:42 +08:00
|
|
|
</ul>
|
|
|
|
|
</div>
|
2025-10-09 21:33:58 +08:00
|
|
|
|
2025-04-12 14:54:02 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2026-02-04 11:50:44 +08:00
|
|
|
import { qcckGet } from "@/api/qcckApi.js"
|
2025-09-20 18:36:44 +08:00
|
|
|
import FlowLine from './flowLine.vue'
|
2025-07-14 18:18:21 +08:00
|
|
|
import { getItem } from "@/utils/storage";
|
2025-04-15 14:38:12 +08:00
|
|
|
import { timeValidate, weekValidate } from "@/utils/tools.js";
|
|
|
|
|
import { useRouter, useRoute, onBeforeRouteLeave } from "vue-router";
|
|
|
|
|
import { useStore } from "vuex";
|
2025-12-17 10:15:10 +08:00
|
|
|
import { getUserIsRed } from "@/api/sys.js"
|
2025-04-15 14:38:12 +08:00
|
|
|
const icon1 = require("@/assets/images/icon_048.png"); //晴天
|
|
|
|
|
const icon2 = require("@/assets/images/icon_049.png"); //小雨
|
|
|
|
|
const icon3 = require("@/assets/images/icon_050.png"); //高温
|
|
|
|
|
const icon4 = require("@/assets/images/icon_052.png"); //中雨
|
|
|
|
|
const icon5 = require("@/assets/images/icon_053.png"); //大雨
|
|
|
|
|
const icon6 = require("@/assets/images/icon_054.png"); //雷阵雨
|
|
|
|
|
const icon7 = require("@/assets/images/icon_055.png"); //多云转晴 - 阴天
|
|
|
|
|
const icon8 = require("@/assets/images/icon_056.png"); //多云
|
2025-11-22 21:59:58 +08:00
|
|
|
import { ref, onMounted, defineEmits, defineProps, onUnmounted, reactive, watch } from "vue";
|
|
|
|
|
const userName = getItem("USERNAME");
|
2025-12-17 10:15:10 +08:00
|
|
|
/** 是否红色名字 市情指领导、优秀信息员、优秀研判名字要变橙红色*/
|
|
|
|
|
const isRed = ref(false)
|
2025-11-22 21:59:58 +08:00
|
|
|
const dept = getItem("deptId") ? getItem("deptId")[0].deptName : '';
|
2025-04-15 14:38:12 +08:00
|
|
|
const props = defineProps({
|
|
|
|
|
title: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: "林芝哨岗系统"
|
|
|
|
|
},
|
2025-11-22 21:59:58 +08:00
|
|
|
type: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: ''
|
2025-04-15 18:22:42 +08:00
|
|
|
}
|
2025-04-15 14:38:12 +08:00
|
|
|
});
|
|
|
|
|
const wekendays = ref([
|
2025-11-22 21:59:58 +08:00
|
|
|
{ dqtq: '晴', fx: '北', dqwd: '30', btwd: '10', yjwd: '20', tqrq: '2022-10-10', list: [] },
|
|
|
|
|
{ dqtq: '晴', fx: '北', dqwd: '30', btwd: '10', yjwd: '20', tqrq: '2022-10-10', list: [] },
|
|
|
|
|
{ dqtq: '晴', fx: '北', dqwd: '30', btwd: '10', yjwd: '20', tqrq: '2022-10-10', list: [] },
|
2025-04-15 14:38:12 +08:00
|
|
|
]);
|
|
|
|
|
const isShowVisble = ref(false);
|
|
|
|
|
const store = useStore();
|
2025-04-12 14:54:02 +08:00
|
|
|
const router = useRouter();
|
2025-04-15 14:38:12 +08:00
|
|
|
const btns = reactive({
|
2025-12-25 10:35:00 +08:00
|
|
|
rightBtn: ["实战支撑", "安全监控"],
|
2025-12-18 18:44:20 +08:00
|
|
|
leftBtn: ["数据整合", '分析研判'],
|
2025-11-22 21:59:58 +08:00
|
|
|
moreBtn: [
|
|
|
|
|
{ name: '后台', img: require('@/assets/images/Group427322486.png') },
|
2026-02-04 11:50:44 +08:00
|
|
|
{ name: '权限申请', img: require('@/assets/images/Group427322486.png') },
|
|
|
|
|
{ name: '退出登录', img: require('@/assets/images/Group427322485.png') }
|
|
|
|
|
]
|
2025-04-15 14:38:12 +08:00
|
|
|
});
|
|
|
|
|
const btnsActive = ref("");
|
|
|
|
|
const showMore = ref(false); //更多
|
|
|
|
|
const day = ref(0);
|
|
|
|
|
const minute = ref("00"); //分
|
|
|
|
|
const second = ref("00"); //秒
|
|
|
|
|
const hour = ref("00"); //时
|
|
|
|
|
const weekenday = weekValidate(); //星期几
|
|
|
|
|
const datatime = ref(timeValidate(null, "ymd"));
|
|
|
|
|
const timersfm = ref(null);
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
// getWheather();
|
2025-12-17 10:15:10 +08:00
|
|
|
getIsRed()
|
2025-04-15 14:38:12 +08:00
|
|
|
timersfm.value = setInterval(() => {
|
|
|
|
|
CurrentTime();
|
|
|
|
|
}, 1000);
|
|
|
|
|
});
|
2025-12-17 10:15:10 +08:00
|
|
|
/** 获取名字是否标红 */
|
|
|
|
|
function getIsRed() {
|
|
|
|
|
getUserIsRed().then(res=>{
|
|
|
|
|
isRed.value = res === true
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-04-15 14:38:12 +08:00
|
|
|
// 按钮切换
|
|
|
|
|
const handleBtns = (val) => {
|
2025-10-26 12:25:50 +08:00
|
|
|
btnsActive.value = val;
|
2025-04-15 14:38:12 +08:00
|
|
|
switch (val) {
|
2025-12-18 18:44:20 +08:00
|
|
|
case "数据整合":
|
2026-01-28 16:56:02 +08:00
|
|
|
router.push("/mpvPeo");
|
2025-04-15 18:22:42 +08:00
|
|
|
break;
|
2026-01-28 16:56:02 +08:00
|
|
|
case "实战支撑":
|
2025-12-18 18:44:20 +08:00
|
|
|
router.push("/InfoCollection");
|
2025-04-15 18:22:42 +08:00
|
|
|
break;
|
2025-12-18 18:44:20 +08:00
|
|
|
case "分析研判":
|
2025-05-19 15:50:38 +08:00
|
|
|
router.push("/ResearchHome");
|
2025-04-24 11:54:38 +08:00
|
|
|
break;
|
2025-04-15 18:22:42 +08:00
|
|
|
case "后台":
|
2026-01-23 16:10:54 +08:00
|
|
|
router.push("/YjData");
|
2025-04-15 18:22:42 +08:00
|
|
|
break;
|
2025-12-18 18:44:20 +08:00
|
|
|
case "安全监控":
|
2026-01-23 16:10:54 +08:00
|
|
|
router.push("/resourceMonitoring");
|
2025-04-15 18:22:42 +08:00
|
|
|
break;
|
|
|
|
|
case "退出登录":
|
2025-10-26 12:25:50 +08:00
|
|
|
store.dispatch("user/logout");
|
2025-04-15 18:22:42 +08:00
|
|
|
break;
|
2026-02-04 11:50:44 +08:00
|
|
|
case "权限申请":
|
|
|
|
|
router.push("/permissionApply");
|
|
|
|
|
break;
|
2025-04-15 14:38:12 +08:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2025-04-15 18:22:42 +08:00
|
|
|
|
2025-04-15 14:38:12 +08:00
|
|
|
function openWinter() {
|
|
|
|
|
isShowVisble.value = !isShowVisble.value;
|
|
|
|
|
// if (!isShowVisble.value) emitter.emit("deletePointArea", "tq_xfq");
|
|
|
|
|
}
|
|
|
|
|
function showIcon(val) {
|
|
|
|
|
switch (val) {
|
|
|
|
|
case "晴":
|
|
|
|
|
return icon1;
|
|
|
|
|
case "小雨":
|
|
|
|
|
return icon2;
|
|
|
|
|
case "中雨":
|
|
|
|
|
return icon4;
|
|
|
|
|
case "大雨":
|
|
|
|
|
return icon5;
|
|
|
|
|
case "雷阵雨":
|
|
|
|
|
return icon6;
|
|
|
|
|
case "多云":
|
|
|
|
|
return icon8;
|
|
|
|
|
case "阴":
|
|
|
|
|
return icon7;
|
|
|
|
|
// ------------------------------//
|
|
|
|
|
case "冻雨":
|
|
|
|
|
return icon6;
|
|
|
|
|
case "雾":
|
|
|
|
|
return icon6;
|
|
|
|
|
case "冰雹":
|
|
|
|
|
return icon6;
|
|
|
|
|
case "大到暴雪":
|
|
|
|
|
return icon6;
|
|
|
|
|
case "中雪":
|
|
|
|
|
return icon6;
|
|
|
|
|
case "小雪":
|
|
|
|
|
return icon6;
|
|
|
|
|
case "大到暴雨":
|
|
|
|
|
return icon6;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取时分秒
|
|
|
|
|
function CurrentTime() {
|
|
|
|
|
const date = new Date();
|
|
|
|
|
hour.value = date.getHours();
|
|
|
|
|
minute.value = date.getMinutes();
|
|
|
|
|
second.value = date.getSeconds();
|
|
|
|
|
day.value = day.value < 10 ? "0" + day.value : day.value;
|
|
|
|
|
hour.value = hour.value < 10 ? "0" + hour.value : hour.value;
|
|
|
|
|
minute.value = minute.value < 10 ? "0" + minute.value : minute.value;
|
|
|
|
|
second.value = second.value < 10 ? "0" + second.value : second.value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取天气
|
|
|
|
|
function getWheather() {
|
|
|
|
|
// qcckGet({}, "/mosty-base/weather/getTbWeatherSeven").then((res) => {
|
|
|
|
|
// wekendays.value = res || [];
|
|
|
|
|
// });
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-15 18:22:42 +08:00
|
|
|
|
2025-04-15 14:38:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
|
clearInterval(timersfm.value);
|
|
|
|
|
});
|
2025-04-12 14:54:02 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2025-04-15 14:38:12 +08:00
|
|
|
@import "@/assets/css/homeScreen.scss";
|
2025-11-22 21:59:58 +08:00
|
|
|
|
|
|
|
|
.tqItem {
|
2025-04-15 14:38:12 +08:00
|
|
|
color: #fff;
|
|
|
|
|
}
|
2026-01-16 12:40:42 +08:00
|
|
|
|
|
|
|
|
.user-info {
|
|
|
|
|
width: 150px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dept-text {
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
2025-04-15 14:38:12 +08:00
|
|
|
</style>
|
2025-04-22 16:39:00 +08:00
|
|
|
|
2025-04-15 14:38:12 +08:00
|
|
|
<style lang="scss">
|
|
|
|
|
.zdy-meuns-popover {
|
|
|
|
|
background: url("~@/assets/images/el-popper.png") no-repeat center center !important;
|
|
|
|
|
background-size: 100% 100% !important;
|
|
|
|
|
border: 1px solid transparent !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.zdy-meuns-popover .el-popper__arrow::before {
|
|
|
|
|
background: #0c1850 !important;
|
|
|
|
|
border: 1px solid #224281 !important;
|
|
|
|
|
display: none !important;
|
|
|
|
|
}
|
2025-11-22 21:59:58 +08:00
|
|
|
|
2025-04-15 14:38:12 +08:00
|
|
|
.bszdr-tq-Popover {
|
|
|
|
|
background: url("~@/assets/images/el-popper.png") no-repeat center center !important;
|
|
|
|
|
background-size: 100% 100% !important;
|
|
|
|
|
border: 1px solid transparent !important;
|
2025-11-22 21:59:58 +08:00
|
|
|
|
2025-04-15 14:38:12 +08:00
|
|
|
&[data-popper-placement^="bottom"] .el-popper__arrow::before {
|
|
|
|
|
border: none !important;
|
|
|
|
|
background: transparent !important;
|
2025-04-12 14:54:02 +08:00
|
|
|
}
|
|
|
|
|
}
|
2025-09-20 18:36:44 +08:00
|
|
|
|
2025-11-22 21:59:58 +08:00
|
|
|
.settingItem {
|
|
|
|
|
line-height: 22px;
|
|
|
|
|
padding: 5px;
|
|
|
|
|
border-bottom: 1px solid;
|
|
|
|
|
}
|
2025-04-15 14:38:12 +08:00
|
|
|
</style>
|