Compare commits

...

2 Commits

Author SHA1 Message Date
徐景良 1f38d70f03 Merge branch 'main' of http://123.132.248.154:10000/HC_YFZX/CaiYuanYiTiHua 2024-08-05 17:57:40 +08:00
徐景良 a0536eaf09 merge 2024-08-05 17:57:38 +08:00
6 changed files with 482 additions and 170 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -1,12 +1,28 @@
<template>
<div class="charts-main-container">
<LeftChartsContainer></LeftChartsContainer>
<div :class="isOpen?'expend-open':'expend-close'">
<div class="switch-button-open" @click="handlerOpen" v-if="!isOpen">
<img src="/public/statistical/switch-button.png" alt="">
</div>
<div class="switch-button-close" @click="handlerOpen" v-if="isOpen">
<img src="/public/statistical/switch-button-active.png" alt="">
</div>
<LeftChartsContainer class="expend"></LeftChartsContainer>
</div>
</template>
<script lang="ts" setup>
import {ref} from 'vue'
import LeftChartsContainer from './left_charts_container.vue'
const isOpen = ref(false);
function handlerOpen(){
isOpen.value = !isOpen.value;
}
</script>
<style type="less" scoped>
.charts-main-container{
width:100vw;
height:100vh;
@ -15,5 +31,82 @@ import LeftChartsContainer from './left_charts_container.vue'
top:0px;
left: calc( 100vw - 580px);
z-index:1;
}
.switch-button-open{
width:50px;
height:100px;
position:absolute;
left:-36px;
top:50%;
transform:translate(0,-50%);
cursor:pointer;
z-index:999;
img{
width:100%;
height:100%;
}
}
.switch-button-close{
width:50px;
height:100px;
position:absolute;
left:0px;
top:50%;
z-index:999;
transform:translate(0,-50%);
cursor:pointer;
img{
width:100%;
height:100%;
}
}
.expend-open {
width:100vw;
height:100vh;
background:rgba(0,0,0,0.6);
position:absolute;
top:0px;
z-index:1;
animation: expend-open 1s;
}
.expend-close {
width:100vw;
height:100vh;
background:rgba(0,0,0,0.6);
position:absolute;
top:0px;
left:calc( 100vw - 580px);
z-index:1;
animation: expend-close 1s;
}
@keyframes expend-open {
from {
top: 0px;
left:calc( 100vw - 580px);
}
to {
top: 0px;
left:0;
}
}
@keyframes expend-close {
from {
top: 0px;
left:0;
}
to {
top: 0px;
left:calc( 100vw - 580px);
}
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<div class="left-charts-container">
<div class="charts-container">
<div class="charts-container" style="height:38%">
<div class="echarts-title">下发图斑</div>
<div class="data-container">
<div class="data-box">
@ -21,12 +21,12 @@
<div class="data-item-value">7089</div>
</div>
</div>
<div class="charts-box" id="one">
<div class="charts-box" id="one" :key="Math.random()">
</div>
</div>
</div>
<div class="charts-container">
<div class="charts-container" style="height:31%">
<div class="echarts-title">核实后新增违法耕地</div>
<div class="data-container">
<div class="data-box">
@ -43,12 +43,12 @@
<div class="data-item-value">7089</div>
</div>
</div>
<div class="charts-box" id="two">
<div class="charts-box" id="two" :key="Math.random()">
</div>
</div>
</div>
<div class="charts-container">
<div class="charts-container" style="height:31%">
<div class="echarts-title">整改后新增违法耕地</div>
<div class="data-container">
<div class="data-box">
@ -65,7 +65,7 @@
<div class="data-item-value">7089</div>
</div>
</div>
<div class="charts-box">
<div class="charts-box" id="three" :key="Math.random()">
</div>
</div>
@ -76,9 +76,11 @@
import {ref,onMounted} from 'vue';
import * as echarts from 'echarts';
let chartOne,chartTwo,chartThree;
function handlerLoadChartsOne(){
let chartDom = document.getElementById('one');
let myChart = echarts.init(chartDom);
chartOne = echarts.init(chartDom);
let dataArr = [
{
@ -129,26 +131,19 @@ function handlerLoadChartsOne(){
let option = {
title: {
text: '2200',
textStyle: {
color: '#ffffff',
fontSize: 12,
},
x: 'center',
y: 'center',
},
legend: {
orient: "vertical",
top: '0%',
orient: "horizontal",
width:"100%",
top: 0,
left: "center",
right:0,
itemWidth: 10,
itemHeight: 10,
x: "left",
textStyle: {
color: "#fff",
color: "#f9f9f9",
fontSize: 12
},
data:["建设用地","农用地","其他"],
show: true
},
series: [
@ -157,8 +152,8 @@ function handlerLoadChartsOne(){
splitNumber: 15, //
min: 0,
max: 100,
radius: "90%", //
center: ['50%', '50%'],
radius: "75%", //
center: ['50%', '55%'],
startAngle: 90,
endAngle: -269.9999,
axisLine: {
@ -199,10 +194,10 @@ function handlerLoadChartsOne(){
},
{
hoverOffset: 1,
startAngle: 90,
startAngle: -90,
type: "pie",
radius: ["56%", "74%"],
center: ["50%", "50%"],
radius: ["46%", "60%"],
center: ["50%", "55%"],
color: colorList,
label: {
normal: {
@ -267,161 +262,384 @@ function handlerLoadChartsOne(){
// }
]
};
myChart.setOption(option);
chartOne.setOption(option);
}
function handlerLoadChartsTow(){
let chartDom = document.getElementById('two');
let myChart = echarts.init(chartDom);
var labelName = ['总值','合格值'];
var getRate = 70;
let series = [];
var color = [{
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: 'rgba(242, 164, 64, 1)' // 0%
},
{
offset: 1,
color: 'rgba(255, 213, 65, 1)' // 100%
}
],
}, {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: 'rgba(29, 130, 255, 1)' // 0%
},
{
offset: 1,
color: 'rgba(0, 255, 246, 1)' // 100%
}
],
}]
let option = {
polar:{
radius:['60%','94%'],
},
angleAxis: {
axisLine: {
show: false
},
axisLabel: {
show: false
},
splitLine: {
show: false
},
axisTick: {
show: false
},
min: 0,
max: 100,
boundaryGap: ['0', '100'],
startAngle: 90
},
radiusAxis: {
type: 'category',
axisLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
show: false
},
data: labelName,
z: 10
},
series: [{
name:'',
hoverAnimation:false,
silent:true,
type: 'pie',
data:[{name:'合格值',value:100}],
z:1,
center:['50%','50%'],
radius:['27%','68%'],
label:{
show:true,
position:'center',
formatter:'{total|'+getRate+'%}'+'\n\n'+'{lname|合格值}',
rich:{
total:{
fontSize:16,
fontWeight:'bold',
color:'#0DDBFF'
},
lname:{
fontSize:12,
color:'#FFF'
}
chartTwo = echarts.init(chartDom);
var colors = [
//
{
type: 'linear',
x: 0,
y: 0,
x2: 1,
y2: 1,
colorStops: [{
offset: 0,
color: '#208fb7' // 0%
},{
offset: 0.5,
color: '#21d6f0' // 0%
},
{
offset: 1,
color: '#21d6f0' // 100%
}
],
globalCoord: false // false
},
{
type: 'linear',
x: 0,
y: 0,
x2: 1,
y2: 1,
colorStops: [{
offset: 0,
color: '#7e143e' // 0%
},
{
offset: 1,
color: '#ed2a65' // 100%
}
],
globalCoord: false // false
},
{
type: 'linear',
x: 0,
y: 0,
x2: 1,
y2: 1,
colorStops: [{
offset: 0,
color: '#cc8518' // 0%
},
{
offset: 1,
color: '#f8b53f' // 100%
}
],
globalCoord: false // false
},
]
var option = {
tooltip: {
trigger: 'item',
axisPointer: {
type: 'shadow',
},
itemStyle:{
color:'rgba(62, 109, 255, 0.2)'
}
},{
//hoverAnimation:false,
name:labelName[0],
barGap: '-100%',
//silent:true,
type: 'bar',
data:[100],
coordinateSystem:'polar',
z:2,
label:{
show:false
textStyle: {
fontSize: 14,
},
itemStyle:{
color:color[0]
formatter: "{a} <br/>{b}: {c}万人({d}%)",
},
graphic: {
elements: [{
type: 'image',
style: {
// image: imgUrl,
width: 180,
height: 180
},
left: 'center',
top: 'center'
}]
},
title: {
text: '刷卡总量\n\n占比分析',
x: 'center',
y: 'center',
textStyle: {
width:50,
color: '#fff',
fontSize: 14
}
},{
//hoverAnimation:false,
roundCap:true,
//silent:true,
name:labelName[1],
type: 'bar',
coordinateSystem:'polar',
barGap: '-100%',
data:[getRate],
z:3,
label:{
show:false
},
legend: {
orient: "horizontal",
width:"100%",
top: 0,
left: "center",
right:0,
itemWidth: 10,
itemHeight: 10,
textStyle: {
color: "#f9f9f9",
fontSize: 12
},
itemStyle:{
color:color[1]
}
}]
data: ['1亩以下','1~5亩','5亩以上'],
show: true
},
color: colors,
series: [
//
{
name: '刷卡总量占比分析',
type: 'pie',
center: ['50%', '55%'],
radius: ['58%', '78%'],
startAngle: 180,
avoidLabelOverlap: false,
labelLine: {
normal: {
show: true,
length2:11
}
},
data: [{
value: 78,
name: '1亩以下'
},
{
value: 123,
name: '1~5亩'
},
{
value: 21,
name: '5亩以上'
},
]
},
// 线
{
type: 'pie',
zlevel: 4,
silent: true,
radius: ['84%', '86%'],
center:["50%","55%"],
label: {
normal: {
show: false
},
},
labelLine: {
normal: {
show: false
}
},
data: createData()
},
]
};
myChart.setOption(option);
chartTwo.setOption(option);
}
function createData() {
let dataArr = [];
for(var i = 0; i < 200; i++) {
if(i % 2 === 0) {
dataArr.push({
//name: (i + 1).toString(),
value: 25,
itemStyle: {
normal: {
color: "rgba(255,255,255,0.2)",
borderWidth: 0,
borderColor: "rgba(0,0,0,0)"
}
}
})
} else {
dataArr.push({
//name: (i + 1).toString(),
value: 20,
itemStyle: {
normal: {
color: "rgba(0,0,0,0)",
borderWidth: 0,
borderColor: "rgba(0,0,0,0)"
}
}
})
}
}
return dataArr
}
function handlerLoadChartsThree(){
let chartDom = document.getElementById('three');
chartThree = echarts.init(chartDom);
var colors = [
//
{
type: 'linear',
x: 0,
y: 0,
x2: 1,
y2: 1,
colorStops: [{
offset: 0,
color: '#208fb7' // 0%
},{
offset: 0.5,
color: '#21d6f0' // 0%
},
{
offset: 1,
color: '#21d6f0' // 100%
}
],
globalCoord: false // false
},
{
type: 'linear',
x: 0,
y: 0,
x2: 1,
y2: 1,
colorStops: [{
offset: 0,
color: '#7e143e' // 0%
},
{
offset: 1,
color: '#ed2a65' // 100%
}
],
globalCoord: false // false
},
{
type: 'linear',
x: 0,
y: 0,
x2: 1,
y2: 1,
colorStops: [{
offset: 0,
color: '#cc8518' // 0%
},
{
offset: 1,
color: '#f8b53f' // 100%
}
],
globalCoord: false // false
},
]
var option = {
tooltip: {
trigger: 'item',
axisPointer: {
type: 'shadow',
},
textStyle: {
fontSize: 14,
},
formatter: "{a} <br/>{b}: {c}万人({d}%)",
},
graphic: {
elements: [{
type: 'image',
style: {
// image: imgUrl,
width: 180,
height: 180
},
left: 'center',
top: 'center'
}]
},
title: {
text: '刷卡总量\n\n占比分析',
x: 'center',
y: 'center',
textStyle: {
width:50,
color: '#fff',
fontSize: 14
}
},
legend: {
orient: "horizontal",
width:"100%",
top: 0,
left: "center",
right:0,
itemWidth: 10,
itemHeight: 10,
textStyle: {
color: "#f9f9f9",
fontSize: 12
},
data: ['1亩以下','1~5亩','5亩以上'],
show: true
},
color: colors,
series: [
//
{
name: '刷卡总量占比分析',
type: 'pie',
center: ['50%', '55%'],
radius: ['58%', '78%'],
startAngle: 180,
avoidLabelOverlap: false,
labelLine: {
normal: {
show: true,
length2:11
}
},
data: [{
value: 78,
name: '1亩以下'
},
{
value: 123,
name: '1~5亩'
},
{
value: 21,
name: '5亩以上'
},
]
},
// 线
{
type: 'pie',
zlevel: 4,
silent: true,
radius: ['84%', '86%'],
center:["50%","55%"],
label: {
normal: {
show: false
},
},
labelLine: {
normal: {
show: false
}
},
data: createData()
},
]
};
chartThree.setOption(option);
}
onMounted(()=>{
handlerLoadChartsOne();
handlerLoadChartsTow();
setTimeout(function(){
handlerLoadChartsOne();
handlerLoadChartsTow();
handlerLoadChartsThree();
},500)
})
</script>
<style type="less" scoped>
.left-charts-container{
background: linear-gradient(to left,rgba(0, 0, 0, 0),rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5),rgba(0, 0, 0, 0.7));
width:580px;
max-width:580px;
padding:24px 20px;
height:100vh;
padding-top:90px;
@ -444,7 +662,7 @@ onMounted(()=>{
height: calc( 100% - 44px);
display:flex;
.data-box{
width:40%;
width:36%;
padding:15px 12px;
height:100%;
display:flex;
@ -452,7 +670,7 @@ onMounted(()=>{
.data-item{
background:rgba(21,54,94,0.8);
width:100%;
max-height:60px;
max-height:54px;
flex:1;
margin:6px 0px;
text-align: center;
@ -520,7 +738,7 @@ onMounted(()=>{
}
}
.charts-box{
width:60%;
width:64%;
height:100%;
padding:15px 12px;
}

View File

@ -141,9 +141,8 @@
account: data.account,
mode: 'none', //
});
console.log("userInfo123",userInfo);
console.log(userInfo);
localStorage.setItem('fireUserLoginName', userInfo.name);
localStorage.setItem("userid",userInfo.id);
if (userInfo) {
notification.success({
message: t('sys.login.loginSuccessTitle'),

View File

@ -143,9 +143,11 @@
console.log(userInfo);
localStorage.setItem('fireUserLoginName', userInfo.name);
if (userInfo) {
localStorage.setItem('userid', userInfo.id);
notification.success({
message: t('sys.login.loginSuccessTitle'),
description: `${t('sys.login.loginSuccessDesc')}: ${userInfo.name}`,
duration: 3,
});
}