964 lines
45 KiB
HTML
964 lines
45 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
<style>
|
|
input[type="file"] {
|
|
display: none
|
|
}
|
|
|
|
.w-e-text-container {
|
|
height: 250px !important;
|
|
}
|
|
|
|
.v-box .el-card__header {
|
|
padding: 5px 15px;
|
|
}
|
|
|
|
.el-select-dropdown {
|
|
z-index: 99999999 !important;
|
|
}
|
|
|
|
.el-loading-mask {
|
|
z-index: 99999999 !important;
|
|
}
|
|
|
|
.el-picker-panel {
|
|
z-index: 99999999 !important;
|
|
}
|
|
|
|
|
|
.el-transfer {
|
|
text-align: center;
|
|
}
|
|
|
|
.el-transfer-panel {
|
|
text-align: left;
|
|
width: 40%;
|
|
height: 500px;
|
|
}
|
|
|
|
.el-transfer-panel__list.is-filterable {
|
|
height: 400px;
|
|
}
|
|
|
|
.demo-table-expand {
|
|
font-size: 0;
|
|
}
|
|
|
|
.demo-table-expand label {
|
|
margin-left: 100px;
|
|
width: 100%;
|
|
color: #99a9bf;
|
|
}
|
|
|
|
.demo-table-expand .el-form-item {
|
|
margin-right: 0;
|
|
margin-bottom: 0;
|
|
width: 50%;
|
|
}
|
|
|
|
.el-textarea__inner {
|
|
width: 600px;
|
|
margin-left: 90px;
|
|
text-align: center;
|
|
}
|
|
|
|
.el-transfer-panel__body {
|
|
height: calc(100% - 40px) !important;
|
|
}
|
|
|
|
.el-transfer-panel__list {
|
|
height: 100%;
|
|
}
|
|
|
|
.el-transfer {
|
|
border: 1px solid #EBEEF5;
|
|
}
|
|
|
|
.el-transfer .el-checkbox-group {
|
|
line-height: 40px;
|
|
}
|
|
|
|
|
|
</style>
|
|
<div id="app" v-cloak>
|
|
|
|
<el-row class="transition-row">
|
|
<transition name="el-zoom-in-center">
|
|
<div v-show="v=='index'" class="transition-item">
|
|
<el-row class="header navbar bg-white shadow">
|
|
<div class="btn-group tool-button mt5">
|
|
<el-date-picker
|
|
v-model="pageForm.year"
|
|
type="year"
|
|
value-format="yyyy"
|
|
placeholder="选择年度">
|
|
</el-date-picker>
|
|
</div>
|
|
<div class="btn-group tool-button mt5">
|
|
<el-select v-model="pageForm.hdid" filterable clearable placeholder="请选择活动" @change="pageData">
|
|
<el-option
|
|
v-for="item in lxyHd"
|
|
:key="item.id"
|
|
: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>
|
|
</el-row>
|
|
|
|
<el-row class="el-table-container">
|
|
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
|
v-loading="tabLoading">
|
|
<el-table-column align="center" header-align="center" label="序号" width="100px">
|
|
<template scope="scope">
|
|
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column label="活动名称" prop="name" header-align="center" width="300px"
|
|
align="center">
|
|
<template scope="scope">
|
|
<el-link type="primary" @click="lxy_app.openView(scope.row.id)">
|
|
{{scope.row.name}}
|
|
</el-link>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column label="活动场地" prop="hdcd" header-align="center" show-overflow-tooltip
|
|
align="center"></el-table-column>
|
|
|
|
<el-table-column label="活动时间" prop="hdkssj" header-align="center" sortable
|
|
align="center" width="200px">
|
|
<template scope="scope">
|
|
{{scope.row.hdkssj}} 至 {{scope.row.hdjssj}}
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column label="报名时间" prop="bmsj" header-align="center" sortable
|
|
align="center" width="300px">
|
|
|
|
<template scope="scope">
|
|
{{scope.row.bmkssj}} 至 {{scope.row.bmjzsj}}
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column label="状态" prop="name" header-align="center"
|
|
align="center">
|
|
<template scope="scope">
|
|
<span :class="lxy_app.getStatus(scope.row).class">{{lxy_app.getStatus(scope.row).name}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column label="分工会" prop="unionname" header-align="center"
|
|
align="center" show-overflow-tooltip>
|
|
<template scope="scope">
|
|
<span>({{scope.row.unioncode}}){{scope.row.unionname}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column label="分配名额" prop="number" header-align="center"
|
|
align="center" width="100px">
|
|
<template scope="scope">
|
|
<span style="color: tomato">{{scope.row.number}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="已报人数" prop="remain" header-align="center"
|
|
align="center" width="100px">
|
|
<template scope="scope">
|
|
<span style="color: tomato">{{scope.row.number-scope.row.remain}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="200px">
|
|
<template scope="scope">
|
|
|
|
<!--# if(@shiro.hasRole('sysadmin')){ #-->
|
|
<el-button size="mini" @click="openView(scope.row)" plain>查看
|
|
</el-button>
|
|
<!--# } #-->
|
|
<!--# if(@shiro.hasRole('H04')){ #-->
|
|
<!-- <el-button size="mini" @click="openEdit(scope.row)"-->
|
|
<!-- :disabled="scope.row.number ==scope.row.remain" plain>修改-->
|
|
<!-- </el-button>-->
|
|
<!-- <el-button size="mini" type="primary" @click="openBm(scope.row)"-->
|
|
<!-- :disabled="scope.row.remain<=0" plain>报名-->
|
|
<!-- </el-button>-->
|
|
<el-button size="mini" type="primary" @click="openBm2(scope.row)" plain>报名
|
|
</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"
|
|
:total="pageForm.totalCount">
|
|
</el-pagination>
|
|
</el-row>
|
|
</div>
|
|
</transition>
|
|
|
|
<transition name="el-zoom-in-center">
|
|
<div v-show="v=='bm'" class="transition-item">
|
|
<el-card class="box-card v-box" shadow="never">
|
|
<div slot="header" class="clearfix">
|
|
<el-button icon="el-icon-back" type="text" @click="v='index'" style="font-size: 18px">返回
|
|
</el-button>
|
|
</div>
|
|
<el-row style="padding: 0 15%;" v-loading="loading">
|
|
|
|
<el-steps :active="stepActive" finish-status="success" simple>
|
|
<el-step title="选择人员"></el-step>
|
|
<el-step title="确定名单"></el-step>
|
|
</el-steps>
|
|
|
|
<transition name="el-zoom-in-top">
|
|
<div v-show="stepActive==0" class="transition-box" style="margin-top: 20px;">
|
|
|
|
<el-row class="navbar">
|
|
<div class="btn-group tool-button mt5">
|
|
<el-input v-model="userPageForm.query" placeholder="请输入姓名或工号查询"></el-input>
|
|
</div>
|
|
<div class="btn-group tool-button mt5">
|
|
<el-button type="primary" icon="el-icon-search"
|
|
@click="doUserSearch">
|
|
</el-button>
|
|
</div>
|
|
|
|
<div class="btn-group tool-button mt5">
|
|
<el-checkbox-group v-model="userPageForm.check" @change="checkChange">
|
|
<el-checkbox label="honer">是否获取荣誉</el-checkbox>
|
|
<el-checkbox label="five">五年内未参加</el-checkbox>
|
|
</el-checkbox-group>
|
|
</div>
|
|
|
|
<div class="pull-right offscreen-right mt5">
|
|
<div class="text-primary" style="line-height: 40px">
|
|
{{numData.unionname}} 共有 <span class="text-danger">{{numData.sum}}</span>个名额,
|
|
可选择 <span
|
|
class="text-danger">{{numData.sum - multipleSelection.length}}</span>
|
|
个,
|
|
已选择<span class="text-danger">{{multipleSelection.length}}</span>个。
|
|
</div>
|
|
</div>
|
|
</el-row>
|
|
|
|
<el-row class="">
|
|
<el-table ref="userTable" :key="tabKey"
|
|
@selection-change="handleSelectionChange"
|
|
:data="userData"
|
|
style="width: 100%" row-key="id" v-loading="userTableLoading"
|
|
size="medium"
|
|
@sort-change="userPageOrder">
|
|
<el-table-column
|
|
:reserve-selection="true"
|
|
type="selection"
|
|
width="55">
|
|
</el-table-column>
|
|
|
|
<el-table-column label="工号" prop="loginname" header-align="center"
|
|
align="center"></el-table-column>
|
|
<el-table-column label="姓名" prop="username" header-align="center"
|
|
align="center"></el-table-column>
|
|
<el-table-column label="性别" prop="sex" header-align="center" sortable
|
|
align="center"></el-table-column>
|
|
<el-table-column label="年龄" prop="age" header-align="center" sortable
|
|
align="center"></el-table-column>
|
|
<el-table-column label="联系电话" prop="mobile" header-align="center"
|
|
align="center"></el-table-column>
|
|
</el-table>
|
|
</el-row>
|
|
|
|
<el-row class="el-pagination-container" style="margin-top: 20px">
|
|
<el-pagination
|
|
@size-change="userPageSizeChange"
|
|
@current-change="userPageNumberChange"
|
|
:current-page="userPageForm.pageNumber"
|
|
:page-size="userPageForm.pageSize"
|
|
layout="total, prev, pager, next"
|
|
:total="userPageForm.totalCount">
|
|
</el-pagination>
|
|
</el-row>
|
|
|
|
<div style="float: right;margin: 0px 0">
|
|
<el-button type="primary" @click="next">下一步</el-button>
|
|
</div>
|
|
</div>
|
|
</transition>
|
|
<transition name="el-zoom-in-bottom">
|
|
<div v-show="stepActive==1" class="transition-box" style="margin-top: 20px;">
|
|
<el-table :key="tabKey" :data="multipleSelection" style="width: 100%" row-key="id"
|
|
size="medium">
|
|
|
|
<el-table-column label="工号" prop="loginname" header-align="center"
|
|
align="center"></el-table-column>
|
|
<el-table-column label="姓名" prop="username" header-align="center"
|
|
align="center"></el-table-column>
|
|
<el-table-column label="性别" prop="sex" header-align="center" sortable
|
|
align="center"></el-table-column>
|
|
<el-table-column label="年龄" prop="age" header-align="center" sortable
|
|
align="center"></el-table-column>
|
|
<el-table-column label="联系电话" prop="mobile" header-align="center"
|
|
align="center"></el-table-column>
|
|
</el-table>
|
|
|
|
<div style="float: right;margin: 20px 0">
|
|
<el-button @click="stepActive=0">上一步</el-button>
|
|
<el-button type="primary" @click="doBm">提
|
|
交
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
</transition>
|
|
</el-row>
|
|
</el-card>
|
|
</div>
|
|
</transition>
|
|
|
|
<transition name="el-zoom-in-center">
|
|
<div v-show="v=='view'" class="transition-item">
|
|
<el-row class="header navbar bg-white shadow">
|
|
<div class="btn-group tool-button mt5">
|
|
<el-button icon="el-icon-back" type="text" @click="v='index'" style="font-size: 18px">返回
|
|
</el-button>
|
|
</div>
|
|
</el-row>
|
|
<el-row class="el-table-container">
|
|
<el-table :data="bmTableData" tooltip-effect="dark" row-key="id" ref="multipleTableRy"
|
|
style="width: 100%">
|
|
<el-table-column label="工号" prop="loginname" header-align="center"
|
|
align="center"></el-table-column>
|
|
<el-table-column label="姓名" prop="username" header-align="center"
|
|
align="center"></el-table-column>
|
|
<el-table-column label="性别" prop="sex" header-align="center" sortable
|
|
align="center"></el-table-column>
|
|
<el-table-column label="年龄" prop="age" header-align="center" sortable
|
|
align="center"></el-table-column>
|
|
<el-table-column label="联系电话" prop="mobile" header-align="center"
|
|
align="center"></el-table-column>
|
|
<el-table-column label="报名状态" prop="bmzt" header-align="center" align="center">
|
|
<template scope="scope">
|
|
<span style="color: #E6A23C" v-if="scope.row.bmzt==1">待分工会审核</span>
|
|
<span style="color: #F56C6C" v-if="scope.row.bmzt==2">分工会审核未通过</span>
|
|
<span style="color: #E6A23C" v-if="scope.row.bmzt==3">待校工会审核</span>
|
|
<span style="color: #F56C6C" v-if="scope.row.bmzt==4">校工会审核未通过</span>
|
|
<span style="color: #67C23A" v-if="scope.row.bmzt==5">报名成功</span>
|
|
<span style="color: #E6A23C" v-if="scope.row.bmzt==6">待填写个人资料</span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="120px">
|
|
<template scope="scope">
|
|
<el-button size="mini" type="primary" plain @click="openViewXx(scope.row)">详细信息
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-row>
|
|
</div>
|
|
</transition>
|
|
|
|
<el-dialog top="3%" :visible.sync="viewDialogSh" custom-class="ViewDialogClass"
|
|
:close-on-click-modal="false" width="60%">
|
|
<table class="tabInfo">
|
|
<tr>
|
|
<td class="title" colspan="4"
|
|
style="font-size: 16px;color: rgb(100,100,100);font-weight: bolder;padding: 20px 50px">
|
|
个人信息
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="title">工号</td>
|
|
<td class="content"> {{viewData.loginname}}</td>
|
|
<td class="title">姓名</td>
|
|
<td class="content">{{viewData.username}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="title">职务</td>
|
|
<td class="content"> {{viewData.zw}}</td>
|
|
<td class="title">人事编制</td>
|
|
<td class="content">{{viewData.rsbz}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="title">性别</td>
|
|
<td class="content"> {{viewData.sex}}</td>
|
|
<td class="title">年龄</td>
|
|
<td class="content">{{viewData.age}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="title">所在单位</td>
|
|
<td class="content"> {{viewData.unitname}}</td>
|
|
<td class="title">手机号</td>
|
|
<td class="content">{{viewData.mobile}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="title" colspan="4">曾获荣誉</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="content" colspan="4" style="text-align: left">
|
|
|
|
<el-table :data="viewData.chry" size="mini" style="width: 100%" show-header="false">
|
|
<el-table-column prop="hdsj" label="获得时间" align="center" header-align="center"
|
|
width="250px">
|
|
<template slot-scope="{row}">
|
|
<el-date-picker v-model="row.hdsj" type="date" readonly
|
|
format="yyyy-MM-dd"></el-date-picker>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="shry" label="曾获荣誉" align="center" header-align="center">
|
|
<template slot-scope="{row}">
|
|
<el-input v-model="row.shry" readonly></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column label="附件" align="center" header-align="center" width="120px">
|
|
<template slot-scope="{row}">
|
|
<div class="file-down-span" @click="dd3s.download(row.filepath,row.filename)">
|
|
<i class="el-icon-download"></i>
|
|
</div>
|
|
<el-image fit="cover" v-if="dd3s.isPic(row.filepath)"
|
|
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
|
:src="'${AppFileDomain!}'+row.filepath"
|
|
@click="dd3s.showpic(row.filepath)">
|
|
</el-image>
|
|
<el-image v-else
|
|
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
|
src="***">
|
|
<div slot="error" class="image-slot"
|
|
style="width: 100%;height: 100%; display:flex;align-items: center;text-align: center">
|
|
<span style="font-size: 12px;color: rgb(180,180,180);width: 100%;text-align: center;overflow: hidden;padding: 0 10px;
|
|
text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical">{{row.filename}}</span>
|
|
</div>
|
|
</el-image>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<template v-if="viewData.files&&viewData.files.length">
|
|
<tr>
|
|
<td class="title" colspan="4">身份证复印件</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="content" colspan="4" style="text-align: left">
|
|
<div style="text-align: left;">
|
|
<div v-for="item in viewData.files"
|
|
style="display: inline-block;width: 100px;margin-right:10px">
|
|
<div class="file-down-span" @click="dd3s.download(item.filepath,item.filename)">
|
|
<i class="el-icon-download"></i>
|
|
</div>
|
|
<el-image fit="cover" v-if="dd3s.isPic(item.filepath)"
|
|
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
|
:src="'${AppFileDomain!}'+item.filepath"
|
|
@click="dd3s.showpic(item.filepath)">
|
|
</el-image>
|
|
<el-image v-else
|
|
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
|
|
src="***">
|
|
<div slot="error" class="image-slot"
|
|
style="width: 100%;height: 100%; display:flex;align-items: center;text-align: center">
|
|
<span style="font-size: 12px;color: rgb(180,180,180);width: 100%;text-align: center;overflow: hidden;padding: 0 10px;
|
|
text-overflow: ellipsis;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical">{{item.filename}}</span>
|
|
</div>
|
|
</el-image>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</template>
|
|
</table>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
<transition name="el-zoom-in-center">
|
|
<div v-show="v=='bm2'" class="transition-item">
|
|
<el-card class="box-card v-box" shadow="never">
|
|
<div slot="header" style="display: flex;justify-content: space-between">
|
|
<div>
|
|
<el-button icon="el-icon-back" type="text" @click="v='index'" style="font-size: 18px">返回
|
|
</el-button>
|
|
</div>
|
|
<div>
|
|
<el-button type="text" @click="doSubmit" style="font-size: 18px">提交
|
|
</el-button>
|
|
</div>
|
|
|
|
</div>
|
|
<el-row style="padding: 0 5%;">
|
|
<el-transfer
|
|
:filter-method="filterNotApplyUser"
|
|
filterable
|
|
filter-placeholder="请输入工号或者姓名查询"
|
|
:right-default-checked="rightCheckedData"
|
|
@right-check-change="rightCheckChange"
|
|
@change="transferChange"
|
|
:props="{
|
|
key: 'id',
|
|
label: 'label'
|
|
}"
|
|
:titles="['可报人员名单','当前选择']"
|
|
v-model="CheckNotApplyUser"
|
|
:data="notApplyUser">
|
|
<template #left-footer>
|
|
<el-checkbox-group v-model="userPageForm.check" @change="checkChange">
|
|
<el-checkbox label="honer">是否获取荣誉</el-checkbox>
|
|
<el-checkbox label="five">五年内未参加</el-checkbox>
|
|
</el-checkbox-group>
|
|
</template>
|
|
<template #right-footer>
|
|
<div class="text-right pr20" style="line-height: 40px">
|
|
<el-button size="mini" type="primary" @click="addHasApplyUserTableData">添加</el-button>
|
|
</div>
|
|
</template>
|
|
</el-transfer>
|
|
|
|
<div>
|
|
<el-divider content-position="left">
|
|
工会分配名额<span class="text-info">{{checkTableRowData.number}}</span>人,
|
|
通过审核<span class="text-success">{{checkTableRowData.passnum}}</span>人,
|
|
还可选择<span
|
|
class="text-primary">{{checkTableRowData.number - checkTableRowData.passnum - checkTableRowData.reviewnum}}</span>人
|
|
</el-divider>
|
|
</div>
|
|
|
|
<el-table :data="hasApplyUserTableData" border height="480" size="mini">
|
|
<el-table-column label="序号" type="index" header-align="center" align="center" width="70"></el-table-column>
|
|
<el-table-column label="姓名" prop="username" header-align="center" align="center"></el-table-column>
|
|
<el-table-column label="工号" prop="loginname" header-align="center" align="center"></el-table-column>
|
|
<el-table-column label="单位" prop="unitname" header-align="center" align="center"></el-table-column>
|
|
<el-table-column label="职称" header-align="center" align="center"></el-table-column>
|
|
<el-table-column label="年龄" prop="age" header-align="center" align="center"></el-table-column>
|
|
<el-table-column label="是否审核通过" header-align="center" align="center">
|
|
<template scope="{row}">
|
|
<span v-if="row.bmzt==1" class="text-primary">待分工会审核</span>
|
|
<span v-else-if="row.bmzt==2" class="text-danger">分工会审核不通过</span>
|
|
<span v-else-if="row.bmzt==3" class="text-primary">待校工会审核</span>
|
|
<span v-else-if="row.bmzt==4" class="text-danger">校工会审核不通过</span>
|
|
<span v-else-if="row.bmzt==5" class="text-success">报名成功</span>
|
|
<span v-else class="text-muted">预选</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作" header-align="center">
|
|
<template scope="scope">
|
|
<el-button type="text" v-if="!scope.row.bmzt" @click="hasApplyUserTableData.splice(scope.$index,1)">
|
|
<span class="text-primary">
|
|
移除
|
|
</span>
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
</el-row>
|
|
</el-card>
|
|
</div>
|
|
</transition>
|
|
|
|
</el-row>
|
|
</div>
|
|
<script>
|
|
var E = window.wangEditor
|
|
|
|
const vue = new Vue({
|
|
el: '#app',
|
|
data() {
|
|
return {
|
|
unionname: '',
|
|
viewDialogSh: false,
|
|
bmTableData: [],
|
|
lxyHd: [],
|
|
tabKey: new Date().getTime(),
|
|
stepActive: 0,
|
|
unions: [],
|
|
v: "index",
|
|
userOptions: [],
|
|
loading: false,
|
|
tabLoading: false,
|
|
userLoading: false,
|
|
bmDialog: false,
|
|
formData: {},
|
|
tableData: [],
|
|
pageForm: {
|
|
year: new Date().getFullYear() + "",
|
|
searchName: "",
|
|
searchKeyword: "",
|
|
pageNumber: 1,
|
|
pageSize: 10,
|
|
totalCount: 0,
|
|
pageOrderName: "",
|
|
pageOrderBy: "",
|
|
hdid: ""
|
|
},
|
|
userPageForm: {
|
|
check: [],
|
|
pageNumber: 1,
|
|
pageSize: 10,
|
|
totalCount: 0,
|
|
pageOrderName: "",
|
|
pageOrderBy: ""
|
|
},
|
|
searchForm: {
|
|
userId: "",
|
|
ghId: ""
|
|
},
|
|
userData: [],
|
|
multipleSelection: [],
|
|
userTableLoading: false,
|
|
numData: {},
|
|
viewData: [],
|
|
notApplyUser: [], //未申请的用户
|
|
CheckNotApplyUser: [], //选择的用户
|
|
hasApplyUserTableData: [],
|
|
checkTableRowData: {},
|
|
rightCheckedData:[]
|
|
}
|
|
},
|
|
methods: {
|
|
openBm2(row) {
|
|
this.checkTableRowData = row
|
|
this.tabKey = new Date().getTime()
|
|
this.userPageForm = {
|
|
check: [],
|
|
hdid: row.hdid,
|
|
unionid: row.ghid
|
|
}
|
|
//查询该工会已申请的人员
|
|
$.post(base + "/platform/zgfw/lxy/ghbm/getHasApply", this.userPageForm, (data) => {
|
|
this.hasApplyUserTableData = data.data
|
|
this.v = 'bm2'
|
|
})
|
|
this.getNotApplyUser()
|
|
},
|
|
//添加预选人员
|
|
addHasApplyUserTableData() {
|
|
//const readyApplyUsers = this.notApplyUser.filter(v => this.CheckNotApplyUser.includes(v.id))
|
|
const readyApplyUsers = this.notApplyUser.filter(v => this.rightCheckedData.includes(v.id))
|
|
this.notApplyUser = this.notApplyUser.filter(v => !this.rightCheckedData.includes(v.id))
|
|
readyApplyUsers.map(v => this.hasApplyUserTableData.unshift(v))
|
|
//this.CheckNotApplyUser = []
|
|
},
|
|
|
|
filterNotApplyUser(keys, data) {
|
|
return data.loginname.indexOf(keys) > -1 || data.username.indexOf(keys) > -1
|
|
},
|
|
|
|
//查询该工会未申请的人员
|
|
getNotApplyUser() {
|
|
$.post(base + "/platform/zgfw/lxy/ghbm/getNotApply", this.userPageForm, (data) => {
|
|
data.data.forEach(v => {
|
|
v.label = v.username + '(' + v.sex + '-' + v.loginname + '-' + v.unitname + ')'
|
|
})
|
|
this.notApplyUser = data.data
|
|
this.v = 'bm2'
|
|
})
|
|
},
|
|
//获奖、五年未申请
|
|
checkChange(val) {
|
|
this.userPageForm.pageNumber = 1
|
|
this.getNotApplyUser()
|
|
},
|
|
|
|
transferChange(keyData){
|
|
this.rightCheckedData = this.CheckNotApplyUser
|
|
console.log(keyData)
|
|
},
|
|
|
|
rightCheckChange(checkedData,statusChangeData){
|
|
this.rightCheckedData = checkedData
|
|
},
|
|
|
|
//提交
|
|
doSubmit() {
|
|
const readyUserIds = this.hasApplyUserTableData.filter(v=>!v.bmzt).map(v=>v.id)
|
|
|
|
if(readyUserIds.length===0){
|
|
this.$message.warning('请选择用户之后再提交')
|
|
return
|
|
}
|
|
if(readyUserIds.length>(this.checkTableRowData.number - this.checkTableRowData.passnum)){
|
|
//名额分配数 - 通过数 - 审核中数
|
|
const msg ='您当前选中了'+readyUserIds.length+'个人,最多只能提交'+(this.checkTableRowData.number - this.checkTableRowData.passnum - this.checkTableRowData.reviewnum)+'个人'
|
|
this.$message.warning(msg)
|
|
return
|
|
}
|
|
const loading = this.$loading({
|
|
lock: true,
|
|
text: '数据提交中...',
|
|
spinner: 'el-icon-loading',
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
})
|
|
const params = {
|
|
hdid:this.userPageForm.hdid,
|
|
unionid: this.userPageForm.unionid,
|
|
users:readyUserIds
|
|
}
|
|
$.post('/platform/zgfw/lxy/ghbm/bm', params).then(res=>{
|
|
loading.close()
|
|
if(res.code===0){
|
|
this.v = 'index'
|
|
this.$message.success('提交成功')
|
|
this.pageData()
|
|
}
|
|
})
|
|
|
|
},
|
|
|
|
async getLxyBmInfo(id) {
|
|
const {data} = await $.get(base + "/platform/zgfw/lxy/fghsh/getBmInfo", {id})
|
|
return data
|
|
},
|
|
async openViewXx(row) {
|
|
this.viewData = await this.getLxyBmInfo(row.id)
|
|
this.pageForm.hdid = row.hdid
|
|
this.pageForm.uid = row.uid
|
|
this.viewData.unitname = row.unitname
|
|
|
|
this.viewDialogSh = true
|
|
},
|
|
doBm() {
|
|
const loading = this.$loading({
|
|
lock: true,
|
|
text: '数据提交中...',
|
|
spinner: 'el-icon-loading',
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
});
|
|
|
|
let arr = []
|
|
this.multipleSelection.map(v => {
|
|
arr.push(v.id)
|
|
})
|
|
let url;
|
|
if (this.userPageForm.sign == 0) {
|
|
url = base + "/platform/zgfw/lxy/ghbm/bm";
|
|
} else if (this.userPageForm.sign == 1) {
|
|
url = base + "/platform/zgfw/lxy/ghbm/doEdit";
|
|
}
|
|
|
|
$.post(url, {
|
|
hdid: this.userPageForm.hdid,
|
|
unionid: this.userPageForm.unionid,
|
|
users: JSON.stringify(arr)
|
|
}, (data) => {
|
|
loading.close()
|
|
if (data.code == 0) {
|
|
this.$message({
|
|
message: '提交成功',
|
|
type: 'success'
|
|
});
|
|
this.v = 'index'
|
|
this.pageData()
|
|
} else {
|
|
this.$message({
|
|
message: data.msg,
|
|
type: 'error'
|
|
});
|
|
}
|
|
}, "json");
|
|
},
|
|
next() {
|
|
if (this.multipleSelection.length == 0) {
|
|
this.$message({
|
|
message: '请选择人员!',
|
|
type: 'warning'
|
|
});
|
|
return
|
|
}
|
|
if (this.userPageForm.sign == 0 && this.numData.sum - this.multipleSelection.length < 0) {
|
|
this.$message({
|
|
message: '选择人数已达上限!',
|
|
type: 'warning'
|
|
});
|
|
return
|
|
} else if (this.userPageForm.sign == 1 && this.multipleSelection.length > this.numData.sum) {
|
|
this.$message({
|
|
message: '选择人数已达上限!',
|
|
type: 'warning'
|
|
});
|
|
return
|
|
}
|
|
|
|
this.stepActive = 1
|
|
},
|
|
|
|
doUserSearch() {
|
|
this.userPageForm.pageNumber = 1
|
|
this.userPageData()
|
|
},
|
|
userPageOrder(column) {//按字段排序
|
|
this.userPageForm.pageOrderName = column.prop;
|
|
this.userPageForm.pageOrderBy = column.order;
|
|
this.userPageData();
|
|
},
|
|
userPageNumberChange(val) {//页码更新操作
|
|
this.userPageForm.pageNumber = val;
|
|
this.userPageData();
|
|
},
|
|
userPageSizeChange(val) {//分页大小更新操作
|
|
this.userPageForm.pageSize = val;
|
|
this.userPageData();
|
|
},
|
|
userPageData() {//加载分页数据
|
|
sublime.showLoadingbar();//显示loading
|
|
this.userTableLoading = true
|
|
this.userPageForm.checks = JSON.stringify(this.userPageForm.check)
|
|
$.post(base + "/platform/zgfw/lxy/ghbm/getUser", this.userPageForm, (data) => {
|
|
sublime.closeLoadingbar();//关闭loading
|
|
this.userTableLoading = false
|
|
if (data.code == 0) {
|
|
this.userData = data.data.list;
|
|
this.userPageForm.totalCount = data.data.totalCount;
|
|
this.$nextTick(() => {
|
|
const arr = JSON.parse(JSON.stringify(this.multipleSelection))
|
|
this.userData.forEach(v => {
|
|
if (arr.includes(v.id)) {
|
|
this.$refs.userTable.toggleRowSelection(v)
|
|
}
|
|
})
|
|
})
|
|
} else {
|
|
this.$message({
|
|
message: data.msg,
|
|
type: 'error'
|
|
});
|
|
}
|
|
}, "json");
|
|
},
|
|
|
|
handleSelectionChange(val) {
|
|
this.multipleSelection = val;
|
|
},
|
|
filterMethod(query, item) {
|
|
return item.username.indexOf(query) > -1 || item.loginname.indexOf(query) > -1;
|
|
},
|
|
openView(row) {
|
|
this.unionname = row.unionname
|
|
this.pageForm.hdid = row.hdid
|
|
this.pageForm.ghid = row.ghid
|
|
this.v = "view"
|
|
$.post(base + "/platform/zgfw/lxy/ghbm/findBm", {ghId: row.ghid, hdId: row.hdid}, (data) => {
|
|
sublime.closeLoadingbar();
|
|
this.tabLoading = false
|
|
if (data.code == 0) {
|
|
this.bmTableData = data.data;
|
|
} else {
|
|
this.$message({
|
|
message: data.msg,
|
|
type: 'error'
|
|
});
|
|
}
|
|
}, "json");
|
|
},
|
|
openBm(row) {
|
|
this.tabKey = new Date().getTime()
|
|
this.stepActive = 0
|
|
this.userPageForm = {
|
|
sign: 0,
|
|
check: [],
|
|
hdid: row.hdid,
|
|
unionid: row.ghid,
|
|
pageNumber: 1,
|
|
pageSize: 10,
|
|
totalCount: 0,
|
|
pageOrderName: "",
|
|
pageOrderBy: ""
|
|
}
|
|
$.post(base + "/platform/zgfw/lxy/ghbm/getNumberData", this.userPageForm, (data) => {
|
|
this.numData = data.data
|
|
this.v = 'bm'
|
|
this.multipleSelection = []
|
|
this.userData = []
|
|
this.userPageData()
|
|
})
|
|
},
|
|
openEdit(row) {
|
|
this.tabKey = new Date().getTime()
|
|
this.stepActive = 0
|
|
this.userPageForm = {
|
|
sign: 1,
|
|
check: [],
|
|
hdid: row.hdid,
|
|
unionid: row.ghid,
|
|
pageNumber: 1,
|
|
pageSize: 10,
|
|
totalCount: 0,
|
|
pageOrderName: "",
|
|
pageOrderBy: ""
|
|
}
|
|
$.post(base + "/platform/zgfw/lxy/ghbm/getNumberData", this.userPageForm, (data) => {
|
|
this.numData = data.data
|
|
this.multipleSelection = data.data.multiple.map(v => {
|
|
return v.id
|
|
})
|
|
this.userData = []
|
|
this.v = 'bm'
|
|
|
|
this.userPageData()
|
|
})
|
|
},
|
|
|
|
doSearch() {
|
|
this.pageForm.pageNumber = 1
|
|
this.pageData()
|
|
},
|
|
pageOrder(column) {//按字段排序
|
|
this.pageForm.pageOrderName = column.prop;
|
|
this.pageForm.pageOrderBy = column.order;
|
|
this.pageData();
|
|
},
|
|
pageNumberChange(val) {//页码更新操作
|
|
this.pageForm.pageNumber = val;
|
|
this.pageData();
|
|
},
|
|
pageSizeChange(val) {//分页大小更新操作
|
|
this.pageForm.pageSize = val;
|
|
this.pageData();
|
|
},
|
|
pageData() {
|
|
sublime.showLoadingbar();
|
|
this.tabLoading = true
|
|
$.post(base + "/platform/zgfw/lxy/ghbm/pageData", this.pageForm, (data) => {
|
|
sublime.closeLoadingbar();
|
|
this.tabLoading = false
|
|
if (data.code == 0) {
|
|
this.tableData = data.data.list;
|
|
this.pageForm.totalCount = data.data.totalCount;
|
|
} else {
|
|
this.$message({
|
|
message: data.msg,
|
|
type: 'error'
|
|
});
|
|
}
|
|
}, "json");
|
|
},
|
|
},
|
|
async created() {
|
|
this.unions = await getUnions()
|
|
this.lxyHd = await getNowLxyHd()
|
|
this.pageForm.hdid = this.lxyHd[0].id
|
|
this.pageData();
|
|
}
|
|
})
|
|
</script>
|
|
<!--#layout("/platform/zgfw/lxy/dialogView.html"){}#-->
|
|
<!--#
|
|
}
|
|
#--> |