|
|
@@ -0,0 +1,720 @@
|
|
|
+<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="approval-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="学院名称">{{ approvalDetail?.classDetail?.collegeName || '-' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="专业名称">{{ approvalDetail?.classDetail?.majorName || '-' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="班级名称">{{ approvalDetail?.classDetail?.className || '-' }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <!-- 2. 总系数(K)与层次系数(K1)并排 -->
|
|
|
+ <el-row :gutter="20" class="info-card">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-card shadow="never">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>总系数(K)</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-descriptions :column="1" border>
|
|
|
+ <el-descriptions-item label="总系数">{{ formatNumber(approvalDetail?.coefficient?.totalCoefficient, 3) }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-card shadow="never">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>层次系数(K1)</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-descriptions :column="2" border>
|
|
|
+ <el-descriptions-item label="班级学历层级">{{ getClassTypeText(approvalDetail?.classDetail?.classType) }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="层次系数">{{ formatNumber(approvalDetail?.coefficient?.levelCoefficient, 3) }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <!-- 3. 人数系数(K2)与住校生系数(K3)并排 -->
|
|
|
+ <el-row :gutter="20" class="info-card">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-card shadow="never">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>人数系数(K2)</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-descriptions :column="2" border>
|
|
|
+ <el-descriptions-item label="班级总人数">{{ approvalDetail?.classDetail?.totalStudentCount || 0 }}人</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="人数系数">{{ formatNumber(approvalDetail?.coefficient?.studentCountCoefficient, 3) }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-card shadow="never">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>住校生系数(K3)</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-descriptions :column="2" border>
|
|
|
+ <el-descriptions-item label="住校生人数">{{ approvalDetail?.classDetail?.boardingStudentCount || 0 }}人</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="住校生系数">{{ formatNumber(approvalDetail?.coefficient?.boardingCoefficient, 3) }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <!-- 4. 班主任常规工作(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%" max-height="400" class="routine-work-table">
|
|
|
+ <el-table-column type="index" label="序号" width="60" align="center" />
|
|
|
+ <el-table-column prop="indicatorName" label="指标名称" min-width="150" align="center" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column prop="description" label="指标描述" min-width="180" align="center" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column prop="score" label="指标分值" width="80" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.score || 0 }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="自评分数" width="80" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.selfScore || 0 }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="自评意见" width="180" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tooltip :content="scope.row.selfComment || '无'" placement="top" :disabled="!scope.row.selfComment">
|
|
|
+ <span class="text-ellipsis">{{ scope.row.selfComment || '无' }}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="上级评分" width="100" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input-number
|
|
|
+ v-model="scope.row.superiorScore"
|
|
|
+ :min="0"
|
|
|
+ :max="scope.row.score || 100"
|
|
|
+ :precision="2"
|
|
|
+ controls-position="right"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="请输入分数"
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="审批意见" width="200" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.superiorComment"
|
|
|
+ type="textarea"
|
|
|
+ :rows="2"
|
|
|
+ placeholder="请输入审批意见"
|
|
|
+ maxlength="200"
|
|
|
+ show-word-limit
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <!-- 5. 班级管理实效(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" class="management-effectiveness-form">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="班级扣分">
|
|
|
+ <el-input
|
|
|
+ :value="managementEffectivenessForm.classDeduction?.toFixed(2) || '0.00'"
|
|
|
+ readonly
|
|
|
+ style="width: 100%; text-align: center;"
|
|
|
+ />
|
|
|
+ </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%; text-align: center;"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="上级评分">
|
|
|
+ <el-input-number
|
|
|
+ v-model="managementEffectivenessForm.superiorScore"
|
|
|
+ :min="0"
|
|
|
+ :max="50"
|
|
|
+ :precision="2"
|
|
|
+ controls-position="right"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="请输入分数"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="自评意见">
|
|
|
+ <el-input
|
|
|
+ :value="managementEffectivenessForm.selfComment"
|
|
|
+ type="textarea"
|
|
|
+ :rows="3"
|
|
|
+ readonly
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="审批意见">
|
|
|
+ <el-input
|
|
|
+ v-model="managementEffectivenessForm.superiorComment"
|
|
|
+ type="textarea"
|
|
|
+ :rows="3"
|
|
|
+ placeholder="请输入审批意见"
|
|
|
+ maxlength="500"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <!-- 6. 特色工作(加20分)卡片 -->
|
|
|
+ <el-card shadow="never" class="info-card">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>特色工作(加20分)</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-table border :data="specialWorkScores" style="width: 100%" class="special-work-table">
|
|
|
+ <el-table-column type="index" label="序号" width="60" align="center" />
|
|
|
+ <el-table-column prop="indicatorName" label="特色工作项目" min-width="180" align="center" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="自评分数" width="80" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.score || 0 }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="自评意见" width="180" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tooltip :content="scope.row.selfComment || '无'" placement="top" :disabled="!scope.row.selfComment">
|
|
|
+ <span class="text-ellipsis">{{ scope.row.selfComment || '无' }}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="上级评分" width="100" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input-number
|
|
|
+ v-model="scope.row.superiorScore"
|
|
|
+ :min="0"
|
|
|
+ :max="20"
|
|
|
+ :precision="2"
|
|
|
+ controls-position="right"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="请输入分数"
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="审批意见" width="200" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.superiorComment"
|
|
|
+ type="textarea"
|
|
|
+ :rows="2"
|
|
|
+ placeholder="请输入审批意见"
|
|
|
+ maxlength="200"
|
|
|
+ show-word-limit
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <!-- 7. 月考核得分卡片 -->
|
|
|
+ <el-card shadow="never" class="info-card">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>月考核得分</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-form :model="monthlyScoreForm" label-width="100px" class="monthly-score-form">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="月考核得分">
|
|
|
+ <el-input
|
|
|
+ :value="calculateMonthlyScore().toFixed(2)"
|
|
|
+ readonly
|
|
|
+ style="width: 100%; text-align: center;"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="自我总体评价">
|
|
|
+ <el-input
|
|
|
+ :value="monthlyScoreForm.selfOverallComment"
|
|
|
+ type="textarea"
|
|
|
+ :rows="4"
|
|
|
+ readonly
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="上级总体评价">
|
|
|
+ <el-input
|
|
|
+ v-model="monthlyScoreForm.superiorOverallComment"
|
|
|
+ type="textarea"
|
|
|
+ :rows="4"
|
|
|
+ placeholder="请输入上级总体评价"
|
|
|
+ maxlength="500"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <!-- 8. 审批结果卡片 -->
|
|
|
+ <el-card shadow="never" class="info-card">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>审批结果</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-form :model="approvalForm" label-width="100px" class="approval-form">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="审批状态" required>
|
|
|
+ <el-radio-group v-model="approvalForm.auditStatus">
|
|
|
+ <el-radio value="1">通过</el-radio>
|
|
|
+ <el-radio value="2">拒绝</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="审批意见">
|
|
|
+ <el-input
|
|
|
+ v-model="approvalForm.auditComment"
|
|
|
+ type="textarea"
|
|
|
+ :rows="3"
|
|
|
+ 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="ApprovalDialog" lang="ts">
|
|
|
+import {
|
|
|
+ getAssessmentApprovalDetail,
|
|
|
+ submitAssessmentApproval
|
|
|
+} from '@/api/bzrkh/assessmentApproval';
|
|
|
+import {
|
|
|
+ AssessmentApprovalVO,
|
|
|
+ AssessmentApprovalDetailVO,
|
|
|
+ AssessmentApprovalIndicatorVO,
|
|
|
+ AssessmentApprovalSpecialWorkVO,
|
|
|
+ AssessmentApprovalSubmitBO
|
|
|
+} from '@/api/bzrkh/assessmentApproval/types';
|
|
|
+
|
|
|
+const emit = defineEmits(['success']);
|
|
|
+
|
|
|
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
+
|
|
|
+const visible = ref(false);
|
|
|
+const loading = ref(false);
|
|
|
+const submitLoading = ref(false);
|
|
|
+
|
|
|
+const currentRow = ref<AssessmentApprovalVO>();
|
|
|
+const approvalDetail = ref<AssessmentApprovalDetailVO>();
|
|
|
+const routineWorkScores = ref<AssessmentApprovalIndicatorVO[]>([]);
|
|
|
+const specialWorkScores = ref<AssessmentApprovalSpecialWorkVO[]>([]);
|
|
|
+
|
|
|
+// 班级管理实效表单
|
|
|
+const managementEffectivenessForm = reactive({
|
|
|
+ classDeduction: 0,
|
|
|
+ classDeductionHalf: 0,
|
|
|
+ selfComment: '',
|
|
|
+ superiorScore: 0,
|
|
|
+ superiorComment: ''
|
|
|
+});
|
|
|
+
|
|
|
+// 月考核得分表单
|
|
|
+const monthlyScoreForm = reactive({
|
|
|
+ selfOverallComment: '',
|
|
|
+ superiorOverallComment: ''
|
|
|
+});
|
|
|
+
|
|
|
+// 审批表单
|
|
|
+const approvalForm = reactive({
|
|
|
+ auditStatus: '1', // 默认通过
|
|
|
+ auditComment: ''
|
|
|
+});
|
|
|
+
|
|
|
+const dialogTitle = computed(() => {
|
|
|
+ const className = approvalDetail.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);
|
|
|
+};
|
|
|
+
|
|
|
+/** 计算月考核得分 */
|
|
|
+const calculateMonthlyScore = () => {
|
|
|
+ // 总系数(K)
|
|
|
+ const totalCoefficient = approvalDetail.value?.coefficient?.totalCoefficient || 0;
|
|
|
+
|
|
|
+ // 班主任常规工作自评分之和
|
|
|
+ const routineWorkTotal = routineWorkScores.value.reduce((sum, item) => sum + (item.selfScore || 0), 0);
|
|
|
+
|
|
|
+ // 按班级扣分50%计的分值
|
|
|
+ const deductionHalf = managementEffectivenessForm.classDeductionHalf || 0;
|
|
|
+
|
|
|
+ // 特色工作总分值
|
|
|
+ const specialWorkTotal = specialWorkScores.value.reduce((sum, item) => sum + (item.score || 0), 0);
|
|
|
+
|
|
|
+ // 月考核得分 = 总系数(K)* (班主任常规工作自评分之和 - 按班级扣分50%计的分值 + 特色工作总分值)
|
|
|
+ return totalCoefficient * (routineWorkTotal - deductionHalf + specialWorkTotal);
|
|
|
+};
|
|
|
+
|
|
|
+/** 打开弹窗 */
|
|
|
+const open = async (row: AssessmentApprovalVO) => {
|
|
|
+ if (!row.planId || !row.classId || !row.evaluatedUserId) {
|
|
|
+ proxy?.$modal.msgError('参数错误:缺少必要的ID信息');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ currentRow.value = row;
|
|
|
+ visible.value = true;
|
|
|
+ await loadApprovalDetail();
|
|
|
+};
|
|
|
+
|
|
|
+/** 加载审批详情数据 */
|
|
|
+const loadApprovalDetail = async () => {
|
|
|
+ if (!currentRow.value?.planId || !currentRow.value?.classId || !currentRow.value?.evaluatedUserId) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ loading.value = true;
|
|
|
+ try {
|
|
|
+ const res = await getAssessmentApprovalDetail(
|
|
|
+ currentRow.value.planId,
|
|
|
+ currentRow.value.classId,
|
|
|
+ currentRow.value.evaluatedUserId
|
|
|
+ );
|
|
|
+ approvalDetail.value = res.data;
|
|
|
+
|
|
|
+ // 初始化班主任常规工作数据
|
|
|
+ routineWorkScores.value = (approvalDetail.value?.routineWorkIndicators || []).map(item => ({
|
|
|
+ ...item,
|
|
|
+ superiorScore: item.superiorScore || 0,
|
|
|
+ superiorComment: item.superiorComment || ''
|
|
|
+ }));
|
|
|
+
|
|
|
+ // 初始化班级管理实效数据
|
|
|
+ if (approvalDetail.value?.classDeductionIndicator) {
|
|
|
+ const indicator = approvalDetail.value.classDeductionIndicator;
|
|
|
+ managementEffectivenessForm.classDeduction = indicator.selfScore || 0;
|
|
|
+ managementEffectivenessForm.classDeductionHalf = (indicator.selfScore || 0) * 0.5;
|
|
|
+ managementEffectivenessForm.selfComment = indicator.selfComment || '';
|
|
|
+ managementEffectivenessForm.superiorScore = indicator.superiorScore || 0;
|
|
|
+ managementEffectivenessForm.superiorComment = indicator.superiorComment || '';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 初始化特色工作数据
|
|
|
+ specialWorkScores.value = (approvalDetail.value?.specialWorkIndicators || []).map(item => ({
|
|
|
+ ...item,
|
|
|
+ superiorScore: item.superiorScore || 0,
|
|
|
+ superiorComment: item.superiorComment || ''
|
|
|
+ }));
|
|
|
+
|
|
|
+ // 初始化月考核得分数据
|
|
|
+ monthlyScoreForm.selfOverallComment = approvalDetail.value?.selfOverallComment || '';
|
|
|
+ monthlyScoreForm.superiorOverallComment = approvalDetail.value?.superiorOverallComment || '';
|
|
|
+
|
|
|
+ // 初始化审批状态
|
|
|
+ approvalForm.auditStatus = approvalDetail.value?.auditStatus || '1';
|
|
|
+
|
|
|
+ } catch (error) {
|
|
|
+ console.error('加载审批详情失败:', error);
|
|
|
+ proxy?.$modal.msgError('加载审批详情失败');
|
|
|
+ } finally {
|
|
|
+ loading.value = false;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+/** 提交审批 */
|
|
|
+const handleSubmit = async () => {
|
|
|
+ try {
|
|
|
+ // 验证必填项
|
|
|
+ if (!approvalForm.auditStatus) {
|
|
|
+ proxy?.$modal.msgWarning('请选择审批状态');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (approvalForm.auditStatus === '2' && !approvalForm.auditComment.trim()) {
|
|
|
+ proxy?.$modal.msgWarning('拒绝审批时必须填写审批意见');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ submitLoading.value = true;
|
|
|
+
|
|
|
+ // 构造提交数据
|
|
|
+ const submitData: AssessmentApprovalSubmitBO = {
|
|
|
+ planId: currentRow.value?.planId,
|
|
|
+ classId: currentRow.value?.classId,
|
|
|
+ evaluatedUserId: currentRow.value?.evaluatedUserId,
|
|
|
+ routineWorkApproval: routineWorkScores.value.map(item => ({
|
|
|
+ id: item.id,
|
|
|
+ indicatorId: item.indicatorId,
|
|
|
+ superiorScore: item.superiorScore,
|
|
|
+ superiorComment: item.superiorComment
|
|
|
+ })),
|
|
|
+ classDeductionApproval: {
|
|
|
+ id: approvalDetail.value?.classDeductionIndicator?.id,
|
|
|
+ indicatorId: approvalDetail.value?.classDeductionIndicator?.indicatorId,
|
|
|
+ superiorScore: managementEffectivenessForm.superiorScore,
|
|
|
+ superiorComment: managementEffectivenessForm.superiorComment
|
|
|
+ },
|
|
|
+ specialWorkApproval: specialWorkScores.value.map(item => ({
|
|
|
+ id: item.id,
|
|
|
+ indicatorCode: item.indicatorCode,
|
|
|
+ superiorScore: item.superiorScore,
|
|
|
+ superiorComment: item.superiorComment
|
|
|
+ })),
|
|
|
+ superiorOverallComment: monthlyScoreForm.superiorOverallComment,
|
|
|
+ auditStatus: approvalForm.auditStatus,
|
|
|
+ auditComment: approvalForm.auditComment
|
|
|
+ };
|
|
|
+
|
|
|
+ await submitAssessmentApproval(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 = [];
|
|
|
+ specialWorkScores.value = [];
|
|
|
+ Object.assign(managementEffectivenessForm, {
|
|
|
+ classDeduction: 0,
|
|
|
+ classDeductionHalf: 0,
|
|
|
+ selfComment: '',
|
|
|
+ superiorScore: 0,
|
|
|
+ superiorComment: ''
|
|
|
+ });
|
|
|
+ Object.assign(monthlyScoreForm, {
|
|
|
+ selfOverallComment: '',
|
|
|
+ superiorOverallComment: ''
|
|
|
+ });
|
|
|
+ Object.assign(approvalForm, {
|
|
|
+ auditStatus: '1',
|
|
|
+ auditComment: ''
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+// 暴露给父组件的方法
|
|
|
+defineExpose({
|
|
|
+ open
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.approval-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;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+
|
|
|
+/* 表格样式 */
|
|
|
+:deep(.el-table) {
|
|
|
+ border-radius: 4px;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.el-table th) {
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ color: #606266;
|
|
|
+ font-weight: 600;
|
|
|
+}
|
|
|
+
|
|
|
+/* 班主任常规工作表格样式优化 */
|
|
|
+:deep(.routine-work-table) {
|
|
|
+ .el-table__body-wrapper {
|
|
|
+ max-height: 350px;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-table__row {
|
|
|
+ height: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-table__cell {
|
|
|
+ padding: 8px 0;
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 优化输入框在表格中的显示 */
|
|
|
+ .el-input-number {
|
|
|
+ width: 100% !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-textarea__inner {
|
|
|
+ resize: none;
|
|
|
+ min-height: 60px !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/* 特色工作表格样式优化 */
|
|
|
+:deep(.special-work-table) {
|
|
|
+ .el-table__row {
|
|
|
+ height: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-table__cell {
|
|
|
+ padding: 8px 0;
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-input-number {
|
|
|
+ width: 100% !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-textarea__inner {
|
|
|
+ resize: none;
|
|
|
+ min-height: 60px !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/* 文本省略样式 */
|
|
|
+.text-ellipsis {
|
|
|
+ display: block;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ max-width: 160px;
|
|
|
+}
|
|
|
+
|
|
|
+/* 表单样式优化 */
|
|
|
+:deep(.el-form-item__label) {
|
|
|
+ font-weight: 500;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+
|
|
|
+/* 描述列表居中样式 */
|
|
|
+:deep(.el-descriptions) {
|
|
|
+ .el-descriptions__label {
|
|
|
+ text-align: center;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-descriptions__content {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/* 只读输入框样式 */
|
|
|
+:deep(.el-input.is-disabled .el-input__wrapper) {
|
|
|
+ background-color: #f5f7fa;
|
|
|
+}
|
|
|
+
|
|
|
+/* 审批表单样式 */
|
|
|
+.approval-form :deep(.el-radio-group) {
|
|
|
+ .el-radio {
|
|
|
+ margin-right: 30px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|