| | |
| | | <script type="text/html" id="user-table-bar"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-xs" lay-event="reset">重置密码</a> |
| | | <a class="layui-btn layui-btn-xs" lay-event="org">分配组织</a> |
| | | <a class="layui-btn layui-btn-xs" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | |
| | | headers:{'Authorization': 'Bearer ' + config.getToken().access_token}, |
| | | page: true, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'id', sort: true, title: '用户编号'}, |
| | | {field: 'username', sort: true, title: '账号'}, |
| | | {field: 'nickname', sort: true, title: '用户名'}, |
| | | {field: 'mobile', sort: true, title: '手机号'}, |
| | | {sort: true, title: '性别',templet:function (d) { |
| | | return d.sex==0?"男":"女" |
| | | }}, |
| | | { field: 'id', sort: true, width: 200, title: '标识' }, |
| | | { field: 'username', sort: true, width: 100, title: '账号' }, |
| | | { field: 'nickname', sort: true, width: 200, title: '用户名' }, |
| | | { field: 'mobile', sort: true, width: 150, title: '手机号' }, |
| | | { |
| | | sort: true, templet: function (d) { |
| | | sort: true, title: '性别', templet: function (d) { |
| | | return d.sex == 0 ? "男" : "女" |
| | | }, width: 100 |
| | | }, |
| | | { |
| | | sort: true, width: 200, templet: function (d) { |
| | | return util.toDateString(d.createTime); |
| | | }, title: '创建时间' |
| | | }, |
| | | {field: 'enabled',width: 100, sort: true, templet: '#user-tpl-state', title: '状态'}, |
| | | {fixed: 'right', align: 'center', toolbar: '#user-table-bar', title: '操作', width: 195} |
| | | { fixed: 'right', align: 'center', toolbar: '#user-table-bar', title: '操作', width: 300 } |
| | | ]] |
| | | }); |
| | | |
| | |
| | | } |
| | | }, 'delete'); |
| | | }); |
| | | } else if (layEvent === "org") { |
| | | admin.putTempData('t_user', data); |
| | | admin.popupCenter({ |
| | | title: "分配组织", |
| | | path: 'pages/system/user_org_form.html', |
| | | finish: function () { |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |