修改 js 的命名风格
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
<div ms-controller="user_list" class="col-md-9">
|
||||
<h1>User</h1>
|
||||
<div class="text-right">
|
||||
<div ms-controller="userList" class="col-md-9">
|
||||
<h1>用户管理</h1>
|
||||
|
||||
<div class="right">
|
||||
<form class="form-inline" onsubmit="return false;">
|
||||
<div class="form-group-sm">
|
||||
<label>搜索</label>
|
||||
<input name="keyWord" class="form-control" placeholder="请输入关键词" ms-duplex="key_word">
|
||||
<input type="submit" value="搜索" class="btn btn-primary" ms-click="getPage(1)">
|
||||
<input name="keyWord" class="form-control" placeholder="请输入关键词" ms-duplex="keyWord">
|
||||
<input type="submit" value="搜索" class="btn btn-primary" ms-click="search()">
|
||||
</div>
|
||||
</form>
|
||||
<br>
|
||||
@@ -21,16 +22,16 @@
|
||||
<th>用户类型</th>
|
||||
<th>修改</th>
|
||||
</tr>
|
||||
<tr ms-repeat="user_list">
|
||||
<td>{{el.id}}</td>
|
||||
<td>{{el.username}}</td>
|
||||
<td>{{el.create_time|date("yyyy-MM-dd HH:mm:ss")}}</td>
|
||||
<td>{{el.last_login|date("yyyy-MM-dd HH:mm:ss")}}</td>
|
||||
<td>{{el.real_name}}</td>
|
||||
<td>{{el.email}}</td>
|
||||
<td>{{user_type[el.admin_type]}}</td>
|
||||
<tr ms-repeat="userList">
|
||||
<td>{{ el.id }}</td>
|
||||
<td>{{ el.username }}</td>
|
||||
<td>{{ el.create_time|date("yyyy-MM-dd HH:mm:ss")}}</td>
|
||||
<td>{{ el.last_login|date("yyyy-MM-dd HH:mm:ss")}}</td>
|
||||
<td>{{ el.real_name }}</td>
|
||||
<td>{{ el.email }}</td>
|
||||
<td>{{ userType[el.admin_type]}}</td>
|
||||
<td>
|
||||
<button class="btn-sm btn-info" ms-click="enEdit(el)">编辑</button>
|
||||
<button class="btn-sm btn-info" ms-click="editUser(el)">编辑</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -38,12 +39,13 @@
|
||||
<label>仅显示管理员 <input ms-duplex-checked="showAdminOnly" type="checkbox"/></label>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
页数:{{page}}/{{page_count}}
|
||||
<button ms-attr-class="getBtnClass(0)" ms-click="getPrevious">上一页</button>
|
||||
<button ms-attr-class="getBtnClass(1)" ms-click="getNext">下一页</button>
|
||||
页数:{{ page }}/{{ totalPage }}
|
||||
<button ms-attr-class="getBtnClass('pre')" ms-click="getPrevious">上一页</button>
|
||||
<button ms-attr-class="getBtnClass('next')" ms-click="getNext">下一页</button>
|
||||
</div>
|
||||
<div ms-visible="isEditing">
|
||||
<div ms-visible="editingUserId">
|
||||
<h3>修改用户信息</h3>
|
||||
|
||||
<form id="edit_user-form">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-4"><label>ID</label>
|
||||
@@ -53,7 +55,7 @@
|
||||
<input name="username" type="text" class="form-control" ms-duplex="username">
|
||||
</div>
|
||||
<div class="form-group col-md-4"><label>真实姓名</label>
|
||||
<input name="real_name" type="text" class="form-control" ms-duplex="real_name">
|
||||
<input name="real_name" type="text" class="form-control" ms-duplex="realName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -65,8 +67,8 @@
|
||||
<input name="email" type="email" class="form-control" ms-duplex="email">
|
||||
</div>
|
||||
<div class="form-group col-md-4"><label>用户类型</label>
|
||||
<select name="admin_type" class="form-control" ms-duplex="admin_type">
|
||||
<option ms-repeat="user_type" ms-attr-value="$index">{{el}}</option>
|
||||
<select name="admin_type" class="form-control" ms-duplex="adminType">
|
||||
<option ms-repeat="userType" ms-attr-value="$index">{{ el }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -76,4 +78,4 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/js/app/admin/user/user_list.js"></script>
|
||||
<script src="/static/js/app/admin/user/userList.js"></script>
|
||||
Reference in New Issue
Block a user