审核提交

dev
dsh 1 year ago
parent 154d974f76
commit 6f517b5891

@ -0,0 +1,53 @@
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
}
})
}

@ -9,36 +9,40 @@
<el-table <el-table
class="down" class="down"
:data="scope.row.childrenList" :data="scope.row.childrenList"
border
stripe stripe
style="width: 100%;margin-top: 20px;" style="width: 100%;margin-top: 20px;"
:show-header="false" :show-header="false"
ref="table" ref="table"
> >
<el-table-column prop="name" label="文件名称"> <el-table-column prop="name" align="left" label="文件名称">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link style="margin-right: auto;" :href="`${baseUrl}${scope.row.url}`" :underline="false" target="_blank"> <el-link style="margin-right: auto;" :href="`${baseUrl}${scope.row.url}`" :underline="false" target="_blank">
<span class="el-icon-document"> {{ getFileName(scope.row.fileName) }} </span> <span class="el-icon-document"> {{ getFileName(scope.row.fileName) }} </span>
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核状态"> <el-table-column v-if="isShowUploadButton">
</el-table-column>
<el-table-column label="审核状态" align="center" >
<template slot-scope="scope" class="button-cell" > <template slot-scope="scope" class="button-cell" >
{{ scope.row.state === '2' || scope.row.state === null ? '未审核' : '已审核' }} {{ scope.row.state === 1 ? '通过' : scope.row.state === 2 ? '不通过' : '未审核'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作" align="center" >
<template slot-scope="scope" v-if="isShowButton"> <template slot-scope="scope" v-if="isShowButton">
<el-button size="small" type="text" @click="downloadFile(scope.row.fileId,scope.row.name)"></el-button> <el-button size="small" type="text" @click="downloadFile(scope.row.fileId,scope.row.name)"></el-button>
<el-button size="small" type="text" @click="deleteHandle(scope.row.fileId,scope)"></el-button> <el-button size="small" type="text" @click="filePassMethod(scope.row,'pass')" v-if="templateType==='aduit'"></el-button>
<el-button size="small" type="text" @click="filePassMethod(scope.row,'nopass')" v-if="templateType==='aduit'"></el-button>
<el-button size="small" type="text" @click="deleteHandle(scope.row.fileId,scope)" v-if="templateType==='apply'"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="文件名称" prop="name"></el-table-column> <el-table-column label="文件名称" prop="name"></el-table-column>
<el-table-column label="上传文件" v-if="isShowButton"> <el-table-column label="上传文件" v-if="isShowUploadButton">
<template v-slot:default="scope" v-if="isShowButton"> <template v-slot:default="scope" v-if="isShowUploadButton">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
ref="upload" ref="upload"
@ -73,6 +77,7 @@ import {blobValidate, tansParams} from "@/utils/ruoyi";
import errorCode from "@/utils/errorCode"; import errorCode from "@/utils/errorCode";
import service from "@/utils/request"; import service from "@/utils/request";
import {delFile, listFile} from "@/api/reward/apply"; import {delFile, listFile} from "@/api/reward/apply";
import {approved, filePass} from "@/api/reward/aduit";
export default { export default {
props:{ props:{
@ -92,7 +97,13 @@ export default {
}, },
isShowButton:{ isShowButton:{
type:Boolean, type:Boolean,
} },
templateType:{
type:String,
},
isShowUploadButton:{
type:Boolean,
},
}, },
data() { data() {
return { return {
@ -102,10 +113,36 @@ export default {
} }
}, },
mounted() { mounted() {
console.log(this.isShowButton) console.log(this.templateType)
}, },
methods:{ methods:{
getToken, filePassMethod(row,status){
if (status === 'pass'){
filePass(row.fileId,'1').then((res) => {
if (res.code === 200) {
this.$message({
message: "审核通过",
type: "success",
});
this.$set(row, 'state', 1);
} else {
this.$message.error(res.msg);
}
});
}else if (status === 'nopass'){
filePass(row.fileId,'2').then((res) => {
if (res.code === 200) {
this.$message({
message: "审核不通过",
type: "warning",
});
this.$set(row, 'state', 2);
}else {
this.$message.error(res.msg);
}
})
}
},
// //
handleUploadError(err) { handleUploadError(err) {
this.$modal.msgError("上传文件失败,请重试"); this.$modal.msgError("上传文件失败,请重试");
@ -206,26 +243,8 @@ export default {
::v-deep .el-dialog--center .el-dialog__body{ ::v-deep .el-dialog--center .el-dialog__body{
padding-bottom: 0; padding-bottom: 0;
} }
.down{ ::v-deep .cell{
::v-deep .cell{ text-align: center;
text-align: center;
}
::v-deep .el-table_3_column_13{
.cell{
text-align: left;
margin-left: 0px;
}
}
::v-deep .el-table_3_column_15{
.cell{
margin-left: -166px;
}
}
::v-deep .el-table_3_column_14{
.cell{
margin-left: 110px;
}
}
} }
.el\-upload\-list__item{ .el\-upload\-list__item{
display: flex; display: flex;

@ -1,24 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd(applyType)"
>申请</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 表格部分--> <!-- 表格部分-->
<el-table v-loading="loading" :row-selection="true" :data="tableData" @select="handleSelectionChange"> <el-table v-loading="loading" :row-selection="true" :data="tableData" @select="handleSelectionChange">
<!-- Table Columns -->
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column v-for="(column, index) in columns" :key="index" :label="column.label" :prop="column.prop" :align="column.align" :width="column.width"> <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"> <template v-if="column.type === 'date'" v-slot:default="scope">
<span>{{ parseTime(scope.row[column.prop], '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row[column.prop], '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@ -34,7 +17,7 @@
<!-- Actions Column --> <!-- Actions Column -->
<el-table-column v-if="actions.length > 0" label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column v-if="actions.length > 0" label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <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> <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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -88,6 +71,13 @@ export default {
}, },
methods: { methods: {
parseTime, parseTime,
filteredActions(applyStatus) {
if (applyStatus === 3) {
return this.actions;
} else {
return this.actions.filter(action => action.text !== '退回意见');
}
},
// //
getList(query){ getList(query){
this.$emit('getList', query); this.$emit('getList', query);

@ -3,7 +3,7 @@ import Vuex from 'vuex'
import app from './modules/app' import app from './modules/app'
import dict from './modules/dict' import dict from './modules/dict'
import user from './modules/user' import user from './modules/user'
import apply from './modules/apply' import apply from './modules/reward'
import tagsView from './modules/tagsView' import tagsView from './modules/tagsView'
import permission from './modules/permission' import permission from './modules/permission'
import settings from './modules/settings' import settings from './modules/settings'

@ -1,26 +1,27 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索部分-->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公告标题" prop="noticeTitle"> <el-form-item label="奖项名称" prop="applyName">
<el-input <el-input
v-model="queryParams.noticeTitle" v-model="queryParams.applyName"
placeholder="请输入公告标题" placeholder="请输入奖项名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="操作人员" prop="createBy"> <el-form-item label="创建者" prop="createBy">
<el-input <el-input
v-model="queryParams.createBy" v-model="queryParams.createBy"
placeholder="请输入操作人员" placeholder="请输入创建者"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="类型" prop="noticeType"> <el-form-item label="状态" prop="applyStatus">
<el-select v-model="queryParams.noticeType" placeholder="公告类型" clearable> <el-select v-model="queryParams.applyStatus" placeholder="状态" clearable>
<el-option <el-option
v-for="dict in dict.type.sys_notice_type" v-for="dict in dict.type.rew_apply_status"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -32,87 +33,19 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<custom-table
<el-row :gutter="10" class="mb8"> :columns="tableColumns"
<el-col :span="1.5"> :tableData="noticeList"
<el-button :loading="loading"
type="primary" :actions="tableActions"
plain :query-params="queryParams"
icon="el-icon-plus" :apply-type="applyParam.applyType"
size="mini" @handleQuery="handleQuery"
@click="handleAdd" @resetQuery="resetQuery"
v-hasPermi="['system:notice:add']" @handleView="handleView"
>新增</el-button> @getList="getList"
</el-col> @handleSelectionChange="handleSelectionChange"
<el-col :span="1.5"> ></custom-table>
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:notice:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:notice:remove']"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column
label="公告标题"
align="center"
prop="noticeTitle"
:show-overflow-tooltip="true"
/>
<el-table-column label="公告类型" align="center" prop="noticeType" width="150">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_notice_type" :value="scope.row.noticeType"/>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_notice_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="创建者" align="center" prop="createBy" width="150" />
<el-table-column label="创建时间" align="center" prop="createTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:notice:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:notice:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -120,48 +53,37 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!-- 修改公告对话框 -->
<!-- 添加或修改公告对话框 --> <el-dialog :title="title" :fullscreen="true" center :visible.sync="editOpen" top="0" width="100%" append-to-body>
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body> <el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-col :span="12">
<el-form-item label="公告标题" prop="noticeTitle">
<el-input v-model="form.noticeTitle" placeholder="请输入公告标题" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="公告类型" prop="noticeType">
<el-select v-model="form.noticeType" placeholder="请选择公告类型">
<el-option
v-for="dict in dict.type.sys_notice_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="状态"> <el-form-item label="是否获得过奖" prop="isReward">
<el-radio-group v-model="form.status"> <el-radio-group :disabled="isReadOnly" v-model="form.isReward">
<el-radio <el-radio :label="0"></el-radio>
v-for="dict in dict.type.sys_notice_status" <el-radio :label="1"></el-radio>
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="内容"> <el-form-item>
<editor v-model="form.noticeContent" :min-height="192"/> <Update
:applyId="applyId"
:dialog-type="dialogType"
:table-data="fileData"
:isShowButton="isShowButton"
:isShowUploadButton="isShowUploadButton"
:template-type="templateType"
ref="childComponent"
>
</Update>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" v-if="isView === false" @click="submitAduit"></el-button>
<el-button type="danger" v-if="isView === false" @click="callback">退 </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -169,13 +91,125 @@
</template> </template>
<script> <script>
import { listApply, getNotice, delNotice, addNotice, updateNotice } from "@/api/reward/apply"; 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 { export default {
name: "Notice", name: "aduit",
dicts: ['sys_notice_status', 'sys_notice_type'], components: {CustomTable, Update},
dicts: ['rew_apply_status'],
data() { data() {
return { return {
templateType:'aduit',
dialogType: 'edit',
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: [
{
name: '办学方向',
status: '',
expanded: false,
childrenList: [],
fileCode: 'rew_excellent_category_1',
},
{
name: '弘扬践行黄炎培职业教育思想',
status: '',
expanded: false,
childrenList: [],
fileCode: 'rew_excellent_category_2',
},
{
name: '办学模式',
status: '',
expanded: false,
childrenList: [],
fileCode: 'rew_excellent_category_3',
},
{
name: '专业建设',
status: '',
expanded: false,
childrenList: [],
fileCode: 'rew_excellent_category_4',
},
{
name: '课程开发与教学改革',
status: '',
expanded: false,
childrenList: [],
fileCode: 'rew_excellent_category_5',
},
{
name: '师资队伍建设',
status: '',
expanded: false,
childrenList: [],
fileCode: 'rew_excellent_category_6',
},
{
name: '信息化建设',
status: '',
expanded: false,
childrenList: [],
fileCode: 'rew_excellent_category_7',
},
{
name: '办学质量',
status: '',
expanded: false,
childrenList: [],
fileCode: 'rew_excellent_category_8',
},
{
name: '社会服务',
status: '',
expanded: false,
childrenList: [],
fileCode: 'rew_excellent_category_9',
},
{
name: '创新增量',
status: '',
expanded: false,
childrenList: [],
fileCode: 'rew_excellent_category_10',
},
{
name: '盖章后的申报表',
status: '',
expanded: false,
childrenList: [],
fileCode: 'rew_excellent_category_11',
},
{
name: '综述材料',
status: '',
expanded: false,
childrenList: [],
fileCode: 'rew_excellent_category_12',
},
],
// //
loading: true, loading: true,
// //
@ -190,39 +224,61 @@ export default {
total: 0, total: 0,
// //
noticeList: [], noticeList: [],
isReadOnly: false,
isShowButton: true,
isView: false,
// //
title: "", title: "",
// //
open: false, open: false,
editOpen: false,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
noticeTitle: undefined, applyName: undefined,
createBy: undefined, createBy: undefined,
status: undefined applyStatus: undefined,
}, },
// //
form: {}, form: {},
// //
rules: { rules: {
noticeTitle: [ applyName: [
{ required: true, message: "公告标题不能为空", trigger: "blur" } {required: true, message: "奖项名称不能为空", trigger: "blur"}
], ],
noticeType: [ isReward: [
{ required: true, message: "公告类型不能为空", trigger: "change" } {required: true, message: "请选择", trigger: "change"}
] ]
} },
applyParam: {
applyType: ''
},
applyId: ''
}; };
}, },
created() { created() {
this.getList();
},
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: { methods: {
/** 查询公告列表 */ /** 查询公告列表 */
getList() { getList(item) {
this.loading = true; this.loading = true;
listApply(this.queryParams).then(response => { 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.noticeList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -231,16 +287,14 @@ export default {
// //
cancel() { cancel() {
this.open = false; this.open = false;
this.editOpen = false
this.reset(); this.reset();
}, },
// //
reset() { reset() {
this.form = { this.form = {
noticeId: undefined, // applyName: undefined,
noticeTitle: undefined, isReward: undefined,
noticeType: undefined,
noticeContent: undefined,
status: "0"
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -251,61 +305,164 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
//
this.queryParams = {
pageNum: 1,
pageSize: 10,
applyName: undefined,
createBy: undefined,
applyStatus: undefined
};
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.noticeId) this.ids = selection.map(item => item.applyId)
this.single = selection.length!=1 this.single = selection.length != 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 新增按钮操作 */ /**查看按钮 */
handleAdd() { handleView(row) {
this.reset(); this.editOpen = true;
this.open = true; this.title = "查看奖项";
this.title = "添加公告"; const applyId = row.applyId || this.ids
this.isShowButton = false
getDetail(applyId).then(response => {
this.form = response.data;
console.log(this.form)
this.editOpen = true;
this.isReadOnly = true
this.isView = true
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) { handleUpdate(row) {
this.reset(); this.reset();
const noticeId = row.noticeId || this.ids this.isView = false;
getNotice(noticeId).then(response => { this.applyId = row.applyId
this.form = response.data; this.isReadOnly = false
this.open = true; this.isShowUploadButton = false
this.title = "修改公告"; 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(){
submitForm: function() { checkFile(this.applyId).then(res => {
this.$refs["form"].validate(valid => { if(res.code === 200){
if (valid) { approved(this.applyId).then(resp => {
if (this.form.noticeId != undefined) { if (resp.code === 200){
updateNotice(this.form).then(response => { this.$modal.msgSuccess(res.msg)
this.$modal.msgSuccess("修改成功"); this.editOpen = false
this.open = false; this.getList('mounted')
this.getList(); }
}); })
} else { }else{
addNotice(this.form).then(response => { this.$modal.msgError(res.msg)
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
} }
}); });
}, },
callback(){
this.$prompt('请输入退回意见', '退回意见', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
}).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) { handleDelete(row) {
const noticeIds = row.noticeId || this.ids const applyId = row.applyId || this.ids
this.$modal.confirm('是否确认删除公告?').then(function() { this.$modal.confirm('是否确认删除奖项').then(function () {
return delNotice(noticeIds); return delApply(applyId);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); localStorage.removeItem('applyId');
}).catch(() => {
});
} }
} }
}; };
</script> </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>

@ -33,6 +33,18 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
</el-form> </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 <custom-table
:columns="tableColumns" :columns="tableColumns"
:tableData="noticeList" :tableData="noticeList"
@ -73,6 +85,8 @@
:applyId="applyId" :applyId="applyId"
:table-data="fileData" :table-data="fileData"
:isShowButton="isShowButton" :isShowButton="isShowButton"
:isShowUploadButton="isShowUploadButton"
:template-type="templateType"
> >
</Update> </Update>
</el-form-item> </el-form-item>
@ -103,6 +117,8 @@
:dialog-type="dialogType" :dialog-type="dialogType"
:table-data="fileData" :table-data="fileData"
:isShowButton="isShowButton" :isShowButton="isShowButton"
:isShowUploadButton="isShowUploadButton"
:template-type="templateType"
ref="childComponent" ref="childComponent"
> >
</Update> </Update>
@ -127,14 +143,16 @@ import {
delApply, listFile delApply, listFile
} from "@/api/reward/apply"; } from "@/api/reward/apply";
import CustomTable from "@/components/CustomTable/CustomTable.vue"; import CustomTable from "@/components/CustomTable/CustomTable.vue";
import Update from './update.vue' import Update from '@/components/AllTypeFile/update.vue'
export default { export default {
name: "apply", name: "apply",
components: {CustomTable,Update}, components: {CustomTable,Update},
dicts: ['rew_apply_status'], dicts: ['rew_apply_status'],
data() { data() {
return { return {
templateType:'apply',
dialogType:'edit', dialogType:'edit',
isShowUploadButton:false,
// //
tableColumns: [ tableColumns: [
{ label: '创建者', prop: 'createBy', align: 'center' }, { label: '创建者', prop: 'createBy', align: 'center' },
@ -147,7 +165,8 @@ export default {
tableActions: [ tableActions: [
{ text: '查看', icon: 'el-icon-view', handler: this.handleView,}, { text: '查看', icon: 'el-icon-view', handler: this.handleView,},
{ text: '修改', icon: 'el-icon-edit', handler: this.handleUpdate, }, { text: '修改', icon: 'el-icon-edit', handler: this.handleUpdate, },
{ text: '删除', icon: 'el-icon-delete', handler: this.handleDelete,} { text: '删除', icon: 'el-icon-delete', handler: this.handleDelete,},
{ text: '退回意见', icon: 'el-icon-s-comment', handler: this.applyMsg,}
], ],
// //
fileData:[ fileData:[
@ -283,6 +302,9 @@ export default {
}, },
applyId:'' applyId:''
}; };
},
computed: {
}, },
created() { created() {
@ -302,15 +324,9 @@ export default {
let queryObj = { let queryObj = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
createId:null,
applyStatus:'0,1,3', applyStatus:'0,1,3',
applyType: this.applyParam.applyType applyType: this.applyParam.applyType
} }
this.$store.dispatch('GetInfo').then((res) => {
if (res.user.userId !== '1'){
queryObj.createId = res.user.userId
}
});
listApply(item ==='mounted' ? queryObj:this.queryParams).then(response => { listApply(item ==='mounted' ? queryObj:this.queryParams).then(response => {
this.noticeList = response.rows; this.noticeList = response.rows;
this.total = response.total; this.total = response.total;
@ -355,12 +371,18 @@ export default {
this.single = selection.length!=1 this.single = selection.length!=1
this.multiple = !selection.length this.multiple = !selection.length
}, },
applyMsg(row){
let applyMsg = row.applyMsg
this.$alert(applyMsg, '退回意见', {
confirmButtonText: '确定',
});
},
/**查看按钮 */ /**查看按钮 */
handleView(row){ handleView(row){
this.editOpen = true; this.editOpen = true;
this.title = "查看奖项"; this.title = "查看奖项";
const applyId = row.applyId || this.ids const applyId = row.applyId || this.ids
this.isShowButton = false this.isShowUploadButton = false
getDetail(applyId).then(response => { getDetail(applyId).then(response => {
this.form = response.data; this.form = response.data;
console.log(this.form) console.log(this.form)
@ -395,15 +417,16 @@ export default {
this.open = true; this.open = true;
this.isReadOnly = false this.isReadOnly = false
this.isShowButton = true this.isShowButton = true
this.isShowUploadButton = true
this.title = "添加奖项"; this.title = "添加奖项";
console.log(this.applyParam) console.log(this.applyParam)
if(this.noticeList.length === 0){ // if(this.noticeList.length === 0){
getApplyId(this.applyParam).then(response => { getApplyId(this.applyParam).then(response => {
this.$store.dispatch('apply/setApplyId', { key: 'applyId', value: response.data.applyId }); this.$store.dispatch('apply/setApplyId', { key: 'applyId', value: response.data.applyId });
this.applyId = localStorage.getItem('applyId') this.applyId = localStorage.getItem('applyId')
this.getList() this.getList()
}); });
} // }
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
@ -412,6 +435,7 @@ export default {
this.applyId = row.applyId this.applyId = row.applyId
this.isReadOnly = false this.isReadOnly = false
this.isShowButton = true this.isShowButton = true
this.isShowUploadButton = true
const applyId = row.applyId || this.ids const applyId = row.applyId || this.ids
getDetail(applyId).then(response => { getDetail(applyId).then(response => {
this.form.isReward = response.data.isReward; this.form.isReward = response.data.isReward;

Loading…
Cancel
Save