|
@@ -62,6 +62,39 @@
|
|
|
:export-url="exportUrl"
|
|
|
:export-file-name="exportFileName"
|
|
|
></commonExportVue>
|
|
|
+ <el-dropdown
|
|
|
+ v-show="currentPagePrivileges.ILLEGALITY_RE_AUDIT"
|
|
|
+ :disabled="noBatchSelected"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ style="margin-left: 10px"
|
|
|
+ icon="el-icon-arrow-down"
|
|
|
+ type="primary"
|
|
|
+ :disabled="noBatchSelected"
|
|
|
+ size="small"
|
|
|
+ >重审</el-button
|
|
|
+ >
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="success"
|
|
|
+ icon="el-icon-success"
|
|
|
+ @click="redoAuditBatch('pass')"
|
|
|
+ >通 过</el-button
|
|
|
+ >
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="danger"
|
|
|
+ icon="el-icon-error"
|
|
|
+ @click="redoAuditBatch('nopass')"
|
|
|
+ >不通过</el-button
|
|
|
+ >
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row class="margin-top-10">
|
|
@@ -74,6 +107,7 @@
|
|
|
border
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
|
+ <el-table-column type="selection" width="40"></el-table-column>
|
|
|
<el-table-column label="考试记录ID" width="95">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -194,6 +228,50 @@
|
|
|
prop="disciplineType"
|
|
|
width="150"
|
|
|
></el-table-column>
|
|
|
+ <el-table-column fixed="right" label="操作" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-row
|
|
|
+ v-if="currentPagePrivileges.ILLEGALITY_RE_AUDIT"
|
|
|
+ class="operateRow"
|
|
|
+ >
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-dropdown>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ icon="el-icon-arrow-down"
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ >重审</el-button
|
|
|
+ >
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="success"
|
|
|
+ icon="el-icon-success"
|
|
|
+ @click="
|
|
|
+ redoAudit(scope.row.examRecordDataId, 'pass')
|
|
|
+ "
|
|
|
+ >通 过</el-button
|
|
|
+ >
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="danger"
|
|
|
+ icon="el-icon-error"
|
|
|
+ @click="
|
|
|
+ redoAudit(scope.row.examRecordDataId, 'nopass')
|
|
|
+ "
|
|
|
+ >不通过</el-button
|
|
|
+ >
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<div class="block pull-right">
|
|
|
<el-pagination
|
|
@@ -208,7 +286,54 @@
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
+ <el-dialog
|
|
|
+ title="重审"
|
|
|
+ width="400px"
|
|
|
+ :visible.sync="dialogAuditFormVisible"
|
|
|
+ @closed="auditDialogClosed"
|
|
|
+ >
|
|
|
+ <el-form ref="redoAuditForm" :model="auditForm" label-width="90px">
|
|
|
+ <el-form-item
|
|
|
+ label="违纪类型"
|
|
|
+ prop="illegallyTypeId"
|
|
|
+ :rules="[
|
|
|
+ { required: true, message: '请选择违纪类型', trigger: 'change' },
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="auditForm.illegallyTypeId"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ :remote-method="getDisciplineTypeList"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择"
|
|
|
+ size="small"
|
|
|
+ @clear="getDisciplineTypeList"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in disciplineTypeList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="详情描述" style="margin-top: 15px">
|
|
|
+ <el-input
|
|
|
+ v-model="auditForm.disciplineDetail"
|
|
|
+ type="textarea"
|
|
|
+ :autosize="{ minRows: 3, maxRows: 5 }"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <div class="dialog-footer margin-top-10 text-center">
|
|
|
+ <el-button type="primary" @click="doRedoAuditNoPass"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="dialogAuditFormVisible = false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
<el-dialog
|
|
|
title="考试记录详情"
|
|
|
width="1250px"
|
|
@@ -237,6 +362,7 @@ export default {
|
|
|
mixins: [pagePrivilege],
|
|
|
data() {
|
|
|
return {
|
|
|
+ selectedIds: [],
|
|
|
showShortIpsStr,
|
|
|
curSelectedExamRecordDataId: null,
|
|
|
curSelectedShowAuditButton: false,
|
|
@@ -285,11 +411,26 @@ export default {
|
|
|
currentPagePrivileges: {
|
|
|
BREACH_THE_PRINCIPLE_EXPORT: false,
|
|
|
SNAPSHOT_DETAILS: false, //详情查看
|
|
|
+ ILLEGALITY_RE_AUDIT: false, //重新审核
|
|
|
+ },
|
|
|
+ dialogAuditFormVisible: false,
|
|
|
+ auditForm: {
|
|
|
+ examRecordDataIds: [],
|
|
|
+ illegallyTypeId: null,
|
|
|
+ disciplineDetail: "",
|
|
|
+ isPass: null,
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState({ user: (state) => state.user }),
|
|
|
+ noBatchSelected() {
|
|
|
+ if (this.selectedIds.length === 0) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
this.form.rootOrgId = this.user.rootOrgId;
|
|
@@ -297,23 +438,137 @@ export default {
|
|
|
this.getDisciplineTypeList("");
|
|
|
},
|
|
|
methods: {
|
|
|
+ redoAudit(examRecordDataId, isPass) {
|
|
|
+ this.auditForm.examRecordDataIds = [];
|
|
|
+ this.auditForm.examRecordDataIds.push(examRecordDataId);
|
|
|
+ if (isPass != "pass") {
|
|
|
+ this.dialogAuditFormVisible = true;
|
|
|
+ } else {
|
|
|
+ //审核通过
|
|
|
+ var redoAuditInfo = {
|
|
|
+ examRecordDataIds: this.auditForm.examRecordDataIds,
|
|
|
+ isPass: true,
|
|
|
+ illegallyTypeId: null,
|
|
|
+ disciplineDetail: "",
|
|
|
+ };
|
|
|
+ this.$http
|
|
|
+ .post("/api/ecs_oe_admin/exam/audit/redoAudit", redoAuditInfo)
|
|
|
+ .then(() => {
|
|
|
+ this.$notify({
|
|
|
+ title: "成功",
|
|
|
+ message: "操作成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.search();
|
|
|
+ })
|
|
|
+ .catch((res) => {
|
|
|
+ var errorMsg = "操作失败";
|
|
|
+ if (res.response && res.response.data) {
|
|
|
+ errorMsg = res.response.data.desc;
|
|
|
+ }
|
|
|
+ this.$notify({
|
|
|
+ title: "提示",
|
|
|
+ message: errorMsg,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ redoAuditBatch(isPass) {
|
|
|
+ this.auditForm.examRecordDataIds = this.selectedIds;
|
|
|
+ if (isPass != "pass") {
|
|
|
+ this.dialogAuditFormVisible = true;
|
|
|
+ } else {
|
|
|
+ //审核通过
|
|
|
+ var redoAuditInfo = {
|
|
|
+ examRecordDataIds: this.auditForm.examRecordDataIds,
|
|
|
+ isPass: true,
|
|
|
+ illegallyTypeId: null,
|
|
|
+ disciplineDetail: "",
|
|
|
+ };
|
|
|
+ this.$http
|
|
|
+ .post("/api/ecs_oe_admin/exam/audit/redoAudit", redoAuditInfo)
|
|
|
+ .then(() => {
|
|
|
+ this.$notify({
|
|
|
+ title: "成功",
|
|
|
+ message: "操作成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.search();
|
|
|
+ })
|
|
|
+ .catch((res) => {
|
|
|
+ var errorMsg = "操作失败";
|
|
|
+ if (res.response && res.response.data) {
|
|
|
+ errorMsg = res.response.data.desc;
|
|
|
+ }
|
|
|
+ this.$notify({
|
|
|
+ title: "提示",
|
|
|
+ message: errorMsg,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ doRedoAuditNoPass() {
|
|
|
+ this.$refs["redoAuditForm"].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ var redoAuditInfo = {
|
|
|
+ examRecordDataIds: this.auditForm.examRecordDataIds,
|
|
|
+ isPass: false,
|
|
|
+ illegallyTypeId: this.auditForm.illegallyTypeId,
|
|
|
+ disciplineDetail: this.auditForm.disciplineDetail,
|
|
|
+ };
|
|
|
+ this.$http
|
|
|
+ .post("/api/ecs_oe_admin/exam/audit/redoAudit", redoAuditInfo)
|
|
|
+ .then(() => {
|
|
|
+ this.$notify({
|
|
|
+ title: "成功",
|
|
|
+ message: "操作成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.doRedoAuditNoPassPostProcess();
|
|
|
+ this.search();
|
|
|
+ })
|
|
|
+ .catch((res) => {
|
|
|
+ var errorMsg = "操作失败";
|
|
|
+ if (res.response && res.response.data) {
|
|
|
+ errorMsg = res.response.data.desc;
|
|
|
+ }
|
|
|
+ this.doRedoAuditNoPassPostProcess();
|
|
|
+ this.$notify({
|
|
|
+ title: "提示",
|
|
|
+ message: errorMsg,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ doRedoAuditNoPassPostProcess() {
|
|
|
+ this.auditForm = {
|
|
|
+ examRecordDataId: null,
|
|
|
+ illegallyTypeId: null,
|
|
|
+ disciplineDetail: "",
|
|
|
+ isPass: null,
|
|
|
+ };
|
|
|
+ this.$refs["redoAuditForm"].resetFields();
|
|
|
+ this.dialogAuditFormVisible = false;
|
|
|
+ },
|
|
|
+ auditDialogClosed() {
|
|
|
+ this.$refs["redoAuditForm"].resetFields();
|
|
|
+ },
|
|
|
getDisciplineTypeList(name) {
|
|
|
if (!name) {
|
|
|
name = "";
|
|
|
}
|
|
|
this.$http
|
|
|
.get("/api/ecs_oe_admin/illegallyType/queryByNameLike", {
|
|
|
- params: { name },
|
|
|
+ params: { name, queryScope: "audit" },
|
|
|
})
|
|
|
.then((response) => {
|
|
|
- if (response.data) {
|
|
|
- //排除断电和机器故障
|
|
|
- this.disciplineTypeList = response.data.filter(
|
|
|
- (v) =>
|
|
|
- !(v.rootOrgId == -1 && v.code == "POWER_FAILURE") &&
|
|
|
- !(v.rootOrgId == -1 && v.code == "MACHINE_STOPPAGE")
|
|
|
- );
|
|
|
- }
|
|
|
+ this.disciplineTypeList = response.data;
|
|
|
});
|
|
|
},
|
|
|
resetForm() {
|
|
@@ -379,6 +634,10 @@ export default {
|
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val;
|
|
|
+ this.selectedIds = [];
|
|
|
+ val.forEach((element) => {
|
|
|
+ this.selectedIds.push(element.examRecordDataId);
|
|
|
+ });
|
|
|
},
|
|
|
/**
|
|
|
* pagesize改变时触发
|