Files
UNION_NSI/target/classes/views/platform/datav/staff.html
T
2026-09-08 19:49:21 +08:00

351 lines
14 KiB
HTML

<!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>