|
@@ -48,7 +48,7 @@
|
|
|
<el-table-column label="加减分项" prop="scoreType" min-width="120" />
|
|
<el-table-column label="加减分项" prop="scoreType" min-width="120" />
|
|
|
<el-table-column label="自评得分" prop="selfScore" min-width="120">
|
|
<el-table-column label="自评得分" prop="selfScore" min-width="120">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- {{ scope.row.selfScore === 0 || scope.row.selfScore === null || scope.row.selfScore === undefined ? '' : scope.row.selfScore }}
|
|
|
|
|
|
|
+ {{ scope.row.selfScore }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="资料说明" prop="materialDescription" min-width="200">
|
|
<el-table-column label="资料说明" prop="materialDescription" min-width="200">
|
|
@@ -77,10 +77,10 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="复核人姓名" prop="reviewUserName" min-width="120" />
|
|
<el-table-column label="复核人姓名" prop="reviewUserName" min-width="120" />
|
|
|
- <el-table-column label="复核得分" prop="reviewScore" min-width="180">
|
|
|
|
|
|
|
+ <el-table-column label="复核得分" prop="reviewScore" min-width="200">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-input-number
|
|
<el-input-number
|
|
|
- v-if="scope.row.isReviewInput"
|
|
|
|
|
|
|
+ v-if="!isAudit && scope.row.isReviewInput"
|
|
|
v-model="scope.row.reviewScore"
|
|
v-model="scope.row.reviewScore"
|
|
|
:min="0"
|
|
:min="0"
|
|
|
:max="99999"
|
|
:max="99999"
|
|
@@ -89,19 +89,19 @@
|
|
|
placeholder="请输入复核得分"
|
|
placeholder="请输入复核得分"
|
|
|
@blur="handleScoreBlur"
|
|
@blur="handleScoreBlur"
|
|
|
/>
|
|
/>
|
|
|
- <span v-else>{{ scope.row.reviewScore === 0 || scope.row.reviewScore === null || scope.row.reviewScore === undefined ? '' : scope.row.reviewScore }}</span>
|
|
|
|
|
|
|
+ <span v-else>{{ scope.row.reviewScore }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="复核不通过原因" prop="reviewRejectReson" min-width="220">
|
|
<el-table-column label="复核不通过原因" prop="reviewRejectReson" min-width="220">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-if="isSelfApproveButton"
|
|
|
|
|
|
|
+ v-if="!isAudit && isSelfApproveButton"
|
|
|
v-model="scope.row.reviewRejectReson"
|
|
v-model="scope.row.reviewRejectReson"
|
|
|
type="textarea"
|
|
type="textarea"
|
|
|
:rows="2"
|
|
:rows="2"
|
|
|
placeholder="请输入复核不通过原因"
|
|
placeholder="请输入复核不通过原因"
|
|
|
/>
|
|
/>
|
|
|
- <span v-else>{{ scope.row.reviewRejectReson || '-' }}</span>
|
|
|
|
|
|
|
+ <span v-else>{{ scope.row.reviewRejectReson}}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -112,6 +112,8 @@
|
|
|
<el-button @click="router.back()">取消</el-button>
|
|
<el-button @click="router.back()">取消</el-button>
|
|
|
<el-button v-if="!isAudit && isSelfApproveButton" @click="openRejectDialog('review')">复核不通过</el-button>
|
|
<el-button v-if="!isAudit && isSelfApproveButton" @click="openRejectDialog('review')">复核不通过</el-button>
|
|
|
<el-button v-if="isAudit" @click="openRejectDialog('approve')">审核不通过</el-button>
|
|
<el-button v-if="isAudit" @click="openRejectDialog('approve')">审核不通过</el-button>
|
|
|
|
|
+ <el-button v-if="!isAudit && isSelfApproveButton" type="primary" @click="handleSubmitItem">保存</el-button>
|
|
|
|
|
+
|
|
|
<el-button v-if="!isFromDeptView" type="primary" @click="handleSubmit">{{ getSubmitButtonText }}</el-button>
|
|
<el-button v-if="!isFromDeptView" type="primary" @click="handleSubmit">{{ getSubmitButtonText }}</el-button>
|
|
|
</footer>
|
|
</footer>
|
|
|
|
|
|
|
@@ -185,7 +187,7 @@
|
|
|
if (isSelfApproveButton.value) {
|
|
if (isSelfApproveButton.value) {
|
|
|
return '提交';
|
|
return '提交';
|
|
|
}
|
|
}
|
|
|
- return '复核提交';
|
|
|
|
|
|
|
+ return '保存';
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// 拒绝原因弹窗相关
|
|
// 拒绝原因弹窗相关
|
|
@@ -480,9 +482,9 @@
|
|
|
evaluationItem: score.exProgram || '', // 考核项目
|
|
evaluationItem: score.exProgram || '', // 考核项目
|
|
|
evaluationContent: score.exContent || '', // 考核内容
|
|
evaluationContent: score.exContent || '', // 考核内容
|
|
|
scoringMethod: score.scoringWay || '', // 评分方式
|
|
scoringMethod: score.scoringWay || '', // 评分方式
|
|
|
- selfScore: score.selfScore || 0, // 自评得分
|
|
|
|
|
|
|
+ selfScore: score.selfScore, // 自评得分
|
|
|
reviewUserName: score.reviewUserName || '-', // 复核人姓名(从详情顶层获取)
|
|
reviewUserName: score.reviewUserName || '-', // 复核人姓名(从详情顶层获取)
|
|
|
- reviewScore: score.reviewScore || 0, // 复核得分
|
|
|
|
|
|
|
+ reviewScore: score.reviewScore, // 复核得分
|
|
|
reviewRejectReson: score.reviewRejectReson || '', // 复核不通过原因
|
|
reviewRejectReson: score.reviewRejectReson || '', // 复核不通过原因
|
|
|
materialDescription: score.attachments || '', // 资料说明(使用附件字段,字符串)
|
|
materialDescription: score.attachments || '', // 资料说明(使用附件字段,字符串)
|
|
|
attachmentFileList: parseAttachmentsToFileList(score.attachments || ''), // 资料说明对应的附件文件列表
|
|
attachmentFileList: parseAttachmentsToFileList(score.attachments || ''), // 资料说明对应的附件文件列表
|
|
@@ -575,8 +577,8 @@
|
|
|
ElMessage.success('复核同意操作成功');
|
|
ElMessage.success('复核同意操作成功');
|
|
|
} else {
|
|
} else {
|
|
|
// isSelfApproveButton 为 false,调用提交接口
|
|
// isSelfApproveButton 为 false,调用提交接口
|
|
|
- await updateSecurityExamineIssueReviewAgree(submitData);
|
|
|
|
|
- ElMessage.success('复核提交成功');
|
|
|
|
|
|
|
+ await updateSecurityExamineIssueReviewSubmit(submitData);
|
|
|
|
|
+ ElMessage.success('保存成功');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
router.back();
|
|
router.back();
|
|
@@ -585,6 +587,78 @@
|
|
|
ElMessage.error(e?.message || '提交失败,请重试');
|
|
ElMessage.error(e?.message || '提交失败,请重试');
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
+ const handleSubmitItem = async () => {
|
|
|
|
|
+ const res = await handleValidate();
|
|
|
|
|
+ if (!res) return;
|
|
|
|
|
+ try {
|
|
|
|
|
+ if (!detailData.value) {
|
|
|
|
|
+ ElMessage.error('数据加载失败,请刷新后重试');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 使用详情原始数据,更新复核得分、加减分项及资料说明附件
|
|
|
|
|
+ const updatedScores =
|
|
|
|
|
+ (await Promise.all(
|
|
|
|
|
+ (detailData.value.scores || []).map(async (score: any) => {
|
|
|
|
|
+ const item = evaluationItems.value.find((row) => row.id === score.id);
|
|
|
|
|
+
|
|
|
|
|
+ // 处理资料说明附件:将 UploadFiles 返回的文件列表转换为逗号分隔的 URL 字符串
|
|
|
|
|
+ let attachments = score.attachments || '';
|
|
|
|
|
+ if (item && Array.isArray(item.attachmentFileList)) {
|
|
|
|
|
+ const existingFiles: string[] = [];
|
|
|
|
|
+ const newFiles: any[] = [];
|
|
|
|
|
+
|
|
|
|
|
+ item.attachmentFileList.forEach((file: any) => {
|
|
|
|
|
+ if (file.fileUrl && !file.file) {
|
|
|
|
|
+ existingFiles.push(file.fileUrl);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ newFiles.push(file);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ let uploadedUrls: string[] = [];
|
|
|
|
|
+ if (newFiles.length > 0) {
|
|
|
|
|
+ const uploadedFiles = await formatAttachmentList(newFiles);
|
|
|
|
|
+ uploadedUrls = uploadedFiles
|
|
|
|
|
+ .map((f: any) => f.fileUrl || f.url || '')
|
|
|
|
|
+ .filter((url: string) => url);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ attachments = [...existingFiles, ...uploadedUrls].filter((url) => url).join(',');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...score,
|
|
|
|
|
+ reviewScore: item ? Number(item.reviewScore) || 0 : score.reviewScore || 0,
|
|
|
|
|
+ reviewRejectReson: item ? item.reviewRejectReson || '' : score.reviewRejectReson || '',
|
|
|
|
|
+ isAdd: item
|
|
|
|
|
+ ? item.isAdd !== undefined
|
|
|
|
|
+ ? item.isAdd
|
|
|
|
|
+ : item.selfScore >= 0
|
|
|
|
|
+ ? 1
|
|
|
|
|
+ : 0
|
|
|
|
|
+ : score.isAdd !== undefined
|
|
|
|
|
+ ? score.isAdd
|
|
|
|
|
+ : score.selfScore >= 0
|
|
|
|
|
+ ? 1
|
|
|
|
|
+ : 0,
|
|
|
|
|
+ attachments,
|
|
|
|
|
+ };
|
|
|
|
|
+ }),
|
|
|
|
|
+ )) || [];
|
|
|
|
|
+
|
|
|
|
|
+ const submitData = {
|
|
|
|
|
+ ...detailData.value,
|
|
|
|
|
+ scores: updatedScores,
|
|
|
|
|
+ };
|
|
|
|
|
+ await updateSecurityExamineIssueReviewSubmit(submitData);
|
|
|
|
|
+ ElMessage.success('保存成功');
|
|
|
|
|
+ router.back();
|
|
|
|
|
+ } catch (e: any) {
|
|
|
|
|
+ console.error('提交失败:', e);
|
|
|
|
|
+ ElMessage.error(e?.message || '提交失败,请重试');
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
const confirmReject = async () => {
|
|
const confirmReject = async () => {
|
|
|
if (!rejectReason.value || !rejectReason.value.trim()) {
|
|
if (!rejectReason.value || !rejectReason.value.trim()) {
|