347 lines
16 KiB
HTML
347 lines
16 KiB
HTML
<!--#
|
||
layout("/layouts/platform.html"){
|
||
#-->
|
||
<style>
|
||
.el-table-container {
|
||
padding-left: 0px;
|
||
margin-top: 5px;
|
||
padding-right: 0px;
|
||
}
|
||
</style>
|
||
<div id="app" v-cloak>
|
||
|
||
<guava ref="guava">
|
||
<div style="padding-right: 10px">
|
||
<el-card shadow="never">
|
||
<div class="btn-group tool-button mt5">
|
||
<el-select @change="getClub" v-model="pageForm.auditState" placeholder="请选择年审状态">
|
||
<el-option label="全部" :value="null"></el-option>
|
||
<el-option label="年审通过" :value="true"></el-option>
|
||
<el-option label="年审未通过" :value="false"></el-option>
|
||
</el-select>
|
||
</div>
|
||
<div class="btn-group tool-button mt5">
|
||
<el-select v-model="pageForm.clubId" placeholder="请选择社团">
|
||
<el-option v-for="item in clubList"
|
||
:label="item.name" :value="item.id" :key="item.id">
|
||
</el-option>
|
||
</el-select>
|
||
</div>
|
||
<div class="btn-group tool-button mt5">
|
||
<dict-select clearable code="userState" placeholder="请选择在职状态"
|
||
v-model="pageForm.userState"></dict-select>
|
||
</div>
|
||
<div class="btn-group tool-button mt5">
|
||
<el-select clearable filterable placeholder="请选择性别"
|
||
v-model="pageForm.sex">
|
||
<el-option label="男" value="男"></el-option>
|
||
<el-option label="女" value="女"></el-option>
|
||
</el-select>
|
||
</div>
|
||
|
||
<div class="btn-group tool-button mt5">
|
||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||
</div>
|
||
|
||
<div class="pull-right offscreen-right mt5">
|
||
<el-radio-group @change="(val) => doSearch()"
|
||
v-model="pageForm.giveMoney">
|
||
<el-radio-button :label="null">全部</el-radio-button>
|
||
<el-radio-button :label="true">可拨付</el-radio-button>
|
||
<el-radio-button :label="false">不可拨付</el-radio-button>
|
||
</el-radio-group>
|
||
</div>
|
||
</el-card>
|
||
|
||
<el-card shadow="never" class="mt10">
|
||
<table-tool :app="this" label="社团统计">
|
||
<template #func>
|
||
<el-button @click="exportData" type="primary" size="small">导出全部统计数据</el-button>
|
||
<el-button @click="exportUserData(null)" v-if="${@shiro.hasAnyRoles('sysadmin', 'A06', 'xxhgly')}"
|
||
type="primary" size="small">导出全部人员明细(zip)</el-button>
|
||
<el-button @click="exportExcel(null)" v-if="${@shiro.hasAnyRoles('sysadmin', 'A06', 'xxhgly')}"
|
||
type="primary" size="small">导出全部人员明细(EXCEL)</el-button>
|
||
<el-button @click="exportFiles(null)" v-if="${@shiro.hasAnyRoles('sysadmin', 'A06', 'xxhgly')}"
|
||
type="primary" size="small">导出全部上传资料</el-button>
|
||
</template>
|
||
</table-tool>
|
||
<el-table :data="tableData" style="width: 100%" row-key="id" v-loading="tabLoading">
|
||
<el-table-column align="center" header-align="center" label="序号" type="index">
|
||
<template scope="scope">
|
||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column align="center" header-align="center" label="社团名称"
|
||
prop="name" show-overflow-tooltip></el-table-column>
|
||
|
||
<el-table-column align="center" header-align="center" label="社团编码"
|
||
prop="code"></el-table-column>
|
||
|
||
<el-table-column align="center" sortable header-align="center" label="社团总人数"
|
||
prop="total"></el-table-column>
|
||
|
||
<el-table-column align="center" sortable header-align="center" label="在职人数"
|
||
prop="work"></el-table-column>
|
||
|
||
<el-table-column align="center" header-align="center" label="退休人数"
|
||
prop="retire"></el-table-column>
|
||
|
||
<el-table-column align="center" sortable header-align="center" label="男"
|
||
prop="man"></el-table-column>
|
||
|
||
<el-table-column align="center" sortable header-align="center" label="女"
|
||
prop="woman"></el-table-column>
|
||
|
||
<el-table-column align="center" sortable header-align="center" label="理事机构人数"
|
||
prop="governing_body"></el-table-column>
|
||
|
||
<!--<el-table-column align="center" header-align="center" label="社团确认" sortable
|
||
prop="club_has_confirm"></el-table-column>
|
||
|
||
<el-table-column align="center" header-align="center" label="社团待确认" sortable
|
||
prop="club_no_confirm"></el-table-column>
|
||
|
||
<el-table-column align="center" header-align="center" label="校工会确认" sortable
|
||
prop="school_has_confirm"></el-table-column>
|
||
|
||
<el-table-column align="center" header-align="center" label="校工会待确认" sortable width="160"
|
||
prop="school_no_confirm"></el-table-column>-->
|
||
|
||
<el-table-column align="center" fixed="right" header-align="center" label="操作">
|
||
<template scope="{row}">
|
||
<el-dropdown @command="dropdownCommand">
|
||
<el-button plain size="mini">
|
||
<i class="ti-settings"></i>
|
||
<span class="ti-angle-down"></span>
|
||
</el-button>
|
||
<el-dropdown-menu slot="dropdown">
|
||
<el-dropdown-item :command="{action:openView,value:row}">
|
||
查看人员明细
|
||
</el-dropdown-item>
|
||
<!--<el-dropdown-item :command="{action:exportData,value:row}">
|
||
导出统计数据
|
||
</el-dropdown-item>-->
|
||
<el-dropdown-item :command="{action:exportUserData,value:row}">
|
||
导出人员明细
|
||
</el-dropdown-item>
|
||
<el-dropdown-item :command="{action:exportFiles,value:row}">
|
||
导出上传资料
|
||
</el-dropdown-item>
|
||
</el-dropdown-menu>
|
||
</el-dropdown>
|
||
</template>
|
||
</el-table-column>
|
||
|
||
</el-table>
|
||
<el-row class="el-pagination-container">
|
||
<el-pagination
|
||
@size-change="pageSizeChange"
|
||
@current-change="pageNumberChange"
|
||
:current-page="pageForm.pageNumber"
|
||
:page-sizes="[10, 20, 30, 50]"
|
||
:page-size="pageForm.pageSize"
|
||
layout="total, sizes, prev, pager, next"
|
||
:total="pageForm.totalCount">
|
||
</el-pagination>
|
||
</el-row>
|
||
</el-card>
|
||
|
||
</div>
|
||
|
||
<template #view>
|
||
<vi-title :title="userTitle"></vi-title>
|
||
<el-table :data="userTableData" v-loading="userTableLoading">
|
||
<el-table-column label="姓名" prop="username" show-overflow-tooltip></el-table-column>
|
||
<el-table-column label="工号" prop="loginname" show-overflow-tooltip></el-table-column>
|
||
<el-table-column label="性别" prop="sex" show-overflow-tooltip></el-table-column>
|
||
<el-table-column label="联系方式" prop="mobile" show-overflow-tooltip></el-table-column>
|
||
<el-table-column label="所属单位" prop="unitname" show-overflow-tooltip></el-table-column>
|
||
<el-table-column label="在职状态" prop="userState" show-overflow-tooltip></el-table-column>
|
||
<el-table-column label="是否拨付" prop="giveMoney" show-overflow-tooltip>
|
||
<template scope="scope">
|
||
<span class="text-success" v-if="scope.row.giveMoney">拨付</span>
|
||
<span class="text-danger" v-else>不拨付</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="是否缴费" prop="isjf" show-overflow-tooltip>
|
||
<template slot-scope="scope">
|
||
<span class="text-success" v-if="scope.row.isjf">已缴费</span>
|
||
<span class="text-danger" v-else>未缴费</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="职务" prop="sf" show-overflow-tooltip>
|
||
<template slot-scope="scope">
|
||
<el-lable v-if="scope.row.sf==1">会长</el-lable>
|
||
<el-lable v-if="scope.row.sf==2">会员</el-lable>
|
||
<el-lable v-if="scope.row.sf==3">副会长</el-lable>
|
||
<el-lable v-if="scope.row.sf==4">秘书长</el-lable>
|
||
<el-lable v-if="scope.row.sf==5">副秘书长</el-lable>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
<el-row class="el-pagination-container">
|
||
<el-pagination
|
||
@current-change="userPageNumberChange"
|
||
:current-page="userPageForm.pageNumber"
|
||
:page-sizes="[10, 20, 30, 50]"
|
||
:page-size="userPageForm.pageSize"
|
||
layout="total, sizes, prev, pager, next"
|
||
:total="userPageForm.totalCount">
|
||
</el-pagination>
|
||
</el-row>
|
||
</template>
|
||
</guava>
|
||
|
||
</div>
|
||
<script>
|
||
const vue = new Vue({
|
||
el: '#app',
|
||
mixins: [initTableMixins],
|
||
data() {
|
||
return {
|
||
userTableData: [],
|
||
tableData: [],
|
||
pageForm: {
|
||
pageNumber: 1,
|
||
pageSize: 10,
|
||
totalCount: 0,
|
||
giveMoney: null,
|
||
sex: '',
|
||
userState: '',
|
||
auditState: null,
|
||
clubId: '',
|
||
},
|
||
userPageForm: {
|
||
pageNumber: 1,
|
||
pageSize: 10,
|
||
totalCount: 0,
|
||
},
|
||
tabLoading: false,
|
||
clubList: [],
|
||
userTitle: '',
|
||
clickRow: {},
|
||
userTableLoading: false,
|
||
}
|
||
},
|
||
components: {
|
||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||
},
|
||
methods: {
|
||
exportUserData(row) {
|
||
const id = row === null ? '' : row.id
|
||
let url = '/platform/sys/club/clubUserCount/exportUserData?clubId=' + id +
|
||
'&userState=' + this.pageForm.userState +
|
||
'&sex=' + this.pageForm.sex
|
||
if (this.pageForm.giveMoney !== null) {
|
||
url += '&giveMoney=' + this.pageForm.giveMoney
|
||
}
|
||
window.open(url)
|
||
},
|
||
exportExcel(){
|
||
let params = {
|
||
clubId: this.pageForm.clubId,
|
||
userState: this.pageForm.userState,
|
||
sex: this.pageForm.sex
|
||
}
|
||
window.open("/platform/sys/club/clubUserCount/exportExcel", params)
|
||
},
|
||
exportFiles(row) {
|
||
const id = row === null ? '' : row.id
|
||
let url = '/platform/sys/club/clubUserCount/exportFiles?clubId=' + id
|
||
window.open(url)
|
||
},
|
||
async openView(row) {
|
||
this.clickRow = row
|
||
await this.userPageData()
|
||
this.userTitle = row.name + '人员明细信息'
|
||
this.$refs.guava.view()
|
||
},
|
||
exportData() {
|
||
const url = loc() + "/exportData?giveMoney=" + this.pageForm.giveMoney +
|
||
"&sex=" + this.pageForm.sex +
|
||
"&clubId" + this.pageForm.clubId +
|
||
"&auditState" + this.pageForm.auditState +
|
||
"&userState=" + this.pageForm.userState
|
||
window.open(url)
|
||
},
|
||
doSearch() {
|
||
this.pageForm.pageNumber = 1
|
||
this.pageData()
|
||
},
|
||
pageNumberChange(val) {//页码更新操作
|
||
this.pageForm.pageNumber = val
|
||
this.pageData()
|
||
},
|
||
pageSizeChange(val) {//分页大小更新操作
|
||
this.pageForm.pageSize = val
|
||
this.pageData()
|
||
},
|
||
userPageNumberChange(val) {//页码更新操作
|
||
this.userPageForm.pageNumber = val
|
||
this.userPageData()
|
||
},
|
||
userPageSizeChange(val) {//分页大小更新操作
|
||
this.userPageForm.pageSize = val
|
||
this.userPageData()
|
||
},
|
||
async userPageData() {
|
||
this.userTableLoading = true
|
||
this.userPageForm.clubId = this.clickRow.id
|
||
this.userPageForm.userState = this.pageForm.userState
|
||
this.userPageForm.sex = this.pageForm.sex
|
||
if (this.pageForm.giveMoney === null) {
|
||
this.userPageForm.giveMoney = undefined
|
||
} else {
|
||
this.userPageForm.giveMoney = this.pageForm.giveMoney
|
||
}
|
||
const resp = await $.post("/platform/sys/club/clubUserCount/userPageData", this.userPageForm);
|
||
if (resp.code === 0) {
|
||
this.userTableData = resp.data.list;
|
||
this.userPageForm.totalCount = resp.data.totalCount;
|
||
this.userTableLoading = false
|
||
} else {
|
||
this.$message({message: resp.msg, type: 'error'});
|
||
this.userTableLoading = false
|
||
}
|
||
},
|
||
pageData() {//加载分页数据
|
||
sublime.showLoadingbar();//显示loading
|
||
this.tabLoading = true
|
||
const form = clone(this.pageForm)
|
||
if (form.giveMoney === null) {
|
||
delete form.giveMoney
|
||
}
|
||
if (form.auditState === null) {
|
||
delete form.auditState
|
||
}
|
||
$.post(base + "/platform/sys/club/clubUserCount/pageData", form, (data) => {
|
||
sublime.closeLoadingbar();//关闭loading
|
||
this.tabLoading = false
|
||
if (data.code === 0) {
|
||
this.tableData = data.data.list;
|
||
this.pageForm.totalCount = data.data.totalCount;
|
||
} else {
|
||
this.$message({
|
||
message: data.msg,
|
||
type: 'error'
|
||
});
|
||
}
|
||
}, "json");
|
||
},
|
||
async getClub() {
|
||
const resp = await $.get(loc() + '/getClub', {
|
||
auditState: this.pageForm.auditState !== null ? this.pageForm.auditState : undefined
|
||
})
|
||
this.clubList = resp.data
|
||
},
|
||
},
|
||
async created() {
|
||
await this.getClub()
|
||
this.pageData()
|
||
}
|
||
})
|
||
</script>
|
||
<!--#
|
||
}
|
||
#-->
|