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:
@@ -29,10 +29,8 @@ export const cutOrgNamePath = (namePath) => {
|
|||||||
let names=newName.split('/');
|
let names=newName.split('/');
|
||||||
let len=names.length;
|
let len=names.length;
|
||||||
//使用最后两们
|
//使用最后两们
|
||||||
if(len>3){
|
if(len>2){
|
||||||
newName=names[len-2]+'/'+names[len-1];
|
//newName=names[len-2]+'/'+names[len-1];
|
||||||
}else if(len==2){
|
|
||||||
//去掉第一位,只是取第二位
|
|
||||||
newName=names[1];
|
newName=names[1];
|
||||||
}
|
}
|
||||||
// if(names.length>1){
|
// if(names.length>1){
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
<author-img :avatar="ran.authorInfo.avatar" :aid="ran.authorInfo.aid" :sex="ran.authorInfo.sex">
|
<author-img :avatar="ran.authorInfo.avatar" :aid="ran.authorInfo.aid" :sex="ran.authorInfo.sex">
|
||||||
</author-img> <span>{{ran.authorInfo.name}}</span>
|
</author-img> <span>{{ran.authorInfo.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="bm tab-bm" style="margin-left:30px;">{{ran.authorInfo.orgInfo}}</div>
|
<div class="bm tab-bm" style="margin-left:30px;">{{cutOrgNamePath(ran.authorInfo.orgInfo)}}</div>
|
||||||
<div class="jy tab-jy">
|
<div class="jy tab-jy">
|
||||||
<div v-if="cycle == 'total'" style="font-size: 18px;color: #333333;font-weight: 600;">{{ran.total}}</div>
|
<div v-if="cycle == 'total'" style="font-size: 18px;color: #333333;font-weight: 600;">{{ran.total}}</div>
|
||||||
<div v-if="cycle == 'months'" style="font-size: 18px;color: #333333;font-weight: 600;">{{ran.months}}</div>
|
<div v-if="cycle == 'months'" style="font-size: 18px;color: #333333;font-weight: 600;">{{ran.months}}</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user