From 33bbce34e23b1b692588f0620d4f8b3e6b6b0fdd Mon Sep 17 00:00:00 2001
From: zlwu <704541015@qq.com>
Date: Wed, 30 Jul 2025 22:47:13 +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
---
.../xsjcxx/stuMsgAudit/stuMsgDetailDialog.vue | 33 ++++++++++++++
.../xg/xsjcxx/stuMsgAudit/stuMsgDialog.vue | 37 +++++++++++++++-
.../stuMsgSupply/stuMsgDetailDialog.vue | 33 ++++++++++++++
.../xg/xsjcxx/stuMsgSupply/stuMsgDialog.vue | 33 ++++++++++++++
.../views/xg/xsjcxx/stuPersonalMsg/index.vue | 33 ++++++++++++++
.../xg/xsjcxx/studentMsg/studentMsg/index.vue | 43 +++++++++++++++++++
6 files changed, 210 insertions(+), 2 deletions(-)
diff --git a/web/src/views/xg/xsjcxx/stuMsgAudit/stuMsgDetailDialog.vue b/web/src/views/xg/xsjcxx/stuMsgAudit/stuMsgDetailDialog.vue
index 54039429..3e722663 100644
--- a/web/src/views/xg/xsjcxx/stuMsgAudit/stuMsgDetailDialog.vue
+++ b/web/src/views/xg/xsjcxx/stuMsgAudit/stuMsgDetailDialog.vue
@@ -139,6 +139,11 @@
disabled
style="width: 100%"
/>
+
+
+ {{ getRegionFullPath(form.nativePlace) }}
+
+
@@ -225,6 +230,11 @@
disabled
style="width: 100%"
/>
+
+
+ {{ getRegionFullPath(form.sourceRegion) }}
+
+
@@ -884,6 +894,29 @@ const getOperateContent = (record: any) => {
}
};
+/** 根据行政区划代码获取完整路径(省/市/区) */
+const getRegionFullPath = (code: string): string => {
+ if (!code || !regionOptions.value) return code || '';
+ const path: string[] = [];
+ const findPath = (nodes: any[], targetCode: string): boolean => {
+ for (const node of nodes) {
+ path.push(node.name);
+ if (node.code === targetCode) {
+ return true;
+ }
+ if (node.children && node.children.length > 0) {
+ if (findPath(node.children, targetCode)) {
+ return true;
+ }
+ }
+ path.pop();
+ }
+ return false;
+ };
+ findPath(regionOptions.value, code);
+ return path.join(' / ');
+};
+
/** 获取行政区划树形数据 */
const getRegionTree = async () => {
try {
diff --git a/web/src/views/xg/xsjcxx/stuMsgAudit/stuMsgDialog.vue b/web/src/views/xg/xsjcxx/stuMsgAudit/stuMsgDialog.vue
index f07a3345..aaedde73 100644
--- a/web/src/views/xg/xsjcxx/stuMsgAudit/stuMsgDialog.vue
+++ b/web/src/views/xg/xsjcxx/stuMsgAudit/stuMsgDialog.vue
@@ -216,6 +216,11 @@
clearable
style="width: 100%"
/>
+
+
+ {{ getRegionFullPath(form.nativePlace) }}
+
+
@@ -385,6 +390,11 @@
clearable
style="width: 100%"
/>
+
+
+ {{ getRegionFullPath(form.sourceRegion) }}
+
+
@@ -1758,6 +1768,29 @@ const getRegionName = (code: string) => {
return findRegionName(regionOptions.value, code) || code;
};
+/** 根据行政区划代码获取完整路径(省/市/区) */
+const getRegionFullPath = (code: string): string => {
+ if (!code || !regionOptions.value) return code || '';
+ const path: string[] = [];
+ const findPath = (nodes: any[], targetCode: string): boolean => {
+ for (const node of nodes) {
+ path.push(node.name);
+ if (node.code === targetCode) {
+ return true;
+ }
+ if (node.children && node.children.length > 0) {
+ if (findPath(node.children, targetCode)) {
+ return true;
+ }
+ }
+ path.pop();
+ }
+ return false;
+ };
+ findPath(regionOptions.value, code);
+ return path.join(' / ');
+};
+
/** 根据婚姻状况代码获取标签 */
const getMaritalStatusLabel = (value: string | number) => {
console.log('marital_status.value', marital_status.value);
@@ -1869,9 +1902,9 @@ const getFieldOriginalValue = (fieldName: string) => {
case 'educationLevel':
return getDictLabel(wenhuachengdu.value, originalValue);
case 'nativePlace':
- return getRegionName(originalValue);
+ return getRegionFullPath(originalValue);
case 'sourceRegion':
- return getRegionName(originalValue);
+ return getRegionFullPath(originalValue);
case 'maritalStatus':
return getDictLabel(marital_status.value, originalValue);
case 'isPoorStudent':
diff --git a/web/src/views/xg/xsjcxx/stuMsgSupply/stuMsgDetailDialog.vue b/web/src/views/xg/xsjcxx/stuMsgSupply/stuMsgDetailDialog.vue
index c7a70321..38beb188 100644
--- a/web/src/views/xg/xsjcxx/stuMsgSupply/stuMsgDetailDialog.vue
+++ b/web/src/views/xg/xsjcxx/stuMsgSupply/stuMsgDetailDialog.vue
@@ -139,6 +139,11 @@
disabled
style="width: 100%"
/>
+
+
+ {{ getRegionFullPath(form.nativePlace) }}
+
+
@@ -225,6 +230,11 @@
disabled
style="width: 100%"
/>
+
+
+ {{ getRegionFullPath(form.sourceRegion) }}
+
+
@@ -883,6 +893,29 @@ const getOperateContent = (record: any) => {
}
};
+/** 根据行政区划代码获取完整路径(省/市/区) */
+const getRegionFullPath = (code: string): string => {
+ if (!code || !regionOptions.value) return code || '';
+ const path: string[] = [];
+ const findPath = (nodes: any[], targetCode: string): boolean => {
+ for (const node of nodes) {
+ path.push(node.name);
+ if (node.code === targetCode) {
+ return true;
+ }
+ if (node.children && node.children.length > 0) {
+ if (findPath(node.children, targetCode)) {
+ return true;
+ }
+ }
+ path.pop();
+ }
+ return false;
+ };
+ findPath(regionOptions.value, code);
+ return path.join(' / ');
+};
+
/** 获取行政区划树形数据 */
const getRegionTree = async () => {
try {
diff --git a/web/src/views/xg/xsjcxx/stuMsgSupply/stuMsgDialog.vue b/web/src/views/xg/xsjcxx/stuMsgSupply/stuMsgDialog.vue
index 6b2da8ae..970c45f0 100644
--- a/web/src/views/xg/xsjcxx/stuMsgSupply/stuMsgDialog.vue
+++ b/web/src/views/xg/xsjcxx/stuMsgSupply/stuMsgDialog.vue
@@ -144,6 +144,11 @@
clearable
style="width: 100%"
/>
+
+
+ {{ getRegionFullPath(form.nativePlace) }}
+
+
@@ -229,6 +234,11 @@
clearable
style="width: 100%"
/>
+
+
+ {{ getRegionFullPath(form.sourceRegion) }}
+
+
@@ -888,6 +898,29 @@ const getOperateContent = (record: any) => {
}
};
+/** 根据行政区划代码获取完整路径(省/市/区) */
+const getRegionFullPath = (code: string): string => {
+ if (!code || !regionOptions.value) return code || '';
+ const path: string[] = [];
+ const findPath = (nodes: any[], targetCode: string): boolean => {
+ for (const node of nodes) {
+ path.push(node.name);
+ if (node.code === targetCode) {
+ return true;
+ }
+ if (node.children && node.children.length > 0) {
+ if (findPath(node.children, targetCode)) {
+ return true;
+ }
+ }
+ path.pop();
+ }
+ return false;
+ };
+ findPath(regionOptions.value, code);
+ return path.join(' / ');
+};
+
/** 获取行政区划树形数据 */
const getRegionTree = async () => {
try {
diff --git a/web/src/views/xg/xsjcxx/stuPersonalMsg/index.vue b/web/src/views/xg/xsjcxx/stuPersonalMsg/index.vue
index 434e0d65..32c5ecb4 100644
--- a/web/src/views/xg/xsjcxx/stuPersonalMsg/index.vue
+++ b/web/src/views/xg/xsjcxx/stuPersonalMsg/index.vue
@@ -110,6 +110,11 @@
disabled
style="width: 100%"
/>
+
+
+ {{ getRegionFullPath(form.nativePlace) }}
+
+
@@ -196,6 +201,11 @@
disabled
style="width: 100%"
/>
+
+
+ {{ getRegionFullPath(form.sourceRegion) }}
+
+
@@ -918,6 +928,29 @@ const getPersonalInfoData = async () => {
}
};
+/** 根据行政区划代码获取完整路径(省/市/区) */
+const getRegionFullPath = (code: string): string => {
+ if (!code || !regionOptions.value) return code || '';
+ const path: string[] = [];
+ const findPath = (nodes: any[], targetCode: string): boolean => {
+ for (const node of nodes) {
+ path.push(node.name);
+ if (node.code === targetCode) {
+ return true;
+ }
+ if (node.children && node.children.length > 0) {
+ if (findPath(node.children, targetCode)) {
+ return true;
+ }
+ }
+ path.pop();
+ }
+ return false;
+ };
+ findPath(regionOptions.value, code);
+ return path.join(' / ');
+};
+
/** 获取行政区划树形数据 */
/** 获取行政区划树形数据 */
const getRegionTree = async () => {
diff --git a/web/src/views/xg/xsjcxx/studentMsg/studentMsg/index.vue b/web/src/views/xg/xsjcxx/studentMsg/studentMsg/index.vue
index e713e559..f9959439 100644
--- a/web/src/views/xg/xsjcxx/studentMsg/studentMsg/index.vue
+++ b/web/src/views/xg/xsjcxx/studentMsg/studentMsg/index.vue
@@ -276,6 +276,11 @@
clearable
style="width: 100%"
/>
+
+
+ {{ getRegionFullPath(form.nativePlace) }}
+
+
@@ -382,6 +387,11 @@
clearable
style="width: 100%"
/>
+
+
+ {{ getRegionFullPath(form.sourceRegion) }}
+
+
@@ -922,6 +932,11 @@
{{ getRegionName(detailForm.nativePlace) }}
+
+
+ {{ getRegionFullPath(detailForm.nativePlace) }}
+
+
@@ -990,6 +1005,11 @@
{{ getRegionName(detailForm.sourceRegion) }}
+
+
+ {{ getRegionFullPath(detailForm.sourceRegion) }}
+
+
@@ -1826,6 +1846,29 @@ const getDormBuildingName = (id: string | number) => {
return findBuildingName(dormBuildingOptions.value, id) || String(id);
};
+/** 根据行政区划代码获取完整路径(省/市/区) */
+const getRegionFullPath = (code: string): string => {
+ if (!code || !regionOptions.value) return code || '';
+ const path: string[] = [];
+ const findPath = (nodes: any[], targetCode: string): boolean => {
+ for (const node of nodes) {
+ path.push(node.name);
+ if (node.code === targetCode) {
+ return true;
+ }
+ if (node.children && node.children.length > 0) {
+ if (findPath(node.children, targetCode)) {
+ return true;
+ }
+ }
+ path.pop();
+ }
+ return false;
+ };
+ findPath(regionOptions.value, code);
+ return path.join(' / ');
+};
+
/** 根据名称筛选部门树 */
watchEffect(
() => {