人员管理

This commit is contained in:
2026-10-30 14:02:26 +08:00
parent fad8a37dfb
commit 7dacfd7e5a
21 changed files with 110 additions and 50 deletions
@@ -120,6 +120,18 @@ layout("/layouts/v4/baseLayout.html"){
<link rel="stylesheet" href="${base!}/assets/platform/css/home-portal.css?v=20261028-2" />
<!-- 登录资料仅在 HTML 属性中输出并转义;放在 Vue 挂载区域外,避免名称被当作模板表达式解析。 -->
<div id="v4-home-profile-data" hidden
data-username="${@auth.getPrincipalProperty('username'),escape}"
data-loginname="${@auth.getPrincipalProperty('loginname'),escape}"
<!--#if(!isEmpty(@auth.getPrincipalProperty('unit'))){#-->
data-unit-name="${@auth.getPrincipalProperty('unit').getName(),escape}"
<!--#}#-->
<!--#if(!isEmpty(@auth.getPrincipalProperty('union'))){#-->
data-union-name="${@auth.getPrincipalProperty('union').getName(),escape}"
<!--#}#-->
></div>
<div class="v4-container home-portal" id="v4-home-app">
<!-- 首页banner -->
<div class="portal-top">
@@ -140,7 +152,7 @@ layout("/layouts/v4/baseLayout.html"){
</div>
</div>
</div>
<user class="portal-member" :profile-only="true"></user>
<user class="portal-member" :profile-only="true" :profile="memberProfile"></user>
</div>
<div class="portal-content">
@@ -181,7 +193,15 @@ layout("/layouts/v4/baseLayout.html"){
new Vue({
el: '#v4-home-app',
data(){
// 浏览器读取属性时还原 HTML 转义;未配置单位或工会时使用空字符串,不访问空对象。
const profileData = document.getElementById('v4-home-profile-data').dataset
return{
memberProfile: {
username: profileData.username || '',
loginname: profileData.loginname || '',
unitName: profileData.unitName || '',
unionName: profileData.unionName || ''
},
websiteNews: [],
activityBrowse: {enabled: false, label: '活动加载中'}
}