tree.html 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. {/if}
  40. {if condition="$v['type'] != 0"}
  41. <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>
  42. {/if}
  43. </td>
  44. </tr>
  45. {if condition="isset($v['children']) && !empty($v['children'])"}
  46. {:widget_view('org/tree',['data'=>$v['children'],'depth'=>$depth + 1])}
  47. {/if}
  48. {/volist}