491 lines
18 KiB
Vue
491 lines
18 KiB
Vue
<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="penaltyNumber">
|
|
<el-input v-model="queryParams.penaltyNumber" placeholder="请输入处分文号" clearable @keyup.enter.native="handleQuery" />
|
|
</el-form-item>
|
|
<el-form-item label="学号" prop="stuNo">
|
|
<el-input v-model="queryParams.stuNo" placeholder="请输入学号" clearable @keyup.enter.native="handleQuery" />
|
|
</el-form-item>
|
|
<el-form-item label="学生姓名" prop="stuName">
|
|
<el-input v-model="queryParams.stuName" 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>
|
|
|
|
<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:relieve: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:relieve: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:relieve: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:relieve:export']">导出</el-button>
|
|
</el-col>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
</el-row>
|
|
|
|
<el-table v-loading="loading" :data="relieveList" @selection-change="handleSelectionChange">
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column label="学号" align="center" prop="stuNo" />
|
|
<el-table-column label="学生姓名" align="center" prop="stuName" />
|
|
<el-table-column label="处分文号" align="center" prop="penaltyNumber" />
|
|
<el-table-column label="解除处分文号" align="center" prop="relieveNumber" />
|
|
<el-table-column label="处分等级" align="center" prop="penaltyType">
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.rt_penalty_type" :value="scope.row.penaltyType" />
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="解除状态" align="center" prop="penaltyStatus">
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.rt_penalty_status" :value="scope.row.penaltyStatus" />
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="违纪日期" align="center" prop="violationDate" width="180">
|
|
<template slot-scope="scope">
|
|
<span>{{ parseTime(scope.row.violationDate, '{y}-{m}-{d}') }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="提交状态" align="center" prop="submissionStatus">
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.rt_submission_status" :value="scope.row.submissionStatus" />
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="提交时间" align="center" prop="createTime" />
|
|
|
|
<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:relieve:edit']" v-if="scope.row.submissionStatus == 0">修改</el-button>
|
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['routine:relieve:remove']" v-if="scope.row.submissionStatus == 0">删除</el-button>
|
|
<el-button size="mini" type="text" icon="el-icon-info" @click="detail(scope.row)" v-if="scope.row.submissionStatus == 1">详情</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" />
|
|
|
|
<!-- 添加或修改学生解除处分申请对话框 -->
|
|
<el-dialog :title="title" :visible.sync="open" width="80%" append-to-body :close-on-click-modal="false">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="180px">
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-form-item label="学号" prop="stuNo">
|
|
<el-input v-model="form.stuNo" placeholder="请输入学号" />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="姓名" prop="stuName">
|
|
<el-input v-model="form.stuName" placeholder="" />
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-form-item label="性别" prop="gender">
|
|
<el-radio-group v-model="form.gender">
|
|
<el-radio label="男">男</el-radio>
|
|
<el-radio label="女">女</el-radio>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="院部" prop="departmentName">
|
|
<el-input v-model="form.departmentName" placeholder="" />
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-form-item label="年级" prop="gradeName">
|
|
<el-input v-model="form.gradeName" placeholder="" />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="班级" prop="className">
|
|
<el-input v-model="form.className" placeholder="" />
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-form-item label="民族" prop="mz">
|
|
<el-input v-model="form.mz" placeholder="" />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="政治面貌" prop="politicalStatus">
|
|
<el-select v-model="form.politicalStatus" placeholder="请选择政治面貌" clearable>
|
|
<el-option label="群众" value="群众"></el-option>
|
|
<el-option label="团员" value="团员"></el-option>
|
|
<el-option label="中共党员" value="中共党员"></el-option>
|
|
<el-option label="其他" value="其他"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-form-item label="出生日期" prop="birthday">
|
|
<el-input v-model="form.birthday" placeholder="" />
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-form-item label="籍贯:省/自治区/直辖市" prop="jg">
|
|
<el-cascader :options="areaOptions" v-model="form.jg" clearable filterable> </el-cascader>
|
|
</el-form-item>
|
|
</el-col>
|
|
<!-- <el-col :span="12">
|
|
<el-form-item label="市/县" prop="hksz2">
|
|
<el-input v-model="form.hksz2" placeholder="" />
|
|
</el-form-item>
|
|
</el-col> -->
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-form-item label="处分文号" prop="penaltyNumber">
|
|
<el-input v-model="form.penaltyNumber" placeholder="请输入处分文号" @blur="handleBlurPenalty" />
|
|
</el-form-item>
|
|
<el-form-item label="违纪时间" prop="violationDate">
|
|
<el-date-picker clearable v-model="form.violationDate" readonly type="date" value-format="yyyy-MM-dd" placeholder="请选择违纪日期"> </el-date-picker>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-form-item label="处分等级" prop="penaltyType">
|
|
<el-select clearable v-model="form.penaltyType" disabled placeholder="请选择处分等级" style="width: 100%">
|
|
<el-option v-for="dict in dict.type.rt_penalty_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item label="处分建议" prop="dispositionDescription">
|
|
<el-input v-model="form.penaltyRecommendation" placeholder="" readonly type="textarea" />
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item label="违纪条例" prop="applicationDismissal">
|
|
<el-input v-model="form.violationRegulations" placeholder="" readonly type="textarea" />
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="save">保 存</el-button>
|
|
<el-button type="primary" @click="submitForm">提 交</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
</div>
|
|
</el-dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { addRelieve, delRelieve, getMyStuInfo, getPenaltyNumber, getRelieve, getStuInfo, getStuList, listRelieve, save } from '@/api/routine/relieve'
|
|
import {
|
|
pcaTextArr, // 省市区联动数据,纯汉字
|
|
} from 'element-china-area-data'
|
|
|
|
export default {
|
|
name: 'Relieve',
|
|
dicts: ['rt_penalty_type', 'rt_penalty_status', 'rt_submission_status'],
|
|
data() {
|
|
return {
|
|
// 遮罩层
|
|
loading: true,
|
|
// 选中数组
|
|
ids: [],
|
|
// 非单个禁用
|
|
single: true,
|
|
// 非多个禁用
|
|
multiple: true,
|
|
// 显示搜索条件
|
|
showSearch: true,
|
|
// 总条数
|
|
total: 0,
|
|
// 学生解除处分申请表格数据
|
|
relieveList: [],
|
|
// 弹出层标题
|
|
title: '',
|
|
// 是否显示弹出层
|
|
open: false,
|
|
// 查询参数
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
penaltyNumber: null,
|
|
stuNo: null,
|
|
stuName: null,
|
|
stuId: null,
|
|
penaltyType: null,
|
|
penaltyStatus: null,
|
|
violationDate: null,
|
|
dispositionDescription: null,
|
|
applicationDismissal: null,
|
|
ideologicalEducation: null,
|
|
submissionStatus: null,
|
|
processInstanceId: null,
|
|
deployId: null,
|
|
gender: null,
|
|
departmentName: null,
|
|
gradeName: null,
|
|
className: null,
|
|
mz: null,
|
|
birthday: null,
|
|
jg: null,
|
|
hksz2: null,
|
|
},
|
|
// 表单参数
|
|
form: {},
|
|
// 表单校验
|
|
// 表单校验
|
|
rules: {
|
|
stuNo: [{ required: true, message: '学号不能为空', trigger: 'blur' }],
|
|
studentName: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
|
|
gender: [{ required: true, message: '请选择性别', trigger: 'blur' }],
|
|
departmentName: [{ required: true, message: '请输入院部', trigger: 'blur' }],
|
|
gradeName: [{ required: true, message: '请输入年级', trigger: 'blur' }],
|
|
className: [{ required: true, message: '请输入班级', trigger: 'blur' }],
|
|
mz: [{ required: true, message: '请输入民族', trigger: 'blur' }],
|
|
politicalStatus: [{ required: true, message: '请选择政治面貌', trigger: 'blur' }],
|
|
birthday: [{ required: true, message: '请输入出生日期', trigger: 'blur' }],
|
|
jg: [{ required: true, message: '请选择籍贯', trigger: 'blur' }],
|
|
penaltyNumber: [{ required: true, message: '请输入处分文号', trigger: 'blur' }],
|
|
violationDate: [{ required: true, message: '违纪时间不能为空', trigger: 'blur' }],
|
|
penaltyType: [{ required: true, message: '处分等级不能为空', trigger: 'blur' }],
|
|
penaltyRecommendation: [{ required: true, message: '请输入处分建议', trigger: 'blur' }],
|
|
violationRegulations: [{ required: true, message: '请输入违纪条例', trigger: 'blur' }],
|
|
},
|
|
// 省市区
|
|
areaOptions: pcaTextArr,
|
|
}
|
|
},
|
|
created() {
|
|
// 如果学生,查询学生自己的信息
|
|
this.getList();
|
|
},
|
|
methods: {
|
|
/** 查询学生解除处分申请列表 */
|
|
getList() {
|
|
this.loading = true
|
|
listRelieve(this.queryParams).then((response) => {
|
|
this.relieveList = response.rows
|
|
this.total = response.total
|
|
this.loading = false
|
|
})
|
|
},
|
|
getStuList() {
|
|
this.loading = true
|
|
getStuList(this.queryParams).then((response) => {
|
|
this.relieveList = response.rows
|
|
this.total = response.total
|
|
this.loading = false
|
|
})
|
|
},
|
|
// 取消按钮
|
|
cancel() {
|
|
this.open = false
|
|
this.reset()
|
|
},
|
|
// 表单重置
|
|
reset() {
|
|
this.form = {
|
|
relieveId: null,
|
|
penaltyNumber: null,
|
|
stuNo: null,
|
|
stuName: null,
|
|
stuId: null,
|
|
penaltyType: null,
|
|
penaltyStatus: null,
|
|
violationDate: null,
|
|
dispositionDescription: null,
|
|
applicationDismissal: null,
|
|
ideologicalEducation: null,
|
|
submissionStatus: null,
|
|
processInstanceId: null,
|
|
deployId: null,
|
|
createBy: null,
|
|
createTime: null,
|
|
updateBy: null,
|
|
updateTime: null,
|
|
remark: null,
|
|
gender: null,
|
|
departmentName: null,
|
|
gradeName: null,
|
|
className: null,
|
|
mz: null,
|
|
birthday: null,
|
|
jg: null,
|
|
hksz2: null,
|
|
}
|
|
this.resetForm('form')
|
|
},
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
this.queryParams.pageNum = 1
|
|
this.getList()
|
|
},
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
this.resetForm('queryForm')
|
|
this.handleQuery()
|
|
},
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
this.ids = selection.map((item) => item.relieveId)
|
|
this.single = selection.length !== 1
|
|
this.multiple = !selection.length
|
|
},
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
this.reset()
|
|
getMyStuInfo().then((res) => {
|
|
this.form.stuNo = res.data.stuNo
|
|
this.form.stuName = res.data.studentName
|
|
this.form.gender = res.data.gender
|
|
this.form.departmentName = res.data.departmentName
|
|
this.form.gradeName = res.data.gradeName
|
|
this.form.className = res.data.className
|
|
this.form.mz = res.data.mz
|
|
this.form.birthday = res.data.birthday
|
|
this.form.jg = res.data.jg
|
|
this.form.hksz2 = res.data.hksz2
|
|
})
|
|
this.open = true
|
|
this.title = '添加学生解除处分申请'
|
|
},
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
this.reset()
|
|
const relieveId = row.relieveId || this.ids
|
|
getRelieve(relieveId).then((response) => {
|
|
this.form = response.data
|
|
this.form.jg = this.form.jg.split(',');
|
|
|
|
this.open = true
|
|
this.title = '修改学生解除处分申请'
|
|
})
|
|
},
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
this.$refs['form'].validate((valid) => {
|
|
if (valid) {
|
|
this.$modal.loading('正在努力加载中,请稍等...')
|
|
this.form.jg = this.form.jg.toString()
|
|
addRelieve(this.form).then((response) => {
|
|
if (response.code == 500) {
|
|
return
|
|
}
|
|
this.$modal.msgSuccess('提交成功')
|
|
this.open = false
|
|
this.getList()
|
|
})
|
|
this.$modal.closeLoading()
|
|
}
|
|
})
|
|
},
|
|
save() {
|
|
this.$refs['form'].validate((valid) => {
|
|
if (valid) {
|
|
this.$modal.loading('正在努力加载中,请稍等...')
|
|
this.form.jg = this.form.jg.toString()
|
|
save(this.form).then((response) => {
|
|
if (response.code == 500) {
|
|
return
|
|
}
|
|
this.$modal.msgSuccess('保存成功')
|
|
this.open = false
|
|
this.getList()
|
|
})
|
|
this.$modal.closeLoading()
|
|
}
|
|
})
|
|
},
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
const relieveIds = row.relieveId || this.ids
|
|
this.$modal
|
|
.confirm('是否确认删除学生解除处分申请编号为"' + relieveIds + '"的数据项?')
|
|
.then(function () {
|
|
return delRelieve(relieveIds)
|
|
})
|
|
.then(() => {
|
|
this.getList()
|
|
this.$modal.msgSuccess('删除成功')
|
|
})
|
|
.catch(() => {})
|
|
},
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
this.download(
|
|
'routine/relieve/export',
|
|
{
|
|
...this.queryParams,
|
|
},
|
|
`relieve_${new Date().getTime()}.xlsx`
|
|
)
|
|
},
|
|
handleBlur() {
|
|
if (this.form.stuNo != null || this.form.stuNo != '') {
|
|
getStuInfo(this.form.stuNo).then((res) => {
|
|
if (res.data == null) {
|
|
this.$message.error('学号不存在')
|
|
|
|
return
|
|
}
|
|
this.form.stuName = res.data.studentName
|
|
this.form.gender = res.data.gender
|
|
this.form.departmentName = res.data.departmentName
|
|
this.form.gradeName = res.data.gradeName
|
|
this.form.className = res.data.className
|
|
this.form.mz = res.data.mz
|
|
this.form.birthday = res.data.birthday
|
|
this.form.jg = res.data.jg
|
|
this.form.hksz2 = res.data.hksz2
|
|
})
|
|
}
|
|
},
|
|
handleBlurPenalty() {
|
|
if (this.form.penaltyNumber) {
|
|
getPenaltyNumber(this.form.penaltyNumber).then((res) => {
|
|
if (res.code == 500) {
|
|
return
|
|
}
|
|
if (res.data) {
|
|
this.form.penaltyNumber = res.data.penaltyNumber
|
|
this.form.violationDate = res.data.violationDate
|
|
this.form.penaltyType = res.data.penaltyType.toString()
|
|
this.form.penaltyRecommendation = res.data.penaltyRecommendation
|
|
this.form.violationRegulations = res.data.violationRegulations
|
|
} else {
|
|
this.$message.error('未找到相关处分文号')
|
|
}
|
|
})
|
|
}
|
|
},
|
|
detail(row) {
|
|
this.$router.push({
|
|
path: '/routine/relieve/detail',
|
|
query: {
|
|
procInsId: row.processInstanceId,
|
|
deployId: row.deployId,
|
|
relieveId: row.relieveId,
|
|
},
|
|
})
|
|
},
|
|
},
|
|
}
|
|
</script>
|