Merge branch 'main' of git.zdool.com:xs/ggfwjsc

This commit is contained in:
姚宇浩 2024-05-24 15:40:57 +08:00
commit 2cac940e4f
3 changed files with 178 additions and 146 deletions

View File

@ -71,27 +71,27 @@ function getCookie(cname) {
// return ''
}
// router.beforeEach((to, form, next) => {
// var token = getCookie('lytoken')
// console.log('token', token)
// if (token == '') {
// window.location.href =
// 'http://220.191.238.50:996/api/login?returnURL=' +
// window.location.href
// } else {
// // http.get("/api/zzdn_event/auditToken?token=" + token).then((res) => {
// // if (res.code == '500') {
// // window.location.href =
// // 'http://220.191.238.50:996/api/login?returnURL=' +
// // window.location.href
// // } else {
// // tools.data.set('token',token)
// // next();
// // }
// // });
// tools.data.set('token', token)
// next();
// }
// })
router.beforeEach((to, form, next) => {
var token = getCookie('lytoken')
console.log('token', token)
if (token == '') {
window.location.href =
'http://220.191.238.50:996/api/login?returnURL=' +
window.location.href
} else {
// http.get("/api/zzdn_event/auditToken?token=" + token).then((res) => {
// if (res.code == '500') {
// window.location.href =
// 'http://220.191.238.50:996/api/login?returnURL=' +
// window.location.href
// } else {
// tools.data.set('token',token)
// next();
// }
// });
tools.data.set('token', token)
next();
}
})
export default router

View File

@ -1,5 +1,5 @@
<template>
<div ref="chart" style="width: 100%; height:100%;"></div>
<div ref="chart" style="width: 100%; height: 100%"></div>
</template>
<script setup>
@ -10,140 +10,172 @@ import * as echarts from "echarts";
const chart = ref(); // DOM
const datas = {
value: 92.96,
}
value: 92.96,
};
let option = {
series: [
//
{
type: "pie",
center: ["55%", "55%"],
radius: ["70%", "90%"],
hoverAnimation: false,
clockWise: false,
itemStyle: {
normal: {
borderWidth: 1,
borderColor: "rgba(193, 229, 255, .1)",
color: new echarts.graphic.LinearGradient(1, 1, 1, 0, [
{
offset: 1,
color: "rgba(127, 242, 255, .2)",
},
{
offset: 0,
color: "rgba(109, 195, 255, 0)",
},
]),
},
series: [
//
{
type: "pie",
center: ["55%", "55%"],
radius: ["70%", "90%"],
hoverAnimation: false,
clockWise: false,
// startAngle: 180,
// endAngle: 360,
itemStyle: {
normal: {
borderWidth: 1,
borderColor: "rgba(193, 229, 255, .1)",
color: new echarts.graphic.LinearGradient(1, 1, 1, 0, [
{
offset: 1,
color: "rgba(127, 242, 255, .2)",
},
tooltip: {
show: false,
{
offset: 0,
color: "rgba(109, 195, 255, 0)",
},
label: {
show: false,
},
data: [100],
]),
},
/*内心原型图,展示整体数据概览*/
},
tooltip: {
show: false,
},
label: {
show: false,
},
data: [100],
},
/*内心原型图,展示整体数据概览*/
{
// name: "pie",
type: "pie",
roundCap: true,
clockWise: true,
radius: ["50%", "70%"],
center: ["55%", "55%"],
startAngle: 180,
labelLine: {
show: false,
},
hoverAnimation: false,
data: [
{
name: 'pie',
type: 'pie',
roundCap: true,
clockWise: true,
startAngle: 180,
labelLine: {
show: false
value: datas.value,
label: {
normal: {
position: "center",
show: true,
textStyle: {
fontSize: "24",
fontWeight: "normal",
color: "#fff",
fontSize: 16,
lineHeight: 30,
rich: {
cell: {
fontSize: "24",
fontWeight: "normal",
color: "#fff",
},
text: {
fontSize: 16,
fontFamily: "FZLanTingHeiS-L-GB",
color: "#fff",
},
},
},
},
radius: ['50%', '70%'],
hoverAnimation: false,
center: ['55%', '55%'],
data: [
},
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [
{
value: datas.value,
label: {
normal: {
position: 'center',
show: true,
textStyle: {
fontSize: '24',
fontWeight: 'normal',
color: '#fff',
fontSize: 16,
lineHeight: 30,
rich: {
cell: {
fontSize: '24',
fontWeight: 'normal',
color: '#fff',
},
text: {
fontSize: 16,
fontFamily: 'FZLanTingHeiS-L-GB',
color: '#fff',
}
}
}
}
},
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{
offset: 0,
color: 'rgba(0, 255, 250, 0.29)'
},
{
offset: 0.5,
color: 'rgba(0, 255, 250, 0.8)'
}, {
offset: 1,
color: 'rgba(0, 255, 250, 1)'
}]),
shadowColor: 'rgba(1,1,1,0.5)',
shadowBlur: 1
}
}
offset: 0,
color: "rgba(0, 255, 250, 0.29)",
},
{
value: 100 - datas.value,
name: '',
itemStyle: {
normal: {
color: '#095b9b', //
label: {
show: false
},
labelLine: {
show: false
}
},
emphasis: {
color: '#095b9b' //
}
}
}]
}
]
offset: 0.5,
color: "rgba(0, 255, 250, 0.8)",
},
{
offset: 1,
color: "rgba(0, 255, 250, 1)",
},
]),
shadowColor: "rgba(1,1,1,0.5)",
shadowBlur: 1,
},
},
},
{
value: 100 - datas.value,
name: "",
itemStyle: {
normal: {
color: "#095b9b", //
label: {
show: false,
},
labelLine: {
show: false,
},
},
emphasis: {
color: "#095b9b", //
},
},
},
],
},
],
};
// let option = {
// tooltip: {
// trigger: 'item'
// },
// legend: {
// top: '5%',
// left: 'center'
// },
// series: [
// {
// name: 'Access From',
// type: 'pie',
// radius: ['40%', '70%'],
// center: ['50%', '70%'],
// // adjust the start and end angle
// startAngle: 180,
// endAngle: 360,
// data: [
// { value: 1048, name: 'Search Engine' },
// { value: 735, name: 'Direct' },
// { value: 580, name: 'Email' },
// { value: 484, name: 'Union Ads' },
// { value: 300, name: 'Video Ads' }
// ]
// }
// ]
// };
// 使
onMounted(() => {
// domecharts
// var myChart = echarts.init(document.getElementById('main'));
// Vue3
var myChart = echarts.init(chart.value);
// domecharts
// var myChart = echarts.init(document.getElementById('main'));
// Vue3
var myChart = echarts.init(chart.value);
// init(); // vue3.2this
// 使
myChart.setOption(option);
// init(); // vue3.2this
// 使
myChart.setOption(option);
// :
// window.addEventListener("resize", () => {
// myChart.resize();
// });
// :
// window.addEventListener("resize", () => {
// myChart.resize();
// });
});
</script>
<style scoped></style>
<style scoped></style>

View File

@ -375,11 +375,11 @@ const getData = async () => {
background-size: 100% 100%;
}
.left_2 {
background-image: url(@/assets/images/hygiene/left_title_2.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}
// .left_2 {
// background-image: url(@/assets/images/hygiene/left_title_2.png);
// background-repeat: no-repeat;
// background-size: 100% 100%;
// }
.left_3 {
background-image: url(@/assets/images/hygiene/new_lmb.png);