roleBatchEdit.html
6.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<div class="wrapper wrapper-content animated fadeInRight wo-wrap">
<div class="ibox relative">
<div class="ibox-title">
<h5>批量{{batchOper == '0' ? '添加':'删减'}}权限</h5>
</div>
<div class="ibox-content role-edit-wrap">
<form name="roleForm" class="form-inline" novalidate="">
<h4 class="role-bar-title">角色基础信息</h4>
<div class="role-main">
<div class="row">
<div class="col-lg-12">
<label class="control-label"><span class="required"></span>账号:</label>
<div class="form-group">
<textarea class="textarea form-control" rows="3" autocomplete="off" name="accountNames"
ng-model="accountNames" placeholder="以英文逗号分隔" style="width: 800px;height: 100px" required></textarea>
</div>
<div style="margin-left:100px;">
<p ng-show="isInValidate && roleForm.accountNames.$invalid" class="text-danger form-text">账号不能为空!</p>
</div>
</div>
</div>
</div>
<h4 class="role-bar-title">用户权限</h4>
<div class="row role-resource">
<ul class="tree-list">
<li class="tree-list-item bordered" ng-repeat="item in resourcesList">
<div style="display: flex" ng-class="item.code == '101' ? 'nothing':''">
<label style="flex-basis:auto;"><input icheck type="checkbox" ng-model="item.checked"
ng-change="rsChange(item, 1);">{{item.name}}</label>
<div ng-click="item.toggle = !item.toggle" style="flex:1;cursor: pointer;">
<span class="fa" ng-class="item.toggle?'fa-angle-up':'fa-angle-down'"
ng-show="item.sublist.length || item.functionList.length"></span>
</div>
</div>
<!-- 功能列表 -->
<div class="role-tree-panel" ng-if="item.functionList.length" ng-class="item.toggle?'active':''">
<div class="row" ng-repeat="func in item.functionList">
<label><input icheck type="checkbox" ng-model="func.checked"
ng-change="selectFunction(func,null,1,item);" />{{func.functionName}}</label>
<span style="margin-left: 20px;">(备注:{{func.functionRemark}})</span>
<div class="row-ct" ng-if="func.functionAttrType == 2 || func.functionAttrType == 4">
<label ng-repeat="funcVal in func.valueList" style="margin-left: 5px;">
<input icheck type="checkbox" ng-model="funcVal.checked"
ng-change="selectFunction(func,funcVal,1,item);">{{funcVal.valText ?
funcVal.valText:funcVal.valCode}}
</label>
</div>
</div>
</div>
<!-- 二级 -->
<ul class="sub-tree-list" ng-class="item.toggle?'active':''">
<li class="tree-list-item" ng-repeat="subitem in item.sublist">
<label><input icheck type="checkbox" name="" ng-model="subitem.checked"
ng-change="rsChange(subitem, 2);">{{subitem.name}}</label>
<span class="fa" ng-class="subitem.toggle?'fa-angle-up':'fa-angle-down'"
ng-click="subitem.toggle = !subitem.toggle" ng-show="subitem.sublist.length"></span>
<!-- 功能列表 -->
<div class="role-tree-panel" ng-if="subitem.functionList.length"
ng-class="subitem.toggle?'active':''">
<div class="row" ng-repeat="func in subitem.functionList">
<label><input icheck type="checkbox" ng-model="func.checked"
ng-change="selectFunction(func,null,2,subitem);" />{{func.functionName}}</label>
<span style="margin-left: 20px;">(备注:{{func.functionRemark}})</span>
<div class="row-ct" ng-if="func.functionAttrType == 2 || func.functionAttrType == 4">
<label ng-repeat="funcVal in func.valueList" style="margin-left: 5px;">
<input icheck type="checkbox" ng-model="funcVal.checked"
ng-change="selectFunction(func,funcVal,2,subitem);">{{funcVal.valText ?
funcVal.valText:funcVal.valCode}}
</label>
</div>
</div>
</div>
<!--三级 -->
<ul class="sub-tree-list" ng-class="subitem.toggle?'active':''">
<li class="tree-list-item" ng-repeat="thirditem in subitem.sublist">
<label><input icheck type="checkbox" name="" ng-model="thirditem.checked"
ng-change="rsChange(thirditem, 3);">{{thirditem.name}}</label>
<!-- 功能列表 -->
<div class="role-tree-panel" ng-if="thirditem.functionList.length"
ng-class="thirditem.toggle?'active':''">
<div class="row" ng-repeat="func in thirditem.functionList">
<label><input icheck type="checkbox" ng-model="func.checked"
ng-change="selectFunction(func,null,3,thirditem);" />{{func.functionName}}</label>
<span style="margin-left: 20px;">(备注:{{func.functionRemark}})</span>
<div class="row-ct" ng-if="func.functionAttrType == 2 || func.functionAttrType == 4">
<label ng-repeat="funcVal in func.valueList" style="margin-left: 5px;">
<input icheck type="checkbox" ng-model="funcVal.checked"
ng-change="selectFunction(func,funcVal,3,thirditem);">{{funcVal.valText ?
funcVal.valText:funcVal.valCode}}
</label>
</div>
</div>
</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</form>
</div>
</div>
</div>
<p class="bottom-control">
<button type="submit" ng-click="save()" class="btn btn-primary" ng-disabled="saveBtnDisabled">提交<i
class="fa fa-spinner fa-spin" ng-show="isSubmitting"></i></button>
<button type="button" ng-click="back()" class="btn btn-default">返回</button>
</p>
<style>
.nothing {
position: relative;
}
.nothing:after {
content: '';
position: absolute;
width: 100%;
height: 100%;
z-index: 9999;
background-color: rgba(255, 255, 255, 0);
}
</style>