diff --git a/backend/pom.xml b/backend/pom.xml index 66e4440d..c5e7d7cf 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -414,6 +414,7 @@ ${revision} +
@@ -15,12 +8,7 @@ - + @@ -31,15 +19,10 @@ - +
- +
@@ -54,8 +37,8 @@
-
- +
+

未找到匹配"{{ searchParams.indicatorName }}"的指标

清除搜索条件
@@ -71,19 +54,14 @@
指标名称: - - +
@@ -153,13 +131,13 @@ const filteredIndicatorList = computed(() => { // 没有搜索条件时,显示所有指标 return indicatorList.value; } - + // 有搜索条件时,只显示匹配的指标 - return indicatorList.value.filter(item => { + return indicatorList.value.filter((item) => { // 根据indicatorId查找对应的指标名称 - const indicator = availableIndicators.value.find(ind => ind.id == item.indicatorId); + const indicator = availableIndicators.value.find((ind) => ind.id == item.indicatorId); const indicatorName = indicator?.indicatorName || ''; - + // 检查指标名称是否包含搜索关键词(不区分大小写) return indicatorName.toLowerCase().includes(keyword.toLowerCase()); }); @@ -167,10 +145,11 @@ const filteredIndicatorList = computed(() => { // 获取指标在原始列表中的索引 const getOriginalIndex = (item: BmzrAssessmentSchemeIndicatorForm) => { - return indicatorList.value.findIndex(originalItem => - originalItem === item || - (originalItem.id && originalItem.id === item.id) || - (originalItem.indicatorId && originalItem.indicatorId === item.indicatorId && originalItem.sortOrder === item.sortOrder) + return indicatorList.value.findIndex( + (originalItem) => + originalItem === item || + (originalItem.id && originalItem.id === item.id) || + (originalItem.indicatorId && originalItem.indicatorId === item.indicatorId && originalItem.sortOrder === item.sortOrder) ); }; @@ -178,10 +157,10 @@ const getOriginalIndex = (item: BmzrAssessmentSchemeIndicatorForm) => { const open = async (id: string | number) => { schemeId.value = id; dialogVisible.value = true; - + // 加载可选指标 await loadAvailableIndicators(); - + // 加载当前方案的指标 await loadSchemeIndicators(); }; @@ -194,24 +173,24 @@ const loadAvailableIndicators = async () => { pageNum: 1, pageSize: 1000 // 加载所有指标 }; - + // 如果有搜索条件,添加到查询参数中 const hasSearchCondition = !!(searchParams.value.indicatorName && searchParams.value.indicatorName.trim()); if (hasSearchCondition) { queryParams.indicatorName = searchParams.value.indicatorName.trim(); } - + const res = await listBmzrAssessmentIndicator(queryParams); availableIndicators.value = res.rows || []; - + // 调试日志 console.log('loadAvailableIndicators完成:', { queryParams, hasSearchCondition, resultCount: availableIndicators.value.length, - indicatorNames: availableIndicators.value.map(i => i.indicatorName) + indicatorNames: availableIndicators.value.map((i) => i.indicatorName) }); - + // 更新搜索结果信息 updateSearchResultInfo(hasSearchCondition, availableIndicators.value.length); } catch (error) { @@ -225,15 +204,16 @@ const loadAvailableIndicators = async () => { const loadSchemeIndicators = async () => { try { const res = await listBySchemeId(schemeId.value); - indicatorList.value = res.data?.map((item: any) => ({ - id: item.id, - schemeId: item.schemeId, - indicatorId: item.indicatorId, - // 优先使用score字段,如果为空则使用customMaxScore字段(兜底方案) - score: item.score || item.customMaxScore, - remark: item.remark || getIndicatorRemark(item.indicatorId), - sortOrder: item.sortOrder - })) || []; + indicatorList.value = + res.data?.map((item: any) => ({ + id: item.id, + schemeId: item.schemeId, + indicatorId: item.indicatorId, + // 优先使用score字段,如果为空则使用customMaxScore字段(兜底方案) + score: item.score || item.customMaxScore, + remark: item.remark || getIndicatorRemark(item.indicatorId), + sortOrder: item.sortOrder + })) || []; } catch (error) { console.error('加载方案指标失败:', error); proxy?.$modal.msgError('加载方案指标失败'); @@ -242,7 +222,7 @@ const loadSchemeIndicators = async () => { // 根据指标ID获取指标描述 const getIndicatorRemark = (indicatorId: string | number) => { - const indicator = availableIndicators.value.find(item => item.id == indicatorId); + const indicator = availableIndicators.value.find((item) => item.id == indicatorId); return indicator?.remark || ''; }; @@ -261,23 +241,23 @@ const updateSearchResultInfo = (hasSearchCondition: boolean, resultCount: number const getAvailableIndicators = (currentIndex: number) => { // 搜索功能:直接返回后端搜索结果,允许重复选择同一指标 // 这样用户可以在不同位置选择相同的指标 - + // 调试日志 console.log('getAvailableIndicators调用:', { currentIndex, totalAvailable: availableIndicators.value.length, searchKeyword: searchParams.value.indicatorName, - availableIndicatorIds: availableIndicators.value.map(i => i.id), - availableIndicatorNames: availableIndicators.value.map(i => i.indicatorName), + availableIndicatorIds: availableIndicators.value.map((i) => i.id), + availableIndicatorNames: availableIndicators.value.map((i) => i.indicatorName), currentSelectedIndicatorId: indicatorList.value[currentIndex]?.indicatorId }); - + return availableIndicators.value; }; // 指标选择变化 const handleIndicatorChange = (item: BmzrAssessmentSchemeIndicatorForm, index: number) => { - const selectedIndicator = availableIndicators.value.find(indicator => indicator.id == item.indicatorId); + const selectedIndicator = availableIndicators.value.find((indicator) => indicator.id == item.indicatorId); if (selectedIndicator) { item.score = selectedIndicator.score; item.remark = selectedIndicator.remark; @@ -311,7 +291,7 @@ const handleSearchIndicators = async () => { proxy?.$modal.msgWarning('请输入搜索关键词'); return; } - + try { await loadAvailableIndicators(); proxy?.$modal.msgSuccess('搜索完成'); @@ -337,7 +317,7 @@ const resetSearch = async () => { // 保存 const handleSave = async () => { // 验证必填项 - const invalidItems = indicatorList.value.filter(item => !item.indicatorId); + const invalidItems = indicatorList.value.filter((item) => !item.indicatorId); if (invalidItems.length > 0) { proxy?.$modal.msgError('请选择所有指标名称'); return; @@ -469,10 +449,10 @@ defineExpose({ align-items: flex-start; gap: 12px; } - + .row-item { width: 100%; justify-content: space-between; } } - \ No newline at end of file + diff --git a/web/src/views/bzrkh/assessmentScheme/index.vue b/web/src/views/bzrkh/assessmentScheme/index.vue index 099264aa..23e35b98 100644 --- a/web/src/views/bzrkh/assessmentScheme/index.vue +++ b/web/src/views/bzrkh/assessmentScheme/index.vue @@ -112,14 +112,26 @@ - - - - - - - - + + + + + + + +
@@ -222,9 +234,7 @@ import { BmzrAssessmentSchemeVO, BmzrAssessmentSchemeQuery, BmzrAssessmentScheme import IndicatorManagement from './IndicatorManagement.vue'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; -const { sys_normal_disable, sys_yesno } = toRefs( - proxy?.useDict('sys_normal_disable', 'sys_yesno') -); +const { sys_normal_disable, sys_yesno } = toRefs(proxy?.useDict('sys_normal_disable', 'sys_yesno')); const schemeList = ref([]); const buttonLoading = ref(false); @@ -385,8 +395,6 @@ const handleDelete = async (row?: BmzrAssessmentSchemeVO) => { } }; - - /** 指标体系管理按钮操作 */ const handleIndicatorManagement = (row: BmzrAssessmentSchemeVO) => { indicatorManagementRef.value?.open(row.id); @@ -485,10 +493,6 @@ onMounted(() => { border-bottom: none !important; } - - - - /* 表单样式 */ .scheme-form { padding: 20px; @@ -513,4 +517,4 @@ onMounted(() => { justify-content: flex-end; gap: 12px; } - \ No newline at end of file + diff --git a/web/src/views/rs/overseasApproval/index.vue b/web/src/views/rs/overseasApproval/index.vue index 3ef3a1ee..d9bc315d 100644 --- a/web/src/views/rs/overseasApproval/index.vue +++ b/web/src/views/rs/overseasApproval/index.vue @@ -353,13 +353,7 @@ - \ No newline at end of file diff --git a/web/src/views/zsjy/internship/pmonthly/form.vue b/web/src/views/zsjy/internship/pmonthly/form.vue index 4a8aa5c9..0383afea 100644 --- a/web/src/views/zsjy/internship/pmonthly/form.vue +++ b/web/src/views/zsjy/internship/pmonthly/form.vue @@ -7,13 +7,7 @@ - + @@ -305,16 +294,16 @@ import { checkSummaryMonth, getMonthlyTemplate, getCurrentInternshipInfo -} from '@/api/zsjy/internshipMonthly' +} from '@/api/zsjy/internshipMonthly'; -const { proxy } = getCurrentInstance() as ComponentInternalInstance -const { internship_monthly_status } = toRefs(proxy?.useDict('internship_monthly_status')) +const { proxy } = getCurrentInstance() as ComponentInternalInstance; +const { internship_monthly_status } = toRefs(proxy?.useDict('internship_monthly_status')); -const emit = defineEmits(['success']) +const emit = defineEmits(['success']); -const monthlyFormRef = ref() -const submitting = ref(false) -const autoSaving = ref(false) +const monthlyFormRef = ref(); +const submitting = ref(false); +const autoSaving = ref(false); // 表单数据 const initFormData = { @@ -337,15 +326,13 @@ const initFormData = { reviewStatus: undefined, submitTime: undefined, createTime: undefined -} +}; -const form = ref({ ...initFormData }) +const form = ref({ ...initFormData }); // 表单验证规则 const rules = ref({ - summaryMonth: [ - { required: true, message: '总结月份不能为空', trigger: 'change' } - ], + summaryMonth: [{ required: true, message: '总结月份不能为空', trigger: 'change' }], workContent: [ { required: true, message: '工作内容不能为空', trigger: 'blur' }, { min: 10, message: '工作内容至少需要10个字符', trigger: 'blur' }, @@ -380,107 +367,103 @@ const rules = ref({ { required: true, message: '自我评价不能为空', trigger: 'blur' }, { max: 300, message: '自我评价不能超过300个字符', trigger: 'blur' } ], - nextMonthPlan: [ - { max: 300, message: '下月计划不能超过300个字符', trigger: 'blur' } - ], - remark: [ - { max: 200, message: '备注说明不能超过200个字符', trigger: 'blur' } - ] -}) + nextMonthPlan: [{ max: 300, message: '下月计划不能超过300个字符', trigger: 'blur' }], + remark: [{ max: 200, message: '备注说明不能超过200个字符', trigger: 'blur' }] +}); // 月份重复检查 const monthDuplicateCheck = ref({ show: false, type: 'info', message: '' -}) +}); // 自动保存定时器 -let autoSaveTimer: NodeJS.Timeout | null = null +let autoSaveTimer: NodeJS.Timeout | null = null; /** 重置表单 */ const resetForm = async (monthlyId?: string | number) => { - form.value = { ...initFormData } - monthDuplicateCheck.value.show = false + form.value = { ...initFormData }; + monthDuplicateCheck.value.show = false; if (monthlyId) { try { - const res = await getInternshipMonthly(monthlyId) - form.value = { ...res.data } - updateWordCount() + const res = await getInternshipMonthly(monthlyId); + form.value = { ...res.data }; + updateWordCount(); } catch (error) { - console.error('获取月度总结详情失败:', error) + console.error('获取月度总结详情失败:', error); } } else { // 新增时获取当前月份模板和学生实习信息 - const currentMonth = new Date().toISOString().substring(0, 7) - form.value.summaryMonth = currentMonth - await loadMonthlyTemplate(currentMonth) - + const currentMonth = new Date().toISOString().substring(0, 7); + form.value.summaryMonth = currentMonth; + await loadMonthlyTemplate(currentMonth); + // 获取学生当前实习信息 try { - const internshipRes = await getCurrentInternshipInfo() + const internshipRes = await getCurrentInternshipInfo(); if (internshipRes.code === 200 && internshipRes.data) { - form.value.internshipId = internshipRes.data.internshipId + form.value.internshipId = internshipRes.data.internshipId; } else { // 如果没有进行中的实习记录,提示用户 - proxy?.$modal.msgError('您当前没有进行中的实习记录,无法创建月度总结') - emit('success') // 关闭对话框 - return + proxy?.$modal.msgError('您当前没有进行中的实习记录,无法创建月度总结'); + emit('success'); // 关闭对话框 + return; } } catch (error) { - console.error('获取学生实习信息失败:', error) - proxy?.$modal.msgError('获取实习信息失败,请稍后重试') - emit('success') // 关闭对话框 - return + console.error('获取学生实习信息失败:', error); + proxy?.$modal.msgError('获取实习信息失败,请稍后重试'); + emit('success'); // 关闭对话框 + return; } } nextTick(() => { - monthlyFormRef.value?.clearValidate() - }) -} + monthlyFormRef.value?.clearValidate(); + }); +}; /** 加载月份模板 */ const loadMonthlyTemplate = async (month: string) => { try { - const res = await getMonthlyTemplate(month) + const res = await getMonthlyTemplate(month); if (res.data) { // 如果有模板数据,可以预填充一些内容 // form.value.nextMonthPlan = res.data.suggestedPlan || '' } } catch (error) { - console.log('获取月份模板失败,将使用空模板') + console.log('获取月份模板失败,将使用空模板'); } -} +}; /** 检查月份重复 */ const checkMonthDuplicate = async () => { - if (!form.value.summaryMonth) return + if (!form.value.summaryMonth) return; try { - const res = await checkSummaryMonth(form.value.summaryMonth) + const res = await checkSummaryMonth(form.value.summaryMonth); if (res.data.exists && (!form.value.monthlyId || res.data.monthlyId !== form.value.monthlyId)) { monthDuplicateCheck.value = { show: true, type: 'warning', message: '该月份已存在总结记录,请选择其他月份' - } + }; } else { monthDuplicateCheck.value = { show: true, type: 'success', message: '该月份可以创建总结' - } + }; } } catch (error) { monthDuplicateCheck.value = { show: true, type: 'error', message: '检查月份失败,请重试' - } + }; } -} +}; /** 更新字数统计 */ const updateWordCount = () => { @@ -492,91 +475,91 @@ const updateWordCount = () => { form.value.selfEvaluation, form.value.nextMonthPlan, form.value.remark - ].join('') + ].join(''); - form.value.wordCount = content.length + form.value.wordCount = content.length; // 设置自动保存定时器 if (form.value.monthlyId && form.value.reviewStatus === 3) { if (autoSaveTimer) { - clearTimeout(autoSaveTimer) + clearTimeout(autoSaveTimer); } autoSaveTimer = setTimeout(() => { - handleAutoSave() - }, 5000) // 5秒后自动保存 + handleAutoSave(); + }, 5000); // 5秒后自动保存 } -} +}; /** 获取字数标签类型 */ const getWordCountTagType = (count: number) => { - if (count < 100) return 'info' - if (count < 500) return 'warning' - if (count < 1000) return 'success' - return 'danger' -} + if (count < 100) return 'info'; + if (count < 500) return 'warning'; + if (count < 1000) return 'success'; + return 'danger'; +}; /** 自动保存草稿 */ const handleAutoSave = async () => { - if (!form.value.monthlyId || form.value.reviewStatus !== 3) return + if (!form.value.monthlyId || form.value.reviewStatus !== 3) return; - autoSaving.value = true + autoSaving.value = true; try { - await autosaveInternshipMonthly(form.value) - proxy?.$message.success('草稿已自动保存') + await autosaveInternshipMonthly(form.value); + proxy?.$message.success('草稿已自动保存'); } catch (error) { - console.error('自动保存失败:', error) + console.error('自动保存失败:', error); } finally { - autoSaving.value = false + autoSaving.value = false; } -} +}; /** 提交表单 */ const handleSubmit = async (type: 'draft' | 'submit') => { - if (!monthlyFormRef.value) return + if (!monthlyFormRef.value) return; - const valid = await monthlyFormRef.value.validate().catch(() => false) - if (!valid) return + const valid = await monthlyFormRef.value.validate().catch(() => false); + if (!valid) return; - submitting.value = true + submitting.value = true; try { - updateWordCount() + updateWordCount(); const formData = { ...form.value, reviewStatus: type === 'draft' ? 3 : 0, // 草稿=3,待审核=0 submitTime: type === 'submit' ? new Date() : undefined - } + }; if (form.value.monthlyId) { - await updateInternshipMonthly(formData) + await updateInternshipMonthly(formData); } else { - await addInternshipMonthly(formData) + await addInternshipMonthly(formData); } - proxy?.$modal.msgSuccess(type === 'draft' ? '保存成功' : '提交成功') - emit('success') + proxy?.$modal.msgSuccess(type === 'draft' ? '保存成功' : '提交成功'); + emit('success'); } catch (error) { - console.error('提交失败:', error) + console.error('提交失败:', error); } finally { - submitting.value = false + submitting.value = false; } -} +}; /** 取消操作 */ const handleCancel = () => { - emit('success') -} + emit('success'); +}; // 清理定时器 onUnmounted(() => { if (autoSaveTimer) { - clearTimeout(autoSaveTimer) + clearTimeout(autoSaveTimer); } -}) +}); defineExpose({ resetForm -}) +}); \ No newline at end of file +.text-primary { + color: #409eff; +} +.text-success { + color: #67c23a; +} +.text-warning { + color: #e6a23c; +} +.text-danger { + color: #f56c6c; +} +.text-gray-500 { + color: #9ca3af; +} +.font-bold { + font-weight: bold; +} +.text-sm { + font-size: 12px; +} +.mb-4 { + margin-bottom: 16px; +} +.ml-2 { + margin-left: 8px; +} + diff --git a/web/src/views/zsjy/internship/pmonthreview/components/BatchReviewForm.vue b/web/src/views/zsjy/internship/pmonthreview/components/BatchReviewForm.vue index 26c65166..92ac45f7 100644 --- a/web/src/views/zsjy/internship/pmonthreview/components/BatchReviewForm.vue +++ b/web/src/views/zsjy/internship/pmonthreview/components/BatchReviewForm.vue @@ -22,26 +22,13 @@ - + - + @@ -100,13 +87,7 @@ - + @@ -119,25 +100,11 @@ - + - + @@ -167,25 +134,21 @@ diff --git a/web/src/views/zsjy/internship/pmonthreview/components/ReviewDetail.vue b/web/src/views/zsjy/internship/pmonthreview/components/ReviewDetail.vue index 93f14841..5903e5e6 100644 --- a/web/src/views/zsjy/internship/pmonthreview/components/ReviewDetail.vue +++ b/web/src/views/zsjy/internship/pmonthreview/components/ReviewDetail.vue @@ -67,69 +67,42 @@
专业技能: - + {{ monthlyData.professionalSkills || 0 }}分
沟通能力: - + {{ monthlyData.communicationSkills || 0 }}分
团队协作: - + {{ monthlyData.teamworkAbility || 0 }}分
学习能力: - + {{ monthlyData.learningAbility || 0 }}分
工作态度: - + {{ monthlyData.workAttitude || 0 }}分
综合评分: - - {{ getAverageScore().toFixed(1) }}分 - + {{ getAverageScore().toFixed(1) }}分
@@ -147,8 +120,10 @@ - + {{ monthlyData.reviewScore }}分 未评分 @@ -178,14 +153,14 @@ diff --git a/web/src/views/zsjy/internship/pmonthreview/components/ReviewForm.vue b/web/src/views/zsjy/internship/pmonthreview/components/ReviewForm.vue index fec016de..5eb6cbd0 100644 --- a/web/src/views/zsjy/internship/pmonthreview/components/ReviewForm.vue +++ b/web/src/views/zsjy/internship/pmonthreview/components/ReviewForm.vue @@ -145,27 +145,20 @@ diff --git a/web/src/views/zsjy/internship/pmonthreview/index.vue b/web/src/views/zsjy/internship/pmonthreview/index.vue index ea5ffd62..30e1c5f3 100644 --- a/web/src/views/zsjy/internship/pmonthreview/index.vue +++ b/web/src/views/zsjy/internship/pmonthreview/index.vue @@ -138,7 +138,8 @@ :disabled="multiple" @click="handleBatchReview" v-hasPermi="['zsjy:internshipmonthly:review']" - >批量审核 + >批量审核
@@ -165,16 +166,12 @@ - +
- + @@ -238,25 +228,16 @@