Compare commits
No commits in common. 'dev-sm4' and 'master' have entirely different histories.
Before Width: | Height: | Size: 13 KiB |
@ -1,8 +0,0 @@
|
|||||||
import request from "@/utils/request";
|
|
||||||
|
|
||||||
export function getNotice() {
|
|
||||||
return request({
|
|
||||||
url: "/system/notice/getNotice",
|
|
||||||
method: "get",
|
|
||||||
});
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询公告列表
|
|
||||||
export function listAduit(query) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/audit/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//查询详细
|
|
||||||
export function getDetail(query) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/apply/detail/' + query,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//审核通过/不通过
|
|
||||||
export function filePass(fileId,fileState) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/file/filePass',
|
|
||||||
method: 'get',
|
|
||||||
params:{
|
|
||||||
fileId :fileId ,
|
|
||||||
fileState:fileState,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//材料校验
|
|
||||||
export function checkFile(applyId ){
|
|
||||||
return request({
|
|
||||||
url: '/reward/file/checkFile/'+applyId,
|
|
||||||
method: 'get',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//审核提交
|
|
||||||
export function approved(applyId){
|
|
||||||
return request({
|
|
||||||
url: '/reward/audit/approved/'+ applyId,
|
|
||||||
method: 'get',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//退回
|
|
||||||
export function applyBack(applyId,applyMsg){
|
|
||||||
return request({
|
|
||||||
url: '/reward/audit/applyBack',
|
|
||||||
method: 'get',
|
|
||||||
params:{
|
|
||||||
applyId:applyId,
|
|
||||||
applyMsg:applyMsg
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,66 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询公告列表
|
|
||||||
export function listApply(query) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/apply/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//根据奖项类型生成applyId
|
|
||||||
export function getApplyId(query) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/apply/getApplyId',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//查询详细
|
|
||||||
export function getDetail(query) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/apply/detail/' + query,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 修改
|
|
||||||
export function updateApply(data) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/apply/submit',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 删除公告
|
|
||||||
export function delApply(applyId) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/apply/delete/' + applyId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 删除文件
|
|
||||||
export function delFile(fileId) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/file/delFile/' + fileId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 查询文件列表
|
|
||||||
export function listFile(query) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/file/getFileInfo',
|
|
||||||
method: 'get',
|
|
||||||
params: {applyId:query}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//材料申请校验
|
|
||||||
export function checkUploadFile(applyId,applyType) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/apply/checkUploadFile',
|
|
||||||
method: 'get',
|
|
||||||
params:{
|
|
||||||
applyId:applyId,
|
|
||||||
applyType:applyType
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,60 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询公告列表
|
|
||||||
export function listScore(query) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/score/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//查询详细
|
|
||||||
export function getScoreInfo(query) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/score/getScoreInfo/',
|
|
||||||
method: 'get',
|
|
||||||
params:{
|
|
||||||
applyId:query
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//查询详细
|
|
||||||
export function getDetail(query) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/apply/detail/' + query,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 修改
|
|
||||||
export function scoreSave(data) {
|
|
||||||
return request({
|
|
||||||
url: '/reward/score/save',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//材料校验
|
|
||||||
export function checkFile(applyId ){
|
|
||||||
return request({
|
|
||||||
url: '/reward/file/checkFile/'+applyId,
|
|
||||||
method: 'get',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//审核提交
|
|
||||||
export function approved(applyId){
|
|
||||||
return request({
|
|
||||||
url: '/reward/audit/approved/'+ applyId,
|
|
||||||
method: 'get',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//退回
|
|
||||||
export function applyBack(applyId,applyMsg){
|
|
||||||
return request({
|
|
||||||
url: '/reward/audit/applyBack',
|
|
||||||
method: 'get',
|
|
||||||
params:{
|
|
||||||
applyId:applyId,
|
|
||||||
applyMsg:applyMsg
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 1008 KiB |
After Width: | Height: | Size: 137 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 5.5 KiB |
@ -1,126 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 表格部分-->
|
|
||||||
<el-table v-loading="loading" :row-selection="true" :data="tableData" @select="handleSelectionChange">
|
|
||||||
<el-table-column v-for="(column, index) in columns" :key="index" :label="column.label" :prop="column.prop" :align="column.align" :width="column.width">
|
|
||||||
<template v-if="column.type === 'date'" v-slot:default="scope">
|
|
||||||
<span>{{ parseTime(scope.row[column.prop], '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="column.slotName === 'customSlotName'" v-slot:default="scope">
|
|
||||||
<dict-tag :options="dict.type.rew_apply_status" :value="scope.row[column.prop]"/>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="column.slotName === 'scoreStatus'" v-slot:default="scope">
|
|
||||||
<el-tag v-for="(item,index) in scoreStatus" :key="index" :type="item.type" v-if="item.dictValue === scope.row.scoreStatus">{{item.dictLabel}}</el-tag>
|
|
||||||
</template>
|
|
||||||
<template v-else v-slot:default="scope">
|
|
||||||
<span>{{ scope.row[column.prop] }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<!-- Actions Column -->
|
|
||||||
<el-table-column v-if="actions.length > 0 && modalType !== 'score'" label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button v-for="(action, index) in filteredActions(scope.row.applyStatus)" :key="index" size="mini" type="text" :icon="action.icon" @click="action.handler(scope.row)">{{ action.text }}</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column v-else label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button v-for="(action, index) in actions" :key="index" size="mini" type="text" :icon="action.icon" @click="action.handler(scope.row)">{{ action.text }}</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {parseTime} from "@/utils/ruoyi";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
dicts: ['rew_apply_status'],
|
|
||||||
props: {
|
|
||||||
columns: {
|
|
||||||
type: Array,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
tableData: {
|
|
||||||
type: Array,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
loading: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
actions: {
|
|
||||||
type: Array,
|
|
||||||
default: () => []
|
|
||||||
},
|
|
||||||
// 查询参数
|
|
||||||
queryParams:{
|
|
||||||
type:Object,
|
|
||||||
default:()=>{}
|
|
||||||
},
|
|
||||||
//显示搜索条件
|
|
||||||
showSearch:{
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
applyType:{
|
|
||||||
type:String,
|
|
||||||
default:'',
|
|
||||||
},
|
|
||||||
modalType:{
|
|
||||||
type:String,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data(){
|
|
||||||
return {
|
|
||||||
scoreStatus:[
|
|
||||||
{
|
|
||||||
dictLabel:"未评分",
|
|
||||||
dictValue:0,
|
|
||||||
type:"danger"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dictLabel:"已评分",
|
|
||||||
dictValue:1,
|
|
||||||
type:"success",
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
parseTime,
|
|
||||||
filteredActions(applyStatus) {
|
|
||||||
if(applyStatus === 0 || applyStatus === 1){
|
|
||||||
return this.actions.filter(action => action.text !== '退回意见');
|
|
||||||
}
|
|
||||||
if (applyStatus === 3) {
|
|
||||||
return this.actions
|
|
||||||
} else if(applyStatus === 2 || applyStatus === 4){
|
|
||||||
return this.actions.filter(action => action.text === '查看');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//父组件搜索方法
|
|
||||||
getList(query){
|
|
||||||
this.$emit('getList', query);
|
|
||||||
},
|
|
||||||
//父组件搜索方法
|
|
||||||
handleAdd(applyType){
|
|
||||||
this.$emit('handleAdd', applyType);
|
|
||||||
},
|
|
||||||
//父组件搜索方法
|
|
||||||
handleQuery(query){
|
|
||||||
this.$emit('handleQuery', query);
|
|
||||||
},
|
|
||||||
resetQuery(query){
|
|
||||||
this.$emit('resetQuery', query);
|
|
||||||
},
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.$emit('handleSelectionChange', selection);
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -1,19 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
//获取验证图片
|
|
||||||
export function reqGet(data) {
|
|
||||||
return request({
|
|
||||||
url: '/captcha/get',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
//滑动或者点选验证
|
|
||||||
export function reqCheck(data) {
|
|
||||||
return request({
|
|
||||||
url: '/captcha/check',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
import CryptoJS from 'crypto-js'
|
|
||||||
/**
|
|
||||||
* @word 要加密的内容
|
|
||||||
* @keyWord String 服务器随机返回的关键字
|
|
||||||
* */
|
|
||||||
export function aesEncrypt(word, keyWord = "XwKsGlMcdPMEhR1B") {
|
|
||||||
var key = CryptoJS.enc.Utf8.parse(keyWord);
|
|
||||||
var srcs = CryptoJS.enc.Utf8.parse(word);
|
|
||||||
var encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 });
|
|
||||||
return encrypted.toString();
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
export function resetSize(vm) {
|
|
||||||
var img_width, img_height, bar_width, bar_height; //图片的宽度、高度,移动条的宽度、高度
|
|
||||||
|
|
||||||
var parentWidth = vm.$el.parentNode.offsetWidth || window.offsetWidth
|
|
||||||
var parentHeight = vm.$el.parentNode.offsetHeight || window.offsetHeight
|
|
||||||
|
|
||||||
if (vm.imgSize.width.indexOf('%') != -1) {
|
|
||||||
img_width = parseInt(this.imgSize.width) / 100 * parentWidth + 'px'
|
|
||||||
} else {
|
|
||||||
img_width = this.imgSize.width;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vm.imgSize.height.indexOf('%') != -1) {
|
|
||||||
img_height = parseInt(this.imgSize.height) / 100 * parentHeight + 'px'
|
|
||||||
} else {
|
|
||||||
img_height = this.imgSize.height
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vm.barSize.width.indexOf('%') != -1) {
|
|
||||||
bar_width = parseInt(this.barSize.width) / 100 * parentWidth + 'px'
|
|
||||||
} else {
|
|
||||||
bar_width = this.barSize.width
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vm.barSize.height.indexOf('%') != -1) {
|
|
||||||
bar_height = parseInt(this.barSize.height) / 100 * parentHeight + 'px'
|
|
||||||
} else {
|
|
||||||
bar_height = this.barSize.height
|
|
||||||
}
|
|
||||||
|
|
||||||
return { imgWidth: img_width, imgHeight: img_height, barWidth: bar_width, barHeight: bar_height }
|
|
||||||
}
|
|
||||||
|
|
||||||
export const _code_chars = [1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
|
|
||||||
export const _code_color1 = ['#fffff0', '#f0ffff', '#f0fff0', '#fff0f0']
|
|
||||||
export const _code_color2 = ['#FF0033', '#006699', '#993366', '#FF9900', '#66CC66', '#FF33CC']
|
|
@ -1,36 +0,0 @@
|
|||||||
const state = {
|
|
||||||
applyType:'',
|
|
||||||
applyId:''
|
|
||||||
}
|
|
||||||
const mutations = {
|
|
||||||
SET_APPLYTYPE: (state, { key, value }) => {
|
|
||||||
if (key !== null && key !== "") {
|
|
||||||
state.applyType = value
|
|
||||||
}
|
|
||||||
},
|
|
||||||
SET_APPLYID: (state, { key, value }) => {
|
|
||||||
if (key !== null && key !== "") {
|
|
||||||
state.applyId = value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const actions = {
|
|
||||||
// 设置字典
|
|
||||||
setApplyType({ commit }, data) {
|
|
||||||
commit('SET_APPLYTYPE', data)
|
|
||||||
},
|
|
||||||
// 设置字典
|
|
||||||
setApplyId({ commit }, data) {
|
|
||||||
localStorage.setItem('applyId', data.value)
|
|
||||||
commit('SET_APPLYID', data)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
namespaced: true,
|
|
||||||
state,
|
|
||||||
mutations,
|
|
||||||
actions
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
const state = {
|
|
||||||
applyType:'',
|
|
||||||
applyId:''
|
|
||||||
}
|
|
||||||
const mutations = {
|
|
||||||
SET_APPLYTYPE: (state, { key, value }) => {
|
|
||||||
if (key !== null && key !== "") {
|
|
||||||
state.applyType = value
|
|
||||||
}
|
|
||||||
},
|
|
||||||
SET_APPLYID: (state, { key, value }) => {
|
|
||||||
if (key !== null && key !== "") {
|
|
||||||
state.applyId = value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const actions = {
|
|
||||||
// 设置字典
|
|
||||||
setApplyType({ commit }, data) {
|
|
||||||
commit('SET_APPLYTYPE', data)
|
|
||||||
},
|
|
||||||
// 设置字典
|
|
||||||
setApplyId({ commit }, data) {
|
|
||||||
localStorage.setItem('applyId', data.value)
|
|
||||||
commit('SET_APPLYID', data)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
namespaced: true,
|
|
||||||
state,
|
|
||||||
mutations,
|
|
||||||
actions
|
|
||||||
}
|
|
||||||
|
|
@ -1,397 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索部分-->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="创建者" prop="createBy">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.createBy"
|
|
||||||
placeholder="请输入创建者"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="奖项名称" prop="applyName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.applyName"
|
|
||||||
placeholder="请输入奖项名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<custom-table
|
|
||||||
:columns="tableColumns"
|
|
||||||
:tableData="noticeList"
|
|
||||||
:loading="loading"
|
|
||||||
:actions="tableActions"
|
|
||||||
:query-params="queryParams"
|
|
||||||
:apply-type="applyParam.applyType"
|
|
||||||
@handleQuery="handleQuery"
|
|
||||||
@resetQuery="resetQuery"
|
|
||||||
@handleView="handleView"
|
|
||||||
@getList="getList"
|
|
||||||
@handleSelectionChange="handleSelectionChange"
|
|
||||||
></custom-table>
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
<!-- 修改公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="editOpen" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
ref="childComponent"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" @click="submitAduit">审核提交</el-button>
|
|
||||||
<el-button type="danger" v-if="isView === true" @click="callback">退 回</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
listAduit,
|
|
||||||
getDetail,
|
|
||||||
checkFile,
|
|
||||||
approved, applyBack
|
|
||||||
} from "@/api/reward/aduit";
|
|
||||||
import CustomTable from "@/components/CustomTable/CustomTable.vue";
|
|
||||||
import Update from '@/components/AllTypeFile/update.vue'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "aduit",
|
|
||||||
components: {CustomTable, Update},
|
|
||||||
dicts: ['rew_apply_status','rew_contribution_award'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
templateType:'aduit',
|
|
||||||
dialogType: 'edit',
|
|
||||||
modalType:'',
|
|
||||||
isShowUploadButton:false,
|
|
||||||
//列数据
|
|
||||||
tableColumns: [
|
|
||||||
{label: '创建者', prop: 'createBy', align: 'center'},
|
|
||||||
{label: '奖项名称', prop: 'applyName', align: 'center', showOverflowTooltip: true},
|
|
||||||
{label: '状态', prop: 'applyStatus', align: 'center', slotName: 'customSlotName'},
|
|
||||||
{label: '创建时间', prop: 'createTime', align: 'center'},
|
|
||||||
{label: '提交时间', prop: 'appTime', align: 'center', type: 'date'},
|
|
||||||
],
|
|
||||||
//操作列
|
|
||||||
tableActions: [
|
|
||||||
{text: '查看', icon: 'el-icon-view', handler: this.handleView,},
|
|
||||||
{text: '审核', icon: 'el-icon-edit', handler: this.handleUpdate,},
|
|
||||||
],
|
|
||||||
//文件上传配置项
|
|
||||||
fileData:[],
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 公告表格数据
|
|
||||||
noticeList: [],
|
|
||||||
isReadOnly: false,
|
|
||||||
isShowButton: true,
|
|
||||||
isView: false,
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
editOpen: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: '1',
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
applyName: [
|
|
||||||
{required: true, message: "奖项名称不能为空", trigger: "blur"}
|
|
||||||
],
|
|
||||||
isReward: [
|
|
||||||
{required: true, message: "请选择", trigger: "change"}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
applyParam: {
|
|
||||||
applyType: ''
|
|
||||||
},
|
|
||||||
applyId: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if (this.$route.path.includes('contributionAward') === true) {
|
|
||||||
this.$store.dispatch('apply/setApplyType', {key: 'applyType', value: 'rew_contribution_award'});
|
|
||||||
this.applyParam.applyType = this.$store.state.apply.applyType;
|
|
||||||
this.queryParams.applyType = this.$store.state.apply.applyType;
|
|
||||||
}
|
|
||||||
this.getList('mounted');
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询公告列表 */
|
|
||||||
getList(item) {
|
|
||||||
this.loading = true;
|
|
||||||
let queryObj = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyStatus: '1',
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
}
|
|
||||||
listAduit(item === 'mounted' ? queryObj : this.queryParams).then(response => {
|
|
||||||
this.noticeList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
this.fileData = this.dict.type.rew_contribution_award.map(item => {
|
|
||||||
return {
|
|
||||||
name: item.label,
|
|
||||||
fileCode: item.value,
|
|
||||||
status: '',
|
|
||||||
expanded: false,
|
|
||||||
childrenList: []
|
|
||||||
};
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
// applyName: undefined,
|
|
||||||
isReward: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
// 查询参数
|
|
||||||
this.queryParams = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: '1',
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
};
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.applyId)
|
|
||||||
this.single = selection.length != 1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/**查看按钮 */
|
|
||||||
handleView(row) {
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "查看申请";
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.isShowButton = true
|
|
||||||
this.dialogType = 'view'
|
|
||||||
this.modalType = 'score'
|
|
||||||
this.templateType = 'applyView'
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
console.log(this.form)
|
|
||||||
this.editOpen = true;
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.isView = false
|
|
||||||
this.fileData.forEach((item) => {
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName: item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state: item.fileState,
|
|
||||||
fileId: item.fileId,
|
|
||||||
fileCode: item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
this.isView = true;
|
|
||||||
this.applyId = row.applyId
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.isShowButton = true
|
|
||||||
this.isShowUploadButton = false
|
|
||||||
this.dialogType = 'edit'
|
|
||||||
this.modalType = 'aduit'
|
|
||||||
this.templateType = 'aduit'
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form.isReward = response.data.isReward;
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "申请审核";
|
|
||||||
this.fileData.forEach((item) => {
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName: item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state: item.fileState,
|
|
||||||
fileId: item.fileId,
|
|
||||||
fileCode: item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
submitAduit(){
|
|
||||||
checkFile(this.applyId).then(res => {
|
|
||||||
if(res.code === 200){
|
|
||||||
approved(this.applyId).then(resp => {
|
|
||||||
if (resp.code === 200){
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList('mounted')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.$modal.msgError(res.msg)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
callback(){
|
|
||||||
this.$prompt('请输入退回意见', '退回意见', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
inputType: 'textarea',
|
|
||||||
customClass: 'custom-prompt'
|
|
||||||
}).then(({ value }) => {
|
|
||||||
applyBack(this.applyId, value).then(res => {
|
|
||||||
if (res.code === 200){
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList('mounted')
|
|
||||||
}else{
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.$modal.confirm('是否确认删除申请?').then(function () {
|
|
||||||
return delApply(applyId);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
localStorage.removeItem('applyId');
|
|
||||||
}).catch(() => {
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="scss">
|
|
||||||
.custom-prompt{
|
|
||||||
.el-textarea__inner{
|
|
||||||
min-height: 120px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
::v-deep .el-dialog--center .el-dialog__body {
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .el-dialog__footer {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.fullscreen-dialog {
|
|
||||||
.el-dialog__wrapper {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 1000;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5); /* 遮罩层透明度 */
|
|
||||||
}
|
|
||||||
.el-dialog {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,473 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索部分-->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="创建者" prop="createBy">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.createBy"
|
|
||||||
placeholder="请输入创建者"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="奖项名称" prop="applyName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.applyName"
|
|
||||||
placeholder="请输入奖项名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="applyStatus">
|
|
||||||
<el-select v-model="queryParams.applyStatus" placeholder="状态" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.rew_apply_status"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
>申请</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
<custom-table
|
|
||||||
:columns="tableColumns"
|
|
||||||
:tableData="noticeList"
|
|
||||||
:loading="loading"
|
|
||||||
:actions="tableActions"
|
|
||||||
:query-params="queryParams"
|
|
||||||
:apply-type="applyParam.applyType"
|
|
||||||
@handleQuery="handleQuery"
|
|
||||||
@resetQuery="resetQuery"
|
|
||||||
@handleView="handleView"
|
|
||||||
@handleAdd="handleAdd"
|
|
||||||
@getList="getList"
|
|
||||||
@handleSelectionChange="handleSelectionChange"
|
|
||||||
></custom-table>
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或查看公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="open" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" :disabled="isDisabled" @click="submitForm">提 交</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<!-- 修改公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="editOpen" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
ref="childComponent"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" @click="submitForm">提 交</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
listApply,
|
|
||||||
getDetail,
|
|
||||||
getApplyId,
|
|
||||||
updateApply,
|
|
||||||
delApply, listFile, checkUploadFile
|
|
||||||
} from "@/api/reward/apply";
|
|
||||||
import CustomTable from "@/components/CustomTable/CustomTable.vue";
|
|
||||||
import Update from '@/components/AllTypeFile/update.vue'
|
|
||||||
export default {
|
|
||||||
name: "apply",
|
|
||||||
components: {CustomTable,Update},
|
|
||||||
dicts: ['rew_apply_status','rew_contribution_award'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
templateType:'apply',
|
|
||||||
dialogType:'edit',
|
|
||||||
modalType:'',
|
|
||||||
isShowUploadButton:false,
|
|
||||||
//列数据
|
|
||||||
tableColumns: [
|
|
||||||
{ label: '创建者', prop: 'createBy', align: 'center' },
|
|
||||||
{ label: '奖项名称', prop: 'applyName', align: 'center', showOverflowTooltip: true },
|
|
||||||
{ label: '状态', prop: 'applyStatus', align: 'center',slotName: 'customSlotName' },
|
|
||||||
{ label: '创建时间', prop: 'createTime', align: 'center' },
|
|
||||||
{ label: '提交时间', prop: 'appTime', align: 'center',type:'date' },
|
|
||||||
],
|
|
||||||
//操作列
|
|
||||||
tableActions: [
|
|
||||||
{ text: '查看', icon: 'el-icon-view', handler: this.handleView,},
|
|
||||||
{ text: '修改', icon: 'el-icon-edit', handler: this.handleUpdate, },
|
|
||||||
{ text: '删除', icon: 'el-icon-delete', handler: this.handleDelete,},
|
|
||||||
{ text: '退回意见', icon: 'el-icon-s-comment', handler: this.applyMsg,}
|
|
||||||
],
|
|
||||||
//文件上传配置项
|
|
||||||
fileData:[],
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 公告表格数据
|
|
||||||
noticeList: [],
|
|
||||||
isReadOnly:false,
|
|
||||||
isShowButton:true,
|
|
||||||
isView:false,
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
editOpen:false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: undefined,
|
|
||||||
applyType:undefined,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form:{},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
applyName: [
|
|
||||||
{ required: true, message: "奖项名称不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
isReward: [
|
|
||||||
{ required: true, message: "请选择", trigger: "change" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
applyParam:{
|
|
||||||
applyType:''
|
|
||||||
},
|
|
||||||
applyId:'',
|
|
||||||
isDisabled:false,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if(this.$route.path.includes('contributionAward') === true){
|
|
||||||
this.$store.dispatch('apply/setApplyType', { key: 'applyType', value: 'rew_contribution_award' });
|
|
||||||
this.applyParam.applyType = this.$store.state.apply.applyType;
|
|
||||||
this.queryParams.applyType = this.$store.state.apply.applyType;
|
|
||||||
}
|
|
||||||
this.getList('mounted');
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询公告列表 */
|
|
||||||
getList(item) {
|
|
||||||
this.loading = true;
|
|
||||||
let queryObj = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyStatus:undefined,
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
}
|
|
||||||
listApply(item ==='mounted' ? queryObj:this.queryParams).then(response => {
|
|
||||||
this.noticeList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
this.fileData = this.dict.type.rew_contribution_award.map(item => {
|
|
||||||
return {
|
|
||||||
name: item.label,
|
|
||||||
fileCode: item.value,
|
|
||||||
status: '',
|
|
||||||
expanded: false,
|
|
||||||
childrenList: []
|
|
||||||
};
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.reset();
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
// applyName: undefined,
|
|
||||||
isReward: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
// 查询参数
|
|
||||||
this.queryParams = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: undefined,
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
};
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.applyId)
|
|
||||||
this.single = selection.length!=1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
applyMsg(row){
|
|
||||||
let applyMsg = row.applyMsg
|
|
||||||
this.$alert(applyMsg, '退回意见', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**查看按钮 */
|
|
||||||
handleView(row){
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "查看申请";
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.isShowUploadButton = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.modalType = 'score'
|
|
||||||
this.templateType = 'applyView'
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
console.log(this.form)
|
|
||||||
this.editOpen = true;
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.isView = false
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName:item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state:item.fileState,
|
|
||||||
fileId:item.fileId,
|
|
||||||
fileCode:item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd(applyType) {
|
|
||||||
this.reset();
|
|
||||||
this.isView=true;
|
|
||||||
this.open = true;
|
|
||||||
this.isReadOnly = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.isShowUploadButton = true
|
|
||||||
this.modalType = 'apply'
|
|
||||||
this.templateType = 'apply'
|
|
||||||
this.title = "添加申请";
|
|
||||||
// if(this.noticeList.length === 0){
|
|
||||||
getApplyId(this.applyParam).then(response => {
|
|
||||||
if (response.code === 200){
|
|
||||||
this.$store.dispatch('apply/setApplyId', { key: 'applyId', value: response.data.applyId });
|
|
||||||
this.applyId = localStorage.getItem('applyId')
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
}).catch((err)=>{
|
|
||||||
this.isDisabled = true
|
|
||||||
});
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
this.isView=true;
|
|
||||||
this.applyId = row.applyId
|
|
||||||
this.isReadOnly = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.isShowUploadButton = true
|
|
||||||
this.modalType = 'apply'
|
|
||||||
this.templateType = 'apply'
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form.isReward = response.data.isReward;
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "修改申请";
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName:item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state:item.fileState,
|
|
||||||
fileId:item.fileId,
|
|
||||||
fileCode:item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm: function() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
this.form.applyId = this.applyId
|
|
||||||
if (this.form.applyId !== '') {
|
|
||||||
checkUploadFile(this.applyId,this.applyParam.applyType).then((res)=>{
|
|
||||||
if (res.code === 200){
|
|
||||||
updateApply(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("提交成功");
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
this.$modal.msgError(res.msg);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.$modal.confirm('是否确认删除申请?').then(function() {
|
|
||||||
return delApply(applyId);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
localStorage.removeItem('applyId');
|
|
||||||
}).catch(() => {});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
::v-deep .el-table__cell{
|
|
||||||
padding: 8px 0;
|
|
||||||
}
|
|
||||||
::v-deep .el-dialog--center .el-dialog__body{
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
::v-deep .el-dialog__footer{
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.fullscreen-dialog {
|
|
||||||
.el-dialog__wrapper {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 1000;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5); /* 遮罩层透明度 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,389 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索部分-->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="创建者" prop="createBy">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.createBy"
|
|
||||||
placeholder="请输入创建者"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="奖项名称" prop="applyName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.applyName"
|
|
||||||
placeholder="请输入奖项名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<custom-table
|
|
||||||
:columns="tableColumns"
|
|
||||||
:tableData="noticeList"
|
|
||||||
:loading="loading"
|
|
||||||
:actions="tableActions"
|
|
||||||
:query-params="queryParams"
|
|
||||||
:apply-type="applyParam.applyType"
|
|
||||||
@handleQuery="handleQuery"
|
|
||||||
@resetQuery="resetQuery"
|
|
||||||
@handleView="handleView"
|
|
||||||
@getList="getList"
|
|
||||||
@handleSelectionChange="handleSelectionChange"
|
|
||||||
></custom-table>
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
<!-- 修改公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="editOpen" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
ref="childComponent"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" @click="submitAduit">审核提交</el-button>
|
|
||||||
<el-button type="danger" v-if="isView === true" @click="callback">退 回</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
listAduit,
|
|
||||||
getDetail,
|
|
||||||
checkFile,
|
|
||||||
approved, applyBack
|
|
||||||
} from "@/api/reward/aduit";
|
|
||||||
import CustomTable from "@/components/CustomTable/CustomTable.vue";
|
|
||||||
import Update from '@/components/AllTypeFile/update.vue'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "aduit",
|
|
||||||
components: {CustomTable, Update},
|
|
||||||
dicts: ['rew_apply_status','rew_principal_award'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
templateType:'aduit',
|
|
||||||
dialogType: 'edit',
|
|
||||||
modalType:'',
|
|
||||||
isShowUploadButton:false,
|
|
||||||
//列数据
|
|
||||||
tableColumns: [
|
|
||||||
{label: '创建者', prop: 'createBy', align: 'center'},
|
|
||||||
{label: '奖项名称', prop: 'applyName', align: 'center', showOverflowTooltip: true},
|
|
||||||
{label: '状态', prop: 'applyStatus', align: 'center', slotName: 'customSlotName'},
|
|
||||||
{label: '创建时间', prop: 'createTime', align: 'center'},
|
|
||||||
{label: '提交时间', prop: 'appTime', align: 'center', type: 'date'},
|
|
||||||
],
|
|
||||||
//操作列
|
|
||||||
tableActions: [
|
|
||||||
{text: '查看', icon: 'el-icon-view', handler: this.handleView,},
|
|
||||||
{text: '审核', icon: 'el-icon-edit', handler: this.handleUpdate,},
|
|
||||||
],
|
|
||||||
//文件上传配置项
|
|
||||||
fileData:[],
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 公告表格数据
|
|
||||||
noticeList: [],
|
|
||||||
isReadOnly: false,
|
|
||||||
isShowButton: true,
|
|
||||||
isView: false,
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
editOpen: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: '1',
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
applyName: [
|
|
||||||
{required: true, message: "奖项名称不能为空", trigger: "blur"}
|
|
||||||
],
|
|
||||||
isReward: [
|
|
||||||
{required: true, message: "请选择", trigger: "change"}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
applyParam: {
|
|
||||||
applyType: ''
|
|
||||||
},
|
|
||||||
applyId: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if (this.$route.path.includes('principalAward') === true) {
|
|
||||||
this.$store.dispatch('apply/setApplyType', {key: 'applyType', value: 'rew_principal_award'});
|
|
||||||
this.applyParam.applyType = this.$store.state.apply.applyType;
|
|
||||||
this.queryParams.applyType = this.$store.state.apply.applyType;
|
|
||||||
}
|
|
||||||
this.getList('mounted');
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询公告列表 */
|
|
||||||
getList(item) {
|
|
||||||
this.loading = true;
|
|
||||||
let queryObj = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyStatus: '1',
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
}
|
|
||||||
listAduit(item === 'mounted' ? queryObj : this.queryParams).then(response => {
|
|
||||||
this.noticeList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
this.fileData = this.dict.type.rew_principal_award.map(item => {
|
|
||||||
return {
|
|
||||||
name: item.label,
|
|
||||||
fileCode: item.value,
|
|
||||||
status: '',
|
|
||||||
expanded: false,
|
|
||||||
childrenList: []
|
|
||||||
};
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
// applyName: undefined,
|
|
||||||
isReward: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
// 查询参数
|
|
||||||
this.queryParams = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: '1',
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
};
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.applyId)
|
|
||||||
this.single = selection.length != 1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/**查看按钮 */
|
|
||||||
handleView(row) {
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "查看申请";
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.isShowButton = true
|
|
||||||
this.dialogType = 'view'
|
|
||||||
this.modalType = 'score'
|
|
||||||
this.templateType = 'applyView'
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.editOpen = true;
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.isView = false
|
|
||||||
this.fileData.forEach((item) => {
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName: item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state: item.fileState,
|
|
||||||
fileId: item.fileId,
|
|
||||||
fileCode: item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
this.isView = true;
|
|
||||||
this.applyId = row.applyId
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.dialogType = 'edit'
|
|
||||||
this.modalType = 'aduit'
|
|
||||||
this.templateType = 'aduit'
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form.isReward = response.data.isReward;
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "申请审核";
|
|
||||||
this.fileData.forEach((item) => {
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName: item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state: item.fileState,
|
|
||||||
fileId: item.fileId,
|
|
||||||
fileCode: item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
submitAduit(){
|
|
||||||
checkFile(this.applyId).then(res => {
|
|
||||||
if(res.code === 200){
|
|
||||||
approved(this.applyId).then(resp => {
|
|
||||||
if (resp.code === 200){
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList('mounted')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.$modal.msgError(res.msg)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
callback(){
|
|
||||||
this.$prompt('请输入退回意见', '退回意见', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
inputType: 'textarea',
|
|
||||||
customClass: 'custom-prompt'
|
|
||||||
}).then(({ value }) => {
|
|
||||||
applyBack(this.applyId, value).then(res => {
|
|
||||||
if (res.code === 200){
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList('mounted')
|
|
||||||
}else{
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.$modal.confirm('是否确认删除申请?').then(function () {
|
|
||||||
return delApply(applyId);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
localStorage.removeItem('applyId');
|
|
||||||
}).catch(() => {
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
::v-deep .el-dialog--center .el-dialog__body {
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .el-dialog__footer {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fullscreen-dialog {
|
|
||||||
.el-dialog__wrapper {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 1000;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5); /* 遮罩层透明度 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,473 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索部分-->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="创建者" prop="createBy">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.createBy"
|
|
||||||
placeholder="请输入创建者"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="奖项名称" prop="applyName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.applyName"
|
|
||||||
placeholder="请输入奖项名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="applyStatus">
|
|
||||||
<el-select v-model="queryParams.applyStatus" placeholder="状态" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.rew_apply_status"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
>申请</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
<custom-table
|
|
||||||
:columns="tableColumns"
|
|
||||||
:tableData="noticeList"
|
|
||||||
:loading="loading"
|
|
||||||
:actions="tableActions"
|
|
||||||
:query-params="queryParams"
|
|
||||||
:apply-type="applyParam.applyType"
|
|
||||||
@handleQuery="handleQuery"
|
|
||||||
@resetQuery="resetQuery"
|
|
||||||
@handleView="handleView"
|
|
||||||
@handleAdd="handleAdd"
|
|
||||||
@getList="getList"
|
|
||||||
@handleSelectionChange="handleSelectionChange"
|
|
||||||
></custom-table>
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或查看公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="open" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" :disabled="isDisabled" @click="submitForm">提 交</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<!-- 修改公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="editOpen" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
ref="childComponent"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" @click="submitForm">提 交</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
listApply,
|
|
||||||
getDetail,
|
|
||||||
getApplyId,
|
|
||||||
updateApply,
|
|
||||||
delApply, listFile, checkUploadFile
|
|
||||||
} from "@/api/reward/apply";
|
|
||||||
import CustomTable from "@/components/CustomTable/CustomTable.vue";
|
|
||||||
import Update from '@/components/AllTypeFile/update.vue'
|
|
||||||
export default {
|
|
||||||
name: "apply",
|
|
||||||
components: {CustomTable,Update},
|
|
||||||
dicts: ['rew_apply_status','rew_principal_award'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
templateType:'apply',
|
|
||||||
dialogType:'edit',
|
|
||||||
modalType:'',
|
|
||||||
isShowUploadButton:false,
|
|
||||||
//列数据
|
|
||||||
tableColumns: [
|
|
||||||
{ label: '创建者', prop: 'createBy', align: 'center' },
|
|
||||||
{ label: '奖项名称', prop: 'applyName', align: 'center', showOverflowTooltip: true },
|
|
||||||
{ label: '状态', prop: 'applyStatus', align: 'center',slotName: 'customSlotName' },
|
|
||||||
{ label: '创建时间', prop: 'createTime', align: 'center' },
|
|
||||||
{ label: '提交时间', prop: 'appTime', align: 'center',type:'date' },
|
|
||||||
],
|
|
||||||
//操作列
|
|
||||||
tableActions: [
|
|
||||||
{ text: '查看', icon: 'el-icon-view', handler: this.handleView,},
|
|
||||||
{ text: '修改', icon: 'el-icon-edit', handler: this.handleUpdate, },
|
|
||||||
{ text: '删除', icon: 'el-icon-delete', handler: this.handleDelete,},
|
|
||||||
{ text: '退回意见', icon: 'el-icon-s-comment', handler: this.applyMsg,}
|
|
||||||
],
|
|
||||||
//文件上传配置项
|
|
||||||
fileData:[],
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 公告表格数据
|
|
||||||
noticeList: [],
|
|
||||||
isReadOnly:false,
|
|
||||||
isShowButton:true,
|
|
||||||
isView:false,
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
editOpen:false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: undefined,
|
|
||||||
applyType:undefined,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form:{},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
applyName: [
|
|
||||||
{ required: true, message: "奖项名称不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
isReward: [
|
|
||||||
{ required: true, message: "请选择", trigger: "change" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
applyParam:{
|
|
||||||
applyType:''
|
|
||||||
},
|
|
||||||
applyId:'',
|
|
||||||
isDisabled:false,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if(this.$route.path.includes('principalAward') === true){
|
|
||||||
this.$store.dispatch('apply/setApplyType', { key: 'applyType', value: 'rew_principal_award' });
|
|
||||||
this.applyParam.applyType = this.$store.state.apply.applyType;
|
|
||||||
this.queryParams.applyType = this.$store.state.apply.applyType;
|
|
||||||
}
|
|
||||||
this.getList('mounted');
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询公告列表 */
|
|
||||||
getList(item) {
|
|
||||||
this.loading = true;
|
|
||||||
let queryObj = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyStatus:undefined,
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
}
|
|
||||||
listApply(item ==='mounted' ? queryObj:this.queryParams).then(response => {
|
|
||||||
this.noticeList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
this.fileData = this.dict.type.rew_principal_award.map(item => {
|
|
||||||
return {
|
|
||||||
name: item.label,
|
|
||||||
fileCode: item.value,
|
|
||||||
status: '',
|
|
||||||
expanded: false,
|
|
||||||
childrenList: []
|
|
||||||
};
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.reset();
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
// applyName: undefined,
|
|
||||||
isReward: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
// 查询参数
|
|
||||||
this.queryParams = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: undefined,
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
};
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.applyId)
|
|
||||||
this.single = selection.length!=1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
applyMsg(row){
|
|
||||||
let applyMsg = row.applyMsg
|
|
||||||
this.$alert(applyMsg, '退回意见', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**查看按钮 */
|
|
||||||
handleView(row){
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "查看申请";
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.isShowUploadButton = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.modalType = 'score'
|
|
||||||
this.templateType = 'applyView'
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
console.log(this.form)
|
|
||||||
this.editOpen = true;
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.isView = false
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName:item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state:item.fileState,
|
|
||||||
fileId:item.fileId,
|
|
||||||
fileCode:item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd(applyType) {
|
|
||||||
this.reset();
|
|
||||||
this.isView=true;
|
|
||||||
this.open = true;
|
|
||||||
this.isReadOnly = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.isShowUploadButton = true
|
|
||||||
this.modalType = 'apply'
|
|
||||||
this.templateType = 'apply'
|
|
||||||
this.title = "添加申请";
|
|
||||||
// if(this.noticeList.length === 0){
|
|
||||||
getApplyId(this.applyParam).then(response => {
|
|
||||||
if (response.code === 200){
|
|
||||||
this.$store.dispatch('apply/setApplyId', { key: 'applyId', value: response.data.applyId });
|
|
||||||
this.applyId = localStorage.getItem('applyId')
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
}).catch((err)=>{
|
|
||||||
this.isDisabled = true
|
|
||||||
});
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
this.isView=true;
|
|
||||||
this.applyId = row.applyId
|
|
||||||
this.isReadOnly = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.isShowUploadButton = true
|
|
||||||
this.modalType = 'apply'
|
|
||||||
this.templateType = 'apply'
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form.isReward = response.data.isReward;
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "修改申请";
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName:item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state:item.fileState,
|
|
||||||
fileId:item.fileId,
|
|
||||||
fileCode:item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm: function() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
this.form.applyId = this.applyId
|
|
||||||
if (this.form.applyId !== '') {
|
|
||||||
checkUploadFile(this.applyId,this.applyParam.applyType).then((res)=>{
|
|
||||||
if (res.code === 200){
|
|
||||||
updateApply(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("提交成功");
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
this.$modal.msgError(res.msg);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.$modal.confirm('是否确认删除申请?').then(function() {
|
|
||||||
return delApply(applyId);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
localStorage.removeItem('applyId');
|
|
||||||
}).catch(() => {});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
::v-deep .el-table__cell{
|
|
||||||
padding: 8px 0;
|
|
||||||
}
|
|
||||||
::v-deep .el-dialog--center .el-dialog__body{
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
::v-deep .el-dialog__footer{
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.fullscreen-dialog {
|
|
||||||
.el-dialog__wrapper {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 1000;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5); /* 遮罩层透明度 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,387 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索部分-->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="创建者" prop="createBy">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.createBy"
|
|
||||||
placeholder="请输入创建者"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="奖项名称" prop="applyName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.applyName"
|
|
||||||
placeholder="请输入奖项名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<custom-table
|
|
||||||
:columns="tableColumns"
|
|
||||||
:tableData="noticeList"
|
|
||||||
:loading="loading"
|
|
||||||
:actions="tableActions"
|
|
||||||
:query-params="queryParams"
|
|
||||||
:apply-type="applyParam.applyType"
|
|
||||||
@handleQuery="handleQuery"
|
|
||||||
@resetQuery="resetQuery"
|
|
||||||
@handleView="handleView"
|
|
||||||
@getList="getList"
|
|
||||||
@handleSelectionChange="handleSelectionChange"
|
|
||||||
></custom-table>
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
<!-- 修改公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="editOpen" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
ref="childComponent"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" @click="submitAduit">审核提交</el-button>
|
|
||||||
<el-button type="danger" v-if="isView === true" @click="callback">退 回</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {applyBack, approved, checkFile, getDetail, listAduit} from "@/api/reward/aduit";
|
|
||||||
import CustomTable from "@/components/CustomTable/CustomTable.vue";
|
|
||||||
import Update from '@/components/AllTypeFile/update.vue'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "aduit",
|
|
||||||
components: {CustomTable, Update},
|
|
||||||
dicts: ['rew_apply_status','rew_excellent_category'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
templateType:'aduit',
|
|
||||||
dialogType: 'edit',
|
|
||||||
modalType:'',
|
|
||||||
isShowUploadButton:false,
|
|
||||||
//列数据
|
|
||||||
tableColumns: [
|
|
||||||
{label: '创建者', prop: 'createBy', align: 'center'},
|
|
||||||
{label: '奖项名称', prop: 'applyName', align: 'center', showOverflowTooltip: true},
|
|
||||||
{label: '状态', prop: 'applyStatus', align: 'center', slotName: 'customSlotName'},
|
|
||||||
{label: '创建时间', prop: 'createTime', align: 'center'},
|
|
||||||
{label: '提交时间', prop: 'appTime', align: 'center', type: 'date'},
|
|
||||||
],
|
|
||||||
//操作列
|
|
||||||
tableActions: [
|
|
||||||
{text: '查看', icon: 'el-icon-view', handler: this.handleView,},
|
|
||||||
{text: '审核', icon: 'el-icon-edit', handler: this.handleUpdate,},
|
|
||||||
],
|
|
||||||
//文件上传配置项
|
|
||||||
fileData: [],
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 公告表格数据
|
|
||||||
noticeList: [],
|
|
||||||
isReadOnly: false,
|
|
||||||
isShowButton: true,
|
|
||||||
isView: false,
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
editOpen: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: '1',
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
applyName: [
|
|
||||||
{required: true, message: "奖项名称不能为空", trigger: "blur"}
|
|
||||||
],
|
|
||||||
isReward: [
|
|
||||||
{required: true, message: "请选择", trigger: "change"}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
applyParam: {
|
|
||||||
applyType: ''
|
|
||||||
},
|
|
||||||
applyId: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if (this.$route.path.includes('reward') === true) {
|
|
||||||
this.$store.dispatch('apply/setApplyType', {key: 'applyType', value: 'rew_excellent_category'});
|
|
||||||
this.applyParam.applyType = this.$store.state.apply.applyType;
|
|
||||||
this.queryParams.applyType = this.$store.state.apply.applyType;
|
|
||||||
}
|
|
||||||
this.getList('mounted');
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询公告列表 */
|
|
||||||
getList(item) {
|
|
||||||
this.loading = true;
|
|
||||||
let queryObj = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyStatus: '1',
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
}
|
|
||||||
listAduit(item === 'mounted' ? queryObj : this.queryParams).then(response => {
|
|
||||||
this.noticeList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
this.fileData = this.dict.type.rew_excellent_category.map(item => {
|
|
||||||
return {
|
|
||||||
name: item.label,
|
|
||||||
fileCode: item.value,
|
|
||||||
status: '',
|
|
||||||
expanded: false,
|
|
||||||
childrenList: []
|
|
||||||
};
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
// applyName: undefined,
|
|
||||||
isReward: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
// 查询参数
|
|
||||||
this.queryParams = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: '1',
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
};
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.applyId)
|
|
||||||
this.single = selection.length != 1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/**查看按钮 */
|
|
||||||
handleView(row) {
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "查看申请";
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.isShowButton = true
|
|
||||||
this.dialogType = 'view'
|
|
||||||
this.modalType = 'score'
|
|
||||||
this.templateType = 'applyView'
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
console.log(this.form)
|
|
||||||
this.editOpen = true;
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.isView = false
|
|
||||||
this.fileData.forEach((item) => {
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName: item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state: item.fileState,
|
|
||||||
fileId: item.fileId,
|
|
||||||
fileCode: item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
this.isView = true;
|
|
||||||
this.applyId = row.applyId
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.isShowButton = true
|
|
||||||
this.isShowUploadButton = false
|
|
||||||
this.dialogType = 'edit'
|
|
||||||
this.modalType = 'aduit'
|
|
||||||
this.templateType = 'aduit'
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form.isReward = response.data.isReward;
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "申请审核";
|
|
||||||
this.fileData.forEach((item) => {
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName: item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state: item.fileState,
|
|
||||||
fileId: item.fileId,
|
|
||||||
fileCode: item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
submitAduit(){
|
|
||||||
checkFile(this.applyId).then(res => {
|
|
||||||
if(res.code === 200){
|
|
||||||
approved(this.applyId).then(resp => {
|
|
||||||
if (resp.code === 200){
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList('mounted')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.$modal.msgError(res.msg)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
callback(){
|
|
||||||
this.$prompt('请输入退回意见', '退回意见', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
inputType: 'textarea',
|
|
||||||
customClass: 'custom-prompt'
|
|
||||||
}).then(({ value }) => {
|
|
||||||
applyBack(this.applyId, value).then(res => {
|
|
||||||
if (res.code === 200){
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList('mounted')
|
|
||||||
}else{
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.$modal.confirm('是否确认删除申请?').then(function () {
|
|
||||||
return delApply(applyId);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
localStorage.removeItem('applyId');
|
|
||||||
}).catch(() => {
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
::v-deep .el-dialog--center .el-dialog__body {
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .el-dialog__footer {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fullscreen-dialog {
|
|
||||||
.el-dialog__wrapper {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 1000;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5); /* 遮罩层透明度 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,466 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索部分-->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="创建者" prop="createBy">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.createBy"
|
|
||||||
placeholder="请输入创建者"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="奖项名称" prop="applyName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.applyName"
|
|
||||||
placeholder="请输入奖项名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="applyStatus">
|
|
||||||
<el-select v-model="queryParams.applyStatus" placeholder="状态" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.rew_apply_status"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
>申请</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
<custom-table
|
|
||||||
:columns="tableColumns"
|
|
||||||
:tableData="noticeList"
|
|
||||||
:loading="loading"
|
|
||||||
:actions="tableActions"
|
|
||||||
:query-params="queryParams"
|
|
||||||
:apply-type="applyParam.applyType"
|
|
||||||
@handleQuery="handleQuery"
|
|
||||||
@resetQuery="resetQuery"
|
|
||||||
@handleView="handleView"
|
|
||||||
@handleAdd="handleAdd"
|
|
||||||
@getList="getList"
|
|
||||||
@handleSelectionChange="handleSelectionChange"
|
|
||||||
></custom-table>
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或查看公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="open" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" :disabled="isDisabled" @click="submitForm">提 交</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<!-- 修改公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="editOpen" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
ref="childComponent"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" @click="submitForm">提 交</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {checkUploadFile, delApply, getApplyId, getDetail, listApply, updateApply} from "@/api/reward/apply";
|
|
||||||
import CustomTable from "@/components/CustomTable/CustomTable.vue";
|
|
||||||
import Update from '@/components/AllTypeFile/update.vue'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "apply",
|
|
||||||
components: {CustomTable,Update},
|
|
||||||
dicts: ['rew_apply_status','rew_excellent_category'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
templateType:'apply',
|
|
||||||
dialogType:'edit',
|
|
||||||
modalType:'',
|
|
||||||
isShowUploadButton:false,
|
|
||||||
//列数据
|
|
||||||
tableColumns: [
|
|
||||||
{ label: '创建者', prop: 'createBy', align: 'center' },
|
|
||||||
{ label: '奖项名称', prop: 'applyName', align: 'center', showOverflowTooltip: true },
|
|
||||||
{ label: '状态', prop: 'applyStatus', align: 'center',slotName: 'customSlotName' },
|
|
||||||
{ label: '创建时间', prop: 'createTime', align: 'center' },
|
|
||||||
{ label: '提交时间', prop: 'appTime', align: 'center',type:'date' },
|
|
||||||
],
|
|
||||||
//操作列
|
|
||||||
tableActions: [
|
|
||||||
{ text: '查看', icon: 'el-icon-view', handler: this.handleView,},
|
|
||||||
{ text: '修改', icon: 'el-icon-edit', handler: this.handleUpdate, },
|
|
||||||
{ text: '删除', icon: 'el-icon-delete', handler: this.handleDelete,},
|
|
||||||
{ text: '退回意见', icon: 'el-icon-s-comment', handler: this.applyMsg,}
|
|
||||||
],
|
|
||||||
//文件上传配置项
|
|
||||||
fileData:[],
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 公告表格数据
|
|
||||||
noticeList: [],
|
|
||||||
isReadOnly:false,
|
|
||||||
isShowButton:true,
|
|
||||||
isView:false,
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
editOpen:false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: undefined,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form:{},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
applyName: [
|
|
||||||
{ required: true, message: "奖项名称不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
isReward: [
|
|
||||||
{ required: true, message: "请选择", trigger: "change" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
applyParam:{
|
|
||||||
applyType:''
|
|
||||||
},
|
|
||||||
applyId:'',
|
|
||||||
isDisabled:false,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if(this.$route.path.includes('reward') === true){
|
|
||||||
this.$store.dispatch('apply/setApplyType', { key: 'applyType', value: 'rew_excellent_category' });
|
|
||||||
this.applyParam.applyType = this.$store.state.apply.applyType;
|
|
||||||
this.queryParams.applyType = this.$store.state.apply.applyType;
|
|
||||||
}
|
|
||||||
this.getList('mounted');
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询公告列表 */
|
|
||||||
getList(item) {
|
|
||||||
this.loading = true;
|
|
||||||
let queryObj = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyStatus:undefined,
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
}
|
|
||||||
listApply(item ==='mounted' ? queryObj:this.queryParams).then(response => {
|
|
||||||
this.noticeList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
this.fileData = this.dict.type.rew_excellent_category.map(item => {
|
|
||||||
return {
|
|
||||||
name: item.label,
|
|
||||||
fileCode: item.value,
|
|
||||||
status: '',
|
|
||||||
expanded: false,
|
|
||||||
childrenList: []
|
|
||||||
};
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.reset();
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
// applyName: undefined,
|
|
||||||
isReward: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
// 查询参数
|
|
||||||
this.queryParams = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: undefined,
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
};
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.applyId)
|
|
||||||
this.single = selection.length!=1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
applyMsg(row){
|
|
||||||
let applyMsg = row.applyMsg
|
|
||||||
this.$alert(applyMsg, '退回意见', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**查看按钮 */
|
|
||||||
handleView(row){
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "查看申请";
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.isShowUploadButton = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.modalType = 'score'
|
|
||||||
this.templateType = 'applyView'
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.editOpen = true;
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.isView = false
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName:item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state:item.fileState,
|
|
||||||
fileId:item.fileId,
|
|
||||||
fileCode:item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd(applyType) {
|
|
||||||
this.reset();
|
|
||||||
this.isView=true;
|
|
||||||
this.open = true;
|
|
||||||
this.isReadOnly = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.isShowUploadButton = true
|
|
||||||
this.modalType = 'apply'
|
|
||||||
this.templateType = 'apply'
|
|
||||||
this.title = "添加申请";
|
|
||||||
// if(this.noticeList.length === 0){
|
|
||||||
getApplyId(this.applyParam).then(response => {
|
|
||||||
if (response.code === 200){
|
|
||||||
this.$store.dispatch('apply/setApplyId', { key: 'applyId', value: response.data.applyId });
|
|
||||||
this.applyId = localStorage.getItem('applyId')
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
}).catch((err)=>{
|
|
||||||
this.isDisabled = true
|
|
||||||
});
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
this.isView=true;
|
|
||||||
this.applyId = row.applyId
|
|
||||||
this.isReadOnly = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.isShowUploadButton = true
|
|
||||||
this.modalType = 'apply'
|
|
||||||
this.templateType = 'apply'
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form.isReward = response.data.isReward;
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "修改申请";
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName:item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state:item.fileState,
|
|
||||||
fileId:item.fileId,
|
|
||||||
fileCode:item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm: function() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
this.form.applyId = this.applyId
|
|
||||||
if (this.form.applyId !== '') {
|
|
||||||
checkUploadFile(this.applyId,this.applyParam.applyType).then((res)=>{
|
|
||||||
if (res.code === 200){
|
|
||||||
updateApply(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("提交成功");
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
this.$modal.msgError(res.msg);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.$modal.confirm('是否确认删除申请?').then(function() {
|
|
||||||
return delApply(applyId);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
localStorage.removeItem('applyId');
|
|
||||||
}).catch(() => {});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
::v-deep .el-table__cell{
|
|
||||||
padding: 8px 0;
|
|
||||||
}
|
|
||||||
::v-deep .el-dialog--center .el-dialog__body{
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
::v-deep .el-dialog__footer{
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.fullscreen-dialog {
|
|
||||||
.el-dialog__wrapper {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 1000;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5); /* 遮罩层透明度 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,392 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索部分-->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="创建者" prop="createBy">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.createBy"
|
|
||||||
placeholder="请输入创建者"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="奖项名称" prop="applyName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.applyName"
|
|
||||||
placeholder="请输入奖项名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<custom-table
|
|
||||||
:columns="tableColumns"
|
|
||||||
:tableData="noticeList"
|
|
||||||
:loading="loading"
|
|
||||||
:actions="tableActions"
|
|
||||||
:query-params="queryParams"
|
|
||||||
:apply-type="applyParam.applyType"
|
|
||||||
@handleQuery="handleQuery"
|
|
||||||
@resetQuery="resetQuery"
|
|
||||||
@handleView="handleView"
|
|
||||||
@getList="getList"
|
|
||||||
@handleSelectionChange="handleSelectionChange"
|
|
||||||
></custom-table>
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
<!-- 修改公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="editOpen" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
ref="childComponent"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" @click="submitAduit">审核提交</el-button>
|
|
||||||
<el-button type="danger" v-if="isView === true" @click="callback">退 回</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
listAduit,
|
|
||||||
getDetail,
|
|
||||||
checkFile,
|
|
||||||
approved, applyBack
|
|
||||||
} from "@/api/reward/aduit";
|
|
||||||
import CustomTable from "@/components/CustomTable/CustomTable.vue";
|
|
||||||
import Update from '@/components/AllTypeFile/update.vue'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "aduit",
|
|
||||||
components: {CustomTable, Update},
|
|
||||||
dicts: ['rew_apply_status','rew_teacher_award'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
templateType:'aduit',
|
|
||||||
dialogType: 'edit',
|
|
||||||
modalType:'',
|
|
||||||
isShowUploadButton:false,
|
|
||||||
//列数据
|
|
||||||
tableColumns: [
|
|
||||||
{label: '创建者', prop: 'createBy', align: 'center'},
|
|
||||||
{label: '奖项名称', prop: 'applyName', align: 'center', showOverflowTooltip: true},
|
|
||||||
{label: '状态', prop: 'applyStatus', align: 'center', slotName: 'customSlotName'},
|
|
||||||
{label: '创建时间', prop: 'createTime', align: 'center'},
|
|
||||||
{label: '提交时间', prop: 'appTime', align: 'center', type: 'date'},
|
|
||||||
],
|
|
||||||
//操作列
|
|
||||||
tableActions: [
|
|
||||||
{text: '查看', icon: 'el-icon-view', handler: this.handleView,},
|
|
||||||
{text: '审核', icon: 'el-icon-edit', handler: this.handleUpdate,},
|
|
||||||
],
|
|
||||||
//文件上传配置项
|
|
||||||
fileData:[],
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 公告表格数据
|
|
||||||
noticeList: [],
|
|
||||||
isReadOnly: false,
|
|
||||||
isShowButton: true,
|
|
||||||
isView: false,
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
editOpen: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: '1',
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
applyName: [
|
|
||||||
{required: true, message: "奖项名称不能为空", trigger: "blur"}
|
|
||||||
],
|
|
||||||
isReward: [
|
|
||||||
{required: true, message: "请选择", trigger: "change"}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
applyParam: {
|
|
||||||
applyType: ''
|
|
||||||
},
|
|
||||||
applyId: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if (this.$route.path.includes('teacherAward') === true) {
|
|
||||||
this.$store.dispatch('apply/setApplyType', {key: 'applyType', value: 'rew_teacher_award'});
|
|
||||||
this.applyParam.applyType = this.$store.state.apply.applyType;
|
|
||||||
this.queryParams.applyType = this.$store.state.apply.applyType;
|
|
||||||
}
|
|
||||||
this.getList('mounted');
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询公告列表 */
|
|
||||||
getList(item) {
|
|
||||||
this.loading = true;
|
|
||||||
let queryObj = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyStatus: '1',
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
}
|
|
||||||
listAduit(item === 'mounted' ? queryObj : this.queryParams).then(response => {
|
|
||||||
this.noticeList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
this.fileData = this.dict.type.rew_teacher_award.map(item => {
|
|
||||||
return {
|
|
||||||
name: item.label,
|
|
||||||
fileCode: item.value,
|
|
||||||
status: '',
|
|
||||||
expanded: false,
|
|
||||||
childrenList: []
|
|
||||||
};
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
// applyName: undefined,
|
|
||||||
isReward: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
// 查询参数
|
|
||||||
this.queryParams = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: '1',
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
};
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.applyId)
|
|
||||||
this.single = selection.length != 1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/**查看按钮 */
|
|
||||||
handleView(row) {
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "查看申请";
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.isShowButton = true
|
|
||||||
this.dialogType = 'view'
|
|
||||||
this.modalType = 'score'
|
|
||||||
this.templateType = 'applyView'
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
console.log(this.form)
|
|
||||||
this.editOpen = true;
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.isView = false
|
|
||||||
this.fileData.forEach((item) => {
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName: item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state: item.fileState,
|
|
||||||
fileId: item.fileId,
|
|
||||||
fileCode: item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
this.isView = true;
|
|
||||||
this.applyId = row.applyId
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.isShowButton = true
|
|
||||||
this.isShowUploadButton = false
|
|
||||||
this.dialogType = 'edit'
|
|
||||||
this.modalType = 'aduit'
|
|
||||||
this.templateType = 'aduit'
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form.isReward = response.data.isReward;
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "申请审核";
|
|
||||||
this.fileData.forEach((item) => {
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName: item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state: item.fileState,
|
|
||||||
fileId: item.fileId,
|
|
||||||
fileCode: item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
submitAduit(){
|
|
||||||
checkFile(this.applyId).then(res => {
|
|
||||||
if(res.code === 200){
|
|
||||||
approved(this.applyId).then(resp => {
|
|
||||||
if (resp.code === 200){
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList('mounted')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.$modal.msgError(res.msg)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
callback(){
|
|
||||||
this.$prompt('请输入退回意见', '退回意见', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
inputType: 'textarea',
|
|
||||||
customClass: 'custom-prompt'
|
|
||||||
}).then(({ value }) => {
|
|
||||||
applyBack(this.applyId, value).then(res => {
|
|
||||||
if (res.code === 200){
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList('mounted')
|
|
||||||
}else{
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.$modal.confirm('是否确认删除申请?').then(function () {
|
|
||||||
return delApply(applyId);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
localStorage.removeItem('applyId');
|
|
||||||
}).catch(() => {
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
::v-deep .el-dialog--center .el-dialog__body {
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .el-dialog__footer {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fullscreen-dialog {
|
|
||||||
.el-dialog__wrapper {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 1000;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5); /* 遮罩层透明度 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,473 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索部分-->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="创建者" prop="createBy">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.createBy"
|
|
||||||
placeholder="请输入创建者"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="奖项名称" prop="applyName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.applyName"
|
|
||||||
placeholder="请输入奖项名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="applyStatus">
|
|
||||||
<el-select v-model="queryParams.applyStatus" placeholder="状态" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.rew_apply_status"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
>申请</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
<custom-table
|
|
||||||
:columns="tableColumns"
|
|
||||||
:tableData="noticeList"
|
|
||||||
:loading="loading"
|
|
||||||
:actions="tableActions"
|
|
||||||
:query-params="queryParams"
|
|
||||||
:apply-type="applyParam.applyType"
|
|
||||||
@handleQuery="handleQuery"
|
|
||||||
@resetQuery="resetQuery"
|
|
||||||
@handleView="handleView"
|
|
||||||
@handleAdd="handleAdd"
|
|
||||||
@getList="getList"
|
|
||||||
@handleSelectionChange="handleSelectionChange"
|
|
||||||
></custom-table>
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或查看公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="open" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" :disabled="isDisabled" @click="submitForm">提 交</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<!-- 修改公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="editOpen" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
ref="childComponent"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" @click="submitForm">提 交</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
listApply,
|
|
||||||
getDetail,
|
|
||||||
getApplyId,
|
|
||||||
updateApply,
|
|
||||||
delApply, listFile, checkUploadFile
|
|
||||||
} from "@/api/reward/apply";
|
|
||||||
import CustomTable from "@/components/CustomTable/CustomTable.vue";
|
|
||||||
import Update from '@/components/AllTypeFile/update.vue'
|
|
||||||
export default {
|
|
||||||
name: "apply",
|
|
||||||
components: {CustomTable,Update},
|
|
||||||
dicts: ['rew_apply_status','rew_teacher_award'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
templateType:'apply',
|
|
||||||
dialogType:'edit',
|
|
||||||
modalType:'',
|
|
||||||
isShowUploadButton:false,
|
|
||||||
//列数据
|
|
||||||
tableColumns: [
|
|
||||||
{ label: '创建者', prop: 'createBy', align: 'center' },
|
|
||||||
{ label: '奖项名称', prop: 'applyName', align: 'center', showOverflowTooltip: true },
|
|
||||||
{ label: '状态', prop: 'applyStatus', align: 'center',slotName: 'customSlotName' },
|
|
||||||
{ label: '创建时间', prop: 'createTime', align: 'center' },
|
|
||||||
{ label: '提交时间', prop: 'appTime', align: 'center',type:'date' },
|
|
||||||
],
|
|
||||||
//操作列
|
|
||||||
tableActions: [
|
|
||||||
{ text: '查看', icon: 'el-icon-view', handler: this.handleView,},
|
|
||||||
{ text: '修改', icon: 'el-icon-edit', handler: this.handleUpdate, },
|
|
||||||
{ text: '删除', icon: 'el-icon-delete', handler: this.handleDelete,},
|
|
||||||
{ text: '退回意见', icon: 'el-icon-s-comment', handler: this.applyMsg,}
|
|
||||||
],
|
|
||||||
//文件上传配置项
|
|
||||||
fileData:[],
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 公告表格数据
|
|
||||||
noticeList: [],
|
|
||||||
isReadOnly:false,
|
|
||||||
isShowButton:true,
|
|
||||||
isView:false,
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
editOpen:false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: undefined,
|
|
||||||
applyType:undefined,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form:{},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
applyName: [
|
|
||||||
{ required: true, message: "奖项名称不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
isReward: [
|
|
||||||
{ required: true, message: "请选择", trigger: "change" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
applyParam:{
|
|
||||||
applyType:''
|
|
||||||
},
|
|
||||||
applyId:'',
|
|
||||||
isDisabled:false,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if(this.$route.path.includes('teacherAward') === true){
|
|
||||||
this.$store.dispatch('apply/setApplyType', { key: 'applyType', value: 'rew_teacher_award' });
|
|
||||||
this.applyParam.applyType = this.$store.state.apply.applyType;
|
|
||||||
this.queryParams.applyType = this.$store.state.apply.applyType;
|
|
||||||
}
|
|
||||||
this.getList('mounted');
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询公告列表 */
|
|
||||||
getList(item) {
|
|
||||||
this.loading = true;
|
|
||||||
let queryObj = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyStatus:undefined,
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
}
|
|
||||||
listApply(item ==='mounted' ? queryObj:this.queryParams).then(response => {
|
|
||||||
this.noticeList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
this.fileData = this.dict.type.rew_teacher_award.map(item => {
|
|
||||||
return {
|
|
||||||
name: item.label,
|
|
||||||
fileCode: item.value,
|
|
||||||
status: '',
|
|
||||||
expanded: false,
|
|
||||||
childrenList: []
|
|
||||||
};
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.reset();
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
// applyName: undefined,
|
|
||||||
isReward: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
// 查询参数
|
|
||||||
this.queryParams = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: undefined,
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
};
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.applyId)
|
|
||||||
this.single = selection.length!=1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
applyMsg(row){
|
|
||||||
let applyMsg = row.applyMsg
|
|
||||||
this.$alert(applyMsg, '退回意见', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**查看按钮 */
|
|
||||||
handleView(row){
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "查看申请";
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.isShowUploadButton = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.modalType = 'score'
|
|
||||||
this.templateType = 'applyView'
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
console.log(this.form)
|
|
||||||
this.editOpen = true;
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.isView = false
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName:item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state:item.fileState,
|
|
||||||
fileId:item.fileId,
|
|
||||||
fileCode:item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd(applyType) {
|
|
||||||
this.reset();
|
|
||||||
this.isView=true;
|
|
||||||
this.open = true;
|
|
||||||
this.isReadOnly = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.isShowUploadButton = true
|
|
||||||
this.modalType = 'apply'
|
|
||||||
this.templateType = 'apply'
|
|
||||||
this.title = "添加申请";
|
|
||||||
// if(this.noticeList.length === 0){
|
|
||||||
getApplyId(this.applyParam).then(response => {
|
|
||||||
if (response.code === 200){
|
|
||||||
this.$store.dispatch('apply/setApplyId', { key: 'applyId', value: response.data.applyId });
|
|
||||||
this.applyId = localStorage.getItem('applyId')
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
}).catch((err)=>{
|
|
||||||
this.isDisabled = true
|
|
||||||
});
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
this.isView=true;
|
|
||||||
this.applyId = row.applyId
|
|
||||||
this.isReadOnly = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.isShowUploadButton = true
|
|
||||||
this.modalType = 'apply'
|
|
||||||
this.templateType = 'apply'
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form.isReward = response.data.isReward;
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "修改申请";
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName:item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state:item.fileState,
|
|
||||||
fileId:item.fileId,
|
|
||||||
fileCode:item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm: function() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
this.form.applyId = this.applyId
|
|
||||||
if (this.form.applyId !== '') {
|
|
||||||
checkUploadFile(this.applyId,this.applyParam.applyType).then((res)=>{
|
|
||||||
if (res.code === 200){
|
|
||||||
updateApply(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("提交成功");
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
this.$modal.msgError(res.msg);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.$modal.confirm('是否确认删除申请?').then(function() {
|
|
||||||
return delApply(applyId);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
localStorage.removeItem('applyId');
|
|
||||||
}).catch(() => {});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
::v-deep .el-table__cell{
|
|
||||||
padding: 8px 0;
|
|
||||||
}
|
|
||||||
::v-deep .el-dialog--center .el-dialog__body{
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
::v-deep .el-dialog__footer{
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.fullscreen-dialog {
|
|
||||||
.el-dialog__wrapper {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 1000;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5); /* 遮罩层透明度 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,392 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索部分-->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="创建者" prop="createBy">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.createBy"
|
|
||||||
placeholder="请输入创建者"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="奖项名称" prop="applyName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.applyName"
|
|
||||||
placeholder="请输入奖项名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<custom-table
|
|
||||||
:columns="tableColumns"
|
|
||||||
:tableData="noticeList"
|
|
||||||
:loading="loading"
|
|
||||||
:actions="tableActions"
|
|
||||||
:query-params="queryParams"
|
|
||||||
:apply-type="applyParam.applyType"
|
|
||||||
@handleQuery="handleQuery"
|
|
||||||
@resetQuery="resetQuery"
|
|
||||||
@handleView="handleView"
|
|
||||||
@getList="getList"
|
|
||||||
@handleSelectionChange="handleSelectionChange"
|
|
||||||
></custom-table>
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
<!-- 修改公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="editOpen" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
ref="childComponent"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" @click="submitAduit">审核提交</el-button>
|
|
||||||
<el-button type="danger" v-if="isView === true" @click="callback">退 回</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
listAduit,
|
|
||||||
getDetail,
|
|
||||||
checkFile,
|
|
||||||
approved, applyBack
|
|
||||||
} from "@/api/reward/aduit";
|
|
||||||
import CustomTable from "@/components/CustomTable/CustomTable.vue";
|
|
||||||
import Update from '@/components/AllTypeFile/update.vue'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "aduit",
|
|
||||||
components: {CustomTable, Update},
|
|
||||||
dicts: ['rew_apply_status','rew_excellent_training'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
templateType:'aduit',
|
|
||||||
dialogType: 'edit',
|
|
||||||
modalType:'',
|
|
||||||
isShowUploadButton:false,
|
|
||||||
//列数据
|
|
||||||
tableColumns: [
|
|
||||||
{label: '创建者', prop: 'createBy', align: 'center'},
|
|
||||||
{label: '奖项名称', prop: 'applyName', align: 'center', showOverflowTooltip: true},
|
|
||||||
{label: '状态', prop: 'applyStatus', align: 'center', slotName: 'customSlotName'},
|
|
||||||
{label: '创建时间', prop: 'createTime', align: 'center'},
|
|
||||||
{label: '提交时间', prop: 'appTime', align: 'center', type: 'date'},
|
|
||||||
],
|
|
||||||
//操作列
|
|
||||||
tableActions: [
|
|
||||||
{text: '查看', icon: 'el-icon-view', handler: this.handleView,},
|
|
||||||
{text: '审核', icon: 'el-icon-edit', handler: this.handleUpdate,},
|
|
||||||
],
|
|
||||||
//文件上传配置项
|
|
||||||
fileData:[],
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 公告表格数据
|
|
||||||
noticeList: [],
|
|
||||||
isReadOnly: false,
|
|
||||||
isShowButton: true,
|
|
||||||
isView: false,
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
editOpen: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: '1',
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
applyName: [
|
|
||||||
{required: true, message: "奖项名称不能为空", trigger: "blur"}
|
|
||||||
],
|
|
||||||
isReward: [
|
|
||||||
{required: true, message: "请选择", trigger: "change"}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
applyParam: {
|
|
||||||
applyType: ''
|
|
||||||
},
|
|
||||||
applyId: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if (this.$route.path.includes('trainAward') === true) {
|
|
||||||
this.$store.dispatch('apply/setApplyType', {key: 'applyType', value: 'rew_excellent_training'});
|
|
||||||
this.applyParam.applyType = this.$store.state.apply.applyType;
|
|
||||||
this.queryParams.applyType = this.$store.state.apply.applyType;
|
|
||||||
}
|
|
||||||
this.getList('mounted');
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询公告列表 */
|
|
||||||
getList(item) {
|
|
||||||
this.loading = true;
|
|
||||||
let queryObj = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyStatus: '1',
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
}
|
|
||||||
listAduit(item === 'mounted' ? queryObj : this.queryParams).then(response => {
|
|
||||||
this.noticeList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
this.fileData = this.dict.type.rew_excellent_training.map(item => {
|
|
||||||
return {
|
|
||||||
name: item.label,
|
|
||||||
fileCode: item.value,
|
|
||||||
status: '',
|
|
||||||
expanded: false,
|
|
||||||
childrenList: []
|
|
||||||
};
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
// applyName: undefined,
|
|
||||||
isReward: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
// 查询参数
|
|
||||||
this.queryParams = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: '1',
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
};
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.applyId)
|
|
||||||
this.single = selection.length != 1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/**查看按钮 */
|
|
||||||
handleView(row) {
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "查看申请";
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.isShowButton = true
|
|
||||||
this.dialogType = 'view'
|
|
||||||
this.modalType = 'score'
|
|
||||||
this.templateType = 'applyView'
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
console.log(this.form)
|
|
||||||
this.editOpen = true;
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.isView = false
|
|
||||||
this.fileData.forEach((item) => {
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName: item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state: item.fileState,
|
|
||||||
fileId: item.fileId,
|
|
||||||
fileCode: item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
this.isView = true;
|
|
||||||
this.applyId = row.applyId
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.isShowButton = true
|
|
||||||
this.isShowUploadButton = false
|
|
||||||
this.dialogType = 'edit'
|
|
||||||
this.modalType = 'aduit'
|
|
||||||
this.templateType = 'aduit'
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form.isReward = response.data.isReward;
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "申请审核";
|
|
||||||
this.fileData.forEach((item) => {
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName: item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state: item.fileState,
|
|
||||||
fileId: item.fileId,
|
|
||||||
fileCode: item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
submitAduit(){
|
|
||||||
checkFile(this.applyId).then(res => {
|
|
||||||
if(res.code === 200){
|
|
||||||
approved(this.applyId).then(resp => {
|
|
||||||
if (resp.code === 200){
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList('mounted')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.$modal.msgError(res.msg)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
callback(){
|
|
||||||
this.$prompt('请输入退回意见', '退回意见', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
inputType: 'textarea',
|
|
||||||
customClass: 'custom-prompt'
|
|
||||||
}).then(({ value }) => {
|
|
||||||
applyBack(this.applyId, value).then(res => {
|
|
||||||
if (res.code === 200){
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList('mounted')
|
|
||||||
}else{
|
|
||||||
this.$modal.msgSuccess(res.msg)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.$modal.confirm('是否确认删除申请?').then(function () {
|
|
||||||
return delApply(applyId);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
localStorage.removeItem('applyId');
|
|
||||||
}).catch(() => {
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
::v-deep .el-dialog--center .el-dialog__body {
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .el-dialog__footer {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fullscreen-dialog {
|
|
||||||
.el-dialog__wrapper {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 1000;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5); /* 遮罩层透明度 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,473 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索部分-->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="创建者" prop="createBy">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.createBy"
|
|
||||||
placeholder="请输入创建者"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="奖项名称" prop="applyName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.applyName"
|
|
||||||
placeholder="请输入奖项名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="applyStatus">
|
|
||||||
<el-select v-model="queryParams.applyStatus" placeholder="状态" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.rew_apply_status"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
>申请</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
<custom-table
|
|
||||||
:columns="tableColumns"
|
|
||||||
:tableData="noticeList"
|
|
||||||
:loading="loading"
|
|
||||||
:actions="tableActions"
|
|
||||||
:query-params="queryParams"
|
|
||||||
:apply-type="applyParam.applyType"
|
|
||||||
@handleQuery="handleQuery"
|
|
||||||
@resetQuery="resetQuery"
|
|
||||||
@handleView="handleView"
|
|
||||||
@handleAdd="handleAdd"
|
|
||||||
@getList="getList"
|
|
||||||
@handleSelectionChange="handleSelectionChange"
|
|
||||||
></custom-table>
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或查看公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="open" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" :disabled="isDisabled" @click="submitForm">提 交</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<!-- 修改公告对话框 -->
|
|
||||||
<el-dialog :title="title" :fullscreen="true" center :visible.sync="editOpen" top="0" width="100%" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="260px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否获得过黄炎培职业教育奖" prop="isReward">
|
|
||||||
<el-radio-group :disabled="isReadOnly" v-model="form.isReward">
|
|
||||||
<el-radio :label="0">是</el-radio>
|
|
||||||
<el-radio :label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<Update
|
|
||||||
:applyId="applyId"
|
|
||||||
:dialog-type="dialogType"
|
|
||||||
:table-data="fileData"
|
|
||||||
:isShowButton="isShowButton"
|
|
||||||
:isShowUploadButton="isShowUploadButton"
|
|
||||||
:template-type="templateType"
|
|
||||||
:modal-type="modalType"
|
|
||||||
ref="childComponent"
|
|
||||||
>
|
|
||||||
</Update>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" v-if="isView === true" @click="submitForm">提 交</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
listApply,
|
|
||||||
getDetail,
|
|
||||||
getApplyId,
|
|
||||||
updateApply,
|
|
||||||
delApply, listFile, checkUploadFile
|
|
||||||
} from "@/api/reward/apply";
|
|
||||||
import CustomTable from "@/components/CustomTable/CustomTable.vue";
|
|
||||||
import Update from '@/components/AllTypeFile/update.vue'
|
|
||||||
export default {
|
|
||||||
name: "apply",
|
|
||||||
components: {CustomTable,Update},
|
|
||||||
dicts: ['rew_apply_status','rew_excellent_training'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
templateType:'apply',
|
|
||||||
dialogType:'edit',
|
|
||||||
modalType:'',
|
|
||||||
isShowUploadButton:false,
|
|
||||||
//列数据
|
|
||||||
tableColumns: [
|
|
||||||
{ label: '创建者', prop: 'createBy', align: 'center' },
|
|
||||||
{ label: '奖项名称', prop: 'applyName', align: 'center', showOverflowTooltip: true },
|
|
||||||
{ label: '状态', prop: 'applyStatus', align: 'center',slotName: 'customSlotName' },
|
|
||||||
{ label: '创建时间', prop: 'createTime', align: 'center' },
|
|
||||||
{ label: '提交时间', prop: 'appTime', align: 'center',type:'date' },
|
|
||||||
],
|
|
||||||
//操作列
|
|
||||||
tableActions: [
|
|
||||||
{ text: '查看', icon: 'el-icon-view', handler: this.handleView,},
|
|
||||||
{ text: '修改', icon: 'el-icon-edit', handler: this.handleUpdate, },
|
|
||||||
{ text: '删除', icon: 'el-icon-delete', handler: this.handleDelete,},
|
|
||||||
{ text: '退回意见', icon: 'el-icon-s-comment', handler: this.applyMsg,}
|
|
||||||
],
|
|
||||||
//文件上传配置项
|
|
||||||
fileData:[],
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 公告表格数据
|
|
||||||
noticeList: [],
|
|
||||||
isReadOnly:false,
|
|
||||||
isShowButton:true,
|
|
||||||
isView:false,
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
editOpen:false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: undefined,
|
|
||||||
applyType:undefined,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form:{},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
applyName: [
|
|
||||||
{ required: true, message: "奖项名称不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
isReward: [
|
|
||||||
{ required: true, message: "请选择", trigger: "change" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
applyParam:{
|
|
||||||
applyType:''
|
|
||||||
},
|
|
||||||
applyId:'',
|
|
||||||
isDisabled:false,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if(this.$route.path.includes('trainAward') === true){
|
|
||||||
this.$store.dispatch('apply/setApplyType', { key: 'applyType', value: 'rew_excellent_training' });
|
|
||||||
this.applyParam.applyType = this.$store.state.apply.applyType;
|
|
||||||
this.queryParams.applyType = this.$store.state.apply.applyType;
|
|
||||||
}
|
|
||||||
this.getList('mounted');
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询公告列表 */
|
|
||||||
getList(item) {
|
|
||||||
this.loading = true;
|
|
||||||
let queryObj = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyStatus:undefined,
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
}
|
|
||||||
listApply(item ==='mounted' ? queryObj:this.queryParams).then(response => {
|
|
||||||
this.noticeList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
this.fileData = this.dict.type.rew_excellent_training.map(item => {
|
|
||||||
return {
|
|
||||||
name: item.label,
|
|
||||||
fileCode: item.value,
|
|
||||||
status: '',
|
|
||||||
expanded: false,
|
|
||||||
childrenList: []
|
|
||||||
};
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.reset();
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
// applyName: undefined,
|
|
||||||
isReward: undefined,
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
// 查询参数
|
|
||||||
this.queryParams = {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
applyName: undefined,
|
|
||||||
createBy: undefined,
|
|
||||||
applyStatus: undefined,
|
|
||||||
applyType: this.applyParam.applyType
|
|
||||||
};
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.applyId)
|
|
||||||
this.single = selection.length!=1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
applyMsg(row){
|
|
||||||
let applyMsg = row.applyMsg
|
|
||||||
this.$alert(applyMsg, '退回意见', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**查看按钮 */
|
|
||||||
handleView(row){
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "查看申请";
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.isShowUploadButton = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.modalType = 'score'
|
|
||||||
this.templateType = 'applyView'
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
console.log(this.form)
|
|
||||||
this.editOpen = true;
|
|
||||||
this.isReadOnly = true
|
|
||||||
this.isView = false
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName:item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state:item.fileState,
|
|
||||||
fileId:item.fileId,
|
|
||||||
fileCode:item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd(applyType) {
|
|
||||||
this.reset();
|
|
||||||
this.isView=true;
|
|
||||||
this.open = true;
|
|
||||||
this.isReadOnly = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.isShowUploadButton = true
|
|
||||||
this.modalType = 'apply'
|
|
||||||
this.templateType = 'apply'
|
|
||||||
this.title = "添加申请";
|
|
||||||
// if(this.noticeList.length === 0){
|
|
||||||
getApplyId(this.applyParam).then(response => {
|
|
||||||
if (response.code === 200){
|
|
||||||
this.$store.dispatch('apply/setApplyId', { key: 'applyId', value: response.data.applyId });
|
|
||||||
this.applyId = localStorage.getItem('applyId')
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
}).catch((err)=>{
|
|
||||||
this.isDisabled = true
|
|
||||||
});
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
this.isView=true;
|
|
||||||
this.applyId = row.applyId
|
|
||||||
this.isReadOnly = false
|
|
||||||
this.isShowButton = true
|
|
||||||
this.isShowUploadButton = true
|
|
||||||
this.modalType = 'apply'
|
|
||||||
this.templateType = 'apply'
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
getDetail(applyId).then(response => {
|
|
||||||
this.form.isReward = response.data.isReward;
|
|
||||||
this.editOpen = true;
|
|
||||||
this.title = "修改申请";
|
|
||||||
this.fileData.forEach((item)=>{
|
|
||||||
item.childrenList = []
|
|
||||||
})
|
|
||||||
if (response.code === 200) {
|
|
||||||
response.data.fileRelationVOList.forEach((item) => {
|
|
||||||
let index = this.fileData.findIndex(i => i.fileCode === item.fileCode);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.fileData[index].childrenList.push({
|
|
||||||
name: item.fileName,
|
|
||||||
fileName:item.realName,
|
|
||||||
url: item.filePath,
|
|
||||||
state:item.fileState,
|
|
||||||
fileId:item.fileId,
|
|
||||||
fileCode:item.fileCode,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm: function() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
this.form.applyId = this.applyId
|
|
||||||
if (this.form.applyId !== '') {
|
|
||||||
checkUploadFile(this.applyId,this.applyParam.applyType).then((res)=>{
|
|
||||||
if (res.code === 200){
|
|
||||||
updateApply(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("提交成功");
|
|
||||||
this.open = false;
|
|
||||||
this.editOpen = false
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
this.$modal.msgError(res.msg);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const applyId = row.applyId || this.ids
|
|
||||||
this.$modal.confirm('是否确认删除申请?').then(function() {
|
|
||||||
return delApply(applyId);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
localStorage.removeItem('applyId');
|
|
||||||
}).catch(() => {});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
::v-deep .el-table__cell{
|
|
||||||
padding: 8px 0;
|
|
||||||
}
|
|
||||||
::v-deep .el-dialog--center .el-dialog__body{
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
::v-deep .el-dialog__footer{
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.fullscreen-dialog {
|
|
||||||
.el-dialog__wrapper {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 1000;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5); /* 遮罩层透明度 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|