0
0

tree.html 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {volist name="data" id="v"}
  2. <style>
  3. .l1{
  4. color: var(--themeColor) !important;
  5. font-weight: bold;
  6. }
  7. </style>
  8. <tr>
  9. <td style="width: 60px;">{$v.id}</td>
  10. <td style="text-indent:{$depth * 2}em;">
  11. {if condition="isset($v['children']) && !empty($v['children'])"}
  12. <i class="glyphicon glyphicon-folder-open"></i>
  13. {else /}
  14. <i class="glyphicon glyphicon-list-alt"></i>
  15. {/if}
  16. <span class="l{$v.type}">{$v.name}</span>
  17. </td>
  18. <td style="width: 300px;">{$v.content}</td>
  19. <td style="width: 80px;">
  20. {if condition="$v['enable'] == 0"}
  21. <a href="{:url('changeEnable',['id'=>$v['id'],'enable'=>1])}" data-confirm="确定要启用该记录吗?" class="ajax-get confirm data-reload"><span class="label label-danger" title="禁用">禁用</span></a>
  22. {else /}
  23. <a href="{:url('changeEnable',['id'=>$v['id'],'enable'=>0])}" data-confirm="确定要禁用该记录吗?" class="ajax-get confirm data-reload"><span class="label label-success" title="启用">启用</span></a>
  24. {/if}
  25. </td>
  26. <td style="width: 80px;">{$v.sort}</td>
  27. <td style="width: 80px;">
  28. {if condition="$v['type'] == 0"} 总公司 {/if}
  29. {if condition="$v['type'] == 1"} 管理机构 {/if}
  30. {if condition="$v['type'] == 2"} 项目 {/if}
  31. </td>
  32. <td style="width: 300px;">
  33. {if condition="$v['type'] != 0"}
  34. <a url="{:url('edit',['id'=>$v['id']])}" href="javascript:;" data-title="编辑" onclick="layer_open(this,2)"><span class="label label-primary" title="编辑">编辑</span></a>
  35. {/if}
  36. {if condition="$v['type'] == 0"}
  37. <a url="{:url('add',['pid'=>$v['id'],'t'=>1])}" href="javascript:;" data-title="添加管理机构" onclick="layer_open(this,2)"><span class="label label-primary" title="添加管理机构">添加管理机构</span></a>
  38. {/if}
  39. {if condition="$v['type'] == 1"}
  40. <a url="{:url('add',['pid'=>$v['id'],'t'=>1])}" href="javascript:;" data-title="添加管理机构" onclick="layer_open(this,2)"><span class="label label-primary" title="添加管理机构">添加管理机构</span></a>
  41. <a url="{:url('add',['pid'=>$v['id'],'t'=>2])}" href="javascript:;" data-title="添加项目" onclick="layer_open(this,2)"><span class="label label-primary" title="添加项目">添加项目</span></a>
  42. {/if}
  43. {if condition="$v['type'] == 2"}
  44. <a url="{:url('auth',['id'=>$v['id']])}" href="javascript:;" data-title="授权" data-width="600px" onclick="layer_open(this)"><span class="label label-success" title="授权">授权</span></a>
  45. <a url="{:url('copyAuth',['id'=>$v['id']])}" href="javascript:;" data-title="复制授权" data-width="500px" data-height="500px" onclick="layer_open(this)"><span class="label label-success" title="复制授权">复制授权</span></a>
  46. {/if}
  47. {if condition="$v['type'] != 0"}
  48. <a href="{:url('del',['id'=>$v['id']])}" {if !btnAuth(session("user_auth.id"),"Org/del")} style="display:none" {/if} data-confirm="确定要删除该记录吗?" class="ajax-get confirm"><span class="label label-danger" title="删除">删除</span></a>
  49. {/if}
  50. </td>
  51. </tr>
  52. {if condition="isset($v['children']) && !empty($v['children'])"}
  53. {:widget_view('org/tree',['data'=>$v['children'],'depth'=>$depth + 1])}
  54. {/if}
  55. {/volist}