学工发布通知前端页面的修改,用于管理通知,对整个年级发送的通知修改和删除;给学生证提交流程添加完成制作功能的前端的修改
This commit is contained in:
@@ -3,7 +3,7 @@ import request from '@/utils/request'
|
||||
// 查询通知管理列表
|
||||
export function listNotificationManagement(query) {
|
||||
return request({
|
||||
url: '/routine/NotificationManagement/my-sent',
|
||||
url: '/routine/NotificationManagement/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@@ -43,6 +43,15 @@ export function delNotificationManagement(id) {
|
||||
})
|
||||
}
|
||||
|
||||
// 批量修改通知管理
|
||||
export function batchUpdateNotificationManagement(data) {
|
||||
return request({
|
||||
url: '/routine/NotificationManagement/batchUpdate',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取年级列表
|
||||
export function getGradeList() {
|
||||
return request({
|
||||
@@ -60,5 +69,15 @@ export function sendNotificationByGrades(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询当前用户发送的通知列表
|
||||
export function listMySentNotifications(query) {
|
||||
return request({
|
||||
url: '/routine/NotificationManagement/my-sent',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -90,7 +90,23 @@ export function updateStuIdReissue(data) {
|
||||
// 删除学生证补办
|
||||
export function delStuIdReissue(id) {
|
||||
return request({
|
||||
url: '/routine/stuIdReissue/' + id,
|
||||
url: '/routine/stuIdReissue/cancel/' + id,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取学生证补办审核状态
|
||||
export function getStuIdReissueStatus(stuNo) {
|
||||
return request({
|
||||
url: '/routine/stuIdReissue/getStatus/' + stuNo,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 完成制作
|
||||
export function completedStuIdReissue(id) {
|
||||
return request({
|
||||
url: '/routine/stuIdReissue/completed/' + id,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
@@ -54,3 +54,13 @@ export function delStuMultiLevelReview(id) {
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 更新审核信息并同时更新学生证补办状态
|
||||
export function updateStuMultiLevelReviewWithStuIdReissue(data) {
|
||||
return request({
|
||||
url: '/routine/stuMultiLevelReview/updateWithStuIdReissue',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@@ -45,3 +45,11 @@ export function delMsg(id) {
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据学号查询用户ID
|
||||
export function getUserIdByStuNo(stuNo) {
|
||||
return request({
|
||||
url: '/system/msg/getUserIdByStuNo/' + stuNo,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@@ -112,8 +112,31 @@ service.interceptors.response.use(res => {
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error)
|
||||
|
||||
// 判断是否是请求取消错误
|
||||
const isCanceled = error && (
|
||||
error.code === 'ERR_CANCELED' ||
|
||||
error.code === 'ECONNABORTED' ||
|
||||
error.message === 'canceled' ||
|
||||
error.message === 'Cancel' ||
|
||||
error.__CANCEL__ === true ||
|
||||
(typeof error.message === 'string' && /cancel/i.test(error.message))
|
||||
);
|
||||
|
||||
// 如果是请求取消,直接返回,不显示错误消息
|
||||
if (isCanceled) {
|
||||
console.log('请求被取消,忽略该错误');
|
||||
return Promise.reject(error);
|
||||
}
|
||||
|
||||
let { message } = error;
|
||||
if (message == "Network Error") {
|
||||
// 进一步判断是否真的是网络错误,还是页面卸载导致的
|
||||
if (window.performance && window.performance.navigation.type === 1) {
|
||||
// 页面刷新导致的,忽略
|
||||
console.log('页面刷新导致的网络错误,已忽略');
|
||||
return Promise.reject(error);
|
||||
}
|
||||
message = "后端接口连接异常";
|
||||
Message({ message: message, type: 'error', duration: 5 * 1000 })
|
||||
} else if (message.includes("timeout")) {
|
||||
|
@@ -2,12 +2,7 @@
|
||||
<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="content">
|
||||
<el-input
|
||||
v-model="queryParams.content"
|
||||
placeholder="请输入通知内容"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.content" 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>
|
||||
@@ -17,46 +12,20 @@
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['routine:NotificationManagement:add']"
|
||||
>新增</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['routine:NotificationManagement:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['routine:NotificationManagement:edit']"
|
||||
>修改</el-button>
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['routine:NotificationManagement: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="['routine:NotificationManagement:remove']"
|
||||
>删除</el-button>
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['routine:NotificationManagement:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['routine:NotificationManagement:export']"
|
||||
>导出</el-button>
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['routine:NotificationManagement:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
@@ -64,35 +33,21 @@
|
||||
<el-table v-loading="loading" :data="NotificationManagementList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" type="index" align="center" prop="id" />
|
||||
<el-table-column label="收信人用户id" align="center" prop="receiver" />
|
||||
<el-table-column label="年级" align="center" prop="gradeName" />
|
||||
<el-table-column label="标题" align="center" prop="title" />
|
||||
<el-table-column label="消息内容" align="center" prop="content" />
|
||||
<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="['routine:NotificationManagement:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['routine:NotificationManagement:remove']"
|
||||
>删除</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['routine:NotificationManagement:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['routine:NotificationManagement:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 添加或修改通知管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
@@ -103,31 +58,22 @@
|
||||
<el-radio label="grade">按年级发送</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!-- 年级多选 -->
|
||||
<el-form-item
|
||||
v-if="form.sendType === 'grade'"
|
||||
label="选择年级"
|
||||
prop="selectedGrades"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.selectedGrades"
|
||||
multiple
|
||||
placeholder="请选择年级"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="grade in gradeList"
|
||||
:key="grade.value"
|
||||
:label="grade.label"
|
||||
:value="grade.value"
|
||||
/>
|
||||
<el-form-item v-if="form.sendType === 'grade'" label="选择年级" prop="selectedGrades">
|
||||
<el-select v-model="form.selectedGrades" multiple placeholder="请选择年级" style="width: 100%">
|
||||
<el-option v-for="grade in gradeList" :key="grade.value" :label="grade.label" :value="grade.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="消息内容" prop="content">
|
||||
<editor v-model="form.content" :min-height="192"/>
|
||||
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input v-model="form.title" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="消息内容" prop="content">
|
||||
<el-input v-model="form.content" type="textarea" :rows="4" placeholder="请输入消息内容" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">发送</el-button>
|
||||
@@ -138,7 +84,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listNotificationManagement, getNotificationManagement, delNotificationManagement, addNotificationManagement, updateNotificationManagement, getGradeList, sendNotificationByGrades } from "@/api/routine/NotificationManagement";
|
||||
import { listMySentNotifications, getNotificationManagement, delNotificationManagement, addNotificationManagement, updateNotificationManagement, getGradeList, sendNotificationByGrades } from "@/api/routine/NotificationManagement";
|
||||
|
||||
export default {
|
||||
name: "NotificationManagement",
|
||||
@@ -177,6 +123,9 @@ export default {
|
||||
sendType: [
|
||||
{ required: true, message: "请选择发送方式", trigger: "change" }
|
||||
],
|
||||
title: [
|
||||
{ required: true, message: "请输入标题", trigger: "blur" }
|
||||
],
|
||||
content: [
|
||||
{ required: true, message: "请输入消息内容", trigger: "blur" }
|
||||
]
|
||||
@@ -188,10 +137,10 @@ export default {
|
||||
this.getGradeList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询通知管理列表 */
|
||||
/** 查询当前用户通知管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listNotificationManagement(this.queryParams).then(response => {
|
||||
listMySentNotifications(this.queryParams).then(response => {
|
||||
this.NotificationManagementList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@@ -208,6 +157,7 @@ export default {
|
||||
id: null,
|
||||
sender: null,
|
||||
receiver: null,
|
||||
title: null,
|
||||
content: null,
|
||||
sendType: 'user',
|
||||
selectedGrades: [],
|
||||
@@ -231,7 +181,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
@@ -263,7 +213,7 @@ export default {
|
||||
this.$modal.msgError("请选择年级");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (this.form.id != null) {
|
||||
// 修改操作
|
||||
updateNotificationManagement(this.form).then(response => {
|
||||
@@ -272,11 +222,23 @@ export default {
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
// 新增操作
|
||||
// 新增操作
|
||||
if (this.form.sendType === 'grade') {
|
||||
// 按年级发送
|
||||
// 创建一个临时div来提取纯文本
|
||||
const tempDiv = document.createElement('div');
|
||||
tempDiv.innerHTML = this.form.content;
|
||||
const plainText = tempDiv.textContent || tempDiv.innerText || '';
|
||||
|
||||
// 提取标题的纯文本
|
||||
const titleDiv = document.createElement('div');
|
||||
titleDiv.innerHTML = this.form.title || '';
|
||||
const plainTitle = titleDiv.textContent || titleDiv.innerText || '';
|
||||
|
||||
const data = {
|
||||
content: this.form.content,
|
||||
title: plainTitle, // 添加标题字段
|
||||
content: plainText, // 使用纯文本
|
||||
selectedGrades: this.form.selectedGrades
|
||||
};
|
||||
sendNotificationByGrades(data).then(response => {
|
||||
@@ -284,7 +246,7 @@ export default {
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -292,12 +254,12 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除通知管理编号为"' + ids + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除通知管理编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delNotificationManagement(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
@@ -305,7 +267,7 @@ export default {
|
||||
...this.queryParams
|
||||
}, `NotificationManagement_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
||||
|
||||
/** 获取年级列表 */
|
||||
getGradeList() {
|
||||
getGradeList().then(response => {
|
||||
@@ -324,7 +286,7 @@ export default {
|
||||
];
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
/** 发送方式改变时的处理 */
|
||||
handleSendTypeChange(value) {
|
||||
// 清空相关字段
|
||||
@@ -333,7 +295,7 @@ export default {
|
||||
} else if (value === 'grade') {
|
||||
this.form.receiver = null;
|
||||
}
|
||||
|
||||
|
||||
// 重新设置表单验证规则
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form && this.$refs.form.clearValidate();
|
||||
|
@@ -6,6 +6,7 @@
|
||||
<el-step title="辅导员审核" :description="changeActive(form.inspectionProgress)"></el-step>
|
||||
<el-step title="学工处理"
|
||||
:description="`${form.isPay === 0 ? '未缴费:' : '已缴费,备注:'}` + `${$route.query.jwcCmt ? $route.query.jwcCmt : '等待缴费,记录缴费金额'}`"></el-step>
|
||||
<el-step title="完成制作" :description="getCompletionDescription()"></el-step>
|
||||
</el-steps>
|
||||
</el-card>
|
||||
<el-card class="box-card" style="margin-top: 20px;">
|
||||
@@ -65,6 +66,14 @@
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card" style="margin-top: 20px;">
|
||||
<div class="titleNav">办理状态</div>
|
||||
<div style="margin-bottom: 20px;">
|
||||
<el-tag v-if="form.inspectionProgress >= 3" type="success">已完成制作</el-tag>
|
||||
<el-tag v-else-if="form.inspectionProgress >= 2" type="warning">学工处理中</el-tag>
|
||||
<el-tag v-else-if="form.inspectionProgress >= 1" type="primary">辅导员审核中</el-tag>
|
||||
<el-tag v-else-if="form.inspectionProgress === 0" type="info">待审核</el-tag>
|
||||
<el-tag v-else type="danger">申请被驳回</el-tag>
|
||||
</div>
|
||||
<div class="titleNav">办理信息</div>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
|
||||
<div class="formItem">
|
||||
@@ -109,20 +118,33 @@
|
||||
</el-form>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer" style="text-align: right; margin-top: 20px;">
|
||||
<el-button v-if="active === 0" type="primary" @click="submitForm(1)">提交申请</el-button>
|
||||
<el-button v-if="finishStatus !== 'success' || form.inspectionProgress === 0" type="primary"
|
||||
<!-- 新申请时显示提交申请按钮 -->
|
||||
<el-button v-if="!form.id" type="primary" @click="submitForm(1)">提交申请</el-button>
|
||||
|
||||
<!-- 已有申请但未完成制作时显示修改提交申请按钮 -->
|
||||
<el-button v-if="form.id && form.inspectionProgress < 3" type="primary"
|
||||
@click="submitForm(1)">修改提交申请</el-button>
|
||||
|
||||
<!-- 已完成制作时显示继续提交申请按钮 -->
|
||||
<el-button v-if="form.id && form.inspectionProgress >= 3" type="primary"
|
||||
@click="submitNewApplication">继续提交申请</el-button>
|
||||
|
||||
<!-- 未完成制作时显示取消申请按钮 -->
|
||||
<el-button v-if="form.id && form.inspectionProgress < 3"
|
||||
type="danger" @click="cancelApplication">取消申请</el-button>
|
||||
|
||||
<!-- 已完成制作时显示取消申请按钮(不可点击) -->
|
||||
<el-button v-if="form.id && form.inspectionProgress >= 3"
|
||||
type="info" disabled @click="showCompletedMessage">当前审核已完成,不可取消</el-button>
|
||||
|
||||
<el-button type="primary" @click="printing">打印学生证申请表</el-button>
|
||||
<!-- <el-button v-if="active === 1 && showRole <= 3" type="primary"
|
||||
@click="auditInformation(2, '辅导员')">审核信息</el-button>
|
||||
<el-button v-if="active === 2 && showRole <= 2" type="primary" @click="payment(3, '学工')">登记缴费金额</el-button> -->
|
||||
<el-button @click="$router.push('/routine/sicr/stuIdReissueLIst')">返 回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getStuIdReissue, addStuIdReissue, updateStuIdReissue, getStudentInfoByStuId } from "@/api/routine/stuIdReissue";
|
||||
import { getStuIdReissue, addStuIdReissue, updateStuIdReissue, getStudentInfoByStuId, getStuIdReissueStatus, delStuIdReissue } from "@/api/routine/stuIdReissue";
|
||||
import { listClass } from "@/api/stuCQS/basedata/class";
|
||||
import {
|
||||
pcaTextArr, // 省市区联动数据,纯汉字
|
||||
@@ -176,7 +198,7 @@ export default {
|
||||
]
|
||||
},
|
||||
// 申请进展
|
||||
active: 0,
|
||||
active: 1,
|
||||
showRole: 0,
|
||||
// 查询到的审核信息
|
||||
stuMultiLevelReview: {},
|
||||
@@ -196,7 +218,7 @@ export default {
|
||||
immediate: true,
|
||||
handler() {
|
||||
this.form = {}
|
||||
this.active = 0
|
||||
this.active = 1
|
||||
this.finishStatus = 'success'
|
||||
if (this.$route.query.id !== undefined) {
|
||||
this.handleUpdate()
|
||||
@@ -214,6 +236,7 @@ export default {
|
||||
this.isDisabled = false
|
||||
this.isDisabledStuNo = false
|
||||
this.finishStatus = 'success'
|
||||
this.active = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -258,19 +281,61 @@ export default {
|
||||
className: this.form.className
|
||||
}).then(response => {
|
||||
// this.classList = response.rows;
|
||||
this.form.counsellorName = response.rows[0].teacher.name
|
||||
this.form.counsellorId = response.rows[0].teacher.teacherId
|
||||
if (response.rows && response.rows.length > 0 && response.rows[0].teacher) {
|
||||
this.form.counsellorName = response.rows[0].teacher.name
|
||||
this.form.counsellorId = response.rows[0].teacher.teacherId
|
||||
} else {
|
||||
console.warn('未找到班级信息或辅导员信息');
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('查询班级信息失败:', error);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 进度变化时改变文字提示
|
||||
changeActive(active) {
|
||||
if (active === -1) {
|
||||
return '申请被驳回,备注:申请不通过,' + this.$route.query.fdyCmt
|
||||
} else if (active >= 1) {
|
||||
return '申请通过,备注:' + this.$route.query.fdyCmt
|
||||
const progress = Number(this.form.inspectionProgress);
|
||||
if (progress === -1) {
|
||||
return '申请被驳回,备注:申请不通过,' + this.$route.query.fdyCmt;
|
||||
} else if (progress === 0) {
|
||||
return '辅导员审核学生补办请求通不通过';
|
||||
} else if (progress === 1) {
|
||||
return '申请通过,备注:' + this.$route.query.fdyCmt;
|
||||
} else if (progress === 2) {
|
||||
return '学工处理中,备注:' + (this.$route.query.jwcCmt || '等待缴费,记录缴费金额');
|
||||
} else if (progress >= 3) {
|
||||
return '已完成制作,备注:学生证制作完成';
|
||||
} else {
|
||||
return '辅导员审核学生补办请求通不通过'
|
||||
return '辅导员审核学生补办请求通不通过';
|
||||
}
|
||||
},
|
||||
// 根据inspectionProgress确定当前步骤
|
||||
calculateActive() {
|
||||
const progress = Number(this.form.inspectionProgress);
|
||||
console.log('调试信息 - calculateActive中的progress:', progress, '类型:', typeof progress);
|
||||
if (progress >= 3) {
|
||||
console.log('调试信息 - 返回步骤4 (完成制作)');
|
||||
return 4; // 完成制作时返回4,对应步骤条的最后一个步骤
|
||||
} else if (progress >= 2) {
|
||||
console.log('调试信息 - 返回步骤3 (学工处理)');
|
||||
return 3; // 学工处理
|
||||
} else if (progress >= 1) {
|
||||
console.log('调试信息 - 返回步骤2 (辅导员审核)');
|
||||
return 2; // 辅导员审核
|
||||
} else {
|
||||
console.log('调试信息 - 返回步骤1 (学生申请)');
|
||||
return 1; // 学生申请
|
||||
}
|
||||
},
|
||||
// 获取完成制作步骤的动态描述
|
||||
getCompletionDescription() {
|
||||
const progress = Number(this.form.inspectionProgress);
|
||||
if (progress >= 3) {
|
||||
return '学生证制作已完成,请及时领取';
|
||||
} else if (progress >= 2) {
|
||||
return '等待学工完成学生证制作';
|
||||
} else {
|
||||
return '学工完成学生证制作';
|
||||
}
|
||||
},
|
||||
// 取消按钮
|
||||
@@ -291,7 +356,7 @@ export default {
|
||||
jg: null,
|
||||
hksz2: null
|
||||
};
|
||||
this.active = 0
|
||||
this.active = 1
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
@@ -307,12 +372,27 @@ export default {
|
||||
this.form = response.data;
|
||||
this.form.studentName = this.form.stuName
|
||||
// this.form.stuName = this.form.studentName
|
||||
console.log('调试信息 - inspectionProgress:', response.data.inspectionProgress, '类型:', typeof response.data.inspectionProgress);
|
||||
console.log('调试信息 - calculateActive():', this.calculateActive());
|
||||
|
||||
if (response.data.inspectionProgress === -1) {
|
||||
this.active = 2
|
||||
this.active = 1; // 驳回时显示学生申请步骤
|
||||
this.finishStatus = 'error'
|
||||
} else {
|
||||
this.active = +response.data.inspectionProgress + 1
|
||||
// console.log(this.active);
|
||||
this.active = this.calculateActive();
|
||||
// 根据审核进度设置完成状态
|
||||
if (Number(response.data.inspectionProgress) >= 3) {
|
||||
this.finishStatus = 'success'
|
||||
} else if (Number(response.data.inspectionProgress) >= 0) {
|
||||
this.finishStatus = 'success'
|
||||
} else {
|
||||
this.finishStatus = 'error'
|
||||
}
|
||||
}
|
||||
console.log('调试信息 - active:', this.active, '类型:', typeof this.active);
|
||||
console.log('调试信息 - finishStatus:', this.finishStatus);
|
||||
console.log('调试信息 - 步骤条配置检查 - active值应为3时:', this.active === 3, 'finishStatus:', this.finishStatus);
|
||||
|
||||
// 地区转换
|
||||
this.form.nativePlace = this.form.jg !== null ? this.parseSelectedPath(this.form.jg) : '暂无填写'
|
||||
// 地区转换
|
||||
@@ -328,29 +408,100 @@ export default {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateStuIdReissue(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.active = active
|
||||
this.finishStatus = 'success'
|
||||
this.isDisabled = true
|
||||
// this.$router.replace({ inspectionProgress: this.form.inspectionProgress });
|
||||
// 修改成功后修改路上参数
|
||||
this.$router.push({ path: this.$route.path, query: { id: this.form.id, stuNo: this.form.stuNo, inspectionProgress: this.form.inspectionProgress } });
|
||||
this.$modal.closeLoading()
|
||||
console.log('修改响应:', response);
|
||||
if (response.code === 200) {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.active = active
|
||||
this.finishStatus = 'success'
|
||||
this.isDisabled = true
|
||||
// 修改成功后修改路由参数
|
||||
this.$router.push({ path: this.$route.path, query: { id: this.form.id, stuNo: this.form.stuNo, inspectionProgress: this.form.inspectionProgress } });
|
||||
}
|
||||
// 移除else分支,让全局拦截器处理所有非200的情况
|
||||
}).catch(error => {
|
||||
this.$modal.closeLoading()
|
||||
console.log('修改捕获到错误 - error:', error);
|
||||
// 如果error是字符串'error',说明是全局拦截器返回的Promise.reject('error')
|
||||
// 这种情况下,全局拦截器已经显示了错误信息,这里不再重复显示
|
||||
if (error === 'error') {
|
||||
console.log('修改业务错误已由全局拦截器处理');
|
||||
return;
|
||||
}
|
||||
// 忽略由于路由跳转/刷新导致的请求取消错误,避免误报网络错误
|
||||
const isCanceled = error && (
|
||||
error.code === 'ERR_CANCELED' ||
|
||||
error.message === 'canceled' ||
|
||||
error.message === 'Cancel' ||
|
||||
error.__CANCEL__ === true ||
|
||||
(typeof error.message === 'string' && /cancel/i.test(error.message))
|
||||
);
|
||||
if (isCanceled) {
|
||||
console.log('请求被取消,已忽略该错误提示');
|
||||
return;
|
||||
}
|
||||
// 只处理真正的网络错误
|
||||
if (!error.response) {
|
||||
this.$modal.msgError("网络连接失败,请检查网络");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addStuIdReissue(this.form).then(response => {
|
||||
if (response.code === 500) {
|
||||
this.$modal.closeLoading()
|
||||
return
|
||||
}
|
||||
else {
|
||||
this.$modal.closeLoading()
|
||||
console.log('提交响应:', response);
|
||||
if (response.code === 200) {
|
||||
this.$modal.msgSuccess("提交申请成功");
|
||||
this.active = active
|
||||
// this.reset()
|
||||
this.$modal.closeLoading()
|
||||
this.finishStatus = 'success'
|
||||
this.isDisabled = true
|
||||
// 新增成功后跳转到详情页面
|
||||
console.log('提交成功,更新表单状态');
|
||||
this.form.inspectionProgress = 0;
|
||||
// 设置表单ID(如果后端返回了ID)
|
||||
if (response.data && response.data.id) {
|
||||
this.form.id = response.data.id;
|
||||
}
|
||||
// 更新路由参数,不刷新页面
|
||||
setTimeout(() => {
|
||||
this.$message.info('申请提交成功');
|
||||
// 使用replace更新路由,避免强制刷新
|
||||
if (this.form.id) {
|
||||
this.$router.replace({
|
||||
path: this.$route.path,
|
||||
query: {
|
||||
id: this.form.id,
|
||||
stuNo: this.form.stuNo,
|
||||
inspectionProgress: this.form.inspectionProgress
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$modal.closeLoading()
|
||||
console.log('提交捕获到错误 - error:', error);
|
||||
// 如果error是字符串'error',说明是全局拦截器返回的Promise.reject('error')
|
||||
// 这种情况下,全局拦截器已经显示了错误信息,这里不再重复显示
|
||||
if (error === 'error') {
|
||||
console.log('提交业务错误已由全局拦截器处理');
|
||||
return;
|
||||
}
|
||||
// 忽略由于路由跳转/刷新导致的请求取消错误
|
||||
const isCanceled = error && (
|
||||
error.code === 'ERR_CANCELED' ||
|
||||
error.message === 'canceled' ||
|
||||
error.message === 'Cancel' ||
|
||||
error.__CANCEL__ === true ||
|
||||
(typeof error.message === 'string' && /cancel/i.test(error.message))
|
||||
);
|
||||
if (!error.response) {
|
||||
this.$modal.msgError("网络连接失败,请检查网络");
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$modal.closeLoading()
|
||||
this.$modal.msgError("请完善必填信息");
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -388,6 +539,51 @@ export default {
|
||||
listId: this.form.id || null,
|
||||
},
|
||||
})
|
||||
},
|
||||
// 继续提交申请(已完成制作后可重新申请)
|
||||
submitNewApplication() {
|
||||
this.$confirm('您已完成制作,是否要重新提交新的申请?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// 重置表单为新申请状态
|
||||
this.reset();
|
||||
this.isDisabled = false;
|
||||
this.isDisabledStuNo = false;
|
||||
this.finishStatus = 'success';
|
||||
this.active = 1;
|
||||
// 清除路由参数,进入新申请模式
|
||||
this.$router.push({ path: this.$route.path });
|
||||
this.$message.success('已重置为新申请状态,请填写申请信息');
|
||||
}).catch(() => {
|
||||
this.$message.info('已取消操作');
|
||||
});
|
||||
},
|
||||
// 取消申请
|
||||
cancelApplication() {
|
||||
this.$confirm('确认要取消此申请吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// 调用删除接口
|
||||
this.$modal.loading('正在取消申请...');
|
||||
delStuIdReissue(this.form.id).then(response => {
|
||||
this.$modal.closeLoading();
|
||||
this.$modal.msgSuccess('申请已取消');
|
||||
// 返回列表页面
|
||||
this.$router.push('/routine/sicr/stuIdReissueLIst');
|
||||
}).catch(() => {
|
||||
this.$modal.closeLoading();
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$message.info('已取消操作');
|
||||
});
|
||||
},
|
||||
// 显示已完成消息
|
||||
showCompletedMessage() {
|
||||
this.$message.info('当前审核已完成,不可取消');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@@ -15,6 +15,7 @@
|
||||
<el-option label="学生提交申请" value="0"></el-option>
|
||||
<el-option label="辅导员通过" value="1"></el-option>
|
||||
<el-option label="学工通过" value="2"></el-option>
|
||||
<el-option label="完成制作" value="3"></el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="queryParams.inspectionProgress" placeholder="请输入审核状态" clearable
|
||||
@keyup.enter.native="handleQuery" /> -->
|
||||
@@ -72,11 +73,13 @@
|
||||
<el-tag type="danger" v-if="scope.row.inspectionProgress === 0">未审核</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.inspectionProgress === 1">辅导员通过</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.inspectionProgress === 2">学工通过</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.inspectionProgress === 3">完成制作</el-tag>
|
||||
<el-tag type="danger" v-else>辅导员驳回</el-tag>
|
||||
</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="['routine:stuIdReissue:edit']" v-if="showRole !== 4">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
@@ -122,6 +125,8 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -177,7 +182,7 @@ export default {
|
||||
{ val: 1, name: '辅导员通过' },
|
||||
{ val: 2, name: '学工通过' }
|
||||
],
|
||||
showRole: '',
|
||||
showRole: ''
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -310,8 +315,8 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
if (row.inspectionProgress > 0) {
|
||||
this.$message.error('正在审核中,无法取消')
|
||||
if (row.inspectionProgress >= 3) {
|
||||
this.$message.error('当前审核已完成,不可取消')
|
||||
return
|
||||
}
|
||||
this.$modal.confirm('是否确认取消学生证补办申请编号为"' + ids + '"的数据项?').then(function () {
|
||||
@@ -347,7 +352,9 @@ export default {
|
||||
} else {
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@@ -69,11 +69,14 @@
|
||||
<el-tag type="danger" v-if="scope.row.reviewerStatus === 0">未审核</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.reviewerStatus === 1">辅导员通过</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.reviewerStatus === 2">学工处通过</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.reviewerStatus === 3">完成制作</el-tag>
|
||||
<el-tag type="danger" v-else>辅导员驳回</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="handleCompleted(scope.row)"
|
||||
v-hasPermi="['routine:stuMultiLevelReview:completed']" v-if="scope.row.reviewerStatus === 2">完成制作</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['routine:stuMultiLevelReview:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
@@ -118,11 +121,32 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 完成制作对话框 -->
|
||||
<el-dialog title="完成制作" :visible.sync="completedOpen" width="500px" append-to-body>
|
||||
<el-form ref="completedForm" :model="completedForm" :rules="completedRules" label-width="80px">
|
||||
<el-form-item label="学生姓名" prop="stuName">
|
||||
<el-input v-model="completedForm.stuName" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学生学号" prop="stuNo">
|
||||
<el-input v-model="completedForm.stuNo" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通知消息" prop="messageContent">
|
||||
<el-input v-model="completedForm.messageContent" type="textarea" placeholder="请输入发送给学生的通知消息" :rows="4" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitCompleted">确 定</el-button>
|
||||
<el-button @click="cancelCompleted">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listStuMultiLevelReview, getStuMultiLevelReview, delStuMultiLevelReview, addStuMultiLevelReview, updateStuMultiLevelReview } from "@/api/routine/stuMultiLevelReview";
|
||||
import { listStuMultiLevelReview, getStuMultiLevelReview, delStuMultiLevelReview, addStuMultiLevelReview, updateStuMultiLevelReviewWithStuIdReissue} from "@/api/routine/stuMultiLevelReview";
|
||||
import { getUserIdByStuNo, addMsg } from "@/api/stuCQS/process-center/msg";
|
||||
|
||||
import { getUserProfile } from "@/api/system/user"; // 获取当前用户接口
|
||||
export default {
|
||||
name: "StuMultiLevelReview",
|
||||
@@ -146,6 +170,8 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 是否显示完成制作弹出层
|
||||
completedOpen: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@@ -163,6 +189,13 @@ export default {
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 完成制作表单参数
|
||||
completedForm: {
|
||||
stuName: null,
|
||||
stuNo: null,
|
||||
reason: null,
|
||||
messageContent: "你申请办理的学生证制作完成,长堽校区前往xxx领取,里建校区前往xxx领取"
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
stuName: [
|
||||
@@ -175,6 +208,12 @@ export default {
|
||||
{ required: true, message: "申请原因不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
// 完成制作表单校验
|
||||
completedRules: {
|
||||
messageContent: [
|
||||
{ required: true, message: "通知消息不能为空", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
roleGroup: null
|
||||
};
|
||||
},
|
||||
@@ -296,6 +335,74 @@ export default {
|
||||
this.download('routine/stuMultiLevelReview/export', {
|
||||
...this.queryParams
|
||||
}, `stuMultiLevelReview_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
||||
/** 完成制作按钮操作 */
|
||||
handleCompleted(row) {
|
||||
this.resetCompleted();
|
||||
this.completedForm.stuName = row.stuName;
|
||||
this.completedForm.stuNo = row.stuNo;
|
||||
this.completedForm.reason = row.reason;
|
||||
this.completedForm.id = row.id;
|
||||
this.completedOpen = true;
|
||||
},
|
||||
|
||||
// 完成制作表单重置
|
||||
resetCompleted() {
|
||||
this.completedForm = {
|
||||
stuName: null,
|
||||
stuNo: null,
|
||||
reason: null,
|
||||
messageContent: "你申请办理的学生证制作完成,长堽校区前往xxx领取,里建校区前往xxx领取",
|
||||
id: null
|
||||
};
|
||||
this.resetForm("completedForm");
|
||||
},
|
||||
|
||||
// 完成制作取消按钮
|
||||
cancelCompleted() {
|
||||
this.completedOpen = false;
|
||||
this.resetCompleted();
|
||||
},
|
||||
|
||||
// 完成制作提交按钮
|
||||
submitCompleted() {
|
||||
this.$refs["completedForm"].validate(valid => {
|
||||
if (valid) {
|
||||
// 第一步:根据学号查询用户ID
|
||||
getUserIdByStuNo(this.completedForm.stuNo).then(response => {
|
||||
const receiverId = response.data;
|
||||
if (!receiverId) {
|
||||
throw new Error('未找到学生用户ID');
|
||||
}
|
||||
// 第二步:获取当前用户信息作为发送者
|
||||
return getUserProfile().then(userResponse => {
|
||||
const senderId = userResponse.data.userId;
|
||||
// 第三步:发送消息通知学生
|
||||
return addMsg({
|
||||
sender: senderId,
|
||||
receiver: receiverId,
|
||||
content: this.completedForm.messageContent
|
||||
});
|
||||
});
|
||||
}).then(() => {
|
||||
// 第四步:消息发送成功后,更新多级审核状态为3(完成制作)
|
||||
return getStuMultiLevelReview(this.completedForm.id);
|
||||
}).then(response => {
|
||||
const reviewData = response.data;
|
||||
reviewData.reviewerStatus = 3;
|
||||
// 将自定义消息内容存储到notes字段中,用于企业微信消息发送
|
||||
reviewData.notes = this.completedForm.messageContent;
|
||||
return updateStuMultiLevelReviewWithStuIdReissue(reviewData);
|
||||
}).then(() => {
|
||||
this.completedOpen = false;
|
||||
this.getUser();
|
||||
this.$modal.msgSuccess("完成制作成功并已发送通知消息");
|
||||
}).catch(error => {
|
||||
this.$modal.msgError(error.message || "操作失败");
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user