From 6ca85a1b158e57d188f82fc21c15a131f359ed4a Mon Sep 17 00:00:00 2001
From: zlwu <704541015@qq.com>
Date: Tue, 11 Nov 2025 15:51:11 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mobile/src/pages/workStudy/apply.vue | 37 ++++++++------
mobile/src/pages/workStudy/index.vue | 49 +++++++++++++------
.../components/MonitoringDialog.vue | 22 ++++-----
web/src/views/cw/evaluation/index.vue | 13 ++---
.../views/cw/monitoringManagement/index.vue | 16 +++---
.../views/jcbt/poverty/Application/index.vue | 39 +++++----------
web/src/views/rs/overseas/index.vue | 22 +++------
.../rs/overseas/itinerary-change-approval.vue | 9 ++--
web/src/views/rs/overseas/overseas-form.vue | 27 +++-------
web/src/views/rs/training/index.vue | 25 +++-------
.../xgss/holidayStay/holidayStay/index-sg.vue | 7 +--
.../msgmanage/components/ChangeDialog.vue | 23 ++++-----
12 files changed, 128 insertions(+), 161 deletions(-)
diff --git a/mobile/src/pages/workStudy/apply.vue b/mobile/src/pages/workStudy/apply.vue
index c4a4e623..f70f2cce 100644
--- a/mobile/src/pages/workStudy/apply.vue
+++ b/mobile/src/pages/workStudy/apply.vue
@@ -202,6 +202,7 @@ import {
updateApplication,
getApplicationDetail,
} from '@/api/workStudy.js';
+import { getDict } from '@/common/dict.js';
export default {
name: 'WorkStudyApply',
@@ -231,20 +232,14 @@ export default {
remark: '',
},
- // 家庭经济情况选项(与web端保持一致)
- familyStatusOptions: [
- { value: '特困', label: '特困' },
- { value: '贫困', label: '贫困' },
- { value: '一般', label: '一般' },
- { value: '良好', label: '良好' },
- ],
+ // 家庭经济情况选项(字典:jcbt_family_economy_status)
+ familyStatusOptions: [],
// 家庭经济情况选择器相关
showFamilyStatusPicker: false,
familyStatusIndex: [0],
- // uview-ui 2.x 单列选择器:使用纯字符串数组(二维)最稳定
- // 格式:[[字符串1, 字符串2, ...]] - 外层数组表示列,内层数组表示选项
- familyStatusColumns: [['特困', '贫困', '一般', '良好']],
+ // uview-ui 2.x 单列选择器:使用纯字符串数组(二维)
+ familyStatusColumns: [[]],
// 加载状态
loading: false,
@@ -277,6 +272,17 @@ export default {
},
methods: {
+ async loadFamilyDict() {
+ try {
+ const dictData = await getDict('jcbt_family_economy_status');
+ this.familyStatusOptions = Array.isArray(dictData) ? dictData : [];
+ this.familyStatusColumns = [this.familyStatusOptions.map(item => item.label)];
+ } catch (e) {
+ const fallback = ['特困', '贫困', '一般', '良好'];
+ this.familyStatusOptions = fallback.map(v => ({ value: v, label: v }));
+ this.familyStatusColumns = [fallback];
+ }
+ },
// 返回上一页
goBack() {
uni.navigateBack();
@@ -292,13 +298,12 @@ export default {
console.log('e.value:', e.value); // 例如:['贫困']
console.log('e.indexs:', e.indexs); // 例如:[1]
- // 单列选择器,取第一列的值
+ // 单列选择器,取第一列的值,并根据label反查字典的value
if (e && e.value && Array.isArray(e.value) && e.value.length > 0) {
const selectedValue = e.value[0]; // 直接获取字符串,如 "贫困"
- console.log('选中的值:', selectedValue);
-
- // 直接赋值
- this.formData.familyFinancialStatus = selectedValue;
+ const match = this.familyStatusOptions.find(opt => opt.label === selectedValue);
+ // 若找到匹配,用字典value,否则用label兜底
+ this.formData.familyFinancialStatus = match ? (match.value || match.label) : selectedValue;
// 更新索引用于回显
if (e.indexs && Array.isArray(e.indexs)) {
@@ -324,7 +329,7 @@ export default {
try {
// 并行加载数据
- const promises = [this.loadPositionData(), this.loadStudentInfo()];
+ const promises = [this.loadPositionData(), this.loadStudentInfo(), this.loadFamilyDict()];
await Promise.all(promises);
diff --git a/mobile/src/pages/workStudy/index.vue b/mobile/src/pages/workStudy/index.vue
index 23ca877d..8b0a990b 100644
--- a/mobile/src/pages/workStudy/index.vue
+++ b/mobile/src/pages/workStudy/index.vue
@@ -297,6 +297,7 @@ import {
getCurrentStudentInfo,
getStudentApplicationStatusList,
} from '@/api/workStudy.js';
+import { getDict } from '@/common/dict.js';
export default {
name: 'WorkStudyIndex',
@@ -316,22 +317,9 @@ export default {
scopeText: '',
statusText: '',
- // 选择器选项
- scopeOptions: [
- [
- { label: '全部', value: '' },
- { label: '本学院', value: 'COLLEGE' },
- { label: '全校', value: 'UNIVERSITY' },
- ],
- ],
- statusOptions: [
- [
- { label: '全部', value: '' },
- { label: '已发布', value: 'PUBLISHED' },
- { label: '招录中', value: 'RECRUITING' },
- { label: '已暂停', value: 'SUSPENDED' },
- ],
- ],
+ // 选择器选项(字典)
+ scopeOptions: [[]],
+ statusOptions: [[]],
// 查询参数
queryParams: {
@@ -412,6 +400,8 @@ export default {
await this.loadStudentInfo();
// 获取学生申请状态列表
await this.loadStudentApplications();
+ // 加载筛选字典
+ await this.loadFilterDicts();
// 加载岗位列表
await this.loadPositionList(true);
} catch (error) {
@@ -422,6 +412,33 @@ export default {
});
}
},
+ // 加载筛选字典
+ async loadFilterDicts() {
+ try {
+ const [scopeDict, statusDict] = await Promise.all([
+ getDict('jcbt_position_scope'),
+ getDict('jcbt_position_status'),
+ ]);
+ const scope = Array.isArray(scopeDict) ? scopeDict : [];
+ const status = Array.isArray(statusDict) ? statusDict : [];
+ // 转换为u-picker二维数组格式
+ this.scopeOptions = [[{ label: '全部', value: '' }, ...scope]];
+ this.statusOptions = [[{ label: '全部', value: '' }, ...status]];
+ } catch (e) {
+ // 保底:维持现状但不报错
+ this.scopeOptions = [[
+ { label: '全部', value: '' },
+ { label: '本学院', value: 'COLLEGE' },
+ { label: '全校', value: 'UNIVERSITY' },
+ ]];
+ this.statusOptions = [[
+ { label: '全部', value: '' },
+ { label: '已发布', value: 'PUBLISHED' },
+ { label: '招录中', value: 'RECRUITING' },
+ { label: '已暂停', value: 'SUSPENDED' },
+ ]];
+ }
+ },
// 获取学生信息
async loadStudentInfo() {
diff --git a/web/src/views/cw/evaluation/components/MonitoringDialog.vue b/web/src/views/cw/evaluation/components/MonitoringDialog.vue
index 869801dd..e110d99f 100644
--- a/web/src/views/cw/evaluation/components/MonitoringDialog.vue
+++ b/web/src/views/cw/evaluation/components/MonitoringDialog.vue
@@ -177,9 +177,7 @@
placeholder="请选择"
style="width: 100%"
>
-
-
-
+
@@ -192,19 +190,13 @@
style="width: 100%"
>
-
-
-
-
+
-
-
-
-
+
-
+
@@ -294,12 +286,16 @@