edit.html 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <style>
  2. .treebody {
  3. margin: 5px 0px 5px 20px;
  4. }
  5. </style>
  6. <div class="modal" tabindex="-1" role="dialog">
  7. <div class="modal-dialog" style="width: 500px;">
  8. <div class="card">
  9. <div class="header" dragable-header>
  10. <button type="button" class="close" ng-click="$hide()">&times;</button>
  11. <h4 class="modal-title">{{params.title}}</h4>
  12. </div>
  13. <div activate-input activate-select class="body">
  14. <form class="form-horizontal" role="form" id="roleform"
  15. name="roleform" ng-submit="saveData(roleform.$valid)" novalidate>
  16. <div class="dj-formtable">
  17. <table class="dj-table">
  18. <tr>
  19. <th>角色名称:</th>
  20. <td colspan="1" ng-class="{ 'has-error' : this.roleform.roleName.$invalid && this.roleform.$submitted}">
  21. <input type="text"
  22. name="roleName" ng-model="role.RoleName"
  23. class="form-control" ng-required="true" />
  24. <span ng-show="this.roleform.roleName.$invalid && this.roleform.$submitted"
  25. class="error">必填</span>
  26. </td>
  27. </tr>
  28. <tr>
  29. <th>角色描述:</th>
  30. <td colspan="1">
  31. <input type="text" name="description" class="form-control" ng-model="role.Description"/>
  32. </td>
  33. </tr>
  34. <tr>
  35. <th class="col-md-3" rowspan="9">权限管理:</th>
  36. <td>
  37. <table style="border-collapse:collapse; width:100%;text-align: left;margin-top:5px;">
  38. <tr class="treebody" style="list-style:none; border-bottom:1.5px ridge #eee" ng-repeat="code in PcodeLists" ng-include="'node.html'">
  39. </table>
  40. </td>
  41. </tr>
  42. </table>
  43. </div>
  44. <div class="form_foot">
  45. <button type="button" class="btn btn-default" ng-click="$hide()">取消</button>
  46. <button type="submit" class="btn btn-primary" form="roleform">保存</button>
  47. </div>
  48. </form>
  49. <script type="text/ng-template" id="node.html">
  50. <li class="row" style="padding:0px 15px">
  51. <span>
  52. <a href="" class="glyphicon {{code.changeClass}}" ng-click="getCodeByPCode(code)"></a>
  53. <input type="checkbox" ng-model="code.isChecked" ng-change="chkchildren(code)" />
  54. <span class="ModulesSpan" style="cursor: pointer; margin-top:2px;">{{code.myCode.FunctionName}}</span>
  55. </span>
  56. </li>
  57. <div>
  58. <div class="treebody" ng-if="code.changeShow" ng-repeat="code in code.childCode" ng-include="'node.html'" style="cursor: pointer;"></div>
  59. </div>
  60. </script>
  61. </div>
  62. </div>
  63. </div>
  64. </div>