first commit
This commit is contained in:
@@ -0,0 +1,230 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.addColumn {
|
||||
color: #c1c3c6;
|
||||
}
|
||||
|
||||
.deleteColumn {
|
||||
color: #c1c3c6;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
@change="yearChange"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.currentYear"
|
||||
value-format="yyyy"
|
||||
:clearable="false"
|
||||
type="year"
|
||||
:picker-options="pickerOptions"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="searchType==='按分工会分析'">
|
||||
<div class="search-item-label">分工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="分工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
@change="unionChange"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="searchType==='按单位分析'">
|
||||
<div class="search-item-label">单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
@change="unitChange"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="offscreen-right pull-right">
|
||||
<el-radio-group v-model="searchType" @change="searchTypeChange">
|
||||
<el-radio-button label="按分工会分析"></el-radio-button>
|
||||
<el-radio-button label="按单位分析"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
<div class="offscreen-right pull-right ml20">
|
||||
<el-button type="primary" @click="doExport">导出</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt20">
|
||||
<vi-title title="会员分析"></vi-title>
|
||||
<el-table :data="tableData" show-summary>
|
||||
<el-table-column align="center" header-align="center" type="index" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column v-if="searchType==='按分工会分析'" align="center" header-align="center"
|
||||
label="分工会"
|
||||
width="220px">
|
||||
<template scope="{row}">
|
||||
{{isDisPlayCode?'('+row.unionCode+')':null}}{{row.unionName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="searchType==='按单位分析'" align="center" header-align="center" label="单位"
|
||||
width="220px">
|
||||
<template scope="{row}">
|
||||
{{isDisPlayCode?'('+row.unitCode+')':null}}{{row.unitName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="年初数量"
|
||||
sortable
|
||||
prop="lastYearMemberNum"
|
||||
></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="新增人数"
|
||||
sortable
|
||||
prop="newMemberNum"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="【新入职(恢复)"
|
||||
sortable label-class-name="addColumn"
|
||||
prop="newResetMemberNum"
|
||||
>
|
||||
<template scope="{row}">
|
||||
<span style="color:#c1c3c6;">{{row.newResetMemberNum}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="校内转入】"
|
||||
sortable label-class-name="addColumn"
|
||||
prop="memberUnitChangeNumIn"
|
||||
>
|
||||
<template scope="{row}">
|
||||
<span style="color:#c1c3c6;">{{row.memberUnitChangeNumIn}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="减少人数"
|
||||
sortable
|
||||
prop="reduceMemberNum"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="【校内转出"
|
||||
sortable label-class-name="deleteColumn"
|
||||
prop="memberUnitChangeNumOut"
|
||||
>
|
||||
<template scope="{row}">
|
||||
<span style="color:#c1c3c6;">{{row.memberUnitChangeNumOut}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="其他(离职)】"
|
||||
sortable label-class-name="deleteColumn"
|
||||
prop="reduceOtherNum"
|
||||
>
|
||||
<template scope="{row}">
|
||||
<span style="color:#c1c3c6;">{{row.reduceOtherNum}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="当前数量"
|
||||
sortable
|
||||
prop="currentYearMemberNum"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
pageForm: {
|
||||
currentYear: null,
|
||||
unions: []
|
||||
},
|
||||
unions: [],
|
||||
units: [],
|
||||
tableData: [],
|
||||
fullTableData: [],
|
||||
searchType: '按分工会分析'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange(val) {
|
||||
this.pageForm.currentYear = val
|
||||
this.getData()
|
||||
},
|
||||
unionChange(val) {
|
||||
if (val == null || val == '') {
|
||||
this.tableData = this.fullTableData
|
||||
} else {
|
||||
this.tableData = this.fullTableData.filter(v => v.id === val)
|
||||
}
|
||||
},
|
||||
unitChange(val) {
|
||||
if (val == null || val == '') {
|
||||
this.tableData = this.fullTableData
|
||||
} else {
|
||||
this.tableData = this.fullTableData.filter(v => v.id === val)
|
||||
}
|
||||
},
|
||||
async getData() {
|
||||
const url = this.searchType === '按分工会分析' ? '/pageData' : '/pageData2'
|
||||
const resp = await $.post(loc() + url, this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
this.fullTableData = this.tableData
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
searchTypeChange(val) {
|
||||
this.getData()
|
||||
console.log(val)
|
||||
},
|
||||
doExport() {
|
||||
let url = '/platform/member/inquire/analysis/doExport?searchType=' + this.searchType
|
||||
+ "¤tYear=" + this.pageForm.currentYear
|
||||
if (this.pageForm.unionId) {
|
||||
url += "&unionId=" + this.pageForm.currentYear
|
||||
}
|
||||
if (this.pageForm.unitId) {
|
||||
url += "&unitId=" + this.pageForm.unitId
|
||||
}
|
||||
window.open(url)
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageForm.currentYear = moment().format('YYYY')
|
||||
await this.getData()
|
||||
this.unions = await getUnions(null)
|
||||
this.units = await getUnits(null)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,481 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.top-col {
|
||||
background-color: white;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
width: calc((100% - (20px * 3)) / 4);
|
||||
}
|
||||
|
||||
.top-col:not(:last-child), .center-col:not(:last-child) {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.col-title {
|
||||
color: rgba(0, 0, 0, .45);
|
||||
font-size: 14px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.top-col-member-number {
|
||||
font-size: 30px;
|
||||
color: rgba(0, 0, 0, .85);
|
||||
}
|
||||
|
||||
.top-col-chart {
|
||||
height: 80px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.center-col {
|
||||
background-color: white;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
width: calc((100% - (20px * 1)) / 2);
|
||||
}
|
||||
|
||||
.idx {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: rgba(0, 0, 0, .85);
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
background-color: #f0f0f0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.idx-rank {
|
||||
color: white !important;
|
||||
background-color: #314659 !important;
|
||||
}
|
||||
|
||||
.el-table__body-wrapper::-webkit-scrollbar {
|
||||
display: none; /* Chrome Safari */
|
||||
}
|
||||
|
||||
.el-table__body-wrapper {
|
||||
scrollbar-width: none; /* firefox */
|
||||
-ms-overflow-style: none; /* IE 10+ */
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-row style="background-color: #f0f2f5" type="flex">
|
||||
<el-col class="top-col" v-loading="loading.memberNumber">
|
||||
<div class="col-title">会员数</div>
|
||||
<div class="top-col-member-number">{{memberNumberData.memberNum}}<span
|
||||
style="font-size: 14px"> 人</span></div>
|
||||
<div style="color: rgba(0,0,0,.85);margin-top: 20px;font-size: 14px;display: flex;align-items: center;justify-content:flex-end;">
|
||||
年同比 {{memberNumberData.ratio}} 
|
||||
<svg aria-hidden="true" data-icon="caret-up" fill="currentColor" focusable="false"
|
||||
height="1em"
|
||||
style="color: #67C23A"
|
||||
v-if="memberNumberData.diff>=0"
|
||||
viewBox="0 0 1024 1024" width="1em">
|
||||
<path d="M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"></path>
|
||||
</svg>
|
||||
|
||||
<svg aria-hidden="true" data-icon="caret-up" fill="currentColor" focusable="false"
|
||||
height="1em"
|
||||
style="color: #F56C6C"
|
||||
v-else
|
||||
viewBox="0 0 1024 1024" width="1em">
|
||||
<path d="M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col class="top-col" v-loading="loading.growthTrend">
|
||||
<div class="col-title">增长趋势</div>
|
||||
<div class="top-col-chart" id="growthTrendChart"></div>
|
||||
</el-col>
|
||||
<el-col class="top-col" v-loading="loading.memberPercentage">
|
||||
<div class="col-title">会员占比</div>
|
||||
<div class="top-col-chart" id="memberPercentageChart"
|
||||
style="position: absolute;height: 120px;right: -10%;bottom: 20px"></div>
|
||||
</el-col>
|
||||
<el-col class="top-col" v-loading="loading.growthTrend">
|
||||
<div class="col-title">男女占比</div>
|
||||
<div class="top-col-chart" id="memberSexPercentageChart"
|
||||
style="position: absolute;height: 120px;right: -10%;bottom: 20px"></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row style="background-color: #f0f2f5;margin-top: 20px" type="flex">
|
||||
<el-col class="center-col" v-loading="loading.unionMember">
|
||||
<div class="col-title">工会会员数</div>
|
||||
|
||||
<div id="unionMemberChart" style="width: 100%;height: 100px"></div>
|
||||
|
||||
<el-table :data="unionMember" :header-cell-style="{background:'#FAFAFA'}"
|
||||
height="calc(100vh - 160px - 300px)"
|
||||
row-key="id" style="width: 100%;margin-top: 20px">
|
||||
<el-table-column label="序号" width="100px">
|
||||
<template scope="{$index}">
|
||||
<div class="idx idx-rank" v-if="$index<3">{{$index+1}}</div>
|
||||
<div class="idx" v-else>{{$index+1}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="院级工会" prop="unioncode"
|
||||
show-overflow-tooltip sortable>
|
||||
<template scope="{row}">
|
||||
{{row.unionname}} {{isDisPlayCode?'('+row.unioncode+')':null}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="会员人数" prop="value"
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
width="120px"></el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col class="center-col">
|
||||
<div class="col-title">在职状态</div>
|
||||
<div id="userStateMemberChart"
|
||||
style="width: 100%;height:calc(50% - 35px);box-sizing: border-box;padding: 30px 10px"
|
||||
v-loading="loading.userStateMember"></div>
|
||||
|
||||
|
||||
<div class="col-title">人员类型</div>
|
||||
<div id="personTypeMemberChart"
|
||||
style="width: 100%;height:calc(50% - 35px);box-sizing: border-box;padding: 30px 10px"
|
||||
v-loading="loading.personTypeMember"></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const chart = {
|
||||
growthTrendChart: undefined,
|
||||
memberPercentageChart: undefined,
|
||||
memberSexPercentageChart: undefined,
|
||||
unionMemberChart: undefined,
|
||||
personTypeMemberChart: undefined,
|
||||
userStateMemberChart: undefined,
|
||||
}
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [],
|
||||
data() {
|
||||
return {
|
||||
loading: {
|
||||
memberNumber: false,
|
||||
growthTrend: false,
|
||||
memberPercentage: false,
|
||||
memberSexPercentage: false,
|
||||
unionMember: false,
|
||||
personTypeMember: false,
|
||||
userStateMember: false,
|
||||
},
|
||||
|
||||
memberNumberData: {
|
||||
memberNum: '--',
|
||||
lastYearMemberNum: '--',
|
||||
ratio: '0.0%',
|
||||
diff: 0,
|
||||
},
|
||||
|
||||
memberPercentage: '--',
|
||||
|
||||
unionMember: [],
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
/**
|
||||
* 会员数
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getMemberNumber() {
|
||||
this.loading.memberNumber = true
|
||||
const resp = await $.get(loc() + '/memberNumber')
|
||||
if (resp.code === 0) {
|
||||
const {data: {memberNum, lastYearMemberNum}} = resp
|
||||
const diff = memberNum - lastYearMemberNum
|
||||
const ratio = (lastYearMemberNum ? (Math.abs(diff) / lastYearMemberNum * 100) : diff / 1 * 10).toFixed(2) + " %"
|
||||
this.memberNumberData = {memberNum, lastYearMemberNum, diff, ratio}
|
||||
this.loading.memberNumber = false
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 增长趋势
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getGrowthTrend() {
|
||||
this.loading.growthTrend = true
|
||||
const resp = await $.get(loc() + '/growthTrend')
|
||||
this.loading.growthTrend = false
|
||||
if (resp.code === 0) {
|
||||
const {data} = resp
|
||||
|
||||
const labels = data.map(v => v.label)
|
||||
const values = data.map(v => v.value)
|
||||
if (chart.growthTrendChart) {
|
||||
chart.growthTrendChart.changeData(values)
|
||||
return
|
||||
}
|
||||
|
||||
chart.growthTrendChart = new G2Plot.TinyArea('growthTrendChart', {
|
||||
autoFit: true,
|
||||
data: values,
|
||||
smooth: true,
|
||||
showContent: true,
|
||||
areaStyle: {
|
||||
fill: '#d6e3fd',
|
||||
},
|
||||
tooltip: {
|
||||
customContent: function (i, data) {
|
||||
if (labels[i]) {
|
||||
return labels[i] + '-' + data[0]?.data?.y + '人';
|
||||
}
|
||||
return ''
|
||||
},
|
||||
},
|
||||
});
|
||||
chart.growthTrendChart.render();
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 会员占比
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getMemberPercentage() {
|
||||
this.loading.memberPercentage = true
|
||||
const resp = await $.get(loc() + '/memberPercentage')
|
||||
this.loading.memberPercentage = false
|
||||
if (resp.code === 0) {
|
||||
const {data} = resp
|
||||
this.memberPercentage = data.toFixed(2)
|
||||
if (chart.memberPercentageChart) {
|
||||
chart.memberPercentageChart.changeData(data)
|
||||
return
|
||||
}
|
||||
chart.memberPercentageChart = new G2Plot.Liquid('memberPercentageChart', {
|
||||
outline: {
|
||||
border: 4,
|
||||
distance: 8,
|
||||
},
|
||||
wave: {
|
||||
length: 128,
|
||||
},
|
||||
autoFit: true,
|
||||
percent: data,
|
||||
statistic: {
|
||||
content: {
|
||||
style: {
|
||||
fontSize: 16
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
chart.memberPercentageChart.render();
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 男女占比
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getMemberSexPercentage() {
|
||||
this.loading.memberSexPercentage = true
|
||||
const resp = await $.get(loc() + '/memberSexPercentage')
|
||||
this.loading.memberSexPercentage = false
|
||||
if (resp.code === 0) {
|
||||
const {data} = resp
|
||||
if (chart.memberSexPercentageChart) {
|
||||
chart.memberSexPercentageChart.changeData(data)
|
||||
return
|
||||
}
|
||||
|
||||
chart.memberSexPercentageChart = new G2Plot.Pie('memberSexPercentageChart', {
|
||||
data,
|
||||
angleField: 'value',
|
||||
colorField: 'type',
|
||||
legend: false,
|
||||
label: {
|
||||
formatter: () => '',
|
||||
},
|
||||
interactions: [{type: 'element-active'}], color: ['#409EFF', '#F56C6C'],
|
||||
});
|
||||
chart.memberSexPercentageChart.render();
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 各工会会员数
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getUnionMember() {
|
||||
this.loading.unionMember = true
|
||||
const resp = await $.get(loc() + '/unionMember')
|
||||
this.loading.unionMember = false
|
||||
if (resp.code === 0) {
|
||||
const {chartData, tableData} = resp.data
|
||||
|
||||
this.unionMember = tableData
|
||||
|
||||
const labels = chartData.map(v => v.unionname)
|
||||
const values = chartData.map(v => v.value)
|
||||
|
||||
if (chart.unionMemberChart) {
|
||||
chart.unionMemberChart.changeData(values)
|
||||
return
|
||||
}
|
||||
|
||||
chart.unionMemberChart = 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.unionMemberChart.render();
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据人员类型查找会员数
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getPersonTypeMember() {
|
||||
this.loading.personTypeMember = true
|
||||
const resp = await $.get(loc() + '/personTypeMember')
|
||||
this.loading.personTypeMember = false
|
||||
if (resp.code === 0) {
|
||||
const {data} = resp
|
||||
|
||||
if (chart.personTypeMemberChart) {
|
||||
chart.personTypeMemberChart.changeData(data)
|
||||
return
|
||||
}
|
||||
|
||||
chart.personTypeMemberChart = new G2Plot.Column('personTypeMemberChart', {
|
||||
data,
|
||||
autoFit: true,
|
||||
xField: 'label',
|
||||
yField: 'value',
|
||||
label: {
|
||||
// 可手动配置 label 数据标签位置
|
||||
position: 'middle', // 'top', 'bottom', 'middle',
|
||||
// 配置样式
|
||||
style: {
|
||||
fill: '#FFFFFF',
|
||||
opacity: 0.6,
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
label: {
|
||||
autoHide: true,
|
||||
autoRotate: false,
|
||||
},
|
||||
},
|
||||
meta: {
|
||||
label: {
|
||||
alias: '类型',
|
||||
},
|
||||
value: {
|
||||
alias: '会员数',
|
||||
},
|
||||
},
|
||||
});
|
||||
chart.personTypeMemberChart.render()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据在职状态查找会员数
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getUserStateMember() {
|
||||
this.loading.userStateMember = true
|
||||
const resp = await $.get(loc() + '/userStateMember')
|
||||
this.loading.userStateMember = false
|
||||
if (resp.code === 0) {
|
||||
const {data} = resp
|
||||
|
||||
if (chart.userStateMemberChart) {
|
||||
chart.userStateMemberChart.changeData(data)
|
||||
return
|
||||
}
|
||||
|
||||
chart.userStateMemberChart = new G2Plot.Radar('userStateMemberChart', {
|
||||
data,
|
||||
xField: 'label',
|
||||
yField: 'value',
|
||||
appendPadding: [0, 10, 0, 10],
|
||||
meta: {
|
||||
value: {
|
||||
alias: '会员数量',
|
||||
min: 0,
|
||||
nice: true,
|
||||
formatter: (v) => parseInt(v),
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
tickLine: null,
|
||||
},
|
||||
yAxis: {
|
||||
label: false,
|
||||
grid: {
|
||||
alternateColor: 'rgba(0, 0, 0, 0.04)',
|
||||
},
|
||||
},
|
||||
// 开启辅助点
|
||||
point: {
|
||||
size: 2,
|
||||
},
|
||||
area: {},
|
||||
});
|
||||
chart.userStateMemberChart.render();
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
initData() {
|
||||
this.getMemberNumber()
|
||||
this.getGrowthTrend()
|
||||
this.getMemberPercentage()
|
||||
this.getMemberSexPercentage()
|
||||
this.getUnionMember()
|
||||
this.getPersonTypeMember()
|
||||
this.getUserStateMember()
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,264 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">模糊查询:</div>
|
||||
<div class="search-item-option">
|
||||
<member-cnd @cnd="(v)=>pageForm={...pageForm,...v}"></member-cnd>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
@change="getThreeUnits"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-if="searchMore">
|
||||
<!-- <div class="search-item">-->
|
||||
<!-- <div class="search-item-label">工会小组:</div>-->
|
||||
<!-- <div class="search-item-option">-->
|
||||
<!-- <el-select v-model="pageForm.unionGroupId" style="width: 100%"-->
|
||||
<!-- filterable-->
|
||||
<!-- clearable-->
|
||||
<!-- @change="getThreeUnits"-->
|
||||
<!-- placeholder="请选择">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in unionGroups"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.groupName"-->
|
||||
<!-- :value="item.id">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div class="search-item">-->
|
||||
<!-- <div class="search-item-label">组成科室:</div>-->
|
||||
<!-- <div class="search-item-option">-->
|
||||
<!-- <el-select v-model="pageForm.threeUnitId" style="width: 100%" filterable-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请选择">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in threeUnits"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.name"-->
|
||||
<!-- :value="item.id">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">职工信息:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
|
||||
style="width: 80px;">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">人员类型:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select v-model="pageForm.personType" style="width: 100%" clearable
|
||||
placeholder="人员类型"
|
||||
code="UserType"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">在职状态:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select v-model="pageForm.userState" style="width: 100%" clearable
|
||||
placeholder="在职状态"
|
||||
code="UserState"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">会员状态:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="会员状态" v-model="pageForm.memberStatus" style="width: 100%"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in memberStatusList" :label="item.name"
|
||||
:value="item.code"></el-option>
|
||||
</el-select>
|
||||
<!-- <dict-select v-model="pageForm.memberStatus" style="width: 100%" clearable
|
||||
placeholder="会员状态" code="memberStatusText"></dict-select>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
|
||||
<more v-model="searchMore"></more>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="用户列表" :app="this">
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData">
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" width="100px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
|
||||
<el-tabs v-model="active">
|
||||
<el-tab-pane label="个人信息" name="info">
|
||||
<member ref="memberInfo" :id="userId" view></member>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
memberStatusList: [],
|
||||
pageForm: {
|
||||
searchName: "u.username",
|
||||
year: new Date().getFullYear() - 1 + "",
|
||||
},
|
||||
unions: [],
|
||||
units: [],
|
||||
tableColumns: [
|
||||
{prop: 'loginname', label: '工号'},
|
||||
{prop: 'username', label: '姓名'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'mobile', label: '联系电话'},
|
||||
{prop: 'personType', label: '人员类型', sortable: true},
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true},
|
||||
// {prop: 'unionGroupName', label: '工会小组', sortable: true},
|
||||
],
|
||||
userId:null,
|
||||
active:'info'
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||||
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
|
||||
'member-cnd': httpVueLoader('/components/member/MemberCnd.vue'),
|
||||
},
|
||||
methods: {
|
||||
openView(row){
|
||||
console.log(row)
|
||||
console.log(row.userId)
|
||||
this.userId = row.userId
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.$set(this.pageForm, "unionGroupId", null)
|
||||
this.$set(this.pageForm, "threeUnitId", null)
|
||||
this.units = []
|
||||
this.unionGroups = []
|
||||
this.threeUnits = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.memberStatusList = await getDictOptions("memberStatusText")
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,861 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.reverseCheckBox {
|
||||
margin: 0 10px 0 0 !important;
|
||||
}
|
||||
|
||||
.query-row {
|
||||
height: 70px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
/*.query-row:not(:last-child,:first-child) {*/
|
||||
/* height: 70px;*/
|
||||
/*}*/
|
||||
|
||||
.query-row-title {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.query-row > .query-title {
|
||||
width: 100px;
|
||||
max-width: 100px;
|
||||
min-width: 100px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row > .query-content {
|
||||
min-width: 200px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row > .query-content > .el-tag {
|
||||
margin-bottom: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 992px) {
|
||||
.query-row:nth-child(4) .query-content .el-col:not(:last-child) {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.query-title {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">年  度:</el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-date-picker @change="doSearch()"
|
||||
style="width: 200px"
|
||||
:picker-options="pickerOptions"
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年" :clearable="false">
|
||||
</el-date-picker>
|
||||
<el-link type="primary" style="margin-left: 10px"
|
||||
:underline="false"
|
||||
@click="pageForm.year=moment().format('YYYY');doSearch()">
|
||||
本年
|
||||
</el-link>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-input placeholder="请输入内容" clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
style="width: 600px"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 80px;">
|
||||
<el-option label="姓名" value="username"></el-option>
|
||||
<el-option label="工号" value="loginname"></el-option>
|
||||
</el-select>
|
||||
<el-button slot="append" @click="doSearch">搜索</el-button>
|
||||
</el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>所属工会:</span>
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
clearable="true"
|
||||
multiple
|
||||
style="margin-left: 33px;width: 80%"
|
||||
@change="flushUnits();doSearch()"
|
||||
@clear="flushUnits();doSearch()"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>所属单位:</span>
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId"
|
||||
@change="getThreeUnitsByGroupIdsOrUnitIds"
|
||||
clearable
|
||||
multiple
|
||||
style="margin-left: 33px;width: 80%"
|
||||
filterable>
|
||||
<el-option v-for="item in units" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row type="flex" align="middle" class="query-row">-->
|
||||
<!-- <el-col class="query-row-content">-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <span>工会小组:</span>-->
|
||||
<!-- <el-select v-model="pageForm.unionGroupId"-->
|
||||
<!-- filterable-->
|
||||
<!-- clearable-->
|
||||
<!-- multiple-->
|
||||
<!-- style="margin-left: 33px;width: 80%"-->
|
||||
<!-- @change="getThreeUnitsByGroupIdsOrUnitIds"-->
|
||||
<!-- placeholder="请选择">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in unionGroups"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.groupName"-->
|
||||
<!-- :value="item.id">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <span>组成科室:</span>-->
|
||||
<!-- <el-select v-model="pageForm.threeUnitId" filterable-->
|
||||
<!-- clearable-->
|
||||
<!-- multiple-->
|
||||
<!-- style="margin-left: 33px;width: 80%"-->
|
||||
<!-- placeholder="请选择">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in threeUnits"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.name"-->
|
||||
<!-- :value="item.id">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<el-row class="query-row">
|
||||
<el-col class="query-row-title">性别:</el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-tag
|
||||
:effect="pageForm.sexTypes.includes(item.name)?'dark':'plain'"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
@click="tagClick('sexTypes',item.name)"
|
||||
style="margin-right: 10px;cursor: pointer"
|
||||
v-for="item in sexTypeOptions">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">会员状态:</el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-tag
|
||||
style="margin-right: 10px;cursor: pointer"
|
||||
v-for="item in memberStatusOptions"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
:effect="pageForm.memberStatus.includes(item.code)?'dark':'plain'"
|
||||
@click="checkMemberStatusType(item.code)">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
|
||||
<el-link type="danger"
|
||||
v-if="memberStatusOptions.length&&pageForm.memberStatus.length"
|
||||
:underline="false"
|
||||
@click="pageForm.memberStatus=[];doSearch()">清空
|
||||
</el-link>
|
||||
<el-link :underline="false"
|
||||
@click="pageForm.memberStatus=memberStatusOptions.map(p=>p.code);doSearch()"
|
||||
type="success">全部
|
||||
</el-link>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">人员类型:</el-col>
|
||||
<el-col class="query-row-content">
|
||||
|
||||
<el-tag
|
||||
style="margin-right: 10px;cursor: pointer"
|
||||
v-for="item in personTypeOptions"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
:effect="pageForm.personTypes.includes(item.name)?'dark':'plain'"
|
||||
@click="checkPersonType(item.name)">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
|
||||
<el-link type="danger"
|
||||
v-if="personTypeOptions.length&&pageForm.personTypes.length"
|
||||
:underline="false"
|
||||
@click="pageForm.personTypes=[];doSearch()">清空
|
||||
</el-link>
|
||||
<el-link :underline="false"
|
||||
@click="pageForm.personTypes=personTypeOptions.map(p=>p.code);doSearch()"
|
||||
type="success">全部
|
||||
</el-link>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">在职状态:</el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-tag
|
||||
style="margin-right: 10px;cursor: pointer"
|
||||
v-for="item in userStateOptions"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
:effect="pageForm.userStates.includes(item.name)?'dark':'plain'"
|
||||
@click="tagClick('userStates',item.name)">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
|
||||
<el-link type="danger"
|
||||
v-if="userStateOptions.length&&pageForm.userStates.length"
|
||||
:underline="false"
|
||||
@click="pageForm.userStates=[];doSearch()">清空
|
||||
</el-link>
|
||||
<el-link :underline="false"
|
||||
@click="pageForm.userStates=userStateOptions.map(p=>p.code);doSearch()"
|
||||
type="success">全部
|
||||
</el-link>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">系统角色:</el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-select @change="getRoleListByMenuId" v-model="pageForm.module"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%" placeholder="请选择角色所属的系统">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in menuOptions">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6" v-if="relatedSessionMenus.includes(pageForm.module)">
|
||||
<el-select filterable
|
||||
placeholder="届次"
|
||||
style="width: 100%"
|
||||
:disabled="!relatedSessionMenus.includes(pageForm.module)"
|
||||
v-model="pageForm.teacherMeetingId">
|
||||
<el-option :key="item.id" :label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in meetingOptions">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select
|
||||
@change="doSearch" clearable filterable
|
||||
placeholder="请选择角色"
|
||||
multiple
|
||||
style="width: 100%"
|
||||
v-model="pageForm.roleIds">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in roleList"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row class="query-row" type="flex" align="middle"
|
||||
v-if="is_H10===true||is_A06===true||is_sysadmin===true||is_H04===true">
|
||||
<el-col class="query-row-title">出生日期:</el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-date-picker
|
||||
v-model="pageForm.startDate"
|
||||
type="date"
|
||||
@change="determineStartDate"
|
||||
placeholder="选择开始日期">
|
||||
</el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="pageForm.endDate"
|
||||
type="date"
|
||||
@change="determineEndDate"
|
||||
placeholder="选择结束日期">
|
||||
</el-date-picker>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row class="query-row" type="flex" align="middle"
|
||||
v-if="is_H10===true||is_A06===true||is_sysadmin===true||is_H04===true">
|
||||
<el-col class="query-row-title">年龄范围:</el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row type="flex" style="align-items: center">
|
||||
<el-col :span="15">
|
||||
<el-slider
|
||||
v-model="pageForm.age"
|
||||
range
|
||||
show-stops
|
||||
:max="100">
|
||||
</el-slider>
|
||||
</el-col>
|
||||
<el-col :span="9" class="pl20">
|
||||
当前范围:{{ pageForm.age }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">模糊查询:</el-col>
|
||||
<el-col class="query-row-content">
|
||||
<member-cnd @cnd="(v)=>pageForm={...pageForm,...v}"></member-cnd>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--<el-row class="query-row"
|
||||
v-if="is_H10===true||is_A06===true||is_sysadmin===true||is_H04===true">
|
||||
<el-col class="query-title">条件匹配:</el-col>
|
||||
<el-col class="query-content">
|
||||
<user-cnd @cnd="(v)=>{this.$set(this.pageForm,'activityUserCnd',v)}"></user-cnd>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
|
||||
|
||||
<el-row class="query-row" style="justify-content: end">
|
||||
<el-checkbox v-model="pageForm.reverseSelection" label="是否反选" border
|
||||
@change="doSearch"
|
||||
class="reverseCheckBox" ></el-checkbox>
|
||||
<el-button type="danger" icon="el-icon-circle-close" @click="doReset">重置
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" style="margin-top: 10px">
|
||||
<table-tool :label="pageForm.year==moment().format('YYYY')?'本年会员':'历史会员'"
|
||||
:app="this">
|
||||
<template #func>
|
||||
|
||||
<el-button slot="reference"
|
||||
@click="allIsWelfareMember"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
type="primary" :loading="welfareMemberLoading" size="medium">
|
||||
全部设置为福利会员
|
||||
</el-button>
|
||||
|
||||
<!-- <el-popconfirm-->
|
||||
<!-- v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"-->
|
||||
<!-- title="确定要将所有会员设为福利会员吗?"-->
|
||||
<!-- @confirm="allIsWelfareMember"-->
|
||||
<!-- >-->
|
||||
|
||||
<!-- </el-popconfirm>-->
|
||||
|
||||
<!-- <el-button v-if="${@shiro.hasRole('sysadmin')}" icon="el-icon-printer" class="m10"-->
|
||||
<!-- type="primary"-->
|
||||
<!-- style="float: right"-->
|
||||
<!-- size="medium" @click="doExport">导出全部字段内容-->
|
||||
<!-- </el-button>-->
|
||||
|
||||
<el-button icon="el-icon-printer" class="m10" type="primary"
|
||||
style="float: right"
|
||||
size="small" @click="doExportByUnion">导出
|
||||
</el-button>
|
||||
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%" stripe border
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template v-if="column.prop==='unitname'" scope="{row}">
|
||||
{{isDisPlayCode?'('+row.unitcode+')':null}}{{row.unitname}}
|
||||
</template>
|
||||
<template v-else-if="column.prop==='unionname'" scope="{row}">
|
||||
{{isDisPlayCode?'('+row.unioncode+')':null}}{{row.unionname}}
|
||||
</template>
|
||||
<template v-else-if="column.prop==='memberJoinTime'" scope="{row}">
|
||||
{{moment(row.memberJoinTime).format('YYYY-MM-DD')}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" width="100px">
|
||||
<template scope="{row:{id}}">
|
||||
<el-button size="small" @click="openView(id)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
|
||||
<el-tabs v-model="active">
|
||||
<el-tab-pane label="个人信息" name="info">
|
||||
<member ref="memberInfo" :id="userId" view></member>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="变更记录" name="change">
|
||||
<mem-change-records :userid="userId"></mem-change-records>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog
|
||||
:title="welfareTitle"
|
||||
:visible.sync="addWelfareDialogVisible"
|
||||
width="30%">
|
||||
<el-form>
|
||||
<el-form-item label="添加模式">
|
||||
<el-radio-group v-model="isAppendWelfareMember">
|
||||
<el-radio-button :label="true">数据追加</el-radio-button>
|
||||
<el-radio-button :label="false">清空更新</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="addWelfareDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addWelfare">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
sexTypeOptions: [
|
||||
{code: '男', name: '男'},
|
||||
{code: '女', name: '女'}
|
||||
],
|
||||
menuOptions: [],
|
||||
relatedSessionMenus: ['aca4d14498c145ceb5b24ed70776aae2', '733d7266652740a3aeac9da97ab5eeca', 'fe2d0768e26d4a80beeb159306bb8d01'],
|
||||
meetingOptions: [],
|
||||
roleList: [],
|
||||
roleData:{},
|
||||
|
||||
isAppendWelfareMember: true,
|
||||
welfareTitle: '',
|
||||
memberCnd: null,
|
||||
addWelfareDialogVisible: false,
|
||||
active: 'info',
|
||||
submitLoading: false,
|
||||
pageForm: {
|
||||
unionId: [],
|
||||
unitId: [],
|
||||
unionGroupId:[],
|
||||
threeUnitId:[],
|
||||
searchName: "username",
|
||||
personTypes: [],
|
||||
userStates: [],
|
||||
memberStatus: [],
|
||||
year: moment().format('YYYY'),
|
||||
roleIds: [],
|
||||
age: [0, 0],
|
||||
minAge: 0,
|
||||
maxAge: 0,
|
||||
module: '',
|
||||
sexTypes: [],
|
||||
reverseSelection: false,
|
||||
activityUserCnd: '',
|
||||
startDate:'',
|
||||
endDate:''
|
||||
},
|
||||
|
||||
personTypeOptions: [],
|
||||
userStateOptions: [],
|
||||
memberStatusOptions: [],
|
||||
|
||||
userId: "",
|
||||
unions: [],
|
||||
units: [],
|
||||
pickerOptions: {
|
||||
disabledDate: time => {
|
||||
return time.getTime() > Date.now();
|
||||
}
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'loginname', label: '工号'},
|
||||
{prop: 'username', label: '姓名'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'birthday', label: '出生年月', sortable: true},
|
||||
{prop: 'mobile', label: '联系电话'},
|
||||
{prop: 'idcard', label: '身份证号', width: 170},
|
||||
{prop: 'position', label: '职务', sortable: true, checked: 0},
|
||||
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
|
||||
{prop: 'personType', label: '人员类型', sortable: true},
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true},
|
||||
// {prop: 'unionGroupName', label: '工会小组', sortable: true},
|
||||
{prop: 'campusName', label: '所属校区', sortable: true, checked: 0},
|
||||
{prop: 'marriage', label: '婚否', checked: 0},
|
||||
{prop: 'education', label: '学历', checked: 0},
|
||||
{prop: 'hometown', label: '籍贯', checked: 0},
|
||||
{prop: 'nation', label: '民族', checked: 0},
|
||||
{prop: 'political', label: '政治面貌', checked: 0},
|
||||
{prop: 'memberJoinTime', label: '入会时间', checked: 0},
|
||||
{prop: 'memberNumber', label: '会员号', checked: 0},
|
||||
],
|
||||
welfareMemberLoading: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
|
||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.1'),
|
||||
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
|
||||
'member-cnd': httpVueLoader('/components/member/MemberCnd.vue'),
|
||||
'user-cnd': httpVueLoader('/components/plugins/UserCnd.vue'),
|
||||
},
|
||||
methods: {
|
||||
async allIsWelfareMember() {
|
||||
this.welfareTitle = "提醒:您将【" + this.pageForm.totalCount + "】位会员设置为福利会员"
|
||||
this.addWelfareDialogVisible = true
|
||||
},
|
||||
addWelfare() {
|
||||
//const tips = this.pageForm.personTypes.join(",")
|
||||
this.$confirm('请确认是否将' + this.pageForm.totalCount + "位会员设置设为福利会员?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.unionId = JSON.stringify(pageForm.unionId)
|
||||
pageForm.unitId = JSON.stringify(pageForm.unitId)
|
||||
pageForm.unionGroupId = JSON.stringify(pageForm.unionGroupId)
|
||||
pageForm.threeUnitId = JSON.stringify(pageForm.threeUnitId)
|
||||
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
|
||||
pageForm.userStates = JSON.stringify(pageForm.userStates)
|
||||
pageForm.memberStatus = JSON.stringify(pageForm.memberStatus)
|
||||
|
||||
pageForm.memberTypes = JSON.stringify(pageForm.memberTypes)
|
||||
pageForm.sexTypes = JSON.stringify(pageForm.sexTypes)
|
||||
pageForm.roleIds = JSON.stringify(pageForm.roleIds)
|
||||
pageForm.age = JSON.stringify(pageForm.age)
|
||||
pageForm.isAppendWelfareMember = this.isAppendWelfareMember
|
||||
|
||||
const resp = await $.post("/platform/member/change/mange/allIsWelfareMember", pageForm)
|
||||
if (resp.code === 0){
|
||||
this.$notify.success(resp.msg)
|
||||
this.addWelfareDialogVisible = false
|
||||
}
|
||||
}).catch(() => {
|
||||
|
||||
});
|
||||
},
|
||||
doExport() {
|
||||
const memberStatus = JSON.stringify(this.pageForm.memberStatus)
|
||||
const personTypes = JSON.stringify(this.pageForm.personTypes)
|
||||
const userStates = JSON.stringify(this.pageForm.userStates)
|
||||
window.location.href = loc() + "/doExport?unionId=" + this.pageForm.unionId + "&unitId=" + this.pageForm.unitId
|
||||
+ "&year=" + this.pageForm.year
|
||||
+ "&memberStatus=" + memberStatus + "&personTypes=" + personTypes + "&userStates=" + userStates
|
||||
},
|
||||
doExportByUnion() {
|
||||
const memberStatus = JSON.stringify(this.pageForm.memberStatus)
|
||||
const personTypes = JSON.stringify(this.pageForm.personTypes)
|
||||
const userStates = JSON.stringify(this.pageForm.userStates)
|
||||
const unionId = JSON.stringify(this.pageForm.unionId)
|
||||
const unitId = JSON.stringify(this.pageForm.unitId)
|
||||
const unionGroupId = JSON.stringify(this.pageForm.unionGroupId)
|
||||
const threeUnitId = JSON.stringify(this.pageForm.threeUnitId)
|
||||
const sexTypes = JSON.stringify(this.pageForm.sexTypes)
|
||||
const roleIds = JSON.stringify(this.pageForm.roleIds)
|
||||
const age = JSON.stringify(this.pageForm.age)
|
||||
|
||||
let props = {}
|
||||
this.tableColumns.forEach(v => {
|
||||
props[v.prop] = v.label
|
||||
})
|
||||
|
||||
const {
|
||||
startDate,
|
||||
endDate,
|
||||
campus,
|
||||
reverseSelection,
|
||||
memberSearchName,
|
||||
memberSearchKeyWord
|
||||
} = this.pageForm
|
||||
|
||||
window.location.href = loc() + "/doExportByUnion?=searchName=" + this.pageForm.searchName
|
||||
+ "&searchKeyword=" + this.pageForm.searchKeyword + "&unitId=" + unitId + "&unionId=" + unionId
|
||||
+ "&unionGroupId=" + unionGroupId + "&threeUnitId=" + threeUnitId + "&sexTypes=" + sexTypes
|
||||
+ "&roleIds=" + roleIds + "&age=" + age + "&year=" + this.pageForm.year + "&memberStatus=" + memberStatus
|
||||
+ "&startDate=" + (startDate ? this.getDate(startDate) : '') + "&endDate=" + (endDate ? this.getDate(endDate) : '') + "&campus=" + (campus ? campus :'')
|
||||
+ "&reverseSelection=" + (reverseSelection ? reverseSelection : '') + "&memberSearchName=" + (memberSearchName ? memberSearchName : '')
|
||||
+ "&memberSearchKeyWord=" + (memberSearchKeyWord ? memberSearchKeyWord : '') + "&personTypes=" + personTypes
|
||||
+ "&userStates=" + userStates + "&props=" + JSON.stringify(props)
|
||||
},
|
||||
getDate(date){
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
month = month >= 10 ? month : ("0" + month);
|
||||
day = day >= 10 ? day : ("0" + day);
|
||||
return year + "-" + month + "-" + day;
|
||||
},
|
||||
checkUserStateType(state) {
|
||||
let idx = this.pageForm.userStates.indexOf(state)
|
||||
if (idx != -1) {
|
||||
this.pageForm.userStates.splice(idx, 1)
|
||||
} else {
|
||||
this.pageForm.userStates.push(state)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
checkMemberStatusType(state) {
|
||||
let idx = this.pageForm.memberStatus.indexOf(state)
|
||||
if (idx !== -1) {
|
||||
this.pageForm.memberStatus.splice(idx, 1)
|
||||
} else {
|
||||
this.pageForm.memberStatus.push(state)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
checkPersonType(type) {
|
||||
let idx = this.pageForm.personTypes.indexOf(type)
|
||||
if (idx != -1) {
|
||||
this.pageForm.personTypes.splice(idx, 1)
|
||||
} else {
|
||||
this.pageForm.personTypes.push(type)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
openView(userId) {
|
||||
this.active = 'info'
|
||||
this.userId = userId
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", [])
|
||||
this.$set(this.pageForm, "unionGroupId", [])
|
||||
this.$set(this.pageForm, "threeUnitId", [])
|
||||
this.units = []
|
||||
this.unionGroups = []
|
||||
this.threeUnits = []
|
||||
|
||||
if (this.pageForm.unionId.length) {
|
||||
this.units = await getUnitByUnions(JSON.stringify(this.pageForm.unionId))
|
||||
this.unionGroups = await getUnionGroupsByUnions(JSON.stringify(this.pageForm.unionId))
|
||||
}else {
|
||||
this.units = await getUnits(this.unionid)
|
||||
}
|
||||
},
|
||||
async getThreeUnitsByGroupIdsOrUnitIds() {
|
||||
this.$set(this.pageForm, 'threeUnitId', [])
|
||||
this.threeUnits = []
|
||||
this.threeUnits = await getThreeUnitsByUnionGroupsOrUnitIds(JSON.stringify(this.pageForm.unitId), JSON.stringify(this.pageForm.unionGroupId))
|
||||
this.doSearch();
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.unionId = JSON.stringify(pageForm.unionId)
|
||||
pageForm.unitId = JSON.stringify(pageForm.unitId)
|
||||
pageForm.unionGroupId = JSON.stringify(pageForm.unionGroupId)
|
||||
pageForm.threeUnitId = JSON.stringify(pageForm.threeUnitId)
|
||||
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
|
||||
pageForm.userStates = JSON.stringify(pageForm.userStates)
|
||||
pageForm.memberStatus = JSON.stringify(pageForm.memberStatus)
|
||||
|
||||
pageForm.memberTypes = JSON.stringify(pageForm.memberTypes)
|
||||
pageForm.sexTypes = JSON.stringify(pageForm.sexTypes)
|
||||
pageForm.roleIds = JSON.stringify(pageForm.roleIds)
|
||||
pageForm.age = JSON.stringify(pageForm.age)
|
||||
|
||||
//pageForm.activityUserCnd = pageForm.activityUserCnd ? JSON.stringify(pageForm.activityUserCnd) : pageForm.activityUserCnd
|
||||
$.post(loc() + "/pageData", pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async getRoleListByMenuId() {
|
||||
if (['aca4d14498c145ceb5b24ed70776aae2', '733d7266652740a3aeac9da97ab5eeca'].includes(this.pageForm.module)) {
|
||||
//教代会
|
||||
let meets = await proposal.getOpenMeeting()
|
||||
this.meetingOptions = meets.map(v => ({...v, name: v.jdhallname}))
|
||||
} else if (['fe2d0768e26d4a80beeb159306bb8d01'].includes(this.pageForm.module)) {
|
||||
//工代会
|
||||
let meets = await getGdh(true)
|
||||
this.meetingOptions = meets.map(v => ({...v, name: v.gdhAllName}))
|
||||
}
|
||||
this.pageForm.teacherMeetingId = ''
|
||||
const {data} = await $.post("/platform/activity/basic/scope/getRoleListByMenuId", {menuId: this.pageForm.module})
|
||||
this.roleList = data
|
||||
},
|
||||
async getMenuOptions() {
|
||||
const {data} = await $.get("/platform/sys/role/getMenuOptions")
|
||||
this.menuOptions = data
|
||||
},
|
||||
async getRolesAndUnion() {
|
||||
const {data} = await $.post("/platform/activity/basic/scope/getRolesAndUnion")
|
||||
this.roleData = data
|
||||
},
|
||||
doReset() {
|
||||
this.pageForm.userId = []
|
||||
this.pageForm.memberTypes = []
|
||||
this.pageForm.sexTypes = []
|
||||
this.pageForm.personTypes = []
|
||||
this.pageForm.userStates = []
|
||||
this.pageForm.unionId = []
|
||||
this.pageForm.unitId = []
|
||||
this.pageForm.activityGroupId = []
|
||||
this.pageForm.threeUnitId = []
|
||||
this.pageForm.module = ''
|
||||
this.pageForm.teacherMeetingId = ''
|
||||
this.pageForm.roleIds = []
|
||||
this.pageForm.clubId = ''
|
||||
this.pageForm.activityGroupId = ''
|
||||
this.pageForm.activityUserCnd = ''
|
||||
this.pageForm.age = [0, 0]
|
||||
this.pageForm.reverseSelection = false
|
||||
this.pageForm.startDate = ''
|
||||
this.pageForm.endDate = ''
|
||||
this.doSearch()
|
||||
},
|
||||
tagClick(key, val) {
|
||||
let idx = this.pageForm[key].indexOf(val)
|
||||
if (idx !== -1) {
|
||||
this.pageForm[key].splice(idx, 1)
|
||||
} else {
|
||||
this.pageForm[key].push(val)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
determineEndDate(){
|
||||
if (this.pageForm.startDate){
|
||||
if (Date.parse(this.pageForm.startDate)>Date.parse(this.pageForm.endDate)){
|
||||
this.pageForm.endDate = ''
|
||||
this.$notify.warning("结束时间不能小于开始时间")
|
||||
}
|
||||
}
|
||||
this.pageForm.endDate=this.pageForm.endDate.toLocaleDateString().replaceAll('/','-');
|
||||
},
|
||||
determineStartDate(){
|
||||
if (this.pageForm.endDate){
|
||||
if (Date.parse(this.pageForm.startDate)>Date.parse(this.pageForm.endDate)){
|
||||
this.pageForm.startDate = ''
|
||||
this.$notify.warning("开始时间不能大于结束时间")
|
||||
}
|
||||
}
|
||||
this.pageForm.startDate=this.pageForm.startDate.toLocaleDateString().replaceAll('/','-');
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.personTypeOptions = await getDictOptions("UserType")
|
||||
this.userStateOptions = await getDictOptions("UserState")
|
||||
this.memberStatusOptions = await getDictOptions("memberStatusText")
|
||||
await this.getMenuOptions();
|
||||
await this.getRolesAndUnion()
|
||||
this.pageData();
|
||||
},
|
||||
computed: {
|
||||
is_H10() {
|
||||
return this.roleData.is_H10
|
||||
},
|
||||
is_A06() {
|
||||
return this.roleData.is_A06
|
||||
},
|
||||
is_H04() {
|
||||
return this.roleData.is_H04
|
||||
},
|
||||
is_H02() {
|
||||
return this.roleData.is_H02
|
||||
},
|
||||
is_sysadmin() {
|
||||
return this.roleData.is_sysadmin
|
||||
},
|
||||
unionid() {
|
||||
return this.roleData.unionid
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,299 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.query-row {
|
||||
height: 70px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
.query-row-title {
|
||||
width: 120px;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never" style="margin-top: 10px">
|
||||
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>年度:</span>
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
@change="pageData"
|
||||
style="width: 33%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
:picker-options="pickerOptions"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
<template v-if="searchType==='按分工会分析'">
|
||||
<span class="ml20">所属工会:</span>
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 33%;"
|
||||
@change="unionChange"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-if="searchType==='按单位分析'">
|
||||
<span class="ml20">所在单位:</span>
|
||||
<el-select placeholder="单位" v-model="pageForm.unitId" style="width: 33%;"
|
||||
@change="unitChange"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option v-for="item in units" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-radio-group v-model="searchType" @change="searchTypeChange">
|
||||
<el-radio-button label="按分工会分析"></el-radio-button>
|
||||
<el-radio-button label="按单位分析"></el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<el-button @click="doExport" class="ml10" type="primary">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">年度:</el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
@change="pageData"
|
||||
style="width: 33%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
:picker-options="pickerOptions"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">所属工会:</el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 33%;"
|
||||
@change="pageData"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
|
||||
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">人员类型:</el-col>
|
||||
<el-col class="query-row-content">
|
||||
|
||||
<el-tag
|
||||
style="margin-right: 10px;cursor: pointer"
|
||||
v-for="item in personTypeOptions"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
:effect="pageForm.personTypes.includes(item.name)?'dark':'plain'"
|
||||
@click="checkPersonType(item.name)">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
|
||||
<el-link type="danger" v-if="personTypeOptions.length&&pageForm.personTypes.length"
|
||||
:underline="false"
|
||||
@click="pageForm.personTypes=[];doSearch()">清空
|
||||
</el-link>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
|
||||
<!-- <el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
@change="pageData"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
:picker-options="pickerOptions"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
@change="pageData"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="offscreen-right pull-right ml20">
|
||||
<el-button type="primary" @click="doExport">导出</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>-->
|
||||
|
||||
<el-card shadow="never" class="mt10" v-loading="tableLoading">
|
||||
<vi-title title="会员统计"></vi-title>
|
||||
<el-table :data="tableData" show-summary>
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<!-- <el-table-column prop="unionName" label="分工会名称" align="center" sortable>
|
||||
<template scope="{row}">
|
||||
{{isDisPlayCode?'('+row.unionCode+')':null}}{{row.unionName}}
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column v-if="searchType==='按分工会分析'" align="center" header-align="center" label="分工会"
|
||||
width="220px">
|
||||
<template scope="{row}">
|
||||
{{isDisPlayCode?'('+row.unionCode+')':null}}{{row.unionName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="searchType==='按单位分析'" align="center" header-align="center" label="单位"
|
||||
width="220px">
|
||||
<template scope="{row}">
|
||||
{{isDisPlayCode?'('+row.unitCode+')':null}}{{row.unitName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="TotalNumber" label="总人数" align="center" sortable></el-table-column>
|
||||
<el-table-column prop="maleMember" label="男会员" align="center" sortable></el-table-column>
|
||||
<el-table-column prop="femaleMember" label="女会员" align="center" sortable></el-table-column>
|
||||
<el-table-column prop="smallForty" label="小于等于40岁会员" align="center" sortable></el-table-column>
|
||||
<el-table-column prop="smallFifty" label="40-50" align="center" sortable></el-table-column>
|
||||
<el-table-column prop="smallFiftyFive" label="50-55" align="center" sortable></el-table-column>
|
||||
<el-table-column prop="smallFiftyFive2" label="大于55" align="center" sortable></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fullTableData: [],
|
||||
personTypeOptions: [],
|
||||
unions: [],
|
||||
units: [],
|
||||
pageForm: {
|
||||
personTypes: [],
|
||||
year: new Date().getFullYear() + "",
|
||||
unionId: '',
|
||||
unitId: ''
|
||||
},
|
||||
searchType: '按分工会分析',
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getFullYear() > new Date().getFullYear()
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
searchTypeChange(val) {
|
||||
this.pageData()
|
||||
},
|
||||
unionChange(val) {
|
||||
if (val == null || val == '') {
|
||||
this.tableData = this.fullTableData
|
||||
} else {
|
||||
this.tableData = this.fullTableData.filter(v => v.id === val)
|
||||
}
|
||||
},
|
||||
unitChange(val) {
|
||||
if (val == null || val == '') {
|
||||
this.tableData = this.fullTableData
|
||||
} else {
|
||||
this.tableData = this.fullTableData.filter(v => v.id === val)
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
let data = {}
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
|
||||
const url = this.searchType === '按分工会分析' ? '/pageData' : '/pageData1'
|
||||
data = await $.post(loc() + url, pageForm)
|
||||
/*if (this.pageForm.year == null || this.pageForm.year == new Date().getFullYear() + "") {
|
||||
data = await $.post(loc() + "/pageData", pageForm)
|
||||
} else {
|
||||
data = await $.post(loc() + "/historyMember", pageForm)
|
||||
}*/
|
||||
this.tableData = data;
|
||||
this.fullTableData = data;
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
},
|
||||
checkPersonType(type) {
|
||||
let idx = this.pageForm.personTypes.indexOf(type)
|
||||
if (idx != -1) {
|
||||
this.pageForm.personTypes.splice(idx, 1)
|
||||
} else {
|
||||
this.pageForm.personTypes.push(type)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
doExport() {
|
||||
const personTypes = JSON.stringify(this.pageForm.personTypes)
|
||||
const params = [
|
||||
'year=' + this.pageForm.year,
|
||||
'unionId=' + this.pageForm.unionId,
|
||||
'unitId=' + this.pageForm.unitId,
|
||||
'personTypes=' + personTypes,
|
||||
'union=' + (this.searchType === '按分工会分析' ? true : false)
|
||||
]
|
||||
location.href = loc() + '/doExport?' + params.join('&')
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.personTypeOptions = await getDictOptions("UserType")
|
||||
this.unions = await getUnions(null)
|
||||
this.units = await getUnits(null)
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,188 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
|
||||
<div class="search-item"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}">
|
||||
<div class="search-item-label">分工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="分工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
@change="unionChange"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
@change="unitChange"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="offscreen-right pull-right" v-if="${@shiro.hasRole('sysadmin')}">
|
||||
<el-radio-group v-model="searchType" @change="searchTypeChange">
|
||||
<el-radio-button label="按分工会统计"></el-radio-button>
|
||||
<el-radio-button label="按单位统计"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
<div class="offscreen-right pull-right ml20">
|
||||
<el-button type="primary" @click="doExport">导出</el-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<vi-title title="人员类型分析"></vi-title>
|
||||
<el-table :data="tableData" show-summary>
|
||||
<el-table-column type="index" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')} && searchType==='按分工会统计'"
|
||||
prop="unionName" label="工会">
|
||||
<template slot-scope="{row}">
|
||||
{{isDisPlayCode?'('+row.unionCode+')':null}}{{row.unionName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-else prop="unitName" label="单位">
|
||||
<template slot-scope="{row}">
|
||||
{{isDisPlayCode?'('+row.unitCode+')':null}}{{row.unitName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')} && searchType==='按单位统计'"
|
||||
prop="unionName" label="所属分工会">
|
||||
<template slot-scope="{row}">
|
||||
{{isDisPlayCode?'('+row.unionCode+')':null}}{{row.unionName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="totalNum" label="小计"></el-table-column>
|
||||
<!-- <el-table-column prop="oneNum" label="事业编制" v-if="userTypeNames.includes('事业编制')"></el-table-column>-->
|
||||
<!-- <el-table-column prop="towNum" label="事业编制人事代理"-->
|
||||
<!-- v-if="userTypeNames.includes('事业编制人事代理')"></el-table-column>-->
|
||||
<!-- <el-table-column prop="threeNum" label="非事业编制人事代理"-->
|
||||
<!-- v-if="userTypeNames.includes('非事业编制人事代理')"></el-table-column>-->
|
||||
<!-- <el-table-column prop="fourNum" label="劳务派遣"-->
|
||||
<!-- v-if="userTypeNames.includes('劳务派遣')"></el-table-column>-->
|
||||
<!-- <el-table-column prop="fiveNum" label="单位聘人才(劳务)派遣"-->
|
||||
<!-- v-if="userTypeNames.includes('单位聘人才(劳务)派遣')"></el-table-column>-->
|
||||
<!-- <el-table-column prop="sixNum" label="校聘人才派遣"-->
|
||||
<!-- v-if="userTypeNames.includes('校聘人才派遣')"></el-table-column>-->
|
||||
<!-- <el-table-column prop="sevenNum" label="人才/劳务派遣(天目湖校区)"-->
|
||||
<!-- v-if="userTypeNames.includes('人才/劳务派遣(天目湖校区)')"></el-table-column>-->
|
||||
<!-- <el-table-column prop="eightNum" label="外聘" v-if="userTypeNames.includes('外聘')"></el-table-column>-->
|
||||
<!-- <el-table-column prop="nineNum" label="外籍聘用"-->
|
||||
<!-- v-if="userTypeNames.includes('外籍聘用')"></el-table-column>-->
|
||||
<!-- <el-table-column prop="tenNum" label="溧阳事业编制(天目湖校区)"-->
|
||||
<!-- v-if="userTypeNames.includes('溧阳事业编制(天目湖校区)')"></el-table-column>-->
|
||||
<el-table-column
|
||||
v-for="column in userTypeNames"
|
||||
:prop="column"
|
||||
:label="column">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userTypeNames: [],
|
||||
tableData: [],
|
||||
fullTableData: [],
|
||||
unions: [],
|
||||
units: [],
|
||||
searchType: '按分工会统计'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
const resp_data = await $.post(loc() + '/pageData', {searchType: this.searchType})
|
||||
if (resp_data.code === 0) {
|
||||
const data = resp_data.data.map(v => {
|
||||
// v.totalNum = v.oneNum + v.towNum + v.threeNum + v.fourNum
|
||||
// + v.fiveNum + v.sixNum + v.sevenNum + v.eightNum + v.nineNum + v.tenNum
|
||||
// return v
|
||||
let totalNum = 0
|
||||
this.userTypeNames.forEach(pName => {
|
||||
totalNum += v[pName]
|
||||
})
|
||||
v['totalNum'] = totalNum
|
||||
return v
|
||||
})
|
||||
console.log(data)
|
||||
this.tableData = data
|
||||
this.fullTableData = data
|
||||
}
|
||||
},
|
||||
async unionChange(val) {
|
||||
if (val == null || val == '') {
|
||||
this.tableData = this.fullTableData
|
||||
} else {
|
||||
this.tableData = this.fullTableData.filter(v => v.ghid === val)
|
||||
}
|
||||
this.pageForm.unitId = null
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
},
|
||||
unitChange(val) {
|
||||
if (val == null || val == '') {
|
||||
this.tableData = this.fullTableData
|
||||
} else {
|
||||
this.tableData = this.fullTableData.filter(v => v.dwid === val)
|
||||
}
|
||||
},
|
||||
doExport() {
|
||||
window.open(loc() + '/doExport?searchType=' + this.searchType)
|
||||
},
|
||||
searchTypeChange() {
|
||||
this.getData()
|
||||
},
|
||||
async getUserTypes() {
|
||||
const data = await getDictOptions("UserType")
|
||||
this.userTypeNames = data.map(v => v.name)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getUserTypes()
|
||||
this.getData()
|
||||
this.unions = await getUnions(null)
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(null)
|
||||
} else {
|
||||
this.units = await getUnionUnits()
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user