|
|
|
@ -1598,6 +1598,7 @@ import { |
|
|
|
import useCatchStore from "@/stores/modules/catch"; |
|
|
|
import useCatchStore from "@/stores/modules/catch"; |
|
|
|
import { getConfinementListAll } from "@/api/work/confinement"; |
|
|
|
import { getConfinementListAll } from "@/api/work/confinement"; |
|
|
|
import {Warning} from "@element-plus/icons-vue"; |
|
|
|
import {Warning} from "@element-plus/icons-vue"; |
|
|
|
|
|
|
|
import feedback from "@/utils/feedback"; |
|
|
|
//获取数据 |
|
|
|
//获取数据 |
|
|
|
const catchSotre = useCatchStore(); |
|
|
|
const catchSotre = useCatchStore(); |
|
|
|
const dict = catchSotre.getDicts([ |
|
|
|
const dict = catchSotre.getDicts([ |
|
|
|
@ -1935,6 +1936,7 @@ async function validate() { |
|
|
|
(item) => item.type === BlameType.PERSONAL && !arr.includes(item.blameIdCode) |
|
|
|
(item) => item.type === BlameType.PERSONAL && !arr.includes(item.blameIdCode) |
|
|
|
); |
|
|
|
); |
|
|
|
if (blame.length) { |
|
|
|
if (blame.length) { |
|
|
|
|
|
|
|
feedback.msgError(`涉及人员【${blame.map((item) => item.blameName).join("、")}】未关联领导`); |
|
|
|
throw new Error( |
|
|
|
throw new Error( |
|
|
|
`涉及人员【${blame.map((item) => item.blameName).join("、")}】未关联领导` |
|
|
|
`涉及人员【${blame.map((item) => item.blameName).join("、")}】未关联领导` |
|
|
|
); |
|
|
|
); |
|
|
|
@ -1960,10 +1962,72 @@ async function validate() { |
|
|
|
|
|
|
|
|
|
|
|
if (duplicatePerson) { |
|
|
|
if (duplicatePerson) { |
|
|
|
// showSamePersonDialog.value = true; |
|
|
|
// showSamePersonDialog.value = true; |
|
|
|
|
|
|
|
feedback.msgError( `涉及人员【${duplicatePerson.blameName}】与涉及领导不能为同一人`); |
|
|
|
throw new Error(`涉及人员【${duplicatePerson.blameName}】与涉及领导不能为同一人`); |
|
|
|
throw new Error(`涉及人员【${duplicatePerson.blameName}】与涉及领导不能为同一人`); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ========== 处理结果校验逻辑 ========== |
|
|
|
|
|
|
|
// 1. 涉及人员:处理结果为14(不予追责)时,不能同时选择其他处理结果 |
|
|
|
|
|
|
|
const personalBlames = form.value.blames.filter(item => item.type === BlameType.PERSONAL); |
|
|
|
|
|
|
|
for (const item of personalBlames) { |
|
|
|
|
|
|
|
if (item.handleResultCode && item.handleResultCode.length > 0) { |
|
|
|
|
|
|
|
// 如果包含14(不予追责),则不能同时选择其他处理结果 |
|
|
|
|
|
|
|
if (item.handleResultCode.includes('14')) { |
|
|
|
|
|
|
|
if (item.handleResultCode.length > 1) { |
|
|
|
|
|
|
|
feedback.msgError(`涉及人员【${item.blameName}】的处理结果为"不予追责"时,不能同时选择其他处理结果`); |
|
|
|
|
|
|
|
throw new Error(`涉及人员【${item.blameName}】的处理结果为"不予追责"时,不能同时选择其他处理结果`); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 涉及人员不能同时包含1、1-1、1-2 |
|
|
|
|
|
|
|
const has1 = item.handleResultCode.includes('1'); |
|
|
|
|
|
|
|
const has1_1 = item.handleResultCode.includes('1-1'); |
|
|
|
|
|
|
|
const has1_2 = item.handleResultCode.includes('1-2'); |
|
|
|
|
|
|
|
if ((has1 && has1_1) || (has1 && has1_2) || (has1_1 && has1_2)) { |
|
|
|
|
|
|
|
feedback.msgError(`涉及人员【${item.blameName}】的处理结果不能同时包含"所队通报批评"、"市局通报批评"、"分局通报批评"`); |
|
|
|
|
|
|
|
throw new Error(`涉及人员【${item.blameName}】的处理结果不能同时包含"所队通报批评"、"市局通报批评"、"分局通报批评"`); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 2. 涉及领导:处理结果为14(不予追责)时,不能同时选择其他处理结果 |
|
|
|
|
|
|
|
const leaderBlames = form.value.blameLeaders; |
|
|
|
|
|
|
|
for (const item of leaderBlames) { |
|
|
|
|
|
|
|
if (item.leadHandleResultCode && item.leadHandleResultCode.length > 0) { |
|
|
|
|
|
|
|
// 如果包含14(不予追责),则不能同时选择其他处理结果 |
|
|
|
|
|
|
|
if (item.leadHandleResultCode.includes('14')) { |
|
|
|
|
|
|
|
if (item.leadHandleResultCode.length > 1) { |
|
|
|
|
|
|
|
feedback.msgError(`涉及领导【${item.leadName}】的处理结果为"不予追责"时,不能同时选择其他处理结果`); |
|
|
|
|
|
|
|
throw new Error(`涉及领导【${item.leadName}】的处理结果为"不予追责"时,不能同时选择其他处理结果`); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 涉及领导不能同时包含1、1-1、1-2 |
|
|
|
|
|
|
|
const has1 = item.leadHandleResultCode.includes('1'); |
|
|
|
|
|
|
|
const has1_1 = item.leadHandleResultCode.includes('1-1'); |
|
|
|
|
|
|
|
const has1_2 = item.leadHandleResultCode.includes('1-2'); |
|
|
|
|
|
|
|
if ((has1 && has1_1) || (has1 && has1_2) || (has1_1 && has1_2)) { |
|
|
|
|
|
|
|
feedback.msgError(`涉及领导【${item.leadName}】的处理结果不能同时包含"所队通报批评"、"市局通报批评"、"分局通报批评"`); |
|
|
|
|
|
|
|
throw new Error(`涉及领导【${item.leadName}】的处理结果不能同时包含"所队通报批评"、"市局通报批评"、"分局通报批评"`); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 3. 涉及单位:处理结果为2-1(涉及单位的不与追责)时,不能同时选择其他处理结果 |
|
|
|
|
|
|
|
const departBlames = form.value.blames.filter(item => item.type === BlameType.DEPARTMENT); |
|
|
|
|
|
|
|
for (const item of departBlames) { |
|
|
|
|
|
|
|
if (item.handleResultCode && item.handleResultCode.length > 0) { |
|
|
|
|
|
|
|
// 如果包含2-1(涉及单位的不与追责),则不能同时选择其他处理结果 |
|
|
|
|
|
|
|
if (item.handleResultCode.includes('2-1')) { |
|
|
|
|
|
|
|
if (item.handleResultCode.length > 1) { |
|
|
|
|
|
|
|
feedback.msgError(`涉及单位【${item.blameDepartName}】的处理结果为"不与追责"时,不能同时选择其他处理结果`); |
|
|
|
|
|
|
|
throw new Error(`涉及单位【${item.blameDepartName}】的处理结果为"不与追责"时,不能同时选择其他处理结果`); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// ========== 处理结果校验逻辑结束 ========== |
|
|
|
|
|
|
|
|
|
|
|
return form.value; |
|
|
|
return form.value; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|