mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
修改特殊机构字段截取的错误的问题
This commit is contained in:
@@ -25,6 +25,7 @@ export const cutFullName = (fullName,num) => {
|
||||
/**截取机构名称路径namePath最后两段,不包含第一个 */
|
||||
export const cutOrgNamePath = (namePath) => {
|
||||
let newName=namePath;
|
||||
//debugger
|
||||
if(newName){
|
||||
let names=newName.split('/');
|
||||
let len=names.length;
|
||||
@@ -32,7 +33,11 @@ export const cutOrgNamePath = (namePath) => {
|
||||
if(len>1){
|
||||
//newName=names[len-2]+'/'+names[len-1];
|
||||
newName=names[1];
|
||||
if(!newName){
|
||||
newName=names[0]
|
||||
}
|
||||
}
|
||||
|
||||
// if(names.length>1){
|
||||
// newName=names[1];
|
||||
// if(num==2){
|
||||
|
||||
Reference in New Issue
Block a user