feat: 专业人员导航栏增加应急工单和值班小组菜单,适配多页面角色切换
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -224,6 +224,19 @@
|
||||
(function(){
|
||||
var params=new URLSearchParams(window.location.search);
|
||||
var role=params.get('role');
|
||||
if(role==='professional'){
|
||||
document.querySelector('.top-bar__logo').lastChild.textContent='\u00a0应急就医–专业人员';
|
||||
document.querySelector('.top-bar__nav').innerHTML=
|
||||
'<a href="../professional/professional.html">正在应急</a>'+
|
||||
'<a href="center-work-order.html?role=professional">应急工单</a>'+
|
||||
'<a href="center-schedule.html?role=professional" class="active">值班小组</a>';
|
||||
document.querySelector('.avatar').textContent='专';
|
||||
document.querySelector('.top-bar__right span:last-child').textContent='专业人员 ▾';
|
||||
var sidebar=document.querySelector('.sidebar');
|
||||
if(sidebar)sidebar.style.display='none';
|
||||
document.querySelector('.main').style.marginLeft='0';
|
||||
document.getElementById('btnEdit').style.display='none';
|
||||
}
|
||||
if(role==='operator'){
|
||||
document.title='应急就医 - 值班小组 | 健康长庆原型';
|
||||
document.querySelector('.top-bar__logo').lastChild.textContent='\u00a0应急就医–操作人员';
|
||||
|
||||
@@ -562,6 +562,20 @@ function addSummary(){
|
||||
(function(){
|
||||
var params=new URLSearchParams(window.location.search);
|
||||
var role=params.get('role');
|
||||
if(role==='professional'){
|
||||
document.querySelector('.top-bar__logo').lastChild.textContent='\u00a0应急就医–专业人员';
|
||||
document.querySelector('.top-bar__nav').innerHTML=
|
||||
'<a href="../professional/professional.html">正在应急</a>'+
|
||||
'<a href="center-work-order.html?role=professional" class="active">应急工单</a>'+
|
||||
'<a href="center-schedule.html?role=professional">值班小组</a>';
|
||||
document.querySelector('.avatar').textContent='专';
|
||||
document.querySelector('.top-bar__right span:last-child').textContent='专业人员 ▾';
|
||||
var sidebar=document.querySelector('.sidebar');
|
||||
if(sidebar)sidebar.style.display='none';
|
||||
document.querySelector('.main').style.marginLeft='0';
|
||||
var bc=document.querySelector('.breadcrumb a');
|
||||
if(bc)bc.href='center-work-order.html?role=professional';
|
||||
}
|
||||
if(role==='operator'){
|
||||
document.title='应急就医 - 工单详情 | 健康长庆原型';
|
||||
document.querySelector('.top-bar__logo').lastChild.textContent='\u00a0应急就医–操作人员';
|
||||
|
||||
@@ -409,6 +409,26 @@ tbody tr:hover{background:#F8FBFF;}
|
||||
(function(){
|
||||
var params=new URLSearchParams(window.location.search);
|
||||
var role=params.get('role');
|
||||
if(role==='professional'){
|
||||
/* Logo */
|
||||
document.querySelector('.top-bar__logo').lastChild.textContent='\u00a0应急就医–专业人员';
|
||||
/* 顶部导航 */
|
||||
document.querySelector('.top-bar__nav').innerHTML=
|
||||
'<a href="../professional/professional.html">正在应急</a>'+
|
||||
'<a href="center-work-order.html?role=professional" class="active">应急工单</a>'+
|
||||
'<a href="center-schedule.html?role=professional">值班小组</a>';
|
||||
/* 右侧角色 */
|
||||
document.querySelector('.avatar').textContent='专';
|
||||
document.querySelector('.top-bar__right span:last-child').textContent='专业人员 ▾';
|
||||
/* 隐藏侧边栏,调整主内容区 */
|
||||
var sidebar=document.querySelector('.sidebar');
|
||||
if(sidebar)sidebar.style.display='none';
|
||||
document.querySelector('.main').style.marginLeft='0';
|
||||
/* 详情链接传递角色 */
|
||||
document.querySelectorAll('a.link[href="center-work-order-detail.html"]').forEach(function(a){
|
||||
a.href='center-work-order-detail.html?role=professional';
|
||||
});
|
||||
}
|
||||
if(role==='operator'){
|
||||
/* 标题 */
|
||||
document.title='应急就医 - 应急工单 | 健康长庆原型';
|
||||
|
||||
@@ -266,6 +266,8 @@
|
||||
</div>
|
||||
<nav class="top-bar__nav">
|
||||
<a href="professional.html" class="active">正在应急</a>
|
||||
<a href="../admin/center-work-order.html?role=professional">应急工单</a>
|
||||
<a href="../admin/center-schedule.html?role=professional">值班小组</a>
|
||||
</nav>
|
||||
<div class="top-bar__right">
|
||||
<a class="btn-back" href="../../../index.html">
|
||||
|
||||
Reference in New Issue
Block a user