From f2ec6077d0e661706dbedef175cdba3d8fac7426 Mon Sep 17 00:00:00 2001
From: zlwu <704541015@qq.com>
Date: Fri, 22 Aug 2025 15:06:06 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mobile/src/pages/xskh/khsq/form.vue | 207 ++++++++++++------
.../pages/xskh/khsq/indicatorDataDialog.vue | 87 +++++++-
2 files changed, 219 insertions(+), 75 deletions(-)
diff --git a/mobile/src/pages/xskh/khsq/form.vue b/mobile/src/pages/xskh/khsq/form.vue
index 638e2ac5..e126123f 100644
--- a/mobile/src/pages/xskh/khsq/form.vue
+++ b/mobile/src/pages/xskh/khsq/form.vue
@@ -62,6 +62,9 @@
{{ item.indicatorName }}
{{ item.indicatorCode }}
+
+ 最高分值: {{ item.planMaxScore || 0 }}
+
-
- 最高分值:
- {{ item.planMaxScore || 0 }}
-
-
- 自评得分:
-
- {{ item.selfScore || '-' }}
+
+
+ 自评得分:
+
+ {{ item.selfScore || '-' }}
+
+
+
+
+
+
+ 班主任评分:
+
+ {{ item.teacherScore || '-' }}
+
-
-
-
- 班主任评分:
- {{ item.teacherScore || '-' }}
@@ -134,7 +138,14 @@
附加分模块
-
+
添加附加分
@@ -149,7 +160,9 @@
删除
@@ -168,19 +181,31 @@
@change="calculateTotalScore"
>
-
- 附加分值:
-
- {{ item.bonusScore || '-' }}
+
+
+
+ 附加分值:
+
+ {{ item.bonusScore || '-' }}
+
+
+
+
+
+
+ 审核得分:
+
+ {{ item.approvalScore || '-' }}
+
+
-
附加分内容:
@@ -191,7 +216,7 @@
v-else
v-model="item.bonusContent"
placeholder="请输入附加分内容"
- height="120"
+ height="70"
>
@@ -264,6 +289,7 @@
v-if="image.status === 'success'"
size="mini"
type="primary"
+ shape="round"
plain
@click="handleDownload(image)"
>
@@ -273,6 +299,7 @@
v-if="image.status === 'error'"
size="mini"
type="warning"
+ shape="round"
plain
@click="retryUpload(image, item)"
>
@@ -282,6 +309,7 @@
v-if="!isViewMode"
size="mini"
type="error"
+ shape="round"
plain
@click="handleDelete(image, item)"
>
@@ -328,6 +356,7 @@
v-if="file.status === 'success'"
size="mini"
type="primary"
+ shape="round"
plain
@click="handleDownload(file)"
>
@@ -337,6 +366,7 @@
v-if="file.status === 'error'"
size="mini"
type="warning"
+ shape="round"
plain
@click="retryUpload(file, item)"
>
@@ -346,6 +376,7 @@
v-if="!isViewMode"
size="mini"
type="error"
+ shape="round"
plain
@click="handleDelete(file, item)"
>
@@ -363,10 +394,18 @@
-
+
选择图片
-
+
选择文件
@@ -388,10 +427,7 @@
size="mini"
>
-
- 审核得分:
- {{ item.approvalScore || '-' }}
-
+
审核备注:
@@ -408,25 +444,29 @@
得分统计
-
- 自评总得分:
- {{ form.selfScore || '0' }}
+
+
+ 自评总得分:
+ {{ form.selfScore || '0' }}
+
+
+ 班主任评分:
+ {{ form.teacherScore || '-' }}
+
-
- 班主任评分:
- {{ form.teacherScore || '-' }}
-
-
- 总得分:
- {{ form.totalScore || '-' }}
-
-
- 申请状态:
-
+
+
+ 总得分:
+ {{ form.totalScore || '-' }}
+
+
+ 申请状态:
+
+
@@ -440,7 +480,7 @@
placeholder="请输入自评备注"
:maxlength="500"
count
- height="160"
+ height="110"
>
@@ -456,9 +496,11 @@
- 保存
- 提交
- 删除
+ 保存
+ 提交
+
+ 删除
+
@@ -1277,8 +1319,17 @@ $radius-lg: 16rpx;
padding-bottom: 10rpx;
border-bottom: 2rpx solid $border-color;
display: flex;
- justify-content: space-between;
align-items: center;
+ gap: $spacing-md;
+
+ text {
+ flex: 1;
+ }
+
+ .u-button {
+ flex-shrink: 0;
+ min-width: 160rpx;
+ }
}
.form-content {
@@ -1368,6 +1419,12 @@ $radius-lg: 16rpx;
color: $text-placeholder;
}
+.max-score-text {
+ font-size: 24rpx;
+ color: $text-secondary;
+ margin-left: $spacing-md;
+}
+
.view-data-btn {
display: flex;
align-items: center;
@@ -1406,11 +1463,17 @@ $radius-lg: 16rpx;
gap: $spacing-sm;
}
+.score-row {
+ display: flex;
+ gap: $spacing-md;
+}
+
.score-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: $spacing-sm 0;
+ flex: 1; // 平均分配宽度
}
.score-label {
@@ -1432,6 +1495,13 @@ $radius-lg: 16rpx;
text-align: right;
}
+.score-input-container {
+ display: flex;
+ justify-content: flex-end;
+ width: 200rpx;
+ flex-shrink: 0;
+}
+
.remark-section {
margin-top: $spacing-md;
}
@@ -1456,6 +1526,7 @@ $radius-lg: 16rpx;
font-size: 28rpx;
font-weight: bold;
color: $text-primary;
+ flex: 1;
}
.bonus-content {
@@ -1593,6 +1664,11 @@ $radius-lg: 16rpx;
margin-bottom: $spacing-lg;
}
+.summary-row {
+ display: flex;
+ gap: $spacing-md;
+}
+
.summary-item {
display: flex;
align-items: center;
@@ -1601,6 +1677,7 @@ $radius-lg: 16rpx;
background-color: #fff;
border-radius: $radius-md;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
+ flex: 1; // 平均分配宽度
}
.summary-label {
diff --git a/mobile/src/pages/xskh/khsq/indicatorDataDialog.vue b/mobile/src/pages/xskh/khsq/indicatorDataDialog.vue
index 7e27de08..f59c974e 100644
--- a/mobile/src/pages/xskh/khsq/indicatorDataDialog.vue
+++ b/mobile/src/pages/xskh/khsq/indicatorDataDialog.vue
@@ -7,13 +7,23 @@
+
+
+
+ 加载中...
+
+
-
+
@@ -25,9 +35,11 @@
@@ -62,7 +74,11 @@
@@ -70,9 +86,11 @@
@@ -164,7 +182,11 @@ export default {
method: 'get',
});
+ console.log('✅ 指标类型接口响应:', indicatorTypesResponse);
+
if (indicatorTypesResponse.code === 200 && indicatorTypesResponse.data) {
+ console.log('✅ 指标类型数据:', JSON.stringify(indicatorTypesResponse.data));
+
// 修复字段名映射:后端返回下划线格式,前端使用驼峰格式
const disciplineTypeIds =
indicatorTypesResponse.data.discipline_type_ids ||
@@ -173,12 +195,27 @@ export default {
indicatorTypesResponse.data.reward_type_ids ||
indicatorTypesResponse.data.rewardTypeIds;
+ console.log(
+ '✅ 解析后的类型IDs - disciplineTypeIds:',
+ disciplineTypeIds,
+ 'rewardTypeIds:',
+ rewardTypeIds,
+ );
+
// 并行加载违纪处分记录和奖励记录
await Promise.all([
this.loadDisciplineRecords(disciplineTypeIds),
this.loadRewardRecords(rewardTypeIds),
]);
+
+ console.log(
+ '✅ 数据加载完成 - disciplineRecords长度:',
+ this.disciplineRecords.length,
+ 'rewardRecords长度:',
+ this.rewardRecords.length,
+ );
} else {
+ console.error('❌ 获取指标类型信息失败,response:', indicatorTypesResponse);
uni.showToast({
title: '获取指标类型信息失败',
icon: 'none',
@@ -198,6 +235,7 @@ export default {
// 加载违纪处分记录
async loadDisciplineRecords(disciplineTypeIds) {
if (!disciplineTypeIds) {
+ console.log('🚨 disciplineTypeIds为空,跳过违纪记录加载');
this.disciplineRecords = [];
return;
}
@@ -220,9 +258,17 @@ export default {
},
});
+ console.log('✅ 违纪记录接口响应:', response);
+
if (response.code === 200) {
this.disciplineRecords = response.data || [];
+ console.log(
+ '✅ 违纪记录数据赋值完成,数组长度:',
+ this.disciplineRecords.length,
+ );
+ console.log('✅ 违纪记录数据内容:', JSON.stringify(this.disciplineRecords));
} else {
+ console.error('❌ 获取违纪处分记录失败,response:', response);
uni.showToast({
title: '获取违纪处分记录失败',
icon: 'none',
@@ -238,10 +284,13 @@ export default {
// 加载奖励记录
async loadRewardRecords(rewardTypeIds) {
if (!rewardTypeIds) {
+ console.log('🚨 rewardTypeIds为空,跳过奖励记录加载');
this.rewardRecords = [];
return;
}
+ console.log('加载奖励记录,rewardTypeIds:', rewardTypeIds);
+
try {
const response = await request({
url: '/rewardRecord/rewardRecord/getStudentRewardRecords',
@@ -255,9 +304,13 @@ export default {
},
});
+ console.log('✅ 奖励记录接口响应:', response);
+
if (response.code === 200) {
this.rewardRecords = response.data || [];
+ console.log('✅ 奖励记录数据赋值完成,数组长度:', this.rewardRecords.length);
} else {
+ console.error('❌ 获取奖励记录失败,response:', response);
uni.showToast({
title: '获取奖励记录失败',
icon: 'none',
@@ -359,7 +412,7 @@ $radius-lg: 16rpx;
border-radius: $radius-lg;
padding: $spacing-xl;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
- border-left: 4rpx solid $primary-color;
+ // border-left: 4rpx solid $primary-color;
}
.record-header {
@@ -431,4 +484,18 @@ $radius-lg: 16rpx;
border-radius: $radius-lg;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
}
+
+.loading-container {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 100rpx 0;
+ gap: $spacing-lg;
+}
+
+.loading-text {
+ font-size: 28rpx;
+ color: $text-secondary;
+}