first commit
This commit is contained in:
@@ -0,0 +1,206 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="/assets/platform/css/datav/activity.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/index.css">
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/element-ui/lib/index.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/element-ui/lib/i18n/${lang,escape}.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/datav/datav.map.vue.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-loader/httpVueLoader.js"></script>
|
||||
<script src="https://cdn.staticfile.org/g2plot/2.4.31/g2plot.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>
|
||||
<script src="https://cdn.staticfile.org/echarts/5.2.2/i18n/langZH.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="app">
|
||||
<div id="data-view">
|
||||
<div id="top-header">
|
||||
<dv-decoration-8 class="header-left-decoration"></dv-decoration-8>
|
||||
<dv-decoration-11 class="header-center-decoration">活动</dv-decoration-11>
|
||||
<dv-decoration-8 class="header-right-decoration" reverse></dv-decoration-8>
|
||||
</div>
|
||||
<div id="main-content">
|
||||
<div class="box box1">
|
||||
<h4 class="box-title">活动举办数量</h4>
|
||||
<dv-capsule-chart :config="configType" style="width:90%;height: calc(100% - 60px)"/>
|
||||
</div>
|
||||
<div class="box box2">
|
||||
<h4 class="box-title" style="position: relative">
|
||||
活动参与人数
|
||||
<dv-decoration-11 style="width:200px;height:7vh;position: absolute;right: 10px;line-height: 5vh">
|
||||
<el-select v-model="activityCode" style="width: 120px;height: 5vh" @change="getTakePartUser">
|
||||
<el-option v-for="item in activityCodes" :key="item.code" :value="item.code"
|
||||
:label="item.name">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</dv-decoration-11>
|
||||
</h4>
|
||||
<dv-conical-column-chart :config="box2Config" style="width:100%;height:calc(100% - 13vh);"/>
|
||||
</div>
|
||||
<div class="box box5">
|
||||
<h4 class="box-title">分工会举办活动</h4>
|
||||
<div style="height: calc(100% - 6vh);display: flex;">
|
||||
<div id="unionChart" style="width: 100%;height: calc(100 - 6vh)"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box box6">
|
||||
<h4 class="box-title">每月举办活动信息</h4>
|
||||
<div id="dateChart" style="height: calc(100% - 6vh);display: flex;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
userNum: {},
|
||||
unionMember: [],
|
||||
medicalData: {},
|
||||
configType: {
|
||||
data: [],
|
||||
showValue: true
|
||||
},
|
||||
box2Config: {
|
||||
data: [
|
||||
{
|
||||
name: '周口',
|
||||
value: 55
|
||||
},
|
||||
{
|
||||
name: '南阳',
|
||||
value: 120
|
||||
},
|
||||
{
|
||||
name: '西峡',
|
||||
value: 71
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
activityCodes: [],
|
||||
activityCode: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getActivityCode() {
|
||||
const {data} = await $.get('/platform/activity/basic/basic/settings/getActivityTwoLevelType', {code: '50000'})
|
||||
this.activityCodes = data
|
||||
this.activityCode = this.activityCodes[0].code
|
||||
},
|
||||
async getTypeNum() {
|
||||
const {data} = await $.get('/platform/datav/activity/typeNum')
|
||||
this.configType = {
|
||||
data,
|
||||
showValue: true
|
||||
}
|
||||
},
|
||||
async getTakePartUser() {
|
||||
const {data} = await $.get('/platform/datav/activity/takePartUser', {activityCode: this.activityCode})
|
||||
this.box2Config = {
|
||||
data
|
||||
}
|
||||
},
|
||||
async getUnionActivity(){
|
||||
const {data} = await $.get('/platform/datav/activity/unionActivity')
|
||||
const chart = new G2Plot.Column('unionChart', {
|
||||
data,
|
||||
padding: 50,
|
||||
xField: 'name',
|
||||
yField: 'value',
|
||||
forceFit: true,
|
||||
columnStyle: {
|
||||
radius: [20, 20, 0, 0],
|
||||
},
|
||||
xAxis: {
|
||||
label: {
|
||||
autoRotate: true,
|
||||
autoHide: true,
|
||||
autoEllipsis: true,
|
||||
style: {
|
||||
fill: '#fff', // 文字颜色:红色
|
||||
}
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
label: {
|
||||
style: {
|
||||
fill: '#fff',
|
||||
},
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
position: 'right', // 图例位置:下边
|
||||
offsetX: -10,
|
||||
itemName: {
|
||||
style: {
|
||||
fill: '#fff', // 文字颜色:红色
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
chart.render();
|
||||
},
|
||||
async getDateActivity(){
|
||||
const {data} = await $.get('/platform/datav/activity/dateActivity')
|
||||
const column = new G2Plot.Column('dateChart', {
|
||||
data,
|
||||
xField: 'type',
|
||||
yField: 'value',
|
||||
xAxis: {
|
||||
label: {
|
||||
autoRotate: false,
|
||||
autoHide: true,
|
||||
autoEllipsis: true,
|
||||
style: {
|
||||
fill: '#fff', // 文字颜色:红色
|
||||
}
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
label: {
|
||||
style: {
|
||||
fill: '#fff',
|
||||
},
|
||||
},
|
||||
},
|
||||
scrollbar: {
|
||||
type: 'horizontal',
|
||||
},
|
||||
columnStyle: {
|
||||
radius: [20, 20, 0, 0],
|
||||
},
|
||||
});
|
||||
|
||||
column.render();
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
setTimeout(async () => {
|
||||
this.getTypeNum()
|
||||
this.getUnionActivity()
|
||||
this.getDateActivity()
|
||||
await this.getActivityCode()
|
||||
await this.getTakePartUser()
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,566 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/datav/proposal.css">
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/datav/datav.map.vue.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-loader/httpVueLoader.js"></script>
|
||||
<!-- <script src="${base!}/assets/platform/plugins/g2/g2.min.js?v=4.1.9"></script>-->
|
||||
<!-- <script src="${base!}/assets/platform/plugins/g2/data-set.js"></script>-->
|
||||
<!-- <script src="${base!}/assets/platform/plugins/g2/g2plot.js?v=1.0.0"></script>-->
|
||||
|
||||
<script src="https://cdn.staticfile.org/g2plot/2.4.31/g2plot.min.js"></script>
|
||||
|
||||
<script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>
|
||||
<script src="https://cdn.staticfile.org/echarts/5.2.2/i18n/langZH.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div id="data-view">
|
||||
<div id="top-header">
|
||||
<dv-decoration-8 class="header-left-decoration"></dv-decoration-8>
|
||||
<dv-decoration-5 class="header-center-decoration"></dv-decoration-5>
|
||||
<dv-decoration-8 class="header-right-decoration" :reverse="true"></dv-decoration-8>
|
||||
<div class="center-title">提案</div>
|
||||
</div>
|
||||
<div id="main-content" style="">
|
||||
<dv-border-box-9 class="box1">
|
||||
<div class="box-title">
|
||||
提案类型统计
|
||||
</div>
|
||||
<div id="proposalTypeChart" style="height:calc((100vh - 160px) / 3)"></div>
|
||||
</dv-border-box-9>
|
||||
<dv-border-box-3 class="box2">
|
||||
<div class="middle">
|
||||
<dv-scroll-board :config="scrollBoardConfig"
|
||||
style="width:100%;padding:50px;height:35%;box-sizing: border-box"></dv-scroll-board>
|
||||
|
||||
<div class="ball ball1">
|
||||
<div class="title">代表人数</div>
|
||||
<div class="num">{{comprehensiveData.representativesNum || 0}}</div>
|
||||
</div>
|
||||
<div class="ball ball2">
|
||||
<div class="title">提案总数</div>
|
||||
<div class="num">{{comprehensiveData.proposalSum || 0}}</div>
|
||||
</div>
|
||||
<div class="ball ball3">
|
||||
<div class="title">个人提案</div>
|
||||
<div class="num">{{comprehensiveData.personalProposalNum || 0}}</div>
|
||||
</div>
|
||||
<div class="ball ball4">
|
||||
<div class="title">代表团提案</div>
|
||||
<div class="num">{{comprehensiveData.delegationProposalNum || 0}}</div>
|
||||
</div>
|
||||
<div class="cicle1"></div>
|
||||
</div>
|
||||
</dv-border-box-3>
|
||||
<dv-border-box-9 class="box3">
|
||||
<div class="box-title">
|
||||
提案满意度
|
||||
</div>
|
||||
<div id="satisfiedChart" style="height:calc((100vh - 160px) / 2)"></div>
|
||||
</dv-border-box-9>
|
||||
<dv-border-box-9 class="box4">
|
||||
<div class="box-title">
|
||||
提案立案率
|
||||
</div>
|
||||
<div id="caseRateChart" style="height:calc((100vh - 160px) / 3)"></div>
|
||||
</dv-border-box-9>
|
||||
<!-- <dv-border-box-9 class="box5">-->
|
||||
<!-- <div id="relationChart" style="height:calc((100vh - 160px) / 3)"></div>-->
|
||||
<!-- </dv-border-box-9>-->
|
||||
<dv-border-box-9 class="box6">
|
||||
<div class="box-title">
|
||||
提案代表团人数/提案数
|
||||
</div>
|
||||
<div id="delegationChart" style="height:calc((100vh - 160px) / 3)"></div>
|
||||
</dv-border-box-9>
|
||||
<dv-border-box-9 class="box7">
|
||||
<div class="box-title">
|
||||
承办单位承办提统计
|
||||
</div>
|
||||
<div id="underTakeChart" style="height:calc((100vh - 160px) / 3);"></div>
|
||||
</dv-border-box-9>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
comprehensiveData: {
|
||||
representativesNum: 0,
|
||||
proposalNum: 0
|
||||
},
|
||||
proposalNames: [],
|
||||
scrollBoardConfig: {},
|
||||
meetingId: '2b0c15egeeg8lo74lgaiu2cgev'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
renderProposalTypeCount() {
|
||||
$.get('/platform/datav/proposal/typeData', {meetingId: this.meetingId}).then(res => {
|
||||
const data = res.data
|
||||
const chart = new G2Plot.Column('proposalTypeChart', {
|
||||
data,
|
||||
padding: 50,
|
||||
autoFit: true,
|
||||
xField: 'type',
|
||||
yField: 'value',
|
||||
meta: {
|
||||
type: {
|
||||
alias: '类别',
|
||||
},
|
||||
sales: {
|
||||
alias: '数量',
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
label: {
|
||||
autoRotate: true,
|
||||
autoHide: false,
|
||||
autoEllipsis: false,
|
||||
style: {
|
||||
fill: '#fff', // 文字颜色
|
||||
}
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
label: {
|
||||
style: {
|
||||
fill: '#fff',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
chart.render()
|
||||
})
|
||||
},
|
||||
renderProposalSatisfied() {
|
||||
$.get('/platform/datav/proposal/satisfiedData', {meetingId: this.meetingId}).then(res => {
|
||||
const data = res.data
|
||||
const chart = new G2Plot.Pie('satisfiedChart', {
|
||||
data,
|
||||
padding: 30,
|
||||
autoFit: true,
|
||||
angleField: 'num',
|
||||
colorField: 'name',
|
||||
radius: 0.65,
|
||||
color: ['#9661BC', '#5B8FF9', '#61DDAA'],
|
||||
label: {
|
||||
type: 'spider',
|
||||
labelHeight: 28,
|
||||
content: '{name}\n{percentage}',
|
||||
style: {
|
||||
fill: '#fff', // 文字颜色:红色
|
||||
}
|
||||
},
|
||||
interactions: [{type: 'element-selected'}, {type: 'element-active'}],
|
||||
legend: {
|
||||
position: 'bottom', // 图例位置:右边
|
||||
offsetY: -25, // 在 y 轴上向下偏移 20px
|
||||
itemName: {
|
||||
style: {
|
||||
fill: '#fff', // 文字颜色:红色
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
chart.render();
|
||||
})
|
||||
},
|
||||
renderProposalCaseRate() {
|
||||
$.get('/platform/datav/proposal/caseRate', {meetingId: this.meetingId}).then(res => {
|
||||
const data = res.data
|
||||
const chart = new G2Plot.Radar('caseRateChart', {
|
||||
data,
|
||||
xField: 'name',
|
||||
yField: 'value',
|
||||
padding: 60,
|
||||
seriesField: 'type',
|
||||
meta: {
|
||||
num: {
|
||||
alias: '数量',
|
||||
min: 0
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
line: null,
|
||||
tickLine: null,
|
||||
grid: {
|
||||
line: {
|
||||
style: {
|
||||
lineDash: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
label: {
|
||||
style: {
|
||||
fill: '#fff', // 文字颜色:红色
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
line: null,
|
||||
tickLine: null,
|
||||
grid: {
|
||||
line: {
|
||||
type: 'line',
|
||||
style: {
|
||||
lineDash: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
label: {
|
||||
style: {
|
||||
fill: '#fff', // 文字颜色:红色
|
||||
},
|
||||
},
|
||||
},
|
||||
label: {
|
||||
style: {
|
||||
fill: '#fff'
|
||||
}
|
||||
},
|
||||
area: {},
|
||||
point: {
|
||||
size: 2,
|
||||
},
|
||||
legend: false
|
||||
});
|
||||
|
||||
chart.render();
|
||||
})
|
||||
},
|
||||
renderProposalDelegationCount() {
|
||||
$.get('/platform/datav/proposal/delegationCount', {meetingId: this.meetingId}).then(res => {
|
||||
const data = res.data
|
||||
const chart = new G2Plot.Column('delegationChart', {
|
||||
data,
|
||||
padding: 50,
|
||||
xField: 'name',
|
||||
yField: 'value',
|
||||
seriesField: 'type',
|
||||
isGroup: 'true',
|
||||
forceFit: true,
|
||||
columnStyle: {
|
||||
radius: [20, 20, 0, 0],
|
||||
},
|
||||
xAxis: {
|
||||
label: {
|
||||
autoRotate: true,
|
||||
autoHide: true,
|
||||
autoEllipsis: true,
|
||||
style: {
|
||||
fill: '#fff', // 文字颜色:红色
|
||||
}
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
label: {
|
||||
style: {
|
||||
fill: '#fff',
|
||||
},
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
position: 'right', // 图例位置:下边
|
||||
offsetX: -10,
|
||||
itemName: {
|
||||
style: {
|
||||
fill: '#fff', // 文字颜色:红色
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
chart.render();
|
||||
})
|
||||
},
|
||||
renderProposalUnderTakeCount() {
|
||||
$.get('/platform/datav/proposal/underTakeCount', {meetingId: this.meetingId}).then(res => {
|
||||
let data = res.data
|
||||
const chart = new G2Plot.Column(document.getElementById('underTakeChart'), {
|
||||
forceFit: true,
|
||||
data,
|
||||
padding: 50,
|
||||
xField: 'name',
|
||||
yField: 'value',
|
||||
columnStyle: {
|
||||
radius: [20, 20, 0, 0],
|
||||
},
|
||||
xAxis: {
|
||||
label: {
|
||||
autoHide: true,
|
||||
style: {
|
||||
fill: '#fff', // 文字颜色:红色
|
||||
}
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
label: {
|
||||
visible: true,
|
||||
formatter: (v) => v,
|
||||
style: {
|
||||
fill: '#fff',
|
||||
},
|
||||
},
|
||||
},
|
||||
interactions: [
|
||||
{
|
||||
type: 'scrollbar',
|
||||
},
|
||||
],
|
||||
});
|
||||
chart.render();
|
||||
|
||||
})
|
||||
},
|
||||
getComprehensiveData() {
|
||||
$.get('/platform/datav/proposal/comprehensiveData', {meetingId: this.meetingId}).then(res => {
|
||||
this.comprehensiveData = res.data
|
||||
})
|
||||
},
|
||||
getProposalNames() {
|
||||
$.get('/platform/datav/proposal/proposalNames', {meetingId: this.meetingId}).then(res => {
|
||||
this.proposalNames = res.data
|
||||
this.scrollBoardConfig = {
|
||||
header: ['提案名称'],
|
||||
data: res.data,
|
||||
index: true,
|
||||
columnWidth: [50],
|
||||
align: ['center'],
|
||||
waitTime: 2000
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.renderProposalTypeCount()
|
||||
this.renderProposalSatisfied()
|
||||
this.renderProposalCaseRate()
|
||||
this.renderProposalDelegationCount()
|
||||
this.renderProposalUnderTakeCount()
|
||||
this.getComprehensiveData()
|
||||
this.getProposalNames()
|
||||
|
||||
/*************** 关系图 **************/
|
||||
//初始化echarts实例
|
||||
const relationChart = echarts.init(document.getElementById("relationChart"));
|
||||
const relationOpt = {
|
||||
animationDurationUpdate: 1500,
|
||||
animationEasingUpdate: 'quinticInOut',
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
fontSize: 12
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
type: 'graph',
|
||||
symbolSize: 45,
|
||||
focusNodeAdjacency: true,
|
||||
roam: true,
|
||||
layout: 'force',
|
||||
force: {
|
||||
repulsion: 320 //斥力因子,值越大,斥力越大
|
||||
},
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
fontSize: 12
|
||||
},
|
||||
}
|
||||
},
|
||||
edgeSymbolSize: [4, 50],
|
||||
edgeLabel: {
|
||||
normal: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
fontSize: 10
|
||||
},
|
||||
formatter: "{c}"
|
||||
}
|
||||
},
|
||||
categories: [{
|
||||
name: '全栈',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#f2637b'
|
||||
}
|
||||
}
|
||||
}, {
|
||||
name: '前端',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "#eaa674",
|
||||
}
|
||||
}
|
||||
}, {
|
||||
name: '移动端',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "#3aa1ff",
|
||||
}
|
||||
}
|
||||
}, {
|
||||
name: '服务端',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "#4ecb73",
|
||||
}
|
||||
}
|
||||
}],
|
||||
data: [{
|
||||
name: '全栈',
|
||||
category: 0,
|
||||
draggable: true
|
||||
}, {
|
||||
name: '前端',
|
||||
category: 1,
|
||||
draggable: true
|
||||
}, {
|
||||
name: '移动端',
|
||||
category: 2,
|
||||
draggable: true
|
||||
}, {
|
||||
name: '服务端',
|
||||
category: 3,
|
||||
draggable: true
|
||||
}, {
|
||||
name: 'HTML',
|
||||
category: 1,
|
||||
draggable: true,
|
||||
}, {
|
||||
name: 'CSS',
|
||||
category: 1,
|
||||
draggable: true,
|
||||
}, {
|
||||
name: 'JavaScript',
|
||||
category: 1,
|
||||
draggable: true,
|
||||
}, {
|
||||
name: 'TypeScript',
|
||||
category: 1,
|
||||
draggable: true,
|
||||
}, {
|
||||
name: 'Java',
|
||||
category: 3,
|
||||
draggable: true,
|
||||
}, {
|
||||
name: 'PHP',
|
||||
category: 3,
|
||||
draggable: true,
|
||||
}, {
|
||||
name: 'Python',
|
||||
category: 3,
|
||||
draggable: true,
|
||||
}, {
|
||||
name: 'Andriod',
|
||||
category: 2,
|
||||
draggable: true,
|
||||
}, {
|
||||
name: 'Object-C',
|
||||
category: 2,
|
||||
draggable: true,
|
||||
}, {
|
||||
name: 'Swift',
|
||||
category: 2,
|
||||
draggable: true,
|
||||
}],
|
||||
links: [{
|
||||
source: 0,
|
||||
target: 1,
|
||||
value: ''
|
||||
}, {
|
||||
source: 0,
|
||||
target: 2,
|
||||
value: ''
|
||||
}, {
|
||||
source: 0,
|
||||
target: 3,
|
||||
value: ''
|
||||
}, {
|
||||
source: 1,
|
||||
target: 4,
|
||||
value: ''
|
||||
}, {
|
||||
source: 1,
|
||||
target: 5,
|
||||
value: ''
|
||||
}, {
|
||||
source: 1,
|
||||
target: 6,
|
||||
value: ''
|
||||
}, {
|
||||
source: 1,
|
||||
target: 7,
|
||||
value: ''
|
||||
}, {
|
||||
source: 6,
|
||||
target: 7,
|
||||
value: '超集'
|
||||
}, {
|
||||
source: 3,
|
||||
target: 8,
|
||||
value: ''
|
||||
}, {
|
||||
source: 3,
|
||||
target: 9,
|
||||
value: ''
|
||||
}, {
|
||||
source: 3,
|
||||
target: 10,
|
||||
value: ''
|
||||
}, {
|
||||
source: 9,
|
||||
target: 10,
|
||||
value: '脚本'
|
||||
}, {
|
||||
source: 2,
|
||||
target: 11,
|
||||
value: ''
|
||||
}, {
|
||||
source: 2,
|
||||
target: 12,
|
||||
value: ''
|
||||
}, {
|
||||
source: 2,
|
||||
target: 13,
|
||||
value: ''
|
||||
}, {
|
||||
source: 12,
|
||||
target: 13,
|
||||
value: 'iOS'
|
||||
}],
|
||||
lineStyle: {
|
||||
normal: {
|
||||
opacity: 0.9,
|
||||
width: 1,
|
||||
curveness: 0
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
relationChart.setOption(relationOpt);
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,350 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="/assets/platform/css/datav/staff.css">
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/datav/datav.map.vue.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-loader/httpVueLoader.js"></script>
|
||||
<script src="https://cdn.staticfile.org/g2plot/2.4.31/g2plot.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>
|
||||
<script src="https://cdn.staticfile.org/echarts/5.2.2/i18n/langZH.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="app">
|
||||
<div id="data-view">
|
||||
<div id="top-header">
|
||||
<dv-decoration-8 class="header-left-decoration"></dv-decoration-8>
|
||||
<dv-decoration-11 class="header-center-decoration">工会</dv-decoration-11>
|
||||
<dv-decoration-8 class="header-right-decoration" :reverse="true"></dv-decoration-8>
|
||||
</div>
|
||||
<div id="main-content">
|
||||
<div class="box box1">
|
||||
<h4 class="box-title">工会信息</h4>
|
||||
|
||||
<div style="display: grid;grid-template-columns: repeat(3,1fr);grid-row-gap: 2vh;height: calc(100% - 60px);">
|
||||
<template v-for="item in userNum">
|
||||
<div style="text-align: center">
|
||||
<img src="/assets/platform/img/datav/staff/icon03.png" alt=""
|
||||
style="width: 4vw;height: 4vw">
|
||||
<div style="text-align: center;font-size: 1vw;color: #02d4ec">
|
||||
{{item}}
|
||||
</div>
|
||||
<div style="text-align: center;font-size: 1vw;color: #02d4ec">
|
||||
会员人数
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- {{userNum.singleNum}}-->
|
||||
<!-- {{userNum.currentYearNewUserNum}}-->
|
||||
<!-- {{userNum.currentYearRetireUserNum}}-->
|
||||
<!-- {{userNum.difficultNum}}-->
|
||||
<!-- {{userNum.condolenceNum}}-->
|
||||
<!-- {{userNum.aidFundMemberNum}}-->
|
||||
<!-- {{userNum.medicalNum}}-->
|
||||
<!-- {{userNum.subsidyMoney}}-->
|
||||
|
||||
</div>
|
||||
<div class="box box2">
|
||||
<h4 class="box-title">各工会会员数</h4>
|
||||
<div id="unionMemberChart" style="width: 100%;height: 100px"></div>
|
||||
|
||||
<div class="unionList" style="display: flex;row-gap: 10px;flex-direction: column;padding: 10px">
|
||||
<div v-for="(item,index) in unionMember" :key="item.id" class="listRow clearBox"
|
||||
style="display: flex;column-gap: 20px">
|
||||
<div><span class="sameIndex" style="flex: 3">{{index + 1}}</span></div>
|
||||
<div style="flex: 10">
|
||||
<span>{{item.unionname}}</span>
|
||||
</div>
|
||||
<div style="flex: 20">
|
||||
<span class="sameLoad" style="width: 100%">
|
||||
<span class="loadBg" :style="{width: item.ratio+'%'}"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="sameCount" style="flex: 3;color: #057584;text-align: left">
|
||||
<span>{{item.value}}</span>
|
||||
<span>人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box box3">
|
||||
<h4 class="box-title">男女会员</h4>
|
||||
<div id="memberSexPercentageChart" style="height: calc(100% - 6vh);"></div>
|
||||
</div>
|
||||
<div class="box box4">
|
||||
<h4 class="box-title">人员类型</h4>
|
||||
<div id="userTypeChart" style="height: calc(100% - 6vh);"></div>
|
||||
</div>
|
||||
<div class="box box5">
|
||||
<h4 class="box-title">大病互助</h4>
|
||||
<div style="height: calc(100% - 6vh);display: flex;">
|
||||
<div id="medicalChart" style="width: calc(100% - 20vw)"></div>
|
||||
<div style="width: 20vw">
|
||||
<div style="display: flex;justify-content: space-around">
|
||||
<div style="text-align: center">
|
||||
<img src="/assets/platform/img/datav/staff/icon03.png" alt=""
|
||||
style="width: 4vw;height: 4vw">
|
||||
<div style="text-align: center;font-size: 1vw;color: #02d4ec">
|
||||
{{medicalData.aidFundMemberNum || 0}}
|
||||
</div>
|
||||
<div style="text-align: center;font-size: 1vw;color: #02d4ec">
|
||||
基金会员人数
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<img src="/assets/platform/img/datav/staff/icon03.png" alt=""
|
||||
style="width: 4vw;height: 4vw">
|
||||
<div style="text-align: center;font-size: 1vw;color: #02d4ec">
|
||||
{{medicalData.subsidyMoney || 0}}元
|
||||
</div>
|
||||
<div style="text-align: center;font-size: 1vw;color: #02d4ec">
|
||||
本年补助金额
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box box6">
|
||||
<h4 class="box-title">福利</h4>
|
||||
<div id="welfareChart" style="height: calc(100% - 6vh);display: flex;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
userNum: {},
|
||||
unionMember: [],
|
||||
medicalData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getUserNum() {
|
||||
const {data} = await $.get('/platform/datav/staff/userNum')
|
||||
this.userNum = data
|
||||
},
|
||||
async getMemberSexPercentage() {
|
||||
const {data} = await $.get('/platform/datav/staff/memberSexPercentage')
|
||||
const piePlot = new G2Plot.Pie('memberSexPercentageChart', {
|
||||
appendPadding: 10,
|
||||
data,
|
||||
angleField: 'value',
|
||||
colorField: 'type',
|
||||
radius: 1,
|
||||
innerRadius: 0.6,
|
||||
label: {
|
||||
type: 'inner',
|
||||
offset: '-50%',
|
||||
content: '{value}',
|
||||
style: {
|
||||
textAlign: 'center',
|
||||
fontSize: 14,
|
||||
},
|
||||
},
|
||||
legend: false,
|
||||
interactions: [{type: 'element-selected'}, {type: 'element-active'}],
|
||||
statistic: {
|
||||
title: false,
|
||||
content: {
|
||||
style: {
|
||||
whiteSpace: 'pre-wrap',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
piePlot.render();
|
||||
},
|
||||
|
||||
async renderUserType() {
|
||||
const {data} = await $.get('/platform/datav/staff/userTypeCount')
|
||||
const piePlot = new G2Plot.Column('userTypeChart', {
|
||||
data,
|
||||
xField: 'name',
|
||||
yField: 'value',
|
||||
padding: [20, 50, 50, 50],
|
||||
label: {
|
||||
// 可手动配置 label 数据标签位置
|
||||
position: 'middle', // 'top', 'bottom', 'middle',
|
||||
// 配置样式
|
||||
style: {
|
||||
fill: '#FFFFFF',
|
||||
opacity: 0.6,
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
label: {
|
||||
autoHide: true,
|
||||
autoRotate: false,
|
||||
style: {
|
||||
fill: '#FFFFFF',
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
label: {
|
||||
style: {
|
||||
fill: '#FFFFFF',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
meta: {
|
||||
type: {
|
||||
alias: '类别',
|
||||
},
|
||||
sales: {
|
||||
alias: '销售额',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
piePlot.render();
|
||||
|
||||
},
|
||||
|
||||
async getUnionMember() {
|
||||
const {data: {chartData, tableData}} = await $.get('/platform/datav/staff/unionMember')
|
||||
this.unionMember = tableData
|
||||
const labels = chartData.map(v => v.unionname)
|
||||
const values = chartData.map(v => v.value)
|
||||
const chart = new G2Plot.TinyArea('unionMemberChart', {
|
||||
autoFit: true,
|
||||
data: values,
|
||||
smooth: true,
|
||||
tooltip: {
|
||||
customContent: function (i, data) {
|
||||
if (labels[i]) {
|
||||
return labels[i] + '- ' + data[0]?.data?.y + '人';
|
||||
}
|
||||
return ''
|
||||
},
|
||||
},
|
||||
})
|
||||
chart.render();
|
||||
|
||||
|
||||
},
|
||||
|
||||
async renderMedical() {
|
||||
const {data} = await $.get('/platform/datav/staff/medicalData')
|
||||
this.medicalData = data
|
||||
const piePlot = new G2Plot.Column('medicalChart', {
|
||||
data: data.applyList,
|
||||
xField: 'year',
|
||||
yField: 'value',
|
||||
padding: [20, 50, 50, 50],
|
||||
label: {
|
||||
// 可手动配置 label 数据标签位置
|
||||
position: 'middle', // 'top', 'bottom', 'middle',
|
||||
// 配置样式
|
||||
style: {
|
||||
fill: '#FFFFFF',
|
||||
opacity: 0.6,
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
label: {
|
||||
autoHide: true,
|
||||
autoRotate: false,
|
||||
style: {
|
||||
fill: '#FFFFFF',
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
label: {
|
||||
style: {
|
||||
fill: '#FFFFFF',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
meta: {
|
||||
type: {
|
||||
alias: '类别',
|
||||
},
|
||||
sales: {
|
||||
alias: '销售额',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
piePlot.render();
|
||||
|
||||
|
||||
},
|
||||
|
||||
async renderWelfareData() {
|
||||
const {data} = await $.get('/platform/datav/staff/welfareData')
|
||||
const columnPlot = new G2Plot.Column('welfareChart', {
|
||||
data,
|
||||
xField: 'name',
|
||||
yField: 'count',
|
||||
padding: [20, 50, 50, 50],
|
||||
color: '#4f88f1',
|
||||
maxColumnWidth:40,
|
||||
label: {
|
||||
// 可手动配置 label 数据标签位置
|
||||
position: 'middle', // 'top', 'bottom', 'middle',
|
||||
// 配置样式
|
||||
style: {
|
||||
fill: '#FFFFFF',
|
||||
opacity: 0.6,
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
label: {
|
||||
autoHide: true,
|
||||
autoRotate: false,
|
||||
style: {
|
||||
fill: '#fff'
|
||||
}
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
label: {
|
||||
style: {
|
||||
fill: '#fff'
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
columnStyle: {
|
||||
radius: [20, 20, 0, 0],
|
||||
},
|
||||
});
|
||||
|
||||
columnPlot.render();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
setTimeout(() => {
|
||||
this.getUserNum()
|
||||
this.getMemberSexPercentage()
|
||||
this.renderUserType()
|
||||
this.getUnionMember()
|
||||
this.renderMedical()
|
||||
this.renderWelfareData()
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user