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%" /> + @@ -225,6 +230,11 @@ disabled style="width: 100%" /> + @@ -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%" /> + @@ -385,6 +390,11 @@ clearable style="width: 100%" /> + @@ -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%" /> + @@ -225,6 +230,11 @@ disabled style="width: 100%" /> + @@ -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%" /> + @@ -229,6 +234,11 @@ clearable style="width: 100%" /> + @@ -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%" /> + @@ -196,6 +201,11 @@ disabled style="width: 100%" /> + @@ -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%" /> + @@ -382,6 +387,11 @@ clearable style="width: 100%" /> + @@ -922,6 +932,11 @@ {{ getRegionName(detailForm.nativePlace) }} + @@ -990,6 +1005,11 @@ {{ getRegionName(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( () => {