Browse Source

统计分析去掉点击效果

master
蟑螂恶霸 2 years ago
parent
commit
4c104d1224
  1. 20
      src/views/common/analyse.vue

20
src/views/common/analyse.vue

@ -46,6 +46,7 @@ import { onBeforeUnmount } from 'vue';
import util from "@/util/area"; import util from "@/util/area";
import {queryStatisticalData} from '@/api/enforce'; import {queryStatisticalData} from '@/api/enforce';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
const {useCommon, useShopCard} = $globalStore; const {useCommon, useShopCard} = $globalStore;
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
@ -69,6 +70,10 @@ onBeforeUnmount(() => {
router.replace('/enforceHome'); // 替换到首页 router.replace('/enforceHome'); // 替换到首页
}); });
onUnmounted(() => {
console.log("=============销毁完毕=============")
});
// 保存地址操作 // 保存地址操作
const onSave = () => { const onSave = () => {
router.replace({name: "addressList"}); router.replace({name: "addressList"});
@ -80,7 +85,8 @@ const onDelete = () => {
}; };
// 修改详细地址 // 修改详细地址
const onChangeDetail = () => {}; const onChangeDetail = () => {
};
const echartInit = (data, targetId) => { const echartInit = (data, targetId) => {
var myChart = echarts.init(document.getElementById(targetId)); var myChart = echarts.init(document.getElementById(targetId));
@ -93,6 +99,7 @@ const echartInit = (data,targetId) =>{
{ {
name: '统计图表', name: '统计图表',
type: 'pie', type: 'pie',
silent: true, // 设置所有的点击事件为静默模式
radius: ['33%', '50%'], radius: ['33%', '50%'],
avoidLabelOverlap: false, avoidLabelOverlap: false,
itemStyle: { itemStyle: {
@ -234,6 +241,7 @@ const initSchedule = (dataAll,targetId) =>{
{ {
name: '', //系列名称 name: '', //系列名称
type: 'bar', //柱状、条形图 type: 'bar', //柱状、条形图
silent: true, // 设置所有柱子的点击事件为静默模式
barWidth: 15, //柱条的宽度,默认自适应 barWidth: 15, //柱条的宽度,默认自适应
data: dataAll.dataPercent, //系列中数据内容数组 data: dataAll.dataPercent, //系列中数据内容数组
label: { //图形上的文本标签 label: { //图形上的文本标签
@ -268,6 +276,7 @@ const initSchedule = (dataAll,targetId) =>{
{ {
name: '', name: '',
type: 'bar', type: 'bar',
silent: true, // 设置所有柱子的点击事件为静默模式
label: { //图形上的文本标签 label: { //图形上的文本标签
show: true, show: true,
position: 'right', //标签的位置 position: 'right', //标签的位置
@ -418,7 +427,8 @@ onMounted(() => {
//本月案件数量 //本月案件数量
echartInit(arrCountData, 'echarCount'); echartInit(arrCountData, 'echarCount');
}); });
},error =>{}) }, error => {
})
}); });
</script> </script>
@ -432,9 +442,11 @@ onMounted(() => {
overflow: hidden; overflow: hidden;
background-color: #ebf3fb; background-color: #ebf3fb;
} }
.warp_body { .warp_body {
background-image: linear-gradient(to bottom, #ebf3fb, transparent); background-image: linear-gradient(to bottom, #ebf3fb, transparent);
} }
.countbox, .analybox { .countbox, .analybox {
position: relative; position: relative;
margin: 2% 3%; margin: 2% 3%;
@ -461,6 +473,7 @@ onMounted(() => {
.countbox span.count-tot { .countbox span.count-tot {
font-size: 0.3rem; font-size: 0.3rem;
b { b {
margin-right: 0.15rem; margin-right: 0.15rem;
color: #085dff; color: #085dff;
@ -477,6 +490,7 @@ onMounted(() => {
font-size: 0.4rem; font-size: 0.4rem;
font-style: normal; font-style: normal;
} }
b { b {
margin-right: 5px; margin-right: 5px;
color: #f00; color: #f00;
@ -488,12 +502,14 @@ onMounted(() => {
height: auto; height: auto;
min-height: 7rem; min-height: 7rem;
background: #fff none; background: #fff none;
.title { .title {
margin: 2% 2.5%; margin: 2% 2.5%;
font-size: 0.4rem; font-size: 0.4rem;
font-weight: 600; font-weight: 600;
} }
} }
.chartbox { .chartbox {
margin: 2% 5% 3%; margin: 2% 5% 3%;
width: 90%; width: 90%;

Loading…
Cancel
Save