Dateien
ziqim/zhiqim_manager/resource/zview/zhiqim_manager/dept.zml
T
2025-02-20 14:59:35 +08:00

93 Zeilen
4.3 KiB
Plaintext

<#-- 显示子部门,并递归显示下级子部门 -->
<#function showChildDept(self, parent)>
<tr class="z-h30 z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
<td>
<#if ZmrAdminRule.check(request)>
<input name="deptId" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${self.self().getDeptId()}">
</#if>
</td>
<td>${self.self().getDeptId()}</td>
<td align="left" class="zi-pd-l6">
<#var level = self.self().getDeptLevel()/>
<#if level == 0>
<i class="z-ico z-tree z-30 z-normal z-root z-mg-r3"></i>
<#else>
<#for i : 1..(level-1)>
<#if self.isLastNode(level-i)>
<i class="z-ico z-tree z-30 z-normal z-blank"></i>
<#else>
<i class="z-ico z-tree z-30 z-normal z-vertline"></i>
</#if>
</#for>
<#if self.isLastNode()>
<i class="z-ico z-tree z-30 z-normal z-lastnode"></i>
<#else>
<i class="z-ico z-tree z-30 z-normal z-node"></i>
</#if>
<i class="z-ico z-tree z-item z-mg-r3"></i>
</#if>
#{self.self().getDeptName()}
</td>
<td><#if self.self().getDeptStatus() == 0>正常<#else><span class="z-color-red">停用</span></#if></td>
<td>${self.self().getDeptLevel()}</td>
<td>${self.self().getDeptManager()}</td>
<td>${self.self().getDeptSubManager()}</td>
</tr>
<#for child : self.children()>
${showChildDept(child, self)}
</#for>
</#function>
${zhiqim_manager_breadcrumb("部门管理")}
${zhiqim_manager_content()}
<#-- 导航 -->
<div class="z-tabnav-main z-mg-b20 ${zmr_color_class}">
<nav>
<ul>
<#if ZmrPathRule.check(request, "/"+zhiqim_manager+"/org.htm")><li onclick="Z.L.href('org.htm');">组织管理</li></#if>
<#if ZmrPathRule.check(request, "/"+zhiqim_manager+"/orgRule.htm")><li onclick="Z.L.href('orgRule.htm');">组织权限</li></#if>
<li class="z-active">部门管理</li>
<#if ZmrPathRule.check(request, "/"+zhiqim_manager+"/deptOperator.htm")><li onclick="Z.L.href('deptOperator.htm');">部门成员</li></#if>
<#if ZmrPathRule.check(request, "/"+zhiqim_manager+"/deptRule.htm")><li onclick="Z.L.href('deptRule.htm');">部门权限</li></#if>
</ul>
<div class="z-float-right z-mg-t10 z-mg-r5">
<#if ZmrAdminRule.check(request)>
<#if ZmrPathRule.check(request, "/"+zhiqim_manager+"/deptAdd.htm")><button class="z-button ${zmr_color_class}" onclick="Z.L.check('deptAdd.htm', 'deptId');"><i class="z-font z-add"></i>增加下级部门</button></#if>
<#if ZmrPathRule.check(request, "/"+zhiqim_manager+"/deptModify.htm")><button class="z-button ${zmr_color_class}" onclick="Z.L.check('deptModify.htm', 'deptId');"><i class="z-font z-modify"></i>修改部门</button></#if>
<#if ZmrPathRule.check(request, "/"+zhiqim_manager+"/deptDelete.htm")><button class="z-button z-red" onclick="Z.L.confirm('deptDelete.htm', '确认要删除该部门?', 'deptId', zCallFrame);"><i class="z-font z-delete"></i>删除部门</button></#if>
</#if>
</div>
</nav>
</div>
<#-- 列表 -->
<table class="z-table z-bordered z-h30-tr z-text-center z-bg-white">
<tr class="zi-h40" bgcolor="${zmr_thead_bgcolor}">
<td width="50">选择</td>
<td width="200">部门编号</td>
<td width="*">部门名称</td>
<td width="10%">部门状态</td>
<td width="10%">部门级别</td>
<td width="10%">部门负责人</td>
<td width="15%">部门副负责人</td>
</tr>
<#if size == 0>
${zhiqim_manager_no_record(6, "暂时没有部门信息")}
<#else>
<tr class="z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
<td><#if ZmrAdminRule.check(request)><input name="deptId" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${tree.self().getDeptId()}"></#if></td>
<td>${tree.self().getDeptId()}</td>
<td align="left" class="zi-pd-l6 <#if !tree.hasChildren()>zi-pd4</#if>"><i class="z-ico z-tree z-normal <#if tree.hasChildren()>z-30 z-root<#else>zi-h22</#if> z-mg-r3"></i> #{tree.self().getDeptName()}</td>
<td><#if tree.self().getDeptStatus() == 0>正常<#else><span class="z-color-red">停用</span></#if></td>
<td>${tree.self().getDeptLevel()}</td>
<td>${tree.self().getDeptManager()}</td>
<td>${tree.self().getDeptSubManager()}</td>
</tr>
<#for child : tree.children()>
${showChildDept(child, tree)}
</#for>
</#if>
</table>
${zhiqim_manager_list(size)}
${zhiqim_manager_content_end()}