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,471 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.is-flex {
display: flex;
}
.is-flex .el-form-item {
width: 50%;
}
#grjl {
height: 200px;
}
.el-table-container {
padding-top: 0px;
padding-left: 5px;
padding-right: 5px;
}
.el-collapse-item__content {
padding-bottom: 0px;
font-size: 13px;
color: #303133;
line-height: 1.769230769230769;
}
.note {
height: 250px;
}
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 120px;
height: 120px;
line-height: 120px;
text-align: center;
}
.avatar {
width: 120px;
height: 120px;
display: block;
}
input[type=file] {
display: none;
}
#zw .el-table__header th {
padding: 0;
height: 150px;
}
el-table__header th {
border: black;
}
#showtb .el-table td div {
font-size: 12px;
}
#showtb .el-form-item__label {
font-size: 12px;
}
#rh .el-col {
border: 1px solid #e5e9f2;
line-height: 40px;
height: 40px;
text-align: center;
}
.tpa {
padding: 10px;
text-align: center;
width: 12%;
background-color: rgb(250, 250, 250);
border: 1px solid rgb(220, 220, 220);
}
.tpb {
padding: 10px;
text-align: center;
color: #a0a9b4;
width: 16%;
border: 1px solid rgb(220, 220, 220);
}
.disabled .el-upload--picture-card {
display: none;
}
.el-upload-list__item {
transition: none !important;
}
.flexbox {
display: flex;
}
.flexbox .el-form-item {
width: 50%;
}
.v-modal {
z-index: 99999 !important;
}
.el-dialog__wrapper {
z-index: 999999 !important;
}
</style>
<div id="app" v-cloak>
<div style="text-align: right" class="pr20 mt25 mb25">
<el-button type="primary" @click="doHandle">确 定</el-button>
</div>
<el-form :model="formData" ref="addForm" style="width: 90%;margin: 0px auto" :rules="formRules" label-width="86px">
<el-divider content-position="left">
<span style="color: rgb(121, 187, 255);font-size: 17px">基本资料</span>
</el-divider>
<el-form-item prop="loginname" label="用&ensp;户&ensp;名">
<el-input readonly v-model="formData.loginname" disabled></el-input>
</el-form-item>
<div class="is-flex">
<el-form-item prop="username" label="姓&emsp;&emsp;名">
<el-input readonly v-model="formData.username" disabled></el-input>
</el-form-item>
<el-form-item prop="sex" label="性&emsp;&emsp;别">
<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>
</div>
<div class="is-flex">
<el-form-item prop="birthday" label="出生日期">
<el-date-picker style="width: 100%" v-model="formData.birthday" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" type="date" placeholder="出生日期"></el-date-picker>
</el-form-item>
<el-form-item prop="birthday" label="出生地点">
<el-input v-model="formData.csdd"></el-input>
</el-form-item>
</div>
<div class="is-flex">
<el-form-item label="兴趣爱好">
<el-input maxlength="255" placeholder="兴趣爱好" v-model="formData.hobby"></el-input>
</el-form-item>
<el-form-item label="婚&emsp;&emsp;否">
<el-radio-group v-model="formData.sfhf">
<el-radio label="已婚" border></el-radio>
<el-radio label="未婚" border></el-radio>
</el-radio-group>
</el-form-item>
</div>
<div class="is-flex">
<el-form-item prop="rsbz" label="人事编制">
<el-select v-model="formData.rsbz" style="width: 100%">
<el-option v-for="i in bzOptions" :label="i" :value="i"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="xl" label="学&emsp;&emsp;历">
<el-select v-model="formData.xl" style="width: 100%;">
<el-option v-for="i in xloptions" :label="i" :value="i"></el-option>
</el-select>
</el-form-item>
</div>
<div class="is-flex">
<el-form-item prop="jg" label="籍&emsp;&emsp;贯">
<el-input v-model="formData.jg"></el-input>
</el-form-item>
<el-form-item prop="gz" label="工&emsp;&emsp;资">
<el-input v-model="formData.gz"></el-input>
</el-form-item>
</div>
<div class="is-flex">
<el-form-item prop="mz" label="民&emsp;&emsp;族">
<el-select placeholder="民族" style="width: 100%" filterable v-model="formData.mz">
<el-option v-for="mz in mzlist" :value="mz.mzmc" :label="mz.mzmc"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="zzmm" label="政治面貌">
<el-input maxlength="100" placeholder="政治面貌"
v-model="formData.zzmm"></el-input>
</el-form-item>
</div>
<div class="is-flex">
<el-form-item prop="zw" label="职&emsp;&emsp;务">
<el-input maxlength="100" placeholder="职务"
v-model="formData.zw"></el-input>
</el-form-item>
<el-form-item prop="zc" label="职&emsp;&emsp;称">
<el-select v-model="formData.zc" style="width: 100%">
<el-option v-for="i in zclist" :label="i" :value="i"></el-option>
</el-select>
</el-form-item>
</div>
<div class="is-flex">
<el-form-item prop="mobile" label="手&ensp;机&ensp;号">
<el-input maxlength="100" placeholder="手机号"
v-model="formData.mobile"></el-input>
</el-form-item>
<el-form-item prop="email" label="邮&emsp;&emsp;箱">
<el-input maxlength="100" placeholder="邮箱"
v-model="formData.email"></el-input>
</el-form-item>
</div>
<div class="is-flex">
<el-form-item prop="unionid" label="所属工会">
<el-input readonly v-model="formData.ghname"></el-input>
</el-form-item>
<el-form-item prop="unitid" label="用户单位">
<el-input readonly v-model="formData.dwname"></el-input>
</el-form-item>
</div>
<el-form-item prop="zzzt" label="在职状态">
<dict-select v-model="formData.zzzt" style="width: 100%" placeholder="请选择在职状态"
code="UserState"></dict-select>
</el-form-item>
<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.jtcy.push({})"> 添加成员
</el-button>
<el-table
:data="formData.jtcy"
border
size="mini"
style="width: 100%">
<el-table-column prop="gx" label="与本人关系" align="center" header-align="center">
<template slot-scope="scope">
<el-input placeholder="请输入与本人关系" maxlength="30" v-model="scope.row.gx" clearable></el-input>
</template>
</el-table-column>
<el-table-column prop="xm" label="姓名" align="center" header-align="center">
<template slot-scope="scope">
<el-input placeholder="请输入姓名" maxlength="100" v-model="scope.row.xm" clearable></el-input>
</template>
</el-table-column>
<el-table-column prop="dw" label="单位" align="center" header-align="center">
<template slot-scope="scope">
<el-input placeholder="请输入单位" maxlength="100" v-model="scope.row.dw" clearable></el-input>
</template>
</el-table-column>
<el-table-column prop="bz" label="备注" align="center" header-align="center">
<template slot-scope="scope">
<el-input placeholder="请输入备注" maxlength="100" v-model="scope.row.bz" 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.jtcy.length==0"
@click="formData.jtcy.splice(scope.$index,1)"></el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item prop="grjl" label="个人经历" style="width: 100%">
<span style="color: red">(有工作经历要填写工作经历,无工作经历从本科学历开始)</span>
<div id="grjl" class="grjl"></div>
</el-form-item>
<el-form-item label="照片上传" style="margin-top: 200px">
<el-upload
:action="FILE_UPLOAD_ADDRESS"
list-type="picture-card"
:file-list="imagelist"
:class="{disabled:uploadDisabled}"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
limit="1"
:before-upload="beforeAvatarUpload"
:on-success="handleAvatarSuccess">
<i class="el-icon-plus"></i>
<div class="el-upload__tip" slot="tip" style="color: red">*只能上传jpg/png文件,且不超过2MB的一寸电子照片</div>
</el-upload>
<el-dialog :visible.sync="dialogVisible" append-to-body>
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</el-form-item>
<div style="float: right;margin: 20px 0">
<el-button type="primary" @click="doHandle">确 定</el-button>
</div>
</el-form>
</div>
<script>
let E = window.wangEditor
let editor = null
const vue = new Vue({
el: '#app',
data() {
return {
formData: {
/* jtcy:[]*/
},
formRules: {
grjl: [{required: true, message: '请填写经历', trigger: ['blur', 'change']}],
},
mzlist: [],
dwghinfo: {},
umGrjl: null,
zclist: ["教授", "副教授", "讲师", "研究员", "副研究员", "高级工程师", "其他"],
bzOptions: ['事业编制职工(正式职工)', '合同制职工', '人事代理职工', '集体职工', '流动编制职工', '非事业编制职工', '博士后进站人员', '劳务派遣人员', '聘用工(各二级单位聘用)'],
xloptions: ['博士', '硕士', '本科', '专科', '其他'],
imagelist: [],
dialogVisible: false,
dialogImageUrl: "",
}
},
components: {
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.4'),
},
mounted() {
},
created() {
this.getmzlist();
this.getGrxx();
//this.formData=${@shiro.getPrincipal()};
},
methods: {
getGrxx() {
$.post(base + '/platform/hy/grxx/getGrxx').then(res => {
this.formData = res;
if (this.formData.jtcy !== null && this.formData.jtcy !== '') {
this.formData.jtcy = JSON.parse(this.formData.jtcy);
} else {
this.formData.jtcy = [];
}
this.imagelist = []
if (this.formData.imgurl != null && this.formData.imgurl != undefined) {
this.dialogImageUrl = FILE_DOMAIN + this.formData.imgurl
this.imagelist.push({name: "_.jpg", url: this.dialogImageUrl, status: "success"})
}
// this.umGrjl=UM.getEditor('grjl',{initialFrameWidth:'100%'});
// this.umGrjl.setContent(this.formData.grjl);
editor = new E('#grjl')
editor.create()
editor.txt.html(this.formData.grjl)
})
},
getmzlist() {
$.post(base + '/platform/hy/grxx/getmzlist').then(res => {
this.mzlist = res
})
},
doHandle() {
const loading = this.$loading({
lock: true,
text: '数据更新中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.formData.jtcy = JSON.stringify(this.formData.jtcy);
this.formData.imgUrl = this.formData.imgurl;
console.log(this.formData.imgUrl)
$.post(base + '/platform/hy/grxx/updateHyxx', this.formData).then(res => {
loading.close();
this.getGrxx();
this.$message.success('更新成功');
});
},
handleRemove: function (file) {
this.imagelist.splice(0, 1);
if (this.formData.imgurl != "") {
$.post(base + "/platform/hy/sqrh/delImg", {"imgurl": this.formData.imgurl})
this.formData.imgurl = ""
}
},
handlePictureCardPreview: function (file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
handleAvatarSuccess: function (res, file) {
var self = this;
if (res.code == 0) {
const {data: {filepath}} = res
self.formData.imgurl = filepath;
self.$message({
message: res.msg,
type: 'success'
});
} else {
self.$message({
message: res.msg,
type: 'error'
});
}
},
beforeAvatarUpload: function (file) {
var isLt2M = file.size / 1024 / 1024 < 2;
var isJPG = file.type === 'image/jpeg';
var isPng = file.type === 'image/png';
if (!isJPG && !isPng) {
this.$message.error('上传头像图片只能是 JPG和PNG格式!');
}
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!');
}
return (isJPG || isPng) && isLt2M;
},
},
computed: {
uploadDisabled: function () {
return this.imagelist.length > 0
},
},
})
</script>
<!--#
}
#-->
@@ -0,0 +1,608 @@
<!--会籍保留开除页面 djx 2019-5-14-->
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-date-editor .el-range-separator {
padding: 0px;
}
.el-input--suffix .el-input__inner {
padding-right: 0px;
}
.el-date-editor .el-range-separator {
width: 6%;
}
.el-dialog__body {
padding: 30px 20px 10px 20px;
}
#infoDialog .el-dialog__body {
padding: 15px 20px;
}
.tpa {
padding: 10px;
text-align: center;
width: 12%;
background-color: rgb(250, 250, 250);
border: 1px solid rgb(220, 220, 220);
}
.tpb {
padding: 10px;
text-align: center;
color: #a0a9b4;
width: 16%;
border: 1px solid rgb(220, 220, 220);
}
.tpc {
padding: 10px;
color: #a0a9b4;
width: 15%;
border: 1px solid rgb(220, 220, 220);
}
.el-alert {
background-color: #f0f9eb;
color: #67c23a;
}
</style>
<div id="app" v-cloak>
<!--快捷查询-->
<el-row class="header navbar bg-white shadow">
<!--#if(@shiro.hasRole('sysadmin')||@shiro.hasRole('H03')||@shiro.hasRole('A06')){#-->
<div class="btn-group tool-button mt5">
<el-select placeholder="请选择所属工会" @change="seeunit(pageForm.unionid)" v-model="pageForm.unionid"
style="width: 200px;" clearable="true" filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<!--#}#-->
<div class="btn-group tool-button mt5">
<el-select placeholder="请选择所属单位" v-model="pageForm.unitid" style="width: 200px;" clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<div>
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询" style="width: 100px;">
<el-option label="工号" value="loginname"></el-option>
<el-option label="姓名" value="username"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="btn-group tool-button mt5">
<el-date-picker style="width:260px;"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
v-model="sqsj"
type="daterange"
range-separator="至"
start-placeholder="入会时间"
end-placeholder="入会时间">
</el-date-picker>
</div>
<div class="btn-group tool-button mt5">
<dict-select v-model="pageForm.bgsy" style="width: 120px" placeholder="变更类型"
code="MemberChangeType"></dict-select>
</div>
<!-- <div class="btn-group tool-button mt5">-->
<!-- <el-select v-model="pageForm.bglx" clearable placeholder="变更类型" style="width: 120px;">-->
<!-- <el-option label="会籍转出" value="1"></el-option>-->
<!-- <el-option label="会籍转入" value="2"></el-option>-->
<!-- <el-option label="会籍保留" value="3"></el-option>-->
<!-- <el-option label="会员退会" value="4"></el-option>-->
<!-- <el-option label="会籍开除" value="5"></el-option>-->
<!-- </el-select>-->
<!-- </div>-->
<div class="btn-group tool-button mt5">
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
<el-button size="medium" @click="openDo">变更</el-button>
</div>
</el-row>
<!-- <el-alert title="该列表下的数据都为校工会直接变更,不需要审核" type="success" effect="dark"></el-alert>-->
<!--表格-->
<el-row class="el-table-container">
<el-table :data="tableData" size="small">
<el-table-column align="center" header-align="center" label="序号" type="index">
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="姓名" prop="username"></el-table-column>
<el-table-column align="center" header-align="center" label="性别" prop="sex"></el-table-column>
<el-table-column align="center" header-align="center" label="电话" prop="mobile"></el-table-column>
<el-table-column align="center" header-align="center" label="所属单位" width="200px"
prop="name"></el-table-column>
<el-table-column align="center" header-align="center" label="所属工会" width="200px"
prop="unionname"></el-table-column>
<el-table-column align="center" header-align="center" label="在职情况" prop="zzzt"></el-table-column>
<el-table-column align="center" header-align="center" label="入会时间" prop="sqsj"></el-table-column>
<el-table-column align="center" header-align="center" label="类型" prop="bgsy">
<template slot-scope="scope">
{{scope.row.bgsy}}
<!-- <el-tag v-if="scope.row.bgtype==1" type="primary">会籍转出</el-tag>-->
<!-- <el-tag v-if="scope.row.bgtype==2" type="success">会籍转入</el-tag>-->
<!-- <el-tag v-if="scope.row.bgtype==3" type="warning">会籍保留</el-tag>-->
<!-- <el-tag v-if="scope.row.bgtype==4" type="danger">会员退会</el-tag>-->
<!-- <el-tag v-if="scope.row.bgtype==5" type="danger">会籍开除</el-tag>-->
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="状态" prop="bgstate">
<template slot-scope="scope">
<span v-if="scope.row.bgstate==1" class="text-warning ml5">待基层工会审核</span>
<span v-if="scope.row.bgstate==2" class="text-danger ml5">基层工会审核不通过</span>
<span v-if="scope.row.bgstate==3" class="text-warning ml5">待校工会审核</span>
<span v-if="scope.row.bgstate==4" class="text-danger ml5">校工会审核不通过</span>
<span v-if="scope.row.bgstate==5" class="text-success ml5">审核通过</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="200px">
<template slot-scope="scope">
<el-button type="success" @click="openInfo(scope)" size="mini">查看</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<!--分页-->
<el-row class="el-pagination-container">
<el-pagination
@size-change="pageSizeChange"
@current-change="pageNumberChange"
:current-page="pageForm.pageNumber"
:page-sizes="[10, 20, 30, 50]"
:page-size="pageForm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="pageForm.totalCount">
</el-pagination>
</el-row>
<!--模态框-->
<el-dialog title="操作" :visible.sync="DialogVisible" width="50%">
<el-form label-width="86px">
<el-form-item prop="userSel" label="请选择人员">
<el-select
style="width: 100%"
v-model="formData.userSel"
filterable
multiple
remote
reserve-keyword
placeholder="根据姓名或手机号选择人员"
:remote-method="remoteMethod"
:loading="loading">
<el-option v-for="item in User" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="loginname" label="变更类型">
<dict-select v-model="formData.choose" style="width: 100%" placeholder="变更类型"
code="MemberChangeType"></dict-select>
<!-- <el-select v-model="formData.choose" placeholder="请选择" style="width: 100%">-->
<!-- <el-option label="单位变动" value="1"></el-option>-->
<!-- <el-option label="会籍保留" value="3"></el-option>-->
<!-- <el-option label="会员退会" value="4"></el-option>-->
<!-- <el-option label="会籍开除" value="5"></el-option>-->
<!-- </el-select>-->
</el-form-item>
<el-form-item prop="unitid" label="新单位" class="isShow">
<el-select v-model="formData.unitid" @change="getUnionByUnit" filterable style="width: 100%"
placeholder="请选择单位">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="unionid" label="新工会" class="isShow">
<el-select v-model="formData.unionid" filterable style="width: 100%" placeholder="请选择工会" disabled>
<el-option v-for="item in unionadd" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="bgyy" label="变更原因">
<el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="formData.bgyy"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="DialogVisible = false">取 消</el-button>
<el-button type="primary" @click="goDo">确 定</el-button>
</span>
</el-dialog>
<!--查看会员详细资料-->
<el-dialog title="查看" width="55%" custom-class="ViewDialogClass" :visible.sync="infoDialogVisible" top="5%">
<el-form label-width="80px">
<el-collapse v-model="activeName">
<el-collapse-item title="用户信息" name="1">
<el-card>
<div>
<table style="width: 100%">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa">&emsp;&emsp;</td>
<td class="tpb">{{viewData.username}}</td>
<td class="tpa">&emsp;&emsp;</td>
<td class="tpb">{{viewData.sex}}</td>
<td class="tpa">出生日期</td>
<td class="tpb">{{viewData.birthday}}</td>
<td rowspan="3">
<img v-if="viewData.imgurl!=null" :src="showPic"
style="height: 140px;width: 100%">
<p v-else style="text-align: center;line-height: 140%">
暂无图片
</p>
</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa">出生地点</td>
<td class="tpb">{{viewData.csdd}}</td>
<td class="tpa">&emsp;&emsp;</td>
<td class="tpb">{{viewData.mz}}</td>
<td class="tpa">政治面貌</td>
<td class="tpb">{{viewData.zzmc}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa">&emsp;&emsp;</td>
<td class="tpb">{{viewData.gz}}</td>
<td class="tpa">&emsp;&emsp;</td>
<td class="tpb">{{viewData.zc}}</td>
<td class="tpa">联系电话</td>
<td class="tpb">{{viewData.mobile}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa" colspan="1">所在部门</td>
<td class="tpb" colspan="3">{{viewData.unitname}}</td>
<td class="tpa" colspan="1">现任职务</td>
<td class="tpb" colspan="2">{{viewData.zw}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa" colspan="7">个 人 简 历</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpb" colspan="7" v-if="(typeof(viewData.grjl)==='undefined')">暂无个人简历信息
</td>
<td class="tpc" colspan="7" v-if="!(typeof(viewData.grjl)==='undefined')">
<div v-html="viewData.grjl"></div>
</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa" colspan="7">家 庭 成 员</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpb" colspan="7" v-if="(typeof(viewData.jtcy)==='undefined')">暂无家庭成员信息
</td>
<td class="tpc" colspan="7" v-if="!(typeof(viewData.jtcy)==='undefined')">
<div v-html="viewData.jtcy"></div>
</td>
</tr>
</table>
</div>
</el-card>
</el-collapse-item>
<el-collapse-item title="会籍变更档案" name="2">
<el-table size="mini"
:data="hjtableData"
style="width: 95%">
<el-tale-column label="变更事由" show-overflow-tooltip="true" prop="bgsy" header-align="center"
align="center"></el-tale-column>
<el-table-column label="变更时间" width="88" show-overflow-tooltip="true" prop="sj"
header-align="center" align="center"></el-table-column>
<el-table-column label="变更类型" show-overflow-tooltip="true" prop="bgtype" header-align="center"
align="center">
<template scope="scope"><span>
<span v-if="scope.row.bgtype == 1" class="text-danger ml5">转出</span>
<span v-if="scope.row.bgtype == 2" class="text-primary ml5">转入</span>
<span v-if="scope.row.bgtype == 3" class="text-warning ml5">保留</span>
<span v-if="scope.row.bgtype == 4" class="text-info ml5">退会</span>
<span v-if="scope.row.bgtype == 5" class="text-muted ml5">开除</span>
</span></template>
</el-table-column>
<el-table-column label="变更方式" show-overflow-tooltip="true" prop="bgfs" header-align="center"
align="center">
<template scope="scope"><span>
<span v-if="scope.row.bgfs == 1" class="text-danger ml5">会员申请</span>
<span v-if="scope.row.bgfs == 2" class="text-primary ml5">用户更新</span>
<span v-if="scope.row.bgfs == 3" class="text-warning ml5">校工会变更</span>
</span></template>
</el-table-column>
<el-table-column label="变更原因" :show-overflow-tooltip="true" prop="bgyy" header-align="center"
align="center"></el-table-column>
<el-table-column label="原单位" :show-overflow-tooltip="true" width="120" prop="oldunitname"
header-align="center" align="center"></el-table-column>
<el-table-column label="原工会" :show-overflow-tooltip="true" width="140" prop="oldunionname"
header-align="center" align="center"></el-table-column>
<el-table-column label="变更单位" :show-overflow-tooltip="true" width="120" prop="newunitname"
header-align="center" align="center"></el-table-column>
<el-table-column label="变更工会" :show-overflow-tooltip="true" width="140" prop="newunionname"
header-align="center" align="center"></el-table-column>
<el-table-column label="状态" show-overflow-tooltip="true" prop="hyzt" width="130"
header-align="center" align="center">
<template scope="scope">
<span>
<el-tag v-if="scope.row.bgstate==1" type="warning">待审核</el-tag>
<el-tag v-if="scope.row.bgstate==2" type="success">审核通过</el-tag>
<el-tag v-if="scope.row.bgstate==3" type="danger">审核拒绝</el-tag>
</span>
</template>
</el-table-column>
</el-table>
</el-collapse-item>
</el-collapse>
</el-form>
</el-dialog>
</div>
<script>
new Vue({
el: "#app",
data: function () {
return {
tableData: [],
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
searchName: "username",
unionid: "",
sqsj: "",
unitid: ""
},
unions: [],
unionadd: [],
isShow: false,
units: [],
formData: {
unitid: "",
unionid: "",
bgsy: "",
choose: "",
userSel: [],
flag: "",
},
DialogVisible: false,
User: [],
loading: false,
flag: "",
viewData: [],
age: "",
infoDialogVisible: false,
sqsj: [],
activeName: "1",
hjtableData: [],
showPic: "",
}
},
components: {
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.2'),
},
methods: {
seeunit: function (id) {
var self = this;
$.post(base + "/platform/hy/hyda/seeunit", {id: id}, function (data) {
self.units = data.data;
self.pageForm.unitid = "";
})
},
pageData: function () {
var self = this;
if (self.sqsj) {
self.pageForm.sqsj = self.sqsj.toString();
} else {
self.pageForm.sqsj = "";
}
sublime.showLoadingbar();//显示loading
$.post(base + "/platform/hy/hjblkc/init", self.pageForm, function (data) {
sublime.closeLoadingbar();//关闭loading
if (data.code == 0) {
self.tableData = data.data.users.list;
self.pageForm.totalCount = data.data.users.totalCount;
self.flag = data.data.flag;
self.unions = data.data.unions;
self.units = data.data.ejdw;
}
}, "json");
},
/*分页事件*/
pageSizeChange: function (val) {
this.pageForm.pageSize = val;
this.pageData();
},
pageNumberChange: function (val) {
this.pageForm.pageNumber = val;
this.pageData();
},
doSearch: function () {
this.pageForm.pageNumber = 1;
this.pageData();
},
/*打开模态框*/
openDo: function () {
var self = this;
self.formData.choose = "";
self.formData.userSel = [];
self.formData.unitid = "";
self.formData.unionid = "";
self.DialogVisible = true;
},
/*查看*/
openInfo: function (scope) {
var self = this;
$.post(base + "/platform/hy/hjblkc/findInfo", {id: scope.row.id}, function (data) {
if (data.code == 0) {
self.viewData = data.data.userInfo;
self.hjtableData = data.data.hjbg;
if (data.data.userInfo.imgurl != null) {
self.showPic = FILE_DOMAIN + data.data.userInfo.imgurl;
} else {
self.showPic = "";
}
self.age = self.calAge(self.viewData.birthday);
}
}, "json");
self.infoDialogVisible = true;
},
/*远程搜索*/
remoteMethod: function (keyWord) {
var self = this;
if (keyWord != "" && keyWord != null) {
self.loading = true;
setTimeout(function () {
$.post(base + "/platform/hy/hjblkc/remoteMethod", {
keyWord: keyWord,
flag: self.flag
}, function (data) {
if (data.code == 0) {
self.User = data.data;
self.loading = false;
}
}, "json");
}, 200)
} else {
self.User = [];
}
},
getUnionByUnit: function (value) {
var self = this;
//根据单位id查询对应的工会
$.post(base + "/platform/hy/hjblkc/getUnionByUnit", {unitid: value}, function (data) {
if (data.code == 0) {
if (data.data == null || data.data == undefined) {
self.formData.unionid = "";
self.unionadd = [];
} else {
self.formData.unionid = data.data[0].id;
self.unionadd = data.data;
}
}
}, "json");
},
goDo: function () {
var self = this;
self.formData.flag = self.flag;
if (self.formData.userSel.length == 0) {
self.$message({
message: "请选择人员",
type: 'warning'
});
return;
}
if (self.formData.choose == 0) {
self.$message({
message: "请选择对应的操作",
type: 'warning'
});
return;
}
if (self.formData.choose == "1") {
if (self.formData.unionid == "") {
self.$message({
message: "所属工会不能为空",
type: 'warning'
});
return;
}
}
//
self.$confirm("确定要进行此操作吗?", "提示", {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: function (a, b) {
if ("confirm" == a) {
$.post(base + "/platform/hy/hjblkc/goDo", self.formData, function (data) {
if (data.code == 0) {
self.$message({
message: data.msg,
type: 'success'
});
self.pageData();
self.DialogVisible = false;
} else {
self.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
}
}
})
},
/*计算年龄*/
calAge: function (birthday) {
// 获得今天的时间
var date = new Date();
var startDate = new Date(birthday);
var newDate = date.getTime() - startDate.getTime();
var age = Math.ceil(newDate / 1000 / 60 / 60 / 24 / 365);
if (isNaN(age)) {
age = "";
}
return age;
},
},
created: function () {
this.pageData();
if (this.formData.choose == '') {
$(".isShow").hide();
}
},
watch: {
'formData.choose': function (value) {
if (value == '校内异动') {
$(".isShow").show();
} else {
$(".isShow").hide();
}
}
}
})
</script>
<!--#
}
#-->
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,897 @@
<!--会员档案管理页面 djx 2019-5-8-->
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-date-editor .el-range-separator {
padding: 0px;
}
#infoDialog .el-dialog__body {
padding: 0px 20px;
}
#plsz .el-dialog__body {
padding: 5px 0px;
}
.el-input--suffix .el-input__inner {
padding-right: 0px;
}
.el-date-editor .el-range-separator {
width: 6%;
}
.avatar-uploader {
height: 140px;
width: 100%;
}
.avatar-uploader .el-upload {
height: 140px;
width: 100%;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
height: 140px;
width: 100%;
line-height: 112px;
text-align: center;
}
.avatar {
width: 100%;
height: 140px;
display: block;
}
input[type=file] {
display: none;
}
.tpa {
padding: 10px;
text-align: center;
width: 12%;
background-color: rgb(250, 250, 250);
border: 1px solid rgb(220, 220, 220);
}
.tpb {
padding: 10px;
text-align: center;
color: #a0a9b4;
width: 16%;
border: 1px solid rgb(220, 220, 220);
}
.tpc {
padding: 10px;
color: #a0a9b4;
width: 15%;
border: 1px solid rgb(220, 220, 220);
}
</style>
<div id="app" v-cloak>
<!--快捷查询-->
<el-row class="header navbar bg-white shadow">
<div class="btn-group tool-button mt5">
<el-select placeholder="请选择所属工会" v-model="pageForm.unionid" style="width: 200px;" clearable="true"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<div>
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询" style="width: 100px;">
<el-option label="工号" value="loginname"></el-option>
<el-option label="姓名" value="username"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="btn-group tool-button mt5">
<dict-select v-model="pageForm.rylx" style="width: 200px;" clearable placeholder="请选择人员类型"
code="UserType"></dict-select>
</div>
<div class="btn-group tool-button mt5">
<dict-select v-model="pageForm.userstate" style="width: 200px;" clearable placeholder="请选择在职状态"
code="UserState"></dict-select>
</div>
<div class="btn-group tool-button mt5">
<el-select placeholder="请选择所在校区" v-model="pageForm.campus" style="width: 200px;" clearable="true"
filterable="true">
<el-option v-for="item in campusOptions" :label="item.campus_name" :value="item.campus_id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-date-picker style="width:260px;"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
v-model="rxTime"
type="daterange"
range-separator="至"
start-placeholder="入校时间"
end-placeholder="入校时间">
</el-date-picker>
</div>
<div class="btn-group tool-button mt5">
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
<el-button size="medium" v-if="${session.show}!=3" @click="dqedit"><i class="ti-plus"></i> 批量编辑</el-button>
</div>
</el-row>
<!--表格-->
<el-row class="el-table-container">
<el-table @selection-change="dqSelectionChange" :row-key="getRowKeys" :data="tableData" size="small">
<el-table-column type="selection" :reserve-selection="true"></el-table-column>
<el-table-column align="center" header-align="center" label="序号" type="index">
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="工号" prop="loginname"></el-table-column>
<el-table-column align="center" header-align="center" label="姓名" prop="username"></el-table-column>
<el-table-column align="center" header-align="center" label="性别" prop="sex"></el-table-column>
<el-table-column align="center" header-align="center" label="电话" prop="mobile"></el-table-column>
<el-table-column align="center" :show-overflow-tooltip="true" header-align="center" label="所属单位"
prop="name"></el-table-column>
<el-table-column align="center" :show-overflow-tooltip="true" header-align="center" label="所属工会"
prop="unionname"></el-table-column>
<el-table-column align="center" header-align="center" label="人员类型" prop="rylx"></el-table-column>
<el-table-column align="center" header-align="center" label="在职状态" prop="zzzt"></el-table-column>
<el-table-column align="center" header-align="center" label="会员状态" prop="sfhy">
<template slot-scope="scope">
<span v-if="scope.row.sfhy == 1" class="text-success ml5">正式会员</span>
<span v-if="scope.row.sfhy == 2" class="text-primary ml5">已转出</span>
<span v-if="scope.row.sfhy == 3" class="text-warning ml5">已转入</span>
<span v-if="scope.row.sfhy == 4" class="text-info ml5">保留会籍</span>
<span v-if="scope.row.sfhy == 5" class="text-muted ml5">已退会</span>
<span v-if="scope.row.sfhy == 6" class="text-danger ml5">已开除</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="入校时间" prop="rxsj"></el-table-column>
<!-- <el-table-column align="center" header-align="center" label="退休时间" prop="txsj"></el-table-column>-->
<el-table-column align="center" header-align="center" label="所属校区" prop="dq_name"></el-table-column>
<el-table-column align="center" label="操作" width="150px">
<template slot-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',scope:scope}">
查看
</el-dropdown-item>
<el-dropdown-item :command="{type:'edit',scope:scope}">
编辑
</el-dropdown-item>
<el-dropdown-item :command="{type:'export',scope:scope}">
导出
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--分页-->
<el-row class="el-pagination-container">
<el-pagination
@size-change="pageSizeChange"
@current-change="pageNumberChange"
:current-page="pageForm.pageNumber"
:page-sizes="[10, 20, 30, 50]"
:page-size="pageForm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="pageForm.totalCount">
</el-pagination>
</el-row>
<!--查看会员详细资料-->
<el-dialog title="查看" width="55%" custom-class="ViewDialogClass" :visible.sync="infoDialogVisible" top="5%">
<el-form label-width="80px">
<el-collapse v-model="activeName">
<el-collapse-item title="用户信息" name="1">
<el-card>
<div>
<table style="width: 100%">
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa">&emsp;&emsp;</td>
<td class="tpb">{{viewData.username}}</td>
<td class="tpa">&emsp;&emsp;</td>
<td class="tpb">{{viewData.sex}}</td>
<td class="tpa">出生日期</td>
<td class="tpb">{{viewData.birthday}}</td>
<td rowspan="3">
<img v-if="viewData.imgurl!=''&&viewData.imgurl!=null" :src="showPic"
style="height: 140px;width: 100%;border:none">
<div v-if="(viewData.imgurl==''||viewData.imgurl==null)&&flag!=3"
style="text-align: center">
<el-label>暂无图片</el-label>
</div>
<div v-if="(viewData.imgurl==''||viewData.imgurl==null)&&flag==3"
style="height: 140px;width: 100%">
<el-upload
:show-file-list="false"
class="avatar-uploader"
action="/platform/hy/hyda/uploadFile"
:data="userid"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
>
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
<span v-if="!imageUrl"
style="color: #8c939d;position: relative;top:-68px;">一寸电子照</span>
</el-upload>
</div>
</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa">出生地点</td>
<td class="tpb">{{viewData.csdd}}</td>
<td class="tpa">&emsp;&emsp;</td>
<td class="tpb">{{viewData.mz}}</td>
<td class="tpa">政治面貌</td>
<td class="tpb">{{viewData.zzmc}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa">&emsp;&emsp;</td>
<td class="tpb">{{viewData.gz}}</td>
<td class="tpa">&emsp;&emsp;</td>
<td class="tpb">{{viewData.zc}}</td>
<td class="tpa">联系电话</td>
<td class="tpb">{{viewData.mobile}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa" colspan="1">人事编制</td>
<td class="tpb" colspan="3">{{viewData.rsbz}}</td>
<td class="tpa" colspan="1">Email</td>
<td class="tpb" colspan="2">{{viewData.email}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa" colspan="1">所在部门</td>
<td class="tpb" colspan="3">{{viewData.unitname}}</td>
<td class="tpa" colspan="1">现任职务</td>
<td class="tpb" colspan="2">{{viewData.zw}}</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpa" colspan="7">个 人 简 历</td>
</tr>
<tr style="border: 1px solid rgb(220,220,220);">
<td class="tpb" colspan="7" v-if="viewData.grjl=='' || viewData.grjl==null">
暂无个人简历信息
</td>
<td class="tpc" colspan="7" v-if="viewData.grjl!='' && viewData.grjl!=null">
<div v-html="viewData.grjl"></div>
</td>
</tr>
</table>
</div>
</el-card>
</el-collapse-item>
<el-collapse-item title="家庭成员" name="2">
<el-table
:data="viewData.jtcy"
border
size="mini"
>
<el-table-column prop="gx" label="与本人关系" align="center" header-align="center">
</el-table-column>
<el-table-column prop="xm" label="姓名" align="center" header-align="center">
</el-table-column>
<el-table-column prop="dw" label="单位" align="center" header-align="center">
</el-table-column>
<el-table-column prop="bz" label="备注" align="center" header-align="center">
</el-table-column>
</el-table>
</el-collapse-item>
<el-collapse-item title="会籍变更档案" name="3">
<el-table size="mini"
:data="hjtableData"
style="width: 95%">
<el-tale-column label="变更事由" show-overflow-tooltip="true" prop="bgsy" header-align="center"
align="center"></el-tale-column>
<el-table-column label="变更时间" width="88" show-overflow-tooltip="true" prop="sj"
header-align="center" align="center"></el-table-column>
<el-table-column label="变更类型" show-overflow-tooltip="true" prop="bgtype" header-align="center"
align="center">
<template scope="scope"><span>
<span v-if="scope.row.bgtype == 1" class="text-danger ml5">转出</span>
<span v-if="scope.row.bgtype == 2" class="text-primary ml5">转入</span>
<span v-if="scope.row.bgtype == 3" class="text-warning ml5">保留</span>
<span v-if="scope.row.bgtype == 4" class="text-info ml5">退会</span>
<span v-if="scope.row.bgtype == 5" class="text-muted ml5">开除</span>
</span></template>
</el-table-column>
<el-table-column label="变更方式" show-overflow-tooltip="true" prop="bgfs" header-align="center"
align="center">
<template scope="scope"><span>
<span v-if="scope.row.bgfs == 1" class="text-danger ml5">会员申请</span>
<span v-if="scope.row.bgfs == 2" class="text-primary ml5">用户更新</span>
<span v-if="scope.row.bgfs == 3" class="text-warning ml5">校工会变更</span>
</span></template>
</el-table-column>
<el-table-column label="变更原因" :show-overflow-tooltip="true" prop="bgyy" header-align="center"
align="center"></el-table-column>
<el-table-column label="原单位" :show-overflow-tooltip="true" width="120" prop="oldunitname"
header-align="center" align="center"></el-table-column>
<el-table-column label="原工会" :show-overflow-tooltip="true" width="140" prop="oldunionname"
header-align="center" align="center"></el-table-column>
<el-table-column label="变更单位" :show-overflow-tooltip="true" width="120" prop="newunitname"
header-align="center" align="center"></el-table-column>
<el-table-column label="变更工会" :show-overflow-tooltip="true" width="140" prop="newunionname"
header-align="center" align="center"></el-table-column>
<el-table-column label="状态" show-overflow-tooltip="true" prop="hyzt" width="130"
header-align="center" align="center">
<template scope="scope">
<span>
<el-tag v-if="scope.row.bgstate==1" type="warning">待审核</el-tag>
<el-tag v-if="scope.row.bgstate==2" type="success">审核通过</el-tag>
<el-tag v-if="scope.row.bgstate==3" type="danger">审核拒绝</el-tag>
</span>
</template>
</el-table-column>
</el-table>
</el-collapse-item>
</el-collapse>
</el-form>
</el-dialog>
<!--批量编辑-->
<el-dialog title="批量编辑" custom-class="ViewDialogClass" :visible.sync="editDialogVisible">
<div class="pull-right offscreen-right mt5">
<el-select size="small" clearable="true" v-model="dqid" placeholder="批量设置校区">
<el-option v-for="o in dqs" :value="o.dq_id" :label="o.dq_name">
</el-option>
</el-select>
</div>
<el-table :data="userlist" size="small">
<el-table-column align="center" header-align="center" label="工号" prop="loginname"></el-table-column>
<el-table-column align="center" header-align="center" label="姓名" prop="username"></el-table-column>
<el-table-column align="center" header-align="center" label="性别" prop="sex"></el-table-column>
<el-table-column align="center" header-align="center" label="电话" prop="mobile"></el-table-column>
<el-table-column align="center" :show-overflow-tooltip="true" header-align="center" label="所属单位"
width="200px" prop="name"></el-table-column>
<el-table-column align="center" :show-overflow-tooltip="true" header-align="center" label="所属工会"
width="200px" prop="unionname"></el-table-column>
<el-table-column align="center" header-align="center" label="所属校区" width="130">
<template scope="scope">
<el-select placeholder="请选择校区" v-model="scope.row.dqid" size="mini" style="width: 100%">
<el-option v-for="o in dqs" :value="o.dq_id" :label="o.dq_name">
</el-option>
</el-select>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="editDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="save">确 定</el-button>
</span>
</el-dialog>
<!--批量设置会员-->
<!-- <el-dialog
title="批量设置会员" id="plsz"
:visible.sync="plzDialogVisible" custom-class="ViewDialogClass" top="3%">
<el-row class="header navbar bg-white shadow" style="min-height: 43px;">
<div class="btn-group tool-button mt5">
<el-input placeholder="可按姓名、电话查询" size="small" v-model="plszpageForm.searchKeyword" clearable></el-input>
</div>
<div class="btn-group tool-button mt5">
<el-select v-model="plszpageForm.unit" filterable clearable size="small" placeholder="请选择单位">
<el-option
v-for="item in units"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select v-model="plszpageForm.union" v-if="flag == 1" filterable clearable size="small" placeholder="请选择工会">
<el-option
v-for="item in unions"
:label="item.unionname"
:value="item.id">
</el-option>
</el-select>
<el-select v-model="plszpageForm.union" v-if="flag == 2" disabled filterable clearable size="small" placeholder="请选择工会">
<el-option
v-for="item in unions"
:label="item.unionname"
:value="item.id">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-button size="small" type="primary" icon="el-icon-search" @click="doPlszSearch"></el-button>
</div>
</el-row>
<el-row class="el-table-container">
<el-table :data="plsztableData" size="small" @selection-change="handleSelectionChange">
<el-table-column type="selection"></el-table-column>
<el-table-column align="center" header-align="center" label="序号" type="index">
<template scope="scope"><span>{{scope.$index+(plszpageForm.pageNumber - 1) * plszpageForm.pageSize + 1}} </span></template>
</el-table-column>
<el-table-column align="center" header-align="center" label="工号" width="80" prop="loginname"></el-table-column>
<el-table-column align="center" header-align="center" label="姓名" prop="username"></el-table-column>
<el-table-column align="center" header-align="center" label="性别" prop="sex"></el-table-column>
<el-table-column align="center" header-align="center" :show-overflow-tooltip="true" label="单位" width="200px" prop="name"></el-table-column>
<el-table-column align="center" header-align="center" label="电话" prop="mobile"></el-table-column>
&lt;!&ndash;<el-table-column align="center" header-align="center" label="所属工会" width="200px" prop="unionname"></el-table-column>&ndash;&gt;
</el-table>
</el-row>
<el-row class="el-pagination-container">
<el-pagination
@size-change="plszpageSizeChange"
@current-change="plszpageNumberChange"
:current-page="plszpageForm.pageNumber"
:page-sizes="[10, 20, 30, 50]"
:page-size="plszpageForm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="plszpageForm.totalCount">
</el-pagination>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="plzDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="doSz">确 定</el-button>
</span>
</el-dialog>-->
<el-dialog title="修改" :visible.sync="editVisible" width="50%">
<el-form :model="formData" ref="addForm" label-width="80px">
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="loginname" label="工&emsp;&emsp;号">
<el-input disabled v-model="formData.loginname" type="text"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="username" label="姓&emsp;&emsp;名">
<el-input disabled v-model="formData.username" type="text"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="person_type" label="人员类型">
<dict-select v-model="formData.person_type" style="width: 100%;" placeholder="请选择人员类型"
code="UserType"></dict-select>
</el-form-item>
<el-form-item prop="userState" label="在职状态">
<dict-select v-model="formData.userState" style="width: 100%;" placeholder="请选择在职状态"
code="UserState"></dict-select>
</el-form-item>
<el-form-item prop="campus_id" label="所在校区">
<el-select placeholder="请选择所在校区" v-model="formData.campus_id" style="width: 100%" clearable="true"
filterable="true">
<el-option v-for="item in campusOptions" :label="item.campus_name"
:value="item.campus_id"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="unionid" label="所在工会">
<el-select placeholder="请选择所在工会" v-model="formData.unionid" @change="formData.unitid = '';getUnits()"
style="width: 100%"
filterable="true">
<el-option v-for="item in unionOptions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="unitid" label="所在单位">
<el-select placeholder="请选择所在单位" v-model="formData.unitid" style="width: 100%"
filterable="true">
<el-option v-for="item in unitOptions" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="editVisible = false">取 消</el-button>
<el-button type="primary" @click="doEdit">确 定</el-button>
</span>
</el-dialog>
</div>
<script>
var vm = new Vue({
el: "#app",
data: function () {
getRowKeys = function (row) {
return row.id;
}
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
searchName: "username",
rxTime: "",
txTime: "",
unionid: "",
userstate: "",
},
rxTime: [],
txTime: [],
tableData: [],
/*查看*/
infoDialogVisible: false,
viewData: [],
activeName: "1",
age: "",
hjtableData: [],
flag: "",//用于区分当前登录用户是基层工会管理员还是校工会管理员
/*批量设置*/
plzDialogVisible: false,
plsztableData: [],
plszpageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
flag: "",
union: "",
unit: "",
searchKeyword: "",
},
multipleSelection: [],
depSelection: [],
units: [],
unions: [],
unionid: "",
showPic: "",
imageUrl: "",
userid: {},
editDialogVisible: false,
dqs: [],
dqid: "",
userlist: [],
tab: [],
campusOptions: [],
unionOptions: [],
unitOptions: [],
editVisible: false,
formData: {}
}
},
components: {
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.4'),
},
methods: {
async doEdit() {
const resp = await $.post(loc() + "/doEditUserInfo", this.formData)
requestLaterMsgFun(this, resp, () => {
this.editVisible = false
this.pageData()
})
},
async getUnions() {
this.unionOptions = await getUnions()
},
async getUnits() {
this.unitOptions = await getUnits(this.formData.unionid)
},
async openEdit(userid) {
const {data} = await $.get(loc() + "/userInfo", {userid})
this.formData = data
this.getUnits()
this.editVisible = true
},
dropdownCommand(command) {
const {type, scope} = command
if (type == 'view') {
this.openInfo(scope)
} else if (type == 'export') {
this.daochu(scope)
} else if (type == 'edit') {
this.openEdit(scope.row.id)
}
},
//页面初始化,加载表格数据
pageData: function () {
var self = this;
if (self.rxTime) {
self.pageForm.rxTime = self.rxTime.toString();
} else {
self.pageForm.rxTime = "";
}
if (self.txTime) {
self.pageForm.txTime = self.txTime.toString();
} else {
self.pageForm.txTime = "";
}
sublime.showLoadingbar();//显示loading
$.post(base + "/platform/hy/hyda/init", self.pageForm, function (data) {
sublime.closeLoadingbar();//关闭loading
if (data.code == 0) {
self.tableData = data.data.user.list;
self.pageForm.totalCount = data.data.user.totalCount;
self.flag = data.data.flag;
self.plszpageForm.flag = data.data.flag;
self.units = data.data.ejdw;
self.unions = data.data.unions;
self.dqs = data.data.dqs;
}
}, "json");
},
/*批量设置*/
plszPageData: function () {
var self = this;
$.post(base + "/platform/hy/hyda/findPlSzUser", self.plszpageForm, function (data) {
if (data.code == 0) {
self.plsztableData = data.data.user.list;
self.plszpageForm.totalCount = data.data.user.totalCount;
self.unionid = data.data.unionid;
}
}, "json");
},
/*分页事件*/
pageSizeChange: function (val) {
this.pageForm.pageSize = val;
this.pageData();
},
pageNumberChange: function (val) {
this.pageForm.pageNumber = val;
this.pageData();
},
plszpageSizeChange: function (val) {
this.plszpageForm.pageSize = val;
this.plszPageData();
},
plszpageNumberChange: function (val) {
this.plszpageForm.pageNumber = val;
this.plszPageData();
},
doSearch: function () {
var self = this;
self.pageForm.pageNumber = 1;
self.pageData();
},
doPlszSearch: function () {
var self = this;
self.plszpageForm.pageNumber = 1;
self.plszPageData();
},
openInfo: function (scope) {
var self = this;
self.picTemp = false;
self.userid.userid = scope.row.id;
$.post(base + "/platform/hy/hyda/findInfo", {id: scope.row.id}, function (data) {
if (data.code == 0) {
self.viewData = data.data.userInfo;
if (self.viewData.jtcy == "" || self.viewData.jtcy == null || self.viewData == undefined) {
self.viewData.jtcy = [];
} else {
self.viewData.jtcy = JSON.parse(self.viewData.jtcy | '[]');
}
self.hjtableData = data.data.hjbg;
self.showPic = FILE_DOMAIN + self.viewData.imgurl;
self.age = self.calAge(self.viewData.birthday);
}
}, "json");
self.infoDialogVisible = true;
},
handleClick: function () {
},
openplsz: function () {
var self = this;
self.plszPageData();
if (self.flag == 2) {
setTimeout(function () {
self.plszpageForm.union = self.unionid;
}, 20)
}
self.plzDialogVisible = true;
},
handleSelectionChange: function (val) {
var self = this;
self.multipleSelection = [];
self.depSelection = [],
$(val).each(function (i, e) {
self.multipleSelection.push(e.id);
self.depSelection.push(e.name);
});
},
doSz: function () {
var self = this;
if (self.multipleSelection.length == 0) {
self.$message({
message: "请在左侧选择用户",
type: 'warning'
});
return;
}
for (var i = 0; i < self.depSelection.length; i++) {
if (self.depSelection[i] == "" || self.depSelection[i] == null) {
self.$message({
message: "用户单位为空,操作失败",
type: 'warning'
});
return;
}
}
$.post(base + "/platform/hy/hyda/plSz", {
"ids": self.multipleSelection.toString(),
"flag": self.flag
}, function (data) {
if (data.code == 0) {
self.$message({
message: data.msg,
type: 'success'
});
self.pageData();
self.plzDialogVisible = false;
}
}, "json");
},
daochu: function (scope) {
var self = this;
window.location.href = base + "/platform/hy/hyda/daochu?id=" + scope.row.id;
},
/*图片上传*/
handleAvatarSuccess: function (res, file) {
var self = this;
if (res.code == 0) {
self.imageUrl = URL.createObjectURL(file.raw);
self.$message({
message: res.msg,
type: 'success'
});
} else {
self.$message({
message: res.msg,
type: 'error'
});
}
},
beforeAvatarUpload: function (file) {
var isLt2M = file.size / 1024 / 1024 < 2;
var isJPG = file.type === 'image/jpeg';
var isPng = file.type === 'image/png';
if (!isJPG && !isPng) {
this.$message.error('上传头像图片只能是 JPG和PNG格式!');
}
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!');
}
return (isJPG || isPng) && isLt2M;
},
/*计算年龄*/
calAge: function (birthday) {
// 获得今天的时间
var date = new Date();
var startDate = new Date(birthday);
var newDate = date.getTime() - startDate.getTime();
var age = Math.ceil(newDate / 1000 / 60 / 60 / 24 / 365);
if (isNaN(age)) {
age = "";
}
return age;
},
dqedit: function () {
this.editDialogVisible = true;
},
dqSelectionChange: function (val) {//获取选中的对象
this.userlist = val;
},
save: function () {
var self = this;
var user = JSON.stringify(self.userlist);
$.post(base + "/platform/hy/hyda/save", {user: user}, function (data) {
if (data.code == 0) {
self.$message({
message: data.msg,
type: 'success'
});
self.editDialogVisible = false;
self.pageData();
} else {
self.$message({
message: data.msg,
type: 'error'
});
}
})
},
onSelectAll: function (selection) {
if (selection.length) {
selection.forEach(function (value) {
this.userlist[value.id] = value;
})
} else {
// 取消全选
this.tableData.forEach(function (value) {
delete this.userlist[value.id];
})
}
},
},
created: async function () {
this.pageData();
this.campusOptions = await getCampus()
this.getUnions()
}
})
vm.$watch('dqid', function (nval, oval) {
vm.userlist.forEach(function (value) {
value.dqid = nval
})
})
</script>
<!--#
}
#-->
@@ -0,0 +1,270 @@
<!--会员批量设置-->
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak="">
<el-row class="header navbar bg-white shadow">
<div class="btn-group tool-button mt5">
<div>
<el-input placeholder="请输入内容" clearable v-model="plszpageForm.searchKeyword">
<el-select v-model="plszpageForm.searchName" slot="prepend" placeholder="查询" style="width: 100px;">
<el-option label="工号" value="loginname"></el-option>
<el-option label="姓名" value="username"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="btn-group tool-button mt5">
<el-select v-model="plszpageForm.union" @change="seeunit(plszpageForm.union)"
:disabled="flag==2||flag==5?true:false" filterable clearable placeholder="请选择工会">
<el-option
v-for="item in unions"
:label="item.unionname"
:value="item.id">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select v-model="plszpageForm.unit" filterable clearable placeholder="请选择单位">
<el-option
v-for="item in units"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-button type="primary" icon="el-icon-search" @click="dosearch"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
<el-button @click="sz"><i class="ti-plus"></i>批量设置会员</el-button>
</div>
</el-row>
<el-row class="el-table-container">
<el-table :data="plsztableData" ref="multipleTable" size="small" @selection-change="handleSelectionChange"
:row-key="getRowKeys">
<el-table-column type="selection" :reserve-selection="true"></el-table-column>
<el-table-column align="center" header-align="center" label="序号" type="index">
<template scope="scope">
<span>{{scope.$index+(plszpageForm.pageNumber - 1) * plszpageForm.pageSize + 1}} </span></template>
</el-table-column>
<el-table-column align="center" header-align="center" label="工号" prop="loginname"></el-table-column>
<el-table-column align="center" header-align="center" label="姓名" prop="username"></el-table-column>
<el-table-column align="center" header-align="center" label="性别" prop="sex"></el-table-column>
<el-table-column align="center" header-align="center" label="电话" prop="mobile"></el-table-column>
<el-table-column align="center" header-align="center" label="所属工会" :show-overflow-tooltip="true"
prop="unionname"></el-table-column>
<el-table-column align="center" header-align="center" :show-overflow-tooltip="true" label="所属单位"
prop="name"></el-table-column>
</el-table>
</el-row>
<el-row class="el-pagination-container">
<el-pagination
@size-change="plszpageSizeChange"
@current-change="plszpageNumberChange"
:current-page="plszpageForm.pageNumber"
:page-sizes="[10, 20, 30, 50]"
:page-size="plszpageForm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="plszpageForm.totalCount">
</el-pagination>
</el-row>
<el-dialog
title="批量设置会员"
:visible.sync="addhyDialog"
custom-class="ViewDialogClass"
width="50%">
<el-table :data="hylist" size="small">
<el-table-column align="center" header-align="center" label="工号" prop="loginname"></el-table-column>
<el-table-column align="center" header-align="center" label="姓名" prop="username"></el-table-column>
<el-table-column align="center" header-align="center" label="性别" prop="sex"></el-table-column>
<el-table-column align="center" header-align="center" :show-overflow-tooltip="true" label="单位"
prop="name"></el-table-column>
<el-table-column align="center" header-align="center" label="电话" prop="mobile"></el-table-column>
<!-- <el-table-column align="right">
<template scope="scope">
<el-button type="danger" size="small" @click="remove(scope)">移除</el-button>
</template>
</el-table-column>-->
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="addhyDialog=false">取消</el-button>
<el-button type="primary" @click="doSz">确定</el-button>
</div>
</el-dialog>
</div>
<script>
var vm;
vm = new Vue({
el: "#app",
data: function () {
return {
plszpageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
flag: "",
union: "",
unit: "",
searchKeyword: "",
searchName: "username"
},
plsztableData: [],
units: [],
flag: "",
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
rxTime: "",
txTime: "",
unionid: "",
userstate: "",
searchName: "username"
},
hylist: [],
oldlist: [],
con: false,
addhyDialog: false,
multipleTable: [],
ids: [],
unions: []
}
},
methods: {
plszpageSizeChange: function (val) {
this.plszpageForm.pageSize = val;
this.plszPageData();
},
plszpageNumberChange: function (val) {
this.plszpageForm.pageNumber = val;
this.plszPageData();
},
plszPageData: function () {
var self = this;
$.post(base + "/platform/hy/hyda/findPlSzUser", self.plszpageForm, function (data) {
if (data.code == 0) {
self.plsztableData = data.data.user.list;
self.plszpageForm.totalCount = data.data.user.totalCount;
self.unionid = data.data.unionid;
}
}, "json");
},
handleSelectionChange: function (val) {
this.hylist = val;
},
getRowKeys: function (row) {
return row.id;
},
dosearch: function () {
var self = this;
self.plszpageForm.pageNumber = 1;
self.plszPageData();
},
load: function () {
var self = this;
$.post(base + "/platform/hy/hyda/init", self.pageForm, function (data) {
sublime.closeLoadingbar();//关闭loading
if (data.code == 0) {
self.flag = data.data.flag;
if (self.flag == 2 || self.flag == 5) {
self.plszpageForm.union = data.data.unions[0].id
}
self.plszpageForm.flag = data.data.flag;
self.units = data.data.ejdw;
self.unions = data.data.unions;
self.plszPageData()
}
}, "json");
},
sz: function () {
this.con = false;
if (this.hylist == "") {
this.addhyDialog = false;
this.$message({
message: "请先选择批量设置的用户!",
type: 'warning'
});
return
}
this.addhyDialog = true
},
remove: function (scope) {
this.con = true
this.$refs.multipleTable.clearSelection();
this.oldlist.splice(scope.$index, 1);
this.hylist = this.oldlist;
for (var i = 0; i < this.hylist.length; i++) {
for (var j = 0; j < this.plsztableData.length; j++) {
if (this.hylist[i].id == this.plsztableData[j].id) {
this.$refs.multipleTable.toggleRowSelection(this.plsztableData[j]);
}
}
}
},
doSz: function () {
var self = this;
self.ids = [];
for (var i = 0; i < self.hylist.length; i++) {
if (self.hylist[i].name == "" || self.hylist[i].name == null) {
self.$message({
message: "用户单位为空,操作失败",
type: 'warning'
});
return;
}
self.ids[i] = self.hylist[i].id;
}
$.post(base + "/platform/hy/hyda/plSz", {
"ids": self.ids.toString(),
"flag": self.flag
}, function (data) {
if (data.code == 0) {
self.$message({
message: data.msg,
type: 'success'
});
self.plszPageData();
self.addhyDialog = false;
}
}, "json");
},
seeunit: function (id) {
console.log(id)
var self = this;
$.post(base + "/platform/hy/hyda/seeunit", {id: id}, function (data) {
self.units = data.data;
self.pageForm.unitid = "";
})
}
},
created: function () {
this.load()
}
});
</script>
<!--#
}
#-->