Jelajahi Sumber

提交代码

zlwu 1 tahun lalu
induk
melakukan
9e617c3311

+ 1630 - 0
mobile/src/pages/xskh/khsq/form.vue

@@ -0,0 +1,1630 @@
+<template>
+    <view class="full-page">
+        <!-- 顶部导航 -->
+        <u-navbar :title="pageTitle" :border-bottom="false" bg-color="#0051d9" title-color="#fff">
+            <view slot="left" @click="goBack">
+                <u-icon name="arrow-left" color="#fff" size="22"></u-icon>
+            </view>
+        </u-navbar>
+
+        <!-- 页面内容 -->
+        <view class="page-content" v-loading="pageLoading">
+            <!-- 基础信息区域 -->
+            <view class="form-section">
+                <view class="section-title">基础信息</view>
+                <view class="form-content">
+                    <view class="form-item">
+                        <text class="form-label">考核计划名称:</text>
+                        <text class="form-value">{{ form.scheduleName || '暂无' }}</text>
+                    </view>
+                    <view class="form-item">
+                        <text class="form-label">开始时间:</text>
+                        <text class="form-value">{{ form.startTime || '暂无' }}</text>
+                    </view>
+                    <view class="form-item">
+                        <text class="form-label">结束时间:</text>
+                        <text class="form-value">{{ form.endTime || '暂无' }}</text>
+                    </view>
+                    <view class="form-item">
+                        <text class="form-label">学号:</text>
+                        <text class="form-value">{{ form.studentNo || '暂无' }}</text>
+                    </view>
+                    <view class="form-item">
+                        <text class="form-label">学生姓名:</text>
+                        <text class="form-value">{{ form.studentName || '暂无' }}</text>
+                    </view>
+                    <view class="form-item">
+                        <text class="form-label">学院名称:</text>
+                        <text class="form-value">{{ form.collegeName || '暂无' }}</text>
+                    </view>
+                    <view class="form-item">
+                        <text class="form-label">专业名称:</text>
+                        <text class="form-value">{{ form.majorName || '暂无' }}</text>
+                    </view>
+                    <view class="form-item">
+                        <text class="form-label">班级名称:</text>
+                        <text class="form-value">{{ form.className || '暂无' }}</text>
+                    </view>
+                </view>
+            </view>
+
+            <!-- 指标模块 -->
+            <view class="form-section">
+                <view class="section-title">指标模块</view>
+                <view class="form-content">
+                    <view
+                        v-for="(item, index) in form.selfScoreList"
+                        :key="index"
+                        class="indicator-card"
+                    >
+                        <view class="indicator-header">
+                            <view class="indicator-info">
+                                <text class="indicator-name">{{ item.indicatorName }}</text>
+                                <view class="indicator-meta">
+                                    <text class="indicator-code">{{ item.indicatorCode }}</text>
+                                    <view
+                                        class="view-data-btn"
+                                        @click="handleViewIndicatorData(item)"
+                                    >
+                                        <u-icon name="eye" size="16" color="#3c9cff"></u-icon>
+                                        <text class="view-data-text">查看数据</text>
+                                    </view>
+                                </view>
+                            </view>
+                        </view>
+                        <view class="indicator-content">
+                            <view class="indicator-description">
+                                <text class="description-text">
+                                    {{ item.indicatorDescription || '暂无说明' }}
+                                </text>
+                            </view>
+                            <view class="score-info">
+                                <view class="score-item">
+                                    <text class="score-label">最高分值:</text>
+                                    <text class="score-value">{{ item.planMaxScore || 0 }}</text>
+                                </view>
+                                <view class="score-item">
+                                    <text class="score-label">自评得分:</text>
+                                    <view v-if="isViewMode" class="score-display">
+                                        {{ item.selfScore || '-' }}
+                                    </view>
+                                    <u-number-box
+                                        v-else
+                                        v-model="item.selfScore"
+                                        :min="0"
+                                        :max="item.planMaxScore"
+                                        :step="0.1"
+                                        size="small"
+                                        @change="handleSelfScoreChange"
+                                    ></u-number-box>
+                                </view>
+                                <view class="score-item">
+                                    <text class="score-label">班主任评分:</text>
+                                    <text class="score-value">{{ item.teacherScore || '-' }}</text>
+                                </view>
+                            </view>
+                            <view class="remark-section">
+                                <view class="form-item-textarea">
+                                    <text class="form-label">自评备注:</text>
+                                    <view v-if="isViewMode" class="form-textarea-value">
+                                        {{ item.selfRemark || '暂无备注' }}
+                                    </view>
+                                    <u-textarea
+                                        v-else
+                                        v-model="item.selfRemark"
+                                        placeholder="请输入自评备注"
+                                        :maxlength="500"
+                                        count
+                                        height="120"
+                                    ></u-textarea>
+                                </view>
+                                <view class="form-item-textarea" v-if="item.teacherRemark">
+                                    <text class="form-label">班主任备注:</text>
+                                    <view class="form-textarea-value">
+                                        {{ item.teacherRemark || '暂无备注' }}
+                                    </view>
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+
+            <!-- 附加分模块 -->
+            <view class="form-section">
+                <view class="section-title">
+                    <text>附加分模块</text>
+                    <u-button v-if="!isViewMode" type="primary" size="mini" @click="addBonusItem">
+                        添加附加分
+                    </u-button>
+                </view>
+                <view class="form-content">
+                    <view
+                        v-for="(item, index) in form.bonusApprovalList"
+                        :key="index"
+                        class="bonus-card"
+                    >
+                        <view class="bonus-header">
+                            <text class="bonus-title">附加分项目 {{ index + 1 }}</text>
+                            <u-button
+                                v-if="!isViewMode"
+                                type="error"
+                                size="mini"
+                                @click="removeBonusItem(index)"
+                            >
+                                删除
+                            </u-button>
+                        </view>
+                        <view class="bonus-content">
+                            <view class="form-item">
+                                <text class="form-label">项目名称:</text>
+                                <view v-if="isViewMode" class="form-value">
+                                    {{ item.bonusName || '暂无' }}
+                                </view>
+                                <u-input
+                                    v-else
+                                    v-model="item.bonusName"
+                                    placeholder="请输入项目名称"
+                                    @change="calculateTotalScore"
+                                ></u-input>
+                            </view>
+                            <view class="form-item">
+                                <text class="form-label">附加分值:</text>
+                                <view v-if="isViewMode" class="form-value">
+                                    {{ item.bonusScore || '-' }}
+                                </view>
+                                <u-number-box
+                                    v-else
+                                    v-model="item.bonusScore"
+                                    :min="0"
+                                    :step="0.1"
+                                    size="small"
+                                    @change="calculateTotalScore"
+                                ></u-number-box>
+                            </view>
+                            <view class="form-item-textarea">
+                                <text class="form-label">附加分内容:</text>
+                                <view v-if="isViewMode" class="form-textarea-value">
+                                    {{ item.bonusContent || '暂无内容' }}
+                                </view>
+                                <u-textarea
+                                    v-else
+                                    v-model="item.bonusContent"
+                                    placeholder="请输入附加分内容"
+                                    height="120"
+                                ></u-textarea>
+                            </view>
+
+                            <!-- 附件区域 -->
+                            <view class="form-item full-width">
+                                <text class="form-label">附件:</text>
+                                <view class="upload-area">
+                                    <!-- 图片附件展示 -->
+                                    <view
+                                        v-if="getImageFiles(item).length > 0"
+                                        class="image-section"
+                                    >
+                                        <view class="image-title">图片附件</view>
+                                        <view class="image-grid">
+                                            <view
+                                                v-for="image in getImageFiles(item)"
+                                                :key="image.uid"
+                                                class="image-item"
+                                            >
+                                                <!-- 图片容器 -->
+                                                <view class="image-container">
+                                                    <image
+                                                        :src="image.blobUrl || image.url"
+                                                        class="attachment-image"
+                                                        mode="aspectFill"
+                                                    />
+
+                                                    <!-- 状态遮罩 -->
+                                                    <view
+                                                        v-if="image.status === 'uploading'"
+                                                        class="upload-overlay"
+                                                    >
+                                                        <u-loading-icon
+                                                            mode="circle"
+                                                            size="24"
+                                                            color="#fff"
+                                                        />
+                                                        <text class="upload-text">
+                                                            {{ image.progress || 0 }}%
+                                                        </text>
+                                                    </view>
+
+                                                    <view
+                                                        v-if="image.status === 'error'"
+                                                        class="error-overlay"
+                                                    >
+                                                        <u-icon
+                                                            name="close-circle"
+                                                            size="24"
+                                                            color="#fff"
+                                                        />
+                                                        <text class="error-text">上传失败</text>
+                                                    </view>
+
+                                                    <view
+                                                        v-if="image.status === 'success'"
+                                                        class="success-badge"
+                                                    >
+                                                        <u-icon
+                                                            name="checkmark-circle-fill"
+                                                            size="18"
+                                                            color="#52c41a"
+                                                        />
+                                                    </view>
+                                                </view>
+
+                                                <!-- 操作按钮 -->
+                                                <view class="image-actions">
+                                                    <u-button
+                                                        v-if="image.status === 'success'"
+                                                        size="mini"
+                                                        type="primary"
+                                                        plain
+                                                        @click="handleDownload(image)"
+                                                    >
+                                                        下载
+                                                    </u-button>
+                                                    <u-button
+                                                        v-if="image.status === 'error'"
+                                                        size="mini"
+                                                        type="warning"
+                                                        plain
+                                                        @click="retryUpload(image, item)"
+                                                    >
+                                                        重试
+                                                    </u-button>
+                                                    <u-button
+                                                        v-if="!isViewMode"
+                                                        size="mini"
+                                                        type="error"
+                                                        plain
+                                                        @click="handleDelete(image, item)"
+                                                    >
+                                                        删除
+                                                    </u-button>
+                                                </view>
+
+                                                <!-- 文件名 -->
+                                                <view class="image-name">
+                                                    <text>{{ getShortFileName(image.name) }}</text>
+                                                </view>
+                                            </view>
+                                        </view>
+                                    </view>
+
+                                    <!-- 文档附件展示 -->
+                                    <view
+                                        v-if="getNonImageFiles(item).length > 0"
+                                        class="custom-file-list"
+                                    >
+                                        <view class="file-title">文档附件</view>
+                                        <view class="file-grid">
+                                            <view
+                                                v-for="file in getNonImageFiles(item)"
+                                                :key="file.uid"
+                                                class="file-card"
+                                            >
+                                                <!-- 文件图标容器 -->
+                                                <view class="file-icon-container">
+                                                    <u-icon
+                                                        :name="
+                                                            file.status === 'uploading'
+                                                                ? 'loading'
+                                                                : 'folder'
+                                                        "
+                                                        size="50"
+                                                        :color="getFileIconColor(file.status)"
+                                                    />
+                                                </view>
+
+                                                <!-- 操作按钮 -->
+                                                <view class="file-actions">
+                                                    <u-button
+                                                        v-if="file.status === 'success'"
+                                                        size="mini"
+                                                        type="primary"
+                                                        plain
+                                                        @click="handleDownload(file)"
+                                                    >
+                                                        下载
+                                                    </u-button>
+                                                    <u-button
+                                                        v-if="file.status === 'error'"
+                                                        size="mini"
+                                                        type="warning"
+                                                        plain
+                                                        @click="retryUpload(file, item)"
+                                                    >
+                                                        重试
+                                                    </u-button>
+                                                    <u-button
+                                                        v-if="!isViewMode"
+                                                        size="mini"
+                                                        type="error"
+                                                        plain
+                                                        @click="handleDelete(file, item)"
+                                                    >
+                                                        删除
+                                                    </u-button>
+                                                </view>
+
+                                                <!-- 文件名 -->
+                                                <view class="file-name-display">
+                                                    <text>{{ getShortFileName(file.name) }}</text>
+                                                </view>
+                                            </view>
+                                        </view>
+                                    </view>
+
+                                    <!-- 上传按钮 -->
+                                    <view v-if="!isViewMode" class="upload-buttons">
+                                        <u-button type="primary" @click="handleChooseImage(item)">
+                                            选择图片
+                                        </u-button>
+                                        <u-button type="info" @click="handleChooseFile(item)">
+                                            选择文件
+                                        </u-button>
+                                    </view>
+
+                                    <!-- 上传提示 -->
+                                    <view class="upload-tip">
+                                        <text>
+                                            支持图片、视频、PDF、Word文档等格式,单个文件大小不超过10MB,最多上传15个文件。
+                                        </text>
+                                    </view>
+                                </view>
+                            </view>
+
+                            <view class="form-item">
+                                <text class="form-label">审核状态:</text>
+                                <u-tag
+                                    :text="getBonusStatusText(item.status)"
+                                    :type="getBonusStatusTagType(item.status)"
+                                    size="mini"
+                                ></u-tag>
+                            </view>
+                            <view class="form-item">
+                                <text class="form-label">审核得分:</text>
+                                <text class="form-value">{{ item.approvalScore || '-' }}</text>
+                            </view>
+                            <view class="form-item-textarea" v-if="item.approvalRemark">
+                                <text class="form-label">审核备注:</text>
+                                <view class="form-textarea-value">
+                                    {{ item.approvalRemark || '暂无备注' }}
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+
+            <!-- 得分统计 -->
+            <view class="form-section">
+                <view class="section-title">得分统计</view>
+                <view class="form-content">
+                    <view class="score-summary">
+                        <view class="summary-item">
+                            <text class="summary-label">自评总得分:</text>
+                            <text class="summary-value">{{ form.selfScore || '0' }}</text>
+                        </view>
+                        <view class="summary-item">
+                            <text class="summary-label">班主任评分:</text>
+                            <text class="summary-value">{{ form.teacherScore || '-' }}</text>
+                        </view>
+                        <view class="summary-item">
+                            <text class="summary-label">总得分:</text>
+                            <text class="summary-value">{{ form.totalScore || '-' }}</text>
+                        </view>
+                        <view class="summary-item">
+                            <text class="summary-label">申请状态:</text>
+                            <u-tag
+                                :text="getStatusText(form.status)"
+                                :type="getStatusTagType(form.status)"
+                                size="mini"
+                            ></u-tag>
+                        </view>
+                    </view>
+                    <view class="form-item-textarea">
+                        <text class="form-label">自评备注:</text>
+                        <view v-if="isViewMode" class="form-textarea-value">
+                            {{ form.selfRemark || '暂无备注' }}
+                        </view>
+                        <u-textarea
+                            v-else
+                            v-model="form.selfRemark"
+                            placeholder="请输入自评备注"
+                            :maxlength="500"
+                            count
+                            height="160"
+                        ></u-textarea>
+                    </view>
+                    <!-- 当状态为6(已完成)时显示班主任审核备注 -->
+                    <view class="form-item-textarea" v-if="form.status === '6'">
+                        <text class="form-label">班主任审核备注:</text>
+                        <view class="form-textarea-value">
+                            {{ form.teacherApprovalRemark || '暂无审核备注' }}
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </view>
+
+        <!-- 底部操作按钮 -->
+        <view class="bottom-actions" v-if="!isViewMode">
+            <u-button type="primary" @click="handleSave">保存</u-button>
+            <u-button type="success" @click="handleSubmit">提交</u-button>
+            <u-button v-if="form.id" type="error" @click="handleDelete">删除</u-button>
+        </view>
+    </view>
+</template>
+
+<script>
+import { request, smartUploadFile } from '@/common/request.js';
+import { getDictLabel, getDictTagType, getDict } from '@/common/dict.js';
+
+export default {
+    name: 'AssessmentApplicationForm',
+    data() {
+        return {
+            pageLoading: false,
+            pageTitle: '考核申请表单',
+
+            // 表单数据
+            form: {
+                id: undefined,
+                studentId: undefined,
+                studentName: undefined,
+                studentNo: undefined,
+                collegeId: undefined,
+                collegeName: undefined,
+                majorId: undefined,
+                majorName: undefined,
+                classId: undefined,
+                className: undefined,
+                scheduleId: undefined,
+                scheduleName: undefined,
+                startTime: undefined,
+                endTime: undefined,
+                selfScore: 0,
+                teacherScore: 0,
+                totalScore: 0,
+                status: '1',
+                selfRemark: undefined,
+                selfScoreList: [],
+                bonusApprovalList: [],
+                teacherApprovalRemark: undefined,
+                dataStartTime: undefined,
+                dataEndTime: undefined,
+            },
+
+            // 当前考核计划
+            currentSchedule: null,
+
+            // 是否查看模式
+            isViewMode: false,
+
+            // 字典数据
+            assessmentScheduleStatus: [],
+
+            // 参数
+            scheduleId: null,
+            applicationId: null,
+        };
+    },
+    async onLoad(options) {
+        console.log('考核申请表单页面加载', options);
+
+        // 设置页面标题
+        if (options.title) {
+            this.pageTitle = options.title;
+            uni.setNavigationBarTitle({
+                title: options.title,
+            });
+        }
+
+        // 设置查看模式
+        this.isViewMode = options.viewMode === 'true' || options.title === '查看考核申请';
+
+        // 获取参数
+        this.scheduleId = options.scheduleId;
+        this.applicationId = options.id;
+
+        // 加载字典数据
+        await this.loadDictData();
+
+        // 初始化数据
+        await this.initData();
+    },
+    methods: {
+        // 返回上一页
+        goBack() {
+            uni.navigateBack();
+        },
+
+        // 加载字典数据
+        async loadDictData() {
+            try {
+                this.assessmentScheduleStatus = await getDict('assessment_schedule_status');
+            } catch (error) {
+                console.error('加载字典数据失败:', error);
+            }
+        },
+
+        // 初始化数据
+        async initData() {
+            this.pageLoading = true;
+
+            try {
+                // 获取当前用户学生信息
+                await this.getCurrentUserStudentInfo();
+
+                if (this.scheduleId) {
+                    // 获取考核计划信息
+                    await this.loadScheduleInfo();
+                }
+
+                if (this.applicationId) {
+                    // 加载申请详情
+                    await this.loadApplicationDetail();
+                } else if (this.scheduleId) {
+                    // 新增模式,加载指标数据
+                    await this.loadIndicatorsByScheduleId();
+                }
+
+                // 计算总得分
+                this.calculateTotalScore();
+            } catch (error) {
+                console.error('初始化数据失败:', error);
+                uni.showToast({
+                    title: '初始化数据失败',
+                    icon: 'none',
+                });
+            } finally {
+                this.pageLoading = false;
+            }
+        },
+
+        // 获取当前用户学生信息
+        async getCurrentUserStudentInfo() {
+            try {
+                const response = await request({
+                    url: '/studentMsg/studentMsg/personalInfo',
+                    method: 'get',
+                });
+
+                if (response.code === 200 && response.data) {
+                    const studentInfo = response.data;
+                    this.form.studentId = studentInfo.id;
+                    this.form.studentName = studentInfo.name || '';
+                    this.form.studentNo = studentInfo.studentNo || '';
+                    this.form.collegeId = studentInfo.collegeId || undefined;
+                    this.form.collegeName = studentInfo.collegeName || '';
+                    this.form.majorId = studentInfo.majorId || undefined;
+                    this.form.majorName = studentInfo.majorName || '';
+                    this.form.classId = studentInfo.classId || undefined;
+                    this.form.className = studentInfo.className || '';
+                }
+            } catch (error) {
+                console.error('获取学生信息失败:', error);
+            }
+        },
+
+        // 加载考核计划信息
+        async loadScheduleInfo() {
+            try {
+                const response = await request({
+                    url: `/assessment/schedule/${this.scheduleId}`,
+                    method: 'get',
+                });
+                if (response.code === 200 && response.data) {
+                    console.log('loadScheduleInfo', response.data);
+                    const schedule = response.data;
+                    this.currentSchedule = schedule;
+                    this.form.scheduleId = schedule.id;
+                    this.form.scheduleName = schedule.scheduleName;
+                    this.form.startTime = schedule.startTime;
+                    this.form.endTime = schedule.endTime;
+                    this.form.dataStartTime = schedule.dataStartTime;
+                    this.form.dataEndTime = schedule.dataEndTime;
+                }
+            } catch (error) {
+                console.error('获取考核计划信息失败:', error);
+            }
+        },
+
+        // 加载申请详情
+        async loadApplicationDetail() {
+            try {
+                const response = await request({
+                    url: `/assessment/application/${this.applicationId}`,
+                    method: 'get',
+                });
+
+                if (response.code === 200 && response.data) {
+                    // 保存考核计划相关字段,防止被覆盖
+                    const scheduleInfo = {
+                        scheduleId: this.form.scheduleId,
+                        scheduleName: this.form.scheduleName,
+                        startTime: this.form.startTime,
+                        endTime: this.form.endTime,
+                        dataStartTime: this.form.dataStartTime,
+                        dataEndTime: this.form.dataEndTime,
+                    };
+
+                    // 覆盖申请详情数据
+                    Object.assign(this.form, response.data);
+
+                    // 恢复考核计划相关字段(如果之前已经加载过)
+                    if (scheduleInfo.scheduleId) {
+                        Object.assign(this.form, scheduleInfo);
+                    }
+
+                    // 处理selfScoreList字段映射
+                    if (this.form.selfScoreList && this.form.selfScoreList.length > 0) {
+                        this.form.selfScoreList = this.form.selfScoreList.map((item) => ({
+                            ...item,
+                            indicatorDescription: item.description || item.indicatorDescription,
+                            planMaxScore: item.maxScore || item.planMaxScore,
+                        }));
+                    }
+
+                    // 处理附加分项目的附件数据
+                    if (this.form.bonusApprovalList && this.form.bonusApprovalList.length > 0) {
+                        for (const item of this.form.bonusApprovalList) {
+                            if (item.evidenceFile) {
+                                await this.handleAttachmentDataForItem(item);
+                            }
+                        }
+                    }
+                }
+            } catch (error) {
+                console.error('获取申请详情失败:', error);
+            }
+        },
+
+        // 根据考核计划ID获取关联的指标数据
+        async loadIndicatorsByScheduleId() {
+            try {
+                const response = await request({
+                    url: `/assessment/application/indicators/${this.scheduleId}`,
+                    method: 'get',
+                });
+
+                if (response.code === 200 && response.data) {
+                    this.form.selfScoreList = response.data.map((item) => ({
+                        id: undefined,
+                        applicationId: undefined,
+                        indicatorId: item.indicatorId,
+                        indicatorName: item.indicatorName,
+                        indicatorCode: item.indicatorCode,
+                        indicatorDescription: item.description,
+                        indicatorType: item.indicatorType || '1',
+                        maxScore: item.maxScore,
+                        planMaxScore: item.maxScore,
+                        sortOrder: item.sortOrder,
+                        selfScore: 0,
+                        selfRemark: '',
+                        teacherScore: 0,
+                        teacherRemark: '',
+                    }));
+                }
+            } catch (error) {
+                console.error('获取指标数据失败:', error);
+            }
+        },
+
+        // 处理附加分项目的附件数据
+        async handleAttachmentDataForItem(item) {
+            try {
+                if (!item.evidenceFile || !item.evidenceFile.toString().trim()) {
+                    item.fileList = [];
+                    return;
+                }
+
+                const ossIdsArray = item.evidenceFile
+                    .toString()
+                    .split(',')
+                    .map((id) => id.trim())
+                    .filter((id) => id);
+
+                if (ossIdsArray.length === 0) {
+                    item.fileList = [];
+                    return;
+                }
+
+                const response = await request({
+                    url: `/resource/oss/listByIds/${ossIdsArray.join(',')}`,
+                    method: 'get',
+                });
+
+                if (response.code === 200 && response.data) {
+                    const attachmentFiles = response.data.map((ossFile, index) => ({
+                        uid: `existing_${index}_${Date.now()}`,
+                        name: ossFile.originalName || `附件${index + 1}`,
+                        url: ossFile.url,
+                        ossId: ossFile.ossId,
+                        status: 'success',
+                        response: {
+                            code: 200,
+                            data: {
+                                url: ossFile.url,
+                                ossId: ossFile.ossId,
+                            },
+                        },
+                    }));
+
+                    item.fileList = attachmentFiles;
+                } else {
+                    item.fileList = [];
+                }
+            } catch (error) {
+                console.error('处理附加分项目附件数据失败:', error);
+                item.fileList = [];
+            }
+        },
+
+        // 查看指标数据
+        handleViewIndicatorData(row) {
+            uni.navigateTo({
+                url: `/pages/xskh/khsq/indicatorDataDialog?indicatorId=${
+                    row.indicatorId
+                }&indicatorName=${encodeURIComponent(row.indicatorName)}&studentId=${
+                    this.form.studentId
+                }&scheduleId=${this.form.scheduleId}&dataStartTime=${
+                    this.form.dataStartTime
+                }&dataEndTime=${this.form.dataEndTime}`,
+            });
+        },
+
+        // 自评得分变化
+        handleSelfScoreChange() {
+            this.calculateTotalScore();
+        },
+
+        // 计算总得分
+        calculateTotalScore() {
+            let selfScore = 0;
+
+            // 计算指标得分
+            if (this.form.selfScoreList && this.form.selfScoreList.length > 0) {
+                selfScore += this.form.selfScoreList.reduce((sum, item) => {
+                    const score = parseFloat(String(item.selfScore || 0)) || 0;
+                    return sum + score;
+                }, 0);
+            }
+
+            // 计算附加分
+            if (this.form.bonusApprovalList && this.form.bonusApprovalList.length > 0) {
+                selfScore += this.form.bonusApprovalList.reduce((sum, item) => {
+                    const score = parseFloat(String(item.bonusScore || 0)) || 0;
+                    return sum + score;
+                }, 0);
+            }
+
+            this.form.selfScore = parseFloat(selfScore.toFixed(1));
+
+            // 计算班主任评分
+            let teacherScore = 0;
+            if (this.form.selfScoreList && this.form.selfScoreList.length > 0) {
+                teacherScore += this.form.selfScoreList.reduce((sum, item) => {
+                    const score = parseFloat(String(item.teacherScore || 0)) || 0;
+                    return sum + score;
+                }, 0);
+            }
+
+            if (this.form.bonusApprovalList && this.form.bonusApprovalList.length > 0) {
+                teacherScore += this.form.bonusApprovalList.reduce((sum, item) => {
+                    const score = parseFloat(String(item.approvalScore || 0)) || 0;
+                    return sum + score;
+                }, 0);
+            }
+
+            this.form.teacherScore = parseFloat(teacherScore.toFixed(1));
+            this.form.totalScore = parseFloat(teacherScore.toFixed(1));
+        },
+
+        // 添加附加分项目
+        addBonusItem() {
+            const newItem = {
+                id: undefined,
+                applicationId: undefined,
+                bonusName: '',
+                bonusContent: '',
+                bonusScore: 0,
+                evidenceFile: '',
+                status: '1',
+                approvalScore: 0,
+                approvalBy: undefined,
+                approvalTime: undefined,
+                approvalRemark: '',
+                fileList: [],
+            };
+            this.form.bonusApprovalList.push(newItem);
+        },
+
+        // 删除附加分项目
+        removeBonusItem(index) {
+            this.form.bonusApprovalList.splice(index, 1);
+            this.calculateTotalScore();
+        },
+
+        // 选择图片
+        handleChooseImage(item) {
+            const maxCount = 15 - this.getTotalFileCount(item);
+            if (maxCount <= 0) {
+                uni.showToast({
+                    title: '最多上传15个文件',
+                    icon: 'none',
+                });
+                return;
+            }
+
+            uni.chooseImage({
+                count: maxCount,
+                sourceType: ['album', 'camera'],
+                success: (res) => {
+                    this.uploadFiles(res.tempFilePaths, 'image', item);
+                },
+                fail: (error) => {
+                    uni.showToast({ title: '选择图片失败', icon: 'none' });
+                },
+            });
+        },
+
+        // 选择文件 (H5端)
+        handleChooseFile(item) {
+            // #ifdef H5
+            const input = document.createElement('input');
+            input.type = 'file';
+            input.multiple = true;
+            input.accept = '.pdf,.doc,.docx,.txt,.mp4,.avi,.mov';
+            input.onchange = (event) => {
+                const files = Array.from(event.target.files);
+                this.uploadFiles(files, 'file', item);
+            };
+            input.click();
+            // #endif
+        },
+
+        // 上传文件
+        async uploadFiles(files, type, item) {
+            if (!item.fileList) {
+                item.fileList = [];
+            }
+
+            for (let i = 0; i < files.length; i++) {
+                const file = files[i];
+                const fileObj = {
+                    uid: `file_${Date.now()}_${i}`,
+                    name: file.name || `文件${i + 1}`,
+                    status: 'uploading',
+                    progress: 0,
+                };
+
+                item.fileList.push(fileObj);
+
+                try {
+                    const formData = { bizType: 'assessment_bonus_attachment' };
+                    const result = await smartUploadFile('/resource/oss/upload', file, formData);
+
+                    if (result.code === 200) {
+                        fileObj.status = 'success';
+                        fileObj.url = result.data.url;
+                        fileObj.ossId = result.data.ossId;
+                    } else {
+                        fileObj.status = 'error';
+                        uni.showToast({ title: result.msg || '上传失败', icon: 'none' });
+                    }
+                } catch (error) {
+                    fileObj.status = 'error';
+                    uni.showToast({ title: '上传失败', icon: 'none' });
+                }
+            }
+        },
+
+        // 重试上传
+        async retryUpload(file, item) {
+            file.status = 'uploading';
+            file.progress = 0;
+
+            try {
+                const formData = { bizType: 'assessment_bonus_attachment' };
+                const result = await smartUploadFile('/resource/oss/upload', file.raw, formData);
+
+                if (result.code === 200) {
+                    file.status = 'success';
+                    file.url = result.data.url;
+                    file.ossId = result.data.ossId;
+                } else {
+                    file.status = 'error';
+                    uni.showToast({ title: result.msg || '上传失败', icon: 'none' });
+                }
+            } catch (error) {
+                file.status = 'error';
+                uni.showToast({ title: '上传失败', icon: 'none' });
+            }
+        },
+
+        // 下载附件
+        async handleDownload(file) {
+            let downloadUrl = file.ossId || file.url;
+
+            if (!downloadUrl) {
+                uni.showToast({ title: '无法获取文件下载地址', icon: 'none' });
+                return;
+            }
+
+            try {
+                uni.showLoading({ title: '正在下载文件...', mask: true });
+
+                await request({
+                    url: `/resource/oss/download/${downloadUrl}`,
+                    method: 'GET',
+                    responseType: 'arraybuffer',
+                });
+
+                uni.hideLoading();
+                uni.showToast({ title: '下载成功', icon: 'success' });
+            } catch (error) {
+                uni.hideLoading();
+                uni.showToast({ title: '下载失败,请稍后重试', icon: 'none' });
+            }
+        },
+
+        // 删除附件
+        handleDelete(file, item) {
+            const index = item.fileList.findIndex((f) => f.uid === file.uid);
+            if (index > -1) {
+                item.fileList.splice(index, 1);
+                uni.showToast({ title: '文件删除成功', icon: 'success' });
+            }
+        },
+
+        // 获取图片文件列表
+        getImageFiles(item) {
+            if (!item.fileList) return [];
+            return item.fileList.filter((file) => this.isImageFile(file));
+        },
+
+        // 获取非图片文件列表
+        getNonImageFiles(item) {
+            if (!item.fileList) return [];
+            return item.fileList.filter((file) => !this.isImageFile(file));
+        },
+
+        // 判断是否为图片文件
+        isImageFile(file) {
+            const imageTypes = ['image/jpeg', 'image/png', 'image/gif', 'image/bmp', 'image/webp'];
+            return (
+                imageTypes.includes(file.raw?.type) ||
+                (file.url && /\.(jpg|jpeg|png|gif|bmp|webp)$/i.test(file.name))
+            );
+        },
+
+        // 获取文件图标颜色
+        getFileIconColor(status) {
+            const colorMap = {
+                uploading: '#909399',
+                success: '#19be6b',
+                error: '#fa3534',
+            };
+            return colorMap[status] || '#909399';
+        },
+
+        // 获取总文件数量
+        getTotalFileCount(item) {
+            return item.fileList ? item.fileList.length : 0;
+        },
+
+        // 文件名截断显示
+        getShortFileName(fileName) {
+            if (!fileName) return '';
+
+            const lastDotIndex = fileName.lastIndexOf('.');
+            if (lastDotIndex === -1) {
+                return fileName.length > 12 ? fileName.substring(0, 12) + '...' : fileName;
+            }
+
+            const name = fileName.substring(0, lastDotIndex);
+            const ext = fileName.substring(lastDotIndex);
+
+            if (name.length <= 8) {
+                return fileName;
+            }
+
+            return name.substring(0, 8) + '...' + ext;
+        },
+
+        // 保存申请
+        async handleSave() {
+            try {
+                uni.showLoading({ title: '保存中...', mask: true });
+
+                // 处理附件数据
+                this.processAttachmentData();
+
+                const requestData = this.prepareRequestData();
+
+                if (this.form.id) {
+                    await request({
+                        url: '/assessment/application',
+                        method: 'PUT',
+                        data: requestData,
+                    });
+                    uni.showToast({ title: '修改成功', icon: 'success' });
+                } else {
+                    await request({
+                        url: '/assessment/application/save',
+                        method: 'POST',
+                        data: requestData,
+                    });
+                    uni.showToast({ title: '保存成功', icon: 'success' });
+                }
+
+                setTimeout(() => {
+                    uni.navigateBack();
+                }, 1500);
+            } catch (error) {
+                console.error('保存失败:', error);
+                uni.showToast({ title: '保存失败', icon: 'none' });
+            } finally {
+                uni.hideLoading();
+            }
+        },
+
+        // 提交申请
+        async handleSubmit() {
+            try {
+                uni.showLoading({ title: '提交中...', mask: true });
+
+                // 处理附件数据
+                this.processAttachmentData();
+
+                const requestData = this.prepareRequestData();
+
+                if (this.form.id) {
+                    await request({
+                        url: `/assessment/application/submit/${this.form.id}`,
+                        method: 'PUT',
+                    });
+                    uni.showToast({ title: '提交成功', icon: 'success' });
+                } else {
+                    const saveResult = await request({
+                        url: '/assessment/application',
+                        method: 'POST',
+                        data: requestData,
+                    });
+
+                    if (saveResult.code === 200 && saveResult.data) {
+                        await request({
+                            url: `/assessment/application/submit/${saveResult.data}`,
+                            method: 'PUT',
+                        });
+                        uni.showToast({ title: '提交成功', icon: 'success' });
+                    }
+                }
+
+                setTimeout(() => {
+                    uni.navigateBack();
+                }, 1500);
+            } catch (error) {
+                console.error('提交失败:', error);
+                uni.showToast({ title: '提交失败', icon: 'none' });
+            } finally {
+                uni.hideLoading();
+            }
+        },
+
+        // 删除申请
+        async handleDelete() {
+            if (!this.form.id) return;
+
+            try {
+                await uni.showModal({
+                    title: '确认删除',
+                    content: '是否确认删除该考核申请?',
+                });
+
+                await request({
+                    url: `/assessment/application/delete/${this.form.id}`,
+                    method: 'DELETE',
+                });
+
+                uni.showToast({ title: '删除成功', icon: 'success' });
+
+                setTimeout(() => {
+                    uni.navigateBack();
+                }, 1500);
+            } catch (error) {
+                if (error !== 'cancel') {
+                    console.error('删除失败:', error);
+                    uni.showToast({ title: '删除失败', icon: 'none' });
+                }
+            }
+        },
+
+        // 处理附件数据
+        processAttachmentData() {
+            if (this.form.bonusApprovalList && this.form.bonusApprovalList.length > 0) {
+                for (const item of this.form.bonusApprovalList) {
+                    if (item.fileList && item.fileList.length > 0) {
+                        const ossIds = item.fileList
+                            .filter((file) => file.ossId)
+                            .map((file) => file.ossId)
+                            .join(',');
+                        item.evidenceFile = ossIds;
+                    }
+                }
+            }
+        },
+
+        // 准备请求数据
+        prepareRequestData() {
+            return {
+                ...this.form,
+                id: this.safeConvertId(this.form.id),
+                studentId: this.safeConvertId(this.form.studentId),
+                collegeId: this.safeConvertId(this.form.collegeId),
+                majorId: this.safeConvertId(this.form.majorId),
+                classId: this.safeConvertId(this.form.classId),
+                scheduleId: this.safeConvertId(this.form.scheduleId),
+            };
+        },
+
+        // 安全转换ID字段
+        safeConvertId(id) {
+            if (id === undefined || id === null) return undefined;
+            return String(id);
+        },
+
+        // 获取附加分状态文本
+        getBonusStatusText(status) {
+            const statusMap = {
+                1: '待审核',
+                2: '审核通过',
+                3: '审核拒绝',
+            };
+            return statusMap[status] || '待审核';
+        },
+
+        // 获取附加分状态标签类型
+        getBonusStatusTagType(status) {
+            const typeMap = {
+                1: 'warning',
+                2: 'success',
+                3: 'error',
+            };
+            return typeMap[status] || 'warning';
+        },
+
+        // 获取申请状态文本
+        getStatusText(status) {
+            const statusMap = {
+                1: '草稿',
+                2: '已提交',
+                3: '班主任审核',
+                6: '已完成',
+            };
+            return statusMap[status] || '未知状态';
+        },
+
+        // 获取申请状态标签类型
+        getStatusTagType(status) {
+            const typeMap = {
+                1: 'info',
+                2: 'primary',
+                3: 'warning',
+                6: 'success',
+            };
+            return typeMap[status] || 'info';
+        },
+    },
+};
+</script>
+
+<style lang="scss" scoped>
+// 参考移动端违纪记录模块开发规范的样式系统
+$primary-color: #3c9cff;
+$success-color: #19be6b;
+$warning-color: #ff9900;
+$error-color: #fa3534;
+$info-color: #909399;
+
+$text-primary: #303133;
+$text-secondary: #606266;
+$text-placeholder: #909399;
+$border-color: #f0f0f0;
+$background-color: #f8f9fa;
+
+$spacing-xs: 8rpx;
+$spacing-sm: 12rpx;
+$spacing-md: 16rpx;
+$spacing-lg: 20rpx;
+$spacing-xl: 24rpx;
+
+$radius-sm: 8rpx;
+$radius-md: 12rpx;
+$radius-lg: 16rpx;
+
+.full-page {
+    min-height: 100vh;
+    background-color: #f5f6fa;
+    padding-bottom: 120rpx;
+}
+
+.page-content {
+    padding: $spacing-lg;
+}
+
+.form-section {
+    margin-bottom: 32rpx;
+
+    &:last-child {
+        margin-bottom: 0;
+    }
+}
+
+.section-title {
+    font-size: 30rpx;
+    font-weight: bold;
+    color: $text-primary;
+    margin-bottom: $spacing-lg;
+    padding-bottom: 10rpx;
+    border-bottom: 2rpx solid $border-color;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.form-content {
+    display: flex;
+    flex-direction: column;
+    gap: $spacing-md;
+}
+
+.form-item {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: $spacing-sm 0;
+
+    &.full-width {
+        flex-direction: column;
+        align-items: flex-start;
+    }
+}
+
+.form-label {
+    font-size: 28rpx;
+    color: $text-secondary;
+    min-width: 140rpx;
+    margin-right: $spacing-md;
+    flex-shrink: 0;
+}
+
+.form-value {
+    font-size: 28rpx;
+    color: $text-primary;
+    text-align: right;
+    word-break: break-all;
+    max-width: 60%;
+}
+
+.form-item-textarea {
+    display: flex;
+    flex-direction: column;
+    gap: $spacing-sm;
+}
+
+.form-textarea-value {
+    font-size: 28rpx;
+    color: $text-primary;
+    line-height: 1.6;
+    padding: $spacing-md;
+    background-color: $background-color;
+    border-radius: $radius-sm;
+    white-space: pre-wrap;
+    word-break: break-word;
+    min-height: 80rpx;
+}
+
+.indicator-card {
+    background-color: #fff;
+    border-radius: $radius-lg;
+    padding: $spacing-xl;
+    box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
+    margin-bottom: $spacing-lg;
+}
+
+.indicator-header {
+    margin-bottom: $spacing-lg;
+}
+
+.indicator-info {
+    display: flex;
+    flex-direction: column;
+    gap: $spacing-sm;
+}
+
+.indicator-name {
+    font-size: 30rpx;
+    font-weight: bold;
+    color: $text-primary;
+}
+
+.indicator-meta {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.indicator-code {
+    font-size: 24rpx;
+    color: $text-placeholder;
+}
+
+.view-data-btn {
+    display: flex;
+    align-items: center;
+    gap: 4rpx;
+    padding: 4rpx 8rpx;
+    background-color: #f0f8ff;
+    border-radius: $radius-sm;
+}
+
+.view-data-text {
+    font-size: 22rpx;
+    color: $primary-color;
+}
+
+.indicator-content {
+    display: flex;
+    flex-direction: column;
+    gap: $spacing-md;
+}
+
+.indicator-description {
+    padding: $spacing-sm;
+    background-color: $background-color;
+    border-radius: $radius-sm;
+}
+
+.description-text {
+    font-size: 26rpx;
+    color: $text-secondary;
+    line-height: 1.5;
+}
+
+.score-info {
+    display: flex;
+    flex-direction: column;
+    gap: $spacing-sm;
+}
+
+.score-item {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: $spacing-sm 0;
+}
+
+.score-label {
+    font-size: 26rpx;
+    color: $text-secondary;
+    min-width: 120rpx;
+}
+
+.score-value {
+    font-size: 26rpx;
+    color: $text-primary;
+    font-weight: 500;
+}
+
+.score-display {
+    font-size: 26rpx;
+    color: $text-primary;
+    font-weight: 500;
+    text-align: right;
+}
+
+.remark-section {
+    margin-top: $spacing-md;
+}
+
+.bonus-card {
+    background-color: #fff;
+    border-radius: $radius-lg;
+    padding: $spacing-xl;
+    box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
+    margin-bottom: $spacing-lg;
+    border: 2rpx solid #ebeef5;
+}
+
+.bonus-header {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-bottom: $spacing-lg;
+}
+
+.bonus-title {
+    font-size: 28rpx;
+    font-weight: bold;
+    color: $text-primary;
+}
+
+.bonus-content {
+    display: flex;
+    flex-direction: column;
+    gap: $spacing-md;
+}
+
+// 附件样式
+.upload-area {
+    margin-top: $spacing-sm;
+    width: 100%;
+}
+
+.image-section,
+.custom-file-list {
+    margin-bottom: $spacing-lg;
+}
+
+.image-title,
+.file-title {
+    font-size: 28rpx;
+    color: $text-secondary;
+    font-weight: 500;
+    margin-bottom: $spacing-sm;
+}
+
+.image-grid,
+.file-grid {
+    display: grid;
+    grid-template-columns: repeat(3, 1fr);
+    gap: $spacing-md;
+}
+
+.image-item,
+.file-card {
+    background-color: $background-color;
+    border-radius: $radius-md;
+    padding: $spacing-md;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    gap: $spacing-xs;
+    border: 1px solid $border-color;
+}
+
+.image-container,
+.file-icon-container {
+    position: relative;
+    width: 120rpx;
+    height: 120rpx;
+    background-color: #fff;
+    border-radius: $radius-sm;
+    border: 1px solid $border-color;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    overflow: hidden;
+}
+
+.attachment-image {
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+}
+
+.upload-overlay,
+.error-overlay {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    background-color: rgba(0, 0, 0, 0.6);
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    color: #fff;
+}
+
+.upload-text,
+.error-text {
+    font-size: 20rpx;
+    margin-top: $spacing-xs;
+}
+
+.success-badge {
+    position: absolute;
+    top: $spacing-xs;
+    right: $spacing-xs;
+    background-color: #fff;
+    border-radius: 50%;
+    padding: 4rpx;
+}
+
+.image-actions,
+.file-actions {
+    display: flex;
+    gap: $spacing-xs;
+    flex-wrap: wrap;
+    justify-content: center;
+}
+
+.image-name,
+.file-name-display {
+    font-size: 24rpx;
+    color: $text-secondary;
+    text-align: center;
+    word-break: break-all;
+    line-height: 1.2;
+    max-width: 100%;
+}
+
+.upload-buttons {
+    display: flex;
+    gap: $spacing-md;
+    margin-bottom: $spacing-md;
+}
+
+.upload-tip {
+    font-size: 24rpx;
+    color: $text-placeholder;
+    line-height: 1.4;
+    background-color: $background-color;
+    padding: $spacing-sm;
+    border-radius: $radius-sm;
+    border: 1px solid $border-color;
+}
+
+.score-summary {
+    display: flex;
+    flex-direction: column;
+    gap: $spacing-md;
+    margin-bottom: $spacing-lg;
+}
+
+.summary-item {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: $spacing-md;
+    background-color: #fff;
+    border-radius: $radius-md;
+    box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
+}
+
+.summary-label {
+    font-size: 28rpx;
+    color: $text-secondary;
+    font-weight: 500;
+}
+
+.summary-value {
+    font-size: 30rpx;
+    color: $text-primary;
+    font-weight: bold;
+}
+
+.bottom-actions {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    background-color: #fff;
+    padding: $spacing-lg;
+    box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.1);
+    display: flex;
+    gap: $spacing-md;
+    z-index: 100;
+}
+</style>

+ 434 - 0
mobile/src/pages/xskh/khsq/indicatorDataDialog.vue

@@ -0,0 +1,434 @@
+<template>
+    <view class="full-page">
+        <!-- 顶部导航 -->
+        <u-navbar :title="pageTitle" :border-bottom="false" bg-color="#0051d9" title-color="#fff">
+            <view slot="left" @click="goBack">
+                <u-icon name="arrow-left" color="#fff" size="22"></u-icon>
+            </view>
+        </u-navbar>
+
+        <!-- 页面内容 -->
+        <view class="page-content" v-loading="loading">
+            <!-- 违纪处分记录区域 -->
+            <view class="record-section">
+                <view class="section-header">
+                    <text class="section-title">违纪处分记录</text>
+                    <u-tag type="error" size="mini">{{ disciplineRecords.length }} 条记录</u-tag>
+                </view>
+
+                <view v-if="disciplineRecords.length > 0" class="record-list">
+                    <view
+                        v-for="(item, index) in disciplineRecords"
+                        :key="index"
+                        class="record-card"
+                    >
+                        <view class="record-header">
+                            <text class="record-type">{{ item.disciplineTypeName }}</text>
+                            <view class="record-score">
+                                <u-tag type="error" size="mini">
+                                    -{{ item.scoreDeduction || 0 }}
+                                </u-tag>
+                            </view>
+                        </view>
+                        <view class="record-content">
+                            <view class="record-item">
+                                <text class="record-label">违纪日期:</text>
+                                <text class="record-value">
+                                    {{ formatDate(item.disciplineDate) }}
+                                </text>
+                            </view>
+                            <view class="record-item">
+                                <text class="record-label">违纪原因:</text>
+                                <text class="record-value">
+                                    {{ item.disciplineReason || '暂无' }}
+                                </text>
+                            </view>
+                            <view class="record-item-full">
+                                <text class="record-label">违纪内容:</text>
+                                <view class="record-content-text">
+                                    {{ item.disciplineContent || '暂无' }}
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+
+                <view v-else class="empty-container">
+                    <u-empty text="暂无违纪处分记录" mode="data"></u-empty>
+                </view>
+            </view>
+
+            <!-- 奖励记录区域 -->
+            <view class="record-section">
+                <view class="section-header">
+                    <text class="section-title">奖励记录</text>
+                    <u-tag type="success" size="mini">{{ rewardRecords.length }} 条记录</u-tag>
+                </view>
+
+                <view v-if="rewardRecords.length > 0" class="record-list">
+                    <view v-for="(item, index) in rewardRecords" :key="index" class="record-card">
+                        <view class="record-header">
+                            <text class="record-type">{{ item.rewardTypeName }}</text>
+                            <view class="record-score">
+                                <u-tag type="success" size="mini">
+                                    +{{ item.scoreAddition || 0 }}
+                                </u-tag>
+                            </view>
+                        </view>
+                        <view class="record-content">
+                            <view class="record-item">
+                                <text class="record-label">奖励日期:</text>
+                                <text class="record-value">{{ formatDate(item.rewardDate) }}</text>
+                            </view>
+                            <view class="record-item-full">
+                                <text class="record-label">奖励内容:</text>
+                                <view class="record-content-text">
+                                    {{ item.rewardContent || '暂无' }}
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+
+                <view v-else class="empty-container">
+                    <u-empty text="暂无奖励记录" mode="data"></u-empty>
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+import { request } from '@/common/request.js';
+
+export default {
+    name: 'IndicatorDataDialog',
+    data() {
+        return {
+            loading: false,
+            pageTitle: '学生数据详情',
+
+            // 页面参数
+            indicatorId: null,
+            indicatorName: '',
+            studentId: null,
+            scheduleId: null,
+            dataStartTime: '',
+            dataEndTime: '',
+
+            // 数据列表
+            disciplineRecords: [],
+            rewardRecords: [],
+        };
+    },
+    async onLoad(options) {
+        console.log('学生数据详情页面加载', options);
+
+        // 获取参数
+        this.indicatorId = options.indicatorId;
+        this.indicatorName = decodeURIComponent(options.indicatorName || '');
+        this.studentId = options.studentId;
+        this.scheduleId = options.scheduleId;
+        this.dataStartTime = options.dataStartTime;
+        this.dataEndTime = options.dataEndTime;
+
+        // 设置页面标题
+        this.pageTitle = `${this.indicatorName} - 学生数据详情`;
+        uni.setNavigationBarTitle({
+            title: this.pageTitle,
+        });
+
+        // 加载数据
+        await this.loadData();
+    },
+    methods: {
+        // 返回上一页
+        goBack() {
+            uni.navigateBack();
+        },
+
+        // 加载数据
+        async loadData() {
+            if (!this.indicatorId) {
+                console.log('无indicatorId,跳过数据加载');
+                return;
+            }
+
+            this.loading = true;
+            try {
+                console.log('开始加载指标数据,indicatorId:', this.indicatorId);
+
+                // 获取指标关联的违纪处分类型和奖励类型
+                const indicatorTypesResponse = await request({
+                    url: `/disciplineRecord/disciplineRecord/getIndicatorTypes/${this.indicatorId}`,
+                    method: 'get',
+                });
+
+                if (indicatorTypesResponse.code === 200 && indicatorTypesResponse.data) {
+                    // 修复字段名映射:后端返回下划线格式,前端使用驼峰格式
+                    const disciplineTypeIds =
+                        indicatorTypesResponse.data.discipline_type_ids ||
+                        indicatorTypesResponse.data.disciplineTypeIds;
+                    const rewardTypeIds =
+                        indicatorTypesResponse.data.reward_type_ids ||
+                        indicatorTypesResponse.data.rewardTypeIds;
+
+                    // 并行加载违纪处分记录和奖励记录
+                    await Promise.all([
+                        this.loadDisciplineRecords(disciplineTypeIds),
+                        this.loadRewardRecords(rewardTypeIds),
+                    ]);
+                } else {
+                    uni.showToast({
+                        title: '获取指标类型信息失败',
+                        icon: 'none',
+                    });
+                }
+            } catch (error) {
+                console.error('加载数据失败:', error);
+                uni.showToast({
+                    title: '加载数据失败,请稍后重试',
+                    icon: 'none',
+                });
+            } finally {
+                this.loading = false;
+            }
+        },
+
+        // 加载违纪处分记录
+        async loadDisciplineRecords(disciplineTypeIds) {
+            if (!disciplineTypeIds) {
+                this.disciplineRecords = [];
+                return;
+            }
+
+            console.log('加载违纪处分记录,disciplineTypeIds:', disciplineTypeIds);
+            console.log('加载违纪处分记录,dataStartTime:', this.dataStartTime);
+            console.log('加载违纪处分记录,dataEndTime:', this.dataEndTime);
+            console.log('加载违纪处分记录,studentId:', this.studentId);
+
+            try {
+                const response = await request({
+                    url: '/disciplineRecord/disciplineRecord/getStudentDisciplineRecords',
+                    method: 'get',
+                    params: {
+                        studentId: this.studentId,
+                        disciplineTypeIds: disciplineTypeIds,
+                        startTime: this.dataStartTime,
+                        endTime: this.dataEndTime,
+                        status: 1, // 只查询状态为1的记录
+                    },
+                });
+
+                if (response.code === 200) {
+                    this.disciplineRecords = response.data || [];
+                } else {
+                    uni.showToast({
+                        title: '获取违纪处分记录失败',
+                        icon: 'none',
+                    });
+                    this.disciplineRecords = [];
+                }
+            } catch (error) {
+                console.error('获取违纪处分记录失败:', error);
+                this.disciplineRecords = [];
+            }
+        },
+
+        // 加载奖励记录
+        async loadRewardRecords(rewardTypeIds) {
+            if (!rewardTypeIds) {
+                this.rewardRecords = [];
+                return;
+            }
+
+            try {
+                const response = await request({
+                    url: '/rewardRecord/rewardRecord/getStudentRewardRecords',
+                    method: 'get',
+                    params: {
+                        studentId: this.studentId,
+                        rewardTypeIds: rewardTypeIds,
+                        startTime: this.dataStartTime,
+                        endTime: this.dataEndTime,
+                        status: 1, // 只查询状态为1的记录
+                    },
+                });
+
+                if (response.code === 200) {
+                    this.rewardRecords = response.data || [];
+                } else {
+                    uni.showToast({
+                        title: '获取奖励记录失败',
+                        icon: 'none',
+                    });
+                    this.rewardRecords = [];
+                }
+            } catch (error) {
+                console.error('获取奖励记录失败:', error);
+                this.rewardRecords = [];
+            }
+        },
+
+        // 格式化日期
+        formatDate(dateStr) {
+            if (!dateStr) return '-';
+
+            try {
+                const date = new Date(dateStr);
+                if (isNaN(date.getTime())) return dateStr;
+
+                const year = date.getFullYear();
+                const month = String(date.getMonth() + 1).padStart(2, '0');
+                const day = String(date.getDate()).padStart(2, '0');
+
+                return `${year}-${month}-${day}`;
+            } catch (error) {
+                console.error('日期格式化失败:', error);
+                return dateStr;
+            }
+        },
+    },
+};
+</script>
+
+<style lang="scss" scoped>
+// 参考移动端违纪记录模块开发规范的样式系统
+$primary-color: #3c9cff;
+$success-color: #19be6b;
+$warning-color: #ff9900;
+$error-color: #fa3534;
+$info-color: #909399;
+
+$text-primary: #303133;
+$text-secondary: #606266;
+$text-placeholder: #909399;
+$border-color: #f0f0f0;
+$background-color: #f8f9fa;
+
+$spacing-xs: 8rpx;
+$spacing-sm: 12rpx;
+$spacing-md: 16rpx;
+$spacing-lg: 20rpx;
+$spacing-xl: 24rpx;
+
+$radius-sm: 8rpx;
+$radius-md: 12rpx;
+$radius-lg: 16rpx;
+
+.full-page {
+    min-height: 100vh;
+    background-color: #f5f6fa;
+}
+
+.page-content {
+    padding: $spacing-lg;
+}
+
+.record-section {
+    margin-bottom: 32rpx;
+
+    &:last-child {
+        margin-bottom: 0;
+    }
+}
+
+.section-header {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-bottom: $spacing-lg;
+    padding-bottom: 10rpx;
+    border-bottom: 2rpx solid $border-color;
+}
+
+.section-title {
+    font-size: 30rpx;
+    font-weight: bold;
+    color: $text-primary;
+}
+
+.record-list {
+    display: flex;
+    flex-direction: column;
+    gap: $spacing-md;
+}
+
+.record-card {
+    background-color: #fff;
+    border-radius: $radius-lg;
+    padding: $spacing-xl;
+    box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
+    border-left: 4rpx solid $primary-color;
+}
+
+.record-header {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-bottom: $spacing-md;
+}
+
+.record-type {
+    font-size: 28rpx;
+    font-weight: bold;
+    color: $text-primary;
+}
+
+.record-score {
+    display: flex;
+    align-items: center;
+}
+
+.record-content {
+    display: flex;
+    flex-direction: column;
+    gap: $spacing-sm;
+}
+
+.record-item {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: $spacing-xs 0;
+}
+
+.record-item-full {
+    display: flex;
+    flex-direction: column;
+    gap: $spacing-xs;
+    padding: $spacing-sm 0;
+}
+
+.record-label {
+    font-size: 26rpx;
+    color: $text-secondary;
+    min-width: 120rpx;
+    flex-shrink: 0;
+}
+
+.record-value {
+    font-size: 26rpx;
+    color: $text-primary;
+    text-align: right;
+    word-break: break-all;
+}
+
+.record-content-text {
+    font-size: 26rpx;
+    color: $text-primary;
+    line-height: 1.5;
+    padding: $spacing-sm;
+    background-color: $background-color;
+    border-radius: $radius-sm;
+    word-break: break-word;
+    white-space: pre-wrap;
+}
+
+.empty-container {
+    padding: 60rpx 0;
+    background-color: #fff;
+    border-radius: $radius-lg;
+    box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
+}
+</style>

+ 206 - 12
mobile/src/pages/xskh/khsq/khsq.vue

@@ -33,13 +33,15 @@
                                     {{ item.academicYear || '暂无' }}
                                     {{ getSemesterText(item.semester) }}
                                 </text>
-                                <u-tag
-                                    :text="getStatusText(item.status)"
-                                    :type="getStatusTagType(item.status)"
-                                    size="mini"
-                                ></u-tag>
                             </view>
                         </view>
+                        <view class="status-info">
+                            <u-tag
+                                :text="getStatusText(item.status)"
+                                :type="getStatusTagType(item.status)"
+                                size="mini"
+                            ></u-tag>
+                        </view>
                     </view>
 
                     <!-- 卡片内容 -->
@@ -58,6 +60,14 @@
                                 <text class="time-label">结束时间:</text>
                                 <text class="time-value">{{ formatTime(item.endTime) }}</text>
                             </view>
+                            <view class="time-item">
+                                <text class="time-label">数据统计开始时间:</text>
+                                <text class="time-value">{{ formatTime(item.dataStartTime) }}</text>
+                            </view>
+                            <view class="time-item">
+                                <text class="time-label">数据统计结束时间:</text>
+                                <text class="time-value">{{ formatTime(item.dataEndTime) }}</text>
+                            </view>
                         </view>
                         <view class="plan-info">
                             <text class="plan-name">考核方案: {{ item.planName || '暂无' }}</text>
@@ -91,6 +101,103 @@
                 <u-loadmore :status="loadStatus" @loadmore="loadMore"></u-loadmore>
             </view>
         </view>
+
+        <!-- 查看计划详情弹窗 -->
+        <u-popup
+            :show="showScheduleDetail"
+            @close="closeScheduleDetail"
+            mode="center"
+            border-radius="20"
+            width="90%"
+            close-on-click-overlay
+        >
+            <view class="schedule-detail-popup">
+                <view class="popup-header">
+                    <text class="popup-title">考核计划信息</text>
+                    <u-icon
+                        name="close"
+                        size="20"
+                        color="#909399"
+                        @click="closeScheduleDetail"
+                    ></u-icon>
+                </view>
+
+                <view class="popup-content">
+                    <view class="detail-item">
+                        <text class="detail-label">考核计划:</text>
+                        <text class="detail-value">
+                            {{ selectedSchedule.scheduleName || '暂无' }}
+                        </text>
+                    </view>
+
+                    <view class="detail-item">
+                        <text class="detail-label">学年学期:</text>
+                        <text class="detail-value">
+                            {{
+                                (selectedSchedule.academicYear || '暂无') +
+                                ' ' +
+                                getSemesterText(selectedSchedule.semester)
+                            }}
+                        </text>
+                    </view>
+
+                    <view class="detail-item">
+                        <text class="detail-label">考核方案:</text>
+                        <text class="detail-value">{{ selectedSchedule.planName || '暂无' }}</text>
+                    </view>
+
+                    <view class="detail-item">
+                        <text class="detail-label">状态:</text>
+                        <view class="detail-value">
+                            <u-tag
+                                :text="getStatusText(selectedSchedule.status)"
+                                :type="getStatusTagType(selectedSchedule.status)"
+                                size="mini"
+                            ></u-tag>
+                        </view>
+                    </view>
+
+                    <view class="detail-item">
+                        <text class="detail-label">说明:</text>
+                        <text class="detail-value description">
+                            {{ selectedSchedule.description || '暂无说明' }}
+                        </text>
+                    </view>
+
+                    <view class="detail-item">
+                        <text class="detail-label">开始时间:</text>
+                        <text class="detail-value">
+                            {{ formatTime(selectedSchedule.startTime) }}
+                        </text>
+                    </view>
+
+                    <view class="detail-item">
+                        <text class="detail-label">结束时间:</text>
+                        <text class="detail-value">{{ formatTime(selectedSchedule.endTime) }}</text>
+                    </view>
+
+                    <view class="detail-item">
+                        <text class="detail-label">数据统计开始时间:</text>
+                        <text class="detail-value">
+                            {{ formatTime(selectedSchedule.dataStartTime) }}
+                        </text>
+                    </view>
+
+                    <view class="detail-item">
+                        <text class="detail-label">数据统计结束时间:</text>
+                        <text class="detail-value">
+                            {{ formatTime(selectedSchedule.dataEndTime) }}
+                        </text>
+                    </view>
+                </view>
+
+                <view class="popup-footer">
+                    <u-button type="primary" size="medium" @click="closeScheduleDetail">
+                        确定
+                    </u-button>
+                </view>
+            </view>
+        </u-popup>
     </view>
 </template>
 
@@ -118,6 +225,10 @@ export default {
             // 字典数据
             assessmentScheduleStatus: [],
             studentSemester: [],
+
+            // 弹窗相关
+            showScheduleDetail: false,
+            selectedSchedule: {},
         };
     },
     async onLoad(options) {
@@ -226,12 +337,16 @@ export default {
 
         // 查看考核计划信息
         handleViewSchedule(row) {
-            const message = `考核计划:${row.scheduleName}\n说明:${row.description}\n时间:${row.startTime} 至 ${row.endTime}`;
-            uni.showModal({
-                title: '考核计划信息',
-                content: message,
-                showCancel: false,
-            });
+            console.log('点击查看计划按钮', row);
+            this.selectedSchedule = row;
+            this.showScheduleDetail = true;
+            console.log('弹窗状态已设置为true:', this.showScheduleDetail);
+        },
+
+        // 关闭计划详情弹窗
+        closeScheduleDetail() {
+            this.showScheduleDetail = false;
+            this.selectedSchedule = {};
         },
 
         // 判断是否可以提交申请
@@ -351,8 +466,11 @@ export default {
                 const year = date.getFullYear();
                 const month = String(date.getMonth() + 1).padStart(2, '0');
                 const day = String(date.getDate()).padStart(2, '0');
+                const hours = String(date.getHours()).padStart(2, '0');
+                const minutes = String(date.getMinutes()).padStart(2, '0');
+                const seconds = String(date.getSeconds()).padStart(2, '0');
 
-                return `${year}-${month}-${day}`;
+                return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
             } catch (error) {
                 console.error('时间格式化失败:', error);
                 return timeStr;
@@ -437,6 +555,11 @@ export default {
     gap: 16rpx;
 }
 
+.status-info {
+    display: flex;
+    align-items: center;
+}
+
 .academic-info {
     font-size: 26rpx;
     color: #606266;
@@ -533,4 +656,75 @@ export default {
 .load-more {
     padding: 20rpx 0;
 }
+
+/* 弹窗样式 */
+.schedule-detail-popup {
+    background-color: #fff;
+    border-radius: 20rpx;
+    overflow: hidden;
+}
+
+.popup-header {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 30rpx 30rpx 20rpx;
+    border-bottom: 1px solid #f0f0f0;
+}
+
+.popup-title {
+    font-size: 32rpx;
+    font-weight: bold;
+    color: #303133;
+}
+
+.popup-content {
+    padding: 30rpx;
+    max-height: 60vh;
+    overflow-y: auto;
+}
+
+.detail-item {
+    display: flex;
+    align-items: flex-start;
+    margin-bottom: 24rpx;
+    text-align: left;
+
+    &:last-child {
+        margin-bottom: 0;
+    }
+}
+
+.detail-label {
+    font-size: 28rpx;
+    color: #606266;
+    min-width: 200rpx;
+    flex-shrink: 0;
+    text-align: left;
+}
+
+.detail-value {
+    font-size: 28rpx;
+    color: #303133;
+    flex: 1;
+    text-align: right;
+    word-break: break-all;
+    display: flex;
+    justify-content: flex-end;
+    align-items: center;
+
+    &.description {
+        line-height: 1.6;
+        text-align: left;
+        display: block;
+        justify-content: initial;
+    }
+}
+
+.popup-footer {
+    padding: 20rpx 30rpx 30rpx;
+    border-top: 1px solid #f0f0f0;
+    display: flex;
+    justify-content: center;
+}
 </style>