From 945f3f57b233b3839f9b947b7df35ff5b06cde17 Mon Sep 17 00:00:00 2001
From: merak1237 <1036673629@qq.com>
Date: Tue, 9 Sep 2025 11:36:57 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/http.api.js | 2 +-
pages/sys/msg/index.vue | 51 ++++++++++++++++++++++++++---------------
2 files changed, 34 insertions(+), 19 deletions(-)
diff --git a/common/http.api.js b/common/http.api.js
index 9f4fc85..b6fd862 100644
--- a/common/http.api.js
+++ b/common/http.api.js
@@ -11,7 +11,7 @@ const install = (Vue, vm) => {
vm.$u.api = {
//获取单位列表
getUnits:(params = {}) => vm.$u.get(config.adminPath+'/property/enum-fetcher/enum-values/getUnit',params),
-
+ getType:(params = {}) => vm.$u.get(config.adminPath+'/property/xcx/system/type/'+params),
codesub: (params = {}) => vm.$u.get(config.adminPath+'/property/visitorManagement/useqr', params),
uploadimg: (params = {}) => vm.$u.post(config.adminPath+'/resource/oss/upload', params),
fksub: (params = {}) => vm.$u.post(config.adminPath+'/property/visitorManagement/add', params),
diff --git a/pages/sys/msg/index.vue b/pages/sys/msg/index.vue
index 711d5e9..c0e483e 100644
--- a/pages/sys/msg/index.vue
+++ b/pages/sys/msg/index.vue
@@ -39,13 +39,13 @@
-->
- {{ formData.visitingReason || '请选择拜访事由' }}
+ {{ getReasonLabel(formData.visitingReason) || '请选择拜访事由' }}
-
- {{ item }}
+ {{ item.dictLabel }}
@@ -64,17 +64,20 @@
被访单位
-
- {{ formData.interviewedUnit || '请选择被访单位' }}
-
-
-
-
- {{ item.name }}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -207,7 +210,7 @@ export default {
2: '已取消',
3: '已完成'
},
- typeList: ['业务洽谈', '会议参与', '面试应聘', '技术支持', '办事咨询', '调研考察'],
+ typeList: [],
unitList: [],
showTypeDialog: false,
showUnitDialog: false
@@ -234,7 +237,8 @@ export default {
// #ifdef APP-PLUS
plus.screen.lockOrientation('default');
// #endif
-
+ // 获取业务类型
+ this.getTypes();
// 获取单位列表
this.getUnits();
},
@@ -258,12 +262,22 @@ export default {
this.unitList = res.data;
}
},
+ async getTypes() {
+ let res = await this.$u.api.getType("reason_for_visit");
+ if (res.code == '200') {
+ this.typeList = res.data;
+ }
+ },
// 添加选择拜访事由方法
selectVisitingReason(reason) {
- this.formData.visitingReason = reason;
+ this.formData.visitingReason = reason.dictValue;
this.showTypeDialog = false;
},
-
+ //根据字典获取
+ getReasonLabel(value) {
+ const item = this.typeList.find(item => item.dictValue === value);
+ return item ? item.dictLabel : '';
+ },
// 添加选择被访单位方法
selectInterviewedUnit(unit) {
this.formData.interviewedUnit = unit.name;
@@ -414,6 +428,7 @@ export default {
// 提交表单
submitForm() {
+ console.log(this.formData);
const errorMsg = this.validateForm();
if (errorMsg) {
uni.showToast({