人人商城

edit-modules-tpl.html 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. {template 'common/header'}
  2. <ol class="breadcrumb we7-breadcrumb">
  3. <a href="{url 'user/display'}"><i class="wi wi-back-circle"></i> </a>
  4. <li><a href="{url 'user/display'}">用户管理</a></li>
  5. <li>编辑用户详情</li>
  6. </ol>
  7. <div id="js-user-edit-modulestpl" ng-controller="UserEditModules" ng-cloak>
  8. <div class="user-head-info we7-padding-bottom" >
  9. <img ng-src="{{profile.avatar}}" class="img-circle user-avatar pull-left">
  10. <h3 class="pull-left" ng-bind="user.username"></h3>
  11. <div class="user-edit pull-right">
  12. {if $user['founder_groupid'] != ACCOUNT_MANAGE_GROUP_VICE_FOUNDER}
  13. <a href="javascript:;" class="btn btn-primary" ng-click="recycleUser()">禁用</a>
  14. {/if}
  15. </div>
  16. </div>
  17. <div class="btn-group we7-btn-group we7-padding-bottom">
  18. <a href="{php echo url('user/edit/edit_base', array('uid' => $_GPC['uid']))}" class="btn btn-default">基础信息</a>
  19. <a href="{php echo url('user/edit/edit_modules_tpl', array('uid' => $_GPC['uid']))}" class="btn btn-default active">应用模板权限</a>
  20. <a href="{php echo url('user/edit/edit_account', array('uid' => $_GPC['uid']))}" class="btn btn-default">使用账号列表</a>
  21. </div>
  22. <div class="panel we7-panel user-permission">
  23. <div class="panel-heading">
  24. <span>所属用户组:<span ng-bind="group_info.name"></span></span>
  25. <a href="javascript:;" class="color-default pull-right" data-toggle="modal" data-target="#group" ng-click="editGroup()">修改</a>
  26. </div>
  27. <div class="modal fade" id="group" role="dialog">
  28. <div class="we7-modal-dialog modal-dialog">
  29. <div class="modal-content">
  30. <div class="modal-header">
  31. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  32. <div class="modal-title">修改用户组</div>
  33. </div>
  34. <div class="modal-body">
  35. <div class="form-group">
  36. <select class="we7-select" ng-model="changeGroup">
  37. <option value="">请选择所属用户组</option>
  38. <option ng-value="group.id" ng-repeat="group in groups" ng-selected="group.id == group_info.id" ng-bind="group.name"></option>
  39. </select>
  40. <span class="help-block"></span>
  41. </div>
  42. </div>
  43. <div class="modal-footer">
  44. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange('groupid')">确定</button>
  45. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="panel-body" ng-repeat="(packid, pack) in group_info.package_detail">
  51. <div class="permission-heading">
  52. <span ng-bind="pack.name"></span>
  53. <span ng-if="packid == '-1'">所有服务</span>
  54. <div class="pull-right permission-edit" ng-style="{'width': 'auto'}">
  55. <a href="javascript:;" class="color-default js-unfold" data-toggle="collapse" data-target="#demo-{{packid}}" ng-click="changeText($event)">展开</a>
  56. </div>
  57. </div>
  58. <table id="demo-{{pack.id}}" class="table we7-table table-hover collapse" ng-if="packid != '-1'">
  59. <col width="90px" />
  60. <col width="835px" />
  61. <tr class="permission-apply">
  62. <td class="vertical-middle">公众号应用</td>
  63. <td>
  64. <ul>
  65. <li ng-repeat="module in pack.modules" class="col-sm-2 text-over text-left">
  66. <img ng-src="{{ module.logo }}" alt="">
  67. {{ module.title }}
  68. </li>
  69. </ul>
  70. </td>
  71. </tr>
  72. <tr class="permission-apply">
  73. <td class="vertical-middle">小程序应用</td>
  74. <td>
  75. <ul>
  76. <li ng-repeat="module in pack.wxapp" class="col-sm-2 text-over text-left">
  77. <img ng-src="{{ module.logo }}" alt="">
  78. {{ module.title }}
  79. </li>
  80. </ul>
  81. </td>
  82. </tr>
  83. <tr class="permission-apply">
  84. <td class="vertical-middle">PC应用</td>
  85. <td>
  86. <ul>
  87. <li ng-repeat="module in pack.webapp" class="col-sm-2 text-over text-left">
  88. <img ng-src="{{ module.logo }}" alt="">
  89. {{ module.title }}
  90. </li>
  91. </ul>
  92. </td>
  93. </tr>
  94. <tr class="permission-apply">
  95. <td class="vertical-middle">APP应用</td>
  96. <td>
  97. <ul>
  98. <li ng-repeat="module in pack.phonebapp" class="col-sm-2 text-over text-left">
  99. <img ng-src="{{ module.logo }}" alt="">
  100. {{ module.title }}
  101. </li>
  102. </ul>
  103. </td>
  104. </tr>
  105. <tr class="permission-template">
  106. <td class="vertical-middle">模板</td>
  107. <td><ul><li ng-repeat="tpl in pack.templates"><span class="label label-info" ng-bind="tpl.title"></span></li></ul></td>
  108. </tr>
  109. </table>
  110. <table id="demo-{{packid}}" class="table we7-table table-hover collapse" ng-if="packid == -1">
  111. <col width="90px" />
  112. <col width="835px" />
  113. <tr class="permission-apply">
  114. <td class="vertical-middle">应用</td>
  115. <td><ul><li><span class="label label-danger">系统所有模块</span></li></ul></td>
  116. </tr>
  117. <tr class="permission-template">
  118. <td class="vertical-middle">模板</td>
  119. <td><ul><li><span class="label label-danger">系统所有模板</span></li></ul></td>
  120. </tr>
  121. </table>
  122. </div>
  123. </div>
  124. <table class="table we7-table table-hover account-package-extra">
  125. <tr>
  126. <th colspan="5" class="text-left">
  127. <span class="we7-padding-right">附加权限</span>
  128. <span></span>
  129. </th>
  130. {if user_is_founder($_W['uid'])}
  131. <th class="text-right">
  132. <a class="color-default" data-toggle="modal" data-target="#jurisdiction-add">修改</a>
  133. </th>
  134. {/if}
  135. </tr>
  136. <tr>
  137. <td colspan="6">
  138. <div class="col-sm-1 color-gray text-left we7-padding-none">公众号应用</div>
  139. <div class="col-sm-11 js-extra-modules">
  140. <div class="col-sm-3 text-left we7-margin-bottom" ng-repeat="module in extend.modules_modules" ng-if="extend.modules_modules">
  141. <div ng-if="module.name != 'all'" class="text-over text-left">
  142. <img ng-src="{{ module.logo }}" alt="" style="width:50px;height:50px;">
  143. {{ module.title }}
  144. </div>
  145. </div>
  146. <div class="col-sm-3 text-left we7-margin-bottom" ng-if="!extend.modules_modules">
  147. <a href="javascript:;">---</a>
  148. </div>
  149. </div>
  150. </td>
  151. </tr>
  152. <tr>
  153. <td colspan="6">
  154. <div class="col-sm-1 color-gray text-left we7-padding-none">小程序应用</div>
  155. <div class="col-sm-11 js-extra-modules">
  156. <div class="col-sm-3 text-left we7-margin-bottom" ng-repeat="module in extend.wxapp_modules" ng-if="extend.wxapp_modules">
  157. <div class="text-over text-left">
  158. <img ng-src="{{ module.logo }}" alt="" style="width:50px;height:50px;">
  159. {{ module.title }}
  160. </div>
  161. </div>
  162. <div class="col-sm-3 text-left we7-margin-bottom" ng-if="!extend.wxapp_modules">
  163. <a href="javascript:;">---</a>
  164. </div>
  165. </div>
  166. </td>
  167. </tr>
  168. <tr>
  169. <td colspan="6">
  170. <div class="col-sm-1 color-gray text-left we7-padding-none">PC 应用</div>
  171. <div class="col-sm-11 js-extra-modules">
  172. <div class="col-sm-3 text-left we7-margin-bottom" ng-repeat="module in extend.webapp_modules" ng-if="extend.webapp_modules">
  173. <div class="text-over text-left">
  174. <img ng-src="{{ module.logo }}" alt="" style="width:50px;height:50px;">
  175. {{ module.title }}
  176. </div>
  177. </div>
  178. <div class="col-sm-3 text-left we7-margin-bottom" ng-if="!extend.webapp_modules">
  179. <a href="javascript:;">---</a>
  180. </div>
  181. </div>
  182. </td>
  183. </tr>
  184. <tr>
  185. <td colspan="6">
  186. <div class="col-sm-1 color-gray text-left we7-padding-none">APP 应用</div>
  187. <div class="col-sm-11 js-extra-modules">
  188. <div class="col-sm-3 text-left we7-margin-bottom" ng-repeat="module in extend.phoneapp_modules" ng-if="extend.phoneapp_modules">
  189. <div class="text-over text-left">
  190. <img ng-src="{{ module.logo }}" alt="" style="width:50px;height:50px;">
  191. {{ module.title }}
  192. </div>
  193. </div>
  194. <div class="col-sm-3 text-left we7-margin-bottom" ng-if="!extend.phoneapp_modules">
  195. <a href="javascript:;">---</a>
  196. </div>
  197. </div>
  198. </td>
  199. </tr>
  200. <tr>
  201. <td colspan="6">
  202. <div class="col-sm-1 color-gray text-left we7-padding-none">熊掌应用</div>
  203. <div class="col-sm-11 js-extra-modules">
  204. <div class="col-sm-3 text-left we7-margin-bottom" ng-repeat="module in extend.xzapp_modules" ng-if="extend.xzapp_modules">
  205. <div class="text-over text-left">
  206. <img ng-src="{{ module.logo }}" alt="" style="width:50px;height:50px;">
  207. {{ module.title }}
  208. </div>
  209. </div>
  210. <div class="col-sm-3 text-left we7-margin-bottom" ng-if="!extend.xzapp_modules">
  211. <a href="javascript:;">---</a>
  212. </div>
  213. </div>
  214. </td>
  215. </tr>
  216. <tr>
  217. <td colspan="6">
  218. <div class="col-sm-1 color-gray text-left we7-padding-none">模板</div>
  219. <div class="col-sm-11 js-extra-templates">
  220. <div class="col-sm-3 text-left we7-margin-bottom" ng-repeat="module in extend.templates" ng-if="extend.templates">
  221. <a href="javascript:;" class="label label-info" ng-bind="module.title"></a>
  222. </div>
  223. <div class="col-sm-3 text-left we7-margin-bottom" ng-if="!extend.templates">
  224. <a href="javascript:;">---</a>
  225. </div>
  226. </div>
  227. </td>
  228. </tr>
  229. </table>
  230. <div class="uploader-modal modal fade module" id="jurisdiction-add">
  231. <div class="modal-dialog modal-lg">
  232. <div class="modal-content ">
  233. <div class="modal-header">
  234. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  235. <h4 class="modal-title" id="myModalLabel2">选择</h4>
  236. </div>
  237. <div class="modal-body material-content clearfix">
  238. <div class="material-nav">
  239. <a href="javascript:;" ng-if="user_modules.account" ng-click="tabChange('account')" ng-class="{true:'active',false:''}[jurindex=='account']" >公众号应用</a>
  240. <a href="javascript:;" ng-if="user_modules.wxapp" ng-click="tabChange('wxapp')" ng-class="{true:'active',false:''}[jurindex=='wxapp']" >小程序应用</a>
  241. <a href="javascript:;" ng-if="user_modules.webapp" ng-click="tabChange('webapp')" ng-class="{true:'active',false:''}[jurindex=='webapp']" >PC 应用</a>
  242. <a href="javascript:;" ng-if="user_modules.phoneapp" ng-click="tabChange('phoneapp')" ng-class="{true:'active',false:''}[jurindex=='phoneapp']" >APP 应用</a>
  243. <a href="javascript:;" ng-if="user_modules.xzapp" ng-click="tabChange('xzapp')" ng-class="{true:'active',false:''}[jurindex=='xzapp']" >熊掌号应用</a>
  244. <a href="javascript:;" ng-if="templates" ng-click="tabChange('template')" ng-class="{true:'active',false:''}[jurindex=='template']">微站模板</a>
  245. </div>
  246. <div class="material-body" ng-show="jurindex!='template'" id="content-modules" style="height: 560px;">
  247. <div class="row">
  248. <div class="col-sm-2" ng-repeat="item in modules">
  249. <div class="item"
  250. ng-click="itemclick(item.name)"
  251. ng-class="{true:'active',false:''}[item.checked == 1]"
  252. onclick="$(this).toggleClass('active')">
  253. <img ng-src="{{item.logo}}" alt="" class="icon"/>
  254. <div class="name" ng-bind="item.title"></div>
  255. <div class="mask">
  256. <span class="wi wi-right"></span>
  257. </div>
  258. </div>
  259. </div>
  260. </div>
  261. </div>
  262. <div class="material-body" ng-show="jurindex=='template'" id="content-templates" style="height: 560px;">
  263. <div class="row">
  264. <div class="col-sm-2" ng-repeat="temp in templates">
  265. <div ng-click="itemclick(temp.id)"
  266. class="item"
  267. ng-class="{true:'active',false:''}[temp.checked == 1]"
  268. onclick="$(this).toggleClass('active')"
  269. >
  270. <i class="wi wi-home" style="color: #ddd;font-size: 48px;position:relative; top:-15px; margin: 0;"></i>
  271. <div class="name" ng-bind="temp.title"></div>
  272. <div class="mask">
  273. <span class="wi wi-right"></span>
  274. </div>
  275. </div>
  276. </div>
  277. </div>
  278. </div>
  279. </div>
  280. <div class="material-pager text-right clearfix" style="padding: 10px">
  281. <div class="pull-left we7-form">
  282. <input type="checkbox" id="selected-all" ng-model="allmodule" ng-change="allmodulechange(allmodule)">
  283. <label for="selected-all">全选</label>
  284. </div>
  285. <div class="js-pager">
  286. <ul class="pagination">
  287. </ul>
  288. </div>
  289. </div>
  290. <div class="modal-footer">
  291. <button type="button" class="btn btn-primary" ng-click="addExtend()">确定</button>
  292. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  293. </div>
  294. </div>
  295. </div>
  296. </div>
  297. </div>
  298. <script type="text/javascript">
  299. angular.module('userManageApp').value('config', {
  300. user: {php echo !empty($user) ? json_encode($user) : 'null'},
  301. profile: {php echo !empty($profile) ? json_encode($profile) : 'null'},
  302. group_info: {php echo !empty($group_info) ? json_encode($group_info) : 'null'},
  303. groups: {php echo !empty($groups) ? json_encode($groups) : 'null'},
  304. extend: {php echo !empty($extend) ? json_encode($extend) : 'null'},
  305. user_modules: {php echo !empty($user_modules) ? json_encode($user_modules) : 'null'},
  306. source_templates: {php echo !empty($templates) ? json_encode($templates) : 'null'},
  307. extend_modules: {php echo !empty($extend_permission['modules']) ? json_encode($extend_permission['modules']) : 'null'},
  308. links: {
  309. editGroup: "{php echo url('user/edit/edit_modules_tpl')}",
  310. editUsersPermission: "{php echo url('user/edit/edit_users_permission')}",
  311. recycleUser: "{php echo url('user/display/operate', array('type' => 'recycle'))}",
  312. },
  313. });
  314. angular.bootstrap($('#js-user-edit-modulestpl'), ['userManageApp']);
  315. </script>
  316. {template 'common/footer'}