first commit

This commit is contained in:
2026-09-09 09:14:28 +08:00
commit 5343198112
5199 changed files with 1052895 additions and 0 deletions
@@ -0,0 +1,458 @@
<style>
.el-tabs__content {
padding-top: 20px;
}
</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-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="doSearch" style="width: 100%">
<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">
<el-date-picker style="width: 100%"
v-model="pageForm.dateRange"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd">
</el-date-picker>
</div>
</div>
<!--<div class="search-item">
<div class="search-item-label">会员状态:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.memberStatus" style="width: 100%" clearable
placeholder="会员状态" code="memberStatusText"></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.unionId" style="width: 100%;"
clearable
filterable
@change="flushUnits" @clear="flushUnits">
<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
filterable>
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-row>
</div>
</div>
<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-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="申请列表" :app="this">
<template #func>
<el-radio-group v-model="pageForm.audit" @change="doSearch" size="small"
style="margin-bottom: -7.5px">
<el-radio-button :label="0">全部</el-radio-button>
<el-radio-button :label="1">已审核</el-radio-button>
<el-radio-button :label="2">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" class="vi-table">
<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=='stateId'" scope="{row}">
<vi-table-state :state="row"></vi-table-state>
</template>
<template v-else-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>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
min-width="100px">
<template scope="{row}">
<el-button size="small" :loading="row.loading" v-if="row.audit" type="primary"
@click="openAudit(row,true)">审核
</el-button>
<el-button size="small" :loading="row.loading" v-else @click="openAudit(row,false)">查看
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<el-tabs v-model="active">
<el-tab-pane label="个人信息" name="info">
<member ref="memberInfo" :id="info.userId" view></member>
</el-tab-pane>
<el-tab-pane label="院级工会审核" name="union">
<el-form :model="formData" ref="form" :rules="formRules"
label-width="120px" label-suffix="">
<vi-title title="审核信息"></vi-title>
<template v-if="!info.unionAudit&&source==1">
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人员">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="auditTime" label="审核时间">
<el-input v-model="formData.auditTime" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="opinion" label="审核意见">
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<div style="float: right;margin: 20px 0">
<el-button @click="doAudit(false)" :loading="submitLoading">
</el-button>
<el-button type="primary" @click="doAudit(true)"
:loading="submitLoading">
</el-button>
</div>
</template>
<template v-else>
<el-row :gutter="20" v-if="info&&info.unionAudit">
<el-col :span="12">
<el-form-item label="审核人员">
<span>{{ info.unionAudit.username }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<span>{{ info.unionAudit.auditTime }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
<span>{{ info.unionAudit.auditOpinion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-else type="flex" justify="center">
<el-form-item label="暂无审核信息">
</el-form-item>
</el-row>
</template>
</el-form>
</el-tab-pane>
<el-tab-pane label="校工会审核" name="school"
v-if="info.unionAudit">
<el-form class="demo-table-expand" :model="formData" ref="form" :rules="formRules"
label-width="120px" label-suffix="">
<vi-title title="审核信息"></vi-title>
<template v-if="!info.schoolAudit&&source==2">
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人员">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="auditTime" label="审核时间">
<el-input v-model="formData.auditTime" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="opinion" label="审核意见">
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<div style="float: right;margin: 20px 0">
<el-button @click="doAudit(false)" :loading="submitLoading">
</el-button>
<el-button type="primary" @click="doAudit(true)"
:loading="submitLoading">
</el-button>
</div>
</template>
<template v-else>
<el-row :gutter="20" v-if="info&&info.schoolAudit">
<el-col :span="12">
<el-form-item label="审核人员">
<span>{{ info.schoolAudit.username }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<span>{{ info.schoolAudit.auditTime }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
<span>{{ info.schoolAudit.auditOpinion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-else type="flex" justify="center">
<el-form-item label="暂无审核信息">
</el-form-item>
</el-row>
</template>
</el-form>
</el-tab-pane>
</el-tabs>
</template>
<template #view>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
active: 'info',
submitLoading: false,
formRules: {},
info: {},
formData: {},
pageForm: {
unionId: null,
unitId: null,
threeUnitId: null,
unionGroupId: null,
source: source,
searchName: "u.username",
audit: 2
},
unions: [],
unionGroups:[],
threeUnits:[],
tableColumns: [
{prop: 'loginname', label: '工号'},
{prop: 'username', label: '姓名'},
{prop: 'sex', label: '性别'},
{prop: 'mobile', label: '联系电话'},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
{prop: 'threeUnitName', label: '所在科室', sortable: true},
{prop: 'unionGroupName', label: '工会小组', sortable: true},
{prop: 'applyDate', label: '申请时间', sortable: true},
{prop: 'stateId', label: '状态', sortable: true},
],
units: []
}
},
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.0'),
},
methods: {
async doAudit(pass) {
this.formData.auditPass = pass
this.submitLoading = true
const resp = await $.post("/platform/member/apply/audit/doAudit", this.formData)
this.submitLoading = false
if(resp.code===0){
this.pageData()
this.$refs.guava.index()
}else{
this.notifyWarning(resp.msg)
}
},
async openAudit(row, audit) {
this.$set(row, "loading", true)
const resp = await $.get("/platform/member/common/findApplyInfo", {id: row.id})
this.$set(row, "loading", false)
if(resp.code===0){
const data = resp.data
data.audit = audit
this.info = data
if (audit) {
if (this.pageForm.source == 1) {
this.active = 'union'
} else if (this.pageForm.source == 2) {
this.active = 'school'
}
} else {
this.active = 'info'
}
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
this.formData = {
recordId: row.id,
username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'),
}
}else{
this.notifyWarning(resp.msg)
this.info = {}
}
},
pageData() {
sublime.showLoadingbar();
this.tableLoading = true
this.pageForm.date = JSON.stringify(this.pageForm.dateRange)
$.post("/platform/member/apply/audit/pageData", this.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 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 getThreeUnits() {
this.$set(this.pageForm, "threeUnitId", null)
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unit, this.pageForm.unionGroupId)
}
},
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.flushUnits()
}
})
</script>
@@ -0,0 +1,12 @@
<!--#
layout("/layouts/platform.html"){
#-->
<script>
window.source = 2
</script>
<!--#include("/platform/member/apply/audit/Layout.html"){}#-->
<!--#
}
#-->
@@ -0,0 +1,12 @@
<!--#
layout("/layouts/platform.html"){
#-->
<script>
window.source = 1
</script>
<!--#include("/platform/member/apply/audit/Layout.html"){}#-->
<!--#
}
#-->
@@ -0,0 +1,528 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.v-body {
display: flex;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
background-color: #f0f2f5;
}
.v-card {
width: calc(100% - 0px);
height: calc(100% - 0px);
position: relative;
}
.transition-row {
width: 100%;
height: 100%;
}
.transition-item {
width: 100%;
height: 100%;
}
.demo-table-expand {
font-size: 0;
}
.demo-table-expand label {
color: #99a9bf;
}
</style>
<div id="app" v-cloak>
<guava ref="guava" style="width: 100%;height: 100%">
<template>
<div class="v-body">
<el-card class="v-card" shadow="never">
<el-tabs v-model="activeName">
<el-tab-pane label="申请入会" name="first">
<div style="display: flex;width: 100%;height: 100%;align-items: center;justify-content: center;position: relative;padding: 10px">
<el-card style="width: 500px">
<div slot="header" class="clearfix">
<h4>工会信息</h4>
</div>
<div v-loading="unionInfoLoading">
<el-form label-suffix=":" label-width="120px">
<el-form-item label="工会名称">{{unionInfo.unionname}}
</el-form-item>
<el-form-item label="工会编码">{{unionInfo.unioncode}}
</el-form-item>
<el-form-item label="工会负责人">{{unionInfo.manager}}
</el-form-item>
<el-form-item label="联系电话">{{unionInfo.telephone}}
</el-form-item>
<el-form-item label="加入方式">
<el-radio-group v-model="memberStates">
<el-radio :label="1">新增</el-radio>
<el-radio :label="2">转入</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<el-button
:disabled="!((unionInfo.apply||unionInfo.reApply)&&reading)"
type="primary"
@click="apply"
style="width: 70%;margin-left: 15%;margin-top: 20px">
<span v-if="unionInfo.apply||unionInfo.reApply">{{unionInfo.reApply?'重新申请':'申请加入'}}</span>
<span v-else-if="unionInfo.record">{{unionInfo.record.stateName}}</span>
<span v-else>您已是会员</span>
</el-button>
<el-radio
style="width: 70%;margin-left: 15%;margin-top: 20px;color: #F56C6C"
v-model="reading" :label="true">
阅读须知:我自愿加入工会
</el-radio>
</div>
</el-card>
</div>
</el-tab-pane>
<el-tab-pane label="个人信息" name="second">
<div style="padding: 0 8%;padding-top: 50px">
<member ref="memberInfo"
:id="'${@shiro.getPrincipalProperty('id')}'" view></member>
</div>
</el-tab-pane>
<el-tab-pane label="申请记录" name="third">
<el-table :data="unionInfo.records" style="width: 100%" row-key="id"
@expand-change="onExpand">
<el-table-column type="expand">
<template slot-scope="{row}">
<el-form class="demo-table-expand" v-loading="row.loading"
label-position="right" label-suffix=""
label-width="120px">
<el-form>
<el-form-item label="院级工会审核信息&emsp;"
label-width="180px"
class="view-header">
</el-form-item>
</el-form>
<el-row :gutter="20"
v-if="row.info&&row.info.unionAudit">
<el-col :span="12">
<el-form-item label="审核人员">
<span>{{ row.info.unionAudit.username }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<span>{{ row.info.unionAudit.auditTime }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
<span>{{ row.info.unionAudit.auditOpinion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-else type="flex" justify="center">
<el-form-item label="暂无审核信息">
</el-form-item>
</el-row>
<el-form>
<el-form-item label="校工会审核信息&emsp;"
label-width="180px"
class="view-header">
</el-form-item>
</el-form>
<el-row :gutter="20"
v-if="row.info&&row.info.schoolAudit">
<el-col :span="12">
<el-form-item label="审核人员">
<span>{{ row.info.schoolAudit.username }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<span>{{ row.info.schoolAudit.auditTime }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
<span>{{ row.info.schoolAudit.auditOpinion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-else type="flex" justify="center">
<el-form-item label="暂无审核信息">
</el-form-item>
</el-row>
</el-form>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="序号"
type="index"></el-table-column>
<el-table-column label="申请人" prop="username" header-align="center"
align="center"></el-table-column>
<el-table-column label="申请时间" prop="applyTime" header-align="center"
align="center"></el-table-column>
<el-table-column label="工会" prop="unionname" header-align="center"
align="center"></el-table-column>
<el-table-column label="状态" prop="stateId" header-align="center"
align="center">
<template scope="{row}">
<span :style="'color:'+row.stateColor">{{ row.stateName }}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</template>
<template #edit_func>
<el-button type="primary" @click="doSubmit">提交</el-button>
</template>
<template #edit>
<el-form :model="formData" :rules="rules" ref="AddForm" label-width="170px">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="姓名" prop="username">
<el-input disabled placeholder="姓名"
v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工号" prop="loginname">
<el-input disabled placeholder="工号"
v-model="formData.loginname"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性别" prop="sex">
<el-radio v-model="formData.sex" label="男" border size="small">
</el-radio>
<el-radio v-model="formData.sex" label="女" border size="small">
</el-radio>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="nation" label="民族">
<el-select placeholder="民族" style="width: 100%" filterable v-model="formData.nation">
<el-option v-for="nation in nationOptions" :key="nation" :value="nation"
:label="nation"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="education" label="学历">
<dict-select v-model="formData.education" style="width: 100%"
placeholder="请选择学历"
code="Education"></dict-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="academicDegree" label="学位">
<dict-select v-model="formData.academicDegree" style="width: 100%"
placeholder="请选择学位"
code="academicDegree"></dict-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="political" label="政治面貌">
<el-input maxlength="100" placeholder="政治面貌"
v-model="formData.political"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="userState" label="人员类型">
<dict-select v-model="formData.personType" style="width: 100%" placeholder="请选择人员类型"
code="UserType"></dict-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="idcard" label="身份证号">
<el-input v-model="formData.idcard" placeholder="身份证号"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="mobile" label="联系电话">
<el-input maxlength="100" placeholder="联系电话"
v-model="formData.mobile"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="unitid" label="所属单位">
<el-select placeholder="所属单位"
style="width: 100%"
filterable @change="unitChange"
v-model="formData.unitid">
<el-option v-for="unit in unitOptions" :key="unit.id" :value="unit.id"
:label="unit.name"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item prop="registeredResidence" label="户口所在地">
<el-input maxlength="50" placeholder="请填写户口所在地"
v-model="formData.registeredResidence" type="textarea"
rows="3"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item prop="homeAddress" label="现居住地">
<el-input maxlength="50" placeholder="请填写现居住地"
v-model="formData.homeAddress" type="textarea"
rows="3"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item prop="vita" label="个人工作简历">
<el-input maxlength="50" placeholder="请填写个人工作简历"
v-model="formData.vita" type="textarea"
rows="3"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item prop="specialSkill" label="特长">
<el-input maxlength="50" placeholder="请填写特长"
v-model="formData.specialSkill" type="textarea"
rows="3"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="家庭成员">
<span style="color: red">(已结婚填配偶信息,未结婚填父母信息)</span>
<el-button style="float: right;margin-bottom: 10px" icon="el-icon-plus"
size="mini"
@click="formData.family.push({})"> 添加成员
</el-button>
<el-table
:data="formData.family"
border
size="mini"
style="width: 100%">
<el-table-column prop="relation" label="与本人关系" align="center"
header-align="center">
<template slot-scope="scope">
<el-input placeholder="请输入与本人关系" maxlength="30"
v-model="scope.row.relation"
clearable></el-input>
</template>
</el-table-column>
<el-table-column prop="name" label="姓名" align="center"
header-align="center">
<template slot-scope="scope">
<el-input placeholder="请输入姓名" maxlength="100"
v-model="scope.row.name" clearable></el-input>
</template>
</el-table-column>
<el-table-column prop="unit" label="单位" align="center"
header-align="center">
<template slot-scope="scope">
<el-input placeholder="请输入单位" maxlength="100"
v-model="scope.row.unit" clearable></el-input>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" align="center"
header-align="center">
<template slot-scope="scope">
<el-input placeholder="请输入备注" maxlength="100"
v-model="scope.row.remark" clearable></el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="100px" align="center"
header-align="center">
<template slot-scope="scope">
<el-button type="danger" icon="el-icon-delete" circle
:disabled="formData.family.length===0"
@click="formData.family.splice(scope.$index,1)"></el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- <member ref="member" :id="'${@shiro.getPrincipalProperty('id')}'" @save="doApply"></member>-->
</template>
<template #view>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
formData: {
family: []
},
reading: false,
activeName: 'first',
unionInfoLoading: true,
unionInfo: {},
memberStates: 1,
rules: {
sex: [{required: true, message: '必填', trigger: ['blur', 'change']}],
education: [{required: true, message: '必填', trigger: ['blur', 'change']}],
academicDegree: [{required: true, message: '必填', trigger: ['blur', 'change']}],
political: [{required: true, message: '必填', trigger: ['blur', 'change']}],
idcard: [{required: true, message: '必填', trigger: ['blur', 'change']}],
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
position: [{required: true, message: '必填', trigger: ['blur', 'change']}],
registeredResidence: [{
required: true,
message: '必填',
trigger: ['blur', 'change']
}],
},
nationOptions: nation,
unitOptions: [],
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue?v=1.0.0'),
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
},
methods: {
async onExpand(row) {
this.$set(row, "loading", true)
const resp = await $.get("/platform/member/common/findApplyInfo", {id: row.id})
this.$set(row, "loading", false)
if (resp.code === 0) {
this.$set(row, "info", resp.data)
} else {
this.$set(row, "info", {})
this.notifyWarning(resp.msg)
}
},
async doApply(user) {
if (!this.reading) {
this.$notify.warning({title: '提示', message: '请勾选阅读须知'});
return
}
const resp = await $.get(loc() + "/doApply", {memberStates: this.memberStates})
if (resp.code === 0) {
await this.getUnionInfo()
this.$refs.memberInfo.getUserInfo()
this.$refs.guava.index()
} else {
this.notifyWarning(resp.msg)
}
},
doSubmit() {
this.$refs['AddForm'].validate(async (valid) => {
if (valid) {
const formData = clone(this.formData)
formData.family = JSON.stringify(this.formData.family)
await $.post("/platform/member/apply/submit/doEdit", formData)
const resp = await $.get(loc() + "/doApply", {memberStates: this.memberStates})
if (resp.code === 0) {
await this.getUnionInfo()
this.$refs.memberInfo.getUserInfo()
this.$refs.guava.index()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
}
})
},
async apply() {
this.$refs.guava.edit()
},
async getUnionInfo() {
this.unionInfoLoading = true
const resp = await $.get(loc() + "/unionInfo")
this.unionInfoLoading = false
if (resp.code === 0) {
this.unionInfo = resp.data
this.formData = resp.data
this.$set(this.formData, "family", resp.data.family ? JSON.parse(resp.data.family) : [])
this.formData = resp.data
} else {
this.notifyWarning(resp.msg)
}
},
async unitChange(v) {
const unit = this.unitOptions.find(x => x.id == v)
if (unit) {
this.formData.unionid = unit.unionid
this.formData.unionname = unit.unionname
} else {
this.formData.unionid = ''
this.formData.unionname = ''
}
},
},
async created() {
this.getUnionInfo()
this.unitOptions = await getUnionUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,189 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.v-body {
display: flex;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
background-color: #f0f2f5;
}
.v-card {
width: calc(100% - 0px);
height: calc(100% - 0px);
position: relative;
}
.transition-row {
width: 100%;
height: 100%;
}
.transition-item {
width: 100%;
height: 100%;
}
.demo-table-expand {
font-size: 0;
}
.demo-table-expand label {
color: #99a9bf;
}
</style>
<div id="app" v-cloak>
<guava ref="guava" style="width: 100%;height: 100%">
<template>
<div class="v-body">
<el-card class="v-card" shadow="never">
<el-tabs v-model="activeName">
<el-tab-pane label="申请入会" name="first">
<div style="display: flex;width: 100%;height: 100%;align-items: center;justify-content: center;position: relative;padding: 10px">
<el-card style="width: 500px">
<div slot="header" class="clearfix">
<h4>工会信息</h4>
</div>
<div v-loading="unionInfoLoading">
<el-form label-suffix=":" label-width="120px">
<el-form-item label="工会名称">{{unionInfo.unionname}}</el-form-item>
<el-form-item label="工会编码">{{unionInfo.unioncode}}</el-form-item>
<el-form-item label="工会负责人">{{unionInfo.manager}}</el-form-item>
<el-form-item label="联系电话">{{unionInfo.telephone}}</el-form-item>
</el-form>
<el-button :disabled="!(unionInfo.apply||unionInfo.reApply)"
type="primary"
@click="apply"
style="width: 70%;margin-left: 15%;margin-top: 20px">
<span v-if="unionInfo.apply||unionInfo.reApply">{{unionInfo.reApply?'重新申请':'申请变更'}}</span>
<span v-else-if="unionInfo.record">{{unionInfo.record.stateName}}</span>
<span v-else>非会员</span>
</el-button>
</div>
</el-card>
</div>
</el-tab-pane>
<el-tab-pane label="个人信息" name="second">
<div style="padding: 0 8%;padding-top: 50px">
<member ref="memberInfo" :id="'${@shiro.getPrincipalProperty('id')}'" view></member>
</div>
</el-tab-pane>
<el-tab-pane label="申请记录" name="third">
<mem-change-records v-model="unionInfo.records"></mem-change-records>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</template>
<template #edit>
<mem-change-apply ref="apply" :userid="userId" @submit="doSubmit"></mem-change-apply>
</template>
<template #view>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
activeName: 'first',
unionInfoLoading: true,
unionInfo: {},
changeTypeOptions: [],
changeType: {},
changeOriginOptions: [],
changeOrigin: {},
formData: {},
formRules: {
type: [{required: true, message: '必选', trigger: ['blur', 'change']}],
},
submitLoading: false,
userId: "${@shiro.getPrincipalProperty('id')}"
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue?v=1.0.0'),
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
'enum-select': httpVueLoader('/components/plugins/EnumSelect.vue?v=1.0.0'),
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.0'),
'mem-change-apply': httpVueLoader('/components/member/MemChangeApply.vue?v=1.0.0'),
},
methods: {
async doSubmit(formData) {
const resp = await $.post(loc() + "/doApply", formData)
this.$refs.apply.closeLoading()
if(resp.code===0){
this.getUnionInfo()
this.$refs.guava.index()
}else{
this.notifyWarning(resp.msg)
}
},
apply() {
this.formData = {}
this.$refs.guava.edit()
if (this.$refs["form"])
this.$refs["form"].resetFields();
},
async getUnionInfo() {
this.unionInfoLoading = true
const resp = await $.get(loc() + "/unionInfo")
this.unionInfoLoading = false
if(resp.code===0){
this.unionInfo = resp.data
}else{
this.notifyWarning(resp.msg)
}
this.unionInfoLoading = false
if(resp.code===0){
this.unionInfo = resp.data
}else{
this.notifyWarning(resp.msg)
}
},
},
async created() {
this.getUnionInfo()
this.changeType = await member.getChangeType()
this.changeOrigin = await member.getChangeOrigin()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,933 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
</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-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="doSearch" style="width: 100%">
<el-select v-model="pageForm.searchName" slot="prepend"
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"
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%;"
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 v-model="pageForm.unitId" style="width: 100%" filterable
clearable
@change="getThreeUnits"
placeholder="请选择">
<el-option
v-for="item in units"
: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-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>
<template v-if="searchMore">
<div class="search-item">
<div class="search-item-label">所属校区:</div>
<div class="search-item-option">
<el-select v-model="pageForm.campus" style="width: 100%" clearable
placeholder="请选择">
<el-option
v-for="item in campusOptions"
:key="item.campus_id"
:label="item.campus_name"
:value="item.campus_id">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">&emsp;&emsp;别:</div>
<div class="search-item-option">
<el-select v-model="pageForm.sex" style="width: 100%" clearable
placeholder="请选择">
<el-option v-for="sex in sexOptions" :label="sex"
:value="sex"></el-option>
</el-select>
</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-date-picker-->
<!-- style="width: 100%"-->
<!-- v-model="pageForm.changeDate"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="更新日期">-->
<!-- </el-date-picker>-->
<el-date-picker
style="width: 100%"
v-model="pageForm.changeDateRange"
@change="changeDateRangeChange"
type="datetimerange"
:picker-options="pickerOptions"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
align="right">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">异动类型:</div>
<div class="search-item-option">
<enum-select v-model="pageForm.changeType" value="code"
label="description"
style="width: 100%"
clearable placeholder="异动类型"
enum="UserChangeType"></enum-select>
</div>
</div>
<!--<div class="search-item">
<div class="search-item-label">是否异动:</div>
<div class="search-item-option">
<el-radio-group v-model="pageForm.changed" @change="doSearch">
<el-radio-button :label="true">是</el-radio-button>
<el-radio-button :label="false">否</el-radio-button>
</el-radio-group>
</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">
<template #label_end>
<span class="text-danger ml10">提醒:小组长可以查看本小组之外的人员</span>
<!-- <span class="text-danger">(温馨提醒:异动类型为新增的教职工,需要新入职变更操作后才能成为工会会员!)</span>-->
</template>
<template #func>
<span class="text-danger">人员信息有无变化:</span>
<el-select v-model="pageForm.isMember" @change="doSearch()"
:clearable="false" size="small"
style="width: 200px;margin-right: 5px">
<el-option label="全部会员" value=""></el-option>
<el-option label="是会员" value="1"></el-option>
<el-option label="不是会员" value="0"></el-option>
</el-select>
<el-radio-group v-model="pageForm.changed" @change="doSearch" class="mr5"
size="small">
<el-radio-button label="">全部({{numData.userSumNum || 0}})
</el-radio-button>
<el-radio-button :label="1">有变化({{numData.changeNum || 0}})
</el-radio-button>
<el-radio-button :label="0">无变化({{numData.notChangeNum || 0}})
</el-radio-button>
</el-radio-group>
<!-- <span class="text-danger">是否会员:</span>
<el-radio-group v-model="pageForm.isMember" @change="doSearch" class="mr5"
size="small">
<el-radio-button label="">全部({{numData.userSumNum || 0}})
</el-radio-button>
<el-radio-button label="1">是({{numData.memberNum || 0}})
</el-radio-button>
<el-radio-button label="0">否({{numData.notMemberNum || 0}})
</el-radio-button>
</el-radio-group>-->
<!-- <el-popconfirm-->
<!-- v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"-->
<!-- title="确定要将所有会员设为福利会员吗?"-->
<!-- @confirm="allIsWelfareMember"-->
<!-- >-->
<!-- <el-button slot="reference"-->
<!-- type="primary" :loading="welfareMemberLoading" size="small">全部设置为福利会员-->
<!-- </el-button>-->
<!-- </el-popconfirm>-->
<el-dropdown style="margin: 0 10px" @command="pushDropdownCommand">
<el-button type="primary" size="small" icon="el-icon-plus">
添加
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'select'}">选择加入
</el-dropdown-item>
<el-dropdown-item :command="{type:'add'}">新增用户
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button :disabled="!checkUsers.length" type="primary" size="small"
icon="el-icon-edit"
@click="openBatchEdit" class="ml5">
设置校区
</el-button>
<el-button :disabled="!checkUsers.length" type="primary" size="small"
icon="el-icon-edit"
@click="openUnitMove" class="ml5">
单位调整
</el-button>
</template>
</table-tool>
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
@sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" class="vi-table"
@selection-change="tableHandleSelectionChange">
<el-table-column type="selection" :reserve-selection="true"></el-table-column>
<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
:sortable="column.sortable"
:label="column.label"
:prop="column.prop" :width="column.width" min-width="100px">
<template v-if="column.prop=='loginname'" scope="{row}">
<el-link type="primary" @click="openView(row.id)">{{row.loginname}}
</el-link>
</template>
<template v-else-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>
</el-table-column>
<el-table-column label="异动信息" header-align="center">
<el-table-column label="更新时间" prop="changeTime" min-width="145px"
header-align="center"
sortable
align="center" show-overflow-tooltip>
</el-table-column>
<el-table-column label="异动类型" prop="changeType" header-align="center"
align="center" show-overflow-tooltip sortable>
<template scope="{row}">
<span style="color: #0e78c5">{{changeType[row.changeType]}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="会员" header-align="center" align="center" prop="member"
show-overflow-tooltip sortable>
<template scope="{row}">
<span v-if="row.member==1" class="text-success ">
<i class="fa fa-circle ml5"></i>
</span>
<span v-else class="text-danger">
<i class="fa fa-circle ml5"></i>
</span>
</template>
</el-table-column>
<el-table-column label="变更状态" header-align="center" align="center"
prop="welfareMember"
show-overflow-tooltip sortable>
<template scope="{row}">
<vi-table-state v-if="row.stateId" :state="row"></vi-table-state>
<vi-table-state v-else
:state="{stateColor:'#1890ff',stateName:'暂无'}"></vi-table-state>
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center"
label="操作"
width="100px">
<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="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')||@shiro.hasRole('ghxzzz')}"
:disabled="!(row.apply||row.reApply)"
:command="{type:'change',data:row}">
变更
</el-dropdown-item>
<!--
<el-dropdown-item v-show="row.changeType===2"
:command="{type:'sendSms',data:row}">
通知入会
</el-dropdown-item>-->
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<mem-change-apply ref="apply" :userid="userId" @submit="doSubmit"
:welfare_member="true"></mem-change-apply>
</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="changInfo">
<mem-change-records :userid="userId"></mem-change-records>
</el-tab-pane>
</el-tabs>
</template>
<template #public>
<member ref="member" :id="userId" @save="afterEdit"></member>
</template>
</guava>
<el-drawer
title="设置校区"
:visible.sync="batchEditVisible"
:before-close="handleClose" size="1000px">
<el-timeline style="margin-right: 40px">
<el-timeline-item timestamp="" placement="top">
<el-form ref="batchForm" :model="batchFormData" label-width="100px">
<el-row :gutter="60">
<el-col :span="12">
<el-form-item label="所属校区">
<el-select v-model="batchFormData.campus" style="width: 300px"
clearable
size="medium"
placeholder="请选择"
@change="checkUsers.map(v=>$set(v,'campusId',batchFormData.campus))">
<el-option
v-for="item in campusOptions"
:key="item.campus_id"
:label="item.campus_name"
:value="item.campus_id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-timeline-item>
<el-timeline-item timestamp="" placement="top">
<el-table :data="checkUsers" style="width: 100%" row-key="id" class="vi-table"
height="70vh">
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="loginname"
label="工号"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="username"
label="姓名"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="unitname"
label="所属单位"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="unionname"
label="所属工会"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="campusId"
label="所属校区" width="300px">
<template scope="{row}">
<el-select v-model="row.campusId" style="width: 200px" clearable
size="small"
placeholder="请选择">
<el-option
v-for="item in campusOptions"
:key="item.campus_id"
:label="item.campus_name"
:value="item.campus_id">
</el-option>
</el-select>
</template>
</el-table-column>
</el-table>
</el-timeline-item>
</el-timeline>
<span style="position: absolute;bottom: 20px;right: 20px">
<el-button @click="batchEditVisible = false"
:disabled="batchEditLoading">取 消</el-button>
<el-button type="primary" @click="doBatchEdit"
:loading="batchEditLoading">确定</el-button>
</span>
</el-drawer>
<el-drawer
title="单位调整"
:visible.sync="unitMoveVisibile"
:before-close="handleClose" size="70%">
<el-row class="text-primary p20">
选择新单位
</el-row>
<el-row type="flex" :gutter="20" class="pl20 pr20">
<el-col :span="12">
<el-select placeholder="请选择新工会" v-model="unitMoveFormData.unionId"
style="width: 100%;"
clearable="true"
@change="moveUnionsChange"
filterable="true">
<el-option v-for="item in unitMoveUnions" :label="item.unionname"
:value="item.id"></el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-select v-model="unitMoveFormData.unitId" style="width: 100%" filterable
clearable
@change="moveUnitChange"
placeholder="请选择新单位">
<el-option
v-for="item in unitMoveUnits"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-select v-model="unitMoveFormData.threeUnitId" clearable filterable
placeholder="请选择新科室"
style="width: 100%" @change="threeUnitChange">
<el-option
v-for="item in threeUnits"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-input :value="unitMoveFormData.unionGroupName" disabled
placeholder="新工会小组"></el-input>
</el-col>
</el-row>
<el-row class="mt10">
<el-table :data="checkUsers" style="width: 100%;padding: 20px" class="vi-table"
border
height="70vh">
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="loginname"
width="120"
label="工号"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="username"
width="120"
label="姓名"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="threeUnitName"
label="当前科室"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="unitname"
label="当前单位"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="unionname"
label="当前工会"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
label="新科室">
<template slot-scope="{row}">
<span>{{unitMoveFormData.threeUnitName}}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
label="新单位">
<template slot-scope="{row}">
<span>{{unitMoveFormData.unitName}}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
label="新分工会">
<template slot-scope="{row}">
<span>{{unitMoveFormData.unionName}}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<span style="position: absolute;bottom: 20px;right: 20px">
<el-button @click="unitMoveVisibile = false">取 消</el-button>
<el-button type="primary" @click="doUnitMove">确定</el-button>
</span>
</el-drawer>
<el-drawer
title="添加会员"
:visible.sync="selectUserVisible"
:before-close="handleClose" size="1200px">
<member-user-select v-model="selectUsers" ref="userSelect" :page_size="10"
:sql_cnd="['(u.member is null or u.member = 0) and (c.taskId is null OR c.stateId=70)']"></member-user-select>
<span style="position: absolute;bottom: 20px;right: 20px">
<el-button @click="selectUserVisible = false"
:disabled="selectUserLoading">取 消</el-button>
<el-button type="primary" @click="doBatchJoinMember"
:loading="selectUserLoading">确定</el-button>
</span>
</el-drawer>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
checkUsers: [],
batchEditVisible: false,
batchEditLoading: false,
batchFormData: {},
unitMoveVisibile: false,
unitMoveUnions: [],
unitMoveUnits: [],
unitMoveFormData: {
unitId: '',
unionId: '',
unitName: '',
unionName: ''
},
active: 'info',
submitLoading: false,
formRules: {},
info: {},
userId: '',
formData: {},
pageForm: {
searchName: "u.username",
changed: '',
isMember: '1'
},
unions: [],
units: [],
unionGroups:[],
threeUnits:[],
tableColumns: [
{prop: 'loginname', label: '工号', sortable: true},
{prop: 'username', label: '姓名', sortable: true},
{prop: 'sex', label: '性别', sortable: true, width: '100px'},
{prop: 'birthday', label: '出生年月', sortable: true},
{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},
],
campusOptions: [],
changeType: {},
sexOptions: ['男', '女'],
welfareMemberLoading: false,
numData: {
changeNum: 0,
notChangeNum: 0,
userSumNum: 0,
memberNum: 0,
notMemberNum: 0,
},
threeUnits: [],
selectUserVisible: false,
selectUsers: [],
selectUserLoading: 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.0'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
'mem-change-apply': httpVueLoader('/components/member/MemChangeApply.vue?v=1.0.2'),
'enum-select': httpVueLoader('/components/plugins/EnumSelect.vue?v=1.0.0'),
'member-user-select': httpVueLoader('/components/plugins/MemberUserTableSelect.vue?v=1.0.0'),
},
methods: {
async afterEdit(memData) {
if (!this.userId) {
await $.post(" /platform/member/info/make/joinMemberFamily", memData)
}
this.userId = ''
this.pageData()
this.$refs.guava.index()
},
async doBatchJoinMember() {
if (!this.selectUsers.length) {
this.notifyWarning("请先勾选需要设置为会员的用户")
return
}
this.selectUserLoading = true
const resp = await $.post(loc() + "/joinWelfareMember", {userIds: JSON.stringify(this.selectUsers)});
this.selectUserLoading = false
if (resp.code === 0) {
this.pageData()
this.$refs.userSelect.init()
this.selectUserVisible = false
} else {
this.notifyWarning(resp.msg)
}
},
pushDropdownCommand({type}) {
if (type == 'select') {
this.selectUsers = []
this.selectUserVisible = true
this.$nextTick(() => {
this.$refs.userSelect.init()
})
} else if (type == 'add') {
this.userId = ""
this.$refs.guava.public()
if (!this.userId) {
this.$refs.member.id = null
this.$refs.member.getUserInfo()
}
}
},
async threeUnitChange(val) {
if (val) {
const threeUnit = this.threeUnits.find(v => v.id === val)
const groupName = threeUnit.groupname
this.$set(this.unitMoveFormData, 'threeUnitName', threeUnit.name)
this.$set(this.unitMoveFormData, 'unionGroupName', groupName)
} else {
this.$set(this.unitMoveFormData, 'unionGroupName', null)
}
},
async getThreeUnits(val) {
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unitId, this.pageForm.unionGroupId)
},
doSearch() {
this.pageForm.pageNumber = 1
this.pageData()
this.getNumData()
},
openUnitMove() {
this.unitMoveVisibile = true
this.unitMoveFormData = {
unitId: '',
unionId: '',
unitName: '',
unionName: ''
}
},
async moveUnionsChange(val) {
if (val) {
this.unitMoveUnits = await getUnits(val)
this.$set(this.unitMoveFormData, 'unionName', this.unitMoveUnions.find(v => v.id === val).unionname)
this.$set(this.unitMoveFormData, 'unitId', '')
this.$set(this.unitMoveFormData, 'unitName', '')
} else {
this.$set(this.unitMoveFormData, 'unitId', '')
this.$set(this.unitMoveFormData, 'unitName', '')
this.$set(this.unitMoveFormData, 'unionName', '')
this.unitMoveUnits = []
}
},
async moveUnitChange(val) {
if (val) {
this.$set(this.unitMoveFormData, 'unitName', this.unitMoveUnits.find(v => v.id === val).name)
} else {
this.$set(this.unitMoveFormData, 'unitName', '')
}
if (val) {
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(val, null)
}
},
async doUnitMove() {
if (this.unitMoveFormData.unitId === '') {
this.notifyWarning('请选择新单位!')
return
}
if (this.unitMoveFormData.threeUnitId === '') {
this.notifyWarning('请选择新科室!')
return
}
const params = {
unitId: this.unitMoveFormData.unitId,
threeUnitId: this.unitMoveFormData.threeUnitId,
userId: this.checkUsers.map(v => v.id)
}
const resp = await $.post(loc() + '/userUnitMove', params)
if (resp.code === 0) {
this.pageData()
this.getNumData()
this.$refs.table.clearSelection();
this.unitMoveVisibile = false
} else {
this.notifyWarning(resp.msg)
}
},
changeDateRangeChange(val) {
this.pageForm.changeDateBefore = val[0]
this.pageForm.changeDateEnd = val[1]
},
async doBatchEdit() {
const batch = this.checkUsers.map(v => {
return {id: v.id, campusId: v.campusId}
})
this.batchEditLoading = true
const resp = await $.post("/platform/welfare/member/mange/batchEdit", {users: JSON.stringify(batch)});
this.batchEditLoading = false
if (resp.code === 0) {
this.pageData()
this.getNumData()
this.$refs.table.clearSelection();
this.batchEditVisible = false
} else {
this.notifyWarning(resp.msg)
}
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {
});
},
openBatchEdit() {
this.batchFormData = {}
this.batchEditVisible = true
},
tableHandleSelectionChange(val) {
this.checkUsers = val;
},
async sendSms(userid) {
const resp = await $.post(loc() + '/sendSms', {userid})
if (resp.code === 0) {
this.$notify({title: '成功', message: '发送成功!', type: 'success'});
}
},
async allIsWelfareMember() {
this.welfareMemberLoading = true
const resp = await $.post(loc() + "/allIsWelfareMember")
this.welfareMemberLoading = false
},
dropdownCommand(command) {
const {type, data} = command
if (type === 'view') {
this.openView(data.id)
} else if (type === 'change') {
this.openChange(data.id)
} else if (type === 'sendSms') {
this.sendSms(data.id)
}
},
openChange(userId) {
this.userId = userId
this.$refs.guava.edit()
},
async doSubmit(formData) {
const resp = await $.post(loc() + "/change", formData)
this.$refs.apply.closeLoading()
if (resp.code === 0) {
this.userId = ""
this.$refs.guava.index()
this.pageData()
this.getNumData()
} else {
this.notifyWarning(resp.msg)
}
},
openView(userId) {
this.userId = 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 getChangeType() {
const changeType = {}
const changeTypeOptions = await getEnumOptions("UserChangeType")
changeTypeOptions.forEach(v => {
changeType[v.code] = v.description
})
return changeType
},
async getNumData() {
const resp = await $.post(loc() + '/getButtonNum', this.pageForm)
if (resp.code === 0) {
this.numData = resp.data
} else {
this.notifyWarning(resp.msg)
}
}
},
async created() {
this.pageData();
this.getNumData()
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.unitMoveUnions = clone(this.unions)
this.campusOptions = await getCampus()
this.changeType = await this.getChangeType()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,440 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
</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-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">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
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="getThreeUnits"
clearable
filterable>
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-row>
</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">
<dict-select v-model="pageForm.userType" 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.changeType" style="width: 100%" clearable
placeholder="变更类型"
code="MemberChangeType"></dict-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">申请方式:</div>
<div class="search-item-option">
<enum-select enum="MemberChangeOrigin" v-model="pageForm.applyOrigin" value="code"
label="description"
style="width: 100%" clearable placeholder="申请方式"></enum-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" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" class="vi-table">
<el-table-column type="expand" width="40px">
<template slot-scope="{row}">
<el-form class="demo-table-expand" v-loading="row.loading"
label-position="right" label-suffix="" label-width="120px">
<vi-title title="变更信息"></vi-title>
<el-form-item label="变更原因">
{{ row.remark }}
</el-form-item>
<!--异动-->
<template v-if="row.type==1">
<vi-title title="异动信息"></vi-title>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="原科室">
<span>{{ row.originThreeUnitName }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="原单位">
<span>{{ row.originUnitName }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="原工会">
<span>{{ row.originUnionName }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="新科室">
<span>{{ row.currentThreeUnitName }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="新单位">
<span>{{ row.currentUnitName }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="新工会">
<span>{{ row.currentUnionName }}</span>
</el-form-item>
</el-col>
</el-row>
</template>
<vi-title title="分工会审核信息"></vi-title>
<el-row :gutter="20" v-if="row.unionAudit">
<el-col :span="12">
<el-form-item label="审核人员">
<span>{{ row.unionAudit.username }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<span>{{ row.unionAudit.auditTime }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
<span>{{ row.unionAudit.auditOpinion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-else type="flex" justify="center">
<el-form-item label="暂无审核信息">
</el-form-item>
</el-row>
<vi-title title="校工会审核信息"></vi-title>
<el-row :gutter="20" v-if="row.schoolAudit">
<el-col :span="12">
<el-form-item label="审核人员">
<span>{{ row.schoolAudit.username }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<span>{{ row.schoolAudit.auditTime }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
<span>{{ row.schoolAudit.auditOpinion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-else type="flex" justify="center">
<el-form-item label="暂无审核信息">
</el-form-item>
</el-row>
</el-form>
</template>
</el-table-column>
<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=='type'" scope="{row:{type}}">
{{changeType[type]}}
</template>
<template v-else-if="column.prop=='applyOrigin'" scope="{row:{applyOrigin}}">
{{changeOrigin[applyOrigin]}}
</template>
<template v-else-if="column.prop=='stateId'" scope="{row}">
<vi-table-state v-if="row.stateId" :state="row"></vi-table-state>
<vi-table-state v-else :state="{stateColor:'#1890ff',stateName:'暂无'}"></vi-table-state>
</template>
<template v-else-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>
</el-table-column>
<el-table-column label="变更人姓名">
<template slot-scope="{row}">
{{row.schoolAudit?row.schoolAudit.username:''}}
</template>
<!-- <template v-else-if="column.prop==='changePersonLoginname'" scope="{row}">-->
<!-- {{row.schoolAudit.loginname}}-->
<!-- </template>-->
<!-- <template v-else-if="column.prop==='changeTime'" scope="{row}">-->
<!-- {{row.schoolAudit.auditTime}}-->
<!-- </template>-->
</el-table-column>
<el-table-column label="变更人工号">
<template slot-scope="{row}">
{{row.schoolAudit?row.schoolAudit.loginname:''}}
</template>
</el-table-column>
<el-table-column label="变更时间" width="150">
<template slot-scope="{row}">
{{row.schoolAudit?row.schoolAudit.auditTime:''}}
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
width="100px" fixed="right">
<template scope="{row}">
<el-button size="small" :loading="row.loading" @click="openView(row.userId)">查看
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<mem-change-apply ref="apply" :userid="userId" @submit="doSubmit"></mem-change-apply>
</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>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
active: 'info',
submitLoading: false,
formRules: {},
info: {},
userId: '',
formData: {},
pageForm: {
searchName: "u.username",
},
unions: [],
units: [],
unionGroups:[],
threeUnits:[],
changeOrigin: {},
changeType: {},
tableColumns: [
{prop: 'loginname', label: '工号'},
{prop: 'username', label: '姓名'},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
{prop: 'threeUnitName', label: '所在科室', sortable: true},
{prop: 'unionGroupName', label: '工会小组', sortable: true},
{prop: 'type', label: '变更类型', sortable: true},
{prop: 'applyDate', label: '申请时间', sortable: true},
{prop: 'applyOrigin', label: '申请方式', sortable: true},
{prop: 'stateId', label: '状态', sortable: true}
],
}
},
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.0'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
'mem-change-apply': httpVueLoader('/components/member/MemChangeApply.vue?v=1.0.0'),
'enum-select': httpVueLoader('/components/plugins/EnumSelect.vue?v=1.0.0'),
},
methods: {
async onExpand(row, expandedRows) {
if (!expandedRows.includes(row)) {
return
}
this.$set(row, "loading", true)
const resp = await $.get("/platform/member/common/findChangeApplyInfo", {id: row.id})
this.$set(row, "loading", false)
if(resp.code===0){
this.$set(row, "info", data)
}else{
this.notifyWarning(resp.msg)
this.$set(row, "info", {})
}
},
openChange(userId) {
this.userId = userId
this.$refs.guava.edit()
},
async doSubmit(formData) {
const resp = await $.post(loc() + "/change", formData)
this.$refs.apply.closeLoading()
if(resp.code===0){
this.userId = ""
this.$refs.guava.index()
this.pageData()
}else{
this.notifyWarning(resp.msg)
}
},
openView(userId) {
this.userId = 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 getThreeUnits() {
this.$set(this.pageForm, "threeUnitId", null)
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unit, this.pageForm.unionGroupId)
}
},
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.changeType = await member.getChangeType()
this.changeOrigin = await member.getChangeOrigin()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,547 @@
<style>
.el-tabs__content {
padding-top: 20px;
}
</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-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="doSearch" style="width: 100%">
<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">
<el-date-picker
style="width: 100%"
v-model="pageForm.dateRange"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">变更类型:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.type" style="width: 100%" clearable placeholder="变更类型"
code="MemberChangeType"></dict-select>
</div>
</div>
<template v-if="searchMore">
<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
filterable
@change="flushUnits" @clear="flushUnits">
<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
filterable>
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-row>
</div>
</div>
<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">
<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">
<template #func>
<el-radio-group v-model="pageForm.audit" @change="doSearch" size="small"
style="margin-bottom: -7.5px">
<el-radio-button :label="0">全部</el-radio-button>
<el-radio-button :label="1">已审核</el-radio-button>
<el-radio-button :label="2">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" class="vi-table">
<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=='type'" scope="{row:{type}}">
{{changeType[type]}}
</template>
<template v-else-if="column.prop=='applyOrigin'" scope="{row:{applyOrigin}}">
{{changeOrigin[applyOrigin]}}
</template>
<template v-else-if="column.prop=='stateId'" scope="{row}">
<vi-table-state :state="row"></vi-table-state>
</template>
<template v-else-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>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
width="100px">
<template scope="{row}">
<el-button size="mini" :loading="row.loading" v-if="row.audit" type="primary"
@click="openAudit(row,true)">审核
</el-button>
<el-button size="mini" :loading="row.loading" v-else @click="openAudit(row,false)">查看
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<el-tabs v-model="active">
<el-tab-pane label="个人信息" name="info">
<member ref="memberInfo" :id="info.userId" view></member>
</el-tab-pane>
<el-tab-pane label="变更记录" name="changInfo">
<mem-change-records :userid="info.userId"></mem-change-records>
</el-tab-pane>
<el-tab-pane label="院级工会审核" name="union">
<el-form :model="formData" ref="form" :rules="formRules"
label-width="120px" label-suffix="">
<vi-title title="审核信息"></vi-title>
<template v-if="!info.unionAudit&&source==1">
<template v-if="info.type==1">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="原单位">
<el-input :value="info.originUnit.name" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="原工会">
<el-input :value="info.originUnion.unionname" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="新单位">
<el-input :value="info.currentUnit.name" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="新工会">
<el-input :value="info.currentUnion.unionname" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
</template>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人员">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="auditTime" label="审核时间">
<el-input v-model="formData.auditTime" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="opinion" label="审核意见">
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<div style="float: right;margin: 20px 0">
<el-button @click="doAudit(false)" :loading="submitLoading">
</el-button>
<el-button type="primary" @click="doAudit(true)"
:loading="submitLoading">
</el-button>
</div>
</template>
<template v-else>
<el-row :gutter="20" v-if="info&&info.unionAudit">
<el-col :span="12">
<el-form-item label="审核人员">
<span>{{ info.unionAudit.username }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<span>{{ info.unionAudit.auditTime }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
<span>{{ info.unionAudit.auditOpinion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-else type="flex" justify="center">
<el-form-item label="暂无审核信息">
</el-form-item>
</el-row>
</template>
</el-form>
</el-tab-pane>
<el-tab-pane label="校工会审核" name="school"
v-if="info.unionAudit">
<el-form class="demo-table-expand" :model="formData" ref="form" :rules="formRules"
label-width="120px" label-suffix="">
<vi-title title="审核信息"></vi-title>
<template v-if="!info.schoolAudit && source==2 && info.audit">
<template v-if="info.type==1">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="原单位">
<el-input :value="info.originUnit.name" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="原工会">
<el-input :value="info.originUnion.unionname" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="新单位">
<el-input :value="info.currentUnit.name" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="新工会">
<el-input :value="info.currentUnion.unionname" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
</template>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人员">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="auditTime" label="审核时间">
<el-input v-model="formData.auditTime" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="opinion" label="审核意见">
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<div style="float: right;margin: 20px 0">
<el-button @click="doAudit(false)" type="danger" :loading="submitLoading">
</el-button>
<el-button type="primary" @click="doAudit(true)"
:loading="submitLoading">
</el-button>
</div>
</template>
<template v-else>
<el-row :gutter="20" v-if="info&&info.schoolAudit">
<el-col :span="12">
<el-form-item label="审核人员">
<span>{{ info.schoolAudit.username }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<span>{{ info.schoolAudit.auditTime }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
<span>{{ info.schoolAudit.auditOpinion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-else type="flex" justify="center">
<el-form-item label="暂无审核信息">
</el-form-item>
</el-row>
</template>
</el-form>
</el-tab-pane>
</el-tabs>
</template>
<template #view>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
active: 'info',
submitLoading: false,
formRules: {},
info: {
originUnion: {},
currentUnion: {}
},
formData: {},
pageForm: {
unionId: null,
unitId: null,
threeUnitId: null,
unionGroupId: null,
source: source,
searchName: "u.username",
audit: 2
},
units: [],
unions: [],
changeOrigin: {},
changeType: {},
tableColumns: [
{prop: 'loginname', label: '工号', checked: true},
{prop: 'username', label: '姓名'},
{prop: 'mobile', label: '联系电话'},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
{prop: 'threeUnitName', label: '所在科室', sortable: true},
{prop: 'unionGroupName', label: '工会小组', sortable: true},
{prop: 'type', label: '变更类型', sortable: true},
{prop: 'applyDate', label: '申请时间', sortable: true},
{prop: 'applyOrigin', label: '申请方式', sortable: true},
{prop: 'stateId', label: '状态', sortable: true},
],
}
},
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.0'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
},
methods: {
async doAudit(pass) {
if (!pass) {
const confirm = await this.$confirm('您确定要拒绝吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
}
this.formData.auditPass = pass
this.submitLoading = true
const resp = await $.post("/platform/member/change/audit/doAudit", this.formData)
this.submitLoading = false
if(resp.code===0){
//更新用户信息
this.info.userId = ""
this.pageData()
this.$refs.guava.index()
this.notifySuccess(resp.msg)
}else{
this.notifyWarning(resp.msg)
}
},
async openAudit(row, audit) {
this.$set(row, "loading", true)
const resp = await $.get("/platform/member/common/findChangeApplyInfo", {id: row.id})
this.$set(row, "loading", false)
if(resp.code===0){
const data = resp.data
data.audit = audit
this.info = data
if (audit) {
if (this.pageForm.source === 1) {
this.active = 'union'
} else if (this.pageForm.source === 2) {
this.active = 'school'
}
} else {
this.active = 'info'
}
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
this.formData = {
recordId: row.id,
username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'),
}
}else{
this.notifyWarning(resp.msg)
}
},
pageData() {
sublime.showLoadingbar();
this.tableLoading = true
this.pageForm.date = JSON.stringify(this.pageForm.dateRange)
$.post("/platform/member/change/audit/pageData", this.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 flushUnits() {
debugger
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.changeType = await member.getChangeType()
this.changeOrigin = await member.getChangeOrigin()
}
})
</script>
@@ -0,0 +1,12 @@
<!--#
layout("/layouts/platform.html"){
#-->
<script>
window.source = 2
</script>
<!--#include("/platform/member/change/audit/Layout.html"){}#-->
<!--#
}
#-->
@@ -0,0 +1,12 @@
<!--#
layout("/layouts/platform.html"){
#-->
<script>
window.source = 1
</script>
<!--#include("/platform/member/change/audit/Layout.html"){}#-->
<!--#
}
#-->
@@ -0,0 +1,19 @@
<script>
const getChangeType = async () => {
const changeType = {}
const changeTypeOptions = await getDictOptions("MemberChangeType")
changeTypeOptions.forEach(v => {
changeType[v.code] = v.name
})
return changeType
}
const getChangeOrigin = async () => {
const changeOrigin = {}
const changeOriginOptions = await getEnumOptions("MemberChangeOrigin")
changeOriginOptions.forEach(v => {
changeOrigin[v.code] = v.description
})
return changeOrigin
}
</script>
@@ -0,0 +1,253 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<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%"
@change="doSearch"
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="选择年度">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">任务:</div>
<div class="search-item-option">
<el-select v-model="pageForm.taskId" style="width: 100%" @change="doSearch">
<el-option v-for="item in memberCheckTaskOptions"
:label="item.taskName"
: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="username"></el-option>
<el-option label="工号" value="loginname"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">联系电话:</div>
<div class="search-item-option">
<el-input @keyup.enter.native="doSearch" clearable clearable
placeholder="请输入联系电话"
style="width: 100%"
v-model="pageForm.mobile">
</el-input>
</div>
</div>
<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%;"
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%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name"
:value="item.id"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="人员列表" :app="this">
<template #func>
<el-radio-group @change="doSearch" size="medium" v-model="pageForm.showFinish">
<el-radio-button :label="0">全部{{finishNum.allFinish}}</el-radio-button>
<el-radio-button :label="1">已核对{{finishNum.doFinish}}</el-radio-button>
<el-radio-button :label="-1">未核对{{finishNum.noFinish}}</el-radio-button>
</el-radio-group>
<el-button size="small" type="primary" style="margin-left: 10px"
@click.prevent="doExport">导出核对信息
</el-button>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" class="vi-table">
<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 scope="{row}" v-if="column.prop=='isFinish'">
<el-tag v-if="row.isFinish">已核对</el-tag>
<el-tag type="danger" v-else>未核对</el-tag>
</template>
</el-table-column>
<!-- <el-table-column header-align="center" label="操作" width="200px">-->
<!-- <template scope="{row}">-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
exportVisible: false,
exportValue: 0,
unions: [],
units: [],
tableColumns: [
{prop: 'loginname', label: '工号', sortable: true},
{prop: 'username', label: '姓名', sortable: true},
{prop: 'mobile', label: '联系电话', sortable: true},
{prop: 'sex', label: '性别', sortable: true},
{prop: 'birthday', label: '出生年月', sortable: true},
{prop: 'personType', label: '人员类型', sortable: true},
// {prop: 'userState', label: '在职状态', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所在单位', sortable: true},
{prop: 'isFinish', label: '是否核对', sortable: true},
],
pageForm: {
year: new Date().getFullYear() + '',
searchName: 'username',
showFinish: 0,
},
memberCheckTaskOptions: [],
finishNum: {
allFinish: 0,
doFinish: 0,
noFinish: 0,
}
}
},
methods: {
doSearch() {
this.pageForm.pageNumber = 1
this.pageData();
this.getFinishNum();
},
async getMemberCheckTaskOptions() {
const resp = await $.get('/platform/member/check/task/getTaskModePersonal')
this.memberCheckTaskOptions = resp.data
if (this.memberCheckTaskOptions.length) {
this.$set(this.pageForm, 'taskId', this.memberCheckTaskOptions[0].id)
}
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
async getFinishNum() {
const resp = await $.post(loc() + '/getFinishNum', this.pageForm)
if (resp.code === 0) {
this.finishNum = resp.data
} else {
this.notifyWarning(resp.msg)
}
},
async doExport() {
// let _this = this.pageForm
let task = this.memberCheckTaskOptions.filter(v => v.taskId = this.pageForm.taskId)
if (this.pageForm.unionId === undefined) {
this.pageForm.unionId = '';
}
if (this.pageForm.mobile === undefined) {
this.pageForm.mobile = '';
}
window.location.href =
loc() + '/exportExcel?unionId=' + this.pageForm.unionId +
'&unitId=' + this.pageForm.unitId +
'&showFinish=' + this.pageForm.showFinish +
'&year=' + this.pageForm.year +
'&taskName=' + task[0].taskName +
'&taskId=' + this.pageForm.taskId +
'&mobile=' + this.pageForm.mobile +
'&searchKeyword=' + this.pageForm.searchKeyword;
},
},
async created() {
await this.getMemberCheckTaskOptions()
if (this.pageForm.taskId != null) {
await this.pageData();
await this.getFinishNum();
}
this.unions = await getUnions(null);
this.flushUnits()
},
computed: {
allowOperationTask() {
const {taskId} = this.pageForm
if (taskId) {
const task = this.memberCheckTaskOptions.find(v => v.id === taskId)
const startTime = moment(task.startTime).valueOf()
const endTime = moment(task.endTime).valueOf()
const nowDate = Date.now()
return nowDate > startTime && nowDate < endTime
} else {
return false
}
}
},
});
</script>
<!--#
}
#-->
@@ -0,0 +1,642 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<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"
type="year"
value-format="yyyy"
placeholder="选择年度">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">任务:</div>
<div class="search-item-option">
<el-select v-model="pageForm.taskId" style="width: 100%">
<el-option v-for="item in memberCheckTaskOptions"
:label="item.taskName"
:value="item.id"></el-option>
</el-select>
</div>
</div>
<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%;"
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%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</div>-->
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="人员列表" :app="this">
<template #func>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
show-summary
:summary-method="getSummaries"
@expand-change="tableColumnExpandChange"
v-loading="tableLoading" :size="tableSize" class="vi-table">
<el-table-column type="expand">
<template slot-scope="{row}">
<el-table :data="row.checkUsers" style="width: 100%">
<el-table-column label="姓名" prop="userName"
header-align="center"></el-table-column>
<el-table-column label="工号" prop="loginName"
header-align="center"></el-table-column>
<el-table-column label="所属单位" prop="unitname"
header-align="center">
<template scope="{row}">
{{row.unitname}}<span v-if="row.newUnitName">→{{row.newUnitName}}</span>
</template>
</el-table-column>
<el-table-column label="所在科室" prop="threeUnitName"
header-align="center">
<template scope="{row}">
{{row.threeUnitName}}<span
v-if="row.newThreeUnitName">→{{row.newThreeUnitName}}</span>
</template>
</el-table-column>
<el-table-column label="异动信息" header-align="center">
<el-table-column label="更新时间" prop="changeTime" min-width="145px"
header-align="center"
sortable
align="center" show-overflow-tooltip>
</el-table-column>
<el-table-column label="异动类型" prop="changeType"
header-align="center"
align="center" show-overflow-tooltip sortable>
<template scope="{row}">
<span style="color: #0e78c5">{{changeType[row.changeType]}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="会员" header-align="center" align="center"
prop="member"
show-overflow-tooltip sortable>
<template scope="{row}">
<span v-if="row.member==1" class="text-success ">
<i class="fa fa-circle ml5"></i>
</span>
<span v-else class="text-danger">
<i class="fa fa-circle ml5"></i>
</span>
</template>
</el-table-column>
<el-table-column label="操作" width="100px" header-align="center">
<template scope="{row:expandRow}">
<el-button size="mini" type="primary"
@click="openAudit(expandRow,true,row)">
审核
</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<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=='isFinish'" scope="{row}">
<span :class="row.isFinish?'text-success':'text-danger'">
{{row.isFinishText}}
</span>
</template>
<template v-else-if="column.prop=='unionGroup'" scope="{row}">
<el-link type="primary" @click="openGroupUnionDrawer(row)">
{{row.unionGroupNum}}
{{row.shiUnionGroupNum}}
</el-link>
</template>
</el-table-column>
<!--<el-table-column header-align="center" label="操作" width="200px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openCheck(row)"
:disabled="!(row.apply||row.reApply)">
核对
</el-button>
</template>
</el-table-column>-->
</el-table>
</el-card>
<template #edit>
<el-tabs v-model="active">
<el-tab-pane label="个人信息" name="info">
<member ref="memberInfo" :id="info.userId" view></member>
</el-tab-pane>
<el-tab-pane label="变更记录" name="changInfo">
<mem-change-records :userid="info.userId"></mem-change-records>
</el-tab-pane>
<el-tab-pane label="院级工会审核" name="union">
<el-form :model="formData" ref="form" :rules="formRules"
label-width="120px" label-suffix="">
<vi-title title="审核信息"></vi-title>
<template v-if="!info.unionAudit&&source==1">
<template v-if="info.type==1">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="原单位">
<el-input :value="info.originUnit.name"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="原工会">
<el-input :value="info.originUnion.unionname"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="新单位">
<el-input :value="info.currentUnit.name"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="新工会">
<el-input :value="info.currentUnion.unionname"
disabled></el-input>
</el-form-item>
</el-col>
</el-row>
</template>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人员">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="auditTime" label="审核时间">
<el-input v-model="formData.auditTime" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="opinion" label="审核意见">
<el-input type="textarea" v-model="formData.auditOpinion" rows="4"
maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<div style="float: right;margin: 20px 0">
<el-button @click="doAudit(false)" :loading="submitLoading">
</el-button>
<el-button type="primary" @click="doAudit(true)"
:loading="submitLoading">
</el-button>
</div>
</template>
<template v-else>
<el-row :gutter="20" v-if="info&&info.unionAudit">
<el-col :span="12">
<el-form-item label="审核人员">
<span>{{ info.unionAudit.username }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<span>{{ info.unionAudit.auditTime }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
<span>{{ info.unionAudit.auditOpinion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-else type="flex" justify="center">
<el-form-item label="暂无审核信息">
</el-form-item>
</el-row>
</template>
</el-form>
</el-tab-pane>
<el-tab-pane label="校工会审核" name="school"
v-if="info.unionAudit">
<el-form class="demo-table-expand" :model="formData" ref="form"
:rules="formRules"
label-width="120px" label-suffix="">
<vi-title title="审核信息"></vi-title>
<template v-if="!info.schoolAudit&&source==2">
<template v-if="info.type==1||info.currentUnitId">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="原单位">
<el-input :value="info.originUnit.name"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="原工会">
<el-input :value="info.originUnion.unionname"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="新单位">
<!-- <el-input :value="info.currentUnit.name"></el-input>-->
<el-select v-model="info.currentUnitId"
style="width: 100%" filterable
clearable
@change="unitChange"
placeholder="请选择单位">
<el-option
v-for="item in unitOptions"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="新工会">
<el-input v-model="info.currentUnionName"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="新科室">
<el-select v-model="info.currentThreeUnitId"
style="width: 100%" filterable
clearable
placeholder="请选择单位">
<el-option
v-for="item in threeUnits"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</template>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人员">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="auditTime" label="审核时间">
<el-input v-model="formData.auditTime" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="opinion" label="审核意见">
<el-input type="textarea" v-model="formData.auditOpinion" rows="4"
maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<div style="float: right;margin: 20px 0">
<el-button @click="doAudit(false)" :loading="submitLoading">
</el-button>
<el-button type="primary" @click="doAudit(true)"
:loading="submitLoading">
</el-button>
</div>
</template>
<template v-else>
<el-row :gutter="20" v-if="info&&info.schoolAudit">
<el-col :span="12">
<el-form-item label="审核人员">
<span>{{ info.schoolAudit.username }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<span>{{ info.schoolAudit.auditTime }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
<span>{{ info.schoolAudit.auditOpinion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-else type="flex" justify="center">
<el-form-item label="暂无审核信息">
</el-form-item>
</el-row>
</template>
</el-form>
</el-tab-pane>
</el-tabs>
</template>
</guava>
<el-drawer
title="小组核对情况"
:visible.sync="groupUnionDrawer"
direction="rtl" :size="'50%'">
<el-table :data="unionGroupData">
<el-table-column prop="groupCode" label="小组编号"></el-table-column>
<el-table-column prop="groupName" label="小组名称"></el-table-column>
<el-table-column prop="username" label="联系人">
<template scope="{row}">
<sapn v-if="row.username">
{{row.username}}({{row.loginname}})
</sapn>
</template>
</el-table-column>
<el-table-column prop="mobile" label="联系方式"></el-table-column>
<el-table-column prop="isFinish" label="是否核对">
<template scope="{row}">
<el-tag type="danger" v-if="!row.isFinish">未核对</el-tag>
<el-tag v-else type="success">已核对</el-tag>
</template>
</el-table-column>
</el-table>
</el-drawer>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
},
data() {
return {
unionGroupData: [],
groupUnionDrawer: false,
unions: [],
units: [],
tableColumns: [
{prop: 'unioncode', label: '编号', sortable: true},
{prop: 'unionname', label: '分工会名称', sortable: true},
{prop: 'memberNum', label: '会员人数', sortable: true},
{prop: 'unionGroup', label: '小组核对情况', sortable: true},
// {prop: 'isFinish', label: '是否核对完成', sortable: true},
{prop: 'notCheckNum', label: '待核对人数', sortable: true},
],
pageForm: {
year: new Date().getFullYear() + ''
},
memberCheckTaskOptions: [],
changeType: {},
userId: null,
active: 'school',
info: {},
source: 2,
formData: {},
unitOptions: [],
}
},
methods: {
async openGroupUnionDrawer(row) {
const {data} = await $.post(loc() + "/unionGroupData", {
unionId: row.id,
taskId: this.pageForm.taskId
})
this.unionGroupData = data
this.groupUnionDrawer = true
},
getSummaries(param) {
const {columns, data} = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总价';
return;
} else if (index === 5) {
sums[index] = '';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index] += ' ';
} else {
sums[index] = '';
}
});
return sums;
},
openCheck(row) {
this.userId = row.id
this.$refs.guava.edit()
},
async getMemberCheckTaskOptions() {
const resp = await $.get('/platform/member/check/task/getAllTask')
this.memberCheckTaskOptions = resp.data
if (this.memberCheckTaskOptions.length) {
this.$set(this.pageForm, 'taskId', this.memberCheckTaskOptions[0].id)
}
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
async getChangeType() {
const changeType = {}
const changeTypeOptions = await getEnumOptions("UserChangeType")
changeTypeOptions.forEach(v => {
changeType[v.code] = v.description
})
return changeType
},
async pageData() {
sublime.showLoadingbar()
const resp = await $.post(loc() + '/pageData', this.pageForm)
sublime.closeLoadingbar()
if (resp.code === 0) {
this.tableData = resp.data
} else {
this.notifyWarning(resp.msg)
}
},
async tableColumnExpandChange(row, expandedRows) {
if (expandedRows.length) {
const {taskId} = this.pageForm
const {id: unionId} = row
const resp = await $.post(loc() + '/getNotCheckUsers', {taskId, unionId})
if (resp.code === 0) {
this.$set(row, 'checkUsers', resp.data)
}
}
},
async openAudit(expandRow, audit, row) {
/* if (!row.isFinish) {
this.notifyWarning('待院工会完成核对后才可审核')
return
}*/
const resp = await $.get("/platform/member/common/findChangeApplyInfo", {id: expandRow.id})
if (resp.code === 0) {
const data = resp.data
data.audit = audit
data.currentUnionName = data.currentUnion ? data.currentUnion.unionname : null
this.info = data
if (audit) {
this.active = 'school'
} else {
this.active = 'info'
}
await this.unitChange(data.currentUnitId)
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
this.formData = {
recordId: expandRow.id,
username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'),
}
} else {
this.info = {}
this.notifyWarning(resp.msg)
}
},
async doAudit(pass) {
this.formData.currentUnitId = this.info.currentUnitId
this.formData.currentUnionId = this.info.currentUnionId
this.formData.currentThreeUnitId = this.info.currentThreeUnitId
this.formData.auditPass = pass
this.submitLoading = true
const resp = await $.post("/platform/member/change/audit/doAudit", this.formData)
this.submitLoading = false
if (resp.code === 0) {
//更新用户信息
this.info.userId = null
this.pageData()
this.$refs.guava.index()
} else {
this.notifyWarning(resp.msg)
}
},
async unitChange(v) {
const unit = this.unitOptions.find(x => x.id === v)
if (unit) {
this.info.currentUnionId = unit.unionid
this.info.currentUnionName = unit.unionname
} else {
this.info.currentUnionId = ''
this.info.currentUnionName = ''
}
if (!v) {
this.info.currentThreeUnitId = ''
}
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.info.currentUnitId, null)
},
},
async created() {
await this.getMemberCheckTaskOptions()
if (this.pageForm.taskId != null) {
this.pageData()
}
this.unions = await getUnions(null)
this.unitOptions = await getUnits(null)
this.flushUnits()
this.changeType = await this.getChangeType()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,194 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava>
<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"
type="year"
value-format="yyyy"
placeholder="选择年度">
</el-date-picker>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="任务列表" :app="this">
<template #func>
<el-button icon="el-icon-plus" size="small" @click="openAdd" type="primary">
新增任务
</el-button>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" class="vi-table">
<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 header-align="center" label="操作" width="200px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openEdit(row)">编辑</el-button>
<el-button size="mini" type="danger" @click="doDelete(row.id)">删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</guava>
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" :close-on-click-modal="false"
width="40%">
<el-form :model="formData" ref="form" label-width="80px" :rules="rules">
<el-form-item prop="taskName" label="任务名称">
<el-input v-model="formData.taskName" maxlength="20"></el-input>
</el-form-item>
<el-form-item prop="startTime" label="开始时间">
<el-date-picker
v-model="formData.startTime"
type="datetime"
value-format="yyyy-MM-dd"
placeholder="选择开始时间">
</el-date-picker>
</el-form-item>
<el-form-item prop="endTime" label="结束时间">
<el-date-picker
v-model="formData.endTime"
type="datetime"
value-format="yyyy-MM-dd"
placeholder="选择结束时间">
</el-date-picker>
</el-form-item>
<el-form-item prop="createTaskMode" label="核对模式">
<el-radio-group v-model="formData.createTaskMode">
<el-radio-button :label="1">工会小组核对</el-radio-button>
<el-radio-button :label="2">个人核对</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item prop="description" label="任务说明">
<el-input v-model="formData.description"
type="textarea"
maxlength="50"></el-input>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="dialogVisible=false">取消</el-button>
<el-button type="primary" @click="doSubmit">确定</el-button>
</el-row>
</el-dialog>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
computed: {
dialogTitle() {
return this.formData.id ? '编辑任务' : '新增任务'
}
},
data() {
return {
tableColumns: [
{prop: 'taskName', label: '任务名称', sortable: true},
{prop: 'year', label: '年度', sortable: true},
{prop: 'startTime', label: '开始时间', sortable: true},
{prop: 'endTime', label: '结束时间', sortable: true},
],
dialogVisible: false,
rules: {
taskName: [{required: true, message: '请输入', trigger: ['change', 'blur']}],
startTime: [{required: true, message: '请选择', trigger: ['change', 'blur']}],
endTime: [{required: true, message: '请选择', trigger: ['change', 'blur']}],
description: [{required: true, message: '请输入', trigger: ['change', 'blur']}],
createTaskMode: [{required: true, message: '请选择', trigger: ['change', 'blur']}]
},
formData: {
startTime: null,
endTime: null,
description: null
},
pageForm: {
year: new Date().getFullYear() + ''
}
}
},
methods: {
openAdd() {
this.dialogVisible = true
this.$refs['form'].resetFields()
},
openEdit(row) {
this.dialogVisible = true
this.$nextTick(() => {
this.formData = {...row}
})
},
async doSubmit() {
const valid = await this.$refs['form'].validate()
if (!valid) return
const methodName = this.formData.id ? '/doEdit' : '/doAdd'
const resp = await $.post(loc() + methodName, this.formData)
if (resp.code === 0) {
this.pageData()
this.notifySuccess(resp.msg)
this.dialogVisible = false
} else {
this.notifyWarning(resp.msg)
}
},
async doDelete(id) {
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
const resp = await $.post(loc() + '/doDelete', {id})
if (resp.code === 0) {
this.doSearch()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
}
},
created() {
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,748 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<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"
type="year"
value-format="yyyy"
placeholder="选择年度">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">任务:</div>
<div class="search-item-option">
<el-select v-model="pageForm.taskId" style="width: 100%">
<el-option v-for="item in memberCheckTaskOptions"
:label="item.taskName"
: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="username"></el-option>
<el-option label="工号" value="loginname"></el-option>
</el-select>
</el-input>
</div>
</div>
<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%;"
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"
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.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>
<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-query">
<el-button type="primary" icon="el-icon-search"
@click="doSearch();getNumData();getUnionTaskStatus()">搜索
</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="人员列表" :app="this">
<template #func>
<!-- <span class="text-danger">人员信息是否异动:</span>-->
<el-select v-model="pageForm.isMember" @change="doSearch()"
:clearable="false" size="small"
style="width: 200px;margin-right: 5px">
<el-option label="全部会员" value=""></el-option>
<el-option label="是会员" value="1"></el-option>
<el-option label="不是会员" value="0"></el-option>
</el-select>
<el-radio-group v-model="pageForm.changed" @change="doSearch" class="mr5"
size="small">
<el-radio-button label="">全部({{numData.userSumNum}})</el-radio-button>
<el-radio-button :label="1">有变化({{numData.changeNum}})</el-radio-button>
<el-radio-button :label="0">无变化({{numData.notChangeNum}})</el-radio-button>
</el-radio-group>
<!-- <span class="text-danger">是否会员:</span>
<el-radio-group v-model="pageForm.isMember" @change="doSearch" class="mr5"
size="small">
<el-radio-button label="">全部({{numData.userSumNum}})</el-radio-button>
<el-radio-button label="1">是({{numData.memberNum}})</el-radio-button>
<el-radio-button label="0">否({{numData.notMemberNum}})</el-radio-button>
</el-radio-group>
-->
<!-- <span v-if="!allowOperationTask" class="text-danger mr10">
该任务不在核对时间内,无法操作
</span>-->
<el-dropdown style="margin: 0 10px" @command="pushDropdownCommand">
<el-button type="primary" size="small" icon="el-icon-plus">
添加
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'select'}">选择加入
</el-dropdown-item>
<el-dropdown-item :command="{type:'add'}">新增用户
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button icon="el-icon-success" size="small" type="primary"
@click="submitCheck"
:disabled="unionTaskStatus || !allowOperationTask">
全部核对完成,提交核对
</el-button>
<el-button v-if="unionTaskStatus" type="primary" size="small"
@click="checkAgain">
重新核对
</el-button>
<el-button icon="el-icon-printer" class="m10" type="primary"
style="float: right"
size="small" @click="doExportByUnion">导出
</el-button>
<el-button :disabled="!checkUsers.length" type="primary" size="small"
icon="el-icon-edit"
@click="openUnitMove" class="ml5">
单位调整
</el-button>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" class="vi-table"
@selection-change="tableHandleSelectionChange">
<el-table-column type="selection" :reserve-selection="true"></el-table-column>
<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="异动信息" header-align="center">
<el-table-column label="更新时间" prop="changeTime" min-width="145px"
header-align="center" sortable
align="center" show-overflow-tooltip>
</el-table-column>
<el-table-column label="异动类型" prop="changeType" header-align="center"
align="center" show-overflow-tooltip sortable>
<template scope="{row}">
<span style="color: #0e78c5">{{changeType[row.changeType]}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="会员" header-align="center" align="center" prop="member"
show-overflow-tooltip sortable>
<template scope="{row}">
<span v-if="row.member==1" class="text-success ">
<i class="fa fa-circle ml5"></i>
</span>
<span v-else class="text-danger">
<i class="fa fa-circle ml5"></i>
</span>
</template>
</el-table-column>
<el-table-column label="变更状态" header-align="center" align="center"
prop="welfareMember"
show-overflow-tooltip sortable>
<template scope="{row}">
<vi-table-state v-if="row.stateId" :state="row"></vi-table-state>
<vi-table-state v-else
:state="{stateColor:'#1890ff',stateName:'暂无'}"></vi-table-state>
</template>
</el-table-column>
<el-table-column header-align="center" label="操作" width="200px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openCheck(row)"
:disabled="!(row.apply||row.reApply) || unionTaskStatus || !allowOperationTask">
核对
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<mem-change-apply ref="apply" :userid="userId" @submit="doSubmitChangeUser"
:welfare_member="true"
change_mode="check"></mem-change-apply>
</template>
<template #public>
<member ref="member" :id="userId" @save="afterEdit"></member>
</template>
</guava>
<el-drawer
title="单位调整"
:visible.sync="unitMoveVisibile"
:before-close="handleClose" size="70%">
<el-row class="text-primary p20">
选择新单位
</el-row>
<el-row type="flex" :gutter="20" class="pl20 pr20">
<el-col :span="12">
<el-select placeholder="请选择新工会" v-model="unitMoveFormData.unionId"
style="width: 100%;"
clearable="true"
@change="moveUnionsChange"
filterable="true">
<el-option v-for="item in unitMoveUnions" :label="item.unionname"
:value="item.id"></el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-select v-model="unitMoveFormData.unitId" style="width: 100%" filterable
clearable
@change="moveUnitChange"
placeholder="请选择新单位">
<el-option
v-for="item in unitMoveUnits"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-select v-model="unitMoveFormData.threeUnitId" clearable filterable
placeholder="请选择新科室"
style="width: 100%" @change="threeUnitChange">
<el-option
v-for="item in threeUnits"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-input :value="unitMoveFormData.unionGroupName" disabled
placeholder="新工会小组"></el-input>
</el-col>
</el-row>
<el-row class="mt10">
<el-table :data="checkUsers" style="width: 100%;padding: 20px" class="vi-table"
border
height="70vh">
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="loginname"
width="120"
label="工号"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="username"
width="120"
label="姓名"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="threeUnitName"
label="当前科室"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="unitname"
label="当前单位"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="unionname"
label="当前工会"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
label="新科室">
<template slot-scope="{row}">
<span>{{unitMoveFormData.threeUnitName}}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
label="新单位">
<template slot-scope="{row}">
<span>{{unitMoveFormData.unitName}}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
label="新分工会">
<template slot-scope="{row}">
<span>{{unitMoveFormData.unionName}}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<span style="position: absolute;bottom: 20px;right: 20px">
<el-button @click="unitMoveVisibile = false">取 消</el-button>
<el-button type="primary" @click="doUnitMove">确定</el-button>
</span>
</el-drawer>
<el-drawer
title="添加会员"
:visible.sync="selectUserVisible"
:before-close="handleClose" size="1200px">
<member-user-select v-model="selectUsers" ref="userSelect" :page_size="10"
:is_ghxzzz="is_ghxzzz"
:sql_cnd="['(u.member is null or u.member = 0) and (c.taskId is null OR c.stateId=70)']"></member-user-select>
<span style="position: absolute;bottom: 20px;right: 20px">
<el-button @click="selectUserVisible = false"
:disabled="selectUserLoading">取 消</el-button>
<el-button type="primary" @click="doBatchJoinMember"
:loading="selectUserLoading">确定</el-button>
</span>
</el-drawer>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'mem-change-apply': httpVueLoader('/components/member/MemChangeApply.vue?v=1.0.2'),
'member-user-select': httpVueLoader('/components/plugins/MemberUserTableSelect.vue?v=1.0.0'),
},
computed: {
allowOperationTask() {
const {taskId} = this.pageForm
if (taskId) {
const task = this.memberCheckTaskOptions.find(v => v.id === taskId)
const startTime = moment(task.startTime).valueOf()
const endTime = moment(task.endTime).valueOf()
const nowDate = Date.now()
return nowDate > startTime && nowDate < endTime
} else {
return false
}
}
},
data() {
return {
is_ghxzzz: false,
unionGroups: [],
threeUnits: [],
unions: [],
units: [],
tableColumns: [
{prop: 'loginname', label: '工号', sortable: true},
{prop: 'username', label: '姓名', sortable: true},
{prop: 'sex', label: '性别', sortable: true, width: '100px'},
{prop: 'birthday', label: '出生年月', sortable: true},
{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},
],
pageForm: {
year: new Date().getFullYear() + '',
searchName: 'username',
changed: '',
isMember: '1',
unionId: '',
unitId: '',
unionGroupId: '',
},
memberCheckTaskOptions: [],
changeType: {},
userId: null,
unionTaskStatus: false,
numData: {
changeNum: 0,
notChangeNum: 0,
userSumNum: 0,
memberNum: 0,
notMemberNum: 0,
},
selectUserVisible: false,
selectUsers: [],
selectUserLoading: false,
unitMoveVisibile: false,
unitMoveUnions: [],
unitMoveUnits: [],
unitMoveFormData: {
unitId: '',
unionId: '',
unitName: '',
unionName: ''
},
checkUsers: [],
}
},
methods: {
doExportByUnion() {
let props = {}
this.tableColumns.forEach(v => {
props[v.prop] = v.label
})
const {unionId, unitId, unionGroupId, year} = this.pageForm
window.open("/platform/member/inquire/integrate/doExportByUnion?=unitId=" + unitId
+ "&unionId=" + unionId
+ "&year=" + year
+ "&unionGroupId=" + unionGroupId
+ "&props=" + JSON.stringify(props))
},
async afterEdit(memData) {
if (!this.userId) {
await $.post(" /platform/member/info/make/joinMemberFamily", memData)
}
this.userId = ''
this.pageData()
this.$refs.guava.index()
},
async doBatchJoinMember() {
if (!this.selectUsers.length) {
this.notifyWarning("请先勾选需要设置为会员的用户")
return
}
let aa = false
const unitId = this.$refs.userSelect.pageForm.unitId
const threeUnitId = this.$refs.userSelect.pageForm.threeUnitId
if (threeUnitId) {
aa = true
}
this.$confirm('您确定将选择的用户加入会员' + (aa ? "并修改单位和科室?" : "?"))
.then(async _ => {
this.selectUserLoading = true
const resp = await $.post("/platform/member/change/mange/joinWelfareMember", {
userIds: JSON.stringify(this.selectUsers),
taskId: this.pageForm.taskId,
unitId: unitId,
threeUnitId: threeUnitId,
});
this.selectUserLoading = false
if (resp.code === 0) {
this.pageData()
this.$refs.userSelect.init()
this.selectUserVisible = false
} else {
this.notifyWarning(resp.msg)
}
})
.catch(_ => {
});
},
pushDropdownCommand({type}) {
if (type == 'select') {
this.selectUsers = []
this.selectUserVisible = true
this.$nextTick(() => {
this.$refs.userSelect.init()
})
} else if (type == 'add') {
this.userId = ""
this.$refs.guava.public()
if (!this.userId) {
this.$refs.member.id = null
this.$refs.member.getUserInfo()
}
}
},
openUnitMove() {
this.unitMoveVisibile = true
this.unitMoveFormData = {
unitId: '',
unionId: '',
unitName: '',
unionName: ''
}
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {
});
},
async moveUnionsChange(val) {
if (val) {
this.unitMoveUnits = await getUnits(val)
this.$set(this.unitMoveFormData, 'unionName', this.unitMoveUnions.find(v => v.id === val).unionname)
this.$set(this.unitMoveFormData, 'unitId', '')
this.$set(this.unitMoveFormData, 'unitName', '')
} else {
this.$set(this.unitMoveFormData, 'unitId', '')
this.$set(this.unitMoveFormData, 'unitName', '')
this.$set(this.unitMoveFormData, 'unionName', '')
this.unitMoveUnits = []
}
},
async moveUnitChange(val) {
if (val) {
this.$set(this.unitMoveFormData, 'unitName', this.unitMoveUnits.find(v => v.id === val).name)
} else {
this.$set(this.unitMoveFormData, 'unitName', '')
}
if (val) {
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(val, null)
}
},
async doUnitMove() {
if (this.unitMoveFormData.unitId === '') {
this.notifyWarning('请选择新单位!')
return
}
if (this.unitMoveFormData.threeUnitId === '') {
this.notifyWarning('请选择新科室!')
return
}
const params = {
unitId: this.unitMoveFormData.unitId,
threeUnitId: this.unitMoveFormData.threeUnitId,
userId: this.checkUsers.map(v => v.id)
}
const resp = await $.post('/platform/member/change/mange/userUnitMove', params)
if (resp.code === 0) {
this.pageData()
await this.getNumData()
this.$refs.table.clearSelection();
this.unitMoveVisibile = false
} else {
this.notifyWarning(resp.msg)
}
},
tableHandleSelectionChange(val) {
this.checkUsers = val;
},
async threeUnitChange(val) {
if (val) {
const threeUnit = this.threeUnits.find(v => v.id === val)
const groupName = threeUnit.groupname
this.$set(this.unitMoveFormData, 'threeUnitName', threeUnit.name)
this.$set(this.unitMoveFormData, 'unionGroupName', groupName)
} else {
this.$set(this.unitMoveFormData, 'unionGroupName', null)
}
},
async getThreeUnits() {
this.$set(this.pageForm, "threeUnitId", null)
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unitId, this.pageForm.unionGroupId)
},
openCheck(row) {
this.userId = row.id
this.$refs.guava.edit()
},
/**
* 提交异动人员
* @returns {Promise<void>}
*/
async doSubmitChangeUser(formData) {
console.log(formData)
formData.taskId = this.pageForm.taskId
const resp = await $.post(loc() + '/doSubmitChangeUser', formData)
this.$refs.apply.closeLoading()
if (resp.code === 0) {
this.userId = null
this.$refs.guava.index()
this.pageData()
this.getNumData()
} else {
this.notifyWarning(resp.msg)
}
},
/**
* 提交核对
*/
async submitCheck() {
if (!this.pageForm.unionGroupId) {
this.notifyWarning("请选择需要核对的工会小组!")
return
}
const confirm = await this.$confirm('此操作会提交至校工会确认,请确认核对完成了吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
const {taskId} = this.pageForm
const resp = await $.post(loc() + '/submitCheck', this.pageForm)
if (resp.code === 0) {
this.doSearch()
this.notifySuccess(resp.msg)
this.getUnionTaskStatus()
} else {
this.notifyWarning(resp.msg)
}
},
async getMemberCheckTaskOptions() {
const resp = await $.get('/platform/member/check/task/getAllTask')
this.memberCheckTaskOptions = resp.data
if (this.memberCheckTaskOptions.length) {
this.$set(this.pageForm, 'taskId', this.memberCheckTaskOptions[0].id)
}
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
},
async getChangeType() {
const changeType = {}
const changeTypeOptions = await getEnumOptions("UserChangeType")
changeTypeOptions.forEach(v => {
changeType[v.code] = v.description
})
return changeType
},
async getUnionTaskStatus() {
const {taskId} = this.pageForm
const resp = await $.get(loc() + '/getUnionTaskStatus', this.pageForm)
if (resp.code === 0) {
this.unionTaskStatus = resp.data
}
},
async checkAgain() {
if (!this.pageForm.unionGroupId) {
this.notifyWarning("请选择需要重新核对的工会小组!")
return
}
const confirm = await this.$confirm('您确定要重新核对吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
const {taskId} = this.pageForm
const resp = await $.get(loc() + '/checkAgain', this.pageForm)
if (resp.code === 0) {
this.getUnionTaskStatus()
}
},
async getNumData() {
const resp = await $.post(loc() + '/getButtonNum', this.pageForm)
if (resp.code === 0) {
this.numData = resp.data
} else {
this.notifyWarning(resp.msg)
}
}
},
async created() {
await this.getMemberCheckTaskOptions()
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('H03')||@shiro.hasRole('A06')}" === 'false') {
this.unions = await getUnions(null, true)
this.is_ghxzzz = true
this.$set(this.pageForm, "unionId", this.unions[0].id)
} else {
this.unions = await getUnions(null, false)
}
this.flushUnits()
this.changeType = await this.getChangeType()
await this.getUnionTaskStatus()
this.unitMoveUnions = clone(this.unions)
if (this.pageForm.taskId != null) {
await this.getNumData()
await this.pageData()
}
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,346 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-tabs__content {
padding-top: 20px;
}
</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-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="username"></el-option>
<el-option label="工号" value="loginname"></el-option>
</el-select>
</el-input>
</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">
<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">
<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">
<template #func>
<el-button icon="el-icon-s-promotion" type="primary" size="small" :loading="submitLoading"
@click="joinMemberFamily">批量设置
</el-button>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading" ref="table" @selection-change="handleSelectionChange"
:size="tableSize" class="vi-table">
<el-table-column :reserve-selection="true"
type="selection"
width="55">
</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=='type'" scope="{row:{type}}">
{{changeType[type]}}
</template>
<template v-else-if="column.prop=='applyOrigin'" scope="{row:{applyOrigin}}">
{{changeOrigin[applyOrigin]}}
</template>
<template v-else-if="column.prop=='stateId'" scope="{row}">
<vi-table-state v-if="row.stateId" :state="row"></vi-table-state>
<vi-table-state v-else :state="{stateColor:'#1890ff',stateName:'暂无'}"></vi-table-state>
</template>
<template v-else-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>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
width="100px">
<template scope="scope">
<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="{type:'view',data:scope.row}">
查看
</el-dropdown-item>
<el-dropdown-item :command="{type:'edit',data:scope.row}">
编辑
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit_func>
<el-button type="primary" @click="$refs.member.save()">提交</el-button>
</template>
<template #edit>
<member ref="member" :id="userId" @save="afterEdit"></member>
</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>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
active: 'info',
submitLoading: false,
pageForm: {
searchName: "username",
},
unionGroups:[],
threeUnits:[],
userId: "",
unions: [],
units: [],
active: 'info',
selection: [],
submitLoading: false,
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},
{prop: 'campusName', label: '所属校区', sortable: true},
],
}
},
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.0'),
},
methods: {
handleSelectionChange(val) {
this.selection = val;
},
async joinMemberFamily() {
if (!this.selection.length) {
this.$notify({
title: '警告',
message: '请先勾选需要设置为会员的用户!',
type: 'warning'
});
return
}
this.$confirm('是否将已勾选的人员设置为会员用户?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.submitLoading = true
const resp = await $.post(loc() + "/joinMemberFamily", {userIds: JSON.stringify(this.selection.map(v => v.id))})
this.submitLoading = false
if(resp.code===0){
this.$refs.table.clearSelection();
this.pageData()
}else{
this.notifyWarning(resp.msg)
}
})
},
async afterEdit(memData) {
this.userId = ''
this.pageData()
this.$refs.guava.index()
},
openEdit(userId) {
this.userId = userId
this.$refs.member.getUserInfo()
this.$refs.guava.edit()
},
openView(userId) {
this.active = 'info'
this.userId = userId
this.$refs.guava.view()
},
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data.id)
} else if (type == 'edit') {
this.openEdit(data.id)
}
},
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 getThreeUnits() {
this.$set(this.pageForm, "threeUnitId", null)
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unit, this.pageForm.unionGroupId)
},
},
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()
}
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,583 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-tabs__content {
padding-top: 20px;
}
.el-dialog__body div div {
color: #ff0000;
margin-bottom: 10px;
}
.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;
}
</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-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="username"></el-option>
<el-option label="工号" value="loginname"></el-option>
</el-select>
</el-input>
</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
@change="flushUnits" @clear="flushUnits"
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="getThreeUnits"
clearable
filterable>
<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">
<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">&emsp;&emsp;别:</div>
<div class="search-item-option">
<el-select v-model="pageForm.sex" style="width: 100%" clearable
placeholder="请选择">
<el-option v-for="sex in sexOptions" :label="sex" :value="sex"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">&emsp;&emsp;务:</div>
<div class="search-item-option">
<el-input placeholder="请输入内容" clearable v-model="pageForm.position"
@keyup.enter.native="doSearch">
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">&emsp;&emsp;称:</div>
<div class="search-item-option">
<el-input placeholder="请输入内容" clearable v-model="pageForm.jobTitle"
@keyup.enter.native="doSearch">
</el-input>
</div>
</div>
<!-- <div class="search-item">
<div class="search-item-label">会员状态:</div>
<div class="search-item-option">
<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" style="margin-top: 10px">
<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-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="checkUserStateType(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-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-card>
<el-card shadow="never" class="mt10">
<table-tool label="会员列表" :app="this">
<template #func>
<el-button type="primary" v-if="${@shiro.hasRole('sysadmin')}" size="small" icon="el-icon-time"
@click="openArchive"
>备份历史会员
</el-button>
<el-button type="primary" size="small" icon="el-icon-download" @click="exportMember">固定格式导出
</el-button>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" class="vi-table">
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
width="80px"></el-table-column>
<el-table-column
show-overflow-tooltip
align="center"
header-align="center"
v-for="column in tableColumns"
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
min-width="50"
>
<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>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作" fixed="right">
<template scope="scope">
<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="{type:'view',data:scope.row}">
查看
</el-dropdown-item>
<el-dropdown-item
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
:command="{type:'edit',data:scope.row}">
编辑
</el-dropdown-item>
<!-- <el-dropdown-item v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" :command="{type:'delete',data:scope.row}">-->
<!-- 删除-->
<!-- </el-dropdown-item>-->
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit_func>
<el-button type="primary" @click="$refs.member.save()">提交</el-button>
</template>
<template #edit>
<member ref="member" :id="userId" @save="afterEdit"></member>
</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
:visible.sync="archiveDialogVisible"
width="20%">
<el-divider class="labelYear">{{labelYear}}</el-divider>
<el-form :model="formData" ref="form" :rules="formRules" label-width="80px">
<el-form-item prop="year" label="备份年份" style="align-content: center">
<el-date-picker
placeholder="请选择备份年份"
value-format="yyyy"
v-model="formData.year"
type="year"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="archiveDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="archive" :loading="archiveLoading">确 定</el-button>
</span>
</el-dialog>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
labelYear: "",
archiveDialogVisible: false,
archiveLoading: false,
sexOptions: ['男', '女'],
submitLoading: false,
pageForm: {
personTypes: [],
userStates: [],
searchName: "username",
},
userId: "",
unions: [],
units: [],
active: 'info',
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: 'memberNumber', label: '会员号', checked: 0},
],
personTypeOptions: [],
userStateOptions: [],
unionGroups:[],
threeUnits:[],
formRules: {
year: [{required: true, message: '请选择备份年份', trigger: ['blur', 'change']}]
},
pickerOptions: {
disabledDate(time) {
return (
time.getFullYear() > new Date().getFullYear() - 1
);
}
},
}
},
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.0'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
'member-cnd': httpVueLoader('/components/member/MemberCnd.vue'),
},
methods: {
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()
},
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()
},
openArchive() {
this.$set(this.formData, "year", new Date().getFullYear() - 1 + '')
this.labelYear = "把当前数据备份成为" + this.formData.year + "年份的历史数据"
this.archiveDialogVisible = true
},
async archive() {
this.archiveLoading = true
const yearNum = await $.get(loc() + "/getMemberHistoryNum", {year: this.formData.year})
if (yearNum > 0) {
this.$confirm('您今年已备份确定要覆盖吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" === a) {//确认后再执行
const resp = await $.get(loc() + "/archive", {year: this.formData.year})
this.archiveLoading = false
if (resp.code === 0) {
this.archiveDialogVisible = false
} else {
this.notifyWarning(resp.msg)
}
}
}
});
} else {
const resp = await $.get(loc() + "/archive", {year: this.formData.year})
this.archiveLoading = false
if (resp.code === 0) {
this.archiveDialogVisible = false
} else {
this.notifyWarning(resp.msg)
}
}
},
exportMember() {
const personTypes = JSON.stringify(this.pageForm.personTypes)
const userStates = JSON.stringify(this.pageForm.userStates)
let arr = Object.keys(this.pageForm).map(key => {
return {key: key, value: this.pageForm[key]}
})
let props = {}
this.tableColumns.forEach(v => {
props[v.prop] = v.label
})
location.href = loc() + '/export?userStates=' + userStates + '&personTypes=' + personTypes + '+&props=' + JSON.stringify(props) + "&" + arr.filter(v => v.value).map(v => v.key + "=" + v.value).join("&")
},
doDelete(userId) {
this.$confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" === a) {//确认后再执行
const resp = await $.post(loc() + "/delete", {userId});
if (resp.code === 0) {
this.pageData()
} else {
this.notifyWarning(resp.msg)
}
}
}
});
},
openEdit(userId) {
this.userId = userId
this.$refs.guava.edit()
},
afterEdit() {
this.userId = ''
this.pageData()
this.$refs.guava.index()
},
openView(userId) {
this.active = 'info'
this.userId = userId
this.$refs.guava.view()
},
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data.id)
} else if (type == 'edit') {
this.openEdit(data.id)
} else if (type == 'delete') {
this.doDelete(data.id)
}
},
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 getThreeUnits() {
this.$set(this.pageForm, "threeUnitId", null)
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unit, this.pageForm.unionGroupId)
},
pageData() {
sublime.showLoadingbar();
this.tableLoading = true
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
$.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 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.personTypeOptions = await getDictOptions("UserType")
this.userStateOptions = await getDictOptions("UserState")
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,352 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-tabs__content {
padding-top: 20px;
}
</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-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="username"></el-option>
<el-option label="工号" value="loginname"></el-option>
</el-select>
</el-input>
</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">
<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">
<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">
<template #func>
<el-button icon="el-icon-plus" size="mini" @click="openAdd" type="primary">新增会员</el-button>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" class="vi-table">
<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=='type'" scope="{row:{type}}">
{{changeType[type]}}
</template>
<template v-else-if="column.prop=='applyOrigin'" scope="{row:{applyOrigin}}">
{{changeOrigin[applyOrigin]}}
</template>
<template v-else-if="column.prop=='stateId'" scope="{row}">
<vi-table-state v-if="row.stateId" :state="row"></vi-table-state>
<vi-table-state v-else :state="{stateColor:'#1890ff',stateName:'暂无'}"></vi-table-state>
</template>
<template v-else-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>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
width="100px">
<template scope="scope">
<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="{type:'view',data:scope.row}">
查看
</el-dropdown-item>
<el-dropdown-item :command="{type:'edit',data:scope.row}">
编辑
</el-dropdown-item>
<el-dropdown-item :command="{type:'delete',data:scope.row}">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit_func>
<el-button type="primary" @click="$refs.member.save()">提交</el-button>
</template>
<template #edit>
<member ref="member" :id="userId" @save="afterEdit"></member>
</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>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
active: 'info',
submitLoading: false,
pageForm: {
searchName: "username",
},
unionGroups:[],
threeUnits:[],
userId: "",
unions: [],
units: [],
active: 'info',
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},
{prop: 'campusName', label: '所属校区', sortable: true},
],
}
},
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.0'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
},
methods: {
openAdd() {
this.userId = ""
this.$refs.guava.edit()
if (!this.userId) {
this.$refs.member.id = null
this.$refs.member.getUserInfo()
}
},
doDelete(userId) {
this.$confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" == a) {//确认后再执行
const resp = await $.post(loc() + "/delete", {userId});
if(resp.code===0){
this.pageData()
}else{
this.notifyWarning(resp.msg)
}
}
}
});
},
openEdit(userId) {
this.userId = userId
this.$refs.member.getUserInfo()
this.$refs.guava.edit()
},
async joinMemberFamily(memData) {
await $.post(loc() + "/joinMemberFamily", memData)
},
async afterEdit(memData) {
if (!this.userId) {
await this.joinMemberFamily(memData)
}
this.userId = ''
this.pageData()
this.$refs.guava.index()
},
openView(userId) {
this.active = 'info'
this.userId = userId
this.$refs.guava.view()
},
dropdownCommand(command) {
const {type, data} = command
if (type === 'view') {
this.openView(data.id)
} else if (type === 'edit') {
this.openEdit(data.id)
} else if (type === 'delete') {
this.doDelete(data.id)
}
},
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 getThreeUnits() {
this.$set(this.pageForm, "threeUnitId", null)
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unit, this.pageForm.unionGroupId)
},
},
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()
}
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,61 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.v-body {
display: flex;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
background-color: #f0f2f5;
}
.v-card {
width: calc(100% - 0px);
height: calc(100% - 20px);
position: relative;
overflow: auto;
padding-top: 20px;
padding-bottom: 50px;
}
</style>
<div id="app" v-cloak>
<guava ref="guava" style="width: 100%;height: 100%">
<template>
<div class="v-body">
<el-card class="v-card" shadow="never">
<el-button type="primary" @click="$refs.member.save()"
style="position: absolute;right: 20px;top: 30px;z-index: 100">提交
</el-button>
<member ref="member" :id="'${@shiro.getPrincipalProperty('id')}'"></member>
</el-card>
</div>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
data() {
return {}
},
components: {
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
},
methods: {},
async created() {
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,422 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-tabs__content {
padding-top: 20px;
}
</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-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
style="width: 100%"
@keyup.enter.native="doSearch">
</el-input>
</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">
<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">
<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">
<div class="search" style="position:relative;">
<div class="search-item">
<div class="search-item-label">工号开头:</div>
<div class="search-item-option">
<el-input v-model="pageForm.startLoginNames" maxLength="100"
placeholder="多个请用英文逗号分隔"></el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">工号结尾:</div>
<div class="search-item-option">
<el-input v-model="pageForm.endLoginNames" maxLength="100"
placeholder="多个请用英文逗号分隔"></el-input>
</div>
</div>
<div class="search-item" style="width: calc(100% - 160px)">
<div class="search-item-label">人员类型:</div>
<div class="search-item-option">
<el-tag
style="margin-right: 10px;margin-bottom: 10px;cursor: pointer"
v-for="item in personTypeOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.personTypes.includes(item.name)?'dark':'plain'"
@click="tagClick('personTypes',item.name)">
{{ item.name }}
</el-tag>
</div>
</div>
<div class="search-item" style="width: calc(100% - 160px)">
<div class="search-item-label">在职状态:</div>
<div class="search-item-option">
<el-tag
style="margin-right: 10px;margin-bottom: 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>
</div>
</div>
<div class="search-query" style="position:absolute;right: 0;bottom: 0">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="会员列表" :app="this">
<template #func>
<el-button size="mini" @click="setBirthdayByIdCard" type="primary">
根据身份证设置生日
</el-button>
<el-button size="mini" @click="setMember" type="primary">
设置会员
</el-button>
<el-button size="mini" @click="setWelfareMember" type="primary">
设置福利会员
</el-button>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" class="vi-table">
<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=='type'" scope="{row:{type}}">
{{changeType[type]}}
</template>
<template v-else-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==='member'" scope="{row}">
<span v-if="row.member==1" class="text-success ">
<i class="fa fa-circle ml5"></i>
</span>
<span v-else class="text-danger">
<i class="fa fa-circle ml5"></i>
</span>
</template>
<template v-else-if="column.prop==='welfareMember'" scope="{row}">
<span v-if="row.welfareMember==1" class="text-success ">
<i class="fa fa-circle ml5"></i>
</span>
<span v-else class="text-danger">
<i class="fa fa-circle ml5"></i>
</span>
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
width="100px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row.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>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
submitLoading: false,
pageForm: {
userStates: [],
personTypes: [],
},
unionGroups:[],
threeUnits:[],
userId: "",
unions: [],
units: [],
active: 'info',
tableColumns: [
{prop: 'loginname', label: '工号'},
{prop: 'username', label: '姓名'},
{prop: 'sex', 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},
{prop: 'member', label: '是否会员', sortable: true},
{prop: 'welfareMember', label: '是否福利会员', sortable: true},
{prop: 'mobile', label: '联系电话'},
{prop: 'birthday', label: '生日'},
{prop: 'campusName', label: '所属校区', sortable: true},
],
setMemberDialogVisible: false,
personTypeOptions: [],
userStateOptions: [],
}
},
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.0'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
},
methods: {
async pageData() {
sublime.showLoadingbar()
this.tableLoading = true
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
const {data, code, msg} = await $.post(loc() + '/pageData', pageForm)
this.tableLoading = false
sublime.closeLoadingbar()
if (code === 0) {
this.tableData = data.list
this.pageForm.totalCount = data.totalCount
} else {
this.notifyWarning(msg)
}
},
setBirthdayByIdCard() {
this.$confirm('确定根据身份证设置生日吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await $.post(loc() + "/setBirthdayByIdCard")
if (resp.code === 0) {
this.pageData()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
})
},
tagClick(key, val) {
const index = this.pageForm[key].findIndex(v => v === val)
if (index > -1) {
this.pageForm[key].splice(index, 1)
} else {
this.pageForm[key].push(val)
}
this.doSearch()
},
setMember() {
this.$confirm('确定根据以上筛选条件设置会员吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
const resp = await $.post(loc() + "/setMemberByCnd", pageForm)
if (resp.code === 0) {
this.pageData()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
})
},
setWelfareMember() {
this.$confirm('确定根据以上筛选条件设置福利会员吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
const resp = await $.post(loc() + "/setWelfareMemberByCnd", pageForm)
if (resp.code === 0) {
this.pageData()
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
})
},
openView(userId) {
this.active = 'info'
this.userId = 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 getThreeUnits() {
this.$set(this.pageForm, "threeUnitId", null)
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unit, this.pageForm.unionGroupId)
},
},
async created() {
this.pageData();
this.personTypeOptions = await getDictOptions("UserType")
this.userStateOptions = await getDictOptions("UserState")
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()
}
}
})
</script>
<!--#
}
#-->
@@ -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>
const 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
+ "&currentYear=" + 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">&ensp;</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}}&ensp;
<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,
}
const 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,270 @@
<!--#
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>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
memberStatusList: [],
pageForm: {
searchName: "u.username",
year: new Date().getFullYear() - 1 + "",
},
unions: [],
units: [],
unionGroups:[],
threeUnits:[],
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 getThreeUnits() {
this.$set(this.pageForm, "threeUnitId", null)
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unit, this.pageForm.unionGroupId)
},
},
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,521 @@
<!--#
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:not(:last-child,:first-child) {*/
/* height: 70px;*/
/*}*/
.query-row-title {
width: 120px;
}
</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">&emsp;&emsp;度:</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-row type="flex" justify="center">
</el-row>
</el-card>
<el-card shadow="never" style="margin-top: 10px">
<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="6">
<el-select placeholder="所属工会" v-model="pageForm.unionId"
clearable="true"
@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="6">
<span>所属单位:</span>
<el-select placeholder="所属单位" v-model="pageForm.unitId"
@change="getThreeUnits"
clearable
filterable>
<el-option v-for="item in units" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-col>
<el-col :span="6">
<span>工会小组:</span>
<el-select v-model="pageForm.unionGroupId"
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>
</el-col>
<el-col :span="6">
<span>组成科室:</span>
<el-select v-model="pageForm.threeUnitId" filterable
clearable
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 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-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-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="checkUserStateType(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-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-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="medium" @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>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
isAppendWelfareMember: true,
welfareTitle: '',
memberCnd: null,
addWelfareDialogVisible: false,
active: 'info',
submitLoading: false,
pageForm: {
unionId: "",
unitId: "",
searchName: "username",
personTypes: [],
userStates: [],
memberStatus: [],
year: moment().format('YYYY')
},
personTypeOptions: [],
userStateOptions: [],
memberStatusOptions: [],
unionGroups:[],
threeUnits:[],
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'),
},
methods: {
async allIsWelfareMember() {
if (this.pageForm.personTypes.length === 0) {
this.$message.warning('请选择要设为福利会员的人员类型!')
return
}
const tips = this.pageForm.personTypes.join(",")
this.welfareTitle = "提醒:您将【" + tips + "】会员设置为福利会员"
this.addWelfareDialogVisible = true
},
addWelfare() {
const tips = this.pageForm.personTypes.join(",")
this.$confirm('请确认是否将' + tips + "设为福利会员?", '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await $.post("/platform/member/change/mange/allIsWelfareMember", {
personTypes: this.pageForm.personTypes,
isAppendWelfareMember: this.isAppendWelfareMember
})
}).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)
let props = {}
this.tableColumns.forEach(v => {
props[v.prop] = v.label
})
window.location.href = loc() + "/doExportByUnion?=unitId=" + this.pageForm.unitId
+ "&unionId=" + this.pageForm.unionId
+ "&year=" + this.pageForm.year
+ "&memberStatus=" + memberStatus + "&personTypes=" + personTypes + "&userStates=" + userStates
+ "&props=" + JSON.stringify(props)
},
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", 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 getThreeUnits() {
this.$set(this.pageForm, "threeUnitId", null)
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unit, this.pageForm.unionGroupId)
},
pageData() {
sublime.showLoadingbar();
this.tableLoading = true
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
pageForm.memberStatus = JSON.stringify(pageForm.memberStatus)
$.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 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.personTypeOptions = await getDictOptions("UserType")
this.userStateOptions = await getDictOptions("UserState")
this.memberStatusOptions = await getDictOptions("memberStatusText")
}
})
</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>
const 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,187 @@
<!--#
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>
const 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
})
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>
<!--#
}
#-->
@@ -0,0 +1,22 @@
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号" width="80px"></el-table-column>
<el-table-column label="工号" prop="loginname" header-align="center"
align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="姓名" prop="username" header-align="center"
align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="性别" prop="sex" header-align="center"
align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="联系电话" prop="mobile" header-align="center"
align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="人员类型" prop="personType" header-align="center" sortable
align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="在职状态" prop="userState" header-align="center" sortable
align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="所属工会" prop="unionname" header-align="center"
align="center" show-overflow-tooltip sortable></el-table-column>
<el-table-column label="所属单位" prop="unitname" header-align="center"
align="center" show-overflow-tooltip sortable></el-table-column>
<el-table-column label="所属校区" prop="campusName" header-align="center"
align="center" show-overflow-tooltip sortable></el-table-column>