tree.html 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {volist name="data" id="v"}
  2. <tr>
  3. <td style="width: 60px;">{$v.id}</td>
  4. <td style="text-indent:{$depth * 2}em;">
  5. {if condition="isset($v['children']) && !empty($v['children'])"}
  6. <i class="glyphicon glyphicon-folder-open"></i>
  7. {else /}
  8. <i class="glyphicon glyphicon-list-alt"></i>
  9. {/if}
  10. {$v.name}
  11. </td>
  12. <td style="width: 110px;">{$v.content}</td>
  13. <td style="width: 80px;">
  14. {if condition="$v['enable'] == 0"}
  15. <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>
  16. {else /}
  17. <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>
  18. {/if}
  19. </td>
  20. <td style="width: 80px;">{$v.sort}</td>
  21. <td style="width: 80px;">
  22. {if condition="$v['type'] == 0"} 总公司 {/if}
  23. {if condition="$v['type'] == 1"} 管理机构 {/if}
  24. {if condition="$v['type'] == 2"} 项目 {/if}
  25. </td>
  26. <td style="width: 300px;">
  27. {if condition="$v['type'] != 0"}
  28. <a url="{:url('edit',['id'=>$v['id']])}" href="javascript:;" data-title="编辑" onclick="layer_open(this,2)"><span class="label label-primary" title="编辑">编辑</span></a>
  29. {/if}
  30. {if condition="$v['type'] == 0"}
  31. <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>
  32. {/if}
  33. {if condition="$v['type'] == 1"}
  34. <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>
  35. <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>
  36. {/if}
  37. {if condition="$v['type'] == 2"}
  38. <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>
  39. <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>
  40. {/if}
  41. {if condition="$v['type'] != 0"}
  42. <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>
  43. {/if}
  44. </td>
  45. </tr>
  46. {if condition="isset($v['children']) && !empty($v['children'])"}
  47. {:widget_view('org/tree',['data'=>$v['children'],'depth'=>$depth + 1])}
  48. {/if}
  49. {/volist}