first commit

This commit is contained in:
2026-09-08 19:49:21 +08:00
commit ebffbab428
7320 changed files with 1477614 additions and 0 deletions
@@ -0,0 +1,357 @@
<!--#
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;
}
</style>
<div id="app" v-cloak>
<el-row class="header navbar bg-white shadow">
<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-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy"
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>
</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="username" header-align="center" align="center"></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.hdid)">
{{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">
<template scope="scope">
{{scope.row.hdkssj}} 至 {{scope.row.hdjssj}}
</template>
</el-table-column>
<el-table-column label="报名截止时间" prop="bmjzsj" header-align="center" sortable
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==6">待填写报名资料</span>
<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>
</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" @click="openSh(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>
<el-dialog title="分工会审核" 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.ryfj,row.filename)">
<i class="el-icon-download"></i>
</div>
<el-image fit="cover" v-if="dd3s.isPic(row.ryfj)"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
:src="'${AppFileDomain!}'+row.ryfj" @click="dd3s.showpic(row.ryfj)">
</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.ryfj}}</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>
<span slot="footer" class="dialog-footer">
<el-button @click="viewDialogSh = false" plain>关 闭</el-button>
<el-button type="danger" @click="sh(2)" plain>不通过</el-button>
<el-button type="success" @click="sh(3)" plain>通 过</el-button>
</span>
</el-dialog>
</div>
<script>
var vue = new Vue({
el: '#app',
data() {
return {
lxyHd: [],
viewDialogSh: false,
loading: false,
tabLoading: false,
showGh: true,
viewData: {},
tableData: [],
bmTableData: [],
pageForm: {
searchName: "name",
searchKeyword: "",
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: "",
hdid: ""
},
}
},
methods: {
async getLxyBmInfo(id) {
const {data} = await $.get(base + "/platform/zgfw/lxy/fghsh/getBmInfo", {id})
return data
},
async openSh(row) {
this.viewData = await this.getLxyBmInfo(row.id)
console.log(this.viewData)
this.pageForm.hdid = row.hdid
this.pageForm.uid = row.uid
this.viewData.unitname = row.unitname
this.viewDialogSh = true
},
sh(zt) {
const loading = this.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
$.post(base + "/platform/zgfw/lxy/fghsh/sh", {
hdid: this.pageForm.hdid,
uid: this.pageForm.uid,
bmzt: zt,
}, (data) => {
loading.close()
if (data.code == 0) {
this.$message({
message: '提交成功',
type: 'success'
});
this.viewDialogSh = false
this.pageData()
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
doSearch() {
this.tabKey = new Date().getTime()
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/fghsh/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.lxyHd = await getNowLxyHd()
this.pageData();
}
})
</script>
<!--#layout("/platform/zgfw/lxy/dialogView.html"){}#-->
<!--#
}
#-->
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,820 @@
<!--#
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;
}
</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-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-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy"
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>
</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="username" header-align="center"
align="center"></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.hdid)">
{{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">
<template scope="scope">
{{scope.row.hdkssj}} 至 {{scope.row.hdjssj}}
</template>
</el-table-column>
<el-table-column label="报名截止时间" prop="bmjzsj" header-align="center" sortable
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==6">待填写报名资料</span>
<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>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="240px">
<template scope="scope">
<el-button :disabled="scope.row.bmzt==6" size="mini"
@click="openEdit(scope.row)" plain>
修改
</el-button>
<el-button :disabled="scope.row.bmzt!=6" size="mini" type="primary"
@click="openBm(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'||v=='edit'" 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-card class="box-card" style="margin-top: 50px;padding: 0 200px">
<el-divider content-position="left"><span style="color: rgb(121, 187, 255)">请填写以下个人信息</span>
</el-divider>
<el-form :model="formData" ref="bmForm" :rules="formRules" label-width="120px"
style="padding: 0 30px">
<el-form-item label="工号" prop="loginname">
<el-input readonly v-model="formData.loginname"></el-input>
</el-form-item>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="姓名" prop="username">
<el-input v-model="formData.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="性别" prop="sex">
<el-input v-model="formData.sex"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="民族" prop="mz">
<el-input v-model="formData.mz"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="年龄" prop="age">
<el-input v-model="formData.age"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="身份证" prop="idcard">
<el-input v-model="formData.idcard"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="手机号" prop="mobile">
<el-input v-model="formData.mobile"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="人事编制" prop="rsbz">
<el-input v-model="formData.rsbz"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="职(务)称" prop="zw">
<el-input v-model="formData.zw"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="所获荣誉" prop="chry">
<el-form-item label-width="0" label="">
<el-button style="float: right;margin-bottom: 10px" icon="el-icon-plus" size="mini"
@click="formData.chry.push({hdsj:'',shry:'',ryfj:''});ryfj.push([])">
添加
</el-button>
<el-table :data="formData.chry" border
size="mini" style="width: 100%">
<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"
placeholder="选择日期" 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" placeholder="所获荣誉"></el-input>
</template>
</el-table-column>
<el-table-column prop="ryfj" label="荣誉附件" align="center" header-align="center"
width="200px">
<template slot-scope="{$index,row}">
<tab-upload :resfile.sync="row.ryfj"
:filex="row.ryfj?'${AppFileDomain!}'+row.ryfj:''"
:allowfiles="['png','jpg','jpeg','svg','doc','docx','xls']"
maxnum="1"></tab-upload>
<!-- <table-upload :files.sync="row.ryfj"></table-upload>-->
<!-- <el-upload-->
<!-- class="upload-demo"-->
<!-- ref="upload"-->
<!-- :on-change="(file,fileList)=>{-->
<!-- ryfjHandleChange($index,file,fileList)-->
<!-- }"-->
<!-- :on-remove="(file,fileList)=>{-->
<!-- ryfjHandleRemove($index,file,fileList)-->
<!-- }"-->
<!-- limit="1"-->
<!-- :auto-upload="false">-->
<!-- <el-button v-show="!row.filename" slot="trigger" size="small">-->
<!-- 选取文件-->
<!-- </el-button>-->
<!-- </el-upload>-->
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" header-align="center"
width="80px"
fixed="right">
<template slot-scope="scope">
<el-button type="danger" icon="el-icon-delete" circle
:disabled="formData.chry.length==0"
@click="delNotesItem(scope.$index)"></el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-form-item>
<el-form-item prop="accessory" label="身份证复印件">
<el-upload
name="file"
ref="upload"
action="**"
:on-remove="handleRemove"
:on-change="handleChange"
:auto-upload="false"
limit="1"
:file-list="fileList"
list-type="picture">
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button @click="v='index'">取 消</el-button>
<el-button type="primary" @click="doBm">确 定</el-button>
</div>
</el-card>
</div>
</transition>
<!-- <transition name="el-zoom-in-center">-->
<!-- <div v-show="v=='edit'" 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-card class="box-card" style="margin-top: 50px;padding: 0 200px">-->
<!-- <el-divider content-position="left"><span style="color: rgb(121, 187, 255)">请填写以下个人信息</span>-->
<!-- </el-divider>-->
<!-- <el-form :model="formData" ref="bmForm" :rules="formRules" label-width="120px"-->
<!-- style="padding: 0 30px">-->
<!-- <el-form-item label="工号" prop="loginname">-->
<!-- <el-input readonly v-model="formData.loginname"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-row :gutter="20">-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="姓名" prop="username">-->
<!-- <el-input v-model="formData.username"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="性别" prop="sex">-->
<!-- <el-input v-model="formData.sex"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row :gutter="20">-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="年龄" prop="age">-->
<!-- <el-input v-model="formData.age"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="手机号" prop="mobile">-->
<!-- <el-input v-model="formData.mobile"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row :gutter="20">-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="人事编制" prop="rsbz">-->
<!-- <el-input v-model="formData.rsbz"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="职(务)称" prop="zw">-->
<!-- <el-input v-model="formData.zw"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-form-item label="所获荣誉" prop="chry">-->
<!-- <el-form-item label-width="0" label="">-->
<!-- <el-button style="float: right;margin-bottom: 10px" icon="el-icon-plus" size="mini"-->
<!-- @click="formData.chry.push({hdsj:'',shry:'',ryfj:''});ryfj.push([])">-->
<!-- 添加-->
<!-- </el-button>-->
<!-- <el-table :data="formData.chry" border size="mini" style="width: 100%">-->
<!-- <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"-->
<!-- placeholder="选择日期" 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" placeholder="所获荣誉"></el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="ryfj" label="荣誉附件" align="center" header-align="center"-->
<!-- width="200px">-->
<!-- <template slot-scope="{$index,row}">-->
<!-- <tab-upload :resfile.sync="row.ryfj"-->
<!-- :filex="row.ryfj?'${AppFileDomain!}'+row.ryfj:''"-->
<!-- :allowfiles="['png','jpg','jpeg','svg','doc','docx','xls']"-->
<!-- maxnum="1"></tab-upload>-->
<!-- &lt;!&ndash; <el-upload&ndash;&gt;-->
<!-- &lt;!&ndash; class="upload-demo"&ndash;&gt;-->
<!-- &lt;!&ndash; ref="upload"&ndash;&gt;-->
<!-- &lt;!&ndash; :on-change="(file,fileList)=>{&ndash;&gt;-->
<!-- &lt;!&ndash; ryfjHandleChange($index,file,fileList)&ndash;&gt;-->
<!-- &lt;!&ndash; }"&ndash;&gt;-->
<!-- &lt;!&ndash; :on-remove="(file,fileList)=>{&ndash;&gt;-->
<!-- &lt;!&ndash; ryfjHandleRemove($index,file,fileList)&ndash;&gt;-->
<!-- &lt;!&ndash; }"&ndash;&gt;-->
<!-- &lt;!&ndash; limit="1"&ndash;&gt;-->
<!-- &lt;!&ndash; :file-list="ryfj[$index]"&ndash;&gt;-->
<!-- &lt;!&ndash; :auto-upload="false">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-button v-show="!row.filename" slot="trigger" size="small">&ndash;&gt;-->
<!-- &lt;!&ndash; 选取文件&ndash;&gt;-->
<!-- &lt;!&ndash; </el-button>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-upload>&ndash;&gt;-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" fixed="right" align="center" header-align="center"-->
<!-- width="80px"-->
<!-- fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button type="danger" icon="el-icon-delete" circle-->
<!-- :disabled="formData.chry.length==0"-->
<!-- @click="delNotesItem(scope.$index)"></el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </el-form-item>-->
<!-- </el-form-item>-->
<!-- <el-form-item prop="accessory" label="身份证复印件">-->
<!-- <el-upload-->
<!-- name="file"-->
<!-- ref="upload"-->
<!-- action="**"-->
<!-- :on-remove="handleRemove"-->
<!-- :on-change="handleChange"-->
<!-- :auto-upload="false"-->
<!-- limit="1"-->
<!-- :file-list="fileList"-->
<!-- list-type="picture">-->
<!-- <el-button size="small" type="primary">选择文件</el-button>-->
<!-- </el-upload>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div style="float: right;margin: 20px 0">-->
<!-- <el-button @click="v='index'">取 消</el-button>-->
<!-- <el-button type="primary" @click="doEdit">确 定</el-button>-->
<!-- </div>-->
<!-- </el-card>-->
<!-- </div>-->
<!-- </transition>-->
</el-row>
</div>
<script>
var vue = new Vue({
el: '#app',
data() {
return {
lxyHd: [],
sign: 0,
userData: [],
unions: [],
userOptions: [],
loading: false,
tabLoading: false,
userLoading: false,
v: "index",
formData: {},
tableData: [],
pageForm: {
searchName: "name",
searchKeyword: "",
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: "",
ghid: ""
},
userPageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: ""
},
searchForm: {
userId: "",
ghId: ""
},
userData: [],
fileList: [],
delFiles: [],
ryfj: [],
hdid: "",
uid: "",
formRules: {
loginname: [{required: false, message: '必填', trigger: ['blur', 'change']}],
username: [{required: true, message: '必填', trigger: ['blur', 'change']}],
age: [{required: true, message: '必填', trigger: ['blur', 'change']}],
sex: [{required: true, message: '必填', trigger: ['blur', 'change']}],
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
}
}
},
components: {
'tab-upload': httpVueLoader('/components/plugins/TabUpload.vue'),
'table-upload': httpVueLoader('/components/plugins/TableUpload.vue')
},
methods: {
async getLxyGrInfo(id) {
const {data} = await $.get(base + "/platform/zgfw/lxy/grbm/findOne", {id})
return data
},
delNotesItem(index) {
if (this.formData.chry[index].filepath) {
$.post('/platform/Common/deleteFile', {filepath: this.formData.chry[index].filepath})
}
// this.ryfj[index] = []
// this.ryfj.splice(index, 1)
this.formData.chry[index].ryfj = ''
this.formData.chry.splice(index, 1)
},
async openEdit(row) {
this.delFiles = []
this.fileList = []
this.ryfj = []
let data = await this.getLxyGrInfo(row.gid)
data.chry.forEach(v => {
if (v.filepath) {
this.ryfj.push([{
status: 'success',
name: v.filename,
url: '${AppFileDomain!}' + v.filepath,
}])
} else {
this.ryfj.push([])
}
})
data.files.forEach(v => {
this.fileList.push({
id: v.id,
name: v.filename,
url: '${AppFileDomain!}' + v.filepath,
status: "success"
})
})
this.formData = data
this.v = "edit"
},
// doEdit() {
// this.$refs["bmForm"].validate((valid) => {
// if (valid) {
// const loading = this.$loading({
// lock: true,
// text: '数据提交中...',
// spinner: 'el-icon-loading',
// background: 'rgba(0, 0, 0, 0.7)'
// });
//
// let formData = new FormData()
//
// this.fileList.forEach(function (val) {
// if (val.status === 'ready') {
// formData.append("fileList", val.raw, val.raw.name);
// }
// })
//
// formData.append("delFiles", this.delFiles)
//
// this.formData.chry = JSON.stringify(this.formData.chry)
//
// for (let key in this.formData) {
// if (key != "files") {
// formData.append(key, this.formData[key] ? this.formData[key] : '');
// }
// }
//
// $.ajax({
// url: "/platform/zgfw/lxy/grbm/doEdit",
// type: "post",
// data: formData,
// processData: false,
// contentType: false,
// success: (data) => {
// this.v = "index"
// loading.close()
// if (data.code === 0) {
// this.$message({
// message: data.msg,
// type: 'success'
// });
//
// this.pageData();
// } else {
// this.$message({
// message: data.msg,
// type: 'error'
// });
// }
// },
// error: data => {
// this.v = "index"
// loading.close()
// this.$message({
// message: data.msg,
// type: 'error'
// });
// }
// });
// }
// })
// },
openBm(row) {
this.fileList = []
this.delFiles = []
this.formData = {
loginname: row.loginname,
username: row.username,
rsbz: row.rsbz,
zw: row.zw,
sex: row.sex,
age: row.age,
mobile: row.mobile,
mz: row.mz,
idcard: row.idcard,
ghid: row.unionid,
chry: [],
hdid: row.hdid,
userid: row.uid
}
this.v = "bm"
},
doBm() {
this.$refs["bmForm"].validate((valid) => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0,0,0,0.7)'
});
let formData = new FormData()
this.fileList.forEach(function (val) {
formData.append("fileList", val.raw, val.raw.name);
})
formData.append("delFiles", this.delFiles)
this.formData.chry = JSON.stringify(this.formData.chry)
for (let key in this.formData) {
formData.append(key, this.formData[key] ? this.formData[key] : '');
}
console.log(this.v)
let url
if (this.v == "bm") {
url = "/platform/zgfw/lxy/grbm/doAdd"
} else if (this.v == "edit") {
url = "/platform/zgfw/lxy/grbm/doEdit"
}
$.ajax({
url: url,
type: "post",
data: formData,
processData: false,
contentType: false,
success: (data) => {
this.v = "index"
loading.close()
if (data.code === 0) {
this.$message({
message: data.msg,
type: 'success'
});
this.pageData();
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
},
error: data => {
this.v = "index"
loading.close()
this.$message({
message: data.msg,
type: 'error'
});
}
});
}
})
},
handleRemove(file, fileList) {
this.fileList = fileList;
if (file.status === "success") {
this.delFiles.push(file.id);
}
},
handleChange(file, fileList) {
const delFile = () => {
for (let i = 0; i < fileList.length; i++) {
if (file === fileList[i]) {
fileList.splice(i, 1);
}
}
}
if (this.size === 0) {
this.$message.warning("您选择的是空文件!");
delFile()
}
if (!uploadFileType.includes(file.name.split('.')[1])) {
this.$message.warning("文件格式不支持!");
delFile()
}
this.fileList = fileList;
},
ryfjHandleRemove(index, file, fileList) {
if (this.formData.chry[index].filepath) {
$.post('/platform/Common/deleteFile', {filepath: this.formData.chry[index].filepath})
}
this.$set(this.formData.chry[index], 'filename', '')
this.$set(this.formData.chry[index], 'filepath', '')
},
ryfjHandleChange(index, file, fileList) {
const delFile = () => {
for (let i = 0; i < fileList.length; i++) {
if (file === fileList[i]) {
fileList.splice(i, 1);
}
}
}
if (this.size === 0) {
this.$message.warning("您选择的是空文件!");
delFile()
}
if (!uploadFileType.includes(file.name.split('.')[1])) {
this.$message.warning("文件格式不支持!");
delFile()
}
let formData = new FormData()
formData.append("file", file.raw, file.raw.name);
this.$set(this.formData.chry[index], 'filename', file.name)
this.$set(this.formData.chry[index], 'filepath', '')
$.ajax({
url: "/platform/Common/uploadFile",
type: "post",
data: formData,
processData: false,
contentType: false,
success: (res) => {
const {code, data} = res
if (code == 0) {
this.$set(this.formData.chry[index], 'filename', data.filename)
this.$set(this.formData.chry[index], 'filepath', data.filepath)
}
},
error: data => {
this.$set(this.formData.chry[index], 'filename', '')
this.$set(this.formData.chry[index], 'filepath', '')
}
});
},
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();//显示loading
this.tabLoading = true
$.post(base + "/platform/zgfw/lxy/grbm/pageData", this.pageForm, (data) => {
sublime.closeLoadingbar();//关闭loading
this.tabLoading = false
if (data.code == 0) {
this.tableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
},
async created() {
this.unions = await getUnions()
this.lxyHd = await getNowLxyHd()
this.pageData();
}
})
</script>
<!--#layout("/platform/zgfw/lxy/dialogView.html"){}#-->
<!--#
}
#-->
@@ -0,0 +1,868 @@
<!--#
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;
}
.d-select {
width: 300px;
}
.hdnr .el-form-item__label:before {
content: '*';
color: #F56C6C;
margin-right: 4px;
}
</style>
<div id="app" v-cloak>
<guava>
<el-row class="transition-row">
<transition name="el-zoom-in-center">
<div v-show="v=='index'" class="transition-item">
<el-card shadow="never">
<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 class="d-select" v-model="pageForm.pastQuota" filterable clearable
width="300px"
placeholder="请选择活动">
<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-select class="d-select" v-model="pageForm.hdcd" filterable clearable
width="300px"
placeholder="请选择场地">
<el-option
v-for="item in lxyHdCd"
:key="item.id"
:label="item.hdcd"
: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 icon="el-icon-plus" @click="openAdd">创建活动</el-button>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<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">
<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="330px">
<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 align="center" header-align="center" label="操作" fixed="right"
width="250px">
<template scope="scope">
<!-- <el-button size="mini" @click="openView(scope.row.id)">查看</el-button>-->
<el-button size="mini" type="primary" @click="openEdit(scope.row.id)" plain>编辑
</el-button>
<el-button size="mini" type="danger" @click="doDelete(scope.row.id)" plain>删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-row class="el-pagination-container">
<el-pagination
@size-change="pageSizeChange"
@current-change="pageNumberChange"
:current-page="pageForm.pageNumber"
:page-sizes="[10, 20, 30, 50]"
:page-size="pageForm.pageSize"
layout="total, sizes, prev, pager, next"
:total="pageForm.totalCount">
</el-pagination>
</el-row>
</el-card>
</div>
</transition>
<!-- 新增 -->
<transition name="el-zoom-in-center">
<div v-show="v=='add'" 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 10%;" v-loading="loading">
<el-steps :active="stepActive" simple finish-status="success">
<el-step title="活动信息" description="">
</el-step>
<el-step title="名额分配" description="">
</el-step>
</el-steps>
<transition name="el-zoom-in-top">
<div v-show="stepActive==0" class="transition-box" style="margin-top: 20px;">
<el-form :model="formData" ref="form" :rules="formRules"
label-width="120px">
<el-form-item label="填写活动信息&emsp;" label-width="135px" class="view-header">
</el-form-item>
<el-form-item label="活动名称" prop="name">
<el-input type="text" v-model="formData.name" maxlength="100"
placeholder="请填写活动名称"></el-input>
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="报名时间" label-width="120px" prop="bmsj">
<el-date-picker
style="width: 100%"
v-model="formData.bmsj"
type="datetimerange"
align="right"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动时间" prop="hdsj">
<el-date-picker
style="width: 100%"
v-model="formData.hdsj"
type="daterange"
align="right"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="活动场地" prop="hdcd">
<el-input type="text" v-model="formData.hdcd" maxlength="100"
placeholder="请填写活动场地"></el-input>
</el-form-item>
<el-form-item label="报名条件" prop="hdzysx">
<el-input type="textarea" rows="4" v-model="formData.hdzysx" maxlength="500"
placeholder="请填写报名条件"></el-input>
</el-form-item>
<div class="hdnr">
<el-form-item label="具体要求" prop="hdnr">
<div id="lrEditor"></div>
</el-form-item>
</div>
<el-form-item prop="accessory" label="附件上传">
<el-upload
name="file"
ref="upload"
action="**"
:on-remove="handleRemove"
:on-change="handleChange"
:auto-upload="false"
limit="5"
:file-list="fileList">
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 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;">
<div class="pull-right offscreen-right mt5">
<span style="color:#409EFF">沿用之前活动名额&nbsp;&nbsp;</span>
<el-select class="d-select" v-model="pastQuota" filterable clearable
width="300px"
placeholder="请选择活动" @change="mefpChange">
<el-option
v-for="item in lxyHd"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
<el-table :data="unions_" size="medium" height="70vh">
<el-table-column align="center" type="index" header-align="center"
label="序号"></el-table-column>
<el-table-column label="院级工会" prop="unionname" sortable>
<template scope="{row}">
{{isDisPlayCode?''+row.unioncode+'':null}}{{row.unionname}}
</template>
</el-table-column>
<el-table-column label="会员人数" prop="membercount" sortable></el-table-column>
<el-table-column label="名额" prop="number" header-align="center" width="200px"
align="center">
<template scope="scope">
<el-input-number v-model="scope.row.number" placeholder="请填写名额数"
controls-position="right" :min="0"
:max="1000"></el-input-number>
</template>
</el-table-column>
</el-table>
<div style="float: right;margin: 20px 0">
<el-button @click="stepActive=0">上一步</el-button>
<el-button type="primary" :disabled="subDis" @click="doAdd()">
</el-button>
</div>
</div>
</transition>
</el-row>
</el-card>
</div>
</transition>
<!-- 编辑 -->
<transition name="el-zoom-in-center">
<div v-show="v=='edit'" 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 10%;" v-loading="loading">
<el-tabs v-model="tabs_active" stretch>
<el-tab-pane label="活动信息" name="1">
<el-form :model="formData" ref="form" :rules="formRules"
label-width="120px">
<vi-title title="修改活动信息"></vi-title>
<el-form-item label="活动名称" prop="name">
<el-input type="text" v-model="formData.name" maxlength="100"
placeholder="请填写活动名称"></el-input>
</el-form-item>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="报名时间" label-width="120px" prop="bmsj">
<el-date-picker
style="width: 100%"
v-model="formData.bmsj"
type="datetimerange"
align="right"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动时间" prop="hdsj">
<el-date-picker
style="width: 100%"
v-model="formData.hdsj"
type="daterange"
align="right"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="活动场地" prop="hdcd">
<el-input type="text" v-model="formData.hdcd" maxlength="100"
placeholder="请填写活动场地"></el-input>
</el-form-item>
<el-form-item label="报名条件" prop="hdzysx">
<el-input type="textarea" rows="4" v-model="formData.hdzysx" maxlength="500"
placeholder="请填写报名条件"></el-input>
</el-form-item>
<el-form-item label="活动内容" prop="hdnr">
<div v-if="v=='edit'" id="lrEditor"></div>
</el-form-item>
<el-form-item prop="accessory" label="附件上传">
<el-upload
name="file"
ref="upload"
action="**"
:on-remove="handleRemove"
:on-change="handleChange"
:auto-upload="false"
limit="5"
:file-list="fileList">
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button type="primary" :disabled="subDis" @click="doEdit()">修 改</el-button>
</div>
</el-tab-pane>
<el-tab-pane label="名额分配" name="2">
<el-form label-width="120px">
<vi-title title="修改名额分配"></vi-title>
<div class="pull-right offscreen-right mt5">
<span style="color:#409EFF">沿用之前活动名额&nbsp;&nbsp;</span>
<el-select class="d-select" v-model="pastQuota" filterable clearable
width="300px"
placeholder="请选择活动" @change="mefpChange">
<el-option
v-for="item in lxyHd"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
</el-form>
<el-table :data="unions_" size="medium" height="70vh">
<el-table-column align="center" type="index" header-align="center"
label="序号"></el-table-column>
<el-table-column label="院级工会" prop="unionname" sortable>
<template scope="{row}">
{{isDisPlayCode?''+row.unioncode+'':null}}{{row.unionname}}
</template>
</el-table-column>
<el-table-column label="会员人数" prop="membercount" sortable></el-table-column>
<el-table-column label="名额" prop="number" header-align="center" width="200px"
align="center">
<template scope="scope">
<el-input-number v-model="scope.row.number" placeholder="请填写名额数"
controls-position="right" :min="0"
:max="1000"></el-input-number>
</template>
</el-table-column>
</el-table>
<div style="float: right;margin: 20px 0">
<el-button type="primary" :disabled="subDis" @click="doEditMefp">提 交</el-button>
</div>
</el-tab-pane>
</el-tabs>
</el-row>
</el-card>
</div>
</transition>
</el-row>
</guava>
</div>
<script>
let E = window.wangEditor
let lrEditor = {}
var vue = new Vue({
el: '#app',
data() {
let validHdnr = (rule, value, callback) => {
if (!this.formData.hdnr || !dd3s.html2txt(this.formData.hdnr)) {
callback(new Error('请填写活动内容'));
} else {
callback();
}
};
return {
pastQuota: "",
tabs_active: '1',
unions: [],
unions_: [],
lxyHd: [],
lxyHdCd: [],
stepActive: 0,
v: "index",
userOptions: [],
addDialogVisible: false,
editDialogVisible: false,
loading: false,
tabLoading: false,
userLoading: false,
formData: {},
tableData: [],
pageForm: {
year: new Date().getFullYear() + "",
searchName: "id",
searchKeyword: "",
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: ""
},
formRules: {
name: [{required: true, message: '请填写活动名称', trigger: ['blur', 'change']}],
bmsj: [{required: true, message: '请选择报名时间', trigger: ['blur', 'change']}],
hdsj: [{required: true, message: '请选择活动时间', trigger: ['blur', 'change']}],
hdcd: [{required: true, message: '请填写活动场地', trigger: ['blur', 'change']}],
hdzysx: [{required: true, message: '请填写活动场地', trigger: ['blur', 'change']}],
hdnr: [{validator: validHdnr, trigger: ['blur', 'change']}],
},
subDis: false,
fileList: [],
delFiles: [],
}
},
methods: {
mefpChange() {
if (this.pastQuota === '') {
this.unions_ = this.unions.map(v => {
const o = {
ghid: v.id,
unionname: v.unionname,
number: 0,
unioncode: v.unioncode,
membercount: v.membercount
}
return o
})
return
}
$.post(base + "/platform/zgfw/lxy/hd/getPastQuota", {pastQuota: this.pastQuota}, res => {
this.unions_ = res.data
})
},
doEditMefp() {
const loading = this.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
$.post(base + "/platform/zgfw/lxy/hd/doEditMefp", {mefp: JSON.stringify(this.unions_)}, (data) => {
loading.close()
if (data.code == 0) {
this.v = 'index'
this.$message({
message: '修改成功',
type: 'success'
});
this.pageData()
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
async next() {
if (!this.formData.hdnr || !dd3s.html2txt(this.formData.hdnr)) {
this.$message.warning("请填写具体要求")
}
this.$refs["form"].validate((valid) => {
if (valid) {
if (moment(this.formData.hdsj[0].valueOf()) < moment(this.formData.bmsj[1]).valueOf()) {
this.$message.warning('报名截止时间必须早于活动时间!');
return
}
this.stepActive = 1
}
})
this.lxyHd = await getLxyHd()
},
handleRemove(file, fileList) {
this.fileList = fileList;
if (file.status === "success") {
this.delFiles.push(file.id);
}
},
handleChange(file, fileList) {
const delFile = () => {
for (let i = 0; i < fileList.length; i++) {
if (file === fileList[i]) {
fileList.splice(i, 1);
}
}
}
if (this.size === 0) {
this.$message.warning("您选择的是空文件!");
delFile()
}
if (!uploadFileType.includes(file.name.split('.')[1])) {
this.$message.warning("文件格式不支持!");
delFile()
}
this.fileList = fileList;
},
async userRemoteMethod(query) {
if (query) {
this.userLoading = true
const arr = await searchUser(query)
this.userOptions = this.userOptions.filter(v => {
return v.id == this.formData.hdfzr
}).concat(arr.filter(v => {
return v.id != this.formData.hdfzr
}));
this.userLoading = false
}
},
doEdit() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.formData.bmkssj = this.formData.bmsj[0]
this.formData.bmjzsj = this.formData.bmsj[1]
this.formData.hdkssj = this.formData.hdsj[0]
this.formData.hdjssj = this.formData.hdsj[1]
let formdata = new FormData();
for (let key in this.formData) {
if (key != 'mefp') {
formdata.append(key, this.formData[key] ? this.formData[key] : '');
}
}
this.fileList.forEach(function (val) {
if (val.status === 'ready') {
formdata.append("files", val.raw, val.raw.name);
}
});
formdata.append("delFiles", this.delFiles)
this.subDis = true
const loading = this.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
$.ajax({
url: "/platform/zgfw/lxy/hd/doEdit",
type: "post",
data: formdata,
processData: false,
contentType: false,
success: (data) => {
this.subDis = false
loading.close()
if (data.code === 0) {
this.v = 'index'
this.$message({
message: data.msg,
type: 'success'
});
this.pageData();
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
},
error: data => {
this.subDis = false
loading.close()
this.$message({
message: data.msg,
type: 'error'
});
}
});
}
});
},
openEdit(id) {
this.pastQuota = ""
this.fileList = []
this.delFiles = []
this.formData = {}
this.stepActive = 0
this.v = 'edit'
this.tabs_active = '1'
this.loading = true
$.get(base + "/platform/zgfw/lxy/common/getHdInfo", {id}, (data) => {
if (data.code == 0) {
data.data.hdsj = [data.data.hdkssj, data.data.hdjssj]
data.data.bmsj = [data.data.bmkssj, data.data.bmjzsj]
this.unions_ = data.data.mefp
this.formData = data.data
//files
data.data.files.forEach(v => {
this.fileList.push({id: v.id, name: v.filename, url: v.filepath, status: 'success'})
})
this.$nextTick(() => {
$("#lrEditor").html("")
lrEditor = new E("#lrEditor")
lrEditor.config.onchange = (html) => {
this.formData.hdnr = html
}
lrEditor.create()
lrEditor.txt.html(data.data.hdnr)
})
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
this.loading = false
}, "json");
},
doDelete(id) {
this.$confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: (a, b) => {
if ("confirm" == a) {//确认后再执行
$.post(base + "/platform/zgfw/lxy/hd/delete", {id: id}, (data) => {
if (data.code == 0) {
this.$message({
message: data.msg,
type: 'success'
});
this.pageData();
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
}
}
});
},
doAdd() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.formData.bmkssj = this.formData.bmsj[0]
this.formData.bmjzsj = this.formData.bmsj[1]
this.formData.hdkssj = this.formData.hdsj[0]
this.formData.hdjssj = this.formData.hdsj[1]
let formdata = new FormData();
for (let key in this.formData) {
formdata.append(key, this.formData[key] ? this.formData[key] : '');
}
this.fileList.forEach(function (val) {
formdata.append("files", val.raw, val.raw.name);
});
//const unions_ = this.unions_.filter(v => v.number)
formdata.append('mefp', JSON.stringify(this.unions_))
this.subDis = true
const loading = this.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
$.ajax({
url: "/platform/zgfw/lxy/hd/doAdd",
type: "post",
data: formdata,
processData: false,
contentType: false,
success: (data) => {
this.subDis = false
loading.close()
if (data.code === 0) {
this.v = 'index'
this.$message({
message: data.msg,
type: 'success'
});
this.v = 'index'
this.pageData();
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
},
error: data => {
this.subDis = false
loading.close()
this.$message({
message: data.msg,
type: 'error'
});
}
});
}
});
},
openAdd() {
this.pastQuota = ""
this.fileList = []
this.delFiles = []
this.formData = {}
this.unions_ = []
this.unions.map(v => {
this.unions_.push({
ghid: v.id,
unionname: v.unionname,
number: 0,
unioncode: v.unioncode,
membercount: v.membercount
})
})
this.stepActive = 0
this.v = 'add';
this.$nextTick(() => {
$("#lrEditor").html("")
lrEditor = new E("#lrEditor")
lrEditor.config.onchange = (html) => {
this.formData.hdnr = html
}
lrEditor.create()
})
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
},
doSearch() {
this.tabKey = new Date().getTime()
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();//显示loading
this.tabLoading = true
$.post(base + "/platform/zgfw/lxy/hd/pageData", this.pageForm, (data) => {
sublime.closeLoadingbar();//关闭loading
this.tabLoading = false
if (data.code == 0) {
this.tableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
},
async created() {
const unions_resp = await $.get(loc() + '/getUnions')
this.unions = unions_resp.data
this.lxyHd = await getLxyHd()
this.lxyHdCd = await getlxyHdCd()
this.pageData();
}
})
</script>
<!--#layout("/platform/zgfw/lxy/dialogView.html"){}#-->
<!--#
}
#-->
@@ -0,0 +1,663 @@
<!--#
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;
}
</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-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-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy"
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>
</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"></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.remain}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
<template scope="scope">
<!-- <el-button size="mini" @click="openView(scope.row)">查看-->
<!-- </el-button>-->
<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="openTj(scope.row)"
:disabled="scope.row.remain<=0" 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.kxz}}</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="doTj">提交</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 type="expand">
<template slot-scope="props">
<el-form label-position="left" inline class="demo-table-expand">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="所获荣誉">
<el-input v-if="props.row.chry" readonly type="textarea"
style="width: 600px;margin-left: 90px" :rows="9"
v-model="props.row.shry">
</el-input>
<el-input v-if="!props.row.chry" readonly type="textarea" :rows="9"
value="暂无荣誉">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="身份证相片">
<div v-for="item in bmTableData.files"
style="display: inline-block;width: 100px;margin-right:10px">
<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>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</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-column label="报名状态" prop="bmzt" header-align="center" align="center">
<template scope="scope">
<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>
</template>
</el-table-column>
</el-table>
</el-row>
</div>
</transition>
</el-row>
</div>
<script>
var vue = new Vue({
el: '#app',
data() {
return {
unionname: '',
viewDialogSh: false,
bmTableData: [],
lxyHd: [],
tabKey: new Date().getTime(),
userData: [],
stepActive: 0,
unions: [],
v: "index",
userOptions: [],
loading: false,
tabLoading: false,
userLoading: false,
bmDialog: false,
formData: {},
tableData: [],
pageForm: {
searchName: "hd.id",
searchKeyword: "",
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: "",
hdid: ""
},
userPageForm: {
check: [],
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: ""
},
searchForm: {
userId: "",
ghId: ""
},
multipleSelection: [],
userTableLoading: false,
numData: {},
}
},
methods: {
// checkSelect(selection, row) {
// // console.log(selection)
// // if (this.numData.sum - this.multipleSelection.length == 0) {
// // this.$refs.userTable.clearSelection();
// // return
// // }
// },
doTj() {
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/metj/tj";
} else if (this.userPageForm.sign == 1) {
url = base + "/platform/zgfw/lxy/metj/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.num - 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
},
checkChange(val) {
this.userPageForm.pageNumber = 1
this.userPageData()
},
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/metj/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/xghsh/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");
},
openTj(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/metj/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/metj/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();//显示loading
this.tabLoading = true
$.post(base + "/platform/zgfw/lxy/metj/pageData", this.pageForm, (data) => {
sublime.closeLoadingbar();//关闭loading
this.tabLoading = false
if (data.code == 0) {
this.tableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
},
async 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"){}#-->
<!--#
}
#-->
+361
View File
@@ -0,0 +1,361 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.file-down-span {
background: black;
opacity: 0.5;
z-index: 1000;
width: 100px;
text-align: center;
position: relative;
bottom: -100px;
cursor: pointer;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div class="btn-group tool-button mt5">
<el-date-picker
:picker-options="pickerOptions"
@change="hdSearch"
placeholder="选择年"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
<div class="btn-group tool-button mt5">
<el-select @change="doSearch()" placeholder="请选择活动"
v-model="pageForm.hdid">
<el-option
:key="item.id"
:label="item.name"
:value="item.id"
v-for="item in lxyHd">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select clearable filterable placeholder="请选择工会"
v-model="pageForm.ghid">
<el-option
:key="item.id"
:label="item.unionname"
:value="item.id"
v-for="item in ghList">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-input placeholder="请输入工号或姓名" v-model="pageForm.searchKey"></el-input>
</div>
<div class="btn-group tool-button mt5">
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
<el-button @click="doExport" icon="el-icon-download" plain type="primary">导 出</el-button>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<el-table :data="tableData" row-key="id" style="width: 100%" 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 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="age" sortable></el-table-column>
<el-table-column align="center" header-align="center" label="民族"
prop="mz" sortable></el-table-column>
<el-table-column align="center" header-align="center" label="手机号"
prop="mobile" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="身份证号" prop="idcard"
width="300px"></el-table-column>
<el-table-column align="center" header-align="center" label="工会"
prop="unionname" show-overflow-tooltip sortable></el-table-column>
<el-table-column align="center" header-align="center" label="单位"
prop="unitname" show-overflow-tooltip sortable></el-table-column>
<el-table-column align="center" header-align="center" label="职务"
prop="zw" sortable></el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="120px">
<template scope="scope">
<el-button @click="openView(scope.row)" size="mini" type="primary">查看
</el-button>
</template>
</el-table-column>
</el-table>
<el-row class="el-pagination-container">
<el-pagination
:current-page="pageForm.pageNumber"
:page-size="pageForm.pageSize"
:page-sizes="[10, 20, 30, 50]"
:total="pageForm.totalCount"
@current-change="pageNumberChange"
@size-change="pageSizeChange"
layout="total, sizes, prev, pager, next">
</el-pagination>
</el-row>
</el-card>
<template #view>
<el-row style="padding: 50px 150px">
<el-form label-position="right" label-width="120px" style="padding: 20px 0">
<vi-title title="个人信息"></vi-title>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="工号:">
{{viewData.loginname}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="姓名:">
{{viewData.username}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="职务:">
{{viewData.zw}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="人事编制:">
{{viewData.rsbz}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="性别:">
{{viewData.sex}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="年龄:">
{{viewData.age}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所在单位:">
{{viewData.unitname}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="手机号:">
{{viewData.mobile}}
</el-form-item>
</el-col>
</el-row>
<vi-title title="曾获荣誉"></vi-title>
<el-table :data="viewData.chry" show-header="false" size="mini" style="width: 100%">
<el-table-column align="center" header-align="center" label="获得时间" prop="hdsj"
width="250px">
<template slot-scope="{row}">
<el-date-picker format="yyyy-MM-dd" readonly type="date"
v-model="row.hdsj"></el-date-picker>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="曾获荣誉" prop="shry">
<template slot-scope="{row}">
<el-input readonly v-model="row.shry"></el-input>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="附件" width="120px">
<template slot-scope="{row}">
<div @click="dd3s.download(row.filepath,row.filename)"
class="file-down-span">
<i class="el-icon-download"></i>
</div>
<el-image :src="'${AppFileDomain!}'+row.filepath" @click="dd3s.showpic(row.filepath)"
fit="cover"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
v-if="dd3s.isPic(row.filepath)">
</el-image>
<el-image src="***"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
v-else>
<div class="image-slot" slot="error"
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>
<template v-if="viewData.files&&viewData.files.length">
<vi-title title="身份证复印件"></vi-title>
<div style="text-align: left;">
<div style="display: inline-block;width: 100px;margin-right:10px"
v-for="item in viewData.files">
<div @click="dd3s.download(item.filepath,item.filename)"
class="file-down-span">
<i class="el-icon-download"></i>
</div>
<el-image :src="'${AppFileDomain!}'+item.filepath" @click="dd3s.showpic(item.filepath)"
fit="cover"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
v-if="dd3s.isPic(item.filepath)">
</el-image>
<el-image src="***"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
v-else>
<div class="image-slot" slot="error"
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>
</template>
</el-form>
</el-row>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
data() {
return {
tableData: [],
viewData: [],
lxyHd: [],
ghList: [],
personForm: {
pageNumber: 1,
pageSize: 10,
},
pageForm: {
hdid: "",
year: "",
ghid: "",
searchKey: "",
pageNumber: 1,
pageSize: 10,
totalCount: 0,
},
pickerOptions: {
disabledDate(time) {
return (
time.getFullYear() > new Date().getFullYear()
);
}
},
tabLoading: false,
personLoading: false,
v: "index",
}
},
methods: {
doExport() {
let obj = this.lxyHd.find(o => {
return o.id === this.pageForm.hdid
})
this.$confirm('确定要导出' + obj.name + '人员名单吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
window.location.href = '/platform/zgfw/lxy/hdtj/doExport?hdid=' + this.pageForm.hdid + '&ghid=' + this.pageForm.ghid + '&hdname=' + obj.name
})
},
pageData() {
sublime.showLoadingbar();
this.tabLoading = true
$.post(base + "/platform/zgfw/lxy/hdtj/pageData", this.pageForm, (res) => {
let {code, data, msg} = res
sublime.closeLoadingbar();
this.tabLoading = false
if (code == 0) {
data.list.map(v => {
v.chry = JSON.parse(v.chry).map(x => {
return x.shry
}).join("")
})
this.tableData = data.list;
this.pageForm.totalCount = data.totalCount;
} else {
this.$message({
message: msg,
type: 'error'
});
}
}, "json");
},
async getLxyHd() {
await $.get("/platform/zgfw/lxy/hdtj/getLxyHd", {year: this.pageForm.year}).then(res => {
if (res.data.length != 0) {
this.lxyHd = res.data
this.pageForm.hdid = this.lxyHd[0].id
} else {
this.lxyHd = []
this.pageForm.hdid = ""
}
})
},
async getLxyBmInfo(id) {
const {data} = await $.get(base + "/platform/zgfw/lxy/fghsh/getBmInfo", {id})
return data
},
async openView(row) {
this.v = "view"
this.$refs.guava.view()
this.viewData = await this.getLxyBmInfo(row.id)
this.viewData.unitname = row.unitname
},
doSearch() {
this.pageData()
},
pageNumberChange(val) {//页码更新操作
this.pageForm.pageNumber = val;
this.pageData();
},
pageSizeChange(val) {//分页大小更新操作
this.pageForm.pageSize = val;
this.pageData();
},
async hdSearch() {
await this.getLxyHd()
},
},
async created() {
this.pageForm.year = new Date().getFullYear() + ""
await this.getLxyHd()
this.ghList = await getUnions()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,698 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.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;
}
.demo-table-expand .el-form-item {
margin-right: 0;
margin-bottom: 0;
width: 50%;
}
.el-textarea__inner {
width: 600px;
text-align: center;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div class="btn-group tool-button mt5">
<el-date-picker
placeholder="选择年度"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
<div class="btn-group tool-button mt5">
<el-select @change="pageData" clearable filterable placeholder="请选择活动"
v-model="pageForm.hdid">
<el-option
:key="item.id"
:label="item.name"
:value="item.id"
v-for="item in lxyHd">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
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-button @click="doSearchGh" icon="el-icon-search" type="primary"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
<el-radio-group @change="doSearchGh" v-model="pageForm.isAudit">
<el-radio-button :label="1">全部</el-radio-button>
<el-radio-button :label="2">已审核</el-radio-button>
<el-radio-button :label="3">未审核</el-radio-button>
</el-radio-group>
<el-button @click="yjTg" type="primary">一键通过</el-button>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<vi-title2 title="审核列表">
<template #func>
<el-button size="small" type="primary" @click="downLoadAll">
一键下载材料
</el-button>
</template>
</vi-title2>
<el-table :data="ghTableData" @selection-change="handleSelectionChangeGh" @sort-change="pageOrder"
ref="multipleTableGh" row-key="ghid"
style="width: 100%" v-loading="tabLoading">
<el-table-column
:reserve-selection="true"
type="selection"
width="55">
</el-table-column>
<el-table-column align="center" header-align="center" label="活动名称"
prop="name">
<template scope="scope">
<el-link @click="lxy_app.openView(scope.row.id)" type="primary">
{{scope.row.name}}
</el-link>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="院级工会"
prop="unionname"></el-table-column>
<el-table-column align="center" header-align="center" label="活动场地" prop="hdcd"
show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="联系人及联系方式" prop="fglyname"
show-overflow-tooltip></el-table-column>
<!-- <el-table-column label="活动时间" prop="hdsj" header-align="center" sortable width="200px"
align="center">
<template scope="scope">
{{scope.row.hdkssj}} 至 {{scope.row.hdjssj}}
</template>
</el-table-column>
<el-table-column label="报名截止时间" prop="bmsj" header-align="center" sortable width="270px"
align="center">
<template scope="scope">
{{scope.row.bmkssj}} 至 {{scope.row.bmjzsj}}
</template>
</el-table-column>-->
<el-table-column align="center" header-align="center" label="分配名额"
prop="number">
<template scope="scope">
<span style="color: tomato">{{scope.row.number}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="审核状态" prop="dsh"
show-overflow-tooltip>
<template scope="scope">
<el-tag type="info" v-if="scope.row.dsh>0">未审核</el-tag>
<el-tag type="success" v-else>已审核</el-tag>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="报名人员" prop="username"
show-overflow-tooltip></el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="120px">
<template scope="scope">
<el-button @click="openSh(scope.row)" plain size="mini" type="primary">查看人员</el-button>
</template>
</el-table-column>
</el-table>
<el-row class="el-pagination-container">
<el-pagination
@size-change="pageSizeChange"
@current-change="pageNumberChange"
:current-page="pageForm.pageNumber"
:page-sizes="[10, 20, 30, 50]"
:page-size="pageForm.pageSize"
layout="total, sizes, prev, pager, next"
:total="pageForm.totalCount">
</el-pagination>
</el-row>
</el-card>
<template #edit>
<el-row justify="end" type="flex">
<el-button @click="sh(5)" plain type="primary">批量审核</el-button>
<!--<el-button type="danger" @click="sh(4)" plain>不通过</el-button>-->
</el-row>
<el-row class="el-table-container">
<el-table :data="bmTableData" @selection-change="handleSelectionChange" ref="multipleTableRy"
row-key="id"
style="width: 100%" tooltip-effect="dark">
<el-table-column :reserve-selection="true" :selectable='checkboxT' disabled type="selection"
width="55"></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"
sortable></el-table-column>
<el-table-column align="center" header-align="center" label="年龄" prop="age"
sortable></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="报名状态" prop="bmzt">
<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" fixed="right" header-align="center" label="操作" width="150px">
<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 :command="{type:'Review',data:row}" :disabled="row.bmzt==5">
审核
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row class="el-pagination-container">
<el-pagination
:current-page="ghPageForm.pageNumber"
:page-size="ghPageForm.pageSize"
:page-sizes="[10, 20, 30, 50]"
:total="ghPageForm.totalCount"
@current-change="ghPageNumberChange"
@size-change="ghPageSizeChange"
layout="total, sizes, prev, pager, next">
</el-pagination>
</el-row>
</template>
</guava>
<el-dialog :close-on-click-modal="false" :visible.sync="viewDialogSh" custom-class="ViewDialogClass"
top="3%" width="60%">
<el-form label-position="right" label-width="120px" style="padding: 20px 0">
<vi-title title="个人信息"></vi-title>
<el-row gutter="20">
<el-col :span="8">
<el-form-item label="工号:">
{{ viewData.loginname }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="姓名:">
{{ viewData.username }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="职务:">
{{ viewData.zw }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="人事编制:">
{{ viewData.rsbz }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性别:">
{{ viewData.sex }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="年龄:">
{{ viewData.age }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所在单位:">
{{ viewData.unitname }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="手机号:">
{{ viewData.mobile }}
</el-form-item>
</el-col>
</el-row>
<vi-title title="曾获荣誉"></vi-title>
<el-table :data="viewData.chry" show-header="false" size="mini" style="width: 100%">
<el-table-column align="center" header-align="center" label="获得时间" prop="hdsj"
width="250px">
<template slot-scope="{row}">
<el-date-picker format="yyyy-MM-dd" readonly type="date"
v-model="row.hdsj"></el-date-picker>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="曾获荣誉" prop="shry">
<template slot-scope="{row}">
<el-input readonly v-model="row.shry"></el-input>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="附件" width="120px">
<template slot-scope="{row}">
<div @click="dd3s.download(row.ryfj,row.ryfj)" class="file-down-span">
<i class="el-icon-download"></i>
</div>
<el-image :src="'${AppFileDomain!}'+row.ryfj" @click="dd3s.showpic(row.ryfj)"
fit="cover"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
v-if="dd3s.isPic(row.ryfj)">
</el-image>
<el-image src="***"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
v-else>
<div class="image-slot" slot="error"
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.ryfj}}</span>
</div>
</el-image>
</template>
</el-table-column>
</el-table>
<template v-if="viewData.files&&viewData.files.length">
<vi-title title="身份证复印件"></vi-title>
<div style="text-align: left;">
<div style="display: inline-block;width: 100px;margin-right:10px"
v-for="item in viewData.files">
<div @click="dd3s.download(item.filepath,item.filename)" class="file-down-span">
<i class="el-icon-download"></i>
</div>
<el-image :src="'${AppFileDomain!}'+item.filepath" @click="dd3s.showpic(item.filepath)"
fit="cover"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
v-if="dd3s.isPic(item.filepath)">
</el-image>
<el-image src="***"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
v-else>
<div class="image-slot" slot="error"
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>
</template>
<vi-title title="个人材料" style="margin-top: 10px"></vi-title>
<el-descriptions :column="2" border>
<el-descriptions-item label="附件">
<file-upload v-if="viewData.bmFiles && viewData.bmFiles.length > 0"
:files="viewData.bmFiles"
:view="true"></file-upload>
<span v-else>暂无个人材料</span>
</el-descriptions-item>
</el-descriptions>
</el-form>
<span class="dialog-footer" slot="footer" v-if="this.viewData.num==2">
<el-button type="danger" @click="grsh(4)" plain>不通过</el-button>
<el-button type="success" @click="grsh(5)" plain>通 过</el-button>
</span>
</el-dialog>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
tabKey: new Date().getTime(),
viewData: [],
lxyHd: [],
unions: [],
userOptions: [],
multipleSelection: [],
multipleSelectionGh: [],
viewDialogSh: false,
loading: false,
tabLoading: false,
userLoading: false,
showGh: true,
formData: {},
tableData: [],
bmTableData: [],
ghTableData: [],
pageForm: {
searchName: "name",
searchKeyword: "",
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: "",
isAudit: 1,
year: new Date().getFullYear() + "",
hdid: ""
},
ghPageForm: {
isAudit: 1,
year: new Date().getFullYear() + "",
searchName: "un.unionname",
searchKeyword: "",
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: "",
hdid: ""
},
}
},
methods: {
downLoadAll() {
location.href = '/platform/zgfw/lxy/xghsh/downLoadAll?year=' + this.pageForm.year +
'&hdid=' + this.pageForm.hdid + '&searchKeyword=' + this.pageForm.searchKeyword +
'&isAudit=' + this.pageForm.isAudit
},
checkboxT(row) {
if (row.bmzt == 5) {
return false;
} else {
return true;
}
},
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data, 1)
} else if (type == 'Review') {
this.openView(data, 2)
}
},
async getLxyBmInfo(id) {
const {data} = await $.get(base + "/platform/zgfw/lxy/fghsh/getBmInfo", {id})
return data
},
async openView(row, num) {
this.viewData = await this.getLxyBmInfo(row.id)
this.viewData.num = num
this.ghPageForm.hdid = row.hdid
this.ghPageForm.uid = row.uid
this.viewData.unitname = row.unitname
this.viewDialogSh = true
},
openShGh(row) {
this.pageForm.hdid = row.id
$.post(base + "/platform/zgfw/lxy/xghsh/pageData", this.pageForm, (data) => {
sublime.closeLoadingbar();
this.tabLoading = false
if (data.code == 0) {
this.ghTableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
openSh(row) {
this.ghPageForm.hdid = row.hdid
this.ghPageForm.ghid = row.ghid
this.$refs.guava.edit()
this.showGh = false
this.$nextTick(() => {
this.toggleSelection()
})
this.refresh(this.ghPageForm.ghid, this.ghPageForm.hdid)
},
refresh(ghid, hdid) {
$.post(base + "/platform/zgfw/lxy/xghsh/findBm", {
ghId: ghid,
hdId: hdid,
...this.ghPageForm
}, (data) => {
sublime.closeLoadingbar();
this.tabLoading = false
if (data.code == 0) {
this.bmTableData = data.data.list;
this.ghPageForm.totalCount = data.data.totalCount
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
yjTg() {
if (this.multipleSelectionGh.length == 0) {
this.$message({
message: '请选择工会!',
type: 'warning'
});
return
}
const loading = this.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let arr = []
this.multipleSelectionGh.map(v => {
arr.push({ghid: v.ghid, hdid: v.hdid})
})
$.post(base + "/platform/zgfw/lxy/xghsh/yjSh", {maps: JSON.stringify(arr)}, (data) => {
loading.close()
if (data.code == 0) {
this.$message({
message: '提交成功',
type: 'success'
});
this.toggleSelectionGh()
this.openShGh({id: this.pageForm.hdid});
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
sh(zt) {
if (this.multipleSelection.length == 0) {
this.$message({
message: '请选择人员!',
type: 'warning'
});
return
}
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.uid)
})
$.post(base + "/platform/zgfw/lxy/xghsh/sh", {
hdid: this.ghPageForm.hdid,
ghid: this.ghPageForm.ghid,
bmzt: zt,
users: JSON.stringify(arr)
}, (data) => {
loading.close()
if (data.code == 0) {
this.$message({
message: '提交成功',
type: 'success'
});
this.viewDialogSh = false
this.pageData()
this.toggleSelection()
this.refresh(this.ghPageForm.ghid, this.ghPageForm.hdid)
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
grsh(zt) {
const loading = this.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
$.post(base + "/platform/zgfw/lxy/xghsh/grsh", {
hdid: this.ghPageForm.hdid,
ghid: this.ghPageForm.ghid,
userid: this.viewData.userid,
bmzt: zt,
}, (data) => {
loading.close()
if (data.code == 0) {
this.$message({
message: '提交成功',
type: 'success'
});
this.viewDialogSh = false
this.pageData()
this.toggleSelection()
this.refresh(this.ghPageForm.ghid, this.ghPageForm.hdid)
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
toggleSelection(rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTableRy.toggleRowSelection(row);
});
} else {
this.$refs.multipleTableRy.clearSelection();
}
},
toggleSelectionGh(rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTableGh.toggleRowSelection(row);
});
} else {
this.$refs.multipleTableGh.clearSelection();
}
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
handleSelectionChangeGh(val) {
this.multipleSelectionGh = val;
},
async userRemoteMethod(query) {
if (query) {
this.userLoading = true
const arr = await searchUser(query)
this.userOptions = this.userOptions.filter(v => {
return v.id == this.formData.hdfzr
}).concat(arr.filter(v => {
return v.id != this.formData.hdfzr
}));
this.userLoading = false
}
},
doSearch() {
this.tabKey = new Date().getTime()
this.pageForm.pageNumber = 1
this.pageData()
},
doSearchGh() {
this.tabKey = new Date().getTime()
this.pageForm.pageNumber = 1
this.openShGh({id: this.pageForm.hdid});
},
ghPageOrder(column) {//按字段排序
this.ghPageForm.pageOrderName = column.prop;
this.ghPageForm.pageOrderBy = column.order;
this.refresh(this.ghPageForm.ghid, this.ghPageForm.hdid)
},
ghPageNumberChange(val) {//页码更新操作
this.ghPageForm.pageNumber = val;
this.refresh(this.ghPageForm.ghid, this.ghPageForm.hdid)
},
ghPageSizeChange(val) {//分页大小更新操作
this.ghPageForm.pageSize = val;
this.refresh(this.ghPageForm.ghid, this.ghPageForm.hdid)
},
pageData() {
sublime.showLoadingbar();
this.tabLoading = true
$.post(base + "/platform/zgfw/lxy/xghsh/pageData", this.pageForm, (data) => {
sublime.closeLoadingbar();
this.tabLoading = false
if (data.code == 0) {
this.ghTableData = 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"){}#-->
<!--#
}
#-->
@@ -0,0 +1,149 @@
<style>
.el-icon-download {
color: white;
}
.file-down-span {
background: black;
opacity: 0.5;
z-index: 1000;
width: 100px;
text-align: center;
/*position: absolute;*/
position: relative;
bottom: -100px;
cursor: pointer;
}
.file-down-span:hover {
opacity: 0.9;
}
.el-icon-circle-close {
color: white;
}
.v-content {
width: 100%;
font-size: 16px;
color: rgb(100, 100, 100);
}
.v-author {
text-align: right;
color: rgb(160, 160, 160);
}
.el-tabs__item {
color: rgb(120, 120, 120)
}
</style>
<div id="v-app" v-cloak>
<el-dialog
title="活动详细信息"
top="3%"
:visible.sync="viewDialogVisible" custom-class="ViewDialogClass"
:close-on-click-modal="false" width="70%">
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
<el-tab-pane label="活动基础信息" name="1">
<!--#include("/platform/zgfw/lxy/dialogViewHd.html"){}#-->
</el-tab-pane>
<el-tab-pane label="名额分配信息" name="2">
<!--#include("/platform/zgfw/lxy/dialogViewFp.html"){}#-->
</el-tab-pane>
<el-tab-pane label="报名人员信息" name="3">
<!--#include("/platform/zgfw/lxy/dialogViewBm.html"){}#-->
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="viewDialogVisible = false">关 闭</el-button>
</span>
</el-dialog>
</div>
<script>
window.lxy_app = new Vue({
el: '#v-app',
data() {
return {
loading: false,
prevImgList: [],
viewData: {
mefp: [],
bm: [],
},
viewDialogVisible: false,
activeName: '1',
imageType: ['jpg', 'jpeg', 'png'],
getSuffix: (name) => {
return name.substr(name.lastIndexOf('.') + 1).toLowerCase()
},
isImage: (path) => {
return this.imageType.includes(this.getSuffix(path))
}
}
},
methods: {
getStatus(row) {
var now = new Date().getTime()
var hdkssj = moment(row.hdkssj.valueOf())
var hdjssj = moment(row.hdjssj.valueOf())
var bmjzsj = moment(row.bmjzsj.valueOf())
if (now < bmjzsj) {
return {
class: 'text-success',
name: '活动报名中'
}
} else if (bmjzsj < now && now < hdkssj) {
return {
class: 'text-info',
name: '报名已截止'
}
} else if (hdkssj < now && now < hdjssj) {
return {
class: 'text-warning',
name: '活动进行中'
}
} else if (now > hdjssj) {
return {
class: 'text-danger',
name: '活动已结束'
}
}
},
async getLxyInfo(id) {
const {data} = await $.get(base + "/platform/zgfw/lxy/common/getHdInfo", {id})
return data
},
async openView(id) {
this.prevImgList = []
this.viewDialogVisible = true
this.loading = true
this.viewData = await this.getLxyInfo(id)
if (this.viewData) {
this.activeName = '1'
} else {
this.viewData = {}
this.$message({
message: "获取活动信息失败",
type: 'error'
});
this.viewDialogVisible = false
}
this.loading = false
},
},
})
</script>
@@ -0,0 +1,21 @@
<el-table :data="viewData.bm" size="medium" height="70vh">
<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: #E6A23C" v-if="scope.row.bmzt==3">待校工会审核</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>
@@ -0,0 +1,10 @@
<el-table :data="viewData.mefp" size="medium" height="70vh">
<el-table-column align="center" type="index" header-align="center"
label="序号"></el-table-column>
<el-table-column label="院级工会" prop="unionname" header-align="center"
align="center"></el-table-column>
<el-table-column label="名额" prop="number" header-align="center" width="200px"
align="center"></el-table-column>
</el-table>
@@ -0,0 +1,59 @@
<el-form label-position="right" style="padding: 20px 0" label-width="120px">
<vi-title title="活动基础信息"></vi-title>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="活动时间:">
{{viewData.hdkssj}} 至 {{viewData.hdjssj}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报名截止时间:">
{{viewData.bmjzsj}}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="活动场地:">
{{viewData.hdcd}}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="注意事项:">
{{viewData.hdzysx}}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="活动内容:">
<div v-html="viewData.hdnr"></div>
</el-form-item>
</el-col>
</el-row>
<template v-if="viewData.files&&viewData.files.length">
<vi-title title="附件"></vi-title>
<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>
</template>
</el-form>