|
|
@@ -216,6 +216,11 @@
|
|
|
clearable
|
|
|
style="width: 100%"
|
|
|
/>
|
|
|
+ <template v-if="form.nativePlace">
|
|
|
+ <div style="color: #888; font-size: 12px; line-height: 12px">
|
|
|
+ {{ getRegionFullPath(form.nativePlace) }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -385,6 +390,11 @@
|
|
|
clearable
|
|
|
style="width: 100%"
|
|
|
/>
|
|
|
+ <template v-if="form.sourceRegion">
|
|
|
+ <div style="color: #888; font-size: 12px; line-height: 12px">
|
|
|
+ {{ getRegionFullPath(form.sourceRegion) }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
@@ -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':
|