wip(semantic):调整模板文件内容
This commit is contained in:
@@ -19,6 +19,7 @@ class Departments(Resource):
|
||||
"status": {"code": 200, "message": "默认"},
|
||||
"data": marshal(dept_data, dept_fields)
|
||||
}
|
||||
print(dept_data)
|
||||
return jsonify(res)
|
||||
|
||||
@authorize("admin:dept:add", log=True)
|
||||
|
||||
@@ -3,7 +3,7 @@ from flask import session, redirect, url_for, request
|
||||
from flask_login import current_user, login_user
|
||||
from flask_restful import Resource, reqparse
|
||||
|
||||
from applications.common.admin_log import login_log
|
||||
from applications.common.admin_log import login_log, admin_log
|
||||
from applications.common.gen_captcha import add_auth_session
|
||||
from applications.common.utils.http import fail_api, success_api
|
||||
from applications.models import CompanyUser
|
||||
|
||||
@@ -8,13 +8,13 @@ from applications.view import index_bp
|
||||
@index_bp.get('/dept')
|
||||
@authorize("admin:dept:main", log=True)
|
||||
def dept_index():
|
||||
return render_template('admin/department/main.html')
|
||||
return render_template('admin/department/dept.html')
|
||||
|
||||
|
||||
@index_bp.get('/dept/add')
|
||||
@authorize("admin:dept:add", log=True)
|
||||
def add():
|
||||
return render_template('admin/department/add.html')
|
||||
return render_template('admin/department/dept_add.html')
|
||||
|
||||
|
||||
@index_bp.get('/dept/edit')
|
||||
@@ -22,4 +22,4 @@ def add():
|
||||
def edit():
|
||||
dept_id = request.args.get("deptId", type=int)
|
||||
dept = CompanyDepartment.query.get(dept_id)
|
||||
return render_template('admin/department/edit.html', dept=dept)
|
||||
return render_template('admin/department/dept_edit.html', dept=dept)
|
||||
|
||||
@@ -22,7 +22,7 @@ def login_log():
|
||||
page = request.args.get('page', type=int)
|
||||
limit = request.args.get('limit', type=int)
|
||||
log_paginate = AdminLog.query.filter_by(
|
||||
url='/passport/login').order_by(
|
||||
url='/api/v1/passport/login').order_by(
|
||||
desc(AdminLog.create_at)).paginate(
|
||||
page=page, per_page=limit, error_out=False)
|
||||
data = marshal(log_paginate.items, log_fields)
|
||||
@@ -36,7 +36,7 @@ def operate_log():
|
||||
page = request.args.get('page', type=int)
|
||||
limit = request.args.get('limit', type=int)
|
||||
log_paginate = AdminLog.query.filter(
|
||||
AdminLog.url != '/passport/login').order_by(
|
||||
AdminLog.url != '/api/v1/passport/login').order_by(
|
||||
desc(AdminLog.create_at)).paginate(
|
||||
page=page, per_page=limit, error_out=False)
|
||||
data = marshal(log_paginate.items, log_fields)
|
||||
|
||||
@@ -15,10 +15,10 @@ def main():
|
||||
|
||||
|
||||
# 角色授权操作
|
||||
@role_bp.get('/power/<int:_id>')
|
||||
@role_bp.get('/power/<int:role_id>')
|
||||
@authorize("admin:role:power", log=True)
|
||||
def power(_id):
|
||||
return render_template('admin/roles/roles_power.html', id=_id)
|
||||
def power(role_id):
|
||||
return render_template('admin/roles/roles_power.html', role_id=role_id)
|
||||
|
||||
|
||||
# 角色编辑
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>部门管理</title>
|
||||
{% include 'admin/common/header.html' %}
|
||||
</head>
|
||||
<body>
|
||||
<form class="layui-form" action="">
|
||||
<div class="mainBox">
|
||||
<div class="main-container">
|
||||
<div class="main-container">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">上级部门</label>
|
||||
<div class="layui-input-block">
|
||||
<ul id="selectParent" name="parentId" class="dtree" data-id="0"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="deptName" lay-verify="title" autocomplete="off" placeholder="请输入标题"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">负责人</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="leader" lay-verify="title" autocomplete="off" placeholder="请输入标题"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">邮箱</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="email" lay-verify="title" autocomplete="off" placeholder="请输入标题"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">联系方式</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="phone" lay-verify="title" autocomplete="off" placeholder="请输入标题"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="status" value="1" title="开启">
|
||||
<input type="radio" name="status" value="0" title="关闭" checked>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="sort" lay-verify="title" autocomplete="off" placeholder="请输入标题"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">详细地址</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea placeholder="请输入描述" name="address" class="layui-textarea"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="dept-save">
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
<button type="reset" class="pear-btn pear-btn-sm">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% include 'admin/common/footer.html' %}
|
||||
<script type="module">
|
||||
import { DEPARTMENT_API } from '/static/api/http.js'
|
||||
|
||||
layui.use(['form', 'jquery', 'dtree'], function () {
|
||||
let form = layui.form
|
||||
let $ = layui.jquery
|
||||
let dtree = layui.dtree
|
||||
|
||||
/*添加数据 渲染下拉选择组件*/
|
||||
dtree.renderSelect({
|
||||
elem: '#selectParent',
|
||||
url: DEPARTMENT_API.DEPARTMENTS(),
|
||||
method: 'get',
|
||||
selectInputName: { nodeId: 'parentId', context: 'parentName' },
|
||||
skin: 'layui',
|
||||
dataFormat: 'list',
|
||||
response: { treeId: 'deptId', parentId: 'parentId', title: 'deptName' },
|
||||
selectInitVal: '1'
|
||||
})
|
||||
|
||||
/*添加数据 表单组件,提交按钮之后触发的事件*/
|
||||
form.on('submit(dept-save)', function (data) {
|
||||
$.ajax({
|
||||
url: DEPARTMENT_API.DEPARTMENTS(),
|
||||
data: JSON.stringify(data.field),
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
type: 'post',
|
||||
success: function (result) {
|
||||
if (result.success) {
|
||||
layer.msg(result.msg, { icon: 1, time: 1000 }, function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name))
|
||||
parent.render()
|
||||
})
|
||||
} else {
|
||||
layer.msg(result.msg, { icon: 2, time: 1000 })
|
||||
}
|
||||
}
|
||||
})
|
||||
return false
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -30,7 +30,6 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
{#表格字段渲染#}
|
||||
@@ -38,6 +37,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{#表格工具栏,需要在表格中绑定,且需要自定义事件#}
|
||||
<script type="text/html" id="toolbaes">
|
||||
{% if authorize("admin:dept:edit") %}
|
||||
@@ -53,7 +53,6 @@
|
||||
</button>
|
||||
{% endif %}
|
||||
</script>
|
||||
|
||||
{#操作字段,需要在表格中使用#}
|
||||
<script type="text/html" id="tools">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="tools_edit">
|
||||
@@ -63,7 +62,6 @@
|
||||
<i class="layui-icon layui-icon-delete"></i>
|
||||
</button>
|
||||
</script>
|
||||
|
||||
{#表格内的切换按钮#}
|
||||
<script type="text/html" id="dept-status">
|
||||
<input type="checkbox"
|
||||
@@ -75,7 +73,6 @@
|
||||
{{ "{{# if(d.status==1){ }} checked {{# } }}" }}>
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
@@ -214,7 +211,7 @@
|
||||
title: '新增',
|
||||
shade: 0.1,
|
||||
area: ['450px', '500px'], /*新增窗口的大小*/
|
||||
content: MODULE_PATH + 'add' /*新增窗口从那里来*/
|
||||
content: '/dept/add' /*新增窗口从那里来*/
|
||||
})
|
||||
}
|
||||
|
||||
@@ -254,4 +251,5 @@
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,128 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>部门管理</title>
|
||||
{% include 'admin/common/header.html' %}
|
||||
</head>
|
||||
<body>
|
||||
<form class="layui-form" action="">
|
||||
<div class="mainBox">
|
||||
<div class="main-container">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">上级部门</label>
|
||||
<div class="layui-input-block">
|
||||
<ul id="selectParent" name="parentId" class="dtree" data-id="0"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="deptName" lay-verify="title" autocomplete="off" placeholder="请输入部门名称"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">负责人</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="leader" lay-verify="title" autocomplete="off" placeholder="请输入负责人名字"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">邮箱</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="email" lay-verify="title" autocomplete="off" placeholder="请输入邮箱地址"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">联系方式</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="phone" lay-verify="title" autocomplete="off" placeholder="请输入联系方式(电话号码)"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="status" value="1" title="开启">
|
||||
<input type="radio" name="status" value="0" title="关闭" checked>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="sort" lay-verify="title" autocomplete="off" placeholder="请输入排序序号(数字)"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">详细地址</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea placeholder="请输入详细地址" name="address" class="layui-textarea"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="dept-save">
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
<button type="reset" class="pear-btn pear-btn-sm">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="module">
|
||||
import { DEPARTMENT_API } from '/static/api/http.js'
|
||||
|
||||
layui.use(['form', 'jquery', 'dtree'], function () {
|
||||
let form = layui.form
|
||||
let $ = layui.jquery
|
||||
let dtree = layui.dtree
|
||||
|
||||
/*添加数据 渲染下拉选择组件*/
|
||||
dtree.renderSelect({
|
||||
elem: '#selectParent',
|
||||
url: DEPARTMENT_API.DEPARTMENTS(),
|
||||
method: 'get',
|
||||
selectInputName: { nodeId: 'parentId', context: 'parentName' },
|
||||
skin: 'layui',
|
||||
dataFormat: 'list',
|
||||
response: { treeId: 'deptId', parentId: 'parentId', title: 'deptName' },
|
||||
selectInitVal: '1'
|
||||
})
|
||||
|
||||
/*添加数据 表单组件,提交按钮之后触发的事件*/
|
||||
form.on('submit(dept-save)', function (data) {
|
||||
$.ajax({
|
||||
url: DEPARTMENT_API.DEPARTMENTS(),
|
||||
data: JSON.stringify(data.field),
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
type: 'post',
|
||||
success: function (result) {
|
||||
if (result.success) {
|
||||
layer.msg(result.msg, { icon: 1, time: 1000 }, function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name))
|
||||
parent.render()
|
||||
})
|
||||
} else {
|
||||
layer.msg(result.msg, { icon: 2, time: 1000 })
|
||||
}
|
||||
}
|
||||
})
|
||||
return false
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,129 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>部门修改</title>
|
||||
{% include 'admin/common/header.html' %}
|
||||
</head>
|
||||
<body>
|
||||
<form class="layui-form" action="">
|
||||
<div class="mainBox">
|
||||
<div class="main-container">
|
||||
<div class="layui-form-item layui-hide">
|
||||
<label class="layui-form-label">编号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ dept.id }}" name="deptId" lay-verify="required|number"
|
||||
autocomplete="off" placeholder="请输入部门编号" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ dept.dept_name }}" name="deptName" lay-verify="required"
|
||||
autocomplete="off" placeholder="请输入部门名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">负责人</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ dept.leader }}" name="leader" autocomplete="off"
|
||||
placeholder="请输入负责人名字"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">邮箱</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ dept.email }}" name="email" autocomplete="off"
|
||||
placeholder="请输入邮箱地址"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">联系方式</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ dept.phone }}" name="phone" autocomplete="off"
|
||||
placeholder="请输入联系方式(电话号码)"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="status" {% if dept.status == 1 %}checked{% endif %}
|
||||
value="1"
|
||||
title="开启">
|
||||
|
||||
<input type="radio" name="status" {% if dept.status == 0 %}checked{% endif %}
|
||||
value="0"
|
||||
title="关闭">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="sort" value="{{ dept.sort }}" lay-verify="required|number"
|
||||
autocomplete="off"
|
||||
placeholder="请输入排序序号(数字)"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">描述</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea placeholder="请输入详细地址" name="address"
|
||||
class="layui-textarea">{{ dept.address }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit=""
|
||||
lay-filter="dept-update">
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
<button type="reset" class="pear-btn pear-btn-sm">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="module">
|
||||
import { DEPARTMENT_API } from '/static/api/http.js'
|
||||
|
||||
layui.use(['form', 'jquery'], function () {
|
||||
let form = layui.form
|
||||
let $ = layui.jquery
|
||||
|
||||
// 修改数据 当点击更新之后,获取数据
|
||||
form.on('submit(dept-update)', function (data) {
|
||||
$.ajax({
|
||||
url: DEPARTMENT_API.DEPARTMENT(data.field.deptId),
|
||||
data: JSON.stringify(data.field),
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
type: 'put',
|
||||
success: function (result) {
|
||||
if (result.success) {
|
||||
layer.msg(result.msg, { icon: 1, time: 1000 }, function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name))//关闭当前页
|
||||
parent.render()
|
||||
})
|
||||
} else {
|
||||
layer.msg(result.msg, { icon: 2, time: 1000 })
|
||||
}
|
||||
}
|
||||
})
|
||||
return false
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,128 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>部门修改</title>
|
||||
{% include 'admin/common/header.html' %}
|
||||
</head>
|
||||
<body>
|
||||
<form class="layui-form" action="">
|
||||
<div class="mainBox">
|
||||
<div class="main-container">
|
||||
<div class="main-container">
|
||||
<div class="layui-form-item layui-hide">
|
||||
<label class="layui-form-label">编号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ dept.id }}" name="deptId" lay-verify="title"
|
||||
autocomplete="off" placeholder="请输入标题" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ dept.dept_name }}" name="deptName" lay-verify="title"
|
||||
autocomplete="off" placeholder="请输入标题" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">负责人</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ dept.leader }}" name="leader" lay-verify="title" autocomplete="off"
|
||||
placeholder="请输入标题"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">邮箱</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ dept.email }}" name="email" lay-verify="title" autocomplete="off"
|
||||
placeholder="请输入标题"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">联系方式</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ dept.phone }}" name="phone" lay-verify="title" autocomplete="off"
|
||||
placeholder="请输入标题"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
|
||||
<input type="radio" name="status" {% if dept.status == 1 %}checked{% endif %} value="1"
|
||||
title="开启">
|
||||
|
||||
<input type="radio" name="status" {% if dept.status == 0 %}checked{% endif %} value="0"
|
||||
title="关闭"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="sort" value="{{ dept.sort }}" lay-verify="title" autocomplete="off"
|
||||
placeholder="请输入标题"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">描述</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea placeholder="请输入详细地址" name="address"
|
||||
class="layui-textarea">{{ dept.address }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit=""
|
||||
lay-filter="dept-update">
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
<button type="reset" class="pear-btn pear-btn-sm">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% include 'admin/common/footer.html' %}
|
||||
<script type="module">
|
||||
import { DEPARTMENT_API } from '/static/api/http.js'
|
||||
|
||||
layui.use(['form', 'jquery'], function () {
|
||||
let form = layui.form
|
||||
let $ = layui.jquery
|
||||
// 修改数据 当点击更新之后,获取数据
|
||||
form.on('submit(dept-update)', function (data) {
|
||||
$.ajax({
|
||||
url: DEPARTMENT_API.DEPARTMENT(data.field.deptId),
|
||||
data: JSON.stringify(data.field),
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
type: 'put',
|
||||
success: function (result) {
|
||||
if (result.success) {
|
||||
layer.msg(result.msg, { icon: 1, time: 1000 }, function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name))//关闭当前页
|
||||
parent.render()
|
||||
})
|
||||
} else {
|
||||
layer.msg(result.msg, { icon: 2, time: 1000 })
|
||||
}
|
||||
}
|
||||
})
|
||||
return false
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
<script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -10,25 +10,26 @@
|
||||
<table id="tables" lay-filter="tables"></table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="text/html" id="toolbar">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="add">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="toolbar-add">
|
||||
<i class="layui-icon layui-icon-add-1"></i>
|
||||
新增
|
||||
</button>
|
||||
<button class="pear-btn pear-btn-sm" lay-event="batchRemove">
|
||||
<button class="pear-btn pear-btn-sm" lay-event="toolbar-remove">
|
||||
<i class="layui-icon layui-icon-delete"></i>
|
||||
删除
|
||||
</button>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="tools">
|
||||
<button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i
|
||||
class="layui-icon layui-icon-delete"></i></button>
|
||||
<button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="tools-remove">
|
||||
<i class="layui-icon layui-icon-delete"></i>
|
||||
</button>
|
||||
</script>
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
<script type="module">
|
||||
import { FILE_API } from '/static/api/http.js'
|
||||
|
||||
@@ -63,7 +64,7 @@
|
||||
unresize: true,
|
||||
align: 'center',
|
||||
templet: (d) => {
|
||||
return `<img class="photo" style="max-width: 100%;height: 100%;cursor: pointer;" lay-event="photo" src="${d.href}"></i>`
|
||||
return `<img class="tools-photo" style="max-width: 100%;height: 100%;cursor: pointer;" lay-event="photo" src="${d.href}"></i>`
|
||||
},
|
||||
|
||||
},
|
||||
@@ -111,7 +112,7 @@
|
||||
})
|
||||
|
||||
table.on('tool(tables)', function (obj) {
|
||||
if (obj.event === 'remove') {
|
||||
if (obj.event === 'tool-remove') {
|
||||
window.remove(obj)
|
||||
} else if (obj.event === 'photo') {
|
||||
window.photo(obj)
|
||||
@@ -119,11 +120,11 @@
|
||||
})
|
||||
|
||||
table.on('toolbar(tables)', function (obj) {
|
||||
if (obj.event === 'add') {
|
||||
if (obj.event === 'toolbar-add') {
|
||||
window.add()
|
||||
} else if (obj.event === 'refresh') {
|
||||
window.refresh()
|
||||
} else if (obj.event === 'batchRemove') {
|
||||
} else if (obj.event === 'toolbar-remove') {
|
||||
window.batchRemove(obj)
|
||||
}
|
||||
})
|
||||
@@ -264,4 +265,5 @@
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,10 +3,6 @@
|
||||
<head>
|
||||
{% include 'admin/common/header.html' %}
|
||||
<style>
|
||||
.pear-container {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 10px;
|
||||
}
|
||||
@@ -33,7 +29,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="module">
|
||||
import { FILE_API } from '/static/api/http.js'
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
</div>
|
||||
</body>
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="text/html" id="log-createTime">
|
||||
{{ ' {{layui.util.toDateString(d.create_at, "yyyy-MM-dd HH:mm:ss")}' |safe }}}
|
||||
@@ -38,7 +39,7 @@
|
||||
<span style="color: red">失败</span>
|
||||
{{# } }}'|safe }}
|
||||
</script>
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script>
|
||||
layui.use(['table', 'form', 'jquery', 'element', 'util'], function () {
|
||||
let table = layui.table
|
||||
@@ -77,37 +78,6 @@
|
||||
skin: 'line',
|
||||
toolbar: false,
|
||||
})
|
||||
|
||||
form.on('submit(dict-type-query)', function (data) {
|
||||
table.reload('dict-type-table', { where: data.field })
|
||||
return false
|
||||
})
|
||||
|
||||
table.on('tool(log-operate-table)', function (obj) {
|
||||
if (obj.event === 'details') {
|
||||
window.info(obj)
|
||||
}
|
||||
})
|
||||
|
||||
table.on('tool(log-login-table)', function (obj) {
|
||||
if (obj.event === 'details') {
|
||||
window.info(obj)
|
||||
}
|
||||
})
|
||||
|
||||
window.info = function (obj) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '详细信息',
|
||||
shade: 0,
|
||||
area: ['400px', '400px'],
|
||||
content: MODULE_PATH + 'info',
|
||||
success: function (layero) {
|
||||
let iframeWin = window[layero.find('iframe')[0]['name']]
|
||||
iframeWin.show(obj.data)
|
||||
},
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
@@ -27,34 +27,32 @@
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<table id="power_table" lay-filter="power_table"></table>
|
||||
<table id="tables" lay-filter="tables"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="text/html" id="power-toolbar">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="add">
|
||||
<script type="text/html" id="toolbar">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="toolbar-add">
|
||||
<i class="layui-icon layui-icon-add-1"></i>
|
||||
新增
|
||||
</button>
|
||||
<button class="pear-btn pear-btn-md" lay-event="batchRemove">
|
||||
<button class="pear-btn pear-btn-md" lay-event="toolbar-remove">
|
||||
<i class="layui-icon layui-icon-delete"></i>
|
||||
删除
|
||||
</button>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="power-bar">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="edit"><i
|
||||
<script type="text/html" id="tool">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="tool-edit"><i
|
||||
class="layui-icon layui-icon-edit"></i>
|
||||
</button>
|
||||
<button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i
|
||||
<button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="tool-remove"><i
|
||||
class="layui-icon layui-icon-delete"></i>
|
||||
</button>
|
||||
</script>
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
<script type="module">
|
||||
import { RIGHTS_API } from '/static/api/http.js'
|
||||
|
||||
@@ -76,8 +74,8 @@
|
||||
skin: 'line',
|
||||
method: 'post',
|
||||
treeDefaultClose: true,
|
||||
toolbar: '#power-toolbar',
|
||||
elem: '#power_table',
|
||||
toolbar: '#toolbar',
|
||||
elem: '#tables',
|
||||
url: RIGHTS_API.RIGHTS(),
|
||||
page: false,
|
||||
cols: [
|
||||
@@ -87,11 +85,11 @@
|
||||
{ field: 'icon', title: '图标', templet: (d) => `<i class="layui-icon ${d.icon}"></i>` },
|
||||
{
|
||||
field: 'powerType', title: '权限类型', templet: (d) => {
|
||||
if (d.powerType == '0') {
|
||||
if (d.powerType === '0') {
|
||||
return `<span>目录</span>`
|
||||
} else if (d.powerType == '1') {
|
||||
} else if (d.powerType === '1') {
|
||||
return `<span>菜单</span>`
|
||||
} else if (d.powerType == '2') {
|
||||
} else if (d.powerType === '2') {
|
||||
return `<span>按钮</span>`
|
||||
}
|
||||
},
|
||||
@@ -99,12 +97,12 @@
|
||||
{
|
||||
field: 'enable', title: '是否可用', templet: (d) => {
|
||||
// TODO 修改禁用启动逻辑
|
||||
return `<input type="checkbox" name="enable" value="${d.powerId}" lay-skin="switch" lay-text="启用|禁用" lay-filter="power_enable" ${d.enable ===
|
||||
return `<input type="checkbox" name="enable" value="${d.powerId}" lay-skin="switch" lay-text="启用|禁用" lay-filter="tool-switch" ${d.enable ===
|
||||
1 ? 'checked=checked' : ''}>`
|
||||
},
|
||||
},
|
||||
{ field: 'sort', title: '排序' },
|
||||
{ title: '操作', templet: '#power-bar', width: 150, align: 'center' },
|
||||
{ title: '操作', templet: '#tool', width: 150, align: 'center' },
|
||||
],
|
||||
],
|
||||
})
|
||||
@@ -114,7 +112,7 @@
|
||||
|
||||
form.on('submit(power_query)', function (data) {
|
||||
var keyword = data.field.powerName
|
||||
var $tds = $('#power_table').next('.treeTable').find('.layui-table-body tbody tr td')
|
||||
var $tds = $('#tables').next('.treeTable').find('.layui-table-body tbody tr td')
|
||||
if (!keyword) {
|
||||
$tds.css('background-color', 'transparent')
|
||||
layer.msg('请输入关键字', { icon: 5 })
|
||||
@@ -135,30 +133,30 @@
|
||||
if (searchCount === 0) {
|
||||
layer.msg('没有匹配结果', { icon: 5 })
|
||||
} else {
|
||||
treetable.expandAll('#power_table')
|
||||
treetable.expandAll('#tables')
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
table.on('tool(power_table)', function (obj) {
|
||||
if (obj.event === 'remove') {
|
||||
window.remove(obj)
|
||||
} else if (obj.event === 'edit') {
|
||||
window.edit(obj)
|
||||
table.on('tool(tables)', function (obj) {
|
||||
if (obj.event === 'tool-remove') {
|
||||
window.tool_remove(obj)
|
||||
} else if (obj.event === 'tool-edit') {
|
||||
window.tool_edit(obj)
|
||||
}
|
||||
})
|
||||
|
||||
table.on('toolbar(power_table)', function (obj) {
|
||||
if (obj.event === 'add') {
|
||||
window.add()
|
||||
table.on('toolbar(tables)', function (obj) {
|
||||
if (obj.event === 'toolbar-add') {
|
||||
window.toolbar_add()
|
||||
} else if (obj.event === 'refresh') {
|
||||
window.refresh()
|
||||
} else if (obj.event === 'batchRemove') {
|
||||
window.batchRemove(obj)
|
||||
} else if (obj.event === 'toolbar-remove') {
|
||||
window.toolbar_remove(obj)
|
||||
}
|
||||
})
|
||||
|
||||
form.on('switch(power_enable)', function (obj) {
|
||||
form.on('switch(tool-switch)', function (obj) {
|
||||
let operate
|
||||
if (obj.elem.checked) {
|
||||
operate = 1 /*启用*/
|
||||
@@ -183,24 +181,17 @@
|
||||
})
|
||||
})
|
||||
|
||||
window.add = function () {
|
||||
window.toolbar_add = function () {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '新增',
|
||||
shade: 0.1,
|
||||
area: ['450px', '500px'],
|
||||
content: 'rights/add',
|
||||
})
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: '新增',
|
||||
shade: 0.1,
|
||||
area: ['450px', '500px'],
|
||||
content: $('#add_view'),
|
||||
content: '/rights/add',
|
||||
})
|
||||
}
|
||||
|
||||
window.edit = function (obj) {
|
||||
window.tool_edit = function (obj) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '修改',
|
||||
@@ -209,7 +200,7 @@
|
||||
content: '/rights/power/' + obj.data['powerId'],
|
||||
})
|
||||
}
|
||||
window.remove = function (obj) {
|
||||
window.tool_remove = function (obj) {
|
||||
layer.confirm('确定要删除该权限', { icon: 3, title: '提示' }, function (index) {
|
||||
layer.close(index)
|
||||
let loading = layer.load()
|
||||
@@ -232,7 +223,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
window.batchRemove = function (obj) {
|
||||
window.toolbar_remove = function (obj) {
|
||||
let data = table.checkStatus(obj.config.id).data
|
||||
if (data.length === 0) {
|
||||
layer.msg('未选中数据', {
|
||||
@@ -242,7 +233,7 @@
|
||||
return false
|
||||
}
|
||||
var ids = []
|
||||
var hasCheck = table.checkStatus('power_table')
|
||||
var hasCheck = table.checkStatus('tables')
|
||||
var hasCheckData = hasCheck.data
|
||||
if (hasCheckData.length > 0) {
|
||||
$.each(hasCheckData, function (index, element) {
|
||||
@@ -293,4 +284,5 @@
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -83,9 +83,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="module">
|
||||
import { RIGHTS_API } from 'static/api/http.js'
|
||||
import { RIGHTS_API } from '/static/api/http.js'
|
||||
|
||||
layui.use(['form', 'jquery', 'iconPicker', 'dtree'], function () {
|
||||
let form = layui.form
|
||||
@@ -93,16 +96,15 @@
|
||||
let iconPicker = layui.iconPicker
|
||||
let dtree = layui.dtree
|
||||
|
||||
{#添加权限数据页面#}
|
||||
dtree.renderSelect({
|
||||
elem: '#select_parent_dept',
|
||||
elem: '#selectParent',
|
||||
url: RIGHTS_API.RIGHTS(),
|
||||
method: 'get',
|
||||
selectInputName: { nodeId: 'parentId', context: 'powerName' },
|
||||
skin: 'layui',
|
||||
dataFormat: 'list',
|
||||
response: { treeId: 'powerId', parentId: 'parentId', title: 'powerName' }, //修改response中返回数据的定义
|
||||
selectInitVal: '0',
|
||||
selectInitVal: '0'
|
||||
})
|
||||
|
||||
form.on('radio(powerType)', function () {
|
||||
@@ -129,7 +131,7 @@
|
||||
form.on('submit(power-save)', function (data) {
|
||||
data.field.icon = 'layui-icon ' + data.field.icon
|
||||
$.ajax({
|
||||
url: '/admin/power/save',
|
||||
url: RIGHTS_API.POWER(0),
|
||||
data: JSON.stringify(data.field),
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
@@ -143,7 +145,7 @@
|
||||
} else {
|
||||
layer.msg(result.msg, { icon: 2, time: 1000 })
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
return false
|
||||
})
|
||||
@@ -162,10 +164,9 @@
|
||||
// 点击回调
|
||||
click: function (data) {
|
||||
console.log(data)
|
||||
},
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,12 +7,11 @@
|
||||
<body>
|
||||
<form class="layui-form" action="">
|
||||
<div class="mainBox">
|
||||
<div class="main-container">
|
||||
<div class="main-container">
|
||||
<div class="layui-form-item layui-hide">
|
||||
<label class="layui-form-label">编号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ power.id }}" name="powerId" lay-verify="title"
|
||||
<input type="text" value="{{ power.id }}" name="powerId"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -25,7 +24,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ power.name }}" name="powerName" lay-verify="title"
|
||||
<input type="text" value="{{ power.name }}" name="powerName"
|
||||
autocomplete="off" placeholder="权限名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -81,7 +80,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="power-save">
|
||||
@@ -95,7 +93,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="module">
|
||||
|
||||
import { RIGHTS_API } from '/static/api/http.js'
|
||||
@@ -201,7 +202,5 @@
|
||||
window.init("{{ power.type }}")
|
||||
})
|
||||
</script>
|
||||
<script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -30,92 +30,39 @@
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<table id="role-table" lay-filter="role-table"></table>
|
||||
<table id="tables" lay-filter="tables"></table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<form id="add_view" class="layui-form" action="" style="display: none">
|
||||
<div class="mainBox">
|
||||
<div class="main-container">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="roleName" lay-verify="title" autocomplete="off" placeholder="请输入标题"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标识</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="roleCode" lay-verify="title" autocomplete="off" placeholder="请输入标题"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="enable" value="0" title="开启">
|
||||
<input type="radio" name="enable" value="1" title="关闭" checked>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="sort" lay-verify="title" autocomplete="off" placeholder="请输入标题"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">描述</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea placeholder="请输入描述" name="details" class="layui-textarea"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="role-save">
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
<button type="reset" class="pear-btn pear-btn-sm">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="text/html" id="role-toolbar">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="add">
|
||||
|
||||
<script type="text/html" id="toolbar">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="toolbar-add">
|
||||
<i class="layui-icon layui-icon-add-1"></i>
|
||||
新增
|
||||
</button>
|
||||
<button class="pear-btn pear-btn-md" lay-event="batchRemove">
|
||||
<button class="pear-btn pear-btn-md" lay-event="toolbar-remove">
|
||||
<i class="layui-icon layui-icon-delete"></i>
|
||||
删除
|
||||
</button>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="role-bar">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="edit"><i
|
||||
<script type="text/html" id="tool">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="tool-edit"><i
|
||||
class="layui-icon layui-icon-edit"></i>
|
||||
</button>
|
||||
<button class="pear-btn pear-btn-warming pear-btn-sm" lay-event="power"><i
|
||||
<button class="pear-btn pear-btn-warming pear-btn-sm" lay-event="tool-power"><i
|
||||
class="layui-icon layui-icon-vercode"></i>
|
||||
</button>
|
||||
<button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i
|
||||
<button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="tool-remove"><i
|
||||
class="layui-icon layui-icon-delete"></i>
|
||||
</button>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="role-enable">
|
||||
<script type="text/html" id="tool-switch">
|
||||
<input type="checkbox" name="enable" value="{{ "{{d.id}}" }}" lay-skin="switch" lay-text="启用|禁用"
|
||||
lay-filter="role-enable" {{ "{{# if(d.enable==1){ }} checked {{# } }}" }}>
|
||||
lay-filter="tool-switch" {{ "{{# if(d.enable==1){ }} checked {{# } }}" }}>
|
||||
</script>
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="module">
|
||||
import { ROLE_API } from '/static/api/http.js'
|
||||
|
||||
@@ -131,19 +78,19 @@
|
||||
{ title: '角色名', field: 'roleName', align: 'center', width: 100 },
|
||||
{ title: 'Key值', field: 'roleCode', align: 'center' },
|
||||
{ title: '描述', field: 'details', align: 'center' },
|
||||
{ title: '是否可用', field: 'enable', align: 'center', templet: '#role-enable' },
|
||||
{ title: '是否可用', field: 'enable', align: 'center', templet: '#tool-switch' },
|
||||
{ title: '排序', field: 'sort', align: 'center' },
|
||||
{ title: '操作', toolbar: '#role-bar', align: 'center', width: 195 },
|
||||
{ title: '操作', toolbar: '#tool', align: 'center', width: 195 },
|
||||
],
|
||||
]
|
||||
|
||||
table.render({
|
||||
elem: '#role-table',
|
||||
elem: '#tables',
|
||||
url: ROLE_API.ROLES(),
|
||||
page: true,
|
||||
cols: cols,
|
||||
skin: 'line',
|
||||
toolbar: '#role-toolbar',
|
||||
toolbar: '#toolbar',
|
||||
defaultToolbar: [
|
||||
{
|
||||
layEvent: 'refresh',
|
||||
@@ -151,32 +98,32 @@
|
||||
}, 'filter', 'print', 'exports'],
|
||||
})
|
||||
|
||||
table.on('tool(role-table)', function (obj) {
|
||||
if (obj.event === 'remove') {
|
||||
window.remove(obj)
|
||||
} else if (obj.event === 'edit') {
|
||||
window.edit(obj)
|
||||
} else if (obj.event === 'power') {
|
||||
window.power(obj)
|
||||
table.on('tool(tables)', function (obj) {
|
||||
if (obj.event === 'tool-remove') {
|
||||
window.tool_remove(obj)
|
||||
} else if (obj.event === 'tool-edit') {
|
||||
window.tool_edit(obj)
|
||||
} else if (obj.event === 'tool-power') {
|
||||
window.tool_power(obj)
|
||||
}
|
||||
})
|
||||
|
||||
table.on('toolbar(role-table)', function (obj) {
|
||||
if (obj.event === 'add') {
|
||||
window.add()
|
||||
table.on('toolbar(tables)', function (obj) {
|
||||
if (obj.event === 'toolbar-add') {
|
||||
window.toolbar_add()
|
||||
} else if (obj.event === 'refresh') {
|
||||
window.refresh()
|
||||
} else if (obj.event === 'batchRemove') {
|
||||
window.batchRemove(obj)
|
||||
} else if (obj.event === 'toolbar-remove') {
|
||||
window.toolbar_remove(obj)
|
||||
}
|
||||
})
|
||||
|
||||
form.on('submit(role-query)', function (data) {
|
||||
table.reload('role-table', { where: data.field })
|
||||
table.reload('tables', { where: data.field })
|
||||
return false
|
||||
})
|
||||
|
||||
form.on('switch(role-enable)', function (obj) {
|
||||
form.on('switch(tool-switch)', function (obj) {
|
||||
let operate
|
||||
if (obj.elem.checked) {
|
||||
operate = 1
|
||||
@@ -201,7 +148,7 @@
|
||||
})
|
||||
})
|
||||
|
||||
window.add = function () {
|
||||
window.toolbar_add = function () {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '新增',
|
||||
@@ -211,7 +158,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
window.power = function (obj) {
|
||||
window.tool_power = function (obj) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '授权',
|
||||
@@ -221,7 +168,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
window.edit = function (obj) {
|
||||
window.tool_edit = function (obj) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '修改',
|
||||
@@ -231,7 +178,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
window.remove = function (obj) {
|
||||
window.tool_remove = function (obj) {
|
||||
layer.confirm('确定要删除该角色', { icon: 3, title: '提示' }, function (index) {
|
||||
layer.close(index)
|
||||
let loading = layer.load()
|
||||
@@ -253,7 +200,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
window.batchRemove = function (obj) {
|
||||
window.toolbar_remove = function (obj) {
|
||||
let data = table.checkStatus(obj.config.id).data
|
||||
if (data.length === 0) {
|
||||
layer.msg('未选中数据', {
|
||||
@@ -263,7 +210,7 @@
|
||||
return false
|
||||
}
|
||||
var ids = []
|
||||
var hasCheck = table.checkStatus('role-table')
|
||||
var hasCheck = table.checkStatus('tables')
|
||||
var hasCheckData = hasCheck.data
|
||||
if (hasCheckData.length > 0) {
|
||||
$.each(hasCheckData, function (index, element) {
|
||||
@@ -287,7 +234,7 @@
|
||||
layer.close(loading)
|
||||
if (result.success) {
|
||||
popup.success(result.msg, function () {
|
||||
table.reload('role-table')
|
||||
table.reload('tables')
|
||||
})
|
||||
} else {
|
||||
popup.failure(result.msg)
|
||||
@@ -298,9 +245,10 @@
|
||||
}
|
||||
|
||||
window.refresh = function () {
|
||||
table.reload('role-table')
|
||||
table.reload('tables')
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -6,19 +6,18 @@
|
||||
<body>
|
||||
<form class="layui-form" action="">
|
||||
<div class="mainBox">
|
||||
<div class="main-container">
|
||||
<div class="main-container">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="roleName" lay-verify="title" autocomplete="off" placeholder="请输入标题"
|
||||
<input type="text" name="roleName" lay-verify="title" autocomplete="off" placeholder="请输入名称"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标识</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="roleCode" lay-verify="title" autocomplete="off" placeholder="请输入标题"
|
||||
<input type="text" name="roleCode" lay-verify="title" autocomplete="off" placeholder="请输入标识"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -32,7 +31,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="sort" lay-verify="title" autocomplete="off" placeholder="请输入标题"
|
||||
<input type="text" name="sort" lay-verify="title" autocomplete="off" placeholder="请输入排序序号(数字)"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -44,7 +43,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="role-save">
|
||||
@@ -58,7 +56,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="module">
|
||||
import { ROLE_API } from '/static/api/http.js'
|
||||
|
||||
|
||||
@@ -12,21 +12,21 @@
|
||||
<label class="layui-form-label">编号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ role.id }}" name="roleId" lay-verify="title"
|
||||
autocomplete="off" placeholder="请输入标题" class="layui-input">
|
||||
autocomplete="off" placeholder="请输入编号" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ role.name }}" name="roleName" lay-verify="title"
|
||||
autocomplete="off" placeholder="请输入标题" class="layui-input">
|
||||
autocomplete="off" placeholder="请输入名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标识</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ role.code }}" readonly name="roleCode" lay-verify="title"
|
||||
autocomplete="off" placeholder="请输入标题" class="layui-input">
|
||||
autocomplete="off" placeholder="请输入标识" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
@@ -42,14 +42,14 @@
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="sort" value="{{ role.sort }}" lay-verify="title" autocomplete="off"
|
||||
placeholder="请输入标题"
|
||||
placeholder="请输入排序序号(数字)"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">描述</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea placeholder="请输入内容" name="details"
|
||||
<textarea placeholder="请输入描述" name="details"
|
||||
class="layui-textarea">{{ role.details }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
@@ -70,8 +70,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
</body>
|
||||
|
||||
<script type="module">
|
||||
|
||||
import { ROLE_API } from '/static/api/http.js'
|
||||
@@ -102,4 +104,5 @@
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -25,7 +25,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="module">
|
||||
|
||||
import { ROLE_API } from '/static/api/http.js'
|
||||
@@ -38,7 +41,7 @@
|
||||
dtree.render({
|
||||
elem: '#role-power',
|
||||
method: 'get',
|
||||
url: ROLE_API.ROLE_POWER({{id}}),
|
||||
url: ROLE_API.ROLE_POWER({{role_id}}),
|
||||
dataFormat: 'list',
|
||||
checkbar: true,
|
||||
skin: 'layui',
|
||||
@@ -55,7 +58,7 @@
|
||||
ids += id + ','
|
||||
}
|
||||
ids = ids.substr(0, ids.length - 1)
|
||||
data.field.roleId = {{id}};
|
||||
data.field.roleId = {{role_id}};
|
||||
data.field.powerIds = ids
|
||||
|
||||
$.ajax({
|
||||
|
||||
@@ -179,8 +179,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'admin/common/footer.html' %}
|
||||
</body>
|
||||
|
||||
<form id="edit_password_view" class="layui-form" action="" style="display: none">
|
||||
<div class="mainBox">
|
||||
@@ -233,6 +231,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="module">
|
||||
import { USER_API } from '/static/api/http.js'
|
||||
|
||||
@@ -311,4 +313,5 @@
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<input type="text" hidden value="{{ current_user.id }}" id="user_id">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
<script type="module">
|
||||
import { USER_API } from '/static/api/http.js'
|
||||
@@ -127,3 +127,5 @@
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -46,55 +46,53 @@
|
||||
<div class="user-main user-collasped">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<table id="user-table" lay-filter="user-table"></table>
|
||||
<table id="tables" lay-filter="tables"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
{# 表格操作 #}
|
||||
<script type="text/html" id="user-toolbar">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="add">
|
||||
<script type="text/html" id="toolbar">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="toolbar-add">
|
||||
<i class="pear-icon pear-icon-add"></i>
|
||||
新增
|
||||
</button>
|
||||
<button class="pear-btn pear-btn-md" lay-event="batchRemove">
|
||||
<button class="pear-btn pear-btn-md" lay-event="toolbar-remove">
|
||||
<i class="pear-icon pear-icon-ashbin"></i>
|
||||
删除
|
||||
</button>
|
||||
<button class="pear-btn pear-btn-md" lay-event="collasped">
|
||||
<button class="pear-btn pear-btn-md" lay-event="toolbar-collasped">
|
||||
<i class="pear-icon pear-icon-modular"></i>
|
||||
高级
|
||||
</button>
|
||||
</script>
|
||||
|
||||
{# 用户修改操作 #}
|
||||
<script type="text/html" id="user-bar">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="edit"><i class="pear-icon pear-icon-edit"></i>
|
||||
<script type="text/html" id="tool">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="tool-edit">
|
||||
<i class="pear-icon pear-icon-edit"></i>
|
||||
</button>
|
||||
<button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i
|
||||
class="pear-icon pear-icon-ashbin"></i>
|
||||
<button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="tool-remove">
|
||||
<i class="pear-icon pear-icon-ashbin"></i>
|
||||
</button>
|
||||
</script>
|
||||
|
||||
{# 启动与禁用 #}
|
||||
<script type="text/html" id="user-enable">
|
||||
<script type="text/html" id="tool-switch">
|
||||
<input type="checkbox" name="enable" value="{{ "{{ d.id }}" }}" lay-skin="switch" lay-text="启用|禁用"
|
||||
lay-filter="user-enable"
|
||||
lay-filter="tool-switch"
|
||||
{{ "{{# if(d.enable==1){ }} checked {{# } }}" }} />
|
||||
</script>
|
||||
|
||||
{# 用户注册时间 #}
|
||||
<script type="text/html" id="user-createTime">
|
||||
{{ ' {{layui.util.toDateString(d.create_at, "yyyy-MM-dd HH:mm:ss")}' |safe }}}
|
||||
</script>
|
||||
|
||||
{# 用户更新时间 #}
|
||||
<script type="text/html" id="user-updateTime">
|
||||
{{ ' {{layui.util.toDateString(d.update_at, "yyyy-MM-dd HH:mm:ss")}' |safe }}}
|
||||
</script>
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="module">
|
||||
import { USER_API, ROLE } from '/static/api/http.js'
|
||||
|
||||
@@ -113,22 +111,22 @@
|
||||
{ title: '姓名', field: 'realname', align: 'center', width: 110 },
|
||||
{ title: '账号', field: 'username', align: 'center' },
|
||||
{ title: '部门', field: 'dept', align: 'center' },
|
||||
{ title: '启用', field: 'enable', align: 'center', templet: '#user-enable', width: 120 },
|
||||
{ title: '启用', field: 'enable', align: 'center', templet: '#tool-switch', width: 120 },
|
||||
{ title: '注册时间', field: 'create_at', templet: '#user-createTime', align: 'center' },
|
||||
{ title: '更新时间', field: 'update_at', templet: '#user-updateTime', align: 'center' },
|
||||
{ title: '操作', toolbar: '#user-bar', align: 'center', width: 130 },
|
||||
{ title: '操作', toolbar: '#tool', align: 'center', width: 130 },
|
||||
],
|
||||
]
|
||||
|
||||
// 渲染表格数据
|
||||
table.render({
|
||||
elem: '#user-table',
|
||||
elem: '#tables',
|
||||
url: USER_API.USERS(),
|
||||
page: true,
|
||||
cols: cols,
|
||||
skin: 'line',
|
||||
height: 'full-148',
|
||||
toolbar: '#user-toolbar', /*工具栏*/
|
||||
toolbar: '#toolbar', /*工具栏*/
|
||||
text: { none: '暂无人员信息' },
|
||||
defaultToolbar: [{ layEvent: 'refresh', icon: 'layui-icon-refresh' }, 'filter', 'print', 'exports'], /*默认工具栏*/
|
||||
})
|
||||
@@ -172,22 +170,22 @@
|
||||
window.refresh(field)
|
||||
})
|
||||
|
||||
table.on('tool(user-table)', function (obj) {
|
||||
if (obj.event === 'remove') {
|
||||
window.remove(obj)
|
||||
} else if (obj.event === 'edit') {
|
||||
window.edit(obj)
|
||||
table.on('tool(tables)', function (obj) {
|
||||
if (obj.event === 'tool-remove') {
|
||||
window.tool_remove(obj)
|
||||
} else if (obj.event === 'tool-edit') {
|
||||
window.tool_edit(obj)
|
||||
}
|
||||
})
|
||||
|
||||
table.on('toolbar(user-table)', function (obj) {
|
||||
if (obj.event === 'add') {
|
||||
window.add()
|
||||
table.on('toolbar(tables)', function (obj) {
|
||||
if (obj.event === 'toolbar-add') {
|
||||
window.toolbar_add()
|
||||
} else if (obj.event === 'refresh') {
|
||||
window.refresh()
|
||||
} else if (obj.event === 'batchRemove') {
|
||||
window.batchRemove(obj)
|
||||
} else if (obj.event === 'collasped') {
|
||||
} else if (obj.event === 'toolbar-remove') {
|
||||
window.toolbar_remove(obj)
|
||||
} else if (obj.event === 'toolbar-collasped') {
|
||||
$('.user-left').toggleClass('user-collasped')
|
||||
$('.user-main').toggleClass('user-collasped')
|
||||
table.resize()
|
||||
@@ -199,7 +197,7 @@
|
||||
return false
|
||||
})
|
||||
|
||||
form.on('switch(user-enable)', function (obj) {
|
||||
form.on('switch(tool-switch)', function (obj) {
|
||||
let operate
|
||||
if (obj.elem.checked) {
|
||||
operate = 1
|
||||
@@ -224,7 +222,7 @@
|
||||
})
|
||||
})
|
||||
|
||||
window.add = function () {
|
||||
window.toolbar_add = function () {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '新增',
|
||||
@@ -233,40 +231,7 @@
|
||||
content: '/users/add',
|
||||
})
|
||||
}
|
||||
|
||||
window.edit = function (obj) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '修改',
|
||||
shade: 0.1,
|
||||
area: ['550px', '500px'],
|
||||
content: '/users/' + obj.data['id'],
|
||||
})
|
||||
}
|
||||
|
||||
window.remove = function (obj) {
|
||||
layer.confirm('确定要删除该用户', { icon: 3, title: '提示' }, function (index) {
|
||||
layer.close(index)
|
||||
let loading = layer.load()
|
||||
$.ajax({
|
||||
url: USER_API.USER(obj.data['id']),
|
||||
dataType: 'json',
|
||||
type: 'delete',
|
||||
success: function (result) {
|
||||
layer.close(loading)
|
||||
if (result.success) {
|
||||
popup.success(result.msg, function () {
|
||||
obj.del()
|
||||
})
|
||||
} else {
|
||||
popup.failure(result.msg)
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
window.batchRemove = function (obj) {
|
||||
window.toolbar_remove = function (obj) {
|
||||
let data = table.checkStatus(obj.config.id).data
|
||||
if (data.length === 0) {
|
||||
layer.msg('未选中数据', {
|
||||
@@ -276,7 +241,7 @@
|
||||
return false
|
||||
}
|
||||
var ids = []
|
||||
var hasCheck = table.checkStatus('user-table')
|
||||
var hasCheck = table.checkStatus('tables')
|
||||
var hasCheckData = hasCheck.data
|
||||
if (hasCheckData.length > 0) {
|
||||
$.each(hasCheckData, function (index, element) {
|
||||
@@ -309,10 +274,42 @@
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
window.refresh = function (param) {
|
||||
table.reload('user-table', { where: param })
|
||||
table.reload('tables', { where: param })
|
||||
}
|
||||
|
||||
window.tool_remove = function (obj) {
|
||||
layer.confirm('确定要删除该用户', { icon: 3, title: '提示' }, function (index) {
|
||||
layer.close(index)
|
||||
let loading = layer.load()
|
||||
$.ajax({
|
||||
url: USER_API.USER(obj.data['id']),
|
||||
dataType: 'json',
|
||||
type: 'delete',
|
||||
success: function (result) {
|
||||
layer.close(loading)
|
||||
if (result.success) {
|
||||
popup.success(result.msg, function () {
|
||||
obj.del()
|
||||
})
|
||||
} else {
|
||||
popup.failure(result.msg)
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
}
|
||||
window.tool_edit = function (obj) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '修改',
|
||||
shade: 0.1,
|
||||
area: ['550px', '500px'],
|
||||
content: '/users/' + obj.data['id'],
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -12,21 +12,21 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="username" lay-verify="title" autocomplete="off" placeholder="请输入标题"
|
||||
<input type="text" name="username" lay-verify="title" autocomplete="off" placeholder="请输入账号"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="realName" lay-verify="title" autocomplete="off" placeholder="请输入标题"
|
||||
<input type="text" name="realName" lay-verify="title" autocomplete="off" placeholder="请输入姓名"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="password" lay-verify="title" autocomplete="off" placeholder="请输入标题"
|
||||
<input type="text" name="password" lay-verify="title" autocomplete="off" placeholder="请输入密码"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,21 +14,21 @@
|
||||
<label class="layui-form-label">编号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ user.id }}" name="userId" lay-verify="title"
|
||||
autocomplete="off" placeholder="请输入标题" class="layui-input">
|
||||
autocomplete="off" placeholder="请输入编号" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ user.username }}" name="username" lay-verify="title"
|
||||
autocomplete="off" placeholder="请输入标题" class="layui-input">
|
||||
autocomplete="off" placeholder="请输入账号" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" value="{{ user.realname }}" name="realName" lay-verify="title"
|
||||
autocomplete="off" placeholder="请输入标题"
|
||||
autocomplete="off" placeholder="请输入姓名"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -68,7 +68,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% include 'admin/common/footer.html' %}
|
||||
|
||||
<script type="module">
|
||||
import { USER_API } from '/static/api/http.js'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user