fix:修改现场大屏标题以及特殊作业echaarts图颜色

This commit is contained in:
Vce 2024-06-25 14:57:54 +08:00
parent 7adf5b84cb
commit 530682cffb
2 changed files with 34 additions and 61 deletions

View File

@ -4,8 +4,8 @@
<div class="largeScreen" ref="dataScreenRef">
<div class="header">
<span class="projectTitle">
<p v-if="COMPANY === 'agjtCommand'">指挥部大屏</p>
<p v-if="COMPANY === 'agjtLive'">现场大屏</p>
<!-- <p v-if="COMPANY === 'agjtLive'">{{'现场大屏'}}</p> -->
<p v-if="COMPANY == 'agjtLive'">{{cbsProjectInfo.projectBuildArea || '现场大屏'}}</p>
</span>
<div class="leftIcon">
<div class="info">数字化项目监管平台</div>
@ -26,10 +26,6 @@
<div class="icon"><img src="@/assets/images/dustNoise/userIcon.png" /></div>
<div class="userName">{{ adminName }}</div>
</div>
<div class="loginOut" @click="jumpBgd">
<div class="loginOutIcon"><img src="@/assets/images/dustNoise/jumpIcon.png" /></div>
<div class="userName">项目后台</div>
</div>
<div class="loginOut" @click="loginOut">
<div class="loginOutIcon"><img src="@/assets/images/dustNoise/loginOut.png" /></div>
<div class="userName">退出登录</div>
@ -51,6 +47,11 @@ import { useRouter } from "vue-router";
import { GlobalStore } from "@/stores";
import { jumpLargeUserInfoApi } from "@/api/modules/login";
import { COMPANY } from "@/config/config";
//API
import {
getEnterpriseIdApi,
getEnterpriseInfoByIdApi,
} from "@/api/modules/agjtLiveApi";
const BASEURL = import.meta.env.VITE_API_URL;
const store = GlobalStore();
let nowTime = ref("2023-04-16 09:22:12" as any);
@ -60,16 +61,9 @@ let adminName = ref("" as any);
let menuList = ref([
{
moduleName: "指挥部大屏",
modulePath: "/commandScreen"
modulePath: "/agjtLiveScreen"
},
]);
//
let agjtCommandList = ref([
{
moduleName: "指挥部大屏",
modulePath: "/commandScreen"
}
]);
//
let agjtLiveList = ref([
{
@ -83,16 +77,6 @@ const activeTab = ref(0);
const activeTab2 = ref(0);
const router = useRouter();
//tab
const getAllModelMenu = () => {
let half = store.projectDateAuth.moduleList;
half.forEach((item: any) => {
if (item.moduleType == 4) {
menuList.value.push(item);
return;
}
});
};
const navigateTo = (path, type) => {
if (type == 1) {
activeTab.value = path.modulePath;
@ -103,13 +87,30 @@ const navigateTo = (path, type) => {
router.push(path.companyPath);
}
};
const cbsProjectInfo = ref({} as any)
async function getCbsProjectInfo() {
console.log("BASEURL===>",BASEURL)
//Id
await getEnterpriseIdApi().then(res => {
if(res.success){
let data = {
enterpriseId: res.result.id,
projectSn: '',
}
if(BASEURL == 'http://182.90.224.237:51234' || BASEURL == 'http://192.168.34.221:9111') data.projectSn = 'BD3137498CB84BF0969979E0342CDBCA'
if(BASEURL == 'http://42.180.188.17:9809' || BASEURL == 'http://42.180.188.17:11211') data.projectSn = '471568F45EB247A3912A0D10EA1BFCEB'
getEnterpriseInfoByIdApi(data).then(res2 => {
cbsProjectInfo.value = res2.result.projectEnterprise
console.log(22222222222222222222222222)
console.log(res2)
console.log(22222222222222222222222222)
})
}
});
};
onMounted(async () => {
if (COMPANY === "agjtCommand") {
// menuList.value = AGJTCommandMenu;
menuList.value = agjtCommandList.value;
}
await getCbsProjectInfo()
if (COMPANY === "agjtLive") {
// menuList.value = AGJTCommandMenu;
menuList.value = agjtLiveList.value;
}
//token
@ -132,7 +133,6 @@ onMounted(async () => {
// }
// });
}
// await getAllModelMenu();
navigateTo(menuList.value[0], 1);
activeTab.value = menuList.value[0].modulePath;
itemList.value = menuList.value[0].menuList;
@ -142,12 +142,9 @@ onMounted(async () => {
getNowTime();
document.addEventListener("click", bodyCloseMenus);
const subMenus = document.querySelectorAll(".menStyle");
if (subMenus.length >= 5 && COMPANY !== "hfqc") {
subMenus[4].style.marginLeft = "30%";
}
if (COMPANY === "hfqc") {
subMenus[3].style.marginLeft = "44%";
}
// if(COMPANY == 'agjtLive'){
// getCbsProjectInfo()
// }
});
let timer = ref(null as any);
@ -185,31 +182,6 @@ function loginOut() {
location.reload();
router.push("/login");
}
//
function jumpBgd() {
// window.location.replace("http://192.168.34.226:8080/#/projectIndex");
if (COMPANY === "syhy") {
window.location.replace("http://101.43.164.214:45020/#/projectIndex"); //
}
if (COMPANY === "jxwjj") {
window.location.replace("http://183.249.224.118:9000/#/projectIndex"); //
}
if (COMPANY === "phmw") {
window.location.replace("http://101.43.164.214:11111/#/projectIndex"); //
}
if (COMPANY === "hfqc") {
window.location.replace("http://101.43.164.214:11111/#/projectIndex"); //
}
if (COMPANY === "as") {
window.location.replace("http://182.90.224.237:15551/#/projectIndex"); //
}
if(COMPANY === "agjtCommand"){
window.location.replace("http://47.93.215.234:9809" + "/#/login?token=" + store.token);
}
if(COMPANY === "agjtLive"){
window.location.replace("http://47.93.215.234:9809" + "/#/login?token=" + store.token);
}
}
</script>
<style>

View File

@ -89,6 +89,7 @@ function drawPie(){
}
},
},
color: ['#fac858','#5470c6','#ee6666','#91cc75','#73c0de','#3ba272','#fc8452','#9a60b4','#ea7ccc','#5470c6'],
// legend: {
// data: [ 'Direct', 'Marketing', 'Search Engine', 'Email', 'Union Ads', 'Video Ads', 'Baidu', 'Google', 'Bing', 'Others' ]
// },