Skip to content

Commit b78601b

Browse files
committed
加入map chart
1 parent b584741 commit b78601b

File tree

8 files changed

+1973
-22
lines changed

8 files changed

+1973
-22
lines changed

src/components/Charts/Charts.js

Lines changed: 841 additions & 0 deletions
Large diffs are not rendered by default.

src/components/Charts/Charts_Fake.js

Lines changed: 765 additions & 0 deletions
Large diffs are not rendered by default.

src/components/Charts/pieChart.vue

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
<template>
2+
<div
3+
:class="className"
4+
:id="id"
5+
:style="{height:height,width:width}"/>
6+
</template>
7+
8+
<script>
9+
import echarts from 'echarts'
10+
import './wonderland.js'
11+
12+
export default {
13+
props: {
14+
className: {
15+
type: String,
16+
default: 'chart',
17+
},
18+
id: {
19+
type: String,
20+
default: 'chart',
21+
},
22+
width: {
23+
type: String,
24+
default: '500px',
25+
},
26+
height: {
27+
type: String,
28+
default: '300px',
29+
},
30+
},
31+
data() {
32+
return {
33+
chart: null,
34+
}
35+
},
36+
mounted() {
37+
this.initChart()
38+
this.chart = null
39+
},
40+
beforeDestroy() {
41+
if (!this.chart) {
42+
return
43+
}
44+
this.chart.dispose()
45+
this.chart = null
46+
},
47+
methods: {
48+
initChart() {
49+
this.chart = echarts.init(document.getElementById(this.id), 'macarons')
50+
51+
this.chart.setOption({
52+
title: {
53+
text: '测试',
54+
left: '29%',
55+
top: '40%',
56+
textAlign: 'center',
57+
textStyle: {
58+
fontSize: 14,
59+
},
60+
},
61+
tooltip: {
62+
trigger: 'item',
63+
formatter: '{a} <br/>{b} : {c} ({d}%)',
64+
},
65+
66+
67+
legend: {
68+
type: 'scroll',
69+
orient: 'vertical',
70+
show: true,
71+
right: 0,
72+
top: 35,
73+
bottom: 20,
74+
textStyle: {
75+
fontSize: 12,
76+
},
77+
// formatter: function (name) {
78+
// let value = "";
79+
// for (let k in this.FilingChartData) {
80+
// let obj = this.FilingChartData[k];
81+
// if (obj.name == name) {
82+
// value = obj.value;
83+
// break;
84+
// }
85+
// }
86+
// if (name.length > 8) {
87+
88+
// name = name.substring(0, 8) + "\n" + name.substring(8, name.length);
89+
// }
90+
// return name + " : " + value + "人";
91+
// },
92+
data: ['信访举报', '上级交办', '监督检查中发现', '审查调查中发现', '审计中发现', '巡视巡察中发现', '公检法机关移送', '其他行政执法机关移送', '其他'],
93+
},
94+
95+
96+
series: [
97+
{
98+
name: '',
99+
type: 'pie',
100+
radius: ['50%', '80%'],
101+
center: ['30%', '50%'],
102+
data: JSON.parse('[{ "name": "信访举报", "value":"104"},{ "name": "上级交办", "value":"3"},{ "name": "监督检查中发现", "value":"7"},{ "name": "审查调查中发现", "value":"125"},{ "name": "审计中发现", "value":"24"},{ "name": "巡视巡察中发现", "value":"6"},{ "name": "公检法机关移送", "value":"6"},{ "name": "其他行政执法机关移送", "value":"6"},{ "name": "其他", "value":"1"}]'),
103+
label: {
104+
normal: {
105+
textStyle: {
106+
fontWeight: 'normal',
107+
fontSize: 16,
108+
},
109+
show: false,
110+
111+
},
112+
},
113+
labelLine: {
114+
normal: {
115+
show: false, // show设置线是否显示,默认为true,可选值:true ¦ false
116+
},
117+
},
118+
119+
itemStyle: {
120+
normal: {
121+
borderWidth: 3,
122+
borderColor: '#fff',
123+
124+
},
125+
126+
},
127+
},
128+
],
129+
})
130+
},
131+
},
132+
}
133+
</script>

src/components/Charts/wonderland.js

Whitespace-only changes.

src/components/CommonTable/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
-->
1010
<template>
11-
<div class="app-container">
11+
<div>
1212
<el-table
1313
v-loading.body="listLoading"
1414
:default-sort="{prop: 'name', order: 'descending'}"

src/components/CommonToolBar/index.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
icon="el-icon-plus"
6060
@click="addItem"
6161
/>
62-
<el-button
62+
<el-button
6363
style="margin:5px 0px 0px 10px;padding:10px"
6464
type="danger"
6565
size="mini"
@@ -83,22 +83,22 @@
8383

8484

8585
<template v-if="handleButton.includes('add')">
86-
<el-tooltip class="item" effect="light" open-delay="700" content="新增" placement="top">
86+
<el-tooltip class="item" effect="light" :open-delay="700" content="新增" placement="top">
8787
<el-button icon="el-icon-plus"
8888
@click="New()" ></el-button>
8989
</el-tooltip>
9090
</template>
9191
<template v-if="handleButton.includes('clear')">
9292

93-
<el-tooltip class="item" effect="light" content="刷新" open-delay="700" placement="top">
93+
<el-tooltip class="item" effect="light" content="刷新" :open-delay="700" placement="top">
9494
<el-button icon="el-icon-refresh"
9595
@click="ClearOption"></el-button>
9696
</el-tooltip>
9797
</template>
9898

9999
<template v-if="handleButton.includes('search')">
100100

101-
<el-tooltip class="item" effect="light" content="查询条件" open-delay="700" placement="top">
101+
<el-tooltip class="item" effect="light" content="查询条件" :open-delay="700" placement="top">
102102
<el-button :icon="buttonVisible"
103103
class="buttonVisible"
104104
@click="changeVisible"></el-button>
@@ -219,7 +219,13 @@ export default {
219219
z-index: 10;
220220
right: 28px;
221221
background-color: white;
222-
; box-shadow: 0px 0px 10px gray;
222+
box-shadow: 0px 0px 10px gray;
223223
224224
}
225+
.el-button-group{
226+
border:1px solid #f2f2f2;
227+
}
228+
.el-button{
229+
border:none;
230+
}
225231
</style>

0 commit comments

Comments
 (0)