提交代码
This commit is contained in:
1 parent
daae3039ab
commit
33bbce34e2
6 files changed
+210
-2
No files matched your search
@@ -139,6 +139,11 @@
|
||||
disabled
|
||||
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>
|
||||
@@ -225,6 +230,11 @@
|
||||
disabled
|
||||
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">
|
||||
@@ -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 {
|
||||
|
||||
@@ -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':
|
||||
|
||||
@@ -139,6 +139,11 @@
|
||||
disabled
|
||||
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>
|
||||
@@ -225,6 +230,11 @@
|
||||
disabled
|
||||
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">
|
||||
@@ -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 {
|
||||
|
||||
@@ -144,6 +144,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>
|
||||
@@ -229,6 +234,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">
|
||||
@@ -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 {
|
||||
|
||||
@@ -110,6 +110,11 @@
|
||||
disabled
|
||||
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>
|
||||
@@ -196,6 +201,11 @@
|
||||
disabled
|
||||
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">
|
||||
@@ -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 () => {
|
||||
|
||||
@@ -276,6 +276,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>
|
||||
@@ -382,6 +387,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">
|
||||
@@ -922,6 +932,11 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="籍贯">
|
||||
<span class="form-value">{{ getRegionName(detailForm.nativePlace) }}</span>
|
||||
<template v-if="detailForm.nativePlace">
|
||||
<div style="color: #888; font-size: 12px; line-height: 12px">
|
||||
{{ getRegionFullPath(detailForm.nativePlace) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -990,6 +1005,11 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生源地区">
|
||||
<span class="form-value">{{ getRegionName(detailForm.sourceRegion) }}</span>
|
||||
<template v-if="detailForm.sourceRegion">
|
||||
<div style="color: #888; font-size: 12px; line-height: 12px">
|
||||
{{ getRegionFullPath(detailForm.sourceRegion) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -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(
|
||||
() => {
|
||||
|
||||
Reference in new issue
Block a user