1188 lines
59 KiB
HTML
1188 lines
59 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
<style>
|
|
.el-select {
|
|
width: 100%;
|
|
}
|
|
|
|
.text {
|
|
font-size: 14px;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.e-item {
|
|
margin-bottom: 18px;
|
|
}
|
|
|
|
.el-divider--horizontal {
|
|
margin: 5px 0;
|
|
}
|
|
|
|
.v-tab .el-card__header {
|
|
padding: 10px 15px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.reserve_btn {
|
|
font-size: 15px;
|
|
float: right;
|
|
padding: 3px 0
|
|
}
|
|
|
|
.is-selected {
|
|
color: #1989FA;
|
|
}
|
|
|
|
.el-carousel__button {
|
|
background-color: #c0c4cc;
|
|
}
|
|
|
|
.el-carousel__container {
|
|
height: 260px;
|
|
}
|
|
|
|
.el-button--mini.is-circle {
|
|
padding: 5px;
|
|
font-size: 1px;
|
|
}
|
|
|
|
.slider {
|
|
position: relative;
|
|
}
|
|
|
|
.el-slider__marks-text {
|
|
margin-top: 10px !important;
|
|
}
|
|
|
|
.el-slider__stop {
|
|
z-index: 1001;
|
|
}
|
|
|
|
.el-slider__bar {
|
|
z-index: 1000;
|
|
}
|
|
|
|
.el-slider__marks-text {
|
|
min-width: 40px !important;
|
|
}
|
|
|
|
.el-slider__button-wrapper {
|
|
display: none !important;
|
|
}
|
|
|
|
.el-transfer-panel {
|
|
text-align: left;
|
|
width: calc(50% - 91px);
|
|
height: 53vh;
|
|
}
|
|
|
|
.el-transfer-panel__list.is-filterable {
|
|
height: calc(50vh - 110px);
|
|
}
|
|
|
|
.transfer {
|
|
display: flex;
|
|
height: 100%;
|
|
width: 100%;
|
|
align-items: center;
|
|
padding: 0 10px;
|
|
}
|
|
|
|
.transfer .el-checkbox {
|
|
display: inline-block !important;
|
|
margin: 0 10px !important;
|
|
}
|
|
|
|
.el-divider {
|
|
background-color: #ec524b !important;
|
|
}
|
|
|
|
.el-divider__text {
|
|
color: #ec524b !important;
|
|
}
|
|
|
|
.el-timeline-item__timestamp {
|
|
color: #ec524b;
|
|
}
|
|
|
|
.activeCard {
|
|
border: 1px solid #409EFF;
|
|
}
|
|
|
|
.el-table-container {
|
|
padding-top: 10px;
|
|
padding-left: 5px;
|
|
padding-right: 5px;
|
|
}
|
|
</style>
|
|
|
|
<div id="app" v-cloak>
|
|
<guava ref="guava">
|
|
<template>
|
|
<el-card shadow="never">
|
|
|
|
<div class="btn-group tool-button">
|
|
<div class="block">
|
|
<el-date-picker
|
|
v-model="pageForm.year"
|
|
:clearable="false"
|
|
type="year" @change="getEvaluateByYear()"
|
|
value-format="yyyy"
|
|
placeholder="年度">
|
|
</el-date-picker>
|
|
</div>
|
|
</div>
|
|
|
|
<!--<div class="btn-group tool-button">
|
|
<el-select placeholder="评优评先名称" v-model="pageForm.evaluateId" style="width: 100%;"
|
|
clearable="true" filterable="true">
|
|
<el-option v-for="item in evaluateOptions" :label="item.evaluateName"
|
|
:value="item.evaluateId"></el-option>
|
|
</el-select>
|
|
</div>-->
|
|
|
|
<!-- <div class="btn-group tool-button">-->
|
|
<!-- <el-radio-group v-model="pageForm.honorType" @change="(o) => {radioChange(o)}">-->
|
|
<!-- <el-radio-button v-for="v in honorTypeList" :label="v.id">{{v.name}}-->
|
|
<!-- </el-radio-button>-->
|
|
<!-- </el-radio-group>-->
|
|
<!-- </div>-->
|
|
|
|
<div class="btn-group tool-button">
|
|
<el-button type="primary" @click="doSearch" icon="el-icon-search"></el-button>
|
|
</div>
|
|
|
|
<!--<div class="pull-right offscreen-right">
|
|
<el-button size="medium" type="primary" @click="applyEvaluate">申请评优评先</el-button>
|
|
</div>-->
|
|
|
|
</el-card>
|
|
|
|
<div class="mt10">
|
|
<el-carousel :interval="5000" arrow="always" style="margin: 10px auto">
|
|
<el-carousel-item v-for="index in Math.ceil(evaluateOptions.length/4)"
|
|
v-if="evaluateOptions && evaluateOptions.length > 0"
|
|
:key="index">
|
|
<el-row :gutter="20">
|
|
<el-col v-for="item in evaluateOptions.slice((index-1)*4,index*4)"
|
|
:span="6">
|
|
<el-card
|
|
:class="'box-card ' + (item.evaluateId === pageForm.evaluateId ? 'activeCard' : '')"
|
|
style="border-radius: 10px;cursor: pointer;">
|
|
<div slot="header" class="clearfix"
|
|
style="font-size: 16px;padding: 5px 0"
|
|
@click="clickEvaluate(item)">
|
|
<span>{{item.evaluateName}}</span>
|
|
<el-button @click.stop="applyEvaluate(item)"
|
|
class="reserve_btn" type="text">
|
|
申请
|
|
</el-button>
|
|
</div>
|
|
|
|
<div @click="clickEvaluate(item)"
|
|
style="display: flex; justify-content: space-between">
|
|
<div style="width: 79%">
|
|
<div class="text e-item">
|
|
<span style="color: gray">类  型:</span>
|
|
<span>{{item.honorTypeName + ' - ' + item.honorName}}</span>
|
|
</div>
|
|
<div class="text e-item">
|
|
<span style="color: gray">报名范围:</span>
|
|
{{item.groupName}}
|
|
</div>
|
|
<div class="text e-item">
|
|
<span style="color: gray">开始时间:</span>
|
|
{{moment(item.startTime)
|
|
.format('YYYY/MM/DD HH:mm')}}
|
|
</div>
|
|
<div class="text item">
|
|
<span style="color: gray">结束时间:</span>
|
|
{{moment(item.endTime)
|
|
.format('YYYY/MM/DD HH:mm')}}
|
|
</div>
|
|
</div>
|
|
<!-- <div>-->
|
|
<!-- <el-tag :type="getStatus(item).type" effect="dark" style="float: right">-->
|
|
<!-- {{ getStatus(item).name }}-->
|
|
<!-- </el-tag>-->
|
|
<!-- </div>-->
|
|
</div>
|
|
|
|
</el-card>
|
|
</el-col>
|
|
</el-row>
|
|
</el-carousel-item>
|
|
<el-empty v-if="!evaluateOptions || evaluateOptions.length === 0"
|
|
description="暂无数据"></el-empty>
|
|
</el-carousel>
|
|
</div>
|
|
|
|
<el-card class="mt10" shadow="never">
|
|
<vi-title2 title="申请列表">
|
|
<template #func>
|
|
<el-button size="small" type="primary" @click="pageForm.evaluateId=null;doSearch()">
|
|
查看全部申请
|
|
</el-button>
|
|
</template>
|
|
</vi-title2>
|
|
|
|
<el-table :data="tableData">
|
|
|
|
<el-table-column align="center" header-align="center" label="序号" type="index"
|
|
width="80px"></el-table-column>
|
|
<el-table-column align="center" header-align="center" label="评优评先名称"
|
|
prop="evaluateName"
|
|
show-overflow-tooltip></el-table-column>
|
|
|
|
<el-table-column
|
|
align="center"
|
|
header-align="center"
|
|
v-for="column in tableColumns"
|
|
:label="column.label"
|
|
:prop="column.prop" :sortable="column.sortable"
|
|
:sortable="column.sortable" show-overflow-tooltip>
|
|
<template v-if="column.prop=='unionClub'" scope="{row}">
|
|
{{row.pxxmlx===1?row.unionName:row.clubName}}
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<!-- <template v-if="pageForm.honorType !== HonorApi.honor_single_id">-->
|
|
|
|
<!-- <el-table-column align="center" header-align="center" label="工会/协会"-->
|
|
<!-- prop="applyTime"-->
|
|
<!-- show-overflow-tooltip>-->
|
|
<!-- <template slot-scope="{row}">-->
|
|
<!-- <template v-if="row.pxxmlx===1">-->
|
|
<!-- {{row.applyUnionName}}-->
|
|
<!-- </template>-->
|
|
<!-- <template v-if="row.pxxmlx===2">-->
|
|
<!-- {{row.clubName}}-->
|
|
<!-- </template>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
|
|
<!-- <el-table-column align="center" header-align="center" label="工会主席/协会会长"-->
|
|
<!-- prop="applyTime"-->
|
|
<!-- show-overflow-tooltip>-->
|
|
<!-- <template slot-scope="{row}">-->
|
|
<!-- <template v-if="row.pxxmlx===1">-->
|
|
<!-- {{row.unionLeader}}-->
|
|
<!-- </template>-->
|
|
<!-- <template v-if="row.pxxmlx===2">-->
|
|
<!-- {{row.clubLeader}}-->
|
|
<!-- </template>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
|
|
<!-- <el-table-column align="center" header-align="center" label="会员人数"-->
|
|
<!-- prop="applyTime"-->
|
|
<!-- show-overflow-tooltip>-->
|
|
<!-- <template slot-scope="{row}">-->
|
|
<!-- <template v-if="row.pxxmlx===1">-->
|
|
<!-- {{row.memberNumber}}-->
|
|
<!-- </template>-->
|
|
<!-- <template v-if="row.pxxmlx===2">-->
|
|
<!-- {{row.clubNumber}}-->
|
|
<!-- </template>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<!-- </template>-->
|
|
<!-- <el-table-column align="center" header-align="center" label="评选项目类型"-->
|
|
<!-- prop="applyTime"-->
|
|
<!-- show-overflow-tooltip>-->
|
|
<!-- <template slot-scope="{row}">-->
|
|
<!-- {{row.pxxmlx===1?'工会':'协会'}}-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
|
|
<el-table-column align="center" header-align="center" label="申请时间"
|
|
prop="applyTime"
|
|
show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="center" header-align="center" label="审核状态" prop="year"
|
|
show-overflow-tooltip>
|
|
<template slot-scope="{row}">
|
|
<span :style="'color: ' + row.stateColor">{{row.stateName}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
|
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:'edit',data:row}"
|
|
:disabled="![1400,1460,1750].includes(row.stateId)">
|
|
编辑
|
|
</el-dropdown-item>
|
|
|
|
<!--#if(@shiro.hasRole('sysadmin')){#-->
|
|
<el-dropdown-item :command="{type:'delete',data:row}"
|
|
:loading="row.delLoading">
|
|
删除
|
|
</el-dropdown-item>
|
|
<!--#}else{#-->
|
|
<el-dropdown-item :command="{type:'delete',data:row}"
|
|
:disabled="row.stateId>1400"
|
|
:loading="row.delLoading">
|
|
删除
|
|
</el-dropdown-item>
|
|
<!--#}#-->
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
</template>
|
|
|
|
<template #edit>
|
|
<template #header>
|
|
<el-row type="flex" justify="space-between">
|
|
<h3>{{isEdit?'修改数据':'添加数据'}}</h3>
|
|
</el-row>
|
|
</template>
|
|
|
|
<el-form :model="formData" :rules="formRules" label-width="120px" ref="form">
|
|
<template
|
|
v-if="formData.honorTypeId === undefined || formData.honorTypeId === HonorApi.honor_single_id">
|
|
<el-row :gutter="20">
|
|
<el-col :span="12">
|
|
<el-form-item prop="userName" label="姓名">
|
|
<el-input :value="formData.userName" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="性别" prop="userSex"
|
|
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]">
|
|
<el-radio-group v-model="formData.userSex" :disabled="isEdit">
|
|
<el-radio-button label="男"></el-radio-button>
|
|
<el-radio-button label="女"></el-radio-button>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-col>
|
|
<!--<el-col :span="12">
|
|
<el-form-item prop="loginname" label="工号">
|
|
<el-input v-model="formData.loginname" placeholder="填写申请人自动填充"></el-input>
|
|
</el-form-item>
|
|
</el-col>-->
|
|
|
|
|
|
<el-col :span="12">
|
|
<el-form-item label="所属单位" prop="unitName"
|
|
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]">
|
|
<!-- <el-select v-model="formData.unitId" placeholder="填写申请人自动填充"-->
|
|
<!-- style="width: 100%;"-->
|
|
<!-- filterable="true"-->
|
|
<!-- :disabled="isEdit">-->
|
|
<!-- <el-option v-for="item in units"-->
|
|
<!-- :label="item.name"-->
|
|
<!-- :value="item.id"></el-option>-->
|
|
<!-- </el-select>-->
|
|
<el-input :value="formData.unitName" disabled></el-input>
|
|
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="所属工会" prop="unionName"
|
|
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]">
|
|
<!-- <el-select v-model="formData.unionId" placeholder="填写申请人自动填充"-->
|
|
<!-- style="width: 100%;"-->
|
|
<!-- filterable="true"-->
|
|
<!-- :disabled="isEdit">-->
|
|
<!-- <el-option v-for="item in unions"-->
|
|
<!-- :label="item.unionname"-->
|
|
<!-- :value="item.id"></el-option>-->
|
|
<!-- </el-select>-->
|
|
<el-input :value="formData.unionName" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
<template v-if="evaluate.pxxmlx===2">
|
|
<el-col :span="12">
|
|
<el-form-item label="申报协会"
|
|
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]"
|
|
prop="clubId">
|
|
<el-select placeholder="请选择申报协会" v-model="formData.clubId"
|
|
style="width: 100%;"
|
|
@change="searchClubInfo"
|
|
clearable
|
|
filterable>
|
|
<el-option v-for="item in clubs"
|
|
:label="item.name"
|
|
:value="item.id"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
<el-form-item label="协会职务"
|
|
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]"
|
|
prop="xhPosition">
|
|
<el-input placeholder="请填写协会职务"
|
|
v-model="formData.xhPosition"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
<el-form-item label="职务"
|
|
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]"
|
|
prop="position">
|
|
<el-input placeholder="请填写职务"
|
|
v-model="formData.position"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="职称"
|
|
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]"
|
|
prop="jobTitle">
|
|
<el-input placeholder="请填写职称"
|
|
v-model="formData.jobTitle"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
<el-form-item label="政治面貌"
|
|
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]"
|
|
prop="political">
|
|
<el-input placeholder="请填写政治面貌"
|
|
v-model="formData.political"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</template>
|
|
|
|
<template v-if="evaluate.pxxmlx===1">
|
|
<el-col :span="12">
|
|
<el-form-item label="生日" prop="birthday"
|
|
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]">
|
|
<el-date-picker
|
|
style="width: 100%"
|
|
v-model="formData.birthday"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
placeholder="请选择生日">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="民族"
|
|
prop="nation"
|
|
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]">
|
|
<el-select style="width: 100%" filterable
|
|
placeholder="请选择民族"
|
|
v-model="formData.nation">
|
|
<el-option v-for="nation in nationOptions" :key="nation"
|
|
:value="nation"
|
|
:label="nation"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
<el-form-item label="政治面貌"
|
|
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]"
|
|
prop="political">
|
|
<el-input v-model="formData.political"
|
|
maxlength="20"
|
|
placeholder="请填写政治面貌"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item label="文化程度"-->
|
|
<!-- :rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]"-->
|
|
<!-- prop="education">-->
|
|
<!-- <el-input v-model="formData.education"-->
|
|
<!-- maxlength="20"-->
|
|
<!-- placeholder="填写文化程度"></el-input>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item label="职称"-->
|
|
<!-- :rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]"-->
|
|
<!-- prop="jobTitle">-->
|
|
<!-- <el-input v-model="formData.jobTitle"-->
|
|
<!-- maxlength="20"-->
|
|
<!-- placeholder="请填写职称"></el-input>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
|
|
<el-col :span="12">
|
|
<el-form-item label="党政职务"
|
|
prop="dzPosition">
|
|
<el-input placeholder="请填写党政职务"
|
|
maxlength="20"
|
|
v-model="formData.dzPosition"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
<el-form-item label="工会职务"
|
|
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]"
|
|
prop="position">
|
|
<el-input placeholder="请填写工会职务"
|
|
maxlength="20"
|
|
v-model="formData.position"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</template>
|
|
</el-row>
|
|
</template>
|
|
|
|
<template v-else>
|
|
<el-row type="flex" :gutter="20">
|
|
<template v-if="evaluate.pxxmlx===1">
|
|
<el-col :span="12">
|
|
<el-form-item label="申报院级工会" prop="unionId">
|
|
<el-select placeholder="请选择申报院级工会" v-model="formData.unionId"
|
|
style="width: 100%;"
|
|
@change="searchUnionInfo"
|
|
clearable
|
|
disabled
|
|
filterable>
|
|
<el-option v-for="item in unions"
|
|
:label="item.unionname"
|
|
:value="item.id"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="工会主席" prop="unionLeader">
|
|
<el-input placeholder="请填写工会主席"
|
|
v-model="formData.unionLeader"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</template>
|
|
<template v-if="evaluate.pxxmlx===2">
|
|
<el-col :span="12">
|
|
<el-form-item label="申报协会" prop="clubId">
|
|
<el-select placeholder="请选择申报协会" v-model="formData.clubId"
|
|
style="width: 100%;"
|
|
@change="searchClubInfo"
|
|
clearable
|
|
disabled
|
|
filterable>
|
|
<el-option v-for="item in clubs"
|
|
:label="item.name"
|
|
:value="item.id"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="协会会长" prop="clubLeader">
|
|
<el-input placeholder="请填写协会会长"
|
|
v-model="formData.clubLeader"></el-input>
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="协会人数" prop="clubNumber">
|
|
<el-input-number v-model="formData.clubNumber" :min="0"
|
|
placeholder="请填写协会人数"
|
|
:max="2000"
|
|
style="width: 100%"></el-input-number>
|
|
</el-form-item>
|
|
</el-col>
|
|
</template>
|
|
|
|
</el-row>
|
|
<el-row type="flex" :gutter="20" v-if="evaluate.pxxmlx===1">
|
|
<!--<el-col :span="12">
|
|
<el-form-item label="会员人数" prop="memberNum">
|
|
<el-input-number v-model="formData.memberNum" :min="0"
|
|
:max="2000" style="width: 100%"></el-input-number>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="女职工人员" prop="unitFemalePeopleNum">
|
|
<el-input-number
|
|
v-model.number="formData.unitFemalePeopleNum" :min="0"
|
|
:max="2000" style="width: 100%"></el-input-number>
|
|
</el-form-item>
|
|
</el-col>-->
|
|
<el-col :span="12">
|
|
<el-form-item label="会员人数" prop="memberNumber">
|
|
<el-input-number v-model="formData.memberNumber" :min="0"
|
|
placeholder="请填写会员人数"
|
|
:max="2000" style="width: 100%"></el-input-number>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="工会小组数" prop="unionGroupNumber">
|
|
<el-input-number v-model="formData.unionGroupNumber" :min="0"
|
|
placeholder="请填写工会小组数"
|
|
:max="2000" style="width: 100%"></el-input-number>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</template>
|
|
|
|
<el-row type="flex" :gutter="20" v-if="evaluate.pxxmlx===1">
|
|
<el-col :span="24">
|
|
<el-form-item label="曾受何种奖励" prop="award"
|
|
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]">
|
|
<el-input v-model="formData.award" type="textarea" rows="4"
|
|
maxlength="2000"
|
|
placeholder="如有多种奖励,请用 / 隔开"></el-input>
|
|
<el-popover
|
|
v-model="popover"
|
|
placement="top-start"
|
|
width="800"
|
|
trigger="click">
|
|
<el-table :data="gridData" ref="multipleTable"
|
|
@selection-change="handleSelectionChange"
|
|
row-key="id"
|
|
style="width: 100%; max-height: 400px; overflow-y: auto"
|
|
size="mini">
|
|
<el-table-column
|
|
type="selection"
|
|
width="55">
|
|
</el-table-column>
|
|
<el-table-column
|
|
v-if="formData.honorTypeId === HonorApi.honor_single_id"
|
|
property="userName" label="姓名"></el-table-column>
|
|
<el-table-column property="prizeName"
|
|
label="获奖名称"></el-table-column>
|
|
<el-table-column property="levelName"
|
|
label="级别"></el-table-column>
|
|
<el-table-column property="grantDate" sortable
|
|
label="授予时间"></el-table-column>
|
|
</el-table>
|
|
<div style="text-align: right; margin-top: 10px">
|
|
<el-button @click="multipleSelection = []; popover = false"
|
|
size="mini">取消
|
|
</el-button>
|
|
<el-button @click="popoverOK" type="primary" size="mini">确定
|
|
</el-button>
|
|
</div>
|
|
<el-button slot="reference" type="primary" size="mini"
|
|
v-if="evaluate.pxxmlx===1">调用已录入荣誉
|
|
</el-button>
|
|
</el-popover>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
<el-row type="flex" :gutter="20">
|
|
<el-col :span="24">
|
|
<el-form-item label="主要事迹" prop="deeds">
|
|
<el-input v-model="formData.deeds" type="textarea" rows="8" maxlength="5000"
|
|
show-word-limit></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
<!-- <el-row type="flex" :gutter="20">-->
|
|
<!-- <el-col :span="24">-->
|
|
<!-- <el-form-item label="附件" prop="files"-->
|
|
<!-- :rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]">-->
|
|
<!-- <file-upload :files.sync="formData.files">-->
|
|
<!-- <template #el-upload__tip>-->
|
|
<!-- <div class="el-upload__tip" slot="tip">-->
|
|
<!-- 图片类请上传jpg/png/jpeg等格式,文档类请上传doc/docx/xls/xlsx/pdf等格式-->
|
|
<!-- </div>-->
|
|
<!-- </template>-->
|
|
<!-- </file-upload>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
</el-form>
|
|
|
|
<el-row class="m20 text-right">
|
|
<el-button type="primary" @click="saveForm">保存</el-button>
|
|
<el-button :disabled="isDisabled" type="primary" @click="doSubmit">提交</el-button>
|
|
</el-row>
|
|
</template>
|
|
|
|
<template #view>
|
|
<evaluate-info ref="info"></evaluate-info>
|
|
</template>
|
|
</guava>
|
|
|
|
<!--<el-dialog title="荣誉列表" :visible.sync="addDialogVisible">
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="addDialogVisible = false">取 消</el-button>
|
|
<el-button type="primary" @click="doAdd">确 定</el-button>
|
|
</span>
|
|
</el-dialog>-->
|
|
</div>
|
|
|
|
<script>
|
|
var vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
const validDeeds = (rule, value, callback) => {
|
|
if (!this.formData.deeds || this.formData.deeds.length === 0) {
|
|
callback(new Error('请填写主要事迹'));
|
|
} else if (this.formData.deeds.length < 300) {
|
|
callback(new Error('主要事迹提交至少需要填写300字'));
|
|
} else {
|
|
callback();
|
|
}
|
|
};
|
|
|
|
return {
|
|
clubs: [],
|
|
evaluate: {},
|
|
popover: false,
|
|
multipleSelection: [],
|
|
honorTypeList: [],
|
|
evaluateList: [],
|
|
evaluateOptions: [],
|
|
gridData: [],
|
|
pageForm: {
|
|
year: new Date().getFullYear().toString(),
|
|
honorType: '',
|
|
honorLevel: ''
|
|
},
|
|
tableData: [],
|
|
isEdit: false,
|
|
formData: {
|
|
unionLeader: '',
|
|
evaluateId: '',
|
|
award: '',
|
|
deeds: '',
|
|
joinTime: '',
|
|
unionId: '',
|
|
jobTitle: '',
|
|
},
|
|
userLoading: false,
|
|
userOptions: [],
|
|
nationOptions: nation,
|
|
units: [],
|
|
unions: [],
|
|
isDisabled: false,
|
|
formRules: {
|
|
userId: [{required: true, message: '请填写申请人', trigger: ['blur', 'change']}],
|
|
clubLeader: [{required: true, message: '请填写协会会长', trigger: ['blur', 'change']}],
|
|
deeds: [{required: true, validator: validDeeds}],
|
|
dzPosition: [{required: true, message: '必填', trigger: ['blur', 'change']}]
|
|
},
|
|
tableColumns: [
|
|
{prop: 'honorName', label: '申请类型', sortable: true},
|
|
{prop: 'username', label: '申请人姓名', sortable: true},
|
|
// {prop: 'evaluateName', label: '评优评先名称', sortable: true},
|
|
{prop: 'loginname', label: '工号', sortable: true},
|
|
{prop: 'userSex', label: '性别', sortable: true},
|
|
{prop: 'unitName', label: '单位', sortable: true},
|
|
// {prop: 'political', label: '政治面貌', sortable: true},
|
|
// {prop: 'joinTime', label: '加入工会时间', sortable: true},
|
|
// {prop: 'position', label: '担任职务'},
|
|
{prop: 'unionName', label: '分工会'},
|
|
{prop: 'clubName', label: '协会'},
|
|
]
|
|
}
|
|
},
|
|
components: {
|
|
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
|
'evaluate-info': httpVueLoader('/components/evaluate/evaluateInfo.vue?v=1.0.2'),
|
|
},
|
|
methods: {
|
|
getStatus(row) {
|
|
const now = new Date().getTime()
|
|
const hdkssj = moment(row.startTime.valueOf())
|
|
const hdjssj = moment(row.endTime.valueOf())
|
|
|
|
if (now < hdkssj) {
|
|
return {
|
|
type: 'info',
|
|
name: '活动未开始'
|
|
}
|
|
} else if (now > hdkssj && now < hdjssj) {
|
|
return {
|
|
type: 'success',
|
|
name: '活动进行中'
|
|
}
|
|
} else if (now > hdjssj) {
|
|
return {
|
|
type: 'danger',
|
|
name: '活动已截止'
|
|
}
|
|
}
|
|
},
|
|
clickEvaluate(item) {
|
|
console.log(item)
|
|
this.pageForm.evaluateId = item.evaluateId
|
|
this.doSearch()
|
|
},
|
|
async saveForm() {
|
|
// const valid = await this.$refs.form.validate()
|
|
// if (!valid) return
|
|
|
|
const confirm = await this.$confirm('保存后可继续填写修改,您确认要保存吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
})
|
|
if ('confirm' !== confirm) return
|
|
|
|
this.formData.files = JSON.stringify(this.formData.files)
|
|
const resp = await $.post('/platform/evaluate/apply/saveForm', this.formData)
|
|
if (resp.code === 0) {
|
|
this.notifySuccess(resp.msg)
|
|
this.doSearch()
|
|
this.$refs.guava.index()
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
},
|
|
radioChange() {
|
|
if (this.pageForm.honorType === HonorApi.honor_single_id) {
|
|
this.tableColumns = [
|
|
{prop: 'username', label: '申请人姓名', sortable: true},
|
|
{prop: 'loginname', label: '工号', sortable: true},
|
|
{prop: 'userSex', label: '性别', sortable: true},
|
|
{prop: 'unitName', label: '单位', sortable: true},
|
|
{prop: 'political', label: '政治面貌', sortable: true},
|
|
// {prop: 'unionName', label: '工会', sortable: true},
|
|
// {prop: 'joinTime', label: '加入工会时间', sortable: true},
|
|
{prop: 'position', label: '担任职务'},
|
|
{prop: 'unionClub', label: '工会/协会'},
|
|
]
|
|
} else {
|
|
this.tableColumns = [
|
|
/* {prop: 'evaluateName', label: '评优评先名称', sortable: true},
|
|
{prop: 'applyUnionName', label: '申报院级工会', sortable: true},
|
|
{prop: 'unionLeader', label: '工会主席', sortable: true},
|
|
{prop: 'memberNumber', label: '会员人数', sortable: true},
|
|
{prop: 'unionGroupNumber', label: '工会小组数', sortable: true},*/
|
|
]
|
|
}
|
|
this.doSearch()
|
|
this.getEvaluateByYear()
|
|
},
|
|
async getEvaluateByYear() {
|
|
const {data} = await $.post('/platform/evaluate/apply/getEvaluateByYear', {
|
|
year: this.pageForm.year,
|
|
type: this.pageForm.honorType
|
|
})
|
|
this.evaluateOptions = data
|
|
this.doSearch()
|
|
},
|
|
popoverOK() {
|
|
if (this.multipleSelection) {
|
|
let str = '';
|
|
this.multipleSelection.forEach(item => {
|
|
const time = item.grantDate ? moment(item.grantDate).format('YYYY') + '-' : ''
|
|
str += time + item.prizeName + '\n'
|
|
})
|
|
str = str.substring(0, str.length - 1)
|
|
this.formData.award = str
|
|
this.popover = false
|
|
}
|
|
},
|
|
handleSelectionChange(val) {
|
|
this.multipleSelection = val;
|
|
},
|
|
dropdownCommand(command) {
|
|
const {type, data} = command
|
|
if (type == 'view') {
|
|
this.openView(data)
|
|
} else if (type == 'edit') {
|
|
this.openEdit(data)
|
|
} else if (type == 'delete') {
|
|
this.doDelete(data)
|
|
}
|
|
},
|
|
async getInfo(id) {
|
|
const {data, code, msg} = await $.get("/platform/evaluate/apply/findOne", {id})
|
|
if (data.files) {
|
|
data.files = JSON.parse(data.files)
|
|
}
|
|
return data;
|
|
},
|
|
openView(data) {
|
|
this.$refs.info.getInfo(data.id)
|
|
this.$refs.guava.view()
|
|
},
|
|
doDelete(row) {
|
|
this.$confirm('确定要删除吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
callback: async (a, b) => {
|
|
if ("confirm" == a) {//确认后再执行
|
|
this.$set(row, "delLoading", true)
|
|
const resp = await $.post('/platform/evaluate/apply/doDelete', {id: row.id})
|
|
this.$set(row, "delLoading", false)
|
|
if (resp.code === 0) {
|
|
this.pageData()
|
|
} else {
|
|
this.$message.warning(resp.msg)
|
|
}
|
|
}
|
|
}
|
|
});
|
|
},
|
|
async openEdit(data) {
|
|
this.evaluate = data
|
|
this.isEdit = true
|
|
this.isDisabled = false
|
|
// this.findData(data)
|
|
this.formData = await this.getInfo(data.id)
|
|
this.$refs.guava.edit()
|
|
|
|
this.$nextTick(() => {
|
|
if (this.evaluate && this.evaluate.honorName === '工会积极分子') {
|
|
this.$set(this.formRules, 'dzPosition', [{
|
|
required: false,
|
|
message: '必填',
|
|
trigger: ['blur', 'change']
|
|
}])
|
|
} else {
|
|
this.$set(this.formRules, 'dzPosition', [{
|
|
required: true,
|
|
message: '必填',
|
|
trigger: ['blur', 'change']
|
|
}])
|
|
}
|
|
this.$refs.form.clearValidate()
|
|
})
|
|
|
|
},
|
|
async findData(data) {
|
|
this.formData = {}
|
|
this.formData = clone(data)
|
|
if (this.formData.userId && this.formData.userId !== '') {
|
|
const user = await queryUserById(this.formData.userId)
|
|
user[0].jobTitle = data.jobTitle
|
|
this.setFormData(user)
|
|
} else {
|
|
this.$set(this.formData, 'userName', this.formData.userName)
|
|
}
|
|
this.formData.userId = data.username
|
|
this.$set(this.formData, "unionId", data.unionId)
|
|
this.$set(this.formData, "political", data.political)
|
|
this.$set(this.formData, "education", data.education)
|
|
// this.$set(this.formData, "position", data.position)
|
|
this.$set(this.formData, "honorType", data && data.honorTypeId === HonorApi.honor_single_id ? '个人荣誉' : '集体荣誉')
|
|
if (data.files && data.files.length > 0) this.$set(this.formData, "files", JSON.parse(data.files))
|
|
},
|
|
async userChange() {
|
|
const user = await queryUserById(this.formData.userId)
|
|
this.setFormData(user)
|
|
},
|
|
setFormData(user) {
|
|
this.$set(this.formData, "userSex", user[0].sex)
|
|
this.$set(this.formData, "userName", user[0].username)
|
|
this.$set(this.formData, "loginname", user[0].loginname)
|
|
this.$set(this.formData, "unitId", user[0].unitid)
|
|
this.$set(this.formData, "unionId", user[0].unionid)
|
|
this.$set(this.formData, "birthday", user[0].birthday)
|
|
this.$set(this.formData, "jobTitle", user[0].jobTitle)
|
|
// this.$set(this.formData, "position", user[0].position)
|
|
this.$set(this.formData, "unionName", user[0].unionname)
|
|
this.$set(this.formData, "unitName", user[0].unitname)
|
|
this.$set(this.formData, "userState", user[0].userState)
|
|
this.$set(this.formData, "political", user[0].political)
|
|
this.$set(this.formData, "education", user[0].education)
|
|
this.$set(this.formData, "nation", user[0].nation)
|
|
},
|
|
async userRemoteMethod(query) {
|
|
if (query) {
|
|
this.userLoading = true
|
|
this.userOptions = await searchUser(query)
|
|
this.userLoading = false
|
|
}
|
|
},
|
|
async applyEvaluate(item) {
|
|
this.evaluate = item
|
|
this.isEdit = false
|
|
const now = new Date().getTime()
|
|
const hdkssj = moment(item.startTime.valueOf())
|
|
const hdjssj = moment(item.endTime.valueOf())
|
|
|
|
if (now < hdkssj) {
|
|
this.$notify.warning({title: '提示', message: '活动暂未开始!'});
|
|
return
|
|
} else if (now > hdjssj) {
|
|
this.$notify.warning({title: '提示', message: '活动已截止!'});
|
|
return
|
|
}
|
|
if (item.groupId) {
|
|
const isExist = await getScopeUser(item.groupId)
|
|
if (!isExist) {
|
|
this.$notify.warning({title: '提示', message: '您不在参加人员范围内!'});
|
|
return
|
|
}
|
|
}
|
|
|
|
if (item.honorTypeId === HonorApi.honor_single_id) {
|
|
const o = await this.verifyApply(item.id)
|
|
if (o === false) {
|
|
return
|
|
}
|
|
}
|
|
|
|
const {data} = await $.get(loc() + '/getUserInfo')
|
|
this.formData = {
|
|
...data,
|
|
evaluateId: this.evaluate.id,
|
|
honorId: this.evaluate.honorId,
|
|
honorTypeId: this.evaluate.honorTypeId,
|
|
}
|
|
// await this.evaluateChange(item.id)
|
|
// this.formData = {}
|
|
this.$refs.guava.edit()
|
|
this.$nextTick(() => {
|
|
if (this.evaluate && this.evaluate.honorName === '工会积极分子') {
|
|
this.$set(this.formRules, 'dzPosition', [{
|
|
required: false,
|
|
message: '必填',
|
|
trigger: ['blur', 'change']
|
|
}])
|
|
} else {
|
|
this.$set(this.formRules, 'dzPosition', [{
|
|
required: true,
|
|
message: '必填',
|
|
trigger: ['blur', 'change']
|
|
}])
|
|
}
|
|
this.$refs.form.clearValidate()
|
|
})
|
|
},
|
|
async evaluateChange(val) {
|
|
const evaluate = this.evaluateList.find(o => o.id === val)
|
|
this.formData.honorType = evaluate && evaluate.honorTypeId === HonorApi.honor_single_id ? '个人荣誉' : '集体荣誉'
|
|
this.formData.honorTypeId = evaluate.honorTypeId
|
|
this.formData.honorId = evaluate.honorId
|
|
this.formData.evaluateId = val
|
|
let type = ''
|
|
if (this.formData.honorType === '个人荣誉') {
|
|
type = 'single'
|
|
await this.userRemoteMethod("${@shiro.getPrincipalProperty('loginname')}")
|
|
this.$set(this.formData, "userId", this.userOptions[0].id)
|
|
await this.userChange()
|
|
} else if (this.formData.honorType === '集体荣誉') {
|
|
type = 'list'
|
|
await this.userRemoteMethod("${@shiro.getPrincipalProperty('loginname')}")
|
|
this.$set(this.formData, "userId", this.userOptions[0].id)
|
|
const user = await queryUserById(this.formData.userId)
|
|
this.$set(this.formData, "unitId", user[0].unitid)
|
|
this.$set(this.formData, "unionId", user[0].unionid)
|
|
if (evaluate.pxxmlx == 1) {
|
|
await this.searchUnionInfo(this.formData.unionId)
|
|
} else {
|
|
this.searchClubInfo()
|
|
}
|
|
this.isDisabled = false
|
|
}
|
|
const {data} = await $.post('/platform/evaluate/apply/getHonor', {
|
|
type: type,
|
|
userId: this.formData.userId
|
|
})
|
|
this.gridData = data
|
|
},
|
|
async verifyApply(val) {
|
|
const res = await $.post('/platform/evaluate/apply/verifyApply', {evaluateId: val})
|
|
if (res.code === 0) {
|
|
this.isDisabled = false
|
|
return true
|
|
} else {
|
|
this.isDisabled = true
|
|
this.$notify.warning({title: '提示', message: res.msg});
|
|
return false
|
|
}
|
|
},
|
|
async doSubmit() {
|
|
const valid = await this.$refs.form.validate()
|
|
if (!valid) return
|
|
|
|
const confirm = await this.$confirm('提交后不能修改,您确认要提交吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
})
|
|
if ('confirm' !== confirm) return
|
|
|
|
this.formData.files = JSON.stringify(this.formData.files)
|
|
const resp = await $.post('/platform/evaluate/apply/doSubmit', this.formData)
|
|
if (resp.code === 0) {
|
|
this.notifySuccess(resp.msg)
|
|
this.doSearch()
|
|
this.$refs.guava.index()
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
},
|
|
async getClubs() {
|
|
const {code, data} = await $.post('/platform/evaluate/apply/getClubsByUserId')
|
|
if (code === 0) {
|
|
this.clubs = data
|
|
}
|
|
|
|
},
|
|
searchClubInfo(id) {
|
|
let club = {}
|
|
if (id) {
|
|
club = this.clubs.find(v => v.id === id)
|
|
} else {
|
|
club = this.clubs[0]
|
|
}
|
|
this.$set(this.formData, "clubName", club.name)
|
|
this.$set(this.formData, "clubId", club.id)
|
|
this.$set(this.formData, "clubNumber", club.clubNumber)
|
|
this.$set(this.formData, "clubLeader", club.username)
|
|
},
|
|
async initData() {
|
|
const {data} = await $.post('/platform/evaluate/getEvaluateList')
|
|
this.evaluateList = data
|
|
|
|
this.units = await getUnits(null)
|
|
this.unions = await getUnions(null)
|
|
await this.getClubs()
|
|
|
|
// await this.userRemoteMethod("${@shiro.getPrincipalProperty('loginname')}")
|
|
// this.$set(this.formData, "userId", this.userOptions[0].id)
|
|
// await this.userChange()
|
|
},
|
|
async pageData() {
|
|
const res = await $.post('/platform/evaluate/apply/pageData', this.pageForm)
|
|
if (res.code === 0) {
|
|
this.tableData = res.data.list;
|
|
this.pageForm.totalCount = res.data.totalCount;
|
|
}
|
|
},
|
|
async searchUnionInfo(id) {
|
|
const resp = await $.get('/platform/evaluate/apply/getUnionInfo', {id: id})
|
|
if (resp.code === 0) {
|
|
this.$set(this.formData, "memberNumber", resp.data.memberNumber)
|
|
this.$set(this.formData, "unionLeader", resp.data.username)
|
|
}
|
|
const data = await unionGroupsByUnionId(id)
|
|
this.formData.unionGroupNumber = data.length
|
|
},
|
|
},
|
|
watch: {},
|
|
async created() {
|
|
this.honorTypeList = await HonorApi.getHonorType()
|
|
if (this.honorTypeList) {
|
|
this.$set(this.pageForm, "honorType", this.honorTypeList[0].id)
|
|
}
|
|
await this.initData()
|
|
await this.getEvaluateByYear()
|
|
this.pageData()
|
|
}
|
|
})
|
|
</script>
|
|
<!--#
|
|
}
|
|
#-->
|