feat: 增加红色名字
This commit is contained in:
@ -106,3 +106,10 @@ export const useStatistics = (data) => {
|
||||
data
|
||||
});
|
||||
};
|
||||
/** 获取是否红色名字,市情指领导、优秀信息员、优秀研判名字要变橙红色 */
|
||||
export const getUserIsRed = () => {
|
||||
return request({
|
||||
url: '/mosty-api/mosty-gsxt' + "/xxcj/mjjf/sfgxys",
|
||||
method: "GET"
|
||||
});
|
||||
};
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
<div class="flex align-center">
|
||||
<img class="mr10" src="@/assets/images/icon_046.png" alt="" />
|
||||
<div class="f14">
|
||||
<div style="color:#0BB7FF">{{ userName }}</div>
|
||||
<div :style="{color:isRed ? '#ff5500' : '#fff',fontWeight:isRed ? 'bold' : 'normal'}">{{ userName }}</div>
|
||||
<div>{{ dept }}</div>
|
||||
</div>
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
优秀信息员
|
||||
</div>
|
||||
<div class="tab-button" :class="{ active: activeTab === 'ypy' }" @click="switchTab('ypy')">
|
||||
优秀研判的列表
|
||||
优秀研判
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user