diff --git a/src/api/sys.js b/src/api/sys.js index 1f0ec2e..2f097f2 100644 --- a/src/api/sys.js +++ b/src/api/sys.js @@ -89,7 +89,7 @@ export const bmStatistics = (data) => { }); }; -// 模块排名统计 +// 模块排名统计 export const mkStatistics = (data) => { return request({ url: api + "/monitor/operlog/mkStatistics", @@ -106,3 +106,10 @@ export const useStatistics = (data) => { data }); }; +/** 获取是否红色名字,市情指领导、优秀信息员、优秀研判名字要变橙红色 */ +export const getUserIsRed = () => { + return request({ + url: '/mosty-api/mosty-gsxt' + "/xxcj/mjjf/sfgxys", + method: "GET" + }); +}; diff --git a/src/views/home/layout/head.vue b/src/views/home/layout/head.vue index e143b89..28f6c66 100644 --- a/src/views/home/layout/head.vue +++ b/src/views/home/layout/head.vue @@ -75,7 +75,7 @@
-
{{ userName }}
+
{{ userName }}
{{ dept }}
@@ -110,8 +110,11 @@ import { getItem } from "@/utils/storage"; import { timeValidate, weekValidate } from "@/utils/tools.js"; import { useRouter, useRoute, onBeforeRouteLeave } from "vue-router"; import { useStore } from "vuex"; +import { getUserIsRed } from "@/api/sys.js" import xinxi from "@/assets/images/icon_045.png"; import tool from "@/assets/images/icon_044.png"; + + const icon1 = require("@/assets/images/icon_048.png"); //晴天 const icon2 = require("@/assets/images/icon_049.png"); //小雨 const icon3 = require("@/assets/images/icon_050.png"); //高温 @@ -122,6 +125,8 @@ const icon7 = require("@/assets/images/icon_055.png"); //多云转晴 - 阴天 const icon8 = require("@/assets/images/icon_056.png"); //多云 import { ref, onMounted, defineEmits, defineProps, onUnmounted, reactive, watch } from "vue"; const userName = getItem("USERNAME"); +/** 是否红色名字 市情指领导、优秀信息员、优秀研判名字要变橙红色*/ +const isRed = ref(false) const dept = getItem("deptId") ? getItem("deptId")[0].deptName : ''; const props = defineProps({ title: { @@ -163,12 +168,17 @@ const datatime = ref(timeValidate(null, "ymd")); const timersfm = ref(null); onMounted(() => { // getWheather(); + getIsRed() timersfm.value = setInterval(() => { CurrentTime(); }, 1000); }); - - +/** 获取名字是否标红 */ +function getIsRed() { + getUserIsRed().then(res=>{ + isRed.value = res === true + }) +} // 按钮切换 const handleBtns = (val) => { console.log(val); diff --git a/src/views/home/model/qingBaowbTable.vue b/src/views/home/model/qingBaowbTable.vue index ef83a61..8ad2995 100644 --- a/src/views/home/model/qingBaowbTable.vue +++ b/src/views/home/model/qingBaowbTable.vue @@ -5,7 +5,7 @@ 优秀信息员
- 优秀研判的列表 + 优秀研判