优化域名所有者下拉框显示逻辑
This commit is contained in:
parent
68b9c75ac1
commit
0059fb7eee
@ -156,7 +156,7 @@
|
|||||||
>
|
>
|
||||||
<option value="">请选择域名所有者</option>
|
<option value="">请选择域名所有者</option>
|
||||||
<option v-for="owner in domainOwners" :key="owner.name" :value="owner.name">
|
<option v-for="owner in domainOwners" :key="owner.name" :value="owner.name">
|
||||||
{{ owner.title }}
|
{{ getOwnerDisplayName(owner) }}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<button
|
<button
|
||||||
@ -1108,6 +1108,18 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getOwnerDisplayName(owner) {
|
||||||
|
// 如果是个人,优先显示fullname,没有的话显示title
|
||||||
|
if (owner.c_regtype === 'I') {
|
||||||
|
return owner.fullname || owner.title;
|
||||||
|
}
|
||||||
|
// 如果是公司,优先显示c_org_m,没有的话显示title
|
||||||
|
else if (owner.c_regtype === 'E') {
|
||||||
|
return owner.c_org_m || owner.title;
|
||||||
|
}
|
||||||
|
// 默认显示title
|
||||||
|
return owner.title;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user