|
|
@@ -0,0 +1,699 @@
|
|
|
+<template>
|
|
|
+ <el-dialog
|
|
|
+ :title="dialogTitle"
|
|
|
+ v-model="visible"
|
|
|
+ width="1200px"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ append-to-body
|
|
|
+ @close="handleClose"
|
|
|
+ >
|
|
|
+ <div v-loading="loading" class="submit-dialog-content">
|
|
|
+ <!-- 1. 班级信息卡片 -->
|
|
|
+ <el-card shadow="never" class="info-card">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>班级信息</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-descriptions :column="3" border>
|
|
|
+ <el-descriptions-item label="学院名称">{{ assessmentDetail?.classDetail?.collegeName || '-' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="专业名称">{{ assessmentDetail?.classDetail?.majorName || '-' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="班级名称">{{ assessmentDetail?.classDetail?.className || '-' }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <!-- 2. 人数系数卡片 -->
|
|
|
+ <el-card shadow="never" class="info-card">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>人数系数(K2)</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-descriptions :column="2" border>
|
|
|
+ <el-descriptions-item label="班级总人数">{{ assessmentDetail?.classDetail?.totalStudentCount || 0 }}人</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="人数系数">{{ formatNumber(assessmentDetail?.coefficient?.studentCountCoefficient, 4) }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <!-- 3. 住校生系数卡片 -->
|
|
|
+ <el-card shadow="never" class="info-card">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>住校生系数(K3)</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-descriptions :column="2" border>
|
|
|
+ <el-descriptions-item label="住校生人数">{{ assessmentDetail?.classDetail?.boardingStudentCount || 0 }}人</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="住校生系数">{{ formatNumber(assessmentDetail?.coefficient?.boardingCoefficient, 4) }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <!-- 4. 层次系数卡片 -->
|
|
|
+ <el-card shadow="never" class="info-card">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>层次系数(K1)</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-descriptions :column="2" border>
|
|
|
+ <el-descriptions-item label="班级学历层级">{{ getClassTypeText(assessmentDetail?.classDetail?.classType) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="层次系数">{{ formatNumber(assessmentDetail?.coefficient?.levelCoefficient, 4) }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <!-- 5. 总系数卡片 -->
|
|
|
+ <el-card shadow="never" class="info-card">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>总系数(K)</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-descriptions :column="1" border>
|
|
|
+ <el-descriptions-item label="总系数">{{ formatNumber(assessmentDetail?.coefficient?.totalCoefficient, 6) }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <!-- 6. 班主任常规工作(50分)卡片 -->
|
|
|
+ <el-card shadow="never" class="info-card">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>班主任常规工作(50分)</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-table border :data="routineWorkScores" style="width: 100%">
|
|
|
+ <el-table-column type="index" label="序号" width="60" align="center" />
|
|
|
+ <el-table-column prop="indicatorName" label="指标名称" align="center" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column prop="description" label="指标描述" align="center" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column prop="score" label="指标分值" width="100" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.score || 0 }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="自评分数" width="120" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input-number
|
|
|
+ v-model="scope.row.selfScore"
|
|
|
+ :min="0"
|
|
|
+ :max="scope.row.score || 100"
|
|
|
+ :precision="2"
|
|
|
+ controls-position="right"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="请输入分数"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="自评意见" width="200" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.selfComment"
|
|
|
+ type="textarea"
|
|
|
+ :rows="2"
|
|
|
+ placeholder="请输入自评意见"
|
|
|
+ maxlength="200"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <!-- 7. 班级管理实效(50分)卡片 -->
|
|
|
+ <el-card shadow="never" class="info-card">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>班级管理实效(50分)</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-form :model="managementEffectivenessForm" label-width="150px">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="班级扣分">
|
|
|
+ <el-input-number
|
|
|
+ v-model="managementEffectivenessForm.classDeduction"
|
|
|
+ :min="0"
|
|
|
+ :precision="2"
|
|
|
+ controls-position="right"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="请输入扣分"
|
|
|
+ @change="calculateDeductionHalf"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="按班级扣分50%计">
|
|
|
+ <el-input
|
|
|
+ :value="managementEffectivenessForm.classDeductionHalf?.toFixed(2) || '0.00'"
|
|
|
+ readonly
|
|
|
+ style="width: 100%"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="info" plain @click="handleViewStudentViolations">学生违规处分信息查看</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="自评意见">
|
|
|
+ <el-input
|
|
|
+ v-model="managementEffectivenessForm.selfComment"
|
|
|
+ type="textarea"
|
|
|
+ :rows="3"
|
|
|
+ placeholder="请输入自评意见"
|
|
|
+ maxlength="500"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <!-- 8. 特色工作(加20分)卡片 -->
|
|
|
+ <el-card shadow="never" class="info-card">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>特色工作(加20分)</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-form :model="specialWorkForm" label-width="200px">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="及时并妥善处理好学生违纪事件">
|
|
|
+ <el-input-number
|
|
|
+ v-model="specialWorkForm.score1"
|
|
|
+ :min="0"
|
|
|
+ :max="20"
|
|
|
+ :precision="2"
|
|
|
+ controls-position="right"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="请输入分值"
|
|
|
+ @change="calculateTotalSpecialScore"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="自评意见">
|
|
|
+ <el-input
|
|
|
+ v-model="specialWorkForm.comment1"
|
|
|
+ type="textarea"
|
|
|
+ :rows="2"
|
|
|
+ placeholder="请输入自评意见"
|
|
|
+ maxlength="200"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="班级活动获奖情况">
|
|
|
+ <el-input-number
|
|
|
+ v-model="specialWorkForm.score2"
|
|
|
+ :min="0"
|
|
|
+ :max="20"
|
|
|
+ :precision="2"
|
|
|
+ controls-position="right"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="请输入分值"
|
|
|
+ @change="calculateTotalSpecialScore"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="自评意见">
|
|
|
+ <el-input
|
|
|
+ v-model="specialWorkForm.comment2"
|
|
|
+ type="textarea"
|
|
|
+ :rows="2"
|
|
|
+ placeholder="请输入自评意见"
|
|
|
+ maxlength="200"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="班级宣传工作有特色">
|
|
|
+ <el-input-number
|
|
|
+ v-model="specialWorkForm.score3"
|
|
|
+ :min="0"
|
|
|
+ :max="20"
|
|
|
+ :precision="2"
|
|
|
+ controls-position="right"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="请输入分值"
|
|
|
+ @change="calculateTotalSpecialScore"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="自评意见">
|
|
|
+ <el-input
|
|
|
+ v-model="specialWorkForm.comment3"
|
|
|
+ type="textarea"
|
|
|
+ :rows="2"
|
|
|
+ placeholder="请输入自评意见"
|
|
|
+ maxlength="200"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="其他">
|
|
|
+ <el-input-number
|
|
|
+ v-model="specialWorkForm.score4"
|
|
|
+ :min="0"
|
|
|
+ :max="20"
|
|
|
+ :precision="2"
|
|
|
+ controls-position="right"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="请输入分值"
|
|
|
+ @change="calculateTotalSpecialScore"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="自评意见">
|
|
|
+ <el-input
|
|
|
+ v-model="specialWorkForm.comment4"
|
|
|
+ type="textarea"
|
|
|
+ :rows="2"
|
|
|
+ placeholder="请输入自评意见"
|
|
|
+ maxlength="200"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="总分值">
|
|
|
+ <el-input
|
|
|
+ :value="specialWorkForm.totalScore?.toFixed(2) || '0.00'"
|
|
|
+ readonly
|
|
|
+ style="width: 100%"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <!-- 9. 月考核得分卡片 -->
|
|
|
+ <el-card shadow="never" class="info-card">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>月考核得分</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-form :model="monthlyScoreForm" label-width="100px">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="月考核得分">
|
|
|
+ <el-input
|
|
|
+ :value="calculateMonthlyScore().toFixed(2)"
|
|
|
+ readonly
|
|
|
+ style="width: 100%"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="总体评价">
|
|
|
+ <el-input
|
|
|
+ v-model="monthlyScoreForm.overallComment"
|
|
|
+ type="textarea"
|
|
|
+ :rows="4"
|
|
|
+ placeholder="请输入总体评价"
|
|
|
+ maxlength="500"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button :loading="submitLoading" type="primary" @click="handleSubmit">保存</el-button>
|
|
|
+ <el-button @click="handleClose">取消</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup name="SubmitDialog" lang="ts">
|
|
|
+import {
|
|
|
+ getAssessmentSubmitDetail,
|
|
|
+ submitAssessmentScore
|
|
|
+} from '@/api/bzrkh/teacherAssessment';
|
|
|
+import {
|
|
|
+ AssessmentDetailVO,
|
|
|
+ AssessmentIndicatorVO,
|
|
|
+ SpecialWorkIndicatorVO,
|
|
|
+ AssessmentSubmitVO
|
|
|
+} from '@/api/bzrkh/teacherAssessment/types';
|
|
|
+
|
|
|
+interface Props {
|
|
|
+ planId?: string | number;
|
|
|
+ classId?: string | number;
|
|
|
+}
|
|
|
+
|
|
|
+const props = defineProps<Props>();
|
|
|
+const emit = defineEmits(['success']);
|
|
|
+
|
|
|
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
+
|
|
|
+const visible = ref(false);
|
|
|
+const loading = ref(false);
|
|
|
+const submitLoading = ref(false);
|
|
|
+
|
|
|
+const assessmentDetail = ref<AssessmentDetailVO>();
|
|
|
+const routineWorkScores = ref<AssessmentIndicatorVO[]>([]);
|
|
|
+
|
|
|
+// 班级管理实效表单
|
|
|
+const managementEffectivenessForm = reactive({
|
|
|
+ classDeduction: 0,
|
|
|
+ classDeductionHalf: 0,
|
|
|
+ selfComment: ''
|
|
|
+});
|
|
|
+
|
|
|
+// 特色工作表单
|
|
|
+const specialWorkForm = reactive({
|
|
|
+ score1: 0, // 及时并妥善处理好学生违纪事件
|
|
|
+ comment1: '',
|
|
|
+ score2: 0, // 班级活动获奖情况
|
|
|
+ comment2: '',
|
|
|
+ score3: 0, // 班级宣传工作有特色
|
|
|
+ comment3: '',
|
|
|
+ score4: 0, // 其他
|
|
|
+ comment4: '',
|
|
|
+ totalScore: 0
|
|
|
+});
|
|
|
+
|
|
|
+// 月考核得分表单
|
|
|
+const monthlyScoreForm = reactive({
|
|
|
+ overallComment: ''
|
|
|
+});
|
|
|
+
|
|
|
+const dialogTitle = computed(() => {
|
|
|
+ const className = assessmentDetail.value?.classDetail?.className || '';
|
|
|
+ return `${className} - 班主任考核提交`;
|
|
|
+});
|
|
|
+
|
|
|
+/** 获取班级层次文本 */
|
|
|
+const getClassTypeText = (classType?: string) => {
|
|
|
+ const typeMap: Record<string, string> = {
|
|
|
+ '1': '中级工班',
|
|
|
+ '2': '高级工班',
|
|
|
+ '3': '预备技师班',
|
|
|
+ '4': '技师班',
|
|
|
+ '5': '中高职一体'
|
|
|
+ };
|
|
|
+ return typeMap[classType || ''] || '未知';
|
|
|
+};
|
|
|
+
|
|
|
+/** 格式化数字显示 */
|
|
|
+const formatNumber = (value?: number | string, precision = 4) => {
|
|
|
+ if (value === undefined || value === null || value === '') {
|
|
|
+ return '0.' + '0'.repeat(precision);
|
|
|
+ }
|
|
|
+
|
|
|
+ const numValue = typeof value === 'string' ? parseFloat(value) : value;
|
|
|
+
|
|
|
+ if (isNaN(numValue)) {
|
|
|
+ return '0.' + '0'.repeat(precision);
|
|
|
+ }
|
|
|
+
|
|
|
+ return numValue.toFixed(precision);
|
|
|
+};
|
|
|
+
|
|
|
+/** 计算班级扣分50%计 */
|
|
|
+const calculateDeductionHalf = () => {
|
|
|
+ managementEffectivenessForm.classDeductionHalf = (managementEffectivenessForm.classDeduction || 0) * 0.5;
|
|
|
+};
|
|
|
+
|
|
|
+/** 计算特色工作总分 */
|
|
|
+const calculateTotalSpecialScore = () => {
|
|
|
+ specialWorkForm.totalScore = (specialWorkForm.score1 || 0) +
|
|
|
+ (specialWorkForm.score2 || 0) +
|
|
|
+ (specialWorkForm.score3 || 0) +
|
|
|
+ (specialWorkForm.score4 || 0);
|
|
|
+};
|
|
|
+
|
|
|
+/** 计算月考核得分 */
|
|
|
+const calculateMonthlyScore = () => {
|
|
|
+ // 总系数(K)
|
|
|
+ const totalCoefficient = assessmentDetail.value?.coefficient?.totalCoefficient || 0;
|
|
|
+
|
|
|
+ // 班主任常规工作自评分之和
|
|
|
+ const routineWorkTotal = routineWorkScores.value.reduce((sum, item) => sum + (item.selfScore || 0), 0);
|
|
|
+
|
|
|
+ // 按班级扣分50%计的分值
|
|
|
+ const deductionHalf = managementEffectivenessForm.classDeductionHalf || 0;
|
|
|
+
|
|
|
+ // 特色工作总分值
|
|
|
+ const specialWorkTotal = specialWorkForm.totalScore || 0;
|
|
|
+
|
|
|
+ // 月考核得分 = 总系数(K)* (班主任常规工作自评分之和 - 按班级扣分50%计的分值 + 特色工作总分值)
|
|
|
+ return totalCoefficient * (routineWorkTotal - deductionHalf + specialWorkTotal);
|
|
|
+};
|
|
|
+
|
|
|
+/** 打开弹窗 */
|
|
|
+const open = async () => {
|
|
|
+ if (!props.planId || !props.classId) {
|
|
|
+ proxy?.$modal.msgError('参数错误:缺少计划ID或班级ID');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ visible.value = true;
|
|
|
+ await loadAssessmentDetail();
|
|
|
+};
|
|
|
+
|
|
|
+/** 加载考核详情数据 */
|
|
|
+const loadAssessmentDetail = async () => {
|
|
|
+ loading.value = true;
|
|
|
+ try {
|
|
|
+ const res = await getAssessmentSubmitDetail(props.planId!, props.classId!);
|
|
|
+ assessmentDetail.value = res.data;
|
|
|
+
|
|
|
+ // 初始化班主任常规工作数据
|
|
|
+ routineWorkScores.value = (assessmentDetail.value?.routineWorkIndicators || []).map(item => ({
|
|
|
+ ...item,
|
|
|
+ selfScore: item.selfScore || 0,
|
|
|
+ selfComment: item.selfComment || ''
|
|
|
+ }));
|
|
|
+
|
|
|
+ // 初始化班级管理实效数据
|
|
|
+ if (assessmentDetail.value?.classDeductionIndicator) {
|
|
|
+ managementEffectivenessForm.classDeduction = assessmentDetail.value.classDeductionIndicator.selfScore || 0;
|
|
|
+ managementEffectivenessForm.selfComment = assessmentDetail.value.classDeductionIndicator.selfComment || '';
|
|
|
+ calculateDeductionHalf();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 初始化特色工作数据
|
|
|
+ const specialWorkIndicators = assessmentDetail.value?.specialWorkIndicators || [];
|
|
|
+ specialWorkIndicators.forEach(item => {
|
|
|
+ switch (item.indicatorCode) {
|
|
|
+ case 'bzrtsgz001':
|
|
|
+ specialWorkForm.score1 = Number(item.score) || 0;
|
|
|
+ specialWorkForm.comment1 = item.selfComment || '';
|
|
|
+ break;
|
|
|
+ case 'bzrtsgz002':
|
|
|
+ specialWorkForm.score2 = Number(item.score) || 0;
|
|
|
+ specialWorkForm.comment2 = item.selfComment || '';
|
|
|
+ break;
|
|
|
+ case 'bzrtsgz003':
|
|
|
+ specialWorkForm.score3 = Number(item.score) || 0;
|
|
|
+ specialWorkForm.comment3 = item.selfComment || '';
|
|
|
+ break;
|
|
|
+ case 'bzrtsgz004':
|
|
|
+ specialWorkForm.score4 = Number(item.score) || 0;
|
|
|
+ specialWorkForm.comment4 = item.selfComment || '';
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // 确保特色工作总分重新计算
|
|
|
+ calculateTotalSpecialScore();
|
|
|
+
|
|
|
+ // 初始化月考核得分数据
|
|
|
+ monthlyScoreForm.overallComment = assessmentDetail.value?.overallComment || '';
|
|
|
+
|
|
|
+ // 调试信息:验证数据是否正确加载
|
|
|
+ console.log('数据回显完成:', {
|
|
|
+ totalSpecialScore: specialWorkForm.totalScore,
|
|
|
+ monthlyScore: calculateMonthlyScore(),
|
|
|
+ overallComment: monthlyScoreForm.overallComment
|
|
|
+ });
|
|
|
+
|
|
|
+ } catch (error) {
|
|
|
+ console.error('加载考核详情失败:', error);
|
|
|
+ proxy?.$modal.msgError('加载考核详情失败');
|
|
|
+ } finally {
|
|
|
+ loading.value = false;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+/** 查看学生违规处分信息 */
|
|
|
+const handleViewStudentViolations = () => {
|
|
|
+ proxy?.$modal.msg('学生违规处分信息查看功能暂未实现');
|
|
|
+};
|
|
|
+
|
|
|
+/** 提交考核 */
|
|
|
+const handleSubmit = async () => {
|
|
|
+ try {
|
|
|
+ // 验证必填项
|
|
|
+ if (routineWorkScores.value.some(item => item.selfScore === undefined || item.selfScore === null)) {
|
|
|
+ proxy?.$modal.msgWarning('请完善班主任常规工作的自评分数');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 验证必要参数
|
|
|
+ if (!props.planId || !props.classId) {
|
|
|
+ proxy?.$modal.msgError('缺少必要参数:计划ID或班级ID');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ submitLoading.value = true;
|
|
|
+
|
|
|
+ // 构造提交数据
|
|
|
+ const submitData: AssessmentSubmitVO = {
|
|
|
+ planId: props.planId, // 考核计划ID
|
|
|
+ classId: props.classId, // 班级ID - 将存储到数据库 class_id 字段
|
|
|
+ routineWorkScores: routineWorkScores.value,
|
|
|
+ classDeduction: managementEffectivenessForm.classDeduction,
|
|
|
+ classDeductionComment: managementEffectivenessForm.selfComment,
|
|
|
+ specialWorkScores: [
|
|
|
+ {
|
|
|
+ indicatorCode: 'bzrtsgz001',
|
|
|
+ indicatorName: '及时并妥善处理好学生违纪事件',
|
|
|
+ score: specialWorkForm.score1,
|
|
|
+ selfComment: specialWorkForm.comment1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ indicatorCode: 'bzrtsgz002',
|
|
|
+ indicatorName: '班级活动获奖情况',
|
|
|
+ score: specialWorkForm.score2,
|
|
|
+ selfComment: specialWorkForm.comment2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ indicatorCode: 'bzrtsgz003',
|
|
|
+ indicatorName: '班级宣传工作有特色',
|
|
|
+ score: specialWorkForm.score3,
|
|
|
+ selfComment: specialWorkForm.comment3
|
|
|
+ },
|
|
|
+ {
|
|
|
+ indicatorCode: 'bzrtsgz004',
|
|
|
+ indicatorName: '其他',
|
|
|
+ score: specialWorkForm.score4,
|
|
|
+ selfComment: specialWorkForm.comment4
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ overallComment: monthlyScoreForm.overallComment // 自我总体评价 - 将存储到数据库 self_overall_comment 字段
|
|
|
+ };
|
|
|
+
|
|
|
+ await submitAssessmentScore(submitData);
|
|
|
+ proxy?.$modal.msgSuccess('考核提交成功');
|
|
|
+ emit('success');
|
|
|
+ handleClose();
|
|
|
+
|
|
|
+ } catch (error) {
|
|
|
+ console.error('提交考核失败:', error);
|
|
|
+ proxy?.$modal.msgError('提交考核失败');
|
|
|
+ } finally {
|
|
|
+ submitLoading.value = false;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+/** 关闭弹窗 */
|
|
|
+const handleClose = () => {
|
|
|
+ visible.value = false;
|
|
|
+ // 重置表单数据
|
|
|
+ routineWorkScores.value = [];
|
|
|
+ Object.assign(managementEffectivenessForm, {
|
|
|
+ classDeduction: 0,
|
|
|
+ classDeductionHalf: 0,
|
|
|
+ selfComment: ''
|
|
|
+ });
|
|
|
+ Object.assign(specialWorkForm, {
|
|
|
+ score1: 0,
|
|
|
+ comment1: '',
|
|
|
+ score2: 0,
|
|
|
+ comment2: '',
|
|
|
+ score3: 0,
|
|
|
+ comment3: '',
|
|
|
+ score4: 0,
|
|
|
+ comment4: '',
|
|
|
+ totalScore: 0
|
|
|
+ });
|
|
|
+ Object.assign(monthlyScoreForm, {
|
|
|
+ overallComment: ''
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+// 暴露给父组件的方法
|
|
|
+defineExpose({
|
|
|
+ open
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.submit-dialog-content {
|
|
|
+ max-height: 70vh;
|
|
|
+ overflow-y: auto;
|
|
|
+}
|
|
|
+
|
|
|
+.info-card {
|
|
|
+ margin-bottom: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+.info-card:last-child {
|
|
|
+ margin-bottom: 0;
|
|
|
+}
|
|
|
+
|
|
|
+.card-header {
|
|
|
+ font-weight: 600;
|
|
|
+ color: #303133;
|
|
|
+}
|
|
|
+
|
|
|
+/* 表格样式 */
|
|
|
+:deep(.el-table) {
|
|
|
+ border-radius: 4px;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.el-table th) {
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ color: #606266;
|
|
|
+ font-weight: 600;
|
|
|
+}
|
|
|
+
|
|
|
+/* 表单样式 */
|
|
|
+:deep(.el-form-item__label) {
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+
|
|
|
+/* 只读输入框样式 */
|
|
|
+:deep(.el-input.is-disabled .el-input__wrapper) {
|
|
|
+ background-color: #f5f7fa;
|
|
|
+}
|
|
|
+
|
|
|
+/* 响应式布局 */
|
|
|
+@media (max-width: 768px) {
|
|
|
+ .submit-dialog-content {
|
|
|
+ padding: 0 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .info-card {
|
|
|
+ margin-bottom: 12px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|