feat(icons): 全量接入 ysch-icons 并统一首页入口-icons.css 由 build_mask_css.py 注入 105 个官方矢量(同名覆盖 apps/logout/category/browse/edit/ashbin/user-filling,异名保留 attachment/stop/saoba/print/word/excel/ppt/pdf1/txt/tupian1/yasuo/weizhi 12 个手绘稿,旧文件自动存 icons.css.bak);SchoolLayout 左侧菜单 Ionicons→iconfont 掩码类(wenzhang/liebiao/tupian/cshxd/sjlm/zhandian,page 与 modId 两分支同表,链接/附件库内无语义取近似)+菜单图标与文字间距 8px;面包屑补常驻首页段(超管 首页>学校列表>校名>站点>模块,校级无学校列表段),crumb-home 用 inline-flex 真居中并关掉压缩 layout.css 遗留的 .path-nav .icon-category{top:1px} 字体基线补偿(该补偿对 mask 的 1em 方块有害,不改压缩产物);头部「常用应用」改「返回首页」(icon-shouye+linkHomePage,面板 appList 原为硬编码 [] 属死入口,DOM 与 isPanel 保留仅失去入口);ArticleListPanel 发布按钮 icon-apps→icon-fasong 语义纠正;首页与全部应用链接 /BschHome→/userhome/front/index.html(线上 BschHome 实测 404,userhome 200 且 hash 含 /apps);登出路由 /cas/logout→/logout 与 Notice/UserhomeFront 统一(/cas/logout 在 SSO 侧无效);vitest 99/99+build 通过
build / build (push) Failing after 6s
build / build (push) Failing after 6s
This commit is contained in:
@@ -169,9 +169,13 @@ const linkUserInfo = () => {
|
||||
};
|
||||
const logout = () => {
|
||||
let url = window.location.href;
|
||||
url = "/cas/logout?service=" + url;
|
||||
url = "/logout?service=" + url;
|
||||
window.location.href = ssoHost.value + url;
|
||||
};
|
||||
/** 返回首页:旧 BschHome 应用已下线(线上 /BschHome/front/index.html 返回 404),统一跳用户中心 userhome */
|
||||
const linkHomePage = () => {
|
||||
window.location.href = (baseHost.value || "") + "/userhome/front/index.html";
|
||||
};
|
||||
const childChange = (index: number) => {
|
||||
const arr = modList.value || [];
|
||||
if (arr[index]) {
|
||||
@@ -180,22 +184,23 @@ const childChange = (index: number) => {
|
||||
};
|
||||
|
||||
/** 根据菜单项映射图标:优先按解析后的 page 判断(平台模块 id 不可依赖),
|
||||
* 兜底保留 modId 对照 */
|
||||
* 兜底保留 modId 对照。图标为 ysch-icons(CSS mask 类,见 styles/icons.css,与 Notice 同一套);
|
||||
* 友情链接/附件库内无完全对应语义,分别取 cshxd(路牌指引)、sjlm(文档层叠)近似 */
|
||||
const getMenuIcon = (item?: any): string => {
|
||||
const page: string = item?.page || "";
|
||||
if (page === "/article" || page.startsWith("/article")) return "ios-document";
|
||||
if (page === "/category") return "ios-list-box";
|
||||
if (page === "/banner") return "ios-images";
|
||||
if (page === "/link") return "ios-link";
|
||||
if (page === "/attachment") return "ios-folder-open";
|
||||
if (page === "/site") return "ios-globe";
|
||||
if (page === "/article" || page.startsWith("/article")) return "icon-wenzhang";
|
||||
if (page === "/category") return "icon-liebiao";
|
||||
if (page === "/banner") return "icon-tupian";
|
||||
if (page === "/link") return "icon-cshxd";
|
||||
if (page === "/attachment") return "icon-sjlm";
|
||||
if (page === "/site") return "icon-zhandian";
|
||||
switch (item?.modId ?? item?.id) {
|
||||
case 1: return "ios-document";
|
||||
case 2: return "ios-list-box";
|
||||
case 3: return "ios-images";
|
||||
case 4: return "ios-link";
|
||||
case 5: return "ios-folder-open";
|
||||
case 6: return "ios-globe";
|
||||
case 1: return "icon-wenzhang";
|
||||
case 2: return "icon-liebiao";
|
||||
case 3: return "icon-tupian";
|
||||
case 4: return "icon-cshxd";
|
||||
case 5: return "icon-sjlm";
|
||||
case 6: return "icon-zhandian";
|
||||
default: return "";
|
||||
}
|
||||
};
|
||||
@@ -288,8 +293,8 @@ watch(
|
||||
<div class="layout-wrap">
|
||||
<header class="header-container fix">
|
||||
<div class="fl align-middle icon-box">
|
||||
<div title="常用应用" :class="['icon-btn', isPanel ? 'active' : '']" @click="isPanel = !isPanel">
|
||||
<i class="iconfont icon-apps"></i>
|
||||
<div title="首页" class="icon-btn" @click="linkHomePage">
|
||||
<i class="iconfont icon-shouye"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="delimiter fl align-middle"></div>
|
||||
@@ -324,7 +329,7 @@ watch(
|
||||
<li>
|
||||
<a href="javascript:;" @click="childChange(index)">
|
||||
<i :class="item.childState ? 'arrow-down' : 'arrow-up'"></i>
|
||||
<Icon v-if="getMenuIcon(item)" :type="getMenuIcon(item)" />
|
||||
<i v-if="getMenuIcon(item)" class="iconfont" :class="getMenuIcon(item)"></i>
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</li>
|
||||
@@ -344,7 +349,7 @@ watch(
|
||||
</template>
|
||||
<li v-else :class="item.page == currPath ? 'active' : ''">
|
||||
<a href="javascript:;" @click="linkMenu(item)">
|
||||
<Icon v-if="getMenuIcon(item)" :type="getMenuIcon(item)" />
|
||||
<i v-if="getMenuIcon(item)" class="iconfont" :class="getMenuIcon(item)"></i>
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</li>
|
||||
@@ -355,6 +360,15 @@ watch(
|
||||
|
||||
<div class="path-nav" :class="pathNavClass" :style="pathNavStyle">
|
||||
<Breadcrumb separator=">">
|
||||
<!-- 首页段(常驻第一段):旧 BschHome 已下线,统一跳用户中心 userhome -->
|
||||
<a href="javascript:;" @click="linkHomePage">
|
||||
<BreadcrumbItem>
|
||||
<span class="crumb-home">
|
||||
<i class="iconfont icon-category"></i>
|
||||
首页
|
||||
</span>
|
||||
</BreadcrumbItem>
|
||||
</a>
|
||||
<!-- 超管:校名前多一段可点「学校列表」,与 header 返回图标同效(回工作台切换学校) -->
|
||||
<BreadcrumbItem v-if="isSuper" to="/workbench">学校列表</BreadcrumbItem>
|
||||
<!-- 面包屑第二段 = 学校上下文(常驻,不承载站点信息) -->
|
||||
@@ -389,7 +403,7 @@ watch(
|
||||
</li>
|
||||
</ul>
|
||||
<div class="link-panel">
|
||||
<a :href="baseHost + '/BschHome/front/index.html#/apps'" target="_blank" rel="noopener noreferrer">
|
||||
<a :href="baseHost + '/userhome/front/index.html#/apps'" target="_blank" rel="noopener noreferrer">
|
||||
全部应用
|
||||
<i>→</i>
|
||||
</a>
|
||||
@@ -456,4 +470,23 @@ watch(
|
||||
.layout-wrap {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 左侧菜单图标与文字间距(ysch-icons mask 类,写法与 Notice layout.vue 一致) */
|
||||
.left-menu a .iconfont {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
/* 面包屑「首页」垂直居中:layout.css 遗留的 .path-nav .icon-category{position:relative;top:1px}
|
||||
是给老 iconfont 字体字形做的基线补偿,换成 ysch mask 的 1em 方块后反而把图标顶偏;
|
||||
这里用 inline-flex 真居中并关掉该补偿(不动压缩产物 layout.css,覆盖收在本组件内)。
|
||||
scoped 特异性 .crumb-home .iconfont[data-v-x](0,2,1)> .path-nav .icon-category(0,2,0),可覆盖 */
|
||||
.crumb-home {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.crumb-home .iconfont {
|
||||
position: static;
|
||||
top: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -32,7 +32,7 @@ const linkUserInfo = () => {
|
||||
window.location.href = config.baseHost + "/v/userinfo";
|
||||
};
|
||||
const logout = () => {
|
||||
const url = "/cas/logout?service=" + window.location.href;
|
||||
const url = "/logout?service=" + window.location.href;
|
||||
window.location.href = config.ssoHost + url;
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -102,7 +102,7 @@ const columns = [
|
||||
Utils.operatingHandle(h, "编辑", "icon-edit", () => goEdit(p.row.id)),
|
||||
];
|
||||
if (p.row.status !== 1) {
|
||||
ops.push(Utils.operatingHandle(h, "发布", "icon-apps", () => doPublish(p.row)));
|
||||
ops.push(Utils.operatingHandle(h, "发布", "icon-fasong", () => doPublish(p.row)));
|
||||
}
|
||||
if (p.row.status === 1) {
|
||||
ops.push(Utils.operatingHandle(h, "下架", "icon-stop", () => doOffline(p.row)));
|
||||
|
||||
Reference in New Issue
Block a user