@ -0,0 +1,43 @@ |
|||||
|
package com.dreamchaser.depository_manage.utils; |
||||
|
import net.sourceforge.pinyin4j.PinyinHelper; |
||||
|
|
||||
|
/** |
||||
|
* 仓库编码工具 |
||||
|
*/ |
||||
|
public class WordUtil { |
||||
|
/** |
||||
|
* 返回中文的首字母 |
||||
|
* |
||||
|
* @param str |
||||
|
* @return*/ |
||||
|
public static String getPinYinHeadChar(String str) { |
||||
|
|
||||
|
String convert = ""; |
||||
|
for (int j = 0; j < str.length(); j++) { |
||||
|
char word = str.charAt(j); |
||||
|
String[] pinyinArray = PinyinHelper.toHanyuPinyinStringArray(word); |
||||
|
if (pinyinArray != null) { |
||||
|
convert += pinyinArray[0].charAt(0); |
||||
|
} else { |
||||
|
convert += word; |
||||
|
} |
||||
|
} |
||||
|
return convert.toUpperCase(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 判断一个数是几位数 |
||||
|
* @param num |
||||
|
* @return |
||||
|
*/ |
||||
|
public static int pan(int num) { |
||||
|
int count = 0; |
||||
|
while (num >= 10) { |
||||
|
num /= 10; |
||||
|
count++; |
||||
|
} |
||||
|
return count + 1; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,56 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<title>layui</title> |
||||
|
<meta name="renderer" content="webkit"> |
||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
||||
|
<link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all"> |
||||
|
<link rel="stylesheet" href="/static/css/public.css" media="all"> |
||||
|
</head> |
||||
|
<body> |
||||
|
<input id="mname" name="mname" th:value="${mname}" style="display: none"> |
||||
|
<input id="type" name="type" th:value="${type}" style="display: none"> |
||||
|
<div id="test2" class="demo-tree"></div> |
||||
|
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
||||
|
<script> |
||||
|
var data; |
||||
|
layui.use(['form', 'layer', 'dropdown', 'tree'], function () { |
||||
|
var $ = layui.jquery, |
||||
|
tree = layui.tree; |
||||
|
var mname = $("#mname").val(); |
||||
|
var type = $("#type").val(); |
||||
|
var req = {}; |
||||
|
req.mname = mname; |
||||
|
req.type = type; |
||||
|
test = tree.render({ |
||||
|
elem: '#test2' |
||||
|
, data: [] |
||||
|
, click: function (obj) { |
||||
|
if (obj.data.children !== undefined) { |
||||
|
return false |
||||
|
} |
||||
|
$("#openSonByMaterial", window.parent.document).val(obj.data.title) |
||||
|
$("#mid", window.parent.document).val(obj.data.id) |
||||
|
var index = parent.layer.getFrameIndex(window.name); |
||||
|
parent.layer.close(index); |
||||
|
} |
||||
|
}); |
||||
|
$.ajax({ |
||||
|
url: "/material/treeMenus", |
||||
|
data: JSON.stringify(req), |
||||
|
type: 'post', |
||||
|
dataType: 'json', |
||||
|
contentType: "application/json;charset=utf-8", |
||||
|
success: function (d) { |
||||
|
var data2 = d.data |
||||
|
test.reload({ |
||||
|
data: data2 |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
}) |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,205 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en" xmlns:checked="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> |
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<title>layui</title> |
||||
|
<meta content="webkit" name="renderer"> |
||||
|
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> |
||||
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport"> |
||||
|
<link href="/static/lib/layui-v2.6.3/css/layui.css" media="all" rel="stylesheet"> |
||||
|
<link href="/static/css/public.css" media="all" rel="stylesheet"> |
||||
|
|
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="layuimini-container"> |
||||
|
<input id="postId" style="display: none" th:value="${postId}"> |
||||
|
<script type="text/html" id="toolbarDemo"> |
||||
|
<div class="layui-btn-container"> |
||||
|
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="add_role">添加权限</button> |
||||
|
<button class="layui-btn layui-btn-sm layui-btn-danger data-delete-btn" lay-event="delete">删除权限</button> |
||||
|
</div> |
||||
|
</script> |
||||
|
<table id="demo" class="layui-hide" lay-filter="currentTableFilter"></table> |
||||
|
|
||||
|
<script type="text/html" id="currentTableBar"> |
||||
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="detail">详情</a> |
||||
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-delete" lay-event="delete">删除</a> |
||||
|
</script> |
||||
|
|
||||
|
</div> |
||||
|
<script charset="utf-8" src="/static/lib/layui-v2.6.3/layui.js"></script> |
||||
|
<script> |
||||
|
layui.use('table', function () { |
||||
|
var table = layui.table; |
||||
|
var $ = layui.$; |
||||
|
var postId = document.getElementById("postId").value; |
||||
|
//第一个实例 |
||||
|
table.render({ |
||||
|
elem: '#demo' |
||||
|
, height: 312 |
||||
|
, url: '/company/findPostRole?postId=' + postId, //数据接口 |
||||
|
parseData: function (res) { //res 即为原始返回的数据 |
||||
|
return { |
||||
|
"status": res.status, //解析接口状态 |
||||
|
"message": res.statusInfo.message, //解析提示文本 |
||||
|
"count": res.count, //解析数据长度 |
||||
|
"data": res.data //解析数据列表 |
||||
|
}; |
||||
|
}, |
||||
|
request: { |
||||
|
pageName: 'page', //页码的参数名称,默认:page |
||||
|
limitName: 'pagesize' //每页数据量的参数名,默认:limit |
||||
|
}, |
||||
|
response: { |
||||
|
statusName: 'status' //规定数据状态的字段名称,默认:code |
||||
|
, statusCode: 200 //规定成功的状态码,默认:0 |
||||
|
, msgName: 'message' //规定状态信息的字段名称,默认:msg |
||||
|
, countName: 'count' //规定数据总数的字段名称,默认:count |
||||
|
, dataName: 'data' //规定数据列表的字段名称,默认:data |
||||
|
}, toolbar: '#toolbarDemo' |
||||
|
, cols: [ |
||||
|
[ //表头 |
||||
|
{type: "checkbox", width: 50}, |
||||
|
{field: 'id', width: 80, title: 'ID', sort: true}, |
||||
|
{field: 'depositoryName', width: 200, title: '仓库名称', sort: true}, |
||||
|
{field: 'depositoryId', width: 200, title: '仓库编号', sort: true}, |
||||
|
{field: 'number', width: 100, title: '编号', sort: true}, |
||||
|
{field: 'name', width: 250, title: '名称', sort: true}, |
||||
|
{field: 'dutiesname',width: 200,title: '名称',sort: true}, |
||||
|
{field: 'aoname',width: 200,title: '归属行政组织名称',sort: true}, |
||||
|
{field: 'aonumber',width: 200,title: '归属行政组织编号',sort: true}, |
||||
|
{field: 'jobname',width: 200,title: '职务类别',sort: true}, |
||||
|
{title: '操作', minWidth: 150, toolbar: '#currentTableBar', align: "center"} |
||||
|
] |
||||
|
], |
||||
|
limits: [10, 15, 20, 25, 50, 100], |
||||
|
limit: 10, |
||||
|
page: true, |
||||
|
skin: 'line', |
||||
|
done:function () { |
||||
|
$("[data-field='id']").css('display','none'); |
||||
|
$("[data-field='depositoryId']").css('display','none'); |
||||
|
} |
||||
|
}); |
||||
|
//监听表格复选框选择 |
||||
|
table.on('checkbox(currentTableFilter)', function (obj) { |
||||
|
console.log(obj) |
||||
|
}); |
||||
|
table.on('tool(currentTableFilter)', function (obj) { |
||||
|
let data = obj.data; |
||||
|
if(obj.event === 'detail'){ |
||||
|
var index = layer.open({ |
||||
|
title: '修改权限', |
||||
|
type: 2, |
||||
|
shade: 0.2, |
||||
|
maxmin:true, |
||||
|
shadeClose: true, |
||||
|
area: ['100%', '100%'], |
||||
|
content: '/post_role_edit?id='+data.id+"&depositoryId="+data.depositoryId, |
||||
|
end:function () { |
||||
|
location.reload() |
||||
|
} |
||||
|
}); |
||||
|
$(window).on("resize", function () { |
||||
|
layer.full(index); |
||||
|
}); |
||||
|
return false; |
||||
|
} |
||||
|
else if(obj.event === 'delete'){ |
||||
|
var req = {}; |
||||
|
req.id = data.id; |
||||
|
req.depositoryId = data.depositoryId; |
||||
|
layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) { |
||||
|
$.ajax({ |
||||
|
url: '/company/postRole_del', |
||||
|
dataType: 'json', |
||||
|
type: 'POST', |
||||
|
contentType: "application/json;charset=utf-8", |
||||
|
data: JSON.stringify(req), |
||||
|
beforeSend: function () { |
||||
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
||||
|
}, |
||||
|
success: function (data) { |
||||
|
layer.close(this.layerIndex); |
||||
|
if (data.status >= 300) { |
||||
|
layer.msg(data.statusInfo.message);//失败的表情 |
||||
|
return; |
||||
|
} else { |
||||
|
obj.del(); |
||||
|
layer.msg("删除成功", { |
||||
|
icon: 6,//成功的表情 |
||||
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
table.on('toolbar(currentTableFilter)', function (obj) { |
||||
|
if (obj.event === 'add_role') { |
||||
|
var index = layer.open({ |
||||
|
title: '添加权限', |
||||
|
type: 2, |
||||
|
shade: 0.2, |
||||
|
maxmin:true, |
||||
|
shadeClose: true, |
||||
|
area: ['100%', '100%'], |
||||
|
content: '/postRoleAdd?id='+postId, |
||||
|
end:function () { |
||||
|
location.reload() |
||||
|
} |
||||
|
}); |
||||
|
$(window).on("resize", function () { |
||||
|
layer.full(index); |
||||
|
}); |
||||
|
return false; |
||||
|
} |
||||
|
else if (obj.event === 'delete') { // 监听删除操作 |
||||
|
var checkStatus = table.checkStatus('demo') |
||||
|
, data = checkStatus.data; |
||||
|
var req = {}; |
||||
|
req.ids = []; |
||||
|
req.depositoryIds = []; |
||||
|
for (i = 0, len = data.length; i < len; i++) { |
||||
|
req.ids[i] = data[i].id; |
||||
|
req.depositoryIds[i] = data[i].depositoryId; |
||||
|
} |
||||
|
layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) { |
||||
|
$.ajax({ |
||||
|
url: '/company/postRole_del', |
||||
|
dataType: 'json', |
||||
|
type: 'POST', |
||||
|
contentType: "application/json;charset=utf-8", |
||||
|
data: JSON.stringify(req), |
||||
|
beforeSend: function () { |
||||
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
||||
|
}, |
||||
|
success: function (data) { |
||||
|
layer.close(this.layerIndex); |
||||
|
if (data.status >= 300) { |
||||
|
layer.msg(data.statusInfo.message);//失败的表情 |
||||
|
return; |
||||
|
} else { |
||||
|
layer.msg("删除成功", { |
||||
|
icon: 6,//成功的表情 |
||||
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
||||
|
}); |
||||
|
//执行搜索重载 |
||||
|
table.reload('demo', { |
||||
|
url: '/company/findPostRole?postId=' + postId, |
||||
|
page: { |
||||
|
curr: 1 |
||||
|
} |
||||
|
}, 'data'); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
}) |
||||
|
}); |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,123 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<title>layui</title> |
||||
|
<meta name="renderer" content="webkit"> |
||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
||||
|
<link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all"> |
||||
|
<link rel="stylesheet" href="/static/css/public.css" media="all"> |
||||
|
<style> |
||||
|
body { |
||||
|
background-color: #ffffff; |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="layui-form layuimini-form"> |
||||
|
<input type="text" name="userid" th:value="${post.getId()}" style="display: none"> |
||||
|
<input type="text" id="organization" name="organization" th:value="${post.getAdministrativeorganization()}" style="display: none"> |
||||
|
<input type="text" id="oldDepository" name="oldDepository" th:value="${post.getDepositoryId()}" style="display: none"> |
||||
|
<div class="layui-form-item"> |
||||
|
<label class="layui-form-label required">岗位名称</label> |
||||
|
<div class="layui-input-block"> |
||||
|
<input type="text" lay-verify="required" lay-reqtext="用户名不能为空" placeholder="请输入用户名" th:value="${post.getName()}" class="layui-input"> |
||||
|
<tip>填写自己管理账号的名称。</tip> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class=" layui-form-item" style="display: none"> |
||||
|
<label class="layui-form-label required">权限:</label> |
||||
|
<div class="layui-inline " style="margin-bottom: 10px"> |
||||
|
<select name="authority" class="layui-input-inline" > |
||||
|
<option value="">请选择权限</option> |
||||
|
<option th:each="role,iterStar:${roles}" th:value="${role?.getId()}" th:text="${role?.getName()}" >系统管理员</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class=" layui-form-item" > |
||||
|
<label class="layui-form-label required">负责仓库:</label> |
||||
|
<div class="layui-inline" style="margin-bottom: 10px"> |
||||
|
<!--<select name="depositoryId" lay-verify="required"> |
||||
|
<option value="">请选择仓库</option> |
||||
|
<option value="0">全部仓库</option> |
||||
|
<option th:each="depository,iterStar:${depositories}" th:value="${depository?.getId()}" th:text="${depository?.getDname()}" >外芯仓库</option> |
||||
|
</select>--> |
||||
|
<input type="text" th:value="${post.getDepositoryName()}" placeholder="请选择仓库" class="layui-input" id="openSonByDepository" readonly |
||||
|
lay-verify="required"/> |
||||
|
<input type="text" th:value="${post.getDepositoryId()}" name="depositoryId" class="layui-input" id="depositoryId" style="display: none" lay-verify="required"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<div class="layui-form-item"> |
||||
|
<div class="layui-input-block"> |
||||
|
<button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
||||
|
<script> |
||||
|
layui.use(['form','layer','laydate'], function () { |
||||
|
var form = layui.form, |
||||
|
layer = layui.layer, |
||||
|
laydate=layui.laydate, |
||||
|
$ = layui.$; |
||||
|
|
||||
|
$('#openSonByDepository').on('click', function(){ |
||||
|
layer.open({ |
||||
|
type: 2, |
||||
|
title: '弹窗内容', |
||||
|
skin: 'layui-layer-rim', |
||||
|
maxmin: true, |
||||
|
shadeClose: true, //点击遮罩关闭层 |
||||
|
area : ['800px' , '500px'], |
||||
|
content: '/selectDepository?type=2', |
||||
|
}); |
||||
|
}); |
||||
|
//日期 |
||||
|
laydate.render({ |
||||
|
elem: '#date' |
||||
|
}); |
||||
|
var organization = document.getElementById("organization").value |
||||
|
//监听提交 |
||||
|
form.on('submit(saveBtn)', function (data) { |
||||
|
data=data.field; |
||||
|
//去除对应的仓库id |
||||
|
if (data.depositoryId===""){ |
||||
|
delete data.depositoryId; |
||||
|
} |
||||
|
$.ajax({ |
||||
|
url: "/company/postRole_edit", |
||||
|
type: 'post', |
||||
|
dataType: 'json', |
||||
|
contentType: "application/json;charset=utf-8", |
||||
|
data: JSON.stringify(data), |
||||
|
beforeSend: function () { |
||||
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
||||
|
}, |
||||
|
success: function (data) { |
||||
|
layer.close(this.layerIndex); |
||||
|
if (data.status >= 300) { |
||||
|
layer.msg(data.statusInfo.message);//失败的表情 |
||||
|
return; |
||||
|
} else { |
||||
|
layer.msg("申请提交成功", { |
||||
|
icon: 6,//成功的表情 |
||||
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
||||
|
},function(){ |
||||
|
var index = parent.layer.getFrameIndex(window.name); |
||||
|
parent.layer.close(index);//关闭当前页 |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
}); |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,208 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en" xmlns:checked="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> |
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<title>layui</title> |
||||
|
<meta content="webkit" name="renderer"> |
||||
|
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> |
||||
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport"> |
||||
|
<link href="/static/lib/layui-v2.6.3/css/layui.css" media="all" rel="stylesheet"> |
||||
|
<link href="/static/css/public.css" media="all" rel="stylesheet"> |
||||
|
|
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="layuimini-container"> |
||||
|
<input id="userId" style="display: none" th:value="${userId}"> |
||||
|
<script type="text/html" id="toolbarDemo"> |
||||
|
<div class="layui-btn-container"> |
||||
|
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="add_role">添加权限</button> |
||||
|
<button class="layui-btn layui-btn-sm layui-btn-danger data-delete-btn" lay-event="delete">删除权限</button> |
||||
|
</div> |
||||
|
</script> |
||||
|
<table id="demo" class="layui-hide" lay-filter="currentTableFilter"></table> |
||||
|
|
||||
|
<script type="text/html" id="currentTableBar"> |
||||
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="detail">详情</a> |
||||
|
<a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a> |
||||
|
</script> |
||||
|
|
||||
|
</div> |
||||
|
<script charset="utf-8" src="/static/lib/layui-v2.6.3/layui.js"></script> |
||||
|
<script> |
||||
|
layui.use('table', function () { |
||||
|
var table = layui.table; |
||||
|
var $ = layui.$; |
||||
|
var userId = document.getElementById("userId").value; |
||||
|
//第一个实例 |
||||
|
table.render({ |
||||
|
elem: '#demo' |
||||
|
, height: 312 |
||||
|
, url: 'findUserRole?userId=' + userId, //数据接口 |
||||
|
parseData: function (res) { //res 即为原始返回的数据 |
||||
|
return { |
||||
|
"status": res.status, //解析接口状态 |
||||
|
"message": res.statusInfo.message, //解析提示文本 |
||||
|
"count": res.count, //解析数据长度 |
||||
|
"data": res.data //解析数据列表 |
||||
|
}; |
||||
|
}, |
||||
|
request: { |
||||
|
pageName: 'page', //页码的参数名称,默认:page |
||||
|
limitName: 'pagesize' //每页数据量的参数名,默认:limit |
||||
|
}, |
||||
|
response: { |
||||
|
statusName: 'status' //规定数据状态的字段名称,默认:code |
||||
|
, statusCode: 200 //规定成功的状态码,默认:0 |
||||
|
, msgName: 'message' //规定状态信息的字段名称,默认:msg |
||||
|
, countName: 'count' //规定数据总数的字段名称,默认:count |
||||
|
, dataName: 'data' //规定数据列表的字段名称,默认:data |
||||
|
}, toolbar: '#toolbarDemo' |
||||
|
, cols: [ |
||||
|
[ //表头 |
||||
|
{type: "checkbox", width: 50}, |
||||
|
{field: 'id', width: 80, title: 'ID', sort: true}, |
||||
|
{field: 'depositoryName', width: 200, title: '仓库名称', sort: true}, |
||||
|
{field: 'number', width: 100, title: '工号', sort: true}, |
||||
|
{field: 'name', width: 100, title: '姓名', sort: true}, |
||||
|
{ |
||||
|
field: 'state', title: '状态', minWidth: 80, sort: true, templet: function (d) { |
||||
|
if (d.state == 1) { |
||||
|
return "启用"; |
||||
|
} else if (d.state == 2) { |
||||
|
return "禁用"; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{field: 'mobilephone', width: 200, title: '内线电话', sort: true}, |
||||
|
{field: 'companyname', width: 200, title: '公司名称', sort: true}, |
||||
|
{field: 'maindeparmentname', width: 200, title: '主部门', sort: true}, |
||||
|
{field: 'sunmaindeparmentname', width: 200, title: '岗位', sort: true}, |
||||
|
{title: '操作', minWidth: 150, toolbar: '#currentTableBar', align: "center"} |
||||
|
] |
||||
|
], |
||||
|
limits: [10, 15, 20, 25, 50, 100], |
||||
|
limit: 10, |
||||
|
page: true, |
||||
|
skin: 'line', |
||||
|
done:function () { |
||||
|
$("[data-field='id']").css('display','none'); |
||||
|
} |
||||
|
}); |
||||
|
//监听表格复选框选择 |
||||
|
table.on('checkbox(currentTableFilter)', function (obj) { |
||||
|
console.log(obj) |
||||
|
}); |
||||
|
table.on('tool(currentTableFilter)', function (obj) { |
||||
|
let data = obj.data; |
||||
|
if(obj.event === 'detail'){ |
||||
|
var index = layer.open({ |
||||
|
title: '修改权限', |
||||
|
type: 2, |
||||
|
shade: 0.2, |
||||
|
maxmin:true, |
||||
|
shadeClose: true, |
||||
|
area: ['100%', '100%'], |
||||
|
content: '/user_role_edit?id='+data.id, |
||||
|
end:function () { |
||||
|
location.reload() |
||||
|
} |
||||
|
}); |
||||
|
$(window).on("resize", function () { |
||||
|
layer.full(index); |
||||
|
}); |
||||
|
return false; |
||||
|
} |
||||
|
else if(obj.event === 'delete'){ |
||||
|
var req = {}; |
||||
|
req.id = data.id; |
||||
|
layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) { |
||||
|
$.ajax({ |
||||
|
url: '/sys/userRole_del', |
||||
|
dataType: 'json', |
||||
|
type: 'POST', |
||||
|
contentType: "application/json;charset=utf-8", |
||||
|
data: JSON.stringify(req), |
||||
|
beforeSend: function () { |
||||
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
||||
|
}, |
||||
|
success: function (data) { |
||||
|
layer.close(this.layerIndex); |
||||
|
if (data.status >= 300) { |
||||
|
layer.msg(data.statusInfo.message);//失败的表情 |
||||
|
return; |
||||
|
} else { |
||||
|
obj.del(); |
||||
|
layer.msg("删除成功", { |
||||
|
icon: 6,//成功的表情 |
||||
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
table.on('toolbar(currentTableFilter)', function (obj) { |
||||
|
if (obj.event === 'add_role') { |
||||
|
var index = layer.open({ |
||||
|
title: '添加权限', |
||||
|
type: 2, |
||||
|
shade: 0.2, |
||||
|
maxmin:true, |
||||
|
shadeClose: true, |
||||
|
area: ['100%', '100%'], |
||||
|
content: '/user_add?userId='+userId, |
||||
|
end:function () { |
||||
|
location.reload() |
||||
|
} |
||||
|
}); |
||||
|
$(window).on("resize", function () { |
||||
|
layer.full(index); |
||||
|
}); |
||||
|
return false; |
||||
|
} |
||||
|
else if (obj.event === 'delete') { // 监听删除操作 |
||||
|
var checkStatus = table.checkStatus('demo') |
||||
|
, data = checkStatus.data; |
||||
|
var req = {}; |
||||
|
req.ids = []; |
||||
|
for (i = 0, len = data.length; i < len; i++) { |
||||
|
req.ids[i] = data[i].id; |
||||
|
} |
||||
|
layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) { |
||||
|
$.ajax({ |
||||
|
url: '/sys/userRole_del', |
||||
|
dataType: 'json', |
||||
|
type: 'POST', |
||||
|
contentType: "application/json;charset=utf-8", |
||||
|
data: JSON.stringify(req), |
||||
|
beforeSend: function () { |
||||
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
||||
|
}, |
||||
|
success: function (data) { |
||||
|
layer.close(this.layerIndex); |
||||
|
if (data.status >= 300) { |
||||
|
layer.msg(data.statusInfo.message);//失败的表情 |
||||
|
return; |
||||
|
} else { |
||||
|
layer.msg("删除成功", { |
||||
|
icon: 6,//成功的表情 |
||||
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
||||
|
}); |
||||
|
//执行搜索重载 |
||||
|
table.reload('demo', { |
||||
|
url: '/findUserRole?userId='+userId, |
||||
|
page: { |
||||
|
curr: 1 |
||||
|
} |
||||
|
}, 'data'); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
}) |
||||
|
}); |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,56 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<title>layui</title> |
||||
|
<meta name="renderer" content="webkit"> |
||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
||||
|
<link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all"> |
||||
|
<link rel="stylesheet" href="/static/css/public.css" media="all"> |
||||
|
</head> |
||||
|
<body> |
||||
|
<input id="mname" name="mname" th:value="${mname}" style="display: none"> |
||||
|
<input id="type" name="type" th:value="${type}" style="display: none"> |
||||
|
<div id="test2" class="demo-tree"></div> |
||||
|
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
||||
|
<script> |
||||
|
var data; |
||||
|
layui.use(['form', 'layer', 'dropdown', 'tree'], function () { |
||||
|
var $ = layui.jquery, |
||||
|
tree = layui.tree; |
||||
|
var mname = $("#mname").val(); |
||||
|
var type = $("#type").val(); |
||||
|
var req = {}; |
||||
|
req.mname = mname; |
||||
|
req.type = type; |
||||
|
test = tree.render({ |
||||
|
elem: '#test2' |
||||
|
, data: [] |
||||
|
, click: function (obj) { |
||||
|
if (obj.data.children !== undefined) { |
||||
|
return false |
||||
|
} |
||||
|
$("#openSonByMaterial", window.parent.document).val(obj.data.title) |
||||
|
$("#mid", window.parent.document).val(obj.data.id) |
||||
|
var index = parent.layer.getFrameIndex(window.name); |
||||
|
parent.layer.close(index); |
||||
|
} |
||||
|
}); |
||||
|
$.ajax({ |
||||
|
url: "/material/treeMenus", |
||||
|
data: JSON.stringify(req), |
||||
|
type: 'post', |
||||
|
dataType: 'json', |
||||
|
contentType: "application/json;charset=utf-8", |
||||
|
success: function (d) { |
||||
|
var data2 = d.data |
||||
|
test.reload({ |
||||
|
data: data2 |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
}) |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,205 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en" xmlns:checked="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> |
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<title>layui</title> |
||||
|
<meta content="webkit" name="renderer"> |
||||
|
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> |
||||
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport"> |
||||
|
<link href="/static/lib/layui-v2.6.3/css/layui.css" media="all" rel="stylesheet"> |
||||
|
<link href="/static/css/public.css" media="all" rel="stylesheet"> |
||||
|
|
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="layuimini-container"> |
||||
|
<input id="postId" style="display: none" th:value="${postId}"> |
||||
|
<script type="text/html" id="toolbarDemo"> |
||||
|
<div class="layui-btn-container"> |
||||
|
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="add_role">添加权限</button> |
||||
|
<button class="layui-btn layui-btn-sm layui-btn-danger data-delete-btn" lay-event="delete">删除权限</button> |
||||
|
</div> |
||||
|
</script> |
||||
|
<table id="demo" class="layui-hide" lay-filter="currentTableFilter"></table> |
||||
|
|
||||
|
<script type="text/html" id="currentTableBar"> |
||||
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="detail">详情</a> |
||||
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-delete" lay-event="delete">删除</a> |
||||
|
</script> |
||||
|
|
||||
|
</div> |
||||
|
<script charset="utf-8" src="/static/lib/layui-v2.6.3/layui.js"></script> |
||||
|
<script> |
||||
|
layui.use('table', function () { |
||||
|
var table = layui.table; |
||||
|
var $ = layui.$; |
||||
|
var postId = document.getElementById("postId").value; |
||||
|
//第一个实例 |
||||
|
table.render({ |
||||
|
elem: '#demo' |
||||
|
, height: 312 |
||||
|
, url: '/company/findPostRole?postId=' + postId, //数据接口 |
||||
|
parseData: function (res) { //res 即为原始返回的数据 |
||||
|
return { |
||||
|
"status": res.status, //解析接口状态 |
||||
|
"message": res.statusInfo.message, //解析提示文本 |
||||
|
"count": res.count, //解析数据长度 |
||||
|
"data": res.data //解析数据列表 |
||||
|
}; |
||||
|
}, |
||||
|
request: { |
||||
|
pageName: 'page', //页码的参数名称,默认:page |
||||
|
limitName: 'pagesize' //每页数据量的参数名,默认:limit |
||||
|
}, |
||||
|
response: { |
||||
|
statusName: 'status' //规定数据状态的字段名称,默认:code |
||||
|
, statusCode: 200 //规定成功的状态码,默认:0 |
||||
|
, msgName: 'message' //规定状态信息的字段名称,默认:msg |
||||
|
, countName: 'count' //规定数据总数的字段名称,默认:count |
||||
|
, dataName: 'data' //规定数据列表的字段名称,默认:data |
||||
|
}, toolbar: '#toolbarDemo' |
||||
|
, cols: [ |
||||
|
[ //表头 |
||||
|
{type: "checkbox", width: 50}, |
||||
|
{field: 'id', width: 80, title: 'ID', sort: true}, |
||||
|
{field: 'depositoryName', width: 200, title: '仓库名称', sort: true}, |
||||
|
{field: 'depositoryId', width: 200, title: '仓库编号', sort: true}, |
||||
|
{field: 'number', width: 100, title: '编号', sort: true}, |
||||
|
{field: 'name', width: 250, title: '名称', sort: true}, |
||||
|
{field: 'dutiesname',width: 200,title: '名称',sort: true}, |
||||
|
{field: 'aoname',width: 200,title: '归属行政组织名称',sort: true}, |
||||
|
{field: 'aonumber',width: 200,title: '归属行政组织编号',sort: true}, |
||||
|
{field: 'jobname',width: 200,title: '职务类别',sort: true}, |
||||
|
{title: '操作', minWidth: 150, toolbar: '#currentTableBar', align: "center"} |
||||
|
] |
||||
|
], |
||||
|
limits: [10, 15, 20, 25, 50, 100], |
||||
|
limit: 10, |
||||
|
page: true, |
||||
|
skin: 'line', |
||||
|
done:function () { |
||||
|
$("[data-field='id']").css('display','none'); |
||||
|
$("[data-field='depositoryId']").css('display','none'); |
||||
|
} |
||||
|
}); |
||||
|
//监听表格复选框选择 |
||||
|
table.on('checkbox(currentTableFilter)', function (obj) { |
||||
|
console.log(obj) |
||||
|
}); |
||||
|
table.on('tool(currentTableFilter)', function (obj) { |
||||
|
let data = obj.data; |
||||
|
if(obj.event === 'detail'){ |
||||
|
var index = layer.open({ |
||||
|
title: '修改权限', |
||||
|
type: 2, |
||||
|
shade: 0.2, |
||||
|
maxmin:true, |
||||
|
shadeClose: true, |
||||
|
area: ['100%', '100%'], |
||||
|
content: '/post_role_edit?id='+data.id+"&depositoryId="+data.depositoryId, |
||||
|
end:function () { |
||||
|
location.reload() |
||||
|
} |
||||
|
}); |
||||
|
$(window).on("resize", function () { |
||||
|
layer.full(index); |
||||
|
}); |
||||
|
return false; |
||||
|
} |
||||
|
else if(obj.event === 'delete'){ |
||||
|
var req = {}; |
||||
|
req.id = data.id; |
||||
|
req.depositoryId = data.depositoryId; |
||||
|
layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) { |
||||
|
$.ajax({ |
||||
|
url: '/company/postRole_del', |
||||
|
dataType: 'json', |
||||
|
type: 'POST', |
||||
|
contentType: "application/json;charset=utf-8", |
||||
|
data: JSON.stringify(req), |
||||
|
beforeSend: function () { |
||||
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
||||
|
}, |
||||
|
success: function (data) { |
||||
|
layer.close(this.layerIndex); |
||||
|
if (data.status >= 300) { |
||||
|
layer.msg(data.statusInfo.message);//失败的表情 |
||||
|
return; |
||||
|
} else { |
||||
|
obj.del(); |
||||
|
layer.msg("删除成功", { |
||||
|
icon: 6,//成功的表情 |
||||
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
table.on('toolbar(currentTableFilter)', function (obj) { |
||||
|
if (obj.event === 'add_role') { |
||||
|
var index = layer.open({ |
||||
|
title: '添加权限', |
||||
|
type: 2, |
||||
|
shade: 0.2, |
||||
|
maxmin:true, |
||||
|
shadeClose: true, |
||||
|
area: ['100%', '100%'], |
||||
|
content: '/postRoleAdd?id='+postId, |
||||
|
end:function () { |
||||
|
location.reload() |
||||
|
} |
||||
|
}); |
||||
|
$(window).on("resize", function () { |
||||
|
layer.full(index); |
||||
|
}); |
||||
|
return false; |
||||
|
} |
||||
|
else if (obj.event === 'delete') { // 监听删除操作 |
||||
|
var checkStatus = table.checkStatus('demo') |
||||
|
, data = checkStatus.data; |
||||
|
var req = {}; |
||||
|
req.ids = []; |
||||
|
req.depositoryIds = []; |
||||
|
for (i = 0, len = data.length; i < len; i++) { |
||||
|
req.ids[i] = data[i].id; |
||||
|
req.depositoryIds[i] = data[i].depositoryId; |
||||
|
} |
||||
|
layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) { |
||||
|
$.ajax({ |
||||
|
url: '/company/postRole_del', |
||||
|
dataType: 'json', |
||||
|
type: 'POST', |
||||
|
contentType: "application/json;charset=utf-8", |
||||
|
data: JSON.stringify(req), |
||||
|
beforeSend: function () { |
||||
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
||||
|
}, |
||||
|
success: function (data) { |
||||
|
layer.close(this.layerIndex); |
||||
|
if (data.status >= 300) { |
||||
|
layer.msg(data.statusInfo.message);//失败的表情 |
||||
|
return; |
||||
|
} else { |
||||
|
layer.msg("删除成功", { |
||||
|
icon: 6,//成功的表情 |
||||
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
||||
|
}); |
||||
|
//执行搜索重载 |
||||
|
table.reload('demo', { |
||||
|
url: '/company/findPostRole?postId=' + postId, |
||||
|
page: { |
||||
|
curr: 1 |
||||
|
} |
||||
|
}, 'data'); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
}) |
||||
|
}); |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,123 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<title>layui</title> |
||||
|
<meta name="renderer" content="webkit"> |
||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
||||
|
<link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all"> |
||||
|
<link rel="stylesheet" href="/static/css/public.css" media="all"> |
||||
|
<style> |
||||
|
body { |
||||
|
background-color: #ffffff; |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="layui-form layuimini-form"> |
||||
|
<input type="text" name="userid" th:value="${post.getId()}" style="display: none"> |
||||
|
<input type="text" id="organization" name="organization" th:value="${post.getAdministrativeorganization()}" style="display: none"> |
||||
|
<input type="text" id="oldDepository" name="oldDepository" th:value="${post.getDepositoryId()}" style="display: none"> |
||||
|
<div class="layui-form-item"> |
||||
|
<label class="layui-form-label required">岗位名称</label> |
||||
|
<div class="layui-input-block"> |
||||
|
<input type="text" lay-verify="required" lay-reqtext="用户名不能为空" placeholder="请输入用户名" th:value="${post.getName()}" class="layui-input"> |
||||
|
<tip>填写自己管理账号的名称。</tip> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class=" layui-form-item" style="display: none"> |
||||
|
<label class="layui-form-label required">权限:</label> |
||||
|
<div class="layui-inline " style="margin-bottom: 10px"> |
||||
|
<select name="authority" class="layui-input-inline" > |
||||
|
<option value="">请选择权限</option> |
||||
|
<option th:each="role,iterStar:${roles}" th:value="${role?.getId()}" th:text="${role?.getName()}" >系统管理员</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class=" layui-form-item" > |
||||
|
<label class="layui-form-label required">负责仓库:</label> |
||||
|
<div class="layui-inline" style="margin-bottom: 10px"> |
||||
|
<!--<select name="depositoryId" lay-verify="required"> |
||||
|
<option value="">请选择仓库</option> |
||||
|
<option value="0">全部仓库</option> |
||||
|
<option th:each="depository,iterStar:${depositories}" th:value="${depository?.getId()}" th:text="${depository?.getDname()}" >外芯仓库</option> |
||||
|
</select>--> |
||||
|
<input type="text" th:value="${post.getDepositoryName()}" placeholder="请选择仓库" class="layui-input" id="openSonByDepository" readonly |
||||
|
lay-verify="required"/> |
||||
|
<input type="text" th:value="${post.getDepositoryId()}" name="depositoryId" class="layui-input" id="depositoryId" style="display: none" lay-verify="required"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<div class="layui-form-item"> |
||||
|
<div class="layui-input-block"> |
||||
|
<button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
||||
|
<script> |
||||
|
layui.use(['form','layer','laydate'], function () { |
||||
|
var form = layui.form, |
||||
|
layer = layui.layer, |
||||
|
laydate=layui.laydate, |
||||
|
$ = layui.$; |
||||
|
|
||||
|
$('#openSonByDepository').on('click', function(){ |
||||
|
layer.open({ |
||||
|
type: 2, |
||||
|
title: '弹窗内容', |
||||
|
skin: 'layui-layer-rim', |
||||
|
maxmin: true, |
||||
|
shadeClose: true, //点击遮罩关闭层 |
||||
|
area : ['800px' , '500px'], |
||||
|
content: '/selectDepository?type=2', |
||||
|
}); |
||||
|
}); |
||||
|
//日期 |
||||
|
laydate.render({ |
||||
|
elem: '#date' |
||||
|
}); |
||||
|
var organization = document.getElementById("organization").value |
||||
|
//监听提交 |
||||
|
form.on('submit(saveBtn)', function (data) { |
||||
|
data=data.field; |
||||
|
//去除对应的仓库id |
||||
|
if (data.depositoryId===""){ |
||||
|
delete data.depositoryId; |
||||
|
} |
||||
|
$.ajax({ |
||||
|
url: "/company/postRole_edit", |
||||
|
type: 'post', |
||||
|
dataType: 'json', |
||||
|
contentType: "application/json;charset=utf-8", |
||||
|
data: JSON.stringify(data), |
||||
|
beforeSend: function () { |
||||
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
||||
|
}, |
||||
|
success: function (data) { |
||||
|
layer.close(this.layerIndex); |
||||
|
if (data.status >= 300) { |
||||
|
layer.msg(data.statusInfo.message);//失败的表情 |
||||
|
return; |
||||
|
} else { |
||||
|
layer.msg("申请提交成功", { |
||||
|
icon: 6,//成功的表情 |
||||
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
||||
|
},function(){ |
||||
|
var index = parent.layer.getFrameIndex(window.name); |
||||
|
parent.layer.close(index);//关闭当前页 |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
}); |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,116 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<title>layui</title> |
||||
|
<meta name="renderer" content="webkit"> |
||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
||||
|
<link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all"> |
||||
|
<link rel="stylesheet" href="/static/css/public.css" media="all"> |
||||
|
<style> |
||||
|
body { |
||||
|
background-color: #ffffff; |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="layui-form layuimini-form"> |
||||
|
<input type="text" name="userid" th:value="${userByPort.getId()}" style="display: none"> |
||||
|
<input type="text" name="roleId" th:value="${roleId}" style="display: none"> |
||||
|
<div class="layui-form-item"> |
||||
|
<label class="layui-form-label required">用户名</label> |
||||
|
<div class="layui-input-block"> |
||||
|
<input type="text" lay-verify="required" lay-reqtext="用户名不能为空" placeholder="请输入用户名" th:value="${userByPort.getName()}" class="layui-input" readonly> |
||||
|
<tip>填写自己管理账号的名称。</tip> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class=" layui-form-item" style="display:none;"> |
||||
|
<label class="layui-form-label required">权限:</label> |
||||
|
<div class="layui-inline " style="margin-bottom: 10px"> |
||||
|
<select name="authority" class="layui-input-inline"> |
||||
|
<option value="">请选择权限</option> |
||||
|
<option th:each="role,iterStar:${roles}" th:value="${role?.getId()}" th:text="${role?.getName()}" th:selected="${userByPort.getRolename() == role.getName()}">系统管理员</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class=" layui-form-item" > |
||||
|
<label class="layui-form-label required">负责仓库:</label> |
||||
|
<div class="layui-inline" style="margin-bottom: 10px"> |
||||
|
<!--<select name="depositoryId" lay-verify="required"> |
||||
|
<option value="">请选择仓库</option> |
||||
|
<option th:each="depository,iterStar:${depositories}" th:value="${depository?.getId()}" th:text="${depository?.getDname()}" th:selected="${userByPort.getDepositoryName() == depository.getDname()}" >外芯仓库</option> |
||||
|
</select>--> |
||||
|
<input type="text" placeholder="请选择仓库" class="layui-input" id="openSonByDepository" readonly th:value="${userByPort.getDepositoryName()}" |
||||
|
lay-verify="required"/> |
||||
|
<input type="text" th:value="${depositoryId}" name="depositoryId" class="layui-input" id="depositoryId" style="display: none" lay-verify="required"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="layui-form-item"> |
||||
|
<div class="layui-input-block"> |
||||
|
<button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> |
||||
|
<script> |
||||
|
layui.use(['form','layer','laydate'], function () { |
||||
|
var form = layui.form, |
||||
|
layer = layui.layer, |
||||
|
laydate=layui.laydate, |
||||
|
$ = layui.$; |
||||
|
$('#openSonByDepository').on('click', function(){ |
||||
|
layer.open({ |
||||
|
type: 2, |
||||
|
title: '弹窗内容', |
||||
|
skin: 'layui-layer-rim', |
||||
|
maxmin: true, |
||||
|
shadeClose: true, //点击遮罩关闭层 |
||||
|
area : ['800px' , '500px'], |
||||
|
content: '/selectDepository?type=2', |
||||
|
}); |
||||
|
}); |
||||
|
//日期 |
||||
|
laydate.render({ |
||||
|
elem: '#date' |
||||
|
}); |
||||
|
//监听提交 |
||||
|
form.on('submit(saveBtn)', function (data) { |
||||
|
data=data.field; |
||||
|
//去除对应的仓库id |
||||
|
if (data.depositoryId===""){ |
||||
|
delete data.depositoryId; |
||||
|
} |
||||
|
$.ajax({ |
||||
|
url: "/sys/userRole_edit", |
||||
|
type: 'post', |
||||
|
dataType: 'json', |
||||
|
contentType: "application/json;charset=utf-8", |
||||
|
data: JSON.stringify(data), |
||||
|
beforeSend: function () { |
||||
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
||||
|
}, |
||||
|
success: function (data) { |
||||
|
layer.close(this.layerIndex); |
||||
|
if (data.status >= 300) { |
||||
|
layer.msg(data.statusInfo.message);//失败的表情 |
||||
|
return; |
||||
|
} else { |
||||
|
layer.msg("申请提交成功", { |
||||
|
icon: 6,//成功的表情 |
||||
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
||||
|
},function(){ |
||||
|
var index = parent.layer.getFrameIndex(window.name); |
||||
|
parent.layer.close(index);//关闭当前页 |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
}); |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,208 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en" xmlns:checked="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> |
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<title>layui</title> |
||||
|
<meta content="webkit" name="renderer"> |
||||
|
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> |
||||
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport"> |
||||
|
<link href="/static/lib/layui-v2.6.3/css/layui.css" media="all" rel="stylesheet"> |
||||
|
<link href="/static/css/public.css" media="all" rel="stylesheet"> |
||||
|
|
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="layuimini-container"> |
||||
|
<input id="userId" style="display: none" th:value="${userId}"> |
||||
|
<script type="text/html" id="toolbarDemo"> |
||||
|
<div class="layui-btn-container"> |
||||
|
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="add_role">添加权限</button> |
||||
|
<button class="layui-btn layui-btn-sm layui-btn-danger data-delete-btn" lay-event="delete">删除权限</button> |
||||
|
</div> |
||||
|
</script> |
||||
|
<table id="demo" class="layui-hide" lay-filter="currentTableFilter"></table> |
||||
|
|
||||
|
<script type="text/html" id="currentTableBar"> |
||||
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="detail">详情</a> |
||||
|
<a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a> |
||||
|
</script> |
||||
|
|
||||
|
</div> |
||||
|
<script charset="utf-8" src="/static/lib/layui-v2.6.3/layui.js"></script> |
||||
|
<script> |
||||
|
layui.use('table', function () { |
||||
|
var table = layui.table; |
||||
|
var $ = layui.$; |
||||
|
var userId = document.getElementById("userId").value; |
||||
|
//第一个实例 |
||||
|
table.render({ |
||||
|
elem: '#demo' |
||||
|
, height: 312 |
||||
|
, url: 'findUserRole?userId=' + userId, //数据接口 |
||||
|
parseData: function (res) { //res 即为原始返回的数据 |
||||
|
return { |
||||
|
"status": res.status, //解析接口状态 |
||||
|
"message": res.statusInfo.message, //解析提示文本 |
||||
|
"count": res.count, //解析数据长度 |
||||
|
"data": res.data //解析数据列表 |
||||
|
}; |
||||
|
}, |
||||
|
request: { |
||||
|
pageName: 'page', //页码的参数名称,默认:page |
||||
|
limitName: 'pagesize' //每页数据量的参数名,默认:limit |
||||
|
}, |
||||
|
response: { |
||||
|
statusName: 'status' //规定数据状态的字段名称,默认:code |
||||
|
, statusCode: 200 //规定成功的状态码,默认:0 |
||||
|
, msgName: 'message' //规定状态信息的字段名称,默认:msg |
||||
|
, countName: 'count' //规定数据总数的字段名称,默认:count |
||||
|
, dataName: 'data' //规定数据列表的字段名称,默认:data |
||||
|
}, toolbar: '#toolbarDemo' |
||||
|
, cols: [ |
||||
|
[ //表头 |
||||
|
{type: "checkbox", width: 50}, |
||||
|
{field: 'id', width: 80, title: 'ID', sort: true}, |
||||
|
{field: 'depositoryName', width: 200, title: '仓库名称', sort: true}, |
||||
|
{field: 'number', width: 100, title: '工号', sort: true}, |
||||
|
{field: 'name', width: 100, title: '姓名', sort: true}, |
||||
|
{ |
||||
|
field: 'state', title: '状态', minWidth: 80, sort: true, templet: function (d) { |
||||
|
if (d.state == 1) { |
||||
|
return "启用"; |
||||
|
} else if (d.state == 2) { |
||||
|
return "禁用"; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{field: 'mobilephone', width: 200, title: '内线电话', sort: true}, |
||||
|
{field: 'companyname', width: 200, title: '公司名称', sort: true}, |
||||
|
{field: 'maindeparmentname', width: 200, title: '主部门', sort: true}, |
||||
|
{field: 'sunmaindeparmentname', width: 200, title: '岗位', sort: true}, |
||||
|
{title: '操作', minWidth: 150, toolbar: '#currentTableBar', align: "center"} |
||||
|
] |
||||
|
], |
||||
|
limits: [10, 15, 20, 25, 50, 100], |
||||
|
limit: 10, |
||||
|
page: true, |
||||
|
skin: 'line', |
||||
|
done:function () { |
||||
|
$("[data-field='id']").css('display','none'); |
||||
|
} |
||||
|
}); |
||||
|
//监听表格复选框选择 |
||||
|
table.on('checkbox(currentTableFilter)', function (obj) { |
||||
|
console.log(obj) |
||||
|
}); |
||||
|
table.on('tool(currentTableFilter)', function (obj) { |
||||
|
let data = obj.data; |
||||
|
if(obj.event === 'detail'){ |
||||
|
var index = layer.open({ |
||||
|
title: '修改权限', |
||||
|
type: 2, |
||||
|
shade: 0.2, |
||||
|
maxmin:true, |
||||
|
shadeClose: true, |
||||
|
area: ['100%', '100%'], |
||||
|
content: '/user_role_edit?id='+data.id, |
||||
|
end:function () { |
||||
|
location.reload() |
||||
|
} |
||||
|
}); |
||||
|
$(window).on("resize", function () { |
||||
|
layer.full(index); |
||||
|
}); |
||||
|
return false; |
||||
|
} |
||||
|
else if(obj.event === 'delete'){ |
||||
|
var req = {}; |
||||
|
req.id = data.id; |
||||
|
layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) { |
||||
|
$.ajax({ |
||||
|
url: '/sys/userRole_del', |
||||
|
dataType: 'json', |
||||
|
type: 'POST', |
||||
|
contentType: "application/json;charset=utf-8", |
||||
|
data: JSON.stringify(req), |
||||
|
beforeSend: function () { |
||||
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
||||
|
}, |
||||
|
success: function (data) { |
||||
|
layer.close(this.layerIndex); |
||||
|
if (data.status >= 300) { |
||||
|
layer.msg(data.statusInfo.message);//失败的表情 |
||||
|
return; |
||||
|
} else { |
||||
|
obj.del(); |
||||
|
layer.msg("删除成功", { |
||||
|
icon: 6,//成功的表情 |
||||
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
table.on('toolbar(currentTableFilter)', function (obj) { |
||||
|
if (obj.event === 'add_role') { |
||||
|
var index = layer.open({ |
||||
|
title: '添加权限', |
||||
|
type: 2, |
||||
|
shade: 0.2, |
||||
|
maxmin:true, |
||||
|
shadeClose: true, |
||||
|
area: ['100%', '100%'], |
||||
|
content: '/user_add?userId='+userId, |
||||
|
end:function () { |
||||
|
location.reload() |
||||
|
} |
||||
|
}); |
||||
|
$(window).on("resize", function () { |
||||
|
layer.full(index); |
||||
|
}); |
||||
|
return false; |
||||
|
} |
||||
|
else if (obj.event === 'delete') { // 监听删除操作 |
||||
|
var checkStatus = table.checkStatus('demo') |
||||
|
, data = checkStatus.data; |
||||
|
var req = {}; |
||||
|
req.ids = []; |
||||
|
for (i = 0, len = data.length; i < len; i++) { |
||||
|
req.ids[i] = data[i].id; |
||||
|
} |
||||
|
layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) { |
||||
|
$.ajax({ |
||||
|
url: '/sys/userRole_del', |
||||
|
dataType: 'json', |
||||
|
type: 'POST', |
||||
|
contentType: "application/json;charset=utf-8", |
||||
|
data: JSON.stringify(req), |
||||
|
beforeSend: function () { |
||||
|
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); |
||||
|
}, |
||||
|
success: function (data) { |
||||
|
layer.close(this.layerIndex); |
||||
|
if (data.status >= 300) { |
||||
|
layer.msg(data.statusInfo.message);//失败的表情 |
||||
|
return; |
||||
|
} else { |
||||
|
layer.msg("删除成功", { |
||||
|
icon: 6,//成功的表情 |
||||
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
||||
|
}); |
||||
|
//执行搜索重载 |
||||
|
table.reload('demo', { |
||||
|
url: '/findUserRole?userId='+userId, |
||||
|
page: { |
||||
|
curr: 1 |
||||
|
} |
||||
|
}, 'data'); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
}) |
||||
|
}); |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,4 @@ |
|||||
|
Manifest-Version: 1.0 |
||||
|
Main-Class: com.dreamchaser.depository_manage.DepositoryManageApplicatio |
||||
|
n |
||||
|
|
||||
@ -0,0 +1,17 @@ |
|||||
|
{ |
||||
|
"groups": [ |
||||
|
{ |
||||
|
"name": "file", |
||||
|
"type": "com.dreamchaser.depository_manage.config.FileConfig", |
||||
|
"sourceType": "com.dreamchaser.depository_manage.config.FileConfig" |
||||
|
} |
||||
|
], |
||||
|
"properties": [ |
||||
|
{ |
||||
|
"name": "file.upload-path", |
||||
|
"type": "java.lang.String", |
||||
|
"sourceType": "com.dreamchaser.depository_manage.config.FileConfig" |
||||
|
} |
||||
|
], |
||||
|
"hints": [] |
||||
|
} |
||||
@ -0,0 +1,97 @@ |
|||||
|
#开启健康检查、审计、统计和监控,即可通过访问/actuator/beans等查看状态 |
||||
|
management: |
||||
|
endpoints: |
||||
|
web: |
||||
|
exposure: |
||||
|
include: beans,health |
||||
|
spring: |
||||
|
servlet: |
||||
|
multipart: |
||||
|
enabled: true |
||||
|
max-file-size: 100MB # 单个文件上传的最大上限 |
||||
|
max-request-size: 100MB # 一次请求总大小上限 |
||||
|
|
||||
|
mail: |
||||
|
#邮箱配置 |
||||
|
#平台地址,这里用的是qq邮箱,使用其他邮箱请更换 |
||||
|
host: smtp.qq.com |
||||
|
#这里是你要发送邮箱的账户 |
||||
|
username: 1789131794@qq.com |
||||
|
#发送短信后它给你的授权码 |
||||
|
password: ###### |
||||
|
properties: |
||||
|
mail: |
||||
|
smtp: |
||||
|
ssl: |
||||
|
enable: true |
||||
|
##编码格式 |
||||
|
default-encoding: utf-8 |
||||
|
##数据库设置 |
||||
|
datasource: |
||||
|
username: depository |
||||
|
password: NhE47edekBHxhjYk |
||||
|
url: jdbc:mysql://localhost:3306/depository?serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull |
||||
|
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
|
type: com.alibaba.druid.pool.DruidDataSource |
||||
|
initialSize: 5 |
||||
|
minIdle: 5 |
||||
|
maxActive: 10 |
||||
|
maxWait: 60000 |
||||
|
timeBetweenEvictionRunsMillis: 60000 |
||||
|
minEvictableIdleTimeMillis: 300000 |
||||
|
validationQuery: SELECT 1 FROM DUAL |
||||
|
useGlobalDataSourceStat: true |
||||
|
server: |
||||
|
port: 9090 |
||||
|
testWhileIdle: true |
||||
|
testOnReturn: false |
||||
|
testOnBorrow: false |
||||
|
poolPreparedStatements: true |
||||
|
maxPoolPreparedStatementPerConnectionSize: 20 |
||||
|
#配置监控统计拦截的filters,去掉后监控界面sql将无法统计,'wall'用于防火墙 |
||||
|
filters: stat, wall, log4j |
||||
|
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
||||
|
#超时回收机制 |
||||
|
removeAbandoned: true |
||||
|
removeAbandonedTimeout: 1800 |
||||
|
logAbandoned: true |
||||
|
banner: |
||||
|
location: banner.txt |
||||
|
thymeleaf: |
||||
|
cache: false |
||||
|
mode: HTML |
||||
|
mvc: |
||||
|
hiddenmethod: |
||||
|
filter: |
||||
|
enabled: true |
||||
|
view: |
||||
|
prefix: /templates/ |
||||
|
suffix: .html |
||||
|
static-path-pattern: /static/** |
||||
|
redis: |
||||
|
port: 6379 |
||||
|
host: 127.0.0.1 |
||||
|
database: 0 |
||||
|
jedis: |
||||
|
pool: |
||||
|
max-active: 8 |
||||
|
max-wait: 50ms |
||||
|
max-idle: 8 |
||||
|
min-idle: 0 |
||||
|
timeout: 2000ms |
||||
|
|
||||
|
# resources: |
||||
|
# static-locations: classpath:/static/ |
||||
|
server: |
||||
|
mybatis: |
||||
|
type-aliases-package: com.dreamchaser.depository_manage.entity |
||||
|
configuration: |
||||
|
log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl |
||||
|
log-prefix: mapper. |
||||
|
|
||||
|
mybatis-plus: |
||||
|
configuration: |
||||
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
||||
|
|
||||
|
file: |
||||
|
uploadPath: D:/upLoad |
||||
@ -0,0 +1,5 @@ |
|||||
|
spring: |
||||
|
profiles: |
||||
|
active: test |
||||
|
server: |
||||
|
port: 11111 |
||||
@ -0,0 +1,14 @@ |
|||||
|
,---, ____ ,---, |
||||
|
.' .' `\ ,' , `. ,--.' | |
||||
|
,---.' \ __ ,-. ,-+-,.' _ | | | : __ ,-. |
||||
|
| | .`\ |,' ,'/ /| ,-+-. ; , || : : : .--.--. ,' ,'/ /| |
||||
|
: : | ' |' | |' | ,---. ,--.--. ,--.'|' | || ,---. : | |,--. ,--.--. / / ' ,---. ' | |' | |
||||
|
| ' ' ; :| | ,'/ \ / \ | | ,', | |,/ \ | : ' | / \ | : /`./ / \ | | ,' |
||||
|
' | ; . |' : / / / | .--. .-. | | | / | |--'/ / ' | | /' :.--. .-. | | : ;_ / / |' : / |
||||
|
| | : | '| | ' . ' / | \__\/: . . | : | | , . ' / ' : | | | \__\/: . . \ \ `. . ' / || | ' |
||||
|
' : | / ; ; : | ' ; /| ," .--.; | | : | |/ ' ; :__ | | ' | : ," .--.; | `----. \' ; /|; : | |
||||
|
| | '` ,/ | , ; ' | / | / / ,. | | | |`-' ' | '.'|| : :_:,'/ / ,. | / /`--' /' | / || , ; |
||||
|
; : .' ---' | : |; : .' \| ;/ | : :| | ,' ; : .' \'--'. / | : | ---' |
||||
|
| ,.' \ \ / | , .-./'---' \ \ / `--'' | , .-./ `--'---' \ \ / |
||||
|
'---' `----' `--`---' `----' `--`---' `----' |
||||
|
|
||||
@ -0,0 +1,108 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<!-- depository --> |
||||
|
<mapper namespace="com.dreamchaser.depository_manage.mapper.AccesstoAddressMapper"> |
||||
|
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
||||
|
<!-- 字段映射 --> |
||||
|
<resultMap id="accesstoAddress" type="com.dreamchaser.depository_manage.entity.AccesstoAddress"> |
||||
|
<id column="id" property="id" jdbcType="INTEGER" /> |
||||
|
<result column="name" property="name" jdbcType="VARCHAR" /> |
||||
|
<result column="url" property="url" jdbcType="VARCHAR" /> |
||||
|
<result column="type" property="type" jdbcType="INTEGER" /> |
||||
|
<result column="role_id" property="role_id" jdbcType="INTEGER" /> |
||||
|
<result column="menuparent" property="menuparent" jdbcType="INTEGER" /> |
||||
|
<result column="state" property="state" jdbcType="INTEGER" /> |
||||
|
<result column="icon" property="icon" jdbcType="VARCHAR"/> |
||||
|
<result column="target" property="target" jdbcType="VARCHAR"/> |
||||
|
<result column="ischild" property="ischild" jdbcType="INTEGER"/> |
||||
|
</resultMap> |
||||
|
<!-- This code was generated by TableGo tools, mark 1 end. --> |
||||
|
|
||||
|
<!-- This code was generated by TableGo tools, mark 2 begin. --> |
||||
|
<!-- 表查询字段 --> |
||||
|
<sql id="allColumns"> |
||||
|
a.id,a.name,a.url ,a.`type` ,a.role_id ,a.menuparent ,a.state,a.icon,a.target,a.ischild |
||||
|
</sql> |
||||
|
|
||||
|
<select id="findAllMenus" resultMap="accesstoAddress"> |
||||
|
select |
||||
|
<include refid="allColumns"></include> |
||||
|
from accesstoaddress a |
||||
|
where a.state != 3 |
||||
|
</select> |
||||
|
|
||||
|
<select id="findAccessstoAddressByParentAndRole" resultMap="accesstoAddress" parameterType="map"> |
||||
|
select |
||||
|
<include refid="allColumns"/> |
||||
|
from accesstoaddress a |
||||
|
where 1 = 1 |
||||
|
<if test="roleId != null and roleId != ''"> |
||||
|
and a.role_id = #{roleId} |
||||
|
</if> |
||||
|
<if test="menuparent != null and menuparent != ''"> |
||||
|
and a.menuparent = #{menuparent} |
||||
|
</if> |
||||
|
and a.state != 3 |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<select id="findMenusByRole" resultMap="accesstoAddress" parameterType="map"> |
||||
|
select |
||||
|
<include refid="allColumns"/> |
||||
|
from accesstoaddress a |
||||
|
where 1 = 1 |
||||
|
<if test="type != null and type != ''"> |
||||
|
and type = #{type} |
||||
|
</if> |
||||
|
<if test="roleId != null and roleId != ''"> |
||||
|
and a.role_id = #{roleId} |
||||
|
</if> |
||||
|
<if test="menuparent != null and menuparent != ''"> |
||||
|
and a.menuparent = #{menuparent} |
||||
|
</if> |
||||
|
and a.state != 3 |
||||
|
</select> |
||||
|
|
||||
|
<select id="findMenusByNoParent" resultMap="accesstoAddress"> |
||||
|
select |
||||
|
<include refid="allColumns"></include> |
||||
|
from accesstoaddress a |
||||
|
where 1 = 1 |
||||
|
and a.menuparent = 0 |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<select id="findAccessstoAddressByParent" resultMap="accesstoAddress" parameterType="INTEGER"> |
||||
|
select |
||||
|
<include refid="allColumns"></include> |
||||
|
from accesstoaddress a |
||||
|
where 1 = 1 |
||||
|
and a.menuparent = #{id} |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<select id="findAccessToAddressByUser" resultMap="accesstoAddress" parameterType="map"> |
||||
|
select |
||||
|
<include refid="allColumns"/> |
||||
|
from |
||||
|
AccessToAddressByUser a |
||||
|
where authority = #{roleId} |
||||
|
<if test="userId != '' and userId != null "> |
||||
|
and uid = #{userId} |
||||
|
</if> |
||||
|
<if test="menuparent != null and menuparent != ''"> |
||||
|
and menuparent = #{menuparent} |
||||
|
</if> |
||||
|
</select> |
||||
|
|
||||
|
<select id="findAccessToAddressByList" resultMap="accesstoAddress" parameterType="list"> |
||||
|
select |
||||
|
<include refid="allColumns"/> |
||||
|
from accesstoaddress a |
||||
|
where a.id in |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</select> |
||||
|
</mapper> |
||||
@ -0,0 +1,168 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<!-- depository --> |
||||
|
<mapper namespace="com.dreamchaser.depository_manage.mapper.CompanyMapper"> |
||||
|
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
||||
|
<!-- 字段映射 --> |
||||
|
<resultMap id="companyMap" type="com.dreamchaser.depository_manage.entity.Company"> |
||||
|
<id column="cid" property="cid" jdbcType="INTEGER" /> |
||||
|
<result column="cname" property="cname" jdbcType="VARCHAR" /> |
||||
|
<result column="state" property="state" jdbcType="INTEGER"/> |
||||
|
<result column="parentId" property="parentId" jdbcType="INTEGER"/> |
||||
|
<result column="introduce" property="introduce" jdbcType="VARCHAR"/> |
||||
|
</resultMap> |
||||
|
<!-- This code was generated by TableGo tools, mark 1 end. --> |
||||
|
|
||||
|
<!-- This code was generated by TableGo tools, mark 2 begin. --> |
||||
|
<!-- 表查询字段 --> |
||||
|
<sql id="allColumns"> |
||||
|
c.cid, c.cname ,c.state , c.parentId,c.introduce |
||||
|
</sql> |
||||
|
|
||||
|
<!-- 查询所有数据 --> |
||||
|
<select id="findCompanyAll" resultMap="companyMap"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM company c |
||||
|
Where c.state != 3 |
||||
|
</select> |
||||
|
|
||||
|
<select id="findcompanyById" resultMap="companyMap" parameterType="int"> |
||||
|
select <include refid="allColumns"/> |
||||
|
from company c |
||||
|
where c.cid = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据条件查询公司--> |
||||
|
<select id="findCompanyByCondition" resultMap="companyMap" parameterType="map"> |
||||
|
select |
||||
|
<include refid="allColumns"/> |
||||
|
from company c |
||||
|
where 1 = 1 |
||||
|
<if test="id != null and id !=''"> |
||||
|
and c.cid = #{id} |
||||
|
</if> |
||||
|
<if test="cname != null and cname != ''"> |
||||
|
and c.cname LIKE CONCAT('%', #{cname}, '%') |
||||
|
</if> |
||||
|
<if test="introduce != null and introduce !=''"> |
||||
|
and c.introduce LIKE CONCAT('%', #{introduce}, '%') |
||||
|
</if> |
||||
|
<if test="parentId != null"> |
||||
|
AND c.parentId = #{parentId} |
||||
|
</if> |
||||
|
<if test="state != null"> |
||||
|
and c.state = #{state} |
||||
|
</if> |
||||
|
and c.state != 3 |
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据条件参数查询数据列表数目 --> |
||||
|
<select id="findCountByCondition" resultType="int" parameterType="map"> |
||||
|
SELECT count(*) |
||||
|
from company c |
||||
|
where 1 = 1 |
||||
|
<if test="id != null and id !=''"> |
||||
|
and c.cid = #{id} |
||||
|
</if> |
||||
|
<if test="cname != null and cname != ''"> |
||||
|
and c.cname LIKE CONCAT('%', #{cname}, '%') |
||||
|
</if> |
||||
|
<if test="introduce != null and introduce !=''"> |
||||
|
and c.introduce LIKE CONCAT('%', #{introduce}, '%') |
||||
|
</if> |
||||
|
<if test="parentId != null"> |
||||
|
AND c.parentId = #{parentId} |
||||
|
</if> |
||||
|
and c.state != 3 |
||||
|
</select> |
||||
|
|
||||
|
<!--根据父级查询公司信息--> |
||||
|
<select id="findCompanyByParentId" resultMap="companyMap" parameterType="int"> |
||||
|
select |
||||
|
<include refid="allColumns"/> |
||||
|
from company c |
||||
|
where c.state != 3 and c.parentId = #{parentId} |
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据主键删除数据 --> |
||||
|
<delete id="deleteCompanyById" parameterType="int"> |
||||
|
DELETE FROM company WHERE cid = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<!-- 根据主键批量删除数据 --> |
||||
|
<delete id="deleteCompanyByIds" parameterType="list"> |
||||
|
DELETE FROM company WHERE cid IN |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
<!-- 修改数据 --> |
||||
|
<update id="updateCompany" parameterType="map"> |
||||
|
UPDATE company |
||||
|
<set> |
||||
|
<if test="cname != null"> |
||||
|
cname = #{cname}, |
||||
|
</if> |
||||
|
<if test="introduce != null"> |
||||
|
introduce = #{introduce}, |
||||
|
</if> |
||||
|
<if test="state != null"> |
||||
|
state = #{state}, |
||||
|
</if> |
||||
|
<if test="parentId != null"> |
||||
|
parentId = #{parentId} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE cid = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<!--插入数据--> |
||||
|
<insert id="insertCompany" parameterType="map"> |
||||
|
INSERT INTO company ( |
||||
|
cid, cname, introduce,parentId |
||||
|
) VALUES ( |
||||
|
#{id}, |
||||
|
#{cname}, |
||||
|
#{introduce}, |
||||
|
#{parentId} |
||||
|
) |
||||
|
</insert> |
||||
|
|
||||
|
<!-- 根据主键将状态改为删除--> |
||||
|
<update id="changeStateToDeletedById" parameterType="int"> |
||||
|
update company |
||||
|
<set> |
||||
|
state = 3 |
||||
|
</set> |
||||
|
where cid = #{id} |
||||
|
</update> |
||||
|
|
||||
|
|
||||
|
<!-- 根据主键批量将状态改为删除--> |
||||
|
<update id="changeStateToDeletedByIds" parameterType="list"> |
||||
|
update company |
||||
|
<set> |
||||
|
state = 3 |
||||
|
</set> |
||||
|
where cid in |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</update> |
||||
|
|
||||
|
|
||||
|
<update id="updateStateByParam" parameterType="map"> |
||||
|
update company |
||||
|
<set> |
||||
|
state = #{state} |
||||
|
</set> |
||||
|
where cid = #{cid} |
||||
|
<if test="oldState != null"> |
||||
|
and state = #{oldState} |
||||
|
</if> |
||||
|
and state != 3 |
||||
|
</update> |
||||
|
</mapper> |
||||
@ -0,0 +1,345 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<!-- depository --> |
||||
|
<mapper namespace="com.dreamchaser.depository_manage.mapper.DepositoryMapper"> |
||||
|
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
||||
|
<!-- 字段映射 --> |
||||
|
<resultMap id="depositoryMap" type="com.dreamchaser.depository_manage.entity.Depository"> |
||||
|
<id column="id" property="id" jdbcType="INTEGER" /> |
||||
|
<result column="dname" property="dname" jdbcType="VARCHAR" /> |
||||
|
<result column="address" property="address" jdbcType="VARCHAR" /> |
||||
|
<result column="introduce" property="introduce" jdbcType="VARCHAR" /> |
||||
|
<result column="parentId" property="parentId" jdbcType="INTEGER"/> |
||||
|
<result column="cid" property="cid" jdbcType="INTEGER"/> |
||||
|
<result column="code" property="code" jdbcType="VARCHAR"/> |
||||
|
<result column="adminorg" property="adminorg" jdbcType="VARCHAR"/> |
||||
|
<result column="minNumber" property="minNumber" jdbcType="INTEGER"/> |
||||
|
<result column="maxNumber" property="maxNumber" jdbcType="INTEGER"/> |
||||
|
</resultMap> |
||||
|
<!-- This code was generated by TableGo tools, mark 1 end. --> |
||||
|
|
||||
|
<!-- This code was generated by TableGo tools, mark 2 begin. --> |
||||
|
<!-- 表查询字段 --> |
||||
|
<sql id="allColumns"> |
||||
|
d.id, d.dname, d.address, d.introduce,d.state,d.parentId,d.cid,d.code,d.adminorg,d.maxNumber,d.minNumber |
||||
|
</sql> |
||||
|
<!-- 视图查询字段--> |
||||
|
<sql id="depositoryAndCompany"> |
||||
|
id,dname,address,introduce,state,parentId,cid,cname,code,adminorg,minNumber,maxNumber |
||||
|
</sql> |
||||
|
<!-- This code was generated by TableGo tools, mark 2 end. --> |
||||
|
|
||||
|
<!-- 根据id获取仓库名称 --> |
||||
|
<select id="findDepositoryNameById" resultType="string" parameterType="int"> |
||||
|
SELECT |
||||
|
d.dname |
||||
|
FROM depository d where d.id=#{id} |
||||
|
</select> |
||||
|
|
||||
|
<!-- <!– 查询所有数据 –> |
||||
|
<select id="findDepositoryAll" resultMap="depositoryMap"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM depository d |
||||
|
Where d.state != 3 |
||||
|
</select>--> |
||||
|
|
||||
|
<!-- 查询所有数据 --> |
||||
|
<select id="findDepositoryAll" resultMap="depositoryMap"> |
||||
|
SELECT |
||||
|
<include refid="depositoryAndCompany" /> |
||||
|
FROM depositoryandcompany dc |
||||
|
Where dc.state != 3 |
||||
|
</select> |
||||
|
|
||||
|
<!-- 获取当前部门仓库以及公共仓库--> |
||||
|
<select id="findDepositoryByAdminorg" resultMap="depositoryMap" parameterType="string"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM depository d WHERE 1 = 1 |
||||
|
<if test="adminorg != null and adminorg != ''"> |
||||
|
and d.adminorg = #{adminorg} |
||||
|
</if> |
||||
|
or d.adminorg = '' |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<!-- 根据主键查询多个数据--> |
||||
|
<select id="selectDepositoryRecordByIds" parameterType="list" resultMap="depositoryMap"> |
||||
|
select |
||||
|
<include refid="allColumns"></include> |
||||
|
FROM depository WHERE id IN |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</select> |
||||
|
<!-- 根据条件查询数据列表 --> |
||||
|
<select id="findDepositoryRecordPByCondition" resultMap="depositoryMap" parameterType="map"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM depository d WHERE 1 = 1 |
||||
|
<if test="depositoryId != null"> |
||||
|
AND d.id = #{depositoryId} |
||||
|
</if> |
||||
|
<if test="dname != null and dname != ''"> |
||||
|
AND d.dname LIKE CONCAT('%', #{dname}, '%') |
||||
|
</if> |
||||
|
<if test="address != null and address != ''"> |
||||
|
AND d.address LIKE CONCAT('%', #{address}, '%') |
||||
|
</if> |
||||
|
<if test="introduce != null and introduce != ''"> |
||||
|
AND d.introduce LIKE CONCAT('%', #{introduce}, '%') |
||||
|
</if> |
||||
|
<if test="state != null and state != '' "> |
||||
|
AND d.state = #{state} |
||||
|
</if> |
||||
|
<if test="parentId != null"> |
||||
|
AND d.parentId = #{parentId} |
||||
|
</if> |
||||
|
<if test="cid != null"> |
||||
|
and d.cid = #{cid} |
||||
|
</if> |
||||
|
<if test="adminorg != null"> |
||||
|
and d.adminorg = #{adminorg} |
||||
|
</if> |
||||
|
AND d.state != 3 |
||||
|
</select> |
||||
|
<!-- 根据条件查询数据列表--> |
||||
|
<!--<select id="findDepositoryRecordPByCondition" resultMap="depositoryMap" parameterType="map"> |
||||
|
SELECT |
||||
|
<include refid="depositoryAndCompany" /> |
||||
|
FROM depositoryandcompany d WHERE 1 = 1 |
||||
|
<if test="depositoryId != null"> |
||||
|
AND d.id = #{depositoryId} |
||||
|
</if> |
||||
|
<if test="dname != null and dname != ''"> |
||||
|
AND d.dname LIKE CONCAT('%', #{dname}, '%') |
||||
|
</if> |
||||
|
<if test="address != null and address != ''"> |
||||
|
AND d.address LIKE CONCAT('%', #{address}, '%') |
||||
|
</if> |
||||
|
<if test="introduce != null and introduce != ''"> |
||||
|
AND d.introduce LIKE CONCAT('%', #{introduce}, '%') |
||||
|
</if> |
||||
|
<if test="state != null and state != '' "> |
||||
|
AND d.state = #{state} |
||||
|
</if> |
||||
|
<if test="parentId != null"> |
||||
|
AND d.parentId = #{parentId} |
||||
|
</if> |
||||
|
<if test="cid != null"> |
||||
|
and d.cid = #{cid} |
||||
|
</if> |
||||
|
AND d.state != 3 |
||||
|
</select>--> |
||||
|
|
||||
|
<!-- 根据条件参数查询数据列表数目 --> |
||||
|
<select id="findCountByCondition" resultType="int" parameterType="map"> |
||||
|
SELECT count(*) |
||||
|
FROM depository d WHERE 1 = 1 |
||||
|
<if test="dname != null and dname != ''"> |
||||
|
AND d.dname LIKE CONCAT('%', #{dname}, '%') |
||||
|
</if> |
||||
|
<if test="address != null and address != ''"> |
||||
|
AND d.address LIKE CONCAT('%', #{address}, '%') |
||||
|
</if> |
||||
|
<if test="introduce != null and introduce != ''"> |
||||
|
AND d.introduce LIKE CONCAT('%', #{introduce}, '%') |
||||
|
</if> |
||||
|
<if test="state != null and state != '' "> |
||||
|
AND d.state = #{state} |
||||
|
</if> |
||||
|
<if test="parentId != null and parentId != ''"> |
||||
|
AND d.parentId = #{parentId} |
||||
|
</if> |
||||
|
<if test="cid != null"> |
||||
|
and d.cid = #{cid} |
||||
|
</if> |
||||
|
<if test="adminorg != null"> |
||||
|
and d.adminorg = #{adminorg} |
||||
|
</if> |
||||
|
AND d.state != 3 |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<select id="getParentByDepository" resultMap="depositoryMap" parameterType="int"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM depository d WHERE d.parentId = #{parentId} |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<!-- 根据主键查询数据--> |
||||
|
<select id="findDepositoryRecordById" resultMap="depositoryMap" parameterType="Integer"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM depository d WHERE d.id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<!-- 插入数据 --> |
||||
|
<insert id="insertDepository" parameterType="map"> |
||||
|
INSERT INTO depository ( |
||||
|
id, dname, address, introduce,parentId,cid,code,adminorg,maxNumber,minNumber |
||||
|
) VALUES ( |
||||
|
#{id}, |
||||
|
#{dname}, |
||||
|
#{address}, |
||||
|
#{introduce}, |
||||
|
#{parentId}, |
||||
|
#{cid}, |
||||
|
#{code}, |
||||
|
#{adminorg}, |
||||
|
#{maxNumber}, |
||||
|
#{minNumber} |
||||
|
) |
||||
|
</insert> |
||||
|
|
||||
|
<!-- 批量插入数据 |
||||
|
<insert id="insertDepositorys" parameterType="list"> |
||||
|
INSERT INTO depository ( |
||||
|
id, dname, address, introduce |
||||
|
) VALUES |
||||
|
<foreach collection="list" index="index" item="item" separator=","> |
||||
|
( |
||||
|
#{item.id}, |
||||
|
#{item.dname}, |
||||
|
#{item.address}, |
||||
|
#{item.introduce} |
||||
|
) |
||||
|
</foreach> |
||||
|
</insert> |
||||
|
--> |
||||
|
|
||||
|
<!-- 修改数据 --> |
||||
|
<update id="updateDepository" parameterType="map"> |
||||
|
UPDATE depository |
||||
|
<set> |
||||
|
<if test="dname != null"> |
||||
|
dname = #{dname}, |
||||
|
</if> |
||||
|
<if test="address != null"> |
||||
|
address = #{address}, |
||||
|
</if> |
||||
|
<if test="introduce != null"> |
||||
|
introduce = #{introduce}, |
||||
|
</if> |
||||
|
<if test="state != null"> |
||||
|
state = #{state}, |
||||
|
</if> |
||||
|
<if test="parentId != null"> |
||||
|
parentId = #{parentId}, |
||||
|
</if> |
||||
|
<if test="cid != null"> |
||||
|
cid = #{cid}, |
||||
|
</if> |
||||
|
<if test="adminorg != null"> |
||||
|
adminorg = #{adminorg}, |
||||
|
</if> |
||||
|
<if test="code != null"> |
||||
|
code = #{code}, |
||||
|
</if> |
||||
|
<if test="minNumber != null and minNumber != ''"> |
||||
|
minNumber = #{minNumber}, |
||||
|
</if> |
||||
|
<if test="maxNumber != null and maxNumber != ''"> |
||||
|
maxNumber = #{maxNumber} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
|
||||
|
<!-- 批量修改数据 |
||||
|
<update id="updateDepositorys" parameterType="list"> |
||||
|
<foreach collection="list" index="index" item="item" separator=";"> |
||||
|
UPDATE depository |
||||
|
<set> |
||||
|
<if test="item.dname != null"> |
||||
|
dname = #{item.dname}, |
||||
|
</if> |
||||
|
<if test="item.address != null"> |
||||
|
address = #{item.address}, |
||||
|
</if> |
||||
|
<if test="item.introduce != null"> |
||||
|
introduce = #{item.introduce} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{item.id} |
||||
|
</foreach> |
||||
|
</update>--> |
||||
|
|
||||
|
|
||||
|
<!-- 根据主键删除数据 --> |
||||
|
<delete id="deleteDepositoryRecordById" parameterType="int"> |
||||
|
DELETE FROM depository WHERE id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
|
||||
|
<!-- 根据主键批量删除数据--> |
||||
|
<delete id="deleteDepositoryRecordByIds" parameterType="list"> |
||||
|
DELETE FROM depository WHERE id IN |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
<!-- 根据主键将状态改为删除--> |
||||
|
<update id="changeStateToDeletedById" parameterType="int"> |
||||
|
UPDATE depository |
||||
|
<set> |
||||
|
state = 3 |
||||
|
</set> |
||||
|
WHERE id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<update id="updateStateByParam" parameterType="map"> |
||||
|
UPDATE depository |
||||
|
<set> |
||||
|
state = #{state} |
||||
|
</set> |
||||
|
|
||||
|
where id = #{id} |
||||
|
<if test="oldState != null"> |
||||
|
and state = #{oldState} |
||||
|
</if> |
||||
|
and state != 3 |
||||
|
</update> |
||||
|
|
||||
|
<!-- 根据主键批量将状态改为删除--> |
||||
|
<update id="changeStateToDeletedByIds" parameterType="list"> |
||||
|
update depository |
||||
|
<set> |
||||
|
state = 3 |
||||
|
</set> |
||||
|
where id in |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</update> |
||||
|
|
||||
|
|
||||
|
<!-- 获取仓库总数--> |
||||
|
<select id="findAllCountByState" resultType="int"> |
||||
|
select count(*) |
||||
|
from depository d |
||||
|
where d.state != 3 |
||||
|
</select> |
||||
|
|
||||
|
<select id="getToDayInventoryByDName" resultType="double" parameterType="string"> |
||||
|
select ifnull(sum(quantity),0.0) |
||||
|
from depositoryAndmaterial |
||||
|
where dname = #{dname} |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<select id="findUserNameByDepositoryId" resultType="string" parameterType="int"> |
||||
|
select uname |
||||
|
from depositoryanduser |
||||
|
where did = #{depositoryId} |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,350 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<!-- 产品信息记录(库存)(material) --> |
||||
|
<mapper namespace="com.dreamchaser.depository_manage.mapper.MaterialMapper"> |
||||
|
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
||||
|
<!-- 字段映射 --> |
||||
|
<resultMap id="materialMap" type="com.dreamchaser.depository_manage.entity.Material"> |
||||
|
<id column="id" property="id" jdbcType="INTEGER" /> |
||||
|
<result column="depository_id" property="depositoryId" jdbcType="INTEGER" /> |
||||
|
<result column="mname" property="mname" jdbcType="VARCHAR" /> |
||||
|
<result column="quantity" property="quantity" jdbcType="VARCHAR" /> |
||||
|
<result column="price" property="price" jdbcType="DOUBLE" /> |
||||
|
<result column="type_id" property="typeId" jdbcType="INTEGER" /> |
||||
|
<result column="state" property="state" jdbcType="INTEGER" /> |
||||
|
<result column="code" property="code" jdbcType="INTEGER"/> |
||||
|
<result column="version" property="version" jdbcType="VARCHAR"/> |
||||
|
<result column="amounts" property="amounts" jdbcType="DOUBLE"/> |
||||
|
<result column="unit" property="unit" jdbcType="VARCHAR"/> |
||||
|
<result column="texture" property="texture" jdbcType="VARCHAR"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<!-- 字段映射--> |
||||
|
<resultMap id="materialAndTypeMap" type="com.dreamchaser.depository_manage.entity.Material"> |
||||
|
<id column="id" property="id" jdbcType="INTEGER" /> |
||||
|
<result column="depository_id" property="depositoryId" jdbcType="INTEGER" /> |
||||
|
<result column="mname" property="mname" jdbcType="VARCHAR" /> |
||||
|
<result column="quantity" property="quantity" jdbcType="VARCHAR" /> |
||||
|
<result column="price" property="price" jdbcType="VARCHAR" /> |
||||
|
<result column="type_id" property="typeId" jdbcType="INTEGER" /> |
||||
|
<result column="state" property="state" jdbcType="INTEGER" /> |
||||
|
<result column="code" property="code" jdbcType="INTEGER"/> |
||||
|
<result column="version" property="version" jdbcType="VARCHAR"/> |
||||
|
<result column="amounts" property="amounts" jdbcType="DOUBLE"/> |
||||
|
<result column="unit" property="unit" jdbcType="VARCHAR"/> |
||||
|
<result column="texture" property="texture" jdbcType="VARCHAR"/> |
||||
|
<result column="depositoryCode" property="depositoryCode" jdbcType="VARCHAR"/> |
||||
|
<association property="materialType" column="typeId" javaType="com.dreamchaser.depository_manage.entity.MaterialType"> |
||||
|
<id column="id" property="id" jdbcType="INTEGER" /> |
||||
|
<result column="tname" property="tname" jdbcType="VARCHAR" /> |
||||
|
<result column="introduce" property="introduce" jdbcType="VARCHAR" /> |
||||
|
</association> |
||||
|
<association property="depository" column="depositoryId" javaType="com.dreamchaser.depository_manage.entity.Depository"> |
||||
|
<id column="id" property="id" jdbcType="INTEGER" /> |
||||
|
<result column="dname" property="dname" jdbcType="VARCHAR" /> |
||||
|
<result column="address" property="address" jdbcType="VARCHAR" /> |
||||
|
<result column="introduce" property="introduce" jdbcType="VARCHAR" /> |
||||
|
</association> |
||||
|
</resultMap> |
||||
|
|
||||
|
<!-- 表查询字段 --> |
||||
|
<sql id="allColumns"> |
||||
|
m.id, m.depository_id, m.mname, m.quantity, m.price, m.type_id,m.state,m.code ,m.version ,m.amounts ,m.unit ,m.texture,m.depositoryCode |
||||
|
</sql> |
||||
|
|
||||
|
<!-- 表查询字段,包括材料类型 --> |
||||
|
<sql id="allColumnsAndTypeName"> |
||||
|
id,depository_id,mname,quantity,price,type_id,state,code ,version ,amounts ,unit ,texture,tname,depositoryCode,dname |
||||
|
</sql> |
||||
|
|
||||
|
<!-- 表查询字段,包括材料类型 用于视图--> |
||||
|
<sql id="allColumnsAndTypeNameOnView"> |
||||
|
id,depository_id,mname,quantity,price,type_id,state,tname,dname,version,amounts ,unit ,texture,code,depositoryCode |
||||
|
</sql> |
||||
|
<!-- 查询所有数据的条数 --> |
||||
|
<select id="findCount" resultType="integer"> |
||||
|
SELECT |
||||
|
count(*) |
||||
|
FROM material m |
||||
|
</select> |
||||
|
|
||||
|
<!-- 查询所有符合条件的数据条数 --> |
||||
|
<select id="findCountByCondition" parameterType="map" resultType="integer"> |
||||
|
SELECT |
||||
|
count(*) |
||||
|
FROM material m WHERE 1 = 1 |
||||
|
<if test="depositoryId != null"> |
||||
|
AND m.depository_id = #{depositoryId} |
||||
|
</if> |
||||
|
<if test="mname != null and mname != ''"> |
||||
|
AND m.mname LIKE CONCAT('%', #{mname}, '%') |
||||
|
</if> |
||||
|
<if test="quantity != null"> |
||||
|
AND m.quantity = #{quantity} |
||||
|
</if> |
||||
|
<if test="price != null"> |
||||
|
AND m.price = #{price} |
||||
|
</if> |
||||
|
<if test="typeId != null"> |
||||
|
AND m.type_id = #{typeId} |
||||
|
</if> |
||||
|
and state != 3 |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<!-- 根据条件参数查询数据列表 --> |
||||
|
<select id="findMaterialByCondition" resultMap="materialMap" parameterType="map"> |
||||
|
SELECT |
||||
|
<include refid="allColumnsAndTypeNameOnView" /> |
||||
|
from findMaterial |
||||
|
where 1 = 1 |
||||
|
<if test="mid != null"> |
||||
|
and id = #{mid} |
||||
|
</if> |
||||
|
<if test="depositoryId != null"> |
||||
|
AND depository_id = #{depositoryId} |
||||
|
</if> |
||||
|
<if test="mname != null and mname != ''"> |
||||
|
AND mname LIKE CONCAT('%', #{mname}, '%') |
||||
|
</if> |
||||
|
<if test="quantity != null"> |
||||
|
AND quantity = #{quantity} |
||||
|
</if> |
||||
|
<if test="price != null"> |
||||
|
AND price = #{price} |
||||
|
</if> |
||||
|
<if test="materialTypeId != null"> |
||||
|
AND type_id = #{materialTypeId} |
||||
|
</if> |
||||
|
<if test="state != null and state != ''"> |
||||
|
And state = #{state} |
||||
|
</if> |
||||
|
<if test="code != null and code != '' "> |
||||
|
and code = #{code} |
||||
|
</if> |
||||
|
<if test="begin != null and size != null"> |
||||
|
LIMIT #{begin},#{size} |
||||
|
</if> |
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据仓库查询材料--> |
||||
|
<select id="findMaterialByDepositorys" resultMap="materialMap" parameterType="list"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
from material m |
||||
|
where m.depository_id in |
||||
|
<foreach collection="list" index="index" item="item" open="(" |
||||
|
separator="," close=")"> |
||||
|
#{item} |
||||
|
</foreach> |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<!-- 根据主键查询数据 --> |
||||
|
<select id="findMaterialById" resultMap="materialMap" parameterType="integer"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM material m WHERE m.id =#{id} |
||||
|
</select> |
||||
|
|
||||
|
<select id="findMaterialAndTypeById" resultMap="materialAndTypeMap" parameterType="integer"> |
||||
|
select |
||||
|
<include refid="allColumnsAndTypeName"/> |
||||
|
from materialAndType |
||||
|
where id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据主键查询数据 --> |
||||
|
<select id="findMaterialByIds" resultMap="materialMap" parameterType="list"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM material m WHERE m.id IN |
||||
|
<foreach collection="ids" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</select> |
||||
|
|
||||
|
<!-- 插入数据 --> |
||||
|
<insert id="insertMaterial" parameterType="map"> |
||||
|
INSERT INTO material ( |
||||
|
id, depository_id, mname, quantity, price, type_id,code,unit,version,texture,amounts,depositoryCode |
||||
|
) VALUES ( |
||||
|
#{id}, |
||||
|
#{depositoryId}, |
||||
|
#{mname}, |
||||
|
#{quantity}, |
||||
|
#{price}, |
||||
|
#{materialTypeId}, |
||||
|
#{code}, |
||||
|
#{unit}, |
||||
|
#{version}, |
||||
|
#{texture}, |
||||
|
#{amounts}, |
||||
|
#{depositoryCode} |
||||
|
) |
||||
|
</insert> |
||||
|
|
||||
|
<!-- 批量插入数据--> |
||||
|
<insert id="insertMaterials" parameterType="list"> |
||||
|
INSERT INTO material ( |
||||
|
id, depository_id, mname, quantity, price, type_id,code,unit,version,texture,amounts,depositoryCode |
||||
|
) VALUES |
||||
|
<foreach collection="list" index="index" item="item" separator=","> |
||||
|
( |
||||
|
#{item.id}, |
||||
|
#{item.depositoryId}, |
||||
|
#{item.mname}, |
||||
|
#{item.quantity}, |
||||
|
#{item.price}, |
||||
|
#{item.typeId}, |
||||
|
#{item.code}, |
||||
|
#{item.unit}, |
||||
|
#{item.version}, |
||||
|
#{item.texture}, |
||||
|
#{item.amounts}, |
||||
|
#{item.depositoryCode} |
||||
|
) |
||||
|
</foreach> |
||||
|
</insert> |
||||
|
|
||||
|
|
||||
|
<!-- 修改数据 --> |
||||
|
<update id="updateMaterial"> |
||||
|
UPDATE material |
||||
|
<set> |
||||
|
<if test="depositoryId != null"> |
||||
|
depository_id = #{depositoryId}, |
||||
|
</if> |
||||
|
<if test="mname != null"> |
||||
|
mname = #{mname}, |
||||
|
</if> |
||||
|
<if test="quantity != null"> |
||||
|
quantity = #{quantity}, |
||||
|
</if> |
||||
|
<if test="price != null"> |
||||
|
price = #{price}, |
||||
|
</if> |
||||
|
<if test="typeId != null"> |
||||
|
type_id = #{typeId}, |
||||
|
</if> |
||||
|
<if test="state != null and state != ''"> |
||||
|
state = #{state}, |
||||
|
</if> |
||||
|
<if test="amounts != null and amounts != ''"> |
||||
|
amounts = #{amounts}, |
||||
|
</if> |
||||
|
<if test="version != null and version != ''"> |
||||
|
version = #{version}, |
||||
|
</if> |
||||
|
<if test="code != null and code != ''"> |
||||
|
code = #{code}, |
||||
|
</if> |
||||
|
<if test="unit != null and unit != ''"> |
||||
|
unit = #{unit}, |
||||
|
</if> |
||||
|
<if test="depositoryCode != null and depositoryCode !=''"> |
||||
|
depositoryCode = #{depositoryCode} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<!-- 根据仓库id和材料名称改变材料的数量 --> |
||||
|
<update id="changeMaterial" parameterType="map"> |
||||
|
UPDATE material |
||||
|
<set> |
||||
|
|
||||
|
<if test='state == "已入库"'> |
||||
|
<if test="price != null"> |
||||
|
quantity = quantity+#{quantity}, |
||||
|
</if> |
||||
|
<if test="price != null"> |
||||
|
price = price + #{price} |
||||
|
</if> |
||||
|
</if> |
||||
|
<if test='state == "已出库"'> |
||||
|
<if test="price != null"> |
||||
|
quantity = quantity - #{quantity}, |
||||
|
</if> |
||||
|
<if test="price != null"> |
||||
|
price = price - #{price} |
||||
|
</if> |
||||
|
</if> |
||||
|
|
||||
|
</set> |
||||
|
WHERE |
||||
|
depository_id = #{depositoryId} and mname = #{mname}, |
||||
|
</update> |
||||
|
|
||||
|
<!-- 批量修改数据 |
||||
|
<update id="updateMaterials" parameterType="list"> |
||||
|
<foreach collection="list" index="index" item="item" separator=";"> |
||||
|
UPDATE material |
||||
|
<set> |
||||
|
<if test="item.depositoryId != null"> |
||||
|
depository_id = #{item.depositoryId}, |
||||
|
</if> |
||||
|
<if test="item.mname != null"> |
||||
|
mname = #{item.mname}, |
||||
|
</if> |
||||
|
<if test="item.quantity != null"> |
||||
|
quantity = #{item.quantity}, |
||||
|
</if> |
||||
|
<if test="item.price != null"> |
||||
|
price = #{item.price}, |
||||
|
</if> |
||||
|
<if test="item.typeId != null"> |
||||
|
type_id = #{item.typeId} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{item.id} |
||||
|
</foreach> |
||||
|
</update>--> |
||||
|
|
||||
|
|
||||
|
<!-- 根据主键删除数据 --> |
||||
|
<delete id="deleteMaterialById" parameterType="int"> |
||||
|
DELETE FROM material WHERE id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<!-- 根据主键批量删除数据 |
||||
|
<delete id="deleteMaterialByIds" parameterType="list"> |
||||
|
DELETE FROM material WHERE id IN |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete>--> |
||||
|
<!-- 根据主键将状态改为删除--> |
||||
|
<update id="changeStateToDeletedById" parameterType="int"> |
||||
|
UPDATE material |
||||
|
<set> |
||||
|
state = 3 |
||||
|
</set> |
||||
|
WHERE id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<update id="updateStateByParam" parameterType="map"> |
||||
|
UPDATE material |
||||
|
<set> |
||||
|
state = #{state} |
||||
|
</set> |
||||
|
where id = #{id} |
||||
|
<if test="oldState != null"> |
||||
|
and state = #{oldState} |
||||
|
</if> |
||||
|
and state != 3 |
||||
|
</update> |
||||
|
|
||||
|
<!-- 根据主键批量将状态改为删除--> |
||||
|
<update id="changeStateToDeletedByIds" parameterType="list"> |
||||
|
update material |
||||
|
<set> |
||||
|
state = 3 |
||||
|
</set> |
||||
|
where id in |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</update> |
||||
|
</mapper> |
||||
@ -0,0 +1,211 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<!-- material_type --> |
||||
|
<mapper namespace="com.dreamchaser.depository_manage.mapper.MaterialTypeMapper"> |
||||
|
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
||||
|
<!-- 字段映射 --> |
||||
|
<resultMap id="materialTypeMap" type="com.dreamchaser.depository_manage.entity.MaterialType"> |
||||
|
<id column="id" property="id" jdbcType="INTEGER" /> |
||||
|
<result column="tname" property="tname" jdbcType="VARCHAR" /> |
||||
|
<result column="introduce" property="introduce" jdbcType="VARCHAR" /> |
||||
|
</resultMap> |
||||
|
<!-- 表查询字段 --> |
||||
|
<sql id="allColumns"> |
||||
|
mt.id, mt.tname, mt.introduce, mt.state,mt.parentId |
||||
|
</sql> |
||||
|
<!-- This code was generated by TableGo tools, mark 2 end. --> |
||||
|
|
||||
|
<!-- 查询所有数据 --> |
||||
|
<select id="findMaterialTypeAll" resultMap="materialTypeMap"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM material_type mt |
||||
|
where mt.state != 3 and mt.state != 4 |
||||
|
</select> |
||||
|
<!-- 查询所有顶级父类 --> |
||||
|
<select id="findMaterialTypeNoParent" resultMap="materialTypeMap"> |
||||
|
select |
||||
|
<include refid="allColumns" /> |
||||
|
FROM material_type mt |
||||
|
where mt.state != 3 and mt.state != 4 and mt.parentId = 0 |
||||
|
</select> |
||||
|
|
||||
|
<select id="findMaterialTypeCountByCondition" resultType="int" parameterType="map"> |
||||
|
select count(*) |
||||
|
FROM material_type mt WHERE 1 = 1 |
||||
|
<if test="tname != null and tname != ''"> |
||||
|
AND mt.tname LIKE CONCAT('%', #{tname}, '%') |
||||
|
</if> |
||||
|
<if test="introduce != null and introduce != ''"> |
||||
|
AND mt.introduce LIKE CONCAT('%', #{introduce}, '%') |
||||
|
</if> |
||||
|
<if test="state != null and state != ''" > |
||||
|
and mt.state = #{state} |
||||
|
</if> |
||||
|
<if test="parentId != null"> |
||||
|
and mt.parentId = #{parentId} |
||||
|
</if> |
||||
|
and mt.state != 3 and mt.state != 4 |
||||
|
</select> |
||||
|
<!-- 根据条件参数查询数据列表 --> |
||||
|
<select id="findMaterialTypeByCondition" resultMap="materialTypeMap" parameterType="map"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM material_type mt WHERE 1 = 1 |
||||
|
<if test="tname != null and tname != ''"> |
||||
|
AND mt.tname LIKE CONCAT('%', #{tname}, '%') |
||||
|
</if> |
||||
|
<if test="introduce != null and introduce != ''"> |
||||
|
AND mt.introduce LIKE CONCAT('%', #{introduce}, '%') |
||||
|
</if> |
||||
|
<if test="state != null and state != ''" > |
||||
|
and mt.state = #{state} |
||||
|
</if> |
||||
|
<if test="parentId != null"> |
||||
|
and mt.parentId = #{parentId} |
||||
|
</if> |
||||
|
and mt.state != 3 and mt.state != 4 |
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据主键查询数据 --> |
||||
|
<select id="findMaterialTypeNameById" resultType="string" parameterType="integer"> |
||||
|
SELECT |
||||
|
mt.tname |
||||
|
FROM material_type mt WHERE mt.id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据主键查询数据 --> |
||||
|
<select id="findMaterialTypeById" resultMap="materialTypeMap" parameterType="integer"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM material_type mt WHERE mt.id = #{id} and mt.state != 3 and mt.state != 4 |
||||
|
</select> |
||||
|
<!-- 根据主键查询数据 |
||||
|
<select id="findMaterialTypeByIds" resultMap="materialTypeMap" parameterType="list"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM material_type mt WHERE mt.id IN |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</select>--> |
||||
|
|
||||
|
|
||||
|
<!-- 插入数据 --> |
||||
|
<insert id="insertMaterialType" parameterType="map"> |
||||
|
INSERT INTO material_type ( |
||||
|
id, tname, introduce,parentId |
||||
|
) VALUES ( |
||||
|
#{id}, |
||||
|
#{tname}, |
||||
|
#{introduce}, |
||||
|
#{parentId} |
||||
|
) |
||||
|
</insert> |
||||
|
|
||||
|
<!-- 批量插入数据 |
||||
|
<insert id="insertMaterialTypes" parameterType="list"> |
||||
|
INSERT INTO material_type ( |
||||
|
id, tname, introduce |
||||
|
) VALUES |
||||
|
<foreach collection="list" index="index" item="item" separator=","> |
||||
|
( |
||||
|
#{item.id}, |
||||
|
#{item.tname}, |
||||
|
#{item.introduce} |
||||
|
) |
||||
|
</foreach> |
||||
|
</insert>--> |
||||
|
|
||||
|
|
||||
|
<!-- 修改数据 --> |
||||
|
<update id="updateMaterialType" parameterType="map"> |
||||
|
UPDATE material_type |
||||
|
<set> |
||||
|
<if test="tname != null"> |
||||
|
tname = #{tname}, |
||||
|
</if> |
||||
|
<if test="introduce != null"> |
||||
|
introduce = #{introduce}, |
||||
|
</if> |
||||
|
<if test="state != null"> |
||||
|
state = #{state}, |
||||
|
</if> |
||||
|
<if test="parentId != null"> |
||||
|
parentId = #{parentId} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<!-- 批量修改数据 --> |
||||
|
<update id="updateMaterialTypes" parameterType="list"> |
||||
|
<foreach collection="list" index="index" item="item" separator=";"> |
||||
|
UPDATE material_type |
||||
|
<set> |
||||
|
<if test="item.tname != null"> |
||||
|
tname = #{item.tname}, |
||||
|
</if> |
||||
|
<if test="item.introduce != null"> |
||||
|
introduce = #{item.introduce} |
||||
|
</if> |
||||
|
<if test="state != null"> |
||||
|
state = #{state} |
||||
|
</if> |
||||
|
<if test="parentId != null"> |
||||
|
parentId = #{parentId} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{item.id} |
||||
|
</foreach> |
||||
|
</update> |
||||
|
|
||||
|
|
||||
|
<!-- 根据主键删除数据 --> |
||||
|
<delete id="deleteMaterialTypeById" parameterType="int"> |
||||
|
DELETE FROM material_type WHERE id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<!-- 根据主键批量删除数据--> |
||||
|
<delete id="deleteMaterialTypeByIds" parameterType="list"> |
||||
|
DELETE FROM material_type WHERE id IN |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
<!-- 根据主键将状态改为删除--> |
||||
|
<update id="changeStateToDeletedById" parameterType="int"> |
||||
|
update material_type |
||||
|
<set> |
||||
|
state = 3 |
||||
|
</set> |
||||
|
where id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
|
||||
|
<!-- 根据主键批量将状态改为删除--> |
||||
|
<update id="changeStateToDeletedByIds" parameterType="list"> |
||||
|
update material_type |
||||
|
<set> |
||||
|
state = 3 |
||||
|
</set> |
||||
|
where id in |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</update> |
||||
|
|
||||
|
<update id="updateStateByParam" parameterType="map"> |
||||
|
update material_type |
||||
|
<set> |
||||
|
state = #{state} |
||||
|
</set> |
||||
|
where id = #{id} |
||||
|
<if test="oldState != null"> |
||||
|
and state = #{oldState} |
||||
|
</if> |
||||
|
and state != 3 and mt.state != 4 |
||||
|
</update> |
||||
|
</mapper> |
||||
@ -0,0 +1,131 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<!-- notice --> |
||||
|
<mapper namespace="com.dreamchaser.depository_manage.mapper.NoticeMapper"> |
||||
|
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
||||
|
<!-- 字段映射 --> |
||||
|
<resultMap id="noticeMap" type="com.dreamchaser.depository_manage.entity.Notice"> |
||||
|
<id column="id" property="id" jdbcType="INTEGER" /> |
||||
|
<result column="title" property="title" jdbcType="VARCHAR" /> |
||||
|
<result column="content" property="content" jdbcType="VARCHAR" /> |
||||
|
<result column="time" property="time" jdbcType="INTEGER" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<!-- 表查询字段 --> |
||||
|
<sql id="allColumns"> |
||||
|
n.id, n.title, n.content, n.time |
||||
|
</sql> |
||||
|
|
||||
|
<!-- 查询所有 --> |
||||
|
<select id="findNoticeAll" resultMap="noticeMap"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM notice n |
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据条件参数查询列表 --> |
||||
|
<select id="findNoticeByCondition" resultMap="noticeMap" parameterType="map"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM notice n WHERE 1 = 1 |
||||
|
<if test="title != null and title != ''"> |
||||
|
AND n.title LIKE CONCAT('%', #{title}, '%') |
||||
|
</if> |
||||
|
<if test="content != null and content != ''"> |
||||
|
AND n.content LIKE CONCAT('%', #{content}, '%') |
||||
|
</if> |
||||
|
<if test="time != null"> |
||||
|
AND n.time = #{time} |
||||
|
</if> |
||||
|
order by n.time DESC |
||||
|
<if test="begin != null and size != null"> |
||||
|
LIMIT #{begin},#{size} |
||||
|
</if> |
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据主键查询信息 --> |
||||
|
<select id="findNoticeByIds" resultMap="noticeMap" parameterType="list"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM notice n WHERE n.id IN |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</select> |
||||
|
|
||||
|
<!-- 新增信息 --> |
||||
|
<insert id="addNotice"> |
||||
|
INSERT INTO notice ( |
||||
|
title, content, time |
||||
|
) VALUES ( |
||||
|
#{title}, |
||||
|
#{content}, |
||||
|
#{time} |
||||
|
) |
||||
|
</insert> |
||||
|
|
||||
|
<!-- 批量新增信息 --> |
||||
|
<insert id="addNotices" parameterType="list"> |
||||
|
INSERT INTO notice ( |
||||
|
id, title, content, time |
||||
|
) VALUES |
||||
|
<foreach collection="list" index="index" item="item" separator=","> |
||||
|
( |
||||
|
#{item.id}, |
||||
|
#{item.title}, |
||||
|
#{item.content}, |
||||
|
#{item.time} |
||||
|
) |
||||
|
</foreach> |
||||
|
</insert> |
||||
|
|
||||
|
<!-- 修改信息 --> |
||||
|
<update id="updateNotice"> |
||||
|
UPDATE notice |
||||
|
<set> |
||||
|
<if test="title != null"> |
||||
|
title = #{title}, |
||||
|
</if> |
||||
|
<if test="content != null"> |
||||
|
content = #{content}, |
||||
|
</if> |
||||
|
<if test="time != null"> |
||||
|
time = #{time} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<!-- 批量修改信息 --> |
||||
|
<update id="updateNotices" parameterType="list"> |
||||
|
<foreach collection="list" index="index" item="item" separator=";"> |
||||
|
UPDATE notice |
||||
|
<set> |
||||
|
<if test="item.title != null"> |
||||
|
title = #{item.title}, |
||||
|
</if> |
||||
|
<if test="item.content != null"> |
||||
|
content = #{item.content}, |
||||
|
</if> |
||||
|
<if test="item.time != null"> |
||||
|
time = #{item.time} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{item.id} |
||||
|
</foreach> |
||||
|
</update> |
||||
|
|
||||
|
<!-- 根据主键删除 --> |
||||
|
<delete id="deleteNoticeById" parameterType="int"> |
||||
|
DELETE FROM notice WHERE id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<!-- 根据主键批量删除 --> |
||||
|
<delete id="deleteNoticeByIds" parameterType="list"> |
||||
|
DELETE FROM notice WHERE id IN |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
</mapper> |
||||
@ -0,0 +1,92 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<!-- user --> |
||||
|
<mapper namespace="com.dreamchaser.depository_manage.mapper.RoleMapper"> |
||||
|
<!-- 字段映射(权限) --> |
||||
|
<resultMap id="roleMap" type="com.dreamchaser.depository_manage.entity.Role"> |
||||
|
<id column="id" property="id" jdbcType="INTEGER" /> |
||||
|
<result column="name" property="name" jdbcType="VARCHAR" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<!-- 权限映射--> |
||||
|
<resultMap id="postoruserroleMap" type="com.dreamchaser.depository_manage.entity.PostOrUserRole"> |
||||
|
<id column="id" property="id" jdbcType="INTEGER" /> |
||||
|
<result column="classes" property="classes" jdbcType="INTEGER" /> |
||||
|
<result column="role" property="role" jdbcType="INTEGER" /> |
||||
|
<result column="userid" property="userid" jdbcType="INTEGER" /> |
||||
|
<result column="did" property="did" jdbcType="INTEGER" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<resultMap id="depositoryAndrole" type="com.dreamchaser.depository_manage.pojo.RoleAndDepository"> |
||||
|
<result column="userId" property="userId" jdbcType="INTEGER"/> |
||||
|
<result column="roleName" property="roleName" jdbcType="VARCHAR"/> |
||||
|
<result column="depositoryName" property="depositoryName" jdbcType="VARCHAR"/> |
||||
|
<result column="depositoryAddress" property="depositoryAddress" jdbcType="VARCHAR"/> |
||||
|
<result column="depositoryIntroduce" property="depositoryIntroduce" jdbcType="VARCHAR"/> |
||||
|
<result column="depositoryState" property="depositoryState" jdbcType="VARCHAR"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="allColumns"> |
||||
|
r.id,r.name |
||||
|
</sql> |
||||
|
|
||||
|
<sql id="roleNameAnddepositoryName"> |
||||
|
userid as userId,name as roleName,dname as depositoryName,address as depositoryAddress ,introduce as depositoryIntroduce,state as depositoryState |
||||
|
</sql> |
||||
|
|
||||
|
<select id="findAllRole" resultMap="roleMap"> |
||||
|
select |
||||
|
<include refid="allColumns"/> |
||||
|
from role r |
||||
|
</select> |
||||
|
|
||||
|
<update id="updateUserOrPostRoleAndDepository" parameterType="map"> |
||||
|
update postoruserrole |
||||
|
<set> |
||||
|
<if test="authority != null and authority != ''"> |
||||
|
role = #{authority}, |
||||
|
</if> |
||||
|
<if test="depositoryId != null and depositoryId != ''"> |
||||
|
did = #{depositoryId} |
||||
|
</if> |
||||
|
</set> |
||||
|
where userid = #{userid} |
||||
|
|
||||
|
</update> |
||||
|
|
||||
|
<insert id="addUserOrPostRoleAndDepository" parameterType="map"> |
||||
|
INSERT INTO postoruserrole ( |
||||
|
id, classes, role,userid,did |
||||
|
) VALUES ( |
||||
|
#{id}, |
||||
|
#{classes}, |
||||
|
#{authority}, |
||||
|
#{userid}, |
||||
|
#{depositoryId} |
||||
|
) |
||||
|
</insert> |
||||
|
|
||||
|
|
||||
|
<select id="findDepositoryAndRole" parameterType="int" resultMap="depositoryAndrole"> |
||||
|
select |
||||
|
<include refid="roleNameAnddepositoryName"/> |
||||
|
from userroleanddepository |
||||
|
where userid = #{userid} |
||||
|
</select> |
||||
|
|
||||
|
<select id="findRoleByUid" parameterType="int" resultType="int"> |
||||
|
select role from postoruserrole where userid = #{uid} and classes = 1 |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
<select id="findUserIdByDid" parameterType="int" resultType="int"> |
||||
|
select userid from postoruserrole where classes = 1 and did = #{did} |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,143 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<!-- transfer_record --> |
||||
|
<mapper namespace="com.dreamchaser.depository_manage.mapper.TransferRecordMapper"> |
||||
|
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
||||
|
<!-- 字段映射 --> |
||||
|
<resultMap id="transferRecordMap" type="com.dreamchaser.depository_manage.entity.TransferRecord"> |
||||
|
<id column="id" property="id" jdbcType="INTEGER" /> |
||||
|
<result column="from_id" property="fromId" jdbcType="INTEGER" /> |
||||
|
<result column="to_id" property="toId" jdbcType="INTEGER" /> |
||||
|
<result column="mid" property="mid" jdbcType="INTEGER" /> |
||||
|
<result column="applicantTime" property="applicantTime" jdbcType="INTEGER" /> |
||||
|
<result column="applicantId" property="applicantId" jdbcType="INTEGER" /> |
||||
|
</resultMap> |
||||
|
<!-- 表查询字段 --> |
||||
|
<sql id="allColumns"> |
||||
|
tr.id, tr.from_id, tr.to_id,tr.mid,tr.applicantTime,tr.applicantId |
||||
|
</sql> |
||||
|
|
||||
|
<!-- 查询所有 |
||||
|
<select id="findTransferRecordAll" resultMap="transferRecordMap"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM transfer_record tr |
||||
|
</select>--> |
||||
|
|
||||
|
|
||||
|
<!-- 根据条件参数查询列表--> |
||||
|
<select id="findTransferRecordByCondition" resultMap="transferRecordMap" parameterType="map"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM transfer_record tr WHERE 1 = 1 |
||||
|
<if test="fromId != null"> |
||||
|
AND tr.from_id = #{fromId} |
||||
|
</if> |
||||
|
<if test="toId != null"> |
||||
|
AND tr.to_id = #{toId} |
||||
|
</if> |
||||
|
<if test="mid != null"> |
||||
|
and tr.mid = #{mid} |
||||
|
</if> |
||||
|
<if test="applicantTime != null"> |
||||
|
and tr.applicantTime = #{applicantTime} |
||||
|
</if> |
||||
|
<if test="applicantId != null"> |
||||
|
and tr.applicantId = #{applicantId} |
||||
|
</if> |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<!-- 根据主键查询信息 |
||||
|
<select id="findTransferRecordByIds" resultMap="transferRecordMap" parameterType="list"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM transfer_record tr WHERE tr.id IN |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</select>--> |
||||
|
|
||||
|
<select id="findTransferRecordById" resultMap="transferRecordMap" parameterType="int"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM transfer_record tr WHERE tr.id = #{id} |
||||
|
</select> |
||||
|
<!-- 新增信息 --> |
||||
|
<insert id="addTransferRecord"> |
||||
|
INSERT INTO transfer_record ( |
||||
|
id, from_id, to_id,quantity,mid,applicantTime,applicantId |
||||
|
) VALUES ( |
||||
|
#{id}, |
||||
|
#{fromId}, |
||||
|
#{toId}, |
||||
|
#{quantity}, |
||||
|
#{mid}, |
||||
|
#{applicantTime}, |
||||
|
#{applicantId} |
||||
|
) |
||||
|
</insert> |
||||
|
|
||||
|
<!-- 批量新增信息 |
||||
|
<insert id="addTransferRecords" parameterType="list"> |
||||
|
INSERT INTO transfer_record ( |
||||
|
id, from_id, to_id |
||||
|
) VALUES |
||||
|
<foreach collection="list" index="index" item="item" separator=","> |
||||
|
( |
||||
|
#{item.id}, |
||||
|
#{item.fromId}, |
||||
|
#{item.toId} |
||||
|
) |
||||
|
</foreach> |
||||
|
</insert>--> |
||||
|
|
||||
|
|
||||
|
<!-- 修改信息 |
||||
|
<update id="updateTransferRecord"> |
||||
|
UPDATE transfer_record |
||||
|
<set> |
||||
|
<if test="fromId != null"> |
||||
|
from_id = #{fromId}, |
||||
|
</if> |
||||
|
<if test="toId != null"> |
||||
|
to_id = #{toId} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{id} |
||||
|
</update>--> |
||||
|
|
||||
|
|
||||
|
<!-- 批量修改信息 |
||||
|
<update id="updateTransferRecords" parameterType="list"> |
||||
|
<foreach collection="list" index="index" item="item" separator=";"> |
||||
|
UPDATE transfer_record |
||||
|
<set> |
||||
|
<if test="item.fromId != null"> |
||||
|
from_id = #{item.fromId}, |
||||
|
</if> |
||||
|
<if test="item.toId != null"> |
||||
|
to_id = #{item.toId} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{item.id} |
||||
|
</foreach> |
||||
|
</update>--> |
||||
|
|
||||
|
|
||||
|
<!-- 根据主键删除 |
||||
|
<delete id="deleteTransferRecordById" parameterType="int"> |
||||
|
DELETE FROM transfer_record WHERE id = #{id} |
||||
|
</delete>--> |
||||
|
|
||||
|
|
||||
|
<!-- 根据主键批量删除 |
||||
|
<delete id="deleteTransferRecordByIds" parameterType="list"> |
||||
|
DELETE FROM transfer_record WHERE id IN |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete>--> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,385 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<!-- user --> |
||||
|
<mapper namespace="com.dreamchaser.depository_manage.mapper.UserMapper"> |
||||
|
<!-- 字段映射 --> |
||||
|
<resultMap id="userMap" type="com.dreamchaser.depository_manage.entity.User"> |
||||
|
<id column="id" property="id" jdbcType="INTEGER" /> |
||||
|
<result column="uname" property="uname" jdbcType="VARCHAR" /> |
||||
|
<result column="authority" property="authority" jdbcType="VARCHAR" /> |
||||
|
<result column="pwd" property="pwd" jdbcType="VARCHAR" /> |
||||
|
<result column="sex" property="sex" jdbcType="VARCHAR" /> |
||||
|
<result column="depository_id" property="depositoryId" jdbcType="INTEGER" /> |
||||
|
<result column="entry_date" property="entryDate" jdbcType="TIMESTAMP" /> |
||||
|
<result column="email" property="email" jdbcType="VARCHAR" /> |
||||
|
<result column="phone" property="phone" jdbcType="VARCHAR" /> |
||||
|
<result column="state" property="state" javaType="INTEGER"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<!-- 字段映射(包括角色名)--> |
||||
|
<resultMap id="userMapWithRoleName" type="com.dreamchaser.depository_manage.entity.User"> |
||||
|
<id column="id" property="id" jdbcType="INTEGER" /> |
||||
|
<result column="state" property="state" javaType="INTEGER"/> |
||||
|
<result column="uname" property="uname" jdbcType="VARCHAR" /> |
||||
|
<result column="authority" property="authority" jdbcType="VARCHAR" /> |
||||
|
<result column="pwd" property="pwd" jdbcType="VARCHAR" /> |
||||
|
<result column="sex" property="sex" jdbcType="VARCHAR" /> |
||||
|
<result column="depository_id" property="depositoryId" jdbcType="INTEGER" /> |
||||
|
<result column="entry_date" property="entryDate" jdbcType="TIMESTAMP" /> |
||||
|
<result column="email" property="email" jdbcType="VARCHAR" /> |
||||
|
<result column="phone" property="phone" jdbcType="VARCHAR" /> |
||||
|
<association property="role" javaType="com.dreamchaser.depository_manage.entity.Role"> |
||||
|
<id property="id" column="authority"/> |
||||
|
<result property="name" column="name"/> |
||||
|
</association> |
||||
|
</resultMap> |
||||
|
<!-- 表查询字段(不敏感信息) --> |
||||
|
<sql id="noSensitiveColumns"> |
||||
|
u.id, u.uname, u.sex, u.entry_date |
||||
|
</sql> |
||||
|
<!-- 表查询字段 --> |
||||
|
<sql id="allColumns"> |
||||
|
u.id, u.uname, u.authority, u.pwd, u.sex, u.depository_id, u.entry_date, u.email, |
||||
|
u.phone,u.state |
||||
|
</sql> |
||||
|
|
||||
|
<sql id="ColumnsAndRoleName"> |
||||
|
u.id, u.uname, r.name,r.id,u.authority, u.pwd, u.sex, u.depository_id, u.entry_date, u.email, |
||||
|
u.phone,u.state |
||||
|
</sql> |
||||
|
<!-- This code was generated by TableGo tools, mark 2 end. --> |
||||
|
<!-- 查询该表的行数 --> |
||||
|
<select id="findCount" resultType="integer"> |
||||
|
SELECT |
||||
|
count(*) |
||||
|
FROM user u |
||||
|
</select> |
||||
|
<!-- 根据条件查询数据的数量 --> |
||||
|
<select id="findCountByCondition" resultType="integer" parameterType="map"> |
||||
|
SELECT |
||||
|
count(*) |
||||
|
FROM user u WHERE 1 = 1 |
||||
|
<if test="uname != null and uname != ''"> |
||||
|
AND u.uname LIKE CONCAT('%', #{uname}, '%') |
||||
|
</if> |
||||
|
<if test="authority != null and authority != ''"> |
||||
|
AND u.authority LIKE CONCAT('%', #{authority}, '%') |
||||
|
</if> |
||||
|
<if test="pwd != null and pwd != ''"> |
||||
|
AND u.pwd LIKE CONCAT('%', #{pwd}, '%') |
||||
|
</if> |
||||
|
<if test="sex != null and sex != ''"> |
||||
|
AND u.sex LIKE CONCAT('%', #{sex}, '%') |
||||
|
</if> |
||||
|
<if test="depositoryId != null"> |
||||
|
AND u.depository_id = #{depositoryId} |
||||
|
</if> |
||||
|
<if test="entryDate != null"> |
||||
|
AND u.entry_date = #{entryDate} |
||||
|
</if> |
||||
|
<if test="email != null and email != ''"> |
||||
|
AND u.email LIKE CONCAT('%', #{email}, '%') |
||||
|
</if> |
||||
|
<if test="phone != null and phone != ''"> |
||||
|
AND u.phone LIKE CONCAT('%', #{phone}, '%') |
||||
|
</if> |
||||
|
<if test="state != null and state != ''"> |
||||
|
and u.state = #{state} |
||||
|
</if> |
||||
|
and u.state != 3 |
||||
|
</select> |
||||
|
<!-- 查询所有数据 --> |
||||
|
<!-- <select id="findUserAll" resultMap="userMap"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM user u |
||||
|
</select>--> |
||||
|
|
||||
|
<!-- 根据id查询数据列表 --> |
||||
|
<select id="findUserNameById" resultType="string" parameterType="int"> |
||||
|
SELECT |
||||
|
u.uname |
||||
|
FROM user u WHERE u.id=#{id} |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<!-- 根据email查询数据列表 --> |
||||
|
<select id="findUserByEmail" resultMap="userMap" parameterType="string"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM user u WHERE u.email LIKE CONCAT('%', #{email}, '%') |
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据条件参数查询数据列表 --> |
||||
|
<select id="findUsersByCondition" resultMap="userMapWithRoleName" parameterType="map"> |
||||
|
SELECT |
||||
|
<include refid="ColumnsAndRoleName" /> |
||||
|
FROM user u,role r WHERE 1 = 1 |
||||
|
<if test="uname != null and uname != ''"> |
||||
|
AND u.uname LIKE CONCAT('%', #{uname}, '%') |
||||
|
</if> |
||||
|
<if test="authority != null and authority != ''"> |
||||
|
AND u.authority = #{authority} |
||||
|
</if> |
||||
|
<if test="pwd != null and pwd != ''"> |
||||
|
AND u.pwd LIKE CONCAT('%', #{pwd}, '%') |
||||
|
</if> |
||||
|
<if test="sex != null and sex != ''"> |
||||
|
AND u.sex LIKE CONCAT('%', #{sex}, '%') |
||||
|
</if> |
||||
|
<if test="depositoryId != null"> |
||||
|
AND u.depository_id = #{depositoryId} or u.depository_id = 0 |
||||
|
</if> |
||||
|
<if test="entryDate != null"> |
||||
|
AND u.entry_date = #{entryDate} |
||||
|
</if> |
||||
|
<if test="email != null and email != ''"> |
||||
|
AND u.email LIKE CONCAT('%', #{email}, '%') |
||||
|
</if> |
||||
|
<if test="phone != null and phone != ''"> |
||||
|
AND u.phone LIKE CONCAT('%', #{phone}, '%') |
||||
|
</if> |
||||
|
<if test="state != null and state != ''"> |
||||
|
And u.state = #{state} |
||||
|
</if> |
||||
|
and u.authority = r.id |
||||
|
and u.state != 3 |
||||
|
<if test="begin != null and size != null"> |
||||
|
LIMIT #{begin},#{size} |
||||
|
</if> |
||||
|
|
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据条件参数查询数据列表 --> |
||||
|
<select id="findUserByCondition" resultMap="userMap" parameterType="map"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM user u WHERE 1 = 1 |
||||
|
<if test="uname != null and uname != ''"> |
||||
|
AND u.uname LIKE CONCAT('%', #{uname}, '%') |
||||
|
</if> |
||||
|
<if test="authority != null and authority != ''"> |
||||
|
AND u.authority LIKE CONCAT('%', #{authority}, '%') |
||||
|
</if> |
||||
|
<if test="pwd != null and pwd != ''"> |
||||
|
AND u.pwd LIKE CONCAT('%', #{pwd}, '%') |
||||
|
</if> |
||||
|
<if test="sex != null and sex != ''"> |
||||
|
AND u.sex LIKE CONCAT('%', #{sex}, '%') |
||||
|
</if> |
||||
|
<if test="depositoryId != null"> |
||||
|
AND u.depository_id = #{depositoryId} |
||||
|
</if> |
||||
|
<if test="entryDate != null"> |
||||
|
AND u.entry_date = #{entryDate} |
||||
|
</if> |
||||
|
<if test="email != null and email != ''"> |
||||
|
AND u.email LIKE CONCAT('%', #{email}, '%') |
||||
|
</if> |
||||
|
<if test="phone != null and phone != ''"> |
||||
|
AND u.phone LIKE CONCAT('%', #{phone}, '%') |
||||
|
</if> |
||||
|
<if test="state != null and state != ''"> |
||||
|
and u.state = #{state} |
||||
|
</if> |
||||
|
and u.state != 3 |
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据主键查询数据 --> |
||||
|
<select id="findUserById" resultMap="userMap" parameterType="integer"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM user u WHERE u.id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据主键查询数据 |
||||
|
<select id="findUserByIds" resultMap="userMap" parameterType="list"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM user u WHERE u.id IN |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</select>--> |
||||
|
|
||||
|
|
||||
|
<!-- 插入数据 --> |
||||
|
<insert id="insertUser" parameterType="map"> |
||||
|
INSERT INTO user ( |
||||
|
id, uname, authority, pwd, sex, depository_id, entry_date, email, |
||||
|
phone |
||||
|
) VALUES ( |
||||
|
#{id}, |
||||
|
#{uname}, |
||||
|
#{authority}, |
||||
|
#{pwd}, |
||||
|
#{sex}, |
||||
|
#{depositoryId}, |
||||
|
#{entryDate}, |
||||
|
#{email}, |
||||
|
#{phone} |
||||
|
) |
||||
|
</insert> |
||||
|
|
||||
|
<!-- 批量插入数据 |
||||
|
<insert id="insertUsers" parameterType="list"> |
||||
|
INSERT INTO user ( |
||||
|
id, uname, authority, pwd, sex, depository_id, entry_date, email, |
||||
|
phone |
||||
|
) VALUES |
||||
|
<foreach collection="list" index="index" item="item" separator=","> |
||||
|
( |
||||
|
#{item.id}, |
||||
|
#{item.uname}, |
||||
|
#{item.authority}, |
||||
|
#{item.pwd}, |
||||
|
#{item.sex}, |
||||
|
#{item.depositoryId}, |
||||
|
#{item.entryDate}, |
||||
|
#{item.email}, |
||||
|
#{item.phone} |
||||
|
) |
||||
|
</foreach> |
||||
|
</insert>--> |
||||
|
|
||||
|
<!-- 修改不敏感数据(这里由于并未对手机号进行验证所以这个也是非敏感信息可以给用户自己修改) --> |
||||
|
<update id="updateUserNoSensitive" parameterType="map"> |
||||
|
UPDATE user |
||||
|
<set> |
||||
|
<if test='uname != null and uname!=""'> |
||||
|
uname = #{uname}, |
||||
|
</if> |
||||
|
<if test='sex != null and sex!=""'> |
||||
|
sex = #{sex}, |
||||
|
</if> |
||||
|
<if test="entryDate != null and entryDate!=''"> |
||||
|
entry_date = #{entryDate}, |
||||
|
</if> |
||||
|
<if test="phone != null and phone !=''"> |
||||
|
phone = #{phone} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{id} |
||||
|
</update> |
||||
|
<!-- 修改数据 --> |
||||
|
<update id="updateUser" parameterType="map"> |
||||
|
UPDATE user |
||||
|
<set> |
||||
|
<if test='uname != null and uname!=""'> |
||||
|
uname = #{uname}, |
||||
|
</if> |
||||
|
<if test='authority != null and authority!=""'> |
||||
|
authority = #{authority}, |
||||
|
</if> |
||||
|
<if test="pwd != null and pwd!=''"> |
||||
|
pwd = #{pwd}, |
||||
|
</if> |
||||
|
<if test='sex != null and sex!=""'> |
||||
|
sex = #{sex}, |
||||
|
</if> |
||||
|
<if test="depositoryId != null and depository!=''"> |
||||
|
depository_id = #{depositoryId}, |
||||
|
</if> |
||||
|
<if test="entryDate != null and entryDate!=''"> |
||||
|
entry_date = #{entryDate}, |
||||
|
</if> |
||||
|
<if test="email != null and email != ''"> |
||||
|
email = #{email}, |
||||
|
</if> |
||||
|
<if test="phone != null and phone !=''"> |
||||
|
phone = #{phone}, |
||||
|
</if> |
||||
|
<if test="state != null and state != ''"> |
||||
|
state = #{state} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<!-- 批量修改数据 |
||||
|
<update id="updateUsers" parameterType="list"> |
||||
|
<foreach collection="list" index="index" item="item" separator=";"> |
||||
|
UPDATE user |
||||
|
<set> |
||||
|
<if test="item.uname != null"> |
||||
|
uname = #{item.uname}, |
||||
|
</if> |
||||
|
<if test="item.authority != null"> |
||||
|
authority = #{item.authority}, |
||||
|
</if> |
||||
|
<if test="item.pwd != null"> |
||||
|
pwd = #{item.pwd}, |
||||
|
</if> |
||||
|
<if test="item.sex != null"> |
||||
|
sex = #{item.sex}, |
||||
|
</if> |
||||
|
<if test="item.depositoryId != null"> |
||||
|
depository_id = #{item.depositoryId}, |
||||
|
</if> |
||||
|
<if test="item.entryDate != null"> |
||||
|
entry_date = #{item.entryDate}, |
||||
|
</if> |
||||
|
<if test="item.email != null"> |
||||
|
email = #{item.email}, |
||||
|
</if> |
||||
|
<if test="item.phone != null"> |
||||
|
phone = #{item.phone} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{item.id} |
||||
|
</foreach> |
||||
|
</update>--> |
||||
|
|
||||
|
|
||||
|
<!-- 根据主键删除数据 --> |
||||
|
<delete id="deleteUserById" parameterType="integer"> |
||||
|
DELETE FROM user WHERE id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<!-- 根据主键批量删除数据 --> |
||||
|
<delete id="deleteUserByIds" parameterType="list"> |
||||
|
DELETE FROM user WHERE id IN |
||||
|
<!-- 单参数时,List对象只能为list,数组对象只能为array,多参数用map时,collection参数才为KeyName --> |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
<!--根据主键将状态修改为删除--> |
||||
|
<update id="changeUserStateToDeleteById" parameterType="integer"> |
||||
|
update user |
||||
|
<set> |
||||
|
state = 3 |
||||
|
</set> |
||||
|
where id = #{id} |
||||
|
</update> |
||||
|
<!--根据主键批量将状态修改为删除--> |
||||
|
<update id="changeUserStateToDeleteByIds" parameterType="list"> |
||||
|
update user |
||||
|
<set> |
||||
|
state = 3 |
||||
|
</set> |
||||
|
where id in |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</update> |
||||
|
|
||||
|
|
||||
|
<update id="updateUserPasswordById" parameterType="map"> |
||||
|
update user |
||||
|
<set> |
||||
|
pwd = #{new_password} |
||||
|
</set> |
||||
|
where id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<select id="FindUserRoleById" parameterType="int" resultType="string"> |
||||
|
select name from userandrole ur left join role r on ur.rid = r.id where ur.uid = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<select id="FindDepositoryByUserId" parameterType="int" resultType="string"> |
||||
|
select dname from depositoryanduserbyport where uid = #{id} |
||||
|
</select> |
||||
|
</mapper> |
||||
@ -0,0 +1,143 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<!-- standing_book --> |
||||
|
<mapper namespace="mysql.standingBook"> |
||||
|
<!-- This code was generated by TableGo tools, mark 1 begin. --> |
||||
|
<!-- 字段映射 --> |
||||
|
<resultMap id="standingBookMap" type="StandingBook"> |
||||
|
<id column="id" property="id" jdbcType="INTEGER" /> |
||||
|
<result column="type" property="type" jdbcType="INTEGER" /> |
||||
|
<result column="quantity" property="quantity" jdbcType="INTEGER" /> |
||||
|
<result column="price" property="price" jdbcType="INTEGER" /> |
||||
|
<result column="material_name" property="materialName" jdbcType="VARCHAR" /> |
||||
|
</resultMap> |
||||
|
<!-- This code was generated by TableGo tools, mark 1 end. --> |
||||
|
|
||||
|
<!-- This code was generated by TableGo tools, mark 2 begin. --> |
||||
|
<!-- 表查询字段 --> |
||||
|
<sql id="allColumns"> |
||||
|
sb.id, sb.type, sb.quantity, sb.price, sb.material_name |
||||
|
</sql> |
||||
|
<!-- This code was generated by TableGo tools, mark 2 end. --> |
||||
|
|
||||
|
<!-- 查询所有数据 --> |
||||
|
<select id="findStandingBookAll" resultMap="standingBookMap"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM standing_book sb |
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据条件参数查询数据列表 --> |
||||
|
<select id="findStandingBookByCondition" resultMap="standingBookMap" parameterType="map"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM standing_book sb WHERE 1 = 1 |
||||
|
<if test="type != null"> |
||||
|
AND sb.type = #{type} |
||||
|
</if> |
||||
|
<if test="quantity != null"> |
||||
|
AND sb.quantity = #{quantity} |
||||
|
</if> |
||||
|
<if test="price != null"> |
||||
|
AND sb.price = #{price} |
||||
|
</if> |
||||
|
<if test="materialName != null and materialName != ''"> |
||||
|
AND sb.material_name LIKE CONCAT('%', #{materialName}, '%') |
||||
|
</if> |
||||
|
</select> |
||||
|
|
||||
|
<!-- 根据主键查询数据 --> |
||||
|
<select id="findStandingBookByIds" resultMap="standingBookMap" parameterType="list"> |
||||
|
SELECT |
||||
|
<include refid="allColumns" /> |
||||
|
FROM standing_book sb WHERE sb.id IN |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</select> |
||||
|
|
||||
|
<!-- 插入数据 --> |
||||
|
<insert id="insertStandingBook" parameterType="map"> |
||||
|
INSERT INTO standing_book ( |
||||
|
id, type, quantity, price, material_name |
||||
|
) VALUES ( |
||||
|
#{id}, |
||||
|
#{type}, |
||||
|
#{quantity}, |
||||
|
#{price}, |
||||
|
#{materialName} |
||||
|
) |
||||
|
</insert> |
||||
|
|
||||
|
<!-- 批量插入数据 --> |
||||
|
<insert id="insertStandingBooks" parameterType="list"> |
||||
|
INSERT INTO standing_book ( |
||||
|
id, type, quantity, price, material_name |
||||
|
) VALUES |
||||
|
<foreach collection="list" index="index" item="item" separator=","> |
||||
|
( |
||||
|
#{item.id}, |
||||
|
#{item.type}, |
||||
|
#{item.quantity}, |
||||
|
#{item.price}, |
||||
|
#{item.materialName} |
||||
|
) |
||||
|
</foreach> |
||||
|
</insert> |
||||
|
|
||||
|
<!-- 修改数据 --> |
||||
|
<update id="updateStandingBook" parameterType="map"> |
||||
|
UPDATE standing_book |
||||
|
<set> |
||||
|
<if test="type != null"> |
||||
|
type = #{type}, |
||||
|
</if> |
||||
|
<if test="quantity != null"> |
||||
|
quantity = #{quantity}, |
||||
|
</if> |
||||
|
<if test="price != null"> |
||||
|
price = #{price}, |
||||
|
</if> |
||||
|
<if test="materialName != null"> |
||||
|
material_name = #{materialName} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<!-- 批量修改数据 --> |
||||
|
<update id="updateStandingBooks" parameterType="list"> |
||||
|
<foreach collection="list" index="index" item="item" separator=";"> |
||||
|
UPDATE standing_book |
||||
|
<set> |
||||
|
<if test="item.type != null"> |
||||
|
type = #{item.type}, |
||||
|
</if> |
||||
|
<if test="item.quantity != null"> |
||||
|
quantity = #{item.quantity}, |
||||
|
</if> |
||||
|
<if test="item.price != null"> |
||||
|
price = #{item.price}, |
||||
|
</if> |
||||
|
<if test="item.materialName != null"> |
||||
|
material_name = #{item.materialName} |
||||
|
</if> |
||||
|
</set> |
||||
|
WHERE id = #{item.id} |
||||
|
</foreach> |
||||
|
</update> |
||||
|
|
||||
|
<!-- 根据主键删除数据 --> |
||||
|
<delete id="deleteStandingBookById" parameterType="int"> |
||||
|
DELETE FROM standing_book WHERE id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<!-- 根据主键批量删除数据 --> |
||||
|
<delete id="deleteStandingBookByIds" parameterType="list"> |
||||
|
DELETE FROM standing_book WHERE id IN |
||||
|
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
</mapper> |
||||
@ -0,0 +1,155 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<configuration scan="true" scanPeriod="60 seconds" debug="false"> |
||||
|
<include resource="org/springframework/boot/logging/logback/defaults.xml"/> |
||||
|
<!-- 应用名称--> |
||||
|
<property name="appName" value="Dreamchser"/> |
||||
|
<!-- 日志的存放目录--> |
||||
|
<!-- debug--> |
||||
|
<property name="DEBUG_LOG_FILE_NAME_PATTERN" value="logs/${appName}-debug.%d{yyyy-MM-dd}.%i.log"/> |
||||
|
<property name="INFO_LOG_FILE_NAME_PATTERN" value="logs/${appName}-info.%d{yyyy-MM-dd}.%i.log"/> |
||||
|
<property name="WARN_LOG_FILE_NAME_PATTERN" value="errlogs/${appName}-warn.%d{yyyy-MM-dd}.%i.log"/> |
||||
|
<property name="ERROR_LOG_FILE_NAME_PATTERN" value="errlogs/${appName}-error.%d{yyyy-MM-dd}.%i.log"/> |
||||
|
<!-- 日志格式 --> |
||||
|
<property name="CONSOLE_LOG_PATTERN" |
||||
|
value="%clr(%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%c){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/> |
||||
|
<property name="FILE_LOG_PATTERN" |
||||
|
value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %c : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/> |
||||
|
<!--输出到控制台--> |
||||
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> |
||||
|
<encoder> |
||||
|
<pattern>${CONSOLE_LOG_PATTERN}</pattern> |
||||
|
</encoder> |
||||
|
|
||||
|
</appender> |
||||
|
|
||||
|
<!--输出到DEBUG文件--> |
||||
|
<appender name="debug_file" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
|
<fileNamePattern>${DEBUG_LOG_FILE_NAME_PATTERN}</fileNamePattern> |
||||
|
<!-- 日志保留天数 --> |
||||
|
<maxHistory>30</maxHistory> |
||||
|
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 --> |
||||
|
<totalSizeCap>2GB</totalSizeCap> |
||||
|
<!-- 每个日志文件的最大值 --> |
||||
|
<timeBasedFileNamingAndTriggeringPolicy |
||||
|
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
|
<maxFileSize>50MB</maxFileSize> |
||||
|
</timeBasedFileNamingAndTriggeringPolicy> |
||||
|
</rollingPolicy> |
||||
|
<encoder> |
||||
|
<pattern>${FILE_LOG_PATTERN}</pattern> |
||||
|
</encoder> |
||||
|
<!-- 此日志文件只记录debug级别的 --> |
||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
||||
|
<level>debug</level> |
||||
|
<onMatch>ACCEPT</onMatch> |
||||
|
<onMismatch>DENY</onMismatch> |
||||
|
</filter> |
||||
|
</appender> |
||||
|
|
||||
|
<!--输出到INFO文件--> |
||||
|
<appender name="info_file" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
|
<fileNamePattern>${INFO_LOG_FILE_NAME_PATTERN}</fileNamePattern> |
||||
|
<!-- 日志保留天数 --> |
||||
|
<maxHistory>7</maxHistory> |
||||
|
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 --> |
||||
|
<totalSizeCap>1GB</totalSizeCap> |
||||
|
<!-- 每个日志文件的最大值 --> |
||||
|
<timeBasedFileNamingAndTriggeringPolicy |
||||
|
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
|
<maxFileSize>50MB</maxFileSize> |
||||
|
</timeBasedFileNamingAndTriggeringPolicy> |
||||
|
</rollingPolicy> |
||||
|
<encoder> |
||||
|
<pattern>${FILE_LOG_PATTERN}</pattern> |
||||
|
</encoder> |
||||
|
<!-- 此日志文件只记录info级别的 --> |
||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
||||
|
<level>info</level> |
||||
|
<onMatch>ACCEPT</onMatch> |
||||
|
<onMismatch>DENY</onMismatch> |
||||
|
</filter> |
||||
|
</appender> |
||||
|
|
||||
|
<!--输出到WARN文件--> |
||||
|
<appender name="warn_file" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
|
<fileNamePattern>${WARN_LOG_FILE_NAME_PATTERN}</fileNamePattern> |
||||
|
<!-- 日志保留天数 --> |
||||
|
<maxHistory>30</maxHistory> |
||||
|
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 --> |
||||
|
<totalSizeCap>1GB</totalSizeCap> |
||||
|
<!-- 每个日志文件的最大值 --> |
||||
|
<timeBasedFileNamingAndTriggeringPolicy |
||||
|
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
|
<maxFileSize>10MB</maxFileSize> |
||||
|
</timeBasedFileNamingAndTriggeringPolicy> |
||||
|
</rollingPolicy> |
||||
|
<encoder> |
||||
|
<pattern>${FILE_LOG_PATTERN}</pattern> |
||||
|
</encoder> |
||||
|
<!-- 此日志文件只记录warn级别的 --> |
||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
||||
|
<level>warn</level> |
||||
|
<onMatch>ACCEPT</onMatch> |
||||
|
<onMismatch>DENY</onMismatch> |
||||
|
</filter> |
||||
|
</appender> |
||||
|
|
||||
|
<!--输出到ERROR文件--> |
||||
|
<appender name="error_file" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
|
<fileNamePattern>${ERROR_LOG_FILE_NAME_PATTERN}</fileNamePattern> |
||||
|
<!-- 日志保留天数 --> |
||||
|
<maxHistory>30</maxHistory> |
||||
|
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 --> |
||||
|
<totalSizeCap>1GB</totalSizeCap> |
||||
|
<!-- 每个日志文件的最大值 --> |
||||
|
<timeBasedFileNamingAndTriggeringPolicy |
||||
|
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
|
<maxFileSize>10MB</maxFileSize> |
||||
|
</timeBasedFileNamingAndTriggeringPolicy> |
||||
|
</rollingPolicy> |
||||
|
<encoder> |
||||
|
<pattern>${FILE_LOG_PATTERN}</pattern> |
||||
|
</encoder> |
||||
|
<!-- 此日志文件只记录error级别的 --> |
||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
||||
|
<level>error</level> |
||||
|
<onMatch>ACCEPT</onMatch> |
||||
|
<onMismatch>DENY</onMismatch> |
||||
|
</filter> |
||||
|
</appender> |
||||
|
<!-- region 根据不同的环境设置不同的日志输出级别 --> |
||||
|
<springProfile name="default,local,dev"> |
||||
|
<root level="info"> |
||||
|
<appender-ref ref="console"/> |
||||
|
</root> |
||||
|
<!-- <logger name="com.dreamchaser" level="debug"/>--> |
||||
|
|
||||
|
</springProfile> |
||||
|
|
||||
|
|
||||
|
<springProfile name="prod,pre,test"> |
||||
|
<root level="info"> |
||||
|
<appender-ref ref="console"/> |
||||
|
<appender-ref ref="debug_file"/> |
||||
|
<appender-ref ref="info_file"/> |
||||
|
<appender-ref ref="warn_file"/> |
||||
|
<appender-ref ref="error_file"/> |
||||
|
</root> |
||||
|
<logger name="com.ibatis" level="DEBUG" /> |
||||
|
<logger name="com.ibatis.common.jdbc.SimpleDataSource" level="DEBUG" /> |
||||
|
<logger name="com.ibatis.common.jdbc.ScriptRunner" level="DEBUG" /> |
||||
|
<logger name="com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate" level="DEBUG" /> |
||||
|
<logger name="java.sql.Connection" level="DEBUG" /> |
||||
|
<logger name="java.sql.Statement" level="DEBUG" /> |
||||
|
<logger name="java.sql.PreparedStatement" level="DEBUG" /> |
||||
|
<logger name="java.sql.ResultSet" level="DEBUG" /> |
||||
|
<logger name="com.dreamchaser.dream.depository_manage.mapper" level="DEBUG" /> |
||||
|
<!-- <logger name="com.dreamchaser.mapper" level="debug"/>--> |
||||
|
</springProfile> |
||||
|
<!-- endregion --> |
||||
|
|
||||
|
</configuration> |
||||
@ -0,0 +1,4 @@ |
|||||
|
{ |
||||
|
"code": 1, |
||||
|
"msg": "服务端清理缓存成功" |
||||
|
} |
||||
@ -0,0 +1,227 @@ |
|||||
|
{ |
||||
|
"homeInfo": { |
||||
|
"title": "首页", |
||||
|
"href": "/welcome" |
||||
|
}, |
||||
|
"logoInfo": { |
||||
|
"title": "Repository", |
||||
|
"image": "static/images/logo.png", |
||||
|
"href": "" |
||||
|
}, |
||||
|
"menuInfo": [ |
||||
|
{ |
||||
|
"title": "仓库信息概览", |
||||
|
"href": "/welcome", |
||||
|
"icon": "fa fa-tachometer", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "首页", |
||||
|
"href": "/welcome", |
||||
|
"icon": "fa fa-home", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "仓库管理", |
||||
|
"icon": "fa fa-lemon-o", |
||||
|
"href": "", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "申请提交", |
||||
|
"icon": "fa fa-book", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "入库申请", |
||||
|
"href": "/application_in", |
||||
|
"icon": "layui-icon layui-icon-file-b", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "出库申请", |
||||
|
"href": "/application_out", |
||||
|
"icon": "fa fa-file-text", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "库存转移申请", |
||||
|
"href": "/application_transfer", |
||||
|
"icon": "fa fa-exchange", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "入库管理", |
||||
|
"icon": "fa fa-mail-forward", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "入库查询", |
||||
|
"href": "/table_in", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "入库可视化", |
||||
|
"href": "/chart_in", |
||||
|
"icon": "fa fa-bar-chart", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "入库可视化(测试)", |
||||
|
"href": "/chart_in_back", |
||||
|
"icon": "fa fa-bar-chart", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "出库管理", |
||||
|
"icon": "fa fa-mail-reply", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "出库查询", |
||||
|
"href": "/table_out", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "出库可视化", |
||||
|
"href": "/chart_out", |
||||
|
"icon": "fa fa-pie-chart", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "库存管理", |
||||
|
"icon": "fa fa-server", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "库存查询", |
||||
|
"href": "/table_stock", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "库存可视化", |
||||
|
"href": "/chart_stock", |
||||
|
"icon": "fa fa-area-chart", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "仓库管理", |
||||
|
"icon": "fa fa-wrench", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "创建仓库", |
||||
|
"href": "/depository_add", |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "仓库查询", |
||||
|
"href": "/depository-out", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "材料种类管理", |
||||
|
"icon": "fa fa-wrench", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "材料种类添加", |
||||
|
"href": "/materialType_add", |
||||
|
"icon": "layui-icon layui-icon-list", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "材料种类查询", |
||||
|
"href": "/materialType_view", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "材料管理", |
||||
|
"icon": "fa fa-wrench", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "创建材料", |
||||
|
"href": "/material_add", |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "材料查询", |
||||
|
"href": "/material_out", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "我的任务", |
||||
|
"icon": "fa fa-tasks", |
||||
|
"target": "_self", |
||||
|
"href": "/my_task" |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
"title": "我的申请", |
||||
|
"href": "/my_apply", |
||||
|
"icon": "fa fa-paper-plane", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "辅助管理", |
||||
|
"icon": "fa fa-slideshare", |
||||
|
"href": "", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "人员管理", |
||||
|
"href": "/table_user", |
||||
|
"icon": "fa fa-group", |
||||
|
"target": "" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "公告发布", |
||||
|
"href": "/notice_edit", |
||||
|
"icon": "fa fa-superpowers", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "个人中心", |
||||
|
"href": "pages/error.html", |
||||
|
"icon": "fa fa-superpowers", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "个人信息", |
||||
|
"href": "/account_look", |
||||
|
"icon": "layui-icon layui-icon-friends", |
||||
|
"target": "" |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,221 @@ |
|||||
|
{ |
||||
|
"homeInfo": { |
||||
|
"title": "首页", |
||||
|
"href": "/welcome" |
||||
|
}, |
||||
|
"logoInfo": { |
||||
|
"title": "Repository", |
||||
|
"image": "static/images/logo.png", |
||||
|
"href": "" |
||||
|
}, |
||||
|
"menuInfo": [ |
||||
|
{ |
||||
|
"title": "仓库信息概览", |
||||
|
"href": "/welcome", |
||||
|
"icon": "fa fa-tachometer", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "首页", |
||||
|
"href": "/welcome", |
||||
|
"icon": "fa fa-home", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "仓库管理", |
||||
|
"icon": "fa fa-lemon-o", |
||||
|
"href": "", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "申请提交", |
||||
|
"icon": "fa fa-book", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "入库申请", |
||||
|
"href": "/application_in", |
||||
|
"icon": "layui-icon layui-icon-file-b", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "出库申请", |
||||
|
"href": "/application_out", |
||||
|
"icon": "fa fa-file-text", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "库存转移申请", |
||||
|
"href": "application_transfer", |
||||
|
"icon": "fa fa-exchange", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "入库管理", |
||||
|
"icon": "fa fa-mail-forward", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "入库查询", |
||||
|
"href": "/table_in", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "入库可视化", |
||||
|
"href": "/chart_in", |
||||
|
"icon": "fa fa-bar-chart", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "入库可视化(测试)", |
||||
|
"href": "/chart_in_back", |
||||
|
"icon": "fa fa-bar-chart", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "出库管理", |
||||
|
"icon": "fa fa-mail-reply", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "出库查询", |
||||
|
"href": "/table_out", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "出库可视化", |
||||
|
"href": "/chart_out", |
||||
|
"icon": "fa fa-pie-chart", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "库存管理", |
||||
|
"icon": "fa fa-server", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "库存查询", |
||||
|
"href": "/table_stock", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "库存可视化", |
||||
|
"href": "/chart_stock", |
||||
|
"icon": "fa fa-area-chart", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "仓库管理", |
||||
|
"icon": "fa fa-wrench", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "创建仓库", |
||||
|
"href": "/depository_add", |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "仓库查询", |
||||
|
"href": "/depository-out", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "材料种类管理", |
||||
|
"icon": "fa fa-wrench", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "材料种类添加", |
||||
|
"href": "/materialType_add", |
||||
|
"icon": "layui-icon layui-icon-list", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "材料种类查询", |
||||
|
"href": "/materialType_view", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "材料管理", |
||||
|
"icon": "fa fa-wrench", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "创建材料", |
||||
|
"href": "/material_add", |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "材料查询", |
||||
|
"href": "/material_out", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "我的任务", |
||||
|
"icon": "fa fa-tasks", |
||||
|
"target": "_self", |
||||
|
"href": "/my_task" |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
"title": "我的申请", |
||||
|
"href": "/my_apply", |
||||
|
"icon": "fa fa-paper-plane", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "辅助管理", |
||||
|
"icon": "fa fa-slideshare", |
||||
|
"href": "", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "公告发布", |
||||
|
"href": "/notice_edit", |
||||
|
"icon": "fa fa-superpowers", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "个人中心", |
||||
|
"href": "pages/error.html", |
||||
|
"icon": "fa fa-superpowers", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "个人信息", |
||||
|
"href": "/account_look", |
||||
|
"icon": "layui-icon layui-icon-friends", |
||||
|
"target": "" |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,227 @@ |
|||||
|
{ |
||||
|
"homeInfo": { |
||||
|
"title": "首页", |
||||
|
"href": "/welcome" |
||||
|
}, |
||||
|
"logoInfo": { |
||||
|
"title": "Repository", |
||||
|
"image": "static/images/logo.png", |
||||
|
"href": "" |
||||
|
}, |
||||
|
"menuInfo": [ |
||||
|
{ |
||||
|
"title": "仓库信息概览", |
||||
|
"href": "/welcome", |
||||
|
"icon": "fa fa-tachometer", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "首页", |
||||
|
"href": "/welcome", |
||||
|
"icon": "fa fa-home", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "仓库管理", |
||||
|
"icon": "fa fa-lemon-o", |
||||
|
"href": "", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "申请提交", |
||||
|
"icon": "fa fa-book", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "入库申请", |
||||
|
"href": "/application_in", |
||||
|
"icon": "layui-icon layui-icon-file-b", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "出库申请", |
||||
|
"href": "/application_out", |
||||
|
"icon": "fa fa-file-text", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "库存转移申请", |
||||
|
"href": "application_transfer", |
||||
|
"icon": "fa fa-exchange", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "入库管理", |
||||
|
"icon": "fa fa-mail-forward", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "入库查询", |
||||
|
"href": "/table_in", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "入库可视化", |
||||
|
"href": "/chart_in", |
||||
|
"icon": "fa fa-bar-chart", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "入库可视化(测试)", |
||||
|
"href": "/chart_in_back", |
||||
|
"icon": "fa fa-bar-chart", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "出库管理", |
||||
|
"icon": "fa fa-mail-reply", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "出库查询", |
||||
|
"href": "/table_out", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "出库可视化", |
||||
|
"href": "/chart_out", |
||||
|
"icon": "fa fa-pie-chart", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "库存管理", |
||||
|
"icon": "fa fa-server", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "库存查询", |
||||
|
"href": "/table_stock", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "库存可视化", |
||||
|
"href": "/chart_stock", |
||||
|
"icon": "fa fa-area-chart", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "仓库管理", |
||||
|
"icon": "fa fa-wrench", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "创建仓库", |
||||
|
"href": "/depository_add", |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "仓库查询", |
||||
|
"href": "/depository-out", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "材料种类管理", |
||||
|
"icon": "fa fa-wrench", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "材料种类添加", |
||||
|
"href": "/materialType_add", |
||||
|
"icon": "layui-icon layui-icon-list", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "材料种类查询", |
||||
|
"href": "/materialType_view", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "材料管理", |
||||
|
"icon": "fa fa-wrench", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "创建材料", |
||||
|
"href": "/material_add", |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "材料查询", |
||||
|
"href": "/material_out", |
||||
|
"icon": "fa fa-th-list", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "我的任务", |
||||
|
"icon": "fa fa-tasks", |
||||
|
"target": "_self", |
||||
|
"href": "/my_task" |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
"title": "我的申请", |
||||
|
"href": "/my_apply", |
||||
|
"icon": "fa fa-paper-plane", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "辅助管理", |
||||
|
"icon": "fa fa-slideshare", |
||||
|
"href": "", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "人员管理", |
||||
|
"href": "/table_user", |
||||
|
"icon": "fa fa-group", |
||||
|
"target": "" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "公告发布", |
||||
|
"href": "/notice_edit", |
||||
|
"icon": "fa fa-superpowers", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "个人中心", |
||||
|
"href": "pages/error.html", |
||||
|
"icon": "fa fa-superpowers", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "个人信息", |
||||
|
"href": "/account_look", |
||||
|
"icon": "layui-icon layui-icon-friends", |
||||
|
"target": "" |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,101 @@ |
|||||
|
{ |
||||
|
"homeInfo": { |
||||
|
"title": "首页", |
||||
|
"href": "/welcome" |
||||
|
}, |
||||
|
"logoInfo": { |
||||
|
"title": "Repository", |
||||
|
"image": "static/images/logo.png", |
||||
|
"href": "" |
||||
|
}, |
||||
|
"menuInfo": [ |
||||
|
{ |
||||
|
"title": "仓库信息概览", |
||||
|
"href": "/welcome", |
||||
|
"icon": "fa fa-tachometer", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "首页", |
||||
|
"href": "/welcome", |
||||
|
"icon": "fa fa-home", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "仓库管理", |
||||
|
"icon": "fa fa-lemon-o", |
||||
|
"href": "", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "申请提交", |
||||
|
"icon": "fa fa-book", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "入库申请", |
||||
|
"href": "/application_in", |
||||
|
"icon": "layui-icon layui-icon-file-b", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "出库申请", |
||||
|
"href": "/application_out", |
||||
|
"icon": "fa fa-file-text", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"title": "库存转移申请", |
||||
|
"href": "application_transfer", |
||||
|
"icon": "fa fa-exchange", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "我的任务", |
||||
|
"icon": "fa fa-tasks", |
||||
|
"target": "_self", |
||||
|
"href": "/my_task" |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
"title": "我的申请", |
||||
|
"href": "/my_apply", |
||||
|
"icon": "fa fa-paper-plane", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "辅助管理", |
||||
|
"icon": "fa fa-slideshare", |
||||
|
"href": "", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "公告发布", |
||||
|
"href": "/notice_edit", |
||||
|
"icon": "fa fa-superpowers", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"title": "个人中心", |
||||
|
"href": "pages/error.html", |
||||
|
"icon": "fa fa-superpowers", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"title": "个人信息", |
||||
|
"href": "/account_look", |
||||
|
"icon": "layui-icon layui-icon-friends", |
||||
|
"target": "" |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,254 @@ |
|||||
|
{ |
||||
|
"code": 0, |
||||
|
"msg": "", |
||||
|
"count": 19, |
||||
|
"data": [ |
||||
|
{ |
||||
|
"authorityId": 1, |
||||
|
"authorityName": "系统管理", |
||||
|
"orderNumber": 1, |
||||
|
"menuUrl": null, |
||||
|
"menuIcon": "layui-icon-set", |
||||
|
"createTime": "2018/06/29 11:05:41", |
||||
|
"authority": null, |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/13 09:13:42", |
||||
|
"isMenu": 0, |
||||
|
"parentId": -1 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 2, |
||||
|
"authorityName": "用户管理", |
||||
|
"orderNumber": 2, |
||||
|
"menuUrl": "system/user", |
||||
|
"menuIcon": null, |
||||
|
"createTime": "2018/06/29 11:05:41", |
||||
|
"authority": null, |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/13 09:13:42", |
||||
|
"isMenu": 0, |
||||
|
"parentId": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 3, |
||||
|
"authorityName": "查询用户", |
||||
|
"orderNumber": 3, |
||||
|
"menuUrl": "", |
||||
|
"menuIcon": "", |
||||
|
"createTime": "2018/07/21 13:54:16", |
||||
|
"authority": "user:view", |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/21 13:54:16", |
||||
|
"isMenu": 1, |
||||
|
"parentId": 2 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 4, |
||||
|
"authorityName": "添加用户", |
||||
|
"orderNumber": 4, |
||||
|
"menuUrl": null, |
||||
|
"menuIcon": null, |
||||
|
"createTime": "2018/06/29 11:05:41", |
||||
|
"authority": "user:add", |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/13 09:13:42", |
||||
|
"isMenu": 1, |
||||
|
"parentId": 2 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 5, |
||||
|
"authorityName": "修改用户", |
||||
|
"orderNumber": 5, |
||||
|
"menuUrl": null, |
||||
|
"menuIcon": null, |
||||
|
"createTime": "2018/06/29 11:05:41", |
||||
|
"authority": "user:edit", |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/13 09:13:42", |
||||
|
"isMenu": 1, |
||||
|
"parentId": 2 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 6, |
||||
|
"authorityName": "删除用户", |
||||
|
"orderNumber": 6, |
||||
|
"menuUrl": null, |
||||
|
"menuIcon": null, |
||||
|
"createTime": "2018/06/29 11:05:41", |
||||
|
"authority": "user:delete", |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/13 09:13:42", |
||||
|
"isMenu": 1, |
||||
|
"parentId": 2 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 7, |
||||
|
"authorityName": "角色管理", |
||||
|
"orderNumber": 7, |
||||
|
"menuUrl": "system/role", |
||||
|
"menuIcon": null, |
||||
|
"createTime": "2018/06/29 11:05:41", |
||||
|
"authority": null, |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/13 09:13:42", |
||||
|
"isMenu": 0, |
||||
|
"parentId": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 8, |
||||
|
"authorityName": "查询角色", |
||||
|
"orderNumber": 8, |
||||
|
"menuUrl": "", |
||||
|
"menuIcon": "", |
||||
|
"createTime": "2018/07/21 13:54:59", |
||||
|
"authority": "role:view", |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/21 13:54:58", |
||||
|
"isMenu": 1, |
||||
|
"parentId": 7 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 9, |
||||
|
"authorityName": "添加角色", |
||||
|
"orderNumber": 9, |
||||
|
"menuUrl": "", |
||||
|
"menuIcon": "", |
||||
|
"createTime": "2018/06/29 11:05:41", |
||||
|
"authority": "role:add", |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/13 09:13:42", |
||||
|
"isMenu": 1, |
||||
|
"parentId": 7 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 10, |
||||
|
"authorityName": "修改角色", |
||||
|
"orderNumber": 10, |
||||
|
"menuUrl": "", |
||||
|
"menuIcon": "", |
||||
|
"createTime": "2018/06/29 11:05:41", |
||||
|
"authority": "role:edit", |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/13 09:13:42", |
||||
|
"isMenu": 1, |
||||
|
"parentId": 7 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 11, |
||||
|
"authorityName": "删除角色", |
||||
|
"orderNumber": 11, |
||||
|
"menuUrl": "", |
||||
|
"menuIcon": "", |
||||
|
"createTime": "2018/06/29 11:05:41", |
||||
|
"authority": "role:delete", |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/13 09:13:42", |
||||
|
"isMenu": 1, |
||||
|
"parentId": 7 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 12, |
||||
|
"authorityName": "角色权限管理", |
||||
|
"orderNumber": 12, |
||||
|
"menuUrl": "", |
||||
|
"menuIcon": "", |
||||
|
"createTime": "2018/06/29 11:05:41", |
||||
|
"authority": "role:auth", |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/13 15:27:18", |
||||
|
"isMenu": 1, |
||||
|
"parentId": 7 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 13, |
||||
|
"authorityName": "权限管理", |
||||
|
"orderNumber": 13, |
||||
|
"menuUrl": "system/authorities", |
||||
|
"menuIcon": null, |
||||
|
"createTime": "2018/06/29 11:05:41", |
||||
|
"authority": null, |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/13 15:45:13", |
||||
|
"isMenu": 0, |
||||
|
"parentId": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 14, |
||||
|
"authorityName": "查询权限", |
||||
|
"orderNumber": 14, |
||||
|
"menuUrl": "", |
||||
|
"menuIcon": "", |
||||
|
"createTime": "2018/07/21 13:55:57", |
||||
|
"authority": "authorities:view", |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/21 13:55:56", |
||||
|
"isMenu": 1, |
||||
|
"parentId": 13 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 15, |
||||
|
"authorityName": "添加权限", |
||||
|
"orderNumber": 15, |
||||
|
"menuUrl": "", |
||||
|
"menuIcon": "", |
||||
|
"createTime": "2018/06/29 11:05:41", |
||||
|
"authority": "authorities:add", |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/06/29 11:05:41", |
||||
|
"isMenu": 1, |
||||
|
"parentId": 13 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 16, |
||||
|
"authorityName": "修改权限", |
||||
|
"orderNumber": 16, |
||||
|
"menuUrl": "", |
||||
|
"menuIcon": "", |
||||
|
"createTime": "2018/07/13 09:13:42", |
||||
|
"authority": "authorities:edit", |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/13 09:13:42", |
||||
|
"isMenu": 1, |
||||
|
"parentId": 13 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 17, |
||||
|
"authorityName": "删除权限", |
||||
|
"orderNumber": 17, |
||||
|
"menuUrl": "", |
||||
|
"menuIcon": "", |
||||
|
"createTime": "2018/06/29 11:05:41", |
||||
|
"authority": "authorities:delete", |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/06/29 11:05:41", |
||||
|
"isMenu": 1, |
||||
|
"parentId": 13 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 18, |
||||
|
"authorityName": "登录日志", |
||||
|
"orderNumber": 18, |
||||
|
"menuUrl": "system/loginRecord", |
||||
|
"menuIcon": null, |
||||
|
"createTime": "2018/06/29 11:05:41", |
||||
|
"authority": null, |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/06/29 11:05:41", |
||||
|
"isMenu": 0, |
||||
|
"parentId": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"authorityId": 19, |
||||
|
"authorityName": "查询登录日志", |
||||
|
"orderNumber": 19, |
||||
|
"menuUrl": "", |
||||
|
"menuIcon": "", |
||||
|
"createTime": "2018/07/21 13:56:43", |
||||
|
"authority": "loginRecord:view", |
||||
|
"checked": 0, |
||||
|
"updateTime": "2018/07/21 13:56:43", |
||||
|
"isMenu": 1, |
||||
|
"parentId": 18 |
||||
|
} |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,133 @@ |
|||||
|
{ |
||||
|
"code": 0, |
||||
|
"msg": "", |
||||
|
"count": 1000, |
||||
|
"data": [ |
||||
|
{ |
||||
|
"id": 10000, |
||||
|
"applicationId": 2001, |
||||
|
"materialName": "骁龙888芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "购入", |
||||
|
"state": "待审核", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2020-10-06 10:05", |
||||
|
"reviewTime": "无", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
}, |
||||
|
{ |
||||
|
"id": 10001, |
||||
|
"applicationId": 3301, |
||||
|
"materialName": "麒麟980芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "购入", |
||||
|
"state": "已入库", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2021-10-06 10:05", |
||||
|
"reviewRemarks": "审核批准!", |
||||
|
"reviewTime": "2021-10-07 11:12", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准", |
||||
|
"checkerName":"李四", |
||||
|
"checkRemarks": "验收无误,入库!", |
||||
|
"checkTime": "2021-10-8 15:23" |
||||
|
},{ |
||||
|
"id": 10002, |
||||
|
"applicationId": 409, |
||||
|
"materialName": "骁龙888芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "购入", |
||||
|
"state": "待审核", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2020-10-06 10:05", |
||||
|
"reviewTime": "2020-10-07 11:12", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
},{ |
||||
|
"id": 10000, |
||||
|
"applicationId": 123, |
||||
|
"materialName": "骁龙888芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "转入", |
||||
|
"state": "待审核", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2020-10-06 10:05", |
||||
|
"reviewTime": "2020-10-07 11:12", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
},{ |
||||
|
"id": 10000, |
||||
|
"applicationId": 321, |
||||
|
"materialName": "骁龙888芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "转入", |
||||
|
"state": "待审核", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2020-10-06 10:05", |
||||
|
"reviewTime": "2020-10-07 11:12", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
},{ |
||||
|
"id": 10000, |
||||
|
"applicationId": 456, |
||||
|
"materialName": "骁龙888芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "转入", |
||||
|
"state": "待审核", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2020-10-06 10:05", |
||||
|
"reviewTime": "2020-10-07 11:12", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
},{ |
||||
|
"id": 10000, |
||||
|
"applicationId": 456, |
||||
|
"materialName": "骁龙888芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "购入", |
||||
|
"state": "待审核", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2020-10-06 10:05", |
||||
|
"reviewTime": "2020-10-07 11:12", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
},{ |
||||
|
"id": 10000, |
||||
|
"applicationId": 123, |
||||
|
"materialName": "骁龙888芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "转入", |
||||
|
"state": "待审核", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2020-10-06 10:05", |
||||
|
"reviewTime": "2020-10-07 11:12", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
} |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,130 @@ |
|||||
|
{ |
||||
|
"code": 0, |
||||
|
"msg": "", |
||||
|
"count": 1000, |
||||
|
"data": [ |
||||
|
{ |
||||
|
"id": 10000, |
||||
|
"applicationId": 2001, |
||||
|
"materialName": "骁龙888芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "购入", |
||||
|
"state": "待审核", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2020-10-06 10:05", |
||||
|
"reviewTime": "无", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
}, |
||||
|
{ |
||||
|
"id": 10001, |
||||
|
"applicationId": 3301, |
||||
|
"materialName": "麒麟980芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "购入", |
||||
|
"state": "已入库", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2021-10-06 10:05", |
||||
|
"reviewRemarks": "审核批准!", |
||||
|
"reviewTime": "2021-10-07 11:12", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
},{ |
||||
|
"id": 10002, |
||||
|
"applicationId": 409, |
||||
|
"materialName": "骁龙888芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "购入", |
||||
|
"state": "待审核", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2020-10-06 10:05", |
||||
|
"reviewTime": "2020-10-07 11:12", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
},{ |
||||
|
"id": 10000, |
||||
|
"applicationId": 123, |
||||
|
"materialName": "骁龙888芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "转入", |
||||
|
"state": "待审核", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2020-10-06 10:05", |
||||
|
"reviewTime": "2020-10-07 11:12", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
},{ |
||||
|
"id": 10000, |
||||
|
"applicationId": 321, |
||||
|
"materialName": "骁龙888芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "转入", |
||||
|
"state": "待审核", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2020-10-06 10:05", |
||||
|
"reviewTime": "2020-10-07 11:12", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
},{ |
||||
|
"id": 10000, |
||||
|
"applicationId": 456, |
||||
|
"materialName": "骁龙888芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "转入", |
||||
|
"state": "待审核", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2020-10-06 10:05", |
||||
|
"reviewTime": "2020-10-07 11:12", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
},{ |
||||
|
"id": 10000, |
||||
|
"applicationId": 456, |
||||
|
"materialName": "骁龙888芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "购入", |
||||
|
"state": "待审核", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2020-10-06 10:05", |
||||
|
"reviewTime": "2020-10-07 11:12", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
},{ |
||||
|
"id": 10000, |
||||
|
"applicationId": 123, |
||||
|
"materialName": "骁龙888芯片", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"quantity": "409", |
||||
|
"price": "205004109", |
||||
|
"type": "转入", |
||||
|
"state": "待审核", |
||||
|
"applicantName": "张三", |
||||
|
"reviewerName": "King", |
||||
|
"applyTime": "2020-10-06 10:05", |
||||
|
"reviewTime": "2020-10-07 11:12", |
||||
|
"depositoryId": 57, |
||||
|
"applyRemarks": "老板要求今天这批货得进库,请尽快批准" |
||||
|
} |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,95 @@ |
|||||
|
{ |
||||
|
"code": 0, |
||||
|
"msg": "", |
||||
|
"count": 1000, |
||||
|
"data": [ |
||||
|
{ |
||||
|
"id": 10000, |
||||
|
"uname": "张三", |
||||
|
"sex": "男", |
||||
|
"authority": "仓管员", |
||||
|
"phone": "4561348", |
||||
|
"email": "12345689@qq.com", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"entryDate": "2012-10-06", |
||||
|
"depositoryId": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"id": 10000, |
||||
|
"uname": "李四", |
||||
|
"sex": "男", |
||||
|
"authority": "仓管员", |
||||
|
"phone": "4561348", |
||||
|
"email": "12345689@qq.com", |
||||
|
"depositoryName": "义乌仓库a", |
||||
|
"entryDate": "2012-10-06", |
||||
|
"depositoryId": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"id": 10000, |
||||
|
"uname": "King", |
||||
|
"sex": "男", |
||||
|
"authority": "仓管员", |
||||
|
"phone": "4561348", |
||||
|
"email": "12345689@qq.com", |
||||
|
"depositoryName": "义乌仓库b", |
||||
|
"entryDate": "2012-10-06", |
||||
|
"depositoryId": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"id": 10000, |
||||
|
"uname": "张三", |
||||
|
"sex": "男", |
||||
|
"authority": "仓管员", |
||||
|
"phone": "4561348", |
||||
|
"email": "12345689@qq.com", |
||||
|
"depositoryName": "宁波仓库", |
||||
|
"entryDate": "2012-10-06", |
||||
|
"depositoryId": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"id": 10000, |
||||
|
"uname": "张三", |
||||
|
"sex": "男", |
||||
|
"authority": "仓管员", |
||||
|
"phone": "4561348", |
||||
|
"email": "12345689@qq.com", |
||||
|
"depositoryName": "宁波仓库", |
||||
|
"entryDate": "2012-10-06", |
||||
|
"depositoryId": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"id": 10000, |
||||
|
"uname": "boss", |
||||
|
"sex": "男", |
||||
|
"authority": "系统管理员", |
||||
|
"phone": "4561348", |
||||
|
"email": "12345689@qq.com", |
||||
|
"depositoryName": "all", |
||||
|
"entryDate": "2012-10-06", |
||||
|
"depositoryId": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"id": 10000, |
||||
|
"uname": "张三", |
||||
|
"sex": "男", |
||||
|
"authority": "仓管员", |
||||
|
"phone": "4561348", |
||||
|
"email": "12345689@qq.com", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"entryDate": "2012-10-06", |
||||
|
"depositoryId": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"id": 10000, |
||||
|
"uname": "张三", |
||||
|
"sex": "男", |
||||
|
"authority": "仓管员", |
||||
|
"phone": "4561348", |
||||
|
"email": "12345689@qq.com", |
||||
|
"depositoryName": "外芯仓库", |
||||
|
"entryDate": "2012-10-06", |
||||
|
"depositoryId": 1 |
||||
|
} |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
{ |
||||
|
"code": 0, |
||||
|
"msg": "", |
||||
|
"count": 16, |
||||
|
"data": [ |
||||
|
{ "id":"001", "username":"张玉林", "sex":"女" }, |
||||
|
{ "id":"002", "username":"刘晓军", "sex":"男" }, |
||||
|
{ "id":"003", "username":"张恒", "sex":"男" }, |
||||
|
{ "id":"004", "username":"朱一", "sex":"男" }, |
||||
|
{ "id":"005", "username":"刘佳能", "sex":"女" }, |
||||
|
{ "id":"006", "username":"晓梅", "sex":"女" }, |
||||
|
{ "id":"007", "username":"马冬梅", "sex":"女" }, |
||||
|
{ "id":"008", "username":"刘晓庆", "sex":"女" }, |
||||
|
{ "id":"009", "username":"刘晓庆", "sex":"女" }, |
||||
|
{ "id":"010", "username":"刘晓庆", "sex":"女" }, |
||||
|
{ "id":"011", "username":"刘晓庆", "sex":"女" }, |
||||
|
{ "id":"012", "username":"刘晓庆", "sex":"女" }, |
||||
|
{ "id":"013", "username":"刘晓庆", "sex":"女" }, |
||||
|
{ "id":"014", "username":"刘晓庆", "sex":"女" }, |
||||
|
{ "id":"015", "username":"刘晓庆", "sex":"女" }, |
||||
|
{ "id":"016", "username":"刘晓庆", "sex":"女" } |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,226 @@ |
|||||
|
|
||||
|
{ |
||||
|
"homeInfo": { |
||||
|
"title": "首页", |
||||
|
"href": "/welcome" |
||||
|
}, |
||||
|
"logoInfo": { |
||||
|
"title": "Repository", |
||||
|
"image": "static/images/logo.png", |
||||
|
"href": "" |
||||
|
}, |
||||
|
"menuInfo": [ |
||||
|
{ |
||||
|
"icon": "fa fa-home", |
||||
|
"href": "/welcome", |
||||
|
"title": "仓库信息概览", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"icon": "fa fa-home", |
||||
|
"href": "/welcome", |
||||
|
"title": "首页", |
||||
|
"target": "_self", |
||||
|
"child": [] |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"href": "/account_look", |
||||
|
"title": "个人中心", |
||||
|
"target": "_self", |
||||
|
"child": [] |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-lemon-o", |
||||
|
"href": "", |
||||
|
"title": "仓库管理", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"href": "/my_task", |
||||
|
"title": "我的任务", |
||||
|
"target": "_self", |
||||
|
"child": [] |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"href": "/my_apply", |
||||
|
"title": "我的申请", |
||||
|
"target": "_self", |
||||
|
"child": [] |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-mail-forward", |
||||
|
"href": "", |
||||
|
"title": "申请提交", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"icon": "layui-icon layui-icon-file-b", |
||||
|
"href": "/application_in", |
||||
|
"title": "入库申请", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-file-text", |
||||
|
"href": "/application_out", |
||||
|
"title": "出库申请", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-exchange", |
||||
|
"href": "/application_transfer", |
||||
|
"title": "库存转移申请", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-mail-forward", |
||||
|
"href": "", |
||||
|
"title": "入库管理", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"icon": "fa fa-th-list", |
||||
|
"href": "/table_in", |
||||
|
"title": "入库查询", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-bar-chart", |
||||
|
"href": "/chart_in", |
||||
|
"title": "入库可视化", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-mail-forward", |
||||
|
"href": "", |
||||
|
"title": "出库管理", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"icon": "fa fa-th-list", |
||||
|
"href": "/table_out", |
||||
|
"title": "出库查询", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-pie-chart", |
||||
|
"href": "/chart_out", |
||||
|
"title": "出库可视化", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-mail-forward", |
||||
|
"href": "", |
||||
|
"title": "库存管理", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"icon": "fa fa-th-list", |
||||
|
"href": "/table_stock", |
||||
|
"title": "库存查询", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-area-chart", |
||||
|
"href": "/chart_stock", |
||||
|
"title": "库存可视化", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-mail-forward", |
||||
|
"href": "", |
||||
|
"title": "仓库管理", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"href": "/depository_add", |
||||
|
"title": "创建仓库", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-th-list", |
||||
|
"href": "/depository-out", |
||||
|
"title": "仓库查询", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-mail-forward", |
||||
|
"href": "", |
||||
|
"title": "材料种类管理", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"icon": "fa fa-th-list", |
||||
|
"href": "/materialType_add", |
||||
|
"title": "材料种类添加", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"href": "/materialType_view", |
||||
|
"title": "材料种类查询", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-mail-forward", |
||||
|
"href": "", |
||||
|
"title": "材料管理", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"href": "/material_add", |
||||
|
"title": "创建材料", |
||||
|
"target": "_self" |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"href": "/material_out", |
||||
|
"title": "材料查询", |
||||
|
"target": "_self" |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "fa fa-slideshare", |
||||
|
"href": "", |
||||
|
"title": "辅助管理", |
||||
|
"target": "_self", |
||||
|
"child": [ |
||||
|
{ |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"href": "/table_user", |
||||
|
"title": "人员管理", |
||||
|
"target": "_self", |
||||
|
"child": [] |
||||
|
}, |
||||
|
{ |
||||
|
"icon": "layui-icon layui-icon-template-1", |
||||
|
"href": "/notice_edit", |
||||
|
"title": "公告发布", |
||||
|
"target": "_self", |
||||
|
"child": [] |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
{ |
||||
|
"code": 1, |
||||
|
"msg": "上传成功", |
||||
|
"data": { |
||||
|
"url": [ |
||||
|
"../images/logo.png", |
||||
|
"../images/captcha.jpg" |
||||
|
] |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,927 @@ |
|||||
|
/** |
||||
|
配色方案(如有需要,请自行配置) |
||||
|
*/ |
||||
|
/**头部-配色*/ |
||||
|
.layui-layout-admin .layui-header { |
||||
|
background-color: #1aa094 !important; |
||||
|
} |
||||
|
|
||||
|
.layui-header > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { |
||||
|
background-color: #197971 !important; |
||||
|
} |
||||
|
|
||||
|
.layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { |
||||
|
background-color: #197971 !important; |
||||
|
} |
||||
|
|
||||
|
/**logo-配色*/ |
||||
|
.layui-layout-admin .layuimini-logo { |
||||
|
background-color: #243346 !important; |
||||
|
} |
||||
|
|
||||
|
/**左侧-配色*/ |
||||
|
.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul { |
||||
|
background-color: #2f4056 !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-menu-left .layui-nav .layui-nav-child a:hover:not(.layui-this) { |
||||
|
background-color: #3b3f4b; |
||||
|
} |
||||
|
|
||||
|
/**左侧菜单选中-配色*/ |
||||
|
.layui-layout-admin .layui-nav-tree .layui-this, .layui-layout-admin .layui-nav-tree .layui-this > a, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this a { |
||||
|
background-color: #1aa094 !important; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/**头部样式 */ |
||||
|
.layui-layout-admin .header { |
||||
|
position: fixed; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
top: 0; |
||||
|
bottom: 0; |
||||
|
} |
||||
|
|
||||
|
.layuimini-header-menu, .layui-header { |
||||
|
height: 60px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-header-menu > .layui-nav-item { |
||||
|
color: #1b1d21; |
||||
|
height: 60px !important; |
||||
|
line-height: 60px !important; |
||||
|
} |
||||
|
|
||||
|
.layui-header > .layui-layout-right > .layui-nav-item { |
||||
|
height: 60px !important; |
||||
|
line-height: 60px !important; |
||||
|
} |
||||
|
|
||||
|
.layui-layout-left { |
||||
|
left: 295px !important; |
||||
|
} |
||||
|
|
||||
|
.layui-nav.layui-layout-left.layuimini-header-menu.layuimini-pc-show { |
||||
|
font-weight: bold; |
||||
|
transition: all .2s; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/**logo演示(通用) */ |
||||
|
.layui-layout-admin .layuimini-logo { |
||||
|
font-weight: bold; |
||||
|
color: #ffffff !important; |
||||
|
height: 60px !important; |
||||
|
line-height: 60px !important; |
||||
|
overflow: hidden; |
||||
|
line-height: 64px; |
||||
|
transition: all .2s !important; |
||||
|
} |
||||
|
|
||||
|
.layui-layout-admin .layuimini-logo img { |
||||
|
display: inline-block; |
||||
|
height: 40px; |
||||
|
vertical-align: middle; |
||||
|
} |
||||
|
|
||||
|
.layui-layout-admin .layuimini-logo h1 { |
||||
|
display: inline-block; |
||||
|
margin: 0 0 0 12px; |
||||
|
color: #ffffff; |
||||
|
font-weight: 600; |
||||
|
font-size: 20px; |
||||
|
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif; |
||||
|
vertical-align: middle; |
||||
|
} |
||||
|
|
||||
|
/**缩放工具(通用) */ |
||||
|
.layuimini-tool { |
||||
|
position: absolute !important; |
||||
|
top: 0; |
||||
|
left: 235px; |
||||
|
width: 60px; |
||||
|
height: 100%; |
||||
|
line-height: 60px; |
||||
|
text-align: center; |
||||
|
color: #ffffff !important; |
||||
|
transition: all .2s; |
||||
|
} |
||||
|
|
||||
|
/**缩放工具(缩放) */ |
||||
|
.layuimini-tool i { |
||||
|
display: block; |
||||
|
color: #bbe3df; |
||||
|
width: 32px; |
||||
|
height: 32px; |
||||
|
line-height: 32px; |
||||
|
border-radius: 3px; |
||||
|
text-align: center; |
||||
|
margin-top: 15px; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
|
||||
|
/**tab选项卡 */ |
||||
|
.layuimini-tab { |
||||
|
margin: 0px; |
||||
|
overflow: hidden; |
||||
|
height: 100% !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-content { |
||||
|
height: calc(100% - 37px) !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-content .layui-tab-item { |
||||
|
height: 100%; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-content { |
||||
|
padding: 0px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-title { |
||||
|
border: none; |
||||
|
border: 1px solid whitesmoke; |
||||
|
background-color: white; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-title li { |
||||
|
border-right: 1px solid whitesmoke; |
||||
|
color: dimgray; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-title .layui-tab-bar { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-title .layui-this:after { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-title .layuimini-tab-active { |
||||
|
display: inline-block; |
||||
|
background-color: lightgray; |
||||
|
width: 9px; |
||||
|
height: 9px; |
||||
|
border-radius: 30px; |
||||
|
margin-right: 5px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active { |
||||
|
background-color: #1aa094; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab > .layui-tab-title, .layuimini-tab > .close-box { |
||||
|
height: 35px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab > .layui-tab-title li, .layuimini-tab > .close-box li { |
||||
|
line-height: 35px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-title span { |
||||
|
color: #acafb1; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-title .layui-this span { |
||||
|
color: dimgray; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-title .layui-tab-close { |
||||
|
font-size: 12px !important; |
||||
|
width: 14px !important; |
||||
|
height: 14px !important; |
||||
|
line-height: 16px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-title .layui-tab-close:hover { |
||||
|
border-radius: 4em; |
||||
|
background: #ff5722; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-title .disable-close + .layui-tab-close { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-title .able-close + .layui-tab-close { |
||||
|
display: inline-block; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-control > li { |
||||
|
position: absolute; |
||||
|
top: 0px; |
||||
|
height: 35px; |
||||
|
line-height: 35px; |
||||
|
width: 35px; |
||||
|
text-align: center; |
||||
|
background-color: white; |
||||
|
border-top: whitesmoke 1px solid; |
||||
|
border-bottom: whitesmoke 1px solid; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layuimini-tab-roll-left { |
||||
|
left: 0px; |
||||
|
border-right: whitesmoke 1px solid; |
||||
|
border-left: whitesmoke 1px solid; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layuimini-tab-roll-right { |
||||
|
right: 35px; |
||||
|
border-left: 1px solid whitesmoke; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-tool { |
||||
|
right: 0px; |
||||
|
border-left: 1px solid whitesmoke; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-control .layui-tab-tool, |
||||
|
.layuimini-tab .layui-tab-control .layuimini-tab-roll-left, |
||||
|
.layuimini-tab .layui-tab-control .layuimini-tab-roll-right { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-left, |
||||
|
.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-right { |
||||
|
display: block; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-right { |
||||
|
right: 0px; |
||||
|
border-right: 1px solid whitesmoke; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab.layui-tab-roll .layui-tab-title { |
||||
|
padding-left: 35px; |
||||
|
padding-right: 35px; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
.layuimini-tab.layui-tab-tool .layui-tab-control .layui-tab-tool { |
||||
|
display: block; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab.layui-tab-tool .layui-tab-title { |
||||
|
padding-left: 0px; |
||||
|
padding-right: 35px; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
.layuimini-tab.layui-tab-rollTool .layui-tab-title { |
||||
|
padding-left: 35px; |
||||
|
padding-right: 80px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab.layui-tab-rollTool .layui-tab-control .layuimini-tab-roll-left, |
||||
|
.layuimini-tab.layui-tab-rollTool .layui-tab-control .layuimini-tab-roll-right, |
||||
|
.layuimini-tab.layui-tab-rollTool .layui-tab-control .layui-tab-tool { |
||||
|
display: block; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-tool .layui-nav { |
||||
|
position: absolute; |
||||
|
height: 43px !important; |
||||
|
top: 0; |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
padding: 0; |
||||
|
background: 0 0; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-tool .layui-nav-item { |
||||
|
height: 35px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-tool .layui-nav-bar { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-tool .layui-nav-child { |
||||
|
left: auto; |
||||
|
top: 45px; |
||||
|
right: 3px; |
||||
|
width: 120px; |
||||
|
border: 1px solid whitesmoke; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-tool .layui-this a { |
||||
|
background-color: #009688; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab-loading { |
||||
|
position: absolute; |
||||
|
display: none; |
||||
|
width: 100%; |
||||
|
height: calc(100% - 37px); |
||||
|
top: 37px; |
||||
|
z-index: 19; |
||||
|
background-color: #fff |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab-loading.close { |
||||
|
animation: close 1s; |
||||
|
-webkit-animation: close 1s; |
||||
|
animation-fill-mode: forwards; |
||||
|
} |
||||
|
|
||||
|
/**左侧菜单栏 (通用) */ |
||||
|
.layui-side.layui-bg-black { |
||||
|
transition: all .2s; |
||||
|
} |
||||
|
|
||||
|
.layui-side.layui-bg-black > .layuimini-menu-left > ul { |
||||
|
transition: all .2s; |
||||
|
} |
||||
|
|
||||
|
.layui-side.layui-bg-black > .layuimini-menu-left > ul > .layui-nav-item:first-child { |
||||
|
border-top: 1px solid #4b5461; |
||||
|
} |
||||
|
|
||||
|
.layuimini-menu-left .layui-nav .layui-nav-item a { |
||||
|
height: 40px; |
||||
|
line-height: 40px; |
||||
|
padding-right: 30px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-menu-left .layui-nav .layui-nav-item > a { |
||||
|
padding-top: 5px; |
||||
|
padding-bottom: 5px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child { |
||||
|
background: 0 0 !important |
||||
|
} |
||||
|
|
||||
|
.layuimini-menu-left .layui-nav .layui-nav-more { |
||||
|
right: 15px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-menu-left .layui-nav .layui-nav-item a:hover { |
||||
|
background-color: transparent !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-menu-left .layui-nav { |
||||
|
background-color: transparent !important; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/**左侧菜单栏 (正常) */ |
||||
|
.layui-layout-body .layui-nav-itemed .layui-nav-child a, .layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child a { |
||||
|
padding-left: 35px; |
||||
|
} |
||||
|
|
||||
|
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child a { |
||||
|
padding-left: 45px; |
||||
|
} |
||||
|
|
||||
|
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child .layui-nav-child a { |
||||
|
padding-left: 55px; |
||||
|
} |
||||
|
|
||||
|
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child .layui-nav-child .layui-nav-child a { |
||||
|
padding-left: 65px; |
||||
|
} |
||||
|
|
||||
|
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-itemed > .layui-nav-child { |
||||
|
padding: 5px 0; |
||||
|
} |
||||
|
|
||||
|
/**内容主体(通用) */ |
||||
|
.layui-layout-admin .layui-body { |
||||
|
overflow: hidden; |
||||
|
bottom: 0px !important; |
||||
|
top: 60px !important; |
||||
|
transition: all .2s; |
||||
|
} |
||||
|
|
||||
|
/**选择配色方案 */ |
||||
|
.layuimini-color .color-title { |
||||
|
padding: 10px 0 10px 20px; |
||||
|
border-bottom: 1px solid #d9dada; |
||||
|
margin-bottom: 8px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-color .color-content { |
||||
|
padding: 10px 5px 0 5px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-color .color-content ul { |
||||
|
list-style: none; |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
.layuimini-color .color-content ul li { |
||||
|
position: relative; |
||||
|
display: inline-block; |
||||
|
vertical-align: top; |
||||
|
width: 80px; |
||||
|
height: 50px; |
||||
|
margin: 0 15px 15px 0; |
||||
|
padding: 2px 2px 4px 2px; |
||||
|
background-color: #f2f2f2; |
||||
|
cursor: pointer; |
||||
|
font-size: 12px; |
||||
|
color: #666; |
||||
|
} |
||||
|
|
||||
|
.layuimini-color .color-content li.layui-this:after, .layuimini-color .color-content li:hover:after { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
padding: 4px; |
||||
|
top: -5px; |
||||
|
left: -5px; |
||||
|
border-color: #d8d8d8; |
||||
|
opacity: 1; |
||||
|
} |
||||
|
|
||||
|
.layuimini-color .color-content li:after { |
||||
|
content: ''; |
||||
|
position: absolute; |
||||
|
z-index: 20; |
||||
|
top: 50%; |
||||
|
left: 50%; |
||||
|
width: 1px; |
||||
|
height: 0; |
||||
|
border: 1px solid #f2f2f2; |
||||
|
transition: all .3s; |
||||
|
-webkit-transition: all .3s; |
||||
|
opacity: 0; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/**其它 */ |
||||
|
.layui-tab-item { |
||||
|
width: 100% !important; |
||||
|
height: 100% !important; |
||||
|
} |
||||
|
|
||||
|
.layui-nav-item.layui-this { |
||||
|
background-color: #1b1d21; |
||||
|
} |
||||
|
|
||||
|
.layui-width-height { |
||||
|
width: 100%; |
||||
|
height: 95%; |
||||
|
} |
||||
|
|
||||
|
.layui-tab { |
||||
|
margin: 0 0 0 0; |
||||
|
z-index: 99999; |
||||
|
} |
||||
|
|
||||
|
.text-center { |
||||
|
height: 30px !important; |
||||
|
line-height: 30px !important; |
||||
|
text-align: center !important; |
||||
|
} |
||||
|
|
||||
|
.layui-nav { |
||||
|
padding: 0 !important; |
||||
|
} |
||||
|
|
||||
|
.layui-nav .layui-this:after, .layui-nav-bar, .layui-nav-tree .layui-nav-itemed:after { |
||||
|
width: 0 !important; |
||||
|
height: 0 !important; |
||||
|
} |
||||
|
|
||||
|
.layui-layout-admin .layui-side { |
||||
|
top: 60px !important; |
||||
|
} |
||||
|
|
||||
|
.layui-tab-card { |
||||
|
box-shadow: 0px 0px 0px #888888; |
||||
|
border-bottom: 0; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/**自定义滚动条样式 */ |
||||
|
::-webkit-scrollbar { |
||||
|
display: none |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/*移动端遮罩层*/ |
||||
|
.layuimini-make { |
||||
|
position: fixed; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
bottom: 0; |
||||
|
top: 0; |
||||
|
z-index: 1000; |
||||
|
background: rgba(0, 0, 0, .5); |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
.layuimini-mini .layui-header { |
||||
|
z-index: 1001; |
||||
|
} |
||||
|
|
||||
|
/**初始化加载层*/ |
||||
|
.layuimini-loader { |
||||
|
position: fixed; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
background-color: #ffffff; |
||||
|
z-index: 999999; |
||||
|
} |
||||
|
|
||||
|
.layuimini-loader .layuimini-loader-inner { |
||||
|
display: block; |
||||
|
position: relative; |
||||
|
left: 50%; |
||||
|
top: 50%; |
||||
|
width: 150px; |
||||
|
height: 150px; |
||||
|
margin: -75px 0 0 -75px; |
||||
|
border-radius: 50%; |
||||
|
border: 3px solid transparent; |
||||
|
border-top-color: #1E9FFF; |
||||
|
animation: spin 2s linear infinite; |
||||
|
} |
||||
|
|
||||
|
.layuimini-loader .layuimini-loader-inner:before { |
||||
|
content: ""; |
||||
|
position: absolute; |
||||
|
top: 5px; |
||||
|
left: 5px; |
||||
|
right: 5px; |
||||
|
bottom: 5px; |
||||
|
border-radius: 50%; |
||||
|
border: 3px solid transparent; |
||||
|
border-top-color: #1E9FFF; |
||||
|
animation: spin 3s linear infinite; |
||||
|
} |
||||
|
|
||||
|
.layuimini-loader .layuimini-loader-inner:after { |
||||
|
content: ""; |
||||
|
position: absolute; |
||||
|
top: 15px; |
||||
|
left: 15px; |
||||
|
right: 15px; |
||||
|
bottom: 15px; |
||||
|
border-radius: 50%; |
||||
|
border: 3px solid transparent; |
||||
|
border-top-color: #1E9FFF; |
||||
|
animation: spin 1.5s linear infinite; |
||||
|
} |
||||
|
|
||||
|
@keyframes spin { |
||||
|
0% { |
||||
|
transform: rotate(0deg); |
||||
|
} |
||||
|
to { |
||||
|
transform: rotate(1turn); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/*系统设置*/ |
||||
|
|
||||
|
.layuimini-color .layui-word-aux { |
||||
|
position: absolute; |
||||
|
left: 60px; |
||||
|
top: 12px; |
||||
|
font-size: 12px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-color .layui-input-block { |
||||
|
margin-left: 15px; |
||||
|
min-height: 36px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-color .more-menu-list { |
||||
|
width: 100%; |
||||
|
margin-top: 30px; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
.layuimini-color .more-menu-item:first-child { |
||||
|
border-top: 1px solid #e8e8e8; |
||||
|
} |
||||
|
|
||||
|
.layuimini-color .more-menu-item .layui-icon { |
||||
|
font-size: 18px; |
||||
|
padding-right: 10px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-color .more-menu-item { |
||||
|
color: #595959; |
||||
|
height: 50px; |
||||
|
line-height: 50px; |
||||
|
font-size: 16px; |
||||
|
padding: 0 25px; |
||||
|
border-bottom: 1px solid #e8e8e8; |
||||
|
font-style: normal; |
||||
|
display: block; |
||||
|
} |
||||
|
|
||||
|
.layuimini-color .more-menu-item:hover { |
||||
|
background-color: whitesmoke; |
||||
|
} |
||||
|
|
||||
|
.layuimini-color .more-menu-item:after { |
||||
|
color: #8c8c8c; |
||||
|
right: 16px; |
||||
|
content: "\e602"; |
||||
|
position: absolute; |
||||
|
font-family: layui-icon !important; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
鼠标右键 |
||||
|
*/ |
||||
|
.layuimini-tab-mousedown { |
||||
|
display: none; |
||||
|
width: 80px; |
||||
|
position: absolute; |
||||
|
top: 0px !important; |
||||
|
left: 0px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab-mousedown dd a { |
||||
|
padding: 0 15px; |
||||
|
color: #484545; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab-make{ |
||||
|
position: absolute; |
||||
|
top: 36px; |
||||
|
bottom: 0px; |
||||
|
width: 100%; |
||||
|
background: rgb(255, 255, 255,0); |
||||
|
padding: 0px; |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
菜单缩放 |
||||
|
*/ |
||||
|
.popup-tips .layui-layer-TipsG{ |
||||
|
display: none; |
||||
|
} |
||||
|
.popup-tips.layui-layer-tips .layui-layer-content{ |
||||
|
padding: 0; |
||||
|
} |
||||
|
.popup-tips .layui-nav-tree{ |
||||
|
width: 150px; |
||||
|
border-radius: 10px; |
||||
|
} |
||||
|
|
||||
|
/**左侧菜单字体间距*/ |
||||
|
.layuimini-menu-left .layui-nav-item a span { |
||||
|
letter-spacing: 1px; |
||||
|
} |
||||
|
|
||||
|
/**头部菜单字体间距*/ |
||||
|
.layui-layout-admin .layui-header .layuimini-header-menu.layuimini-pc-show,.layui-layout-admin .layui-header .layuimini-header-menu.layuimini-mobile-show { |
||||
|
letter-spacing: 1px; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/**左侧菜单更多下拉样式*/ |
||||
|
.layuimini-menu-left .layui-nav-more,.layuimini-menu-left-zoom .layui-nav-more { |
||||
|
font-family: layui-icon !important; |
||||
|
font-size: 12px; |
||||
|
font-style: normal; |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
overflow: hidden; |
||||
|
width: auto; |
||||
|
height: auto; |
||||
|
line-height: normal; |
||||
|
border: none; |
||||
|
display: inline-block; |
||||
|
margin-top: -6px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-menu-left .layui-nav-child .layui-nav-more { |
||||
|
margin-top: -6px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-menu-left .layui-nav .layui-nav-mored,.layuimini-menu-left .layui-nav-itemed>a .layui-nav-more{ |
||||
|
margin-top: -9px!important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-menu-left-zoom.layui-nav .layui-nav-mored,.layuimini-menu-left-zoom.layui-nav-itemed>a .layui-nav-more{ |
||||
|
margin-top: -9px!important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-menu-left .layui-nav-more:before,.layuimini-menu-left-zoom .layui-nav-more:before { |
||||
|
content: "\e61a"; |
||||
|
} |
||||
|
.layuimini-menu-left .layui-nav-itemed > a > .layui-nav-more,.layuimini-menu-left-zoom .layui-nav-itemed > a > .layui-nav-more { |
||||
|
transform: rotate(180deg); |
||||
|
-ms-transform: rotate(180deg); |
||||
|
-moz-transform: rotate(180deg); |
||||
|
-webkit-transform: rotate(180deg); |
||||
|
-o-transform: rotate(180deg); |
||||
|
width: 12px; |
||||
|
text-align: center; |
||||
|
border-style:none; |
||||
|
} |
||||
|
|
||||
|
.layuimini-menu-left .layui-nav-itemed > a > .layui-nav-more:before,.layuimini-menu-left-zoom .layui-nav-itemed > a > .layui-nav-more:before { |
||||
|
content: '\e61a'; |
||||
|
background-color: transparent; |
||||
|
display: inline-block; |
||||
|
vertical-align: middle; |
||||
|
} |
||||
|
|
||||
|
/**修复左侧菜单字体不对齐的问题*/ |
||||
|
.layuimini-menu-left .layui-nav-item a .fa,.layuimini-menu-left .layui-nav-item a .layui-icon{ |
||||
|
width: 20px; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
PC版样式 |
||||
|
*/ |
||||
|
@media screen and (min-width: 1025px) { |
||||
|
/**头部样式(缩放) */ |
||||
|
.layuimini-mini .layui-layout-left.layuimini-header-menu.layuimini-pc-show { |
||||
|
left: 155px !important; |
||||
|
} |
||||
|
|
||||
|
/**logo演示(缩放) */ |
||||
|
.layuimini-mini .layui-layout-admin .layuimini-logo { |
||||
|
width: 60px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-mini .layui-layout-admin .layuimini-logo h1 { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
/**左侧菜单栏(缩放) */ |
||||
|
.layuimini-mini .layuimini-menu-left { |
||||
|
width: 80px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-mini .layui-side.layui-bg-black, .layuimini-mini .layuimini-menu-left > ul, .layuimini-mini .layuimini-menu-left > ul li i { |
||||
|
width: 60px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-mini .layuimini-menu-left > ul li span:first-child { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
.layuimini-mini .layuimini-menu-left > ul li span:last-child { |
||||
|
float: right; |
||||
|
right: 7px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-mini .layuimini-menu-left .layui-nav .layui-nav-item a { |
||||
|
height: 40px; |
||||
|
line-height: 40px; |
||||
|
padding-right: 0px !important; |
||||
|
} |
||||
|
|
||||
|
/**内容主体(缩放) */ |
||||
|
.layuimini-mini .layui-layout-admin .layui-body { |
||||
|
left: 60px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-mini .layuimini-tool { |
||||
|
left: 95px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-pc-show{ |
||||
|
display: block; |
||||
|
} |
||||
|
.layuimini-mobile-show{ |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
/**菜单缩放*/ |
||||
|
.layuimini-mini .layuimini-menu-left .layui-nav-more,.layuimini-mini .layuimini-menu-left .layui-nav-child{ |
||||
|
display: none;!important; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
手机自适应样式 |
||||
|
*/ |
||||
|
@media screen and (max-width: 1024px) { |
||||
|
|
||||
|
/** |
||||
|
todo 修复低版本IOS不能滑动问题, 但还是有问题, 低版本IOS部分情况下子页面无法自适应 |
||||
|
*/ |
||||
|
.layuimini-tab .layui-tab-content .layui-tab-item { |
||||
|
-webkit-overflow-scrolling: touch; |
||||
|
overflow: scroll; |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
} |
||||
|
|
||||
|
.layuimini-tab .layui-tab-content .layui-tab-item iframe { |
||||
|
height: 100%; |
||||
|
width: 100%; |
||||
|
} |
||||
|
|
||||
|
.layuimini-pc-show{ |
||||
|
display: none; |
||||
|
} |
||||
|
.layuimini-mobile-show{ |
||||
|
display: block; |
||||
|
} |
||||
|
.layuimini-header-content { |
||||
|
left: 0; |
||||
|
} |
||||
|
|
||||
|
.layui-layout-admin .layui-body .layui-tab-item.layui-show { |
||||
|
border-top: 1px solid #e2e2e2; |
||||
|
} |
||||
|
|
||||
|
.layuimini-all .layui-layout-left.layuimini-header-menu { |
||||
|
left: 15px !important |
||||
|
} |
||||
|
|
||||
|
.layuimini-mini .layui-layout-left.layuimini-header-menu { |
||||
|
left: 205px !important |
||||
|
} |
||||
|
|
||||
|
.layui-layout-admin .layui-nav.layui-layout-right > li:not(.layuimini-setting) { |
||||
|
width: 40px !important; |
||||
|
} |
||||
|
|
||||
|
.layui-layout-admin .layui-nav.layui-layout-right > li:not(.layuimini-setting) a { |
||||
|
padding: 0 15px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-all .layui-layout-admin .layui-body { |
||||
|
left: 0px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-mini .layui-layout-admin .layuimini-menu-left, .layuimini-mini .layui-header .layuimini-logo { |
||||
|
left: 0; |
||||
|
transition: left .2s; |
||||
|
z-index: 1001 !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-all .layui-layout-admin .layuimini-menu-left, .layuimini-all .layui-header .layuimini-logo { |
||||
|
left: -200px; |
||||
|
transition: left .2s; |
||||
|
top: 0; |
||||
|
z-index: 1002; |
||||
|
} |
||||
|
|
||||
|
.layuimini-mini .layui-layout-admin .layui-body { |
||||
|
left: 0!important; |
||||
|
transition: left .2s; |
||||
|
top: 0; |
||||
|
z-index: 998; |
||||
|
} |
||||
|
|
||||
|
.layuimini-mini .layuimini-make { |
||||
|
display: block; |
||||
|
} |
||||
|
|
||||
|
.layuimini-multi-module .layuimini-header-content .layuimini-tool { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
.layuimini-single-module .layuimini-header-content .layuimini-tool { |
||||
|
left: 15px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-mini .layuimini-site-mobile { |
||||
|
display: none !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-site-mobile { |
||||
|
display: block !important; |
||||
|
position: fixed; |
||||
|
z-index: 100000; |
||||
|
bottom: 15px; |
||||
|
left: 15px; |
||||
|
width: 40px; |
||||
|
height: 40px; |
||||
|
line-height: 40px; |
||||
|
border-radius: 2px; |
||||
|
text-align: center; |
||||
|
background-color: rgba(0, 0, 0, .7); |
||||
|
color: #fff; |
||||
|
} |
||||
|
|
||||
|
.layuimini-header-content { |
||||
|
z-index: 997; |
||||
|
} |
||||
|
|
||||
|
/*修复UC之类的浏览器点击无效*/ |
||||
|
.layuimini-make { |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
|
||||
|
.layuimini-site-mobile { |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@media screen and (max-width: 550px){ |
||||
|
|
||||
|
/**头部右侧数据*/ |
||||
|
.layuimini-multi-module.layuimini-mini .layuimini-header-content .layui-layout-right { |
||||
|
display: none; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,91 @@ |
|||||
|
body { |
||||
|
margin: 15px 15px 15px 15px; |
||||
|
background: #f2f2f2; |
||||
|
} |
||||
|
|
||||
|
.layuimini-container { |
||||
|
border: 1px solid #f2f2f2; |
||||
|
border-radius: 5px; |
||||
|
background-color: #ffffff |
||||
|
} |
||||
|
|
||||
|
.layuimini-main { |
||||
|
margin: 10px 10px 10px 10px; |
||||
|
} |
||||
|
|
||||
|
/**必填红点 */ |
||||
|
.layuimini-form > .layui-form-item > .required:after { |
||||
|
content: '*'; |
||||
|
color: red; |
||||
|
position: absolute; |
||||
|
margin-left: 4px; |
||||
|
font-weight: bold; |
||||
|
line-height: 1.8em; |
||||
|
top: 6px; |
||||
|
right: 5px; |
||||
|
} |
||||
|
|
||||
|
.layuimini-form > .layui-form-item > .layui-form-label { |
||||
|
width: 120px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-form > .layui-form-item > .layui-input-block { |
||||
|
margin-left: 150px !important; |
||||
|
} |
||||
|
|
||||
|
.layuimini-form > .layui-form-item > .layui-input-block > tip { |
||||
|
display: inline-block; |
||||
|
margin-top: 10px; |
||||
|
line-height: 10px; |
||||
|
font-size: 10px; |
||||
|
color: #a29c9c; |
||||
|
} |
||||
|
|
||||
|
/**搜索框*/ |
||||
|
.layuimini-container .table-search-fieldset { |
||||
|
margin: 0; |
||||
|
border: 1px solid #e6e6e6; |
||||
|
padding: 10px 20px 5px 20px; |
||||
|
color: #6b6b6b; |
||||
|
} |
||||
|
|
||||
|
/**自定义滚动条样式 */ |
||||
|
::-webkit-scrollbar { |
||||
|
width: 6px; |
||||
|
height: 6px |
||||
|
} |
||||
|
|
||||
|
::-webkit-scrollbar-track { |
||||
|
background-color: transparent; |
||||
|
-webkit-border-radius: 2em; |
||||
|
-moz-border-radius: 2em; |
||||
|
border-radius: 2em; |
||||
|
} |
||||
|
|
||||
|
::-webkit-scrollbar-thumb { |
||||
|
background-color: #9c9da0; |
||||
|
-webkit-border-radius: 2em; |
||||
|
-moz-border-radius: 2em; |
||||
|
border-radius: 2em |
||||
|
} |
||||
|
|
||||
|
.my-shadow:hover { |
||||
|
box-shadow: 2px 0 4px rgba(0, 21, 41, .35); |
||||
|
} |
||||
|
|
||||
|
.my-card{ |
||||
|
cursor: pointer; |
||||
|
width: 100%; |
||||
|
display: inline-block; |
||||
|
border-top-left-radius: 4px; |
||||
|
border-top-right-radius: 4px; |
||||
|
} |
||||
|
|
||||
|
.my-time{ |
||||
|
margin-top: 20px; |
||||
|
margin-bottom: 20px; |
||||
|
} |
||||
|
body{ |
||||
|
font-family: 华文楷体; |
||||
|
font-weight: bold; |
||||
|
} |
||||
@ -0,0 +1,95 @@ |
|||||
|
/*头部右侧背景色 headerRightBg */ |
||||
|
.layui-layout-admin .layui-header { |
||||
|
background-color: #ffffff !important; |
||||
|
} |
||||
|
|
||||
|
/*头部右侧选中背景色 headerRightBgThis */ |
||||
|
.layui-layout-admin .layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { |
||||
|
background-color: #e4e4e4 !important; |
||||
|
} |
||||
|
|
||||
|
/*头部右侧字体颜色 headerRightColor */ |
||||
|
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a { |
||||
|
color: rgba(107, 107, 107, 0.7); |
||||
|
} |
||||
|
|
||||
|
/**头部右侧下拉字体颜色 headerRightChildColor */ |
||||
|
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a { |
||||
|
color: rgba(107, 107, 107, 0.7) !important; |
||||
|
} |
||||
|
|
||||
|
/*头部右侧鼠标选中 headerRightColorThis */ |
||||
|
.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, .layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a { |
||||
|
color: #565656 !important; |
||||
|
} |
||||
|
|
||||
|
/*头部右侧更多下拉颜色 headerRightNavMore */ |
||||
|
.layui-header .layui-nav .layui-nav-more { |
||||
|
border-top-color: rgba(160, 160, 160, 0.7) !important; |
||||
|
} |
||||
|
|
||||
|
/*头部右侧更多下拉颜色 headerRightNavMore */ |
||||
|
.layui-header .layui-nav .layui-nav-mored, .layui-header .layui-nav-itemed > a .layui-nav-more { |
||||
|
border-color: transparent transparent rgba(160, 160, 160, 0.7) !important; |
||||
|
} |
||||
|
|
||||
|
/**头部右侧更多下拉配置色 headerRightNavMoreBg headerRightNavMoreColor */ |
||||
|
.layui-header .layui-nav .layui-nav-child dd.layui-this a, .layui-header .layui-nav-child dd.layui-this, .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a { |
||||
|
background-color: #1E9FFF !important; |
||||
|
color: #ffffff !important; |
||||
|
} |
||||
|
|
||||
|
/*头部缩放按钮样式 headerRightToolColor */ |
||||
|
.layui-layout-admin .layui-header .layuimini-tool i { |
||||
|
color: #565656; |
||||
|
} |
||||
|
|
||||
|
/*logo背景颜色 headerLogoBg */ |
||||
|
.layui-layout-admin .layuimini-logo { |
||||
|
background-color: #192027 !important; |
||||
|
} |
||||
|
|
||||
|
/*logo字体颜色 headerLogoColor */ |
||||
|
.layui-layout-admin .layuimini-logo h1 { |
||||
|
color: rgb(191, 187, 187); |
||||
|
} |
||||
|
|
||||
|
/*左侧菜单更多下拉样式 leftMenuNavMore */ |
||||
|
.layuimini-menu-left .layui-nav .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-more { |
||||
|
border-top-color: rgb(191, 187, 187); |
||||
|
} |
||||
|
|
||||
|
/*左侧菜单更多下拉样式 leftMenuNavMore */ |
||||
|
.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more { |
||||
|
border-color: transparent transparent rgb(191, 187, 187) !important; |
||||
|
} |
||||
|
|
||||
|
/*左侧菜单背景 leftMenuBg */ |
||||
|
.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul, .layuimini-menu-left-zoom > ul { |
||||
|
background-color: #28333E !important; |
||||
|
} |
||||
|
|
||||
|
/*左侧菜单选中背景 leftMenuBgThis */ |
||||
|
.layuimini-menu-left .layui-nav-tree .layui-this, .layuimini-menu-left .layui-nav-tree .layui-this > a, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, .layuimini-menu-left-zoom.layui-nav-tree .layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a { |
||||
|
background-color: #1E9FFF !important |
||||
|
} |
||||
|
|
||||
|
/*左侧菜单子菜单背景 leftMenuChildBg */ |
||||
|
.layuimini-menu-left .layui-nav-itemed > .layui-nav-child { |
||||
|
background-color: #0c0f13 !important; |
||||
|
} |
||||
|
|
||||
|
/*左侧菜单字体颜色 leftMenuColor */ |
||||
|
.layuimini-menu-left .layui-nav .layui-nav-item a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a { |
||||
|
color: rgb(191, 187, 187) !important; |
||||
|
} |
||||
|
|
||||
|
/*左侧菜单选中字体颜色 leftMenuColorThis */ |
||||
|
.layuimini-menu-left .layui-nav .layui-nav-item a:hover, .layuimini-menu-left .layui-nav .layui-this a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, .layuimini-menu-left-zoom.layui-nav .layui-this a { |
||||
|
color: #ffffff !important; |
||||
|
} |
||||
|
|
||||
|
/**tab选项卡选中颜色 tabActiveColor */ |
||||
|
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active { |
||||
|
background-color: #1e9fff; |
||||
|
} |
||||
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 146 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 671 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 119 KiB |
@ -0,0 +1,52 @@ |
|||||
|
var cookieUtil={ |
||||
|
createCookie:function (name,value,days){ |
||||
|
var expires=""; |
||||
|
if (days){ |
||||
|
var date=new Date(); |
||||
|
date.setTime(date.getTime()+(days*14*24*3600*1000)); |
||||
|
expires=";expires="+date.toGMTString(); |
||||
|
} |
||||
|
document.cookie=name+"="+value+expires+";path=/"; |
||||
|
}, |
||||
|
/*设置cookie*/ |
||||
|
set:function(name,value,expires,path,domain,secure){ |
||||
|
var cookie=encodeURIComponent(name)+"="+encodeURIComponent(value); |
||||
|
if(expires instanceof Date){ |
||||
|
cookie+="; expires="+expires.toGMTString(); |
||||
|
}else{ |
||||
|
var date=new Date(); |
||||
|
date.setTime(date.getTime()+expires*24*3600*1000); |
||||
|
cookie+="; expires="+date.toGMTString(); |
||||
|
} |
||||
|
if(path){ |
||||
|
cookie+="; path="+path; |
||||
|
} |
||||
|
if(domain){ |
||||
|
cookie+="; domain="+domain; |
||||
|
} |
||||
|
if (secure) { |
||||
|
cookie+="; "+secure; |
||||
|
} |
||||
|
document.cookie=cookie; |
||||
|
}, |
||||
|
/*获取cookie*/ |
||||
|
get:function(name){ |
||||
|
var cookieName=encodeURIComponent(name); |
||||
|
/*正则表达式获取cookie*/ |
||||
|
var restr="(^| )"+cookieName+"=([^;]*)(;|$)"; |
||||
|
var reg=new RegExp(restr); |
||||
|
var cookieValue=document.cookie.match(reg)[2]; |
||||
|
/*字符串截取cookie*/ |
||||
|
/*var cookieStart=document.cookie.indexOf(cookieName+“=”); |
||||
|
var cookieValue=null; |
||||
|
if(cookieStart>-1){ |
||||
|
var cookieEnd=document.cookie.indexOf(";",cookieStart); |
||||
|
if(cookieEnd==-1){ |
||||
|
cookieEnd=document.cookie.length; |
||||
|
} |
||||
|
cookieValue=decodeURIComponent(document.cookie.substring(cookieStart |
||||
|
+cookieName.length,cookieEnd)); |
||||
|
}*/ |
||||
|
return cookieValue; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,31 @@ |
|||||
|
/** |
||||
|
* date:2019/08/16 |
||||
|
* author:Mr.Chung |
||||
|
* description:此处放layui自定义扩展 |
||||
|
* version:2.0.4 |
||||
|
*/ |
||||
|
|
||||
|
window.rootPath = (function (src) { |
||||
|
src = document.scripts[document.scripts.length - 1].src; |
||||
|
return src.substring(0, src.lastIndexOf("/") + 1); |
||||
|
})(); |
||||
|
|
||||
|
layui.config({ |
||||
|
base: rootPath + "lay-module/", |
||||
|
version: true |
||||
|
}).extend({ |
||||
|
miniAdmin: "layuimini/miniAdmin", // layuimini后台扩展
|
||||
|
miniMenu: "layuimini/miniMenu", // layuimini菜单扩展
|
||||
|
miniTab: "layuimini/miniTab", // layuimini tab扩展
|
||||
|
miniTheme: "layuimini/miniTheme", // layuimini 主题扩展
|
||||
|
miniTongji: "layuimini/miniTongji", // layuimini 统计扩展
|
||||
|
step: 'step-lay/step', // 分步表单扩展
|
||||
|
treetable: 'treetable-lay/treetable', //table树形扩展
|
||||
|
tableSelect: 'tableSelect/tableSelect', // table选择扩展
|
||||
|
iconPickerFa: 'iconPicker/iconPickerFa', // fa图标选择扩展
|
||||
|
echarts: 'echarts/echarts', // echarts图表扩展
|
||||
|
echartsTheme: 'echarts/echartsTheme', // echarts图表主题扩展
|
||||
|
wangEditor: 'wangEditor/wangEditor', // wangEditor富文本扩展
|
||||
|
layarea: 'layarea/layarea', // 省市县区三级联动下拉选择器
|
||||
|
cardTable: 'cardTable/cardTable' //卡片表格拓展
|
||||
|
}); |
||||
@ -0,0 +1,92 @@ |
|||||
|
.project-list-item { |
||||
|
background-color: #fff; |
||||
|
border-radius: 4px; |
||||
|
cursor: pointer; |
||||
|
transition: all .2s; |
||||
|
} |
||||
|
|
||||
|
.project-list-item:hover { |
||||
|
box-shadow: 2px 0 4px rgba(0, 21, 41, .35); |
||||
|
} |
||||
|
|
||||
|
.project-list-item .project-list-item-cover { |
||||
|
width: 100%; |
||||
|
height: 180px; |
||||
|
display: block; |
||||
|
border-top-left-radius: 4px; |
||||
|
border-top-right-radius: 4px; |
||||
|
} |
||||
|
|
||||
|
.project-list-item-body { |
||||
|
padding: 20px; |
||||
|
border: 1px solid #e8e8e8; |
||||
|
} |
||||
|
|
||||
|
.project-list-item .project-list-item-body>h2 { |
||||
|
font-size: 16px; |
||||
|
color: #333; |
||||
|
margin-bottom: 12px; |
||||
|
} |
||||
|
|
||||
|
.project-list-item .project-list-item-text { |
||||
|
height: 40px; |
||||
|
overflow: hidden; |
||||
|
margin-bottom: 12px; |
||||
|
} |
||||
|
|
||||
|
.project-list-item .project-list-item-desc { |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
.project-list-item .project-list-item-desc .time { |
||||
|
color: #999; |
||||
|
font-size: 12px; |
||||
|
} |
||||
|
|
||||
|
.project-list-item .project-list-item-desc .ew-head-list { |
||||
|
position: absolute; |
||||
|
right: 0; |
||||
|
top: 0; |
||||
|
} |
||||
|
|
||||
|
.ew-head-list .ew-head-list-item:first-child { |
||||
|
margin-left: 0; |
||||
|
} |
||||
|
|
||||
|
.ew-head-list .ew-head-list-item { |
||||
|
width: 22px; |
||||
|
height: 22px; |
||||
|
border-radius: 50%; |
||||
|
border: 1px solid #fff; |
||||
|
margin-left: -10px; |
||||
|
} |
||||
|
|
||||
|
.ew-head-list .ew-head-list-item { |
||||
|
width: 22px; |
||||
|
height: 22px; |
||||
|
border-radius: 50%; |
||||
|
border: 1px solid #fff; |
||||
|
margin-left: -10px; |
||||
|
} |
||||
|
|
||||
|
.cloud-card-component { |
||||
|
padding: 20px; |
||||
|
} |
||||
|
|
||||
|
.cloud-card-component .layui-laypage .layui-laypage-curr .layui-laypage-em { |
||||
|
border-radius: 0px !important; |
||||
|
} |
||||
|
.ew-table-loading { |
||||
|
padding: 10px 0; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.ew-table-loading > i { |
||||
|
color: #999; |
||||
|
font-size: 30px; |
||||
|
} |
||||
|
.ew-table-loading.ew-loading-float { |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
} |
||||
@ -0,0 +1,247 @@ |
|||||
|
layui.define(['table', 'laypage','jquery', 'element'], function(exports) { |
||||
|
"use strict"; |
||||
|
var filePath = layui.cache.modules.cardTable |
||||
|
.substr(0, layui.cache.modules.cardTable.lastIndexOf('/')); |
||||
|
// 引入tablePlug.css
|
||||
|
layui.link(filePath + '/cardTable.css'); |
||||
|
var MOD_NAME = 'cardTable', |
||||
|
$ = layui.jquery, |
||||
|
element = layui.element, |
||||
|
laypage = layui.laypage; |
||||
|
var _instances = {}; // 记录所有实例
|
||||
|
/* 默认参数 */ |
||||
|
var defaultOption = { |
||||
|
elem: "#currentTableId",// 构建的模型
|
||||
|
url: "",// 数据 url 连接
|
||||
|
loading: true,//是否加载
|
||||
|
limit: 0, //每页数量默认是每行数量的双倍
|
||||
|
linenum: 4, //每行数量 2,3,4,6
|
||||
|
currentPage: 1,//当前页
|
||||
|
data:[], //静态数据
|
||||
|
limits:[], //页码
|
||||
|
page: true, //是否分页
|
||||
|
layout: ['count', 'prev', 'page', 'next','limit', 'skip'],//分页控件
|
||||
|
request: { |
||||
|
pageName: 'page' //页码的参数名称,默认:page
|
||||
|
, limitName: 'limit' //每页数据量的参数名,默认:limit
|
||||
|
, idName: 'id' //主键名称,默认:id
|
||||
|
, titleName: 'title' //标题名称,默认:title
|
||||
|
, imageName: 'image' //图片地址,默认:image
|
||||
|
, remarkName: 'remark' //备注名称,默认:remark
|
||||
|
, timeName: 'time' //时间名称,默认:time
|
||||
|
}, |
||||
|
response: { |
||||
|
statusName: 'code' //规定数据状态的字段名称,默认:code
|
||||
|
, statusCode: 0 //规定成功的状态码,默认:0
|
||||
|
, msgName: 'msg' //规定状态信息的字段名称,默认:msg
|
||||
|
, countName: 'count' //规定数据总数的字段名称,默认:count
|
||||
|
, dataName: 'data' //规定数据列表的字段名称,默认:data
|
||||
|
}, |
||||
|
// 完 成 函 数
|
||||
|
done: function () { |
||||
|
|
||||
|
} |
||||
|
}; |
||||
|
var card = function(opt) { |
||||
|
_instances[opt.elem.substring(1)] = this; |
||||
|
this.reload(opt); |
||||
|
}; |
||||
|
/** 参数设置 */ |
||||
|
card.prototype.initOptions = function (opt) { |
||||
|
this.option = $.extend(true, {}, defaultOption, opt); |
||||
|
if (!this.option.limit || this.option.limit == 0) { |
||||
|
this.option.limit = this.option.linenum * 2; |
||||
|
} |
||||
|
if (!this.option.limits || this.option.limits.length == 0) { |
||||
|
this.option.limits = [this.option.limit]; |
||||
|
} |
||||
|
}; |
||||
|
card.prototype.init = function () { |
||||
|
var option = this.option; |
||||
|
var url = option.url; |
||||
|
var html = ""; |
||||
|
html += option.loading == true ? ' <div class="ew-table-loading">' : ' <div class="ew-table-loading layui-hide">'; |
||||
|
html += ' <i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop"></i>'; |
||||
|
html += ' </div>'; |
||||
|
$(option.elem).html(html); |
||||
|
// 根 据 请 求 方 式 获 取 数 据
|
||||
|
html = ""; |
||||
|
if (!!url) { |
||||
|
if (url.indexOf("?") >= 0) { |
||||
|
url = url + '&v=1.0.0'; |
||||
|
} |
||||
|
else { |
||||
|
url = url + '?v=1.0.0'; |
||||
|
} |
||||
|
if (!!option.page) { |
||||
|
url = url + '&' + option.request.limitName + '=' + option.limit; |
||||
|
url = url + '&' + option.request.pageName + '=' + option.currentPage; |
||||
|
} |
||||
|
if (!!option.where) { |
||||
|
for (let key in option.where) { |
||||
|
url = url + '&' + key + '=' + option.where[key]; |
||||
|
} |
||||
|
} |
||||
|
var data = getData(url); |
||||
|
data = initData(data, option); |
||||
|
if (data.code != option.response.statusCode) { |
||||
|
option.data = []; |
||||
|
option.count = 0; |
||||
|
} else { |
||||
|
option.data = data.data; |
||||
|
option.count = option.data.length; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
else { |
||||
|
if (!option.alldata) { |
||||
|
option.alldata = option.data; |
||||
|
} |
||||
|
if (option.page) { |
||||
|
var data = []; |
||||
|
option.count = option.alldata.length; |
||||
|
for (var i = (option.currentPage - 1) * option.limit; i < option.currentPage * option.limit && i<option.alldata.length; i++) { |
||||
|
data.push(option.alldata[i]); |
||||
|
} |
||||
|
option.data = data; |
||||
|
} |
||||
|
} |
||||
|
// 根据结果进行相应结构的创建
|
||||
|
if (!!option.data && option.data.length > 0) { |
||||
|
html = createComponent(option.elem.substring(1), option.linenum, option.data); |
||||
|
html += "<div id='cardpage'></div>"; |
||||
|
} |
||||
|
else { |
||||
|
html = "<p>没有数据</p>"; |
||||
|
} |
||||
|
$(option.elem).html(html); |
||||
|
if (option.page) { |
||||
|
// 初始化分页组件
|
||||
|
laypage.render({ |
||||
|
elem: 'cardpage' |
||||
|
, count: option.count, limit: option.limit, limits: option.limits, curr: option.currentPage |
||||
|
, layout: option.layout |
||||
|
, jump: function (obj, first) { |
||||
|
option.limit = obj.limit; |
||||
|
option.currentPage = obj.curr; |
||||
|
if (!first) { |
||||
|
_instances[option.elem.substring(1)].reload(option); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
card.prototype.reload = function (opt) { |
||||
|
this.initOptions(this.option ? $.extend(true, this.option, opt) : opt); |
||||
|
this.init(); // 初始化表格
|
||||
|
} |
||||
|
|
||||
|
function createComponent(elem,linenum,data) { |
||||
|
var html = "<div class='cloud-card-component'>" |
||||
|
var content = createCards(elem, linenum,data); |
||||
|
var page = ""; |
||||
|
content = content + page; |
||||
|
html += content + "</div>" |
||||
|
return html; |
||||
|
} |
||||
|
/** 创建指定数量的卡片 */ |
||||
|
function createCards(elem, linenum,data) { |
||||
|
var content = "<div class='layui-row layui-col-space30'>"; |
||||
|
for (var i = 0; i < data.length; i++) { |
||||
|
content += createCard(elem, linenum,data[i],i); |
||||
|
} |
||||
|
content += "</div>"; |
||||
|
return content; |
||||
|
} |
||||
|
/** 创建一个卡片 */ |
||||
|
function createCard(elem, linenum, item, no) { |
||||
|
var line = 12 / linenum; |
||||
|
var card = |
||||
|
'<div id=' + item.id + ' onclick="cardTableCheckedCard(' + elem + ',this)" class="layui-col-md' + line + ' ew-datagrid-item" data-index="' + no+'" data-number="1"> <div class="project-list-item"> <img class="project-list-item-cover" src="' +item.image + '"> <div class="project-list-item-body"> <h2>' + item.title + '</h2> <div class="project-list-item-text layui-text">' + item.remark + '</div> <div class="project-list-item-desc"> <span class="time">' +item.time + '</span> <div class="ew-head-list"></div> </div> </div > </div > </div > ' |
||||
|
return card; |
||||
|
} |
||||
|
/** 格式化返回参数 */ |
||||
|
function initData(tempData, option) { |
||||
|
var data = {}; |
||||
|
data.code = tempData[option.response.statusName]; |
||||
|
data.msg = tempData[option.response.msgName]; |
||||
|
data.count = tempData[option.response.countName]; |
||||
|
var dataList = tempData[option.response.dataName]; |
||||
|
data.data = []; |
||||
|
for (var i = 0; i < dataList.length; i++) { |
||||
|
var item = {}; |
||||
|
item.id = dataList[i][option.request.idName]; |
||||
|
item.image = dataList[i][option.request.imageName]; |
||||
|
item.title = dataList[i][option.request.titleName]; |
||||
|
item.remark = dataList[i][option.request.remarkName]; |
||||
|
item.time = dataList[i][option.request.timeName]; |
||||
|
data.data.push(item); |
||||
|
} |
||||
|
return data; |
||||
|
} |
||||
|
/** 同 步 请 求 获 取 数 据 */ |
||||
|
function getData(url) { |
||||
|
$.ajaxSettings.async = false; |
||||
|
var redata = null; |
||||
|
$.getJSON(url, function (data) { |
||||
|
redata = data; |
||||
|
}).fail(function () { |
||||
|
redata = null; |
||||
|
}); |
||||
|
return redata; |
||||
|
} |
||||
|
//卡片点击事件
|
||||
|
window.cardTableCheckedCard = function (elem,obj) { |
||||
|
$(obj).addClass('layui-table-click').siblings().removeClass('layui-table-click'); |
||||
|
var item = {}; |
||||
|
item.id = obj.id; |
||||
|
item.image = $(obj).find('.project-list-item-cover')[0].src; |
||||
|
item.title = $(obj).find('h2')[0].innerHTML; |
||||
|
item.remark = $(obj).find('.project-list-item-text')[0].innerHTML; |
||||
|
item.time = $(obj).find('.time')[0].innerHTML; |
||||
|
_instances[elem.id].option.checkedItem = item; |
||||
|
} |
||||
|
/** 对外提供的方法 */ |
||||
|
var tt = { |
||||
|
/* 渲染 */ |
||||
|
render: function (options) { |
||||
|
return new card(options); |
||||
|
}, |
||||
|
/* 重载 */ |
||||
|
reload: function (id, opt) { |
||||
|
_instances[id].option.checkedItem = null; |
||||
|
_instances[id].reload(opt); |
||||
|
}, |
||||
|
/* 获取选中数据 */ |
||||
|
getChecked: function (id) { |
||||
|
var option = _instances[id].option; |
||||
|
var data = option.checkedItem; |
||||
|
var item = {}; |
||||
|
if (!data) { |
||||
|
return null; |
||||
|
} |
||||
|
item[option.request.idName] = data.id; |
||||
|
item[option.request.imageName] = data.image; |
||||
|
item[option.request.titleName] = data.title; |
||||
|
item[option.request.remarkName] = data.remark; |
||||
|
item[option.request.timeName] = data.time; |
||||
|
return item; |
||||
|
}, |
||||
|
/* 获取表格数据 */ |
||||
|
getAllData: function (id) { |
||||
|
var option = _instances[id].option; |
||||
|
var data = []; |
||||
|
for (var i = 0; i < option.data.length; i++) { |
||||
|
var item = {}; |
||||
|
item[option.request.idName] = option.data[i].id; |
||||
|
item[option.request.imageName] = option.data[i].image; |
||||
|
item[option.request.titleName] = option.data[i].title; |
||||
|
item[option.request.remarkName] = option.data[i].remark; |
||||
|
item[option.request.timeName] = option.data[i].time; |
||||
|
data.push(item); |
||||
|
} |
||||
|
return data; |
||||
|
}, |
||||
|
} |
||||
|
exports(MOD_NAME, tt); |
||||
|
}) |
||||
@ -0,0 +1,492 @@ |
|||||
|
layui.define(function(exports) { |
||||
|
exports('echartsTheme', |
||||
|
{ |
||||
|
"color": [ |
||||
|
"#3fb1e3", |
||||
|
"#6be6c1", |
||||
|
"#626c91", |
||||
|
"#a0a7e6", |
||||
|
"#c4ebad", |
||||
|
"#96dee8" |
||||
|
], |
||||
|
"backgroundColor": "rgba(252,252,252,0)", |
||||
|
"textStyle": {}, |
||||
|
"title": { |
||||
|
"textStyle": { |
||||
|
"color": "#666666" |
||||
|
}, |
||||
|
"subtextStyle": { |
||||
|
"color": "#999999" |
||||
|
} |
||||
|
}, |
||||
|
"line": { |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"borderWidth": "3" |
||||
|
} |
||||
|
}, |
||||
|
"lineStyle": { |
||||
|
"normal": { |
||||
|
"width": "4" |
||||
|
} |
||||
|
}, |
||||
|
"symbolSize": "10", |
||||
|
"symbol": "emptyCircle", |
||||
|
"smooth": true |
||||
|
}, |
||||
|
"radar": { |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"borderWidth": "3" |
||||
|
} |
||||
|
}, |
||||
|
"lineStyle": { |
||||
|
"normal": { |
||||
|
"width": "4" |
||||
|
} |
||||
|
}, |
||||
|
"symbolSize": "10", |
||||
|
"symbol": "emptyCircle", |
||||
|
"smooth": true |
||||
|
}, |
||||
|
"bar": { |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"barBorderWidth": 0, |
||||
|
"barBorderColor": "#ccc" |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"barBorderWidth": 0, |
||||
|
"barBorderColor": "#ccc" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"pie": { |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"scatter": { |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"boxplot": { |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"parallel": { |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"sankey": { |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"funnel": { |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"gauge": { |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"candlestick": { |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"color": "#e6a0d2", |
||||
|
"color0": "transparent", |
||||
|
"borderColor": "#e6a0d2", |
||||
|
"borderColor0": "#3fb1e3", |
||||
|
"borderWidth": "2" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"graph": { |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"borderWidth": 0, |
||||
|
"borderColor": "#ccc" |
||||
|
} |
||||
|
}, |
||||
|
"lineStyle": { |
||||
|
"normal": { |
||||
|
"width": "1", |
||||
|
"color": "#cccccc" |
||||
|
} |
||||
|
}, |
||||
|
"symbolSize": "10", |
||||
|
"symbol": "emptyCircle", |
||||
|
"smooth": true, |
||||
|
"color": [ |
||||
|
"#3fb1e3", |
||||
|
"#6be6c1", |
||||
|
"#626c91", |
||||
|
"#a0a7e6", |
||||
|
"#c4ebad", |
||||
|
"#96dee8" |
||||
|
], |
||||
|
"label": { |
||||
|
"normal": { |
||||
|
"textStyle": { |
||||
|
"color": "#ffffff" |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"map": { |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"areaColor": "#eeeeee", |
||||
|
"borderColor": "#aaaaaa", |
||||
|
"borderWidth": 0.5 |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"areaColor": "rgba(63,177,227,0.25)", |
||||
|
"borderColor": "#3fb1e3", |
||||
|
"borderWidth": 1 |
||||
|
} |
||||
|
}, |
||||
|
"label": { |
||||
|
"normal": { |
||||
|
"textStyle": { |
||||
|
"color": "#ffffff" |
||||
|
} |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"textStyle": { |
||||
|
"color": "rgb(63,177,227)" |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"geo": { |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"areaColor": "#eeeeee", |
||||
|
"borderColor": "#aaaaaa", |
||||
|
"borderWidth": 0.5 |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"areaColor": "rgba(63,177,227,0.25)", |
||||
|
"borderColor": "#3fb1e3", |
||||
|
"borderWidth": 1 |
||||
|
} |
||||
|
}, |
||||
|
"label": { |
||||
|
"normal": { |
||||
|
"textStyle": { |
||||
|
"color": "#ffffff" |
||||
|
} |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"textStyle": { |
||||
|
"color": "rgb(63,177,227)" |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"categoryAxis": { |
||||
|
"axisLine": { |
||||
|
"show": true, |
||||
|
"lineStyle": { |
||||
|
"color": "#cccccc" |
||||
|
} |
||||
|
}, |
||||
|
"axisTick": { |
||||
|
"show": false, |
||||
|
"lineStyle": { |
||||
|
"color": "#333" |
||||
|
} |
||||
|
}, |
||||
|
"axisLabel": { |
||||
|
"show": true, |
||||
|
"textStyle": { |
||||
|
"color": "#999999" |
||||
|
} |
||||
|
}, |
||||
|
"splitLine": { |
||||
|
"show": true, |
||||
|
"lineStyle": { |
||||
|
"color": [ |
||||
|
"#eeeeee" |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
"splitArea": { |
||||
|
"show": false, |
||||
|
"areaStyle": { |
||||
|
"color": [ |
||||
|
"rgba(250,250,250,0.05)", |
||||
|
"rgba(200,200,200,0.02)" |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"valueAxis": { |
||||
|
"axisLine": { |
||||
|
"show": true, |
||||
|
"lineStyle": { |
||||
|
"color": "#cccccc" |
||||
|
} |
||||
|
}, |
||||
|
"axisTick": { |
||||
|
"show": false, |
||||
|
"lineStyle": { |
||||
|
"color": "#333" |
||||
|
} |
||||
|
}, |
||||
|
"axisLabel": { |
||||
|
"show": true, |
||||
|
"textStyle": { |
||||
|
"color": "#999999" |
||||
|
} |
||||
|
}, |
||||
|
"splitLine": { |
||||
|
"show": true, |
||||
|
"lineStyle": { |
||||
|
"color": [ |
||||
|
"#eeeeee" |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
"splitArea": { |
||||
|
"show": false, |
||||
|
"areaStyle": { |
||||
|
"color": [ |
||||
|
"rgba(250,250,250,0.05)", |
||||
|
"rgba(200,200,200,0.02)" |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"logAxis": { |
||||
|
"axisLine": { |
||||
|
"show": true, |
||||
|
"lineStyle": { |
||||
|
"color": "#cccccc" |
||||
|
} |
||||
|
}, |
||||
|
"axisTick": { |
||||
|
"show": false, |
||||
|
"lineStyle": { |
||||
|
"color": "#333" |
||||
|
} |
||||
|
}, |
||||
|
"axisLabel": { |
||||
|
"show": true, |
||||
|
"textStyle": { |
||||
|
"color": "#999999" |
||||
|
} |
||||
|
}, |
||||
|
"splitLine": { |
||||
|
"show": true, |
||||
|
"lineStyle": { |
||||
|
"color": [ |
||||
|
"#eeeeee" |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
"splitArea": { |
||||
|
"show": false, |
||||
|
"areaStyle": { |
||||
|
"color": [ |
||||
|
"rgba(250,250,250,0.05)", |
||||
|
"rgba(200,200,200,0.02)" |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"timeAxis": { |
||||
|
"axisLine": { |
||||
|
"show": true, |
||||
|
"lineStyle": { |
||||
|
"color": "#cccccc" |
||||
|
} |
||||
|
}, |
||||
|
"axisTick": { |
||||
|
"show": false, |
||||
|
"lineStyle": { |
||||
|
"color": "#333" |
||||
|
} |
||||
|
}, |
||||
|
"axisLabel": { |
||||
|
"show": true, |
||||
|
"textStyle": { |
||||
|
"color": "#999999" |
||||
|
} |
||||
|
}, |
||||
|
"splitLine": { |
||||
|
"show": true, |
||||
|
"lineStyle": { |
||||
|
"color": [ |
||||
|
"#eeeeee" |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
"splitArea": { |
||||
|
"show": false, |
||||
|
"areaStyle": { |
||||
|
"color": [ |
||||
|
"rgba(250,250,250,0.05)", |
||||
|
"rgba(200,200,200,0.02)" |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"toolbox": { |
||||
|
"iconStyle": { |
||||
|
"normal": { |
||||
|
"borderColor": "#999999" |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"borderColor": "#666666" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"legend": { |
||||
|
"textStyle": { |
||||
|
"color": "#999999" |
||||
|
} |
||||
|
}, |
||||
|
"tooltip": { |
||||
|
"axisPointer": { |
||||
|
"lineStyle": { |
||||
|
"color": "#cccccc", |
||||
|
"width": 1 |
||||
|
}, |
||||
|
"crossStyle": { |
||||
|
"color": "#cccccc", |
||||
|
"width": 1 |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"timeline": { |
||||
|
"lineStyle": { |
||||
|
"color": "#626c91", |
||||
|
"width": 1 |
||||
|
}, |
||||
|
"itemStyle": { |
||||
|
"normal": { |
||||
|
"color": "#626c91", |
||||
|
"borderWidth": 1 |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"color": "#626c91" |
||||
|
} |
||||
|
}, |
||||
|
"controlStyle": { |
||||
|
"normal": { |
||||
|
"color": "#626c91", |
||||
|
"borderColor": "#626c91", |
||||
|
"borderWidth": 0.5 |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"color": "#626c91", |
||||
|
"borderColor": "#626c91", |
||||
|
"borderWidth": 0.5 |
||||
|
} |
||||
|
}, |
||||
|
"checkpointStyle": { |
||||
|
"color": "#3fb1e3", |
||||
|
"borderColor": "rgba(63,177,227,0.15)" |
||||
|
}, |
||||
|
"label": { |
||||
|
"normal": { |
||||
|
"textStyle": { |
||||
|
"color": "#626c91" |
||||
|
} |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"textStyle": { |
||||
|
"color": "#626c91" |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"visualMap": { |
||||
|
"color": [ |
||||
|
"#2a99c9", |
||||
|
"#afe8ff" |
||||
|
] |
||||
|
}, |
||||
|
"dataZoom": { |
||||
|
"backgroundColor": "rgba(255,255,255,0)", |
||||
|
"dataBackgroundColor": "rgba(222,222,222,1)", |
||||
|
"fillerColor": "rgba(114,230,212,0.25)", |
||||
|
"handleColor": "#cccccc", |
||||
|
"handleSize": "100%", |
||||
|
"textStyle": { |
||||
|
"color": "#999999" |
||||
|
} |
||||
|
}, |
||||
|
"markPoint": { |
||||
|
"label": { |
||||
|
"normal": { |
||||
|
"textStyle": { |
||||
|
"color": "#ffffff" |
||||
|
} |
||||
|
}, |
||||
|
"emphasis": { |
||||
|
"textStyle": { |
||||
|
"color": "#ffffff" |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
@ -0,0 +1,399 @@ |
|||||
|
/** |
||||
|
* fa图标选择器 根据开源项目https://gitee.com/wujiawei0926/iconpicker修改而来
|
||||
|
* @author wujiawei0926@yeah.net chung@99php.cn |
||||
|
* @version 1.1 |
||||
|
*/ |
||||
|
|
||||
|
layui.define(['laypage', 'form'], function (exports) { |
||||
|
"use strict"; |
||||
|
|
||||
|
var IconPicker = function () { |
||||
|
this.v = '1.1'; |
||||
|
}, _MOD = 'iconPickerFa', |
||||
|
_this = this, |
||||
|
$ = layui.jquery, |
||||
|
laypage = layui.laypage, |
||||
|
form = layui.form, |
||||
|
BODY = 'body', |
||||
|
TIPS = '请选择图标'; |
||||
|
|
||||
|
/** |
||||
|
* 渲染组件 |
||||
|
*/ |
||||
|
IconPicker.prototype.render = function (options) { |
||||
|
var opts = options, |
||||
|
// DOM选择器
|
||||
|
elem = opts.elem, |
||||
|
// 数据类型:fontClass/unicode
|
||||
|
url = opts.url, |
||||
|
// 是否分页:true/false
|
||||
|
page = opts.page == null ? true : opts.page, |
||||
|
// 每页显示数量
|
||||
|
limit = opts.limit == null ? 12 : opts.limit, |
||||
|
// 是否开启搜索:true/false
|
||||
|
search = opts.search == null ? true : opts.search, |
||||
|
// 每个图标格子的宽度:'43px'或'20%'
|
||||
|
cellWidth = opts.cellWidth, |
||||
|
// 点击回调
|
||||
|
click = opts.click, |
||||
|
// 渲染成功后的回调
|
||||
|
success = opts.success, |
||||
|
// json数据
|
||||
|
data = {}, |
||||
|
// 唯一标识
|
||||
|
tmp = new Date().getTime(), |
||||
|
// 初始化时input的值
|
||||
|
ORIGINAL_ELEM_VALUE = $(elem).val(), |
||||
|
TITLE = 'layui-select-title', |
||||
|
TITLE_ID = 'layui-select-title-' + tmp, |
||||
|
ICON_BODY = 'layui-iconpicker-' + tmp, |
||||
|
PICKER_BODY = 'layui-iconpicker-body-' + tmp, |
||||
|
PAGE_ID = 'layui-iconpicker-page-' + tmp, |
||||
|
LIST_BOX = 'layui-iconpicker-list-box', |
||||
|
selected = 'layui-form-selected', |
||||
|
unselect = 'layui-unselect'; |
||||
|
|
||||
|
var a = { |
||||
|
init: function () { |
||||
|
data = common.getData(url); |
||||
|
|
||||
|
a.hideElem().createSelect().createBody().toggleSelect(); |
||||
|
a.preventEvent().inputListen(); |
||||
|
common.loadCss(); |
||||
|
|
||||
|
if (success) { |
||||
|
success(this.successHandle()); |
||||
|
} |
||||
|
|
||||
|
return a; |
||||
|
}, |
||||
|
successHandle: function () { |
||||
|
var d = { |
||||
|
options: opts, |
||||
|
data: data, |
||||
|
id: tmp, |
||||
|
elem: $('#' + ICON_BODY) |
||||
|
}; |
||||
|
return d; |
||||
|
}, |
||||
|
/** |
||||
|
* 隐藏elem |
||||
|
*/ |
||||
|
hideElem: function () { |
||||
|
$(elem).hide(); |
||||
|
return a; |
||||
|
}, |
||||
|
/** |
||||
|
* 绘制select下拉选择框 |
||||
|
*/ |
||||
|
createSelect: function () { |
||||
|
var oriIcon = '<i class="fa">'; |
||||
|
|
||||
|
// 默认图标
|
||||
|
if (ORIGINAL_ELEM_VALUE === '') { |
||||
|
ORIGINAL_ELEM_VALUE = 'fa-adjust'; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
oriIcon = '<i class="fa ' + ORIGINAL_ELEM_VALUE + '">'; |
||||
|
|
||||
|
oriIcon += '</i>'; |
||||
|
|
||||
|
var selectHtml = '<div class="layui-iconpicker layui-unselect layui-form-select" id="' + ICON_BODY + '">' + |
||||
|
'<div class="' + TITLE + '" id="' + TITLE_ID + '">' + |
||||
|
'<div class="layui-iconpicker-item">' + |
||||
|
'<span class="layui-iconpicker-icon layui-unselect">' + |
||||
|
oriIcon + |
||||
|
'</span>' + |
||||
|
'<i class="layui-edge"></i>' + |
||||
|
'</div>' + |
||||
|
'</div>' + |
||||
|
'<div class="layui-anim layui-anim-upbit" style="">' + |
||||
|
'123' + |
||||
|
'</div>'; |
||||
|
$(elem).after(selectHtml); |
||||
|
return a; |
||||
|
}, |
||||
|
/** |
||||
|
* 展开/折叠下拉框 |
||||
|
*/ |
||||
|
toggleSelect: function () { |
||||
|
var item = '#' + TITLE_ID + ' .layui-iconpicker-item,#' + TITLE_ID + ' .layui-iconpicker-item .layui-edge'; |
||||
|
a.event('click', item, function (e) { |
||||
|
var $icon = $('#' + ICON_BODY); |
||||
|
if ($icon.hasClass(selected)) { |
||||
|
$icon.removeClass(selected).addClass(unselect); |
||||
|
} else { |
||||
|
// 隐藏其他picker
|
||||
|
$('.layui-form-select').removeClass(selected); |
||||
|
// 显示当前picker
|
||||
|
$icon.addClass(selected).removeClass(unselect); |
||||
|
} |
||||
|
e.stopPropagation(); |
||||
|
}); |
||||
|
return a; |
||||
|
}, |
||||
|
/** |
||||
|
* 绘制主体部分 |
||||
|
*/ |
||||
|
createBody: function () { |
||||
|
// 获取数据
|
||||
|
var searchHtml = ''; |
||||
|
|
||||
|
if (search) { |
||||
|
searchHtml = '<div class="layui-iconpicker-search">' + |
||||
|
'<input class="layui-input">' + |
||||
|
'<i class="layui-icon"></i>' + |
||||
|
'</div>'; |
||||
|
} |
||||
|
|
||||
|
// 组合dom
|
||||
|
var bodyHtml = '<div class="layui-iconpicker-body" id="' + PICKER_BODY + '">' + |
||||
|
searchHtml + |
||||
|
'<div class="' + LIST_BOX + '"></div> ' + |
||||
|
'</div>'; |
||||
|
$('#' + ICON_BODY).find('.layui-anim').eq(0).html(bodyHtml); |
||||
|
a.search().createList().check().page(); |
||||
|
|
||||
|
return a; |
||||
|
}, |
||||
|
/** |
||||
|
* 绘制图标列表 |
||||
|
* @param text 模糊查询关键字 |
||||
|
* @returns {string} |
||||
|
*/ |
||||
|
createList: function (text) { |
||||
|
var d = data, |
||||
|
l = d.length, |
||||
|
pageHtml = '', |
||||
|
listHtml = $('<div class="layui-iconpicker-list">')//'<div class="layui-iconpicker-list">';
|
||||
|
|
||||
|
// 计算分页数据
|
||||
|
var _limit = limit, // 每页显示数量
|
||||
|
_pages = l % _limit === 0 ? l / _limit : parseInt(l / _limit + 1), // 总计多少页
|
||||
|
_id = PAGE_ID; |
||||
|
|
||||
|
// 图标列表
|
||||
|
var icons = []; |
||||
|
|
||||
|
for (var i = 0; i < l; i++) { |
||||
|
var obj = d[i]; |
||||
|
|
||||
|
// 判断是否模糊查询
|
||||
|
if (text && obj.indexOf(text) === -1) { |
||||
|
continue; |
||||
|
} |
||||
|
|
||||
|
// 是否自定义格子宽度
|
||||
|
var style = ''; |
||||
|
if (cellWidth !== null) { |
||||
|
style += ' style="width:' + cellWidth + '"'; |
||||
|
} |
||||
|
|
||||
|
// 每个图标dom
|
||||
|
var icon = '<div class="layui-iconpicker-icon-item" title="' + obj + '" ' + style + '>'; |
||||
|
|
||||
|
icon += '<i class="fa ' + obj + '"></i>'; |
||||
|
|
||||
|
icon += '</div>'; |
||||
|
|
||||
|
icons.push(icon); |
||||
|
} |
||||
|
|
||||
|
// 查询出图标后再分页
|
||||
|
l = icons.length; |
||||
|
_pages = l % _limit === 0 ? l / _limit : parseInt(l / _limit + 1); |
||||
|
for (var i = 0; i < _pages; i++) { |
||||
|
// 按limit分块
|
||||
|
var lm = $('<div class="layui-iconpicker-icon-limit" id="layui-iconpicker-icon-limit-' + tmp + (i + 1) + '">'); |
||||
|
|
||||
|
for (var j = i * _limit; j < (i + 1) * _limit && j < l; j++) { |
||||
|
lm.append(icons[j]); |
||||
|
} |
||||
|
|
||||
|
listHtml.append(lm); |
||||
|
} |
||||
|
|
||||
|
// 无数据
|
||||
|
if (l === 0) { |
||||
|
listHtml.append('<p class="layui-iconpicker-tips">无数据</p>'); |
||||
|
} |
||||
|
|
||||
|
// 判断是否分页
|
||||
|
if (page) { |
||||
|
$('#' + PICKER_BODY).addClass('layui-iconpicker-body-page'); |
||||
|
pageHtml = '<div class="layui-iconpicker-page" id="' + PAGE_ID + '">' + |
||||
|
'<div class="layui-iconpicker-page-count">' + |
||||
|
'<span id="' + PAGE_ID + '-current">1</span>/' + |
||||
|
'<span id="' + PAGE_ID + '-pages">' + _pages + '</span>' + |
||||
|
' (<span id="' + PAGE_ID + '-length">' + l + '</span>)' + |
||||
|
'</div>' + |
||||
|
'<div class="layui-iconpicker-page-operate">' + |
||||
|
'<i class="layui-icon" id="' + PAGE_ID + '-prev" data-index="0" prev></i> ' + |
||||
|
'<i class="layui-icon" id="' + PAGE_ID + '-next" data-index="2" next></i> ' + |
||||
|
'</div>' + |
||||
|
'</div>'; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
$('#' + ICON_BODY).find('.layui-anim').find('.' + LIST_BOX).html('').append(listHtml).append(pageHtml); |
||||
|
return a; |
||||
|
}, |
||||
|
// 阻止Layui的一些默认事件
|
||||
|
preventEvent: function () { |
||||
|
var item = '#' + ICON_BODY + ' .layui-anim'; |
||||
|
a.event('click', item, function (e) { |
||||
|
e.stopPropagation(); |
||||
|
}); |
||||
|
return a; |
||||
|
}, |
||||
|
// 分页
|
||||
|
page: function () { |
||||
|
var icon = '#' + PAGE_ID + ' .layui-iconpicker-page-operate .layui-icon'; |
||||
|
|
||||
|
$(icon).unbind('click'); |
||||
|
a.event('click', icon, function (e) { |
||||
|
var elem = e.currentTarget, |
||||
|
total = parseInt($('#' + PAGE_ID + '-pages').html()), |
||||
|
isPrev = $(elem).attr('prev') !== undefined, |
||||
|
// 按钮上标的页码
|
||||
|
index = parseInt($(elem).attr('data-index')), |
||||
|
$cur = $('#' + PAGE_ID + '-current'), |
||||
|
// 点击时正在显示的页码
|
||||
|
current = parseInt($cur.html()); |
||||
|
|
||||
|
// 分页数据
|
||||
|
if (isPrev && current > 1) { |
||||
|
current = current - 1; |
||||
|
$(icon + '[prev]').attr('data-index', current); |
||||
|
} else if (!isPrev && current < total) { |
||||
|
current = current + 1; |
||||
|
$(icon + '[next]').attr('data-index', current); |
||||
|
} |
||||
|
$cur.html(current); |
||||
|
|
||||
|
// 图标数据
|
||||
|
$('#' + ICON_BODY + ' .layui-iconpicker-icon-limit').hide(); |
||||
|
$('#layui-iconpicker-icon-limit-' + tmp + current).show(); |
||||
|
e.stopPropagation(); |
||||
|
}); |
||||
|
return a; |
||||
|
}, |
||||
|
/** |
||||
|
* 搜索 |
||||
|
*/ |
||||
|
search: function () { |
||||
|
var item = '#' + PICKER_BODY + ' .layui-iconpicker-search .layui-input'; |
||||
|
a.event('input propertychange', item, function (e) { |
||||
|
var elem = e.target, |
||||
|
t = $(elem).val(); |
||||
|
a.createList(t); |
||||
|
}); |
||||
|
return a; |
||||
|
}, |
||||
|
/** |
||||
|
* 点击选中图标 |
||||
|
*/ |
||||
|
check: function () { |
||||
|
var item = '#' + PICKER_BODY + ' .layui-iconpicker-icon-item'; |
||||
|
a.event('click', item, function (e) { |
||||
|
var el = $(e.currentTarget).find('.fa'), |
||||
|
icon = ''; |
||||
|
|
||||
|
var clsArr = el.attr('class').split(/[\s\n]/), |
||||
|
cls = clsArr[1], |
||||
|
icon = cls; |
||||
|
$('#' + TITLE_ID).find('.layui-iconpicker-item .fa').html('').attr('class', clsArr.join(' ')); |
||||
|
|
||||
|
|
||||
|
$('#' + ICON_BODY).removeClass(selected).addClass(unselect); |
||||
|
$(elem).val(icon).attr('value', icon); |
||||
|
// 回调
|
||||
|
if (click) { |
||||
|
click({ |
||||
|
icon: icon |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
}); |
||||
|
return a; |
||||
|
}, |
||||
|
// 监听原始input数值改变
|
||||
|
inputListen: function () { |
||||
|
var el = $(elem); |
||||
|
a.event('change', elem, function () { |
||||
|
var value = el.val(); |
||||
|
}) |
||||
|
// el.change(function(){
|
||||
|
|
||||
|
// });
|
||||
|
return a; |
||||
|
}, |
||||
|
event: function (evt, el, fn) { |
||||
|
$(BODY).on(evt, el, fn); |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
var common = { |
||||
|
/** |
||||
|
* 加载样式表 |
||||
|
*/ |
||||
|
loadCss: function () { |
||||
|
var css = '.layui-iconpicker {max-width: 280px;}.layui-iconpicker .layui-anim{display:none;position:absolute;left:0;top:42px;padding:5px 0;z-index:899;min-width:100%;border:1px solid #d2d2d2;max-height:300px;overflow-y:auto;background-color:#fff;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.12);box-sizing:border-box;}.layui-iconpicker-item{border:1px solid #e6e6e6;width:90px;height:38px;border-radius:4px;cursor:pointer;position:relative;}.layui-iconpicker-icon{border-right:1px solid #e6e6e6;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;width:60px;height:100%;float:left;text-align:center;background:#fff;transition:all .3s;}.layui-iconpicker-icon i{line-height:38px;font-size:18px;}.layui-iconpicker-item > .layui-edge{left:70px;}.layui-iconpicker-item:hover{border-color:#D2D2D2!important;}.layui-iconpicker-item:hover .layui-iconpicker-icon{border-color:#D2D2D2!important;}.layui-iconpicker.layui-form-selected .layui-anim{display:block;}.layui-iconpicker-body{padding:6px;}.layui-iconpicker .layui-iconpicker-list{background-color:#fff;border:1px solid #ccc;border-radius:4px;}.layui-iconpicker .layui-iconpicker-icon-item{display:inline-block;width:21.1%;line-height:36px;text-align:center;cursor:pointer;vertical-align:top;height:36px;margin:4px;border:1px solid #ddd;border-radius:2px;transition:300ms;}.layui-iconpicker .layui-iconpicker-icon-item i.layui-icon{font-size:17px;}.layui-iconpicker .layui-iconpicker-icon-item:hover{background-color:#eee;border-color:#ccc;-webkit-box-shadow:0 0 2px #aaa,0 0 2px #fff inset;-moz-box-shadow:0 0 2px #aaa,0 0 2px #fff inset;box-shadow:0 0 2px #aaa,0 0 2px #fff inset;text-shadow:0 0 1px #fff;}.layui-iconpicker-search{position:relative;margin:0 0 6px 0;border:1px solid #e6e6e6;border-radius:2px;transition:300ms;}.layui-iconpicker-search:hover{border-color:#D2D2D2!important;}.layui-iconpicker-search .layui-input{cursor:text;display:inline-block;width:86%;border:none;padding-right:0;margin-top:1px;}.layui-iconpicker-search .layui-icon{position:absolute;top:11px;right:4%;}.layui-iconpicker-tips{text-align:center;padding:8px 0;cursor:not-allowed;}.layui-iconpicker-page{margin-top:6px;margin-bottom:-6px;font-size:12px;padding:0 2px;}.layui-iconpicker-page-count{display:inline-block;}.layui-iconpicker-page-operate{display:inline-block;float:right;cursor:default;}.layui-iconpicker-page-operate .layui-icon{font-size:12px;cursor:pointer;}.layui-iconpicker-body-page .layui-iconpicker-icon-limit{display:none;}.layui-iconpicker-body-page .layui-iconpicker-icon-limit:first-child{display:block;}'; |
||||
|
var $style = $('head').find('style[iconpicker]'); |
||||
|
if ($style.length === 0) { |
||||
|
$('head').append('<style rel="stylesheet" iconpicker>' + css + '</style>'); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 获取数据 |
||||
|
*/ |
||||
|
getData: function (url) { |
||||
|
var iconlist = []; |
||||
|
$.ajax({ |
||||
|
url: url, |
||||
|
type: 'get', |
||||
|
contentType: "application/x-www-form-urlencoded; charset=UTF-8", |
||||
|
async: false, |
||||
|
success: function (ret) { |
||||
|
var exp = /fa-var-(.*):/ig; |
||||
|
var result; |
||||
|
while ((result = exp.exec(ret)) != null) { |
||||
|
iconlist.push('fa-' + result[1]); |
||||
|
} |
||||
|
}, |
||||
|
error: function (xhr, textstatus, thrown) { |
||||
|
layer.msg('fa图标接口有误'); |
||||
|
} |
||||
|
}); |
||||
|
return iconlist; |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
a.init(); |
||||
|
return new IconPicker(); |
||||
|
}; |
||||
|
|
||||
|
/** |
||||
|
* 选中图标 |
||||
|
* @param filter lay-filter |
||||
|
* @param iconName 图标名称,自动识别fontClass/unicode |
||||
|
*/ |
||||
|
IconPicker.prototype.checkIcon = function (filter, iconName) { |
||||
|
var el = $('*[lay-filter=' + filter + ']'), |
||||
|
p = el.next().find('.layui-iconpicker-item .fa'), |
||||
|
c = iconName; |
||||
|
|
||||
|
if (c.indexOf('#xe') > 0) { |
||||
|
p.html(c); |
||||
|
} else { |
||||
|
p.html('').attr('class', 'fa ' + c); |
||||
|
} |
||||
|
el.attr('value', c).val(c); |
||||
|
}; |
||||
|
|
||||
|
var iconPicker = new IconPicker(); |
||||
|
exports(_MOD, iconPicker); |
||||
|
}); |
||||
@ -0,0 +1,350 @@ |
|||||
|
/** |
||||
|
* date:2020/02/27 |
||||
|
* author:Mr.Chung |
||||
|
* version:2.0 |
||||
|
* description:layuimini 主体框架扩展 |
||||
|
*/ |
||||
|
layui.define(["jquery", "miniMenu", "element","miniTab", "miniTheme"], function (exports) { |
||||
|
var $ = layui.$, |
||||
|
layer = layui.layer, |
||||
|
miniMenu = layui.miniMenu, |
||||
|
miniTheme = layui.miniTheme, |
||||
|
element = layui.element , |
||||
|
miniTab = layui.miniTab; |
||||
|
|
||||
|
if (!/http(s*):\/\//.test(location.href)) { |
||||
|
var tips = "请先将项目部署至web容器(Apache/Tomcat/Nginx/IIS/等),否则部分数据将无法显示"; |
||||
|
return layer.alert(tips); |
||||
|
} |
||||
|
|
||||
|
var miniAdmin = { |
||||
|
|
||||
|
/** |
||||
|
* 后台框架初始化 |
||||
|
* @param options.iniUrl 后台初始化接口地址 |
||||
|
* @param options.clearUrl 后台清理缓存接口 |
||||
|
* @param options.urlHashLocation URL地址hash定位 |
||||
|
* @param options.bgColorDefault 默认皮肤 |
||||
|
* @param options.multiModule 是否开启多模块 |
||||
|
* @param options.menuChildOpen 是否展开子菜单 |
||||
|
* @param options.loadingTime 初始化加载时间 |
||||
|
* @param options.pageAnim iframe窗口动画 |
||||
|
* @param options.maxTabNum 最大的tab打开数量 |
||||
|
*/ |
||||
|
render: function (options) { |
||||
|
options.iniUrl = options.iniUrl || null; |
||||
|
options.clearUrl = options.clearUrl || null; |
||||
|
options.urlHashLocation = options.urlHashLocation || false; |
||||
|
options.bgColorDefault = options.bgColorDefault || 0; |
||||
|
options.multiModule = options.multiModule || false; |
||||
|
options.menuChildOpen = options.menuChildOpen || false; |
||||
|
options.loadingTime = options.loadingTime || 1; |
||||
|
options.pageAnim = options.pageAnim || false; |
||||
|
options.maxTabNum = options.maxTabNum || 20; |
||||
|
$.getJSON(options.iniUrl, function (data) { |
||||
|
if (data == null) { |
||||
|
miniAdmin.error('暂无菜单信息') |
||||
|
} else { |
||||
|
miniAdmin.renderLogo(data.logoInfo); |
||||
|
miniAdmin.renderClear(options.clearUrl); |
||||
|
miniAdmin.renderHome(data.homeInfo); |
||||
|
miniAdmin.renderAnim(options.pageAnim); |
||||
|
miniAdmin.listen(); |
||||
|
miniMenu.render({ |
||||
|
menuList: data.menuInfo, |
||||
|
multiModule: options.multiModule, |
||||
|
menuChildOpen: options.menuChildOpen |
||||
|
}); |
||||
|
miniTab.render({ |
||||
|
filter: 'layuiminiTab', |
||||
|
urlHashLocation: options.urlHashLocation, |
||||
|
multiModule: options.multiModule, |
||||
|
menuChildOpen: options.menuChildOpen, |
||||
|
maxTabNum: options.maxTabNum, |
||||
|
menuList: data.menuInfo, |
||||
|
homeInfo: data.homeInfo, |
||||
|
listenSwichCallback: function () { |
||||
|
miniAdmin.renderDevice(); |
||||
|
} |
||||
|
}); |
||||
|
miniTheme.render({ |
||||
|
bgColorDefault: options.bgColorDefault, |
||||
|
listen: true, |
||||
|
}); |
||||
|
miniAdmin.deleteLoader(options.loadingTime); |
||||
|
} |
||||
|
}).fail(function () { |
||||
|
miniAdmin.error('菜单接口有误'); |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 初始化logo |
||||
|
* @param data |
||||
|
*/ |
||||
|
renderLogo: function (data) { |
||||
|
var html = '<a href="' + data.href + '"><img src="' + data.image + '" alt="logo"><h1>' + data.title + '</h1></a>'; |
||||
|
$('.layuimini-logo').html(html); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 初始化首页 |
||||
|
* @param data |
||||
|
*/ |
||||
|
renderHome: function (data) { |
||||
|
sessionStorage.setItem('layuiminiHomeHref', data.href); |
||||
|
$('#layuiminiHomeTabId').html('<span class="layuimini-tab-active"></span><span class="disable-close">' + data.title + '</span><i class="layui-icon layui-unselect layui-tab-close">ဆ</i>'); |
||||
|
$('#layuiminiHomeTabId').attr('lay-id', data.href); |
||||
|
$('#layuiminiHomeTabIframe').html('<iframe width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" src="' + data.href + '"></iframe>'); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 初始化缓存地址 |
||||
|
* @param clearUrl |
||||
|
*/ |
||||
|
renderClear: function (clearUrl) { |
||||
|
$('.layuimini-clear').attr('data-href',clearUrl); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 初始化iframe窗口动画 |
||||
|
* @param anim |
||||
|
*/ |
||||
|
renderAnim: function (anim) { |
||||
|
if (anim) { |
||||
|
$('#layuimini-bg-color').after('<style id="layuimini-page-anim">' + |
||||
|
'.layui-tab-item.layui-show {animation:moveTop 1s;-webkit-animation:moveTop 1s;animation-fill-mode:both;-webkit-animation-fill-mode:both;position:relative;height:100%;-webkit-overflow-scrolling:touch;}\n' + |
||||
|
'@keyframes moveTop {0% {opacity:0;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px);}\n' + |
||||
|
' 100% {opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);}\n' + |
||||
|
'}\n' + |
||||
|
'@-o-keyframes moveTop {0% {opacity:0;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px);}\n' + |
||||
|
' 100% {opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);}\n' + |
||||
|
'}\n' + |
||||
|
'@-moz-keyframes moveTop {0% {opacity:0;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px);}\n' + |
||||
|
' 100% {opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);}\n' + |
||||
|
'}\n' + |
||||
|
'@-webkit-keyframes moveTop {0% {opacity:0;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px);}\n' + |
||||
|
' 100% {opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);}\n' + |
||||
|
'}' + |
||||
|
'</style>'); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
fullScreen: function () { |
||||
|
var el = document.documentElement; |
||||
|
var rfs = el.requestFullScreen || el.webkitRequestFullScreen; |
||||
|
if (typeof rfs != "undefined" && rfs) { |
||||
|
rfs.call(el); |
||||
|
} else if (typeof window.ActiveXObject != "undefined") { |
||||
|
var wscript = new ActiveXObject("WScript.Shell"); |
||||
|
if (wscript != null) { |
||||
|
wscript.SendKeys("{F11}"); |
||||
|
} |
||||
|
} else if (el.msRequestFullscreen) { |
||||
|
el.msRequestFullscreen(); |
||||
|
} else if (el.oRequestFullscreen) { |
||||
|
el.oRequestFullscreen(); |
||||
|
} else if (el.webkitRequestFullscreen) { |
||||
|
el.webkitRequestFullscreen(); |
||||
|
} else if (el.mozRequestFullScreen) { |
||||
|
el.mozRequestFullScreen(); |
||||
|
} else { |
||||
|
miniAdmin.error('浏览器不支持全屏调用!'); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 退出全屏 |
||||
|
*/ |
||||
|
exitFullScreen: function () { |
||||
|
var el = document; |
||||
|
var cfs = el.cancelFullScreen || el.webkitCancelFullScreen || el.exitFullScreen; |
||||
|
if (typeof cfs != "undefined" && cfs) { |
||||
|
cfs.call(el); |
||||
|
} else if (typeof window.ActiveXObject != "undefined") { |
||||
|
var wscript = new ActiveXObject("WScript.Shell"); |
||||
|
if (wscript != null) { |
||||
|
wscript.SendKeys("{F11}"); |
||||
|
} |
||||
|
} else if (el.msExitFullscreen) { |
||||
|
el.msExitFullscreen(); |
||||
|
} else if (el.oRequestFullscreen) { |
||||
|
el.oCancelFullScreen(); |
||||
|
}else if (el.mozCancelFullScreen) { |
||||
|
el.mozCancelFullScreen(); |
||||
|
} else if (el.webkitCancelFullScreen) { |
||||
|
el.webkitCancelFullScreen(); |
||||
|
} else { |
||||
|
miniAdmin.error('浏览器不支持全屏调用!'); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 初始化设备端 |
||||
|
*/ |
||||
|
renderDevice: function () { |
||||
|
if (miniAdmin.checkMobile()) { |
||||
|
$('.layuimini-tool i').attr('data-side-fold', 1); |
||||
|
$('.layuimini-tool i').attr('class', 'fa fa-outdent'); |
||||
|
$('.layui-layout-body').removeClass('layuimini-mini'); |
||||
|
$('.layui-layout-body').addClass('layuimini-all'); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 初始化加载时间 |
||||
|
* @param loadingTime |
||||
|
*/ |
||||
|
deleteLoader: function (loadingTime) { |
||||
|
setTimeout(function () { |
||||
|
$('.layuimini-loader').fadeOut(); |
||||
|
}, loadingTime * 1000) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 成功 |
||||
|
* @param title |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
success: function (title) { |
||||
|
return layer.msg(title, {icon: 1, shade: this.shade, scrollbar: false, time: 2000, shadeClose: true}); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 失败 |
||||
|
* @param title |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
error: function (title) { |
||||
|
return layer.msg(title, {icon: 2, shade: this.shade, scrollbar: false, time: 3000, shadeClose: true}); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 判断是否为手机 |
||||
|
* @returns {boolean} |
||||
|
*/ |
||||
|
checkMobile: function () { |
||||
|
var ua = navigator.userAgent.toLocaleLowerCase(); |
||||
|
var pf = navigator.platform.toLocaleLowerCase(); |
||||
|
var isAndroid = (/android/i).test(ua) || ((/iPhone|iPod|iPad/i).test(ua) && (/linux/i).test(pf)) |
||||
|
|| (/ucweb.*linux/i.test(ua)); |
||||
|
var isIOS = (/iPhone|iPod|iPad/i).test(ua) && !isAndroid; |
||||
|
var isWinPhone = (/Windows Phone|ZuneWP7/i).test(ua); |
||||
|
var clientWidth = document.documentElement.clientWidth; |
||||
|
if (!isAndroid && !isIOS && !isWinPhone && clientWidth > 1024) { |
||||
|
return false; |
||||
|
} else { |
||||
|
return true; |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 监听 |
||||
|
*/ |
||||
|
listen: function () { |
||||
|
|
||||
|
/** |
||||
|
* 清理 |
||||
|
*/ |
||||
|
$('body').on('click', '[data-clear]', function () { |
||||
|
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
||||
|
sessionStorage.clear(); |
||||
|
|
||||
|
// 判断是否清理服务端
|
||||
|
var clearUrl = $(this).attr('data-href'); |
||||
|
if (clearUrl != undefined && clearUrl != '' && clearUrl != null) { |
||||
|
$.getJSON(clearUrl, function (data, status) { |
||||
|
layer.close(loading); |
||||
|
if (data.code != 1) { |
||||
|
return miniAdmin.error(data.msg); |
||||
|
} else { |
||||
|
return miniAdmin.success(data.msg); |
||||
|
} |
||||
|
}).fail(function () { |
||||
|
layer.close(loading); |
||||
|
return miniAdmin.error('清理缓存接口有误'); |
||||
|
}); |
||||
|
} else { |
||||
|
layer.close(loading); |
||||
|
return miniAdmin.success('清除缓存成功'); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
/** |
||||
|
* 刷新 |
||||
|
*/ |
||||
|
$('body').on('click', '[data-refresh]', function () { |
||||
|
$(".layui-tab-item.layui-show").find("iframe")[0].contentWindow.location.reload(); |
||||
|
miniAdmin.success('刷新成功'); |
||||
|
}); |
||||
|
|
||||
|
/** |
||||
|
* 监听提示信息 |
||||
|
*/ |
||||
|
$("body").on("mouseenter", ".layui-nav-tree .menu-li", function () { |
||||
|
if (miniAdmin.checkMobile()) { |
||||
|
return false; |
||||
|
} |
||||
|
var classInfo = $(this).attr('class'), |
||||
|
tips = $(this).prop("innerHTML"), |
||||
|
isShow = $('.layuimini-tool i').attr('data-side-fold'); |
||||
|
if (isShow == 0 && tips) { |
||||
|
tips = "<ul class='layuimini-menu-left-zoom layui-nav layui-nav-tree layui-this'><li class='layui-nav-item layui-nav-itemed'>"+tips+"</li></ul>" ; |
||||
|
window.openTips = layer.tips(tips, $(this), { |
||||
|
tips: [2, '#2f4056'], |
||||
|
time: 300000, |
||||
|
skin:"popup-tips", |
||||
|
success:function (el) { |
||||
|
var left = $(el).position().left - 10 ; |
||||
|
$(el).css({ left:left }); |
||||
|
element.render(); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
$("body").on("mouseleave", ".popup-tips", function () { |
||||
|
if (miniAdmin.checkMobile()) { |
||||
|
return false; |
||||
|
} |
||||
|
var isShow = $('.layuimini-tool i').attr('data-side-fold'); |
||||
|
if (isShow == 0) { |
||||
|
try { |
||||
|
layer.close(window.openTips); |
||||
|
} catch (e) { |
||||
|
console.log(e.message); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 全屏 |
||||
|
*/ |
||||
|
$('body').on('click', '[data-check-screen]', function () { |
||||
|
var check = $(this).attr('data-check-screen'); |
||||
|
if (check == 'full') { |
||||
|
miniAdmin.fullScreen(); |
||||
|
$(this).attr('data-check-screen', 'exit'); |
||||
|
$(this).html('<i class="fa fa-compress"></i>'); |
||||
|
} else { |
||||
|
miniAdmin.exitFullScreen(); |
||||
|
$(this).attr('data-check-screen', 'full'); |
||||
|
$(this).html('<i class="fa fa-arrows-alt"></i>'); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
/** |
||||
|
* 点击遮罩层 |
||||
|
*/ |
||||
|
$('body').on('click', '.layuimini-make', function () { |
||||
|
miniAdmin.renderDevice(); |
||||
|
}); |
||||
|
|
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
exports("miniAdmin", miniAdmin); |
||||
|
}); |
||||
@ -0,0 +1,250 @@ |
|||||
|
/** |
||||
|
* date:2020/02/27 |
||||
|
* author:Mr.Chung |
||||
|
* version:2.0 |
||||
|
* description:layuimini 菜单框架扩展 |
||||
|
*/ |
||||
|
layui.define(["element","laytpl" ,"jquery"], function (exports) { |
||||
|
var element = layui.element, |
||||
|
$ = layui.$, |
||||
|
laytpl = layui.laytpl, |
||||
|
layer = layui.layer; |
||||
|
|
||||
|
var miniMenu = { |
||||
|
|
||||
|
/** |
||||
|
* 菜单初始化 |
||||
|
* @param options.menuList 菜单数据信息 |
||||
|
* @param options.multiModule 是否开启多模块 |
||||
|
* @param options.menuChildOpen 是否展开子菜单 |
||||
|
*/ |
||||
|
render: function (options) { |
||||
|
options.menuList = options.menuList || []; |
||||
|
options.multiModule = options.multiModule || false; |
||||
|
options.menuChildOpen = options.menuChildOpen || false; |
||||
|
if (options.multiModule) { |
||||
|
miniMenu.renderMultiModule(options.menuList, options.menuChildOpen); |
||||
|
} else { |
||||
|
miniMenu.renderSingleModule(options.menuList, options.menuChildOpen); |
||||
|
} |
||||
|
miniMenu.listen(); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 单模块 |
||||
|
* @param menuList 菜单数据 |
||||
|
* @param menuChildOpen 是否默认展开 |
||||
|
*/ |
||||
|
renderSingleModule: function (menuList, menuChildOpen) { |
||||
|
menuList = menuList || []; |
||||
|
var leftMenuHtml = '', |
||||
|
childOpenClass = '', |
||||
|
leftMenuCheckDefault = 'layui-this'; |
||||
|
var me = this ; |
||||
|
if (menuChildOpen) childOpenClass = ' layui-nav-itemed'; |
||||
|
leftMenuHtml = this.renderLeftMenu(menuList,{ childOpenClass:childOpenClass }) ; |
||||
|
$('.layui-layout-body').addClass('layuimini-single-module'); //单模块标识
|
||||
|
$('.layuimini-header-menu').remove(); |
||||
|
$('.layuimini-menu-left').html(leftMenuHtml); |
||||
|
|
||||
|
element.init(); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 渲染一级菜单 |
||||
|
*/ |
||||
|
compileMenu: function(menu,isSub){ |
||||
|
var menuHtml = '<li {{#if( d.menu){ }} data-menu="{{d.menu}}" {{#}}} class="layui-nav-item menu-li {{d.childOpenClass}} {{d.className}}" {{#if( d.id){ }} id="{{d.id}}" {{#}}}> <a {{#if( d.href){ }} layuimini-href="{{d.href}}" {{#}}} {{#if( d.target){ }} target="{{d.target}}" {{#}}} href="javascript:;">{{#if( d.icon){ }} <i class="{{d.icon}}"></i> {{#}}} <span class="layui-left-nav">{{d.title}}</span></a> {{# if(d.children){}} {{d.children}} {{#}}} </li>' ; |
||||
|
if(isSub){ |
||||
|
menuHtml = '<dd class="menu-dd {{d.childOpenClass}} {{ d.className }}"> <a href="javascript:;" {{#if( d.menu){ }} data-menu="{{d.menu}}" {{#}}} {{#if( d.id){ }} id="{{d.id}}" {{#}}} {{#if(( !d.child || !d.child.length ) && d.href){ }} layuimini-href="{{d.href}}" {{#}}} {{#if( d.target){ }} target="{{d.target}}" {{#}}}> {{#if( d.icon){ }} <i class="{{d.icon}}"></i> {{#}}} <span class="layui-left-nav"> {{d.title}}</span></a> {{# if(d.children){}} {{d.children}} {{#}}}</dd>' |
||||
|
} |
||||
|
return laytpl(menuHtml).render(menu); |
||||
|
}, |
||||
|
compileMenuContainer :function(menu,isSub){ |
||||
|
var wrapperHtml = '<ul class="layui-nav layui-nav-tree layui-left-nav-tree {{d.className}}" id="{{d.id}}">{{d.children}}</ul>' ; |
||||
|
if(isSub){ |
||||
|
wrapperHtml = '<dl class="layui-nav-child ">{{d.children}}</dl>' ; |
||||
|
} |
||||
|
if(!menu.children){ |
||||
|
return ""; |
||||
|
} |
||||
|
return laytpl(wrapperHtml).render(menu); |
||||
|
}, |
||||
|
|
||||
|
each:function(list,callback){ |
||||
|
var _list = []; |
||||
|
for(var i = 0 ,length = list.length ; i<length ;i++ ){ |
||||
|
_list[i] = callback(i,list[i]) ; |
||||
|
} |
||||
|
return _list ; |
||||
|
}, |
||||
|
renderChildrenMenu:function(menuList,options){ |
||||
|
var me = this ; |
||||
|
menuList = menuList || [] ; |
||||
|
var html = this.each(menuList,function (idx,menu) { |
||||
|
if(menu.child && menu.child.length){ |
||||
|
menu.children = me.renderChildrenMenu(menu.child,{ childOpenClass: options.childOpenClass || '' }); |
||||
|
} |
||||
|
menu.className = "" ; |
||||
|
menu.childOpenClass = options.childOpenClass || '' |
||||
|
return me.compileMenu(menu,true) |
||||
|
}).join(""); |
||||
|
return me.compileMenuContainer({ children:html },true) |
||||
|
}, |
||||
|
renderLeftMenu :function(leftMenus,options){ |
||||
|
options = options || {}; |
||||
|
var me = this ; |
||||
|
var leftMenusHtml = me.each(leftMenus || [],function (idx,leftMenu) { // 左侧菜单遍历
|
||||
|
var children = me.renderChildrenMenu(leftMenu.child, { childOpenClass:options.childOpenClass }); |
||||
|
var leftMenuHtml = me.compileMenu({ |
||||
|
href: leftMenu.href, |
||||
|
target: leftMenu.target, |
||||
|
childOpenClass: options.childOpenClass, |
||||
|
icon: leftMenu.icon, |
||||
|
title: leftMenu.title, |
||||
|
children: children, |
||||
|
className: '', |
||||
|
}); |
||||
|
return leftMenuHtml ; |
||||
|
}).join(""); |
||||
|
|
||||
|
leftMenusHtml = me.compileMenuContainer({ id:options.parentMenuId,className:options.leftMenuCheckDefault,children:leftMenusHtml }) ; |
||||
|
return leftMenusHtml ; |
||||
|
}, |
||||
|
/** |
||||
|
* 多模块 |
||||
|
* @param menuList 菜单数据 |
||||
|
* @param menuChildOpen 是否默认展开 |
||||
|
*/ |
||||
|
renderMultiModule: function (menuList, menuChildOpen) { |
||||
|
menuList = menuList || []; |
||||
|
var me = this ; |
||||
|
var headerMenuHtml = '', |
||||
|
headerMobileMenuHtml = '', |
||||
|
leftMenuHtml = '', |
||||
|
leftMenuCheckDefault = 'layui-this', |
||||
|
childOpenClass = '', |
||||
|
headerMenuCheckDefault = 'layui-this'; |
||||
|
|
||||
|
if (menuChildOpen) childOpenClass = ' layui-nav-itemed'; |
||||
|
var headerMenuHtml = this.each(menuList, function (index, val) { //顶部菜单渲染
|
||||
|
var menu = 'multi_module_' + index ; |
||||
|
var id = menu+"HeaderId"; |
||||
|
var topMenuItemHtml = "" ; |
||||
|
topMenuItemHtml = me.compileMenu({ |
||||
|
className:headerMenuCheckDefault, |
||||
|
menu:menu, |
||||
|
id:id, |
||||
|
title:val.title, |
||||
|
href:"", |
||||
|
target:"", |
||||
|
children:"" |
||||
|
}); |
||||
|
leftMenuHtml+=me.renderLeftMenu(val.child,{ |
||||
|
parentMenuId:menu, |
||||
|
childOpenClass:childOpenClass, |
||||
|
leftMenuCheckDefault:leftMenuCheckDefault |
||||
|
}); |
||||
|
headerMobileMenuHtml +=me.compileMenu({ id:id,menu:menu,id:id,icon:val.icon, title:val.title, },true); |
||||
|
headerMenuCheckDefault = ""; |
||||
|
leftMenuCheckDefault = "layui-hide" ; |
||||
|
return topMenuItemHtml ; |
||||
|
}).join(""); |
||||
|
$('.layui-layout-body').addClass('layuimini-multi-module'); //多模块标识
|
||||
|
$('.layuimini-menu-header-pc').html(headerMenuHtml); //电脑
|
||||
|
$('.layuimini-menu-left').html(leftMenuHtml); |
||||
|
$('.layuimini-menu-header-mobile').html(headerMobileMenuHtml); //手机
|
||||
|
element.init(); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 监听 |
||||
|
*/ |
||||
|
listen: function () { |
||||
|
|
||||
|
/** |
||||
|
* 菜单模块切换 |
||||
|
*/ |
||||
|
$('body').on('click', '[data-menu]', function () { |
||||
|
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
||||
|
var menuId = $(this).attr('data-menu'); |
||||
|
// header
|
||||
|
$(".layuimini-header-menu .layui-nav-item.layui-this").removeClass('layui-this'); |
||||
|
$(this).addClass('layui-this'); |
||||
|
// left
|
||||
|
$(".layuimini-menu-left .layui-nav.layui-nav-tree.layui-this").addClass('layui-hide'); |
||||
|
$(".layuimini-menu-left .layui-nav.layui-nav-tree.layui-this.layui-hide").removeClass('layui-this'); |
||||
|
$("#" + menuId).removeClass('layui-hide'); |
||||
|
$("#" + menuId).addClass('layui-this'); |
||||
|
layer.close(loading); |
||||
|
}); |
||||
|
|
||||
|
/** |
||||
|
* 菜单缩放 |
||||
|
*/ |
||||
|
$('body').on('click', '.layuimini-site-mobile', function () { |
||||
|
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
||||
|
var isShow = $('.layuimini-tool [data-side-fold]').attr('data-side-fold'); |
||||
|
if (isShow == 1) { // 缩放
|
||||
|
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 0); |
||||
|
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-indent'); |
||||
|
$('.layui-layout-body').removeClass('layuimini-all'); |
||||
|
$('.layui-layout-body').addClass('layuimini-mini'); |
||||
|
} else { // 正常
|
||||
|
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 1); |
||||
|
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-outdent'); |
||||
|
$('.layui-layout-body').removeClass('layuimini-mini'); |
||||
|
$('.layui-layout-body').addClass('layuimini-all'); |
||||
|
layer.close(window.openTips); |
||||
|
} |
||||
|
element.init(); |
||||
|
layer.close(loading); |
||||
|
}); |
||||
|
/** |
||||
|
* 菜单缩放 |
||||
|
*/ |
||||
|
$('body').on('click', '[data-side-fold]', function () { |
||||
|
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
||||
|
var isShow = $('.layuimini-tool [data-side-fold]').attr('data-side-fold'); |
||||
|
if (isShow == 1) { // 缩放
|
||||
|
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 0); |
||||
|
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-indent'); |
||||
|
$('.layui-layout-body').removeClass('layuimini-all'); |
||||
|
$('.layui-layout-body').addClass('layuimini-mini'); |
||||
|
// $(".menu-li").each(function (idx,el) {
|
||||
|
// $(el).addClass("hidden-sub-menu");
|
||||
|
// });
|
||||
|
|
||||
|
} else { // 正常
|
||||
|
$('.layuimini-tool [data-side-fold]').attr('data-side-fold', 1); |
||||
|
$('.layuimini-tool [data-side-fold]').attr('class', 'fa fa-outdent'); |
||||
|
$('.layui-layout-body').removeClass('layuimini-mini'); |
||||
|
$('.layui-layout-body').addClass('layuimini-all'); |
||||
|
// $(".menu-li").each(function (idx,el) {
|
||||
|
// $(el).removeClass("hidden-sub-menu");
|
||||
|
// });
|
||||
|
layer.close(window.openTips); |
||||
|
} |
||||
|
element.init(); |
||||
|
layer.close(loading); |
||||
|
}); |
||||
|
|
||||
|
/** |
||||
|
* 手机端点开模块 |
||||
|
*/ |
||||
|
$('body').on('click', '.layuimini-header-menu.layuimini-mobile-show dd', function () { |
||||
|
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
||||
|
var check = $('.layuimini-tool [data-side-fold]').attr('data-side-fold'); |
||||
|
if(check === "1"){ |
||||
|
$('.layuimini-site-mobile').trigger("click"); |
||||
|
element.init(); |
||||
|
} |
||||
|
layer.close(loading); |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
}; |
||||
|
|
||||
|
|
||||
|
exports("miniMenu", miniMenu); |
||||
|
}); |
||||
@ -0,0 +1,582 @@ |
|||||
|
/** |
||||
|
* date:2020/02/27 |
||||
|
* author:Mr.Chung |
||||
|
* version:2.0 |
||||
|
* description:layuimini tab框架扩展 |
||||
|
*/ |
||||
|
layui.define(["element", "layer", "jquery"], function (exports) { |
||||
|
var element = layui.element, |
||||
|
layer = layui.layer, |
||||
|
$ = layui.$; |
||||
|
|
||||
|
|
||||
|
var miniTab = { |
||||
|
|
||||
|
/** |
||||
|
* 初始化tab |
||||
|
* @param options |
||||
|
*/ |
||||
|
render: function (options) { |
||||
|
options.filter = options.filter || null; |
||||
|
options.multiModule = options.multiModule || false; |
||||
|
options.urlHashLocation = options.urlHashLocation || false; |
||||
|
options.maxTabNum = options.maxTabNum || 20; |
||||
|
options.menuList = options.menuList || []; // todo 后期菜单想改为不操作dom, 而是直接操作初始化传过来的数据
|
||||
|
options.homeInfo = options.homeInfo || {}; |
||||
|
options.listenSwichCallback = options.listenSwichCallback || function () { |
||||
|
}; |
||||
|
miniTab.listen(options); |
||||
|
miniTab.listenRoll(); |
||||
|
miniTab.listenSwitch(options); |
||||
|
miniTab.listenHash(options); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 新建tab窗口 |
||||
|
* @param options.tabId |
||||
|
* @param options.href |
||||
|
* @param options.title |
||||
|
* @param options.isIframe |
||||
|
* @param options.maxTabNum |
||||
|
*/ |
||||
|
create: function (options) { |
||||
|
options.tabId = options.tabId || null; |
||||
|
options.href = options.href || null; |
||||
|
options.title = options.title || null; |
||||
|
options.isIframe = options.isIframe || false; |
||||
|
options.maxTabNum = options.maxTabNum || 20; |
||||
|
if ($(".layuimini-tab .layui-tab-title li").length >= options.maxTabNum) { |
||||
|
layer.msg('Tab窗口已达到限定数量,请先关闭部分Tab'); |
||||
|
return false; |
||||
|
} |
||||
|
var ele = element; |
||||
|
if (options.isIframe) ele = parent.layui.element; |
||||
|
ele.tabAdd('layuiminiTab', { |
||||
|
title: '<span class="layuimini-tab-active"></span><span>' + options.title + '</span><i class="layui-icon layui-unselect layui-tab-close">ဆ</i>' //用于演示
|
||||
|
, content: '<iframe width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" src="' + options.href + '"></iframe>' |
||||
|
, id: options.tabId |
||||
|
}); |
||||
|
$('.layuimini-menu-left').attr('layuimini-tab-tag', 'add'); |
||||
|
sessionStorage.setItem('layuiminimenu_' + options.tabId, options.title); |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 切换选项卡 |
||||
|
* @param tabId |
||||
|
*/ |
||||
|
change: function (tabId) { |
||||
|
element.tabChange('layuiminiTab', tabId); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 删除tab窗口 |
||||
|
* @param tabId |
||||
|
* @param isParent |
||||
|
*/ |
||||
|
delete: function (tabId, isParent) { |
||||
|
// todo 未知BUG,不知道是不是layui问题,必须先删除元素
|
||||
|
$(".layuimini-tab .layui-tab-title .layui-unselect.layui-tab-bar").remove(); |
||||
|
|
||||
|
if (isParent === true) { |
||||
|
parent.layui.element.tabDelete('layuiminiTab', tabId); |
||||
|
} else { |
||||
|
element.tabDelete('layuiminiTab', tabId); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 在iframe层打开新tab方法 |
||||
|
*/ |
||||
|
openNewTabByIframe: function (options) { |
||||
|
options.href = options.href || null; |
||||
|
options.title = options.title || null; |
||||
|
var loading = parent.layer.load(0, {shade: false, time: 2 * 1000}); |
||||
|
if (options.href === null || options.href === undefined) options.href = new Date().getTime(); |
||||
|
var checkTab = miniTab.check(options.href, true); |
||||
|
if (!checkTab) { |
||||
|
miniTab.create({ |
||||
|
tabId: options.href, |
||||
|
href: options.href, |
||||
|
title: options.title, |
||||
|
isIframe: true, |
||||
|
}); |
||||
|
} |
||||
|
parent.layui.element.tabChange('layuiminiTab', options.href); |
||||
|
parent.layer.close(loading); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 在iframe层关闭当前tab方法 |
||||
|
*/ |
||||
|
deleteCurrentByIframe: function () { |
||||
|
var ele = $(".layuimini-tab .layui-tab-title li.layui-this", parent.document); |
||||
|
if (ele.length > 0) { |
||||
|
var layId = $(ele[0]).attr('lay-id'); |
||||
|
miniTab.delete(layId, true); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 判断tab窗口 |
||||
|
*/ |
||||
|
check: function (tabId, isIframe) { |
||||
|
// 判断选项卡上是否有
|
||||
|
var checkTab = false; |
||||
|
if (isIframe === undefined || isIframe === false) { |
||||
|
$(".layui-tab-title li").each(function () { |
||||
|
var checkTabId = $(this).attr('lay-id'); |
||||
|
if (checkTabId != null && checkTabId === tabId) { |
||||
|
checkTab = true; |
||||
|
} |
||||
|
}); |
||||
|
} else { |
||||
|
parent.layui.$(".layui-tab-title li").each(function () { |
||||
|
var checkTabId = $(this).attr('lay-id'); |
||||
|
if (checkTabId != null && checkTabId === tabId) { |
||||
|
checkTab = true; |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
return checkTab; |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 开启tab右键菜单 |
||||
|
* @param tabId |
||||
|
* @param left |
||||
|
*/ |
||||
|
openTabRignMenu: function (tabId, left) { |
||||
|
miniTab.closeTabRignMenu(); |
||||
|
var menuHtml = '<div class="layui-unselect layui-form-select layui-form-selected layuimini-tab-mousedown layui-show" data-tab-id="' + tabId + '" style="left: ' + left + 'px!important">\n' + |
||||
|
'<dl>\n' + |
||||
|
'<dd><a href="javascript:;" layuimini-tab-menu-close="current">关 闭 当 前</a></dd>\n' + |
||||
|
'<dd><a href="javascript:;" layuimini-tab-menu-close="other">关 闭 其 他</a></dd>\n' + |
||||
|
'<dd><a href="javascript:;" layuimini-tab-menu-close="all">关 闭 全 部</a></dd>\n' + |
||||
|
'</dl>\n' + |
||||
|
'</div>'; |
||||
|
var makeHtml = '<div class="layuimini-tab-make"></div>'; |
||||
|
$('.layuimini-tab .layui-tab-title').after(menuHtml); |
||||
|
$('.layuimini-tab .layui-tab-content').after(makeHtml); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 关闭tab右键菜单 |
||||
|
*/ |
||||
|
closeTabRignMenu: function () { |
||||
|
$('.layuimini-tab-mousedown').remove(); |
||||
|
$('.layuimini-tab-make').remove(); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 查询菜单信息 |
||||
|
* @param href |
||||
|
* @param menuList |
||||
|
*/ |
||||
|
searchMenu: function (href, menuList) { |
||||
|
var menu; |
||||
|
for (key in menuList) { |
||||
|
var item = menuList[key]; |
||||
|
if (item.href === href) { |
||||
|
menu = item; |
||||
|
break; |
||||
|
} |
||||
|
if (item.child) { |
||||
|
newMenu = miniTab.searchMenu(href, item.child); |
||||
|
if (newMenu) { |
||||
|
menu = newMenu; |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
return menu; |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 监听 |
||||
|
* @param options |
||||
|
*/ |
||||
|
listen: function (options) { |
||||
|
options = options || {}; |
||||
|
options.maxTabNum = options.maxTabNum || 20; |
||||
|
|
||||
|
/** |
||||
|
* 打开新窗口 |
||||
|
*/ |
||||
|
$('body').on('click', '[layuimini-href]', function () { |
||||
|
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
||||
|
var tabId = $(this).attr('layuimini-href'), |
||||
|
href = $(this).attr('layuimini-href'), |
||||
|
title = $(this).text(), |
||||
|
target = $(this).attr('target'); |
||||
|
|
||||
|
var el = $("[layuimini-href='" + href + "']", ".layuimini-menu-left"); |
||||
|
layer.close(window.openTips); |
||||
|
if (el.length) { |
||||
|
$(el).closest(".layui-nav-tree").find(".layui-this").removeClass("layui-this"); |
||||
|
$(el).parent().addClass("layui-this"); |
||||
|
} |
||||
|
|
||||
|
if (target === '_blank') { |
||||
|
layer.close(loading); |
||||
|
window.open(href, "_blank"); |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
if (tabId === null || tabId === undefined) tabId = new Date().getTime(); |
||||
|
var checkTab = miniTab.check(tabId); |
||||
|
if (!checkTab) { |
||||
|
miniTab.create({ |
||||
|
tabId: tabId, |
||||
|
href: href, |
||||
|
title: title, |
||||
|
isIframe: false, |
||||
|
maxTabNum: options.maxTabNum, |
||||
|
}); |
||||
|
} |
||||
|
element.tabChange('layuiminiTab', tabId); |
||||
|
layer.close(loading); |
||||
|
}); |
||||
|
|
||||
|
/** |
||||
|
* 在iframe子菜单上打开新窗口 |
||||
|
*/ |
||||
|
$('body').on('click', '[layuimini-content-href]', function () { |
||||
|
var loading = parent.layer.load(0, {shade: false, time: 2 * 1000}); |
||||
|
var tabId = $(this).attr('layuimini-content-href'), |
||||
|
href = $(this).attr('layuimini-content-href'), |
||||
|
title = $(this).attr('data-title'), |
||||
|
target = $(this).attr('target'); |
||||
|
if (target === '_blank') { |
||||
|
parent.layer.close(loading); |
||||
|
window.open(href, "_blank"); |
||||
|
return false; |
||||
|
} |
||||
|
if (tabId === null || tabId === undefined) tabId = new Date().getTime(); |
||||
|
var checkTab = miniTab.check(tabId, true); |
||||
|
if (!checkTab) { |
||||
|
miniTab.create({ |
||||
|
tabId: tabId, |
||||
|
href: href, |
||||
|
title: title, |
||||
|
isIframe: true, |
||||
|
maxTabNum: options.maxTabNum, |
||||
|
}); |
||||
|
} |
||||
|
parent.layui.element.tabChange('layuiminiTab', tabId); |
||||
|
parent.layer.close(loading); |
||||
|
}); |
||||
|
|
||||
|
/** |
||||
|
* 关闭选项卡 |
||||
|
**/ |
||||
|
$('body').on('click', '.layuimini-tab .layui-tab-title .layui-tab-close', function () { |
||||
|
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
||||
|
var $parent = $(this).parent(); |
||||
|
var tabId = $parent.attr('lay-id'); |
||||
|
if (tabId !== undefined || tabId !== null) { |
||||
|
miniTab.delete(tabId); |
||||
|
} |
||||
|
layer.close(loading); |
||||
|
}); |
||||
|
|
||||
|
/** |
||||
|
* 选项卡操作 |
||||
|
*/ |
||||
|
$('body').on('click', '[layuimini-tab-close]', function () { |
||||
|
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
||||
|
var closeType = $(this).attr('layuimini-tab-close'); |
||||
|
$(".layuimini-tab .layui-tab-title li").each(function () { |
||||
|
var tabId = $(this).attr('lay-id'); |
||||
|
var id = $(this).attr('id'); |
||||
|
var isCurrent = $(this).hasClass('layui-this'); |
||||
|
if (id !== 'layuiminiHomeTabId') { |
||||
|
if (closeType === 'all') { |
||||
|
miniTab.delete(tabId); |
||||
|
} else { |
||||
|
if (closeType === 'current' && isCurrent) { |
||||
|
miniTab.delete(tabId); |
||||
|
} else if (closeType === 'other' && !isCurrent) { |
||||
|
miniTab.delete(tabId); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
layer.close(loading); |
||||
|
}); |
||||
|
|
||||
|
/** |
||||
|
* 禁用网页右键 |
||||
|
*/ |
||||
|
$(".layuimini-tab .layui-tab-title").unbind("mousedown").bind("contextmenu", function (e) { |
||||
|
e.preventDefault(); |
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
/** |
||||
|
* 注册鼠标右键 |
||||
|
*/ |
||||
|
$('body').on('mousedown', '.layuimini-tab .layui-tab-title li', function (e) { |
||||
|
var left = $(this).offset().left - $('.layuimini-tab ').offset().left + ($(this).width() / 2), |
||||
|
tabId = $(this).attr('lay-id'); |
||||
|
if (e.which === 3) { |
||||
|
miniTab.openTabRignMenu(tabId, left); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
/** |
||||
|
* 关闭tab右键菜单 |
||||
|
*/ |
||||
|
$('body').on('click', '.layui-body,.layui-header,.layuimini-menu-left,.layuimini-tab-make', function () { |
||||
|
miniTab.closeTabRignMenu(); |
||||
|
}); |
||||
|
|
||||
|
/** |
||||
|
* tab右键选项卡操作 |
||||
|
*/ |
||||
|
$('body').on('click', '[layuimini-tab-menu-close]', function () { |
||||
|
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
||||
|
var closeType = $(this).attr('layuimini-tab-menu-close'), |
||||
|
currentTabId = $('.layuimini-tab-mousedown').attr('data-tab-id'); |
||||
|
$(".layuimini-tab .layui-tab-title li").each(function () { |
||||
|
var tabId = $(this).attr('lay-id'); |
||||
|
var id = $(this).attr('id'); |
||||
|
if (id !== 'layuiminiHomeTabId') { |
||||
|
if (closeType === 'all') { |
||||
|
miniTab.delete(tabId); |
||||
|
} else { |
||||
|
if (closeType === 'current' && currentTabId === tabId) { |
||||
|
miniTab.delete(tabId); |
||||
|
} else if (closeType === 'other' && currentTabId !== tabId) { |
||||
|
miniTab.delete(tabId); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
miniTab.closeTabRignMenu(); |
||||
|
layer.close(loading); |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 监听tab切换 |
||||
|
* @param options |
||||
|
*/ |
||||
|
listenSwitch: function (options) { |
||||
|
options.filter = options.filter || null; |
||||
|
options.multiModule = options.multiModule || false; |
||||
|
options.urlHashLocation = options.urlHashLocation || false; |
||||
|
options.listenSwichCallback = options.listenSwichCallback || function () { |
||||
|
|
||||
|
}; |
||||
|
element.on('tab(' + options.filter + ')', function (data) { |
||||
|
var tabId = $(this).attr('lay-id'); |
||||
|
if (options.urlHashLocation) { |
||||
|
location.hash = '/' + tabId; |
||||
|
} |
||||
|
if (typeof options.listenSwichCallback === 'function') { |
||||
|
options.listenSwichCallback(); |
||||
|
} |
||||
|
// 判断是否为新增窗口
|
||||
|
if ($('.layuimini-menu-left').attr('layuimini-tab-tag') === 'add') { |
||||
|
$('.layuimini-menu-left').attr('layuimini-tab-tag', 'no') |
||||
|
} else { |
||||
|
$("[layuimini-href]").parent().removeClass('layui-this'); |
||||
|
if (options.multiModule) { |
||||
|
miniTab.listenSwitchMultiModule(tabId); |
||||
|
} else { |
||||
|
miniTab.listenSwitchSingleModule(tabId); |
||||
|
} |
||||
|
} |
||||
|
miniTab.rollPosition(); |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 监听hash变化 |
||||
|
* @param options |
||||
|
* @returns {boolean} |
||||
|
*/ |
||||
|
listenHash: function (options) { |
||||
|
options.urlHashLocation = options.urlHashLocation || false; |
||||
|
options.maxTabNum = options.maxTabNum || 20; |
||||
|
options.homeInfo = options.homeInfo || {}; |
||||
|
options.menuList = options.menuList || []; |
||||
|
if (!options.urlHashLocation) return false; |
||||
|
var tabId = location.hash.replace(/^#\//, ''); |
||||
|
if (tabId === null || tabId === undefined || tabId ==='') return false; |
||||
|
|
||||
|
// 判断是否为首页
|
||||
|
if(tabId ===options.homeInfo.href) return false; |
||||
|
|
||||
|
// 判断是否为右侧菜单
|
||||
|
var menu = miniTab.searchMenu(tabId, options.menuList); |
||||
|
if (menu !== undefined) { |
||||
|
miniTab.create({ |
||||
|
tabId: tabId, |
||||
|
href: tabId, |
||||
|
title: menu.title, |
||||
|
isIframe: false, |
||||
|
maxTabNum: options.maxTabNum, |
||||
|
}); |
||||
|
$('.layuimini-menu-left').attr('layuimini-tab-tag', 'no'); |
||||
|
element.tabChange('layuiminiTab', tabId); |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
// 判断是否为快捷菜单
|
||||
|
var isSearchMenu = false; |
||||
|
$("[layuimini-content-href]").each(function () { |
||||
|
if ($(this).attr("layuimini-content-href") === tabId) { |
||||
|
var title = $(this).attr("data-title"); |
||||
|
miniTab.create({ |
||||
|
tabId: tabId, |
||||
|
href: tabId, |
||||
|
title: title, |
||||
|
isIframe: false, |
||||
|
maxTabNum: options.maxTabNum, |
||||
|
}); |
||||
|
$('.layuimini-menu-left').attr('layuimini-tab-tag', 'no'); |
||||
|
element.tabChange('layuiminiTab', tabId); |
||||
|
isSearchMenu = true; |
||||
|
return false; |
||||
|
} |
||||
|
}); |
||||
|
if (isSearchMenu) return false; |
||||
|
|
||||
|
// 既不是右侧菜单、快捷菜单,就直接打开
|
||||
|
var title = sessionStorage.getItem('layuiminimenu_' + tabId) === null ? tabId : sessionStorage.getItem('layuiminimenu_' + tabId); |
||||
|
miniTab.create({ |
||||
|
tabId: tabId, |
||||
|
href: tabId, |
||||
|
title: title, |
||||
|
isIframe: false, |
||||
|
maxTabNum: options.maxTabNum, |
||||
|
}); |
||||
|
element.tabChange('layuiminiTab', tabId); |
||||
|
return false; |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 监听滚动 |
||||
|
*/ |
||||
|
listenRoll: function () { |
||||
|
$(".layuimini-tab-roll-left").click(function () { |
||||
|
miniTab.rollClick("left"); |
||||
|
}); |
||||
|
$(".layuimini-tab-roll-right").click(function () { |
||||
|
miniTab.rollClick("right"); |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 单模块切换 |
||||
|
* @param tabId |
||||
|
*/ |
||||
|
listenSwitchSingleModule: function (tabId) { |
||||
|
$("[layuimini-href]").each(function () { |
||||
|
if ($(this).attr("layuimini-href") === tabId) { |
||||
|
// 自动展开菜单栏
|
||||
|
var addMenuClass = function ($element, type) { |
||||
|
if (type === 1) { |
||||
|
$element.addClass('layui-this'); |
||||
|
if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-this')) { |
||||
|
$(".layuimini-header-menu li").attr('class', 'layui-nav-item'); |
||||
|
} else { |
||||
|
addMenuClass($element.parent().parent(), 2); |
||||
|
} |
||||
|
} else { |
||||
|
$element.addClass('layui-nav-itemed'); |
||||
|
if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-nav-itemed')) { |
||||
|
$(".layuimini-header-menu li").attr('class', 'layui-nav-item'); |
||||
|
} else { |
||||
|
addMenuClass($element.parent().parent(), 2); |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
addMenuClass($(this).parent(), 1); |
||||
|
return false; |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 多模块切换 |
||||
|
* @param tabId |
||||
|
*/ |
||||
|
listenSwitchMultiModule: function (tabId) { |
||||
|
$("[layuimini-href]").each(function () { |
||||
|
if ($(this).attr("layuimini-href") === tabId) { |
||||
|
|
||||
|
// 自动展开菜单栏
|
||||
|
var addMenuClass = function ($element, type) { |
||||
|
if (type === 1) { |
||||
|
$element.addClass('layui-this'); |
||||
|
if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-this')) { |
||||
|
var moduleId = $element.parent().attr('id'); |
||||
|
$(".layuimini-header-menu li").attr('class', 'layui-nav-item'); |
||||
|
$("#" + moduleId + "HeaderId").addClass("layui-this"); |
||||
|
$(".layuimini-menu-left .layui-nav.layui-nav-tree").attr('class', 'layui-nav layui-nav-tree layui-hide'); |
||||
|
$("#" + moduleId).attr('class', 'layui-nav layui-nav-tree layui-this'); |
||||
|
} else { |
||||
|
addMenuClass($element.parent().parent(), 2); |
||||
|
} |
||||
|
} else { |
||||
|
$element.addClass('layui-nav-itemed'); |
||||
|
if ($element.hasClass('layui-nav-item') && $element.hasClass('layui-nav-itemed')) { |
||||
|
var moduleId = $element.parent().attr('id'); |
||||
|
$(".layuimini-header-menu li").attr('class', 'layui-nav-item'); |
||||
|
$("#" + moduleId + "HeaderId").addClass("layui-this"); |
||||
|
$(".layuimini-menu-left .layui-nav.layui-nav-tree").attr('class', 'layui-nav layui-nav-tree layui-hide'); |
||||
|
$("#" + moduleId).attr('class', 'layui-nav layui-nav-tree layui-this'); |
||||
|
} else { |
||||
|
addMenuClass($element.parent().parent(), 2); |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
addMenuClass($(this).parent(), 1); |
||||
|
return false; |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 自动定位 |
||||
|
*/ |
||||
|
rollPosition: function () { |
||||
|
var $tabTitle = $('.layuimini-tab .layui-tab-title'); |
||||
|
var autoLeft = 0; |
||||
|
$tabTitle.children("li").each(function () { |
||||
|
if ($(this).hasClass('layui-this')) { |
||||
|
return false; |
||||
|
} else { |
||||
|
autoLeft += $(this).outerWidth(); |
||||
|
} |
||||
|
}); |
||||
|
$tabTitle.animate({ |
||||
|
scrollLeft: autoLeft - $tabTitle.width() / 3 |
||||
|
}, 200); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 点击滚动 |
||||
|
* @param direction |
||||
|
*/ |
||||
|
rollClick: function (direction) { |
||||
|
var $tabTitle = $('.layuimini-tab .layui-tab-title'); |
||||
|
var left = $tabTitle.scrollLeft(); |
||||
|
if ('left' === direction) { |
||||
|
$tabTitle.animate({ |
||||
|
scrollLeft: left - 450 |
||||
|
}, 200); |
||||
|
} else { |
||||
|
$tabTitle.animate({ |
||||
|
scrollLeft: left + 450 |
||||
|
}, 200); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
}; |
||||
|
|
||||
|
exports("miniTab", miniTab); |
||||
|
}); |
||||
@ -0,0 +1,474 @@ |
|||||
|
/** |
||||
|
* date:2020/02/28 |
||||
|
* author:Mr.Chung |
||||
|
* version:2.0 |
||||
|
* description:layuimini tab框架扩展 |
||||
|
*/ |
||||
|
layui.define(["jquery", "layer"], function (exports) { |
||||
|
var $ = layui.$, |
||||
|
layer = layui.layer; |
||||
|
|
||||
|
var miniTheme = { |
||||
|
|
||||
|
/** |
||||
|
* 主题配置项 |
||||
|
* @param bgcolorId |
||||
|
* @returns {{headerLogo, menuLeftHover, headerRight, menuLeft, headerRightThis, menuLeftThis}|*|*[]} |
||||
|
*/ |
||||
|
config: function (bgcolorId) { |
||||
|
var bgColorConfig = [ |
||||
|
{ |
||||
|
headerRightBg: '#ffffff', //头部右侧背景色
|
||||
|
headerRightBgThis: '#e4e4e4', //头部右侧选中背景色,
|
||||
|
headerRightColor: 'rgba(107, 107, 107, 0.7)', //头部右侧字体颜色,
|
||||
|
headerRightChildColor: 'rgba(107, 107, 107, 0.7)', //头部右侧下拉字体颜色,
|
||||
|
headerRightColorThis: '#565656', //头部右侧鼠标选中,
|
||||
|
headerRightNavMore: 'rgba(160, 160, 160, 0.7)', //头部右侧更多下拉颜色,
|
||||
|
headerRightNavMoreBg: '#1E9FFF', //头部右侧更多下拉列表选中背景色,
|
||||
|
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
|
headerRightToolColor: '#565656', //头部缩放按钮样式,
|
||||
|
headerLogoBg: '#192027', //logo背景颜色,
|
||||
|
headerLogoColor: 'rgb(191, 187, 187)', //logo字体颜色,
|
||||
|
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
||||
|
leftMenuBg: '#28333E', //左侧菜单背景,
|
||||
|
leftMenuBgThis: '#1E9FFF', //左侧菜单选中背景,
|
||||
|
leftMenuChildBg: '#0c0f13', //左侧菜单子菜单背景,
|
||||
|
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
||||
|
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
|
tabActiveColor: '#1e9fff', //tab选项卡选中颜色,
|
||||
|
}, |
||||
|
{ |
||||
|
headerRightBg: '#23262e', //头部右侧背景色
|
||||
|
headerRightBgThis: '#0c0c0c', //头部右侧选中背景色,
|
||||
|
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
||||
|
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
|
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
|
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
||||
|
headerRightNavMoreBg: '#1aa094', //头部右侧更多下拉列表选中背景色,
|
||||
|
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
|
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
|
headerLogoBg: '#0c0c0c', //logo背景颜色,
|
||||
|
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
|
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
||||
|
leftMenuBg: '#23262e', //左侧菜单背景,
|
||||
|
leftMenuBgThis: '#737373', //左侧菜单选中背景,
|
||||
|
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
|
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
||||
|
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
|
tabActiveColor: '#23262e', //tab选项卡选中颜色,
|
||||
|
}, |
||||
|
{ |
||||
|
headerRightBg: '#ffa4d1', //头部右侧背景色
|
||||
|
headerRightBgThis: '#bf7b9d', //头部右侧选中背景色,
|
||||
|
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
||||
|
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
|
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
|
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
||||
|
headerRightNavMoreBg: '#ffa4d1', //头部右侧更多下拉列表选中背景色,
|
||||
|
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
|
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
|
headerLogoBg: '#e694bd', //logo背景颜色,
|
||||
|
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
|
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
||||
|
leftMenuBg: '#1f1f1f', //左侧菜单背景,
|
||||
|
leftMenuBgThis: '#737373', //左侧菜单选中背景,
|
||||
|
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
|
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
||||
|
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
|
tabActiveColor: '#ffa4d1', //tab选项卡选中颜色,
|
||||
|
}, |
||||
|
{ |
||||
|
headerRightBg: '#1aa094', //头部右侧背景色
|
||||
|
headerRightBgThis: '#197971', //头部右侧选中背景色,
|
||||
|
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
||||
|
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
|
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
|
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
||||
|
headerRightNavMoreBg: '#1aa094', //头部右侧更多下拉列表选中背景色,
|
||||
|
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
|
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
|
headerLogoBg: '#0c0c0c', //logo背景颜色,
|
||||
|
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
|
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
||||
|
leftMenuBg: '#23262e', //左侧菜单背景,
|
||||
|
leftMenuBgThis: '#1aa094', //左侧菜单选中背景,
|
||||
|
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
|
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
||||
|
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
|
tabActiveColor: '#1aa094', //tab选项卡选中颜色,
|
||||
|
}, |
||||
|
{ |
||||
|
headerRightBg: '#1e9fff', //头部右侧背景色
|
||||
|
headerRightBgThis: '#0069b7', //头部右侧选中背景色,
|
||||
|
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
||||
|
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
|
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
|
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
||||
|
headerRightNavMoreBg: '#1e9fff', //头部右侧更多下拉列表选中背景色,
|
||||
|
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
|
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
|
headerLogoBg: '#0c0c0c', //logo背景颜色,
|
||||
|
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
|
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
||||
|
leftMenuBg: '#1f1f1f', //左侧菜单背景,
|
||||
|
leftMenuBgThis: '#1e9fff', //左侧菜单选中背景,
|
||||
|
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
|
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
||||
|
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
|
tabActiveColor: '#1e9fff', //tab选项卡选中颜色,
|
||||
|
}, |
||||
|
{ |
||||
|
headerRightBg: '#ffb800', //头部右侧背景色
|
||||
|
headerRightBgThis: '#d09600', //头部右侧选中背景色,
|
||||
|
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
||||
|
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
|
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
|
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
||||
|
headerRightNavMoreBg: '#d09600', //头部右侧更多下拉列表选中背景色,
|
||||
|
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
|
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
|
headerLogoBg: '#243346', //logo背景颜色,
|
||||
|
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
|
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
||||
|
leftMenuBg: '#2f4056', //左侧菜单背景,
|
||||
|
leftMenuBgThis: '#8593a7', //左侧菜单选中背景,
|
||||
|
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
|
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
||||
|
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
|
tabActiveColor: '#ffb800', //tab选项卡选中颜色,
|
||||
|
}, |
||||
|
{ |
||||
|
headerRightBg: '#e82121', //头部右侧背景色
|
||||
|
headerRightBgThis: '#ae1919', //头部右侧选中背景色,
|
||||
|
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
||||
|
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
|
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
|
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
||||
|
headerRightNavMoreBg: '#ae1919', //头部右侧更多下拉列表选中背景色,
|
||||
|
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
|
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
|
headerLogoBg: '#0c0c0c', //logo背景颜色,
|
||||
|
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
|
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
||||
|
leftMenuBg: '#1f1f1f', //左侧菜单背景,
|
||||
|
leftMenuBgThis: '#3b3f4b', //左侧菜单选中背景,
|
||||
|
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
|
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
||||
|
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
|
tabActiveColor: '#e82121', //tab选项卡选中颜色,
|
||||
|
}, |
||||
|
{ |
||||
|
headerRightBg: '#963885', //头部右侧背景色
|
||||
|
headerRightBgThis: '#772c6a', //头部右侧选中背景色,
|
||||
|
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
||||
|
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
|
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
|
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
||||
|
headerRightNavMoreBg: '#772c6a', //头部右侧更多下拉列表选中背景色,
|
||||
|
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
|
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
|
headerLogoBg: '#243346', //logo背景颜色,
|
||||
|
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
|
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
||||
|
leftMenuBg: '#2f4056', //左侧菜单背景,
|
||||
|
leftMenuBgThis: '#586473', //左侧菜单选中背景,
|
||||
|
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
|
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
||||
|
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
|
tabActiveColor: '#963885', //tab选项卡选中颜色,
|
||||
|
}, |
||||
|
{ |
||||
|
headerRightBg: '#2D8CF0', //头部右侧背景色
|
||||
|
headerRightBgThis: '#0069b7', //头部右侧选中背景色,
|
||||
|
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
||||
|
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
|
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
|
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
||||
|
headerRightNavMoreBg: '#0069b7', //头部右侧更多下拉列表选中背景色,
|
||||
|
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
|
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
|
headerLogoBg: '#0069b7', //logo背景颜色,
|
||||
|
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
|
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
||||
|
leftMenuBg: '#1f1f1f', //左侧菜单背景,
|
||||
|
leftMenuBgThis: '#2D8CF0', //左侧菜单选中背景,
|
||||
|
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
|
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
||||
|
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
|
tabActiveColor: '#2d8cf0', //tab选项卡选中颜色,
|
||||
|
}, |
||||
|
{ |
||||
|
headerRightBg: '#ffb800', //头部右侧背景色
|
||||
|
headerRightBgThis: '#d09600', //头部右侧选中背景色,
|
||||
|
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
||||
|
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
|
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
|
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
||||
|
headerRightNavMoreBg: '#d09600', //头部右侧更多下拉列表选中背景色,
|
||||
|
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
|
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
|
headerLogoBg: '#d09600', //logo背景颜色,
|
||||
|
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
|
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
||||
|
leftMenuBg: '#2f4056', //左侧菜单背景,
|
||||
|
leftMenuBgThis: '#3b3f4b', //左侧菜单选中背景,
|
||||
|
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
|
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
||||
|
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
|
tabActiveColor: '#ffb800', //tab选项卡选中颜色,
|
||||
|
}, |
||||
|
{ |
||||
|
headerRightBg: '#e82121', //头部右侧背景色
|
||||
|
headerRightBgThis: '#ae1919', //头部右侧选中背景色,
|
||||
|
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
||||
|
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
|
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
|
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
||||
|
headerRightNavMoreBg: '#ae1919', //头部右侧更多下拉列表选中背景色,
|
||||
|
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
|
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
|
headerLogoBg: '#d91f1f', //logo背景颜色,
|
||||
|
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
|
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
||||
|
leftMenuBg: '#1f1f1f', //左侧菜单背景,
|
||||
|
leftMenuBgThis: '#3b3f4b', //左侧菜单选中背景,
|
||||
|
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
|
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
||||
|
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
|
tabActiveColor: '#e82121', //tab选项卡选中颜色,
|
||||
|
}, |
||||
|
{ |
||||
|
headerRightBg: '#963885', //头部右侧背景色
|
||||
|
headerRightBgThis: '#772c6a', //头部右侧选中背景色,
|
||||
|
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
||||
|
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
||||
|
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
||||
|
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
||||
|
headerRightNavMoreBg: '#772c6a', //头部右侧更多下拉列表选中背景色,
|
||||
|
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
||||
|
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||
|
headerLogoBg: '#772c6a', //logo背景颜色,
|
||||
|
headerLogoColor: '#ffffff', //logo字体颜色,
|
||||
|
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
||||
|
leftMenuBg: '#2f4056', //左侧菜单背景,
|
||||
|
leftMenuBgThis: '#626f7f', //左侧菜单选中背景,
|
||||
|
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
||||
|
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
||||
|
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
||||
|
tabActiveColor: '#963885', //tab选项卡选中颜色,
|
||||
|
} |
||||
|
]; |
||||
|
if (bgcolorId === undefined) { |
||||
|
return bgColorConfig; |
||||
|
} else { |
||||
|
return bgColorConfig[bgcolorId]; |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 初始化 |
||||
|
* @param options |
||||
|
*/ |
||||
|
render: function (options) { |
||||
|
options.bgColorDefault = options.bgColorDefault || false; |
||||
|
options.listen = options.listen || false; |
||||
|
var bgcolorId = sessionStorage.getItem('layuiminiBgcolorId'); |
||||
|
if (bgcolorId === null || bgcolorId === undefined || bgcolorId === '') { |
||||
|
bgcolorId = options.bgColorDefault; |
||||
|
} |
||||
|
miniTheme.buildThemeCss(bgcolorId); |
||||
|
if (options.listen) miniTheme.listen(options); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 构建主题样式 |
||||
|
* @param bgcolorId |
||||
|
* @returns {boolean} |
||||
|
*/ |
||||
|
buildThemeCss: function (bgcolorId) { |
||||
|
if (!bgcolorId) { |
||||
|
return false; |
||||
|
} |
||||
|
var bgcolorData = miniTheme.config(bgcolorId); |
||||
|
var styleHtml = '/*头部右侧背景色 headerRightBg */\n' + |
||||
|
'.layui-layout-admin .layui-header {\n' + |
||||
|
' background-color: ' + bgcolorData.headerRightBg + ' !important;\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/*头部右侧选中背景色 headerRightBgThis */\n' + |
||||
|
'.layui-layout-admin .layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover {\n' + |
||||
|
' background-color: ' + bgcolorData.headerRightBgThis + ' !important;\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/*头部右侧字体颜色 headerRightColor */\n' + |
||||
|
'.layui-layout-admin .layui-header .layui-nav .layui-nav-item a {\n' + |
||||
|
' color: ' + bgcolorData.headerRightColor + ';\n' + |
||||
|
'}\n' + |
||||
|
'/**头部右侧下拉字体颜色 headerRightChildColor */\n' + |
||||
|
'.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a {\n' + |
||||
|
' color: ' + bgcolorData.headerRightChildColor + '!important;\n' + |
||||
|
'}\n'+ |
||||
|
'\n' + |
||||
|
'/*头部右侧鼠标选中 headerRightColorThis */\n' + |
||||
|
'.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, .layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a {\n' + |
||||
|
' color: ' + bgcolorData.headerRightColorThis + ' !important;\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/*头部右侧更多下拉颜色 headerRightNavMore */\n' + |
||||
|
'.layui-header .layui-nav .layui-nav-more {\n' + |
||||
|
' border-top-color: ' + bgcolorData.headerRightNavMore + ' !important;\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/*头部右侧更多下拉颜色 headerRightNavMore */\n' + |
||||
|
'.layui-header .layui-nav .layui-nav-mored, .layui-header .layui-nav-itemed > a .layui-nav-more {\n' + |
||||
|
' border-color: transparent transparent ' + bgcolorData.headerRightNavMore + ' !important;\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/**头部右侧更多下拉配置色 headerRightNavMoreBg headerRightNavMoreColor */\n' + |
||||
|
'.layui-header .layui-nav .layui-nav-child dd.layui-this a, .layui-header .layui-nav-child dd.layui-this, .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a {\n' + |
||||
|
' background-color: ' + bgcolorData.headerRightNavMoreBg + ' !important;\n' + |
||||
|
' color:' + bgcolorData.headerRightNavMoreColor + ' !important;\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/*头部缩放按钮样式 headerRightToolColor */\n' + |
||||
|
'.layui-layout-admin .layui-header .layuimini-tool i {\n' + |
||||
|
' color: ' + bgcolorData.headerRightToolColor + ';\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/*logo背景颜色 headerLogoBg */\n' + |
||||
|
'.layui-layout-admin .layuimini-logo {\n' + |
||||
|
' background-color: ' + bgcolorData.headerLogoBg + ' !important;\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/*logo字体颜色 headerLogoColor */\n' + |
||||
|
'.layui-layout-admin .layuimini-logo h1 {\n' + |
||||
|
' color: ' + bgcolorData.headerLogoColor + ';\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/*左侧菜单更多下拉样式 leftMenuNavMore */\n' + |
||||
|
'.layuimini-menu-left .layui-nav .layui-nav-more,.layuimini-menu-left-zoom.layui-nav .layui-nav-more {\n' + |
||||
|
' border-top-color: ' + bgcolorData.leftMenuNavMore + ';\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/*左侧菜单更多下拉样式 leftMenuNavMore */\n' + |
||||
|
'.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more {\n' + |
||||
|
' border-color: transparent transparent ' + bgcolorData.leftMenuNavMore + ' !important;\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/*左侧菜单背景 leftMenuBg */\n' + |
||||
|
'.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul, .layuimini-menu-left-zoom > ul {\n' + |
||||
|
' background-color: ' + bgcolorData.leftMenuBg + ' !important;\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/*左侧菜单选中背景 leftMenuBgThis */\n' + |
||||
|
'.layuimini-menu-left .layui-nav-tree .layui-this, .layuimini-menu-left .layui-nav-tree .layui-this > a, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, .layuimini-menu-left-zoom.layui-nav-tree .layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {\n' + |
||||
|
' background-color: ' + bgcolorData.leftMenuBgThis + ' !important\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/*左侧菜单子菜单背景 leftMenuChildBg */\n' + |
||||
|
'.layuimini-menu-left .layui-nav-itemed > .layui-nav-child{\n' + |
||||
|
' background-color: ' + bgcolorData.leftMenuChildBg + ' !important;\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/*左侧菜单字体颜色 leftMenuColor */\n' + |
||||
|
'.layuimini-menu-left .layui-nav .layui-nav-item a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a {\n' + |
||||
|
' color: ' + bgcolorData.leftMenuColor + ' !important;\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/*左侧菜单选中字体颜色 leftMenuColorThis */\n' + |
||||
|
'.layuimini-menu-left .layui-nav .layui-nav-item a:hover, .layuimini-menu-left .layui-nav .layui-this a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, .layuimini-menu-left-zoom.layui-nav .layui-this a {\n' + |
||||
|
' color:' + bgcolorData.leftMenuColorThis + ' !important;\n' + |
||||
|
'}\n' + |
||||
|
'\n' + |
||||
|
'/**tab选项卡选中颜色 tabActiveColor */\n' + |
||||
|
'.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active {\n' + |
||||
|
' background-color: ' + bgcolorData.tabActiveColor + ';\n' + |
||||
|
'}\n'; |
||||
|
$('#layuimini-bg-color').html(styleHtml); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 构建主题选择html |
||||
|
* @param options |
||||
|
* @returns {string} |
||||
|
*/ |
||||
|
buildBgColorHtml: function (options) { |
||||
|
options.bgColorDefault = options.bgColorDefault || 0; |
||||
|
var bgcolorId = parseInt(sessionStorage.getItem('layuiminiBgcolorId')); |
||||
|
if (isNaN(bgcolorId)) bgcolorId = options.bgColorDefault; |
||||
|
var bgColorConfig = miniTheme.config(); |
||||
|
var html = ''; |
||||
|
$.each(bgColorConfig, function (key, val) { |
||||
|
if (key === bgcolorId) { |
||||
|
html += '<li class="layui-this" data-select-bgcolor="' + key + '">\n'; |
||||
|
} else { |
||||
|
html += '<li data-select-bgcolor="' + key + '">\n'; |
||||
|
} |
||||
|
html += '<a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover">\n' + |
||||
|
'<div><span style="display:block; width: 20%; float: left; height: 12px; background: ' + val.headerLogoBg + ';"></span><span style="display:block; width: 80%; float: left; height: 12px; background: ' + val.headerRightBg + ';"></span></div>\n' + |
||||
|
'<div><span style="display:block; width: 20%; float: left; height: 40px; background: ' + val.leftMenuBg + ';"></span><span style="display:block; width: 80%; float: left; height: 40px; background: #ffffff;"></span></div>\n' + |
||||
|
'</a>\n' + |
||||
|
'</li>'; |
||||
|
}); |
||||
|
return html; |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 监听 |
||||
|
* @param options |
||||
|
*/ |
||||
|
listen: function (options) { |
||||
|
$('body').on('click', '[data-bgcolor]', function () { |
||||
|
var loading = layer.load(0, {shade: false, time: 2 * 1000}); |
||||
|
var clientHeight = (document.documentElement.clientHeight) - 60; |
||||
|
var bgColorHtml = miniTheme.buildBgColorHtml(options); |
||||
|
var html = '<div class="layuimini-color">\n' + |
||||
|
'<div class="color-title">\n' + |
||||
|
'<span>配色方案</span>\n' + |
||||
|
'</div>\n' + |
||||
|
'<div class="color-content">\n' + |
||||
|
'<ul>\n' + bgColorHtml + '</ul>\n' + |
||||
|
'</div>\n' + |
||||
|
'<div class="more-menu-list">\n' + |
||||
|
'<a class="more-menu-item" href="http://layuimini.99php.cn/docs/index.html" target="_blank"><i class="layui-icon layui-icon-read" style="font-size: 19px;"></i> 开发文档</a>\n' + |
||||
|
'<a class="more-menu-item" href="https://github.com/zhongshaofa/layuimini" target="_blank"><i class="layui-icon layui-icon-tabs" style="font-size: 16px;"></i> 开源地址</a>\n' + |
||||
|
'<a class="more-menu-item" href="http://layuimini.99php.cn" target="_blank"><i class="layui-icon layui-icon-theme"></i> 官方网站</a>\n' + |
||||
|
'</div>' + |
||||
|
'</div>'; |
||||
|
layer.open({ |
||||
|
type: 1, |
||||
|
title: false, |
||||
|
closeBtn: 0, |
||||
|
shade: 0.2, |
||||
|
anim: 2, |
||||
|
shadeClose: true, |
||||
|
id: 'layuiminiBgColor', |
||||
|
area: ['340px', clientHeight + 'px'], |
||||
|
offset: 'rb', |
||||
|
content: html, |
||||
|
success: function (index, layero) { |
||||
|
}, |
||||
|
end: function () { |
||||
|
$('.layuimini-select-bgcolor').removeClass('layui-this'); |
||||
|
} |
||||
|
}); |
||||
|
layer.close(loading); |
||||
|
}); |
||||
|
|
||||
|
$('body').on('click', '[data-select-bgcolor]', function () { |
||||
|
var bgcolorId = $(this).attr('data-select-bgcolor'); |
||||
|
$('.layuimini-color .color-content ul .layui-this').attr('class', ''); |
||||
|
$(this).attr('class', 'layui-this'); |
||||
|
sessionStorage.setItem('layuiminiBgcolorId', bgcolorId); |
||||
|
miniTheme.render({ |
||||
|
bgColorDefault: bgcolorId, |
||||
|
listen: false, |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
exports("miniTheme", miniTheme); |
||||
|
|
||||
|
}) |
||||
|
; |
||||
@ -0,0 +1,40 @@ |
|||||
|
/** |
||||
|
* date:2020/03/01 |
||||
|
* author:Mr.Chung |
||||
|
* version:2.0 |
||||
|
* description:layuimini 统计框架扩展 |
||||
|
*/ |
||||
|
layui.define(["jquery"], function (exports) { |
||||
|
var $ = layui.$; |
||||
|
|
||||
|
var miniTongji = { |
||||
|
|
||||
|
/** |
||||
|
* 初始化 |
||||
|
* @param options |
||||
|
*/ |
||||
|
render: function (options) { |
||||
|
options.specific = options.specific || false; |
||||
|
options.domains = options.domains || []; |
||||
|
var domain = window.location.hostname; |
||||
|
if (options.specific === false || (options.specific === true && options.domains.indexOf(domain) >=0)) { |
||||
|
miniTongji.listen(); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 监听统计代码 |
||||
|
*/ |
||||
|
listen: function () { |
||||
|
var _hmt = _hmt || []; |
||||
|
(function () { |
||||
|
var hm = document.createElement("script"); |
||||
|
hm.src = "https://hm.baidu.com/hm.js?d97abf6d61c21d773f97835defbdef4e"; |
||||
|
var s = document.getElementsByTagName("script")[0]; |
||||
|
s.parentNode.insertBefore(hm, s); |
||||
|
})(); |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
exports("miniTongji", miniTongji); |
||||
|
}); |
||||
@ -0,0 +1,79 @@ |
|||||
|
.lay-step { |
||||
|
font-size: 0; |
||||
|
width: 400px; |
||||
|
margin: 0 auto; |
||||
|
max-width: 100%; |
||||
|
padding-left: 200px; |
||||
|
} |
||||
|
|
||||
|
.step-item { |
||||
|
display: inline-block; |
||||
|
line-height: 26px; |
||||
|
position: relative; |
||||
|
font-size: 14px; |
||||
|
} |
||||
|
|
||||
|
.step-item-tail { |
||||
|
width: 100%; |
||||
|
padding: 0 10px; |
||||
|
position: absolute; |
||||
|
left: 0; |
||||
|
top: 13px; |
||||
|
} |
||||
|
|
||||
|
.step-item-tail i { |
||||
|
display: inline-block; |
||||
|
width: 100%; |
||||
|
height: 1px; |
||||
|
vertical-align: top; |
||||
|
background: #c2c2c2; |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
.step-item-tail .step-item-tail-done { |
||||
|
background: #009688; |
||||
|
} |
||||
|
|
||||
|
.step-item-head { |
||||
|
position: relative; |
||||
|
display: inline-block; |
||||
|
height: 26px; |
||||
|
width: 26px; |
||||
|
text-align: center; |
||||
|
vertical-align: top; |
||||
|
color: #009688; |
||||
|
border: 1px solid #009688; |
||||
|
border-radius: 50%; |
||||
|
background: #ffffff; |
||||
|
} |
||||
|
|
||||
|
.step-item-head.step-item-head-active { |
||||
|
background: #009688; |
||||
|
color: #ffffff; |
||||
|
} |
||||
|
|
||||
|
.step-item-main { |
||||
|
display: block; |
||||
|
position: relative; |
||||
|
margin-left: -50%; |
||||
|
margin-right: 50%; |
||||
|
padding-left: 26px; |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
.step-item-main-title { |
||||
|
font-weight: bolder; |
||||
|
color: #555555; |
||||
|
} |
||||
|
|
||||
|
.step-item-main-desc { |
||||
|
color: #aaaaaa; |
||||
|
} |
||||
|
|
||||
|
.lay-step + [carousel-item]:before { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
.lay-step + [carousel-item] > * { |
||||
|
background-color: transparent; |
||||
|
} |
||||
@ -0,0 +1,101 @@ |
|||||
|
layui.define(['layer', 'carousel'], function (exports) { |
||||
|
var $ = layui.jquery; |
||||
|
var layer = layui.layer; |
||||
|
var carousel = layui.carousel; |
||||
|
|
||||
|
// 添加步骤条dom节点
|
||||
|
var renderDom = function (elem, stepItems, position) { |
||||
|
var stepDiv = '<div class="lay-step">'; |
||||
|
for (var i = 0; i < stepItems.length; i++) { |
||||
|
stepDiv += '<div class="step-item">'; |
||||
|
// 线
|
||||
|
if (i < (stepItems.length - 1)) { |
||||
|
if (i < position) { |
||||
|
stepDiv += '<div class="step-item-tail"><i class="step-item-tail-done"></i></div>'; |
||||
|
} else { |
||||
|
stepDiv += '<div class="step-item-tail"><i class=""></i></div>'; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 数字
|
||||
|
var number = stepItems[i].number; |
||||
|
if (!number) { |
||||
|
number = i + 1; |
||||
|
} |
||||
|
if (i == position) { |
||||
|
stepDiv += '<div class="step-item-head step-item-head-active"><i class="layui-icon">' + number + '</i></div>'; |
||||
|
} else if (i < position) { |
||||
|
stepDiv += '<div class="step-item-head"><i class="layui-icon layui-icon-ok"></i></div>'; |
||||
|
} else { |
||||
|
stepDiv += '<div class="step-item-head "><i class="layui-icon">' + number + '</i></div>'; |
||||
|
} |
||||
|
|
||||
|
// 标题和描述
|
||||
|
var title = stepItems[i].title; |
||||
|
var desc = stepItems[i].desc; |
||||
|
if (title || desc) { |
||||
|
stepDiv += '<div class="step-item-main">'; |
||||
|
if (title) { |
||||
|
stepDiv += '<div class="step-item-main-title">' + title + '</div>'; |
||||
|
} |
||||
|
if (desc) { |
||||
|
stepDiv += '<div class="step-item-main-desc">' + desc + '</div>'; |
||||
|
} |
||||
|
stepDiv += '</div>'; |
||||
|
} |
||||
|
stepDiv += '</div>'; |
||||
|
} |
||||
|
stepDiv += '</div>'; |
||||
|
|
||||
|
$(elem).prepend(stepDiv); |
||||
|
|
||||
|
// 计算每一个条目的宽度
|
||||
|
var bfb = 100 / stepItems.length; |
||||
|
$('.step-item').css('width', bfb + '%'); |
||||
|
}; |
||||
|
|
||||
|
var step = { |
||||
|
// 渲染步骤条
|
||||
|
render: function (param) { |
||||
|
param.indicator = 'none'; // 不显示指示器
|
||||
|
param.arrow = 'always'; // 始终显示箭头
|
||||
|
param.autoplay = false; // 关闭自动播放
|
||||
|
if (!param.stepWidth) { |
||||
|
param.stepWidth = '400px'; |
||||
|
} |
||||
|
|
||||
|
// 渲染轮播图
|
||||
|
carousel.render(param); |
||||
|
|
||||
|
// 渲染步骤条
|
||||
|
var stepItems = param.stepItems; |
||||
|
renderDom(param.elem, stepItems, param.position||0); |
||||
|
$('.lay-step').css('width', param.stepWidth); |
||||
|
|
||||
|
//监听轮播切换事件
|
||||
|
carousel.on('change(' + param.filter + ')', function (obj) { |
||||
|
$(param.elem).find('.lay-step').remove(); |
||||
|
renderDom(param.elem, stepItems, obj.index); |
||||
|
$('.lay-step').css('width', param.stepWidth); |
||||
|
}); |
||||
|
|
||||
|
// 隐藏左右箭头按钮
|
||||
|
$(param.elem).find('.layui-carousel-arrow').css('display', 'none'); |
||||
|
|
||||
|
// 去掉轮播图的背景颜色
|
||||
|
$(param.elem).css('background-color', 'transparent'); |
||||
|
}, |
||||
|
// 下一步
|
||||
|
next: function (elem) { |
||||
|
$(elem).find('.layui-carousel-arrow[lay-type=add]').trigger('click'); |
||||
|
}, |
||||
|
// 上一步
|
||||
|
pre: function (elem) { |
||||
|
$(elem).find('.layui-carousel-arrow[lay-type=sub]').trigger('click'); |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
layui.link(layui.cache.base + 'step-lay/step.css'); |
||||
|
|
||||
|
exports('step', step); |
||||
|
}); |
||||
@ -0,0 +1,272 @@ |
|||||
|
layui.define(['table', 'jquery', 'form'], function (exports) { |
||||
|
"use strict"; |
||||
|
|
||||
|
var MOD_NAME = 'tableSelect', |
||||
|
$ = layui.jquery, |
||||
|
table = layui.table, |
||||
|
form = layui.form; |
||||
|
var tableSelect = function () { |
||||
|
this.v = '1.1.0'; |
||||
|
}; |
||||
|
|
||||
|
/** |
||||
|
* 初始化表格选择器 |
||||
|
*/ |
||||
|
tableSelect.prototype.render = function (opt) { |
||||
|
var elem = $(opt.elem); |
||||
|
var tableDone = opt.table.done || function(){}; |
||||
|
|
||||
|
//默认设置
|
||||
|
opt.searchKey = opt.searchKey || 'keyword'; |
||||
|
opt.searchPlaceholder = opt.searchPlaceholder || '关键词搜索'; |
||||
|
opt.checkedKey = opt.checkedKey; |
||||
|
opt.table.page = opt.table.page || true; |
||||
|
opt.table.height = opt.height || 315; |
||||
|
|
||||
|
//最小宽度
|
||||
|
opt.width = opt.width || '530'; |
||||
|
|
||||
|
//多搜索条件
|
||||
|
opt.searchType = opt.searchType || 'one'; |
||||
|
opt.searchList = opt.searchList || [{key: opt.searchKey, placeholder: opt.searchPlaceholder}]; |
||||
|
|
||||
|
elem.off('click').on('click', function(e) { |
||||
|
e.stopPropagation(); |
||||
|
|
||||
|
if($('div.tableSelect').length >= 1){ |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
var t = elem.offset().top + elem.outerHeight()+"px"; |
||||
|
var l = elem.offset().left +"px"; |
||||
|
var tableName = "tableSelect_table_" + new Date().getTime(); |
||||
|
var tableBox = '<div class="tableSelect layui-anim layui-anim-upbit" style="left:'+l+';top:'+t+';border: 1px solid #d2d2d2;background-color: #fff;box-shadow: 0 2px 4px rgba(0,0,0,.12);padding:10px 10px 0 10px;position: absolute;z-index:66666666;margin: 5px 0;border-radius: 2px;min-width:'+opt.width+'px;">'; |
||||
|
tableBox += '<div class="tableSelectBar">'; |
||||
|
tableBox += '<form class="layui-form" action="" style="display:inline-block;">'; |
||||
|
|
||||
|
//判断是否多搜索条件
|
||||
|
if(opt.searchType == 'more'){ |
||||
|
$.each(opt.searchList, function (index, item) { |
||||
|
tableBox += '<input style="display:inline-block;width:190px;height:30px;vertical-align:middle;margin-right:-1px;border: 1px solid #C9C9C9;" type="text" name="'+item.searchKey+'" placeholder="'+item.searchPlaceholder+'" autocomplete="off" class="layui-input">'; |
||||
|
}); |
||||
|
}else{ |
||||
|
tableBox += '<input style="display:inline-block;width:190px;height:30px;vertical-align:middle;margin-right:-1px;border: 1px solid #C9C9C9;" type="text" name="'+opt.searchKey+'" placeholder="'+opt.searchPlaceholder+'" autocomplete="off" class="layui-input">'; |
||||
|
} |
||||
|
|
||||
|
tableBox += '<button class="layui-btn layui-btn-sm layui-btn-primary tableSelect_btn_search" lay-submit lay-filter="tableSelect_btn_search"><i class="layui-icon layui-icon-search"></i></button>'; |
||||
|
tableBox += '</form>'; |
||||
|
tableBox += '<button style="float:right;" class="layui-btn layui-btn-sm tableSelect_btn_select">选择<span></span></button>'; |
||||
|
tableBox += '</div>'; |
||||
|
tableBox += '<table id="'+tableName+'" lay-filter="'+tableName+'"></table>'; |
||||
|
tableBox += '</div>'; |
||||
|
tableBox = $(tableBox); |
||||
|
$('body').append(tableBox); |
||||
|
|
||||
|
//数据缓存
|
||||
|
var checkedData = []; |
||||
|
|
||||
|
//渲染TABLE
|
||||
|
opt.table.elem = "#"+tableName; |
||||
|
opt.table.id = tableName; |
||||
|
opt.table.done = function(res, curr, count){ |
||||
|
defaultChecked(res, curr, count); |
||||
|
setChecked(res, curr, count); |
||||
|
tableDone(res, curr, count); |
||||
|
}; |
||||
|
var tableSelect_table = table.render(opt.table); |
||||
|
|
||||
|
//分页选中保存数组
|
||||
|
table.on('radio('+tableName+')', function(obj){ |
||||
|
if(opt.checkedKey){ |
||||
|
checkedData = table.checkStatus(tableName).data |
||||
|
} |
||||
|
updataButton(table.checkStatus(tableName).data.length) |
||||
|
}) |
||||
|
table.on('checkbox('+tableName+')', function(obj){ |
||||
|
if(opt.checkedKey){ |
||||
|
if(obj.checked){ |
||||
|
for (var i=0;i<table.checkStatus(tableName).data.length;i++){ |
||||
|
checkedData.push(table.checkStatus(tableName).data[i]) |
||||
|
} |
||||
|
}else{ |
||||
|
if(obj.type=='all'){ |
||||
|
for (var j=0;j<table.cache[tableName].length;j++) { |
||||
|
for (var i=0;i<checkedData.length;i++){ |
||||
|
if(checkedData[i][opt.checkedKey] == table.cache[tableName][j][opt.checkedKey]){ |
||||
|
checkedData.splice(i,1) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}else{ |
||||
|
//因为LAYUI问题,操作到变化全选状态时获取到的obj为空,这里用函数获取未选中的项。
|
||||
|
function nu (){ |
||||
|
var noCheckedKey = ''; |
||||
|
for (var i=0;i<table.cache[tableName].length;i++){ |
||||
|
if(!table.cache[tableName][i].LAY_CHECKED){ |
||||
|
noCheckedKey = table.cache[tableName][i][opt.checkedKey]; |
||||
|
} |
||||
|
} |
||||
|
return noCheckedKey |
||||
|
} |
||||
|
var noCheckedKey = obj.data[opt.checkedKey] || nu(); |
||||
|
for (var i=0;i<checkedData.length;i++){ |
||||
|
if(checkedData[i][opt.checkedKey] == noCheckedKey){ |
||||
|
checkedData.splice(i,1); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
checkedData = uniqueObjArray(checkedData, opt.checkedKey); |
||||
|
updataButton(checkedData.length) |
||||
|
}else{ |
||||
|
updataButton(table.checkStatus(tableName).data.length) |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
//渲染表格后选中
|
||||
|
function setChecked (res, curr, count) { |
||||
|
for(var i=0;i<res.data.length;i++){ |
||||
|
for (var j=0;j<checkedData.length;j++) { |
||||
|
if(res.data[i][opt.checkedKey] == checkedData[j][opt.checkedKey]){ |
||||
|
res.data[i].LAY_CHECKED = true; |
||||
|
var index= res.data[i]['LAY_TABLE_INDEX']; |
||||
|
var checkbox = $('#'+tableName+'').next().find('tr[data-index=' + index + '] input[type="checkbox"]'); |
||||
|
checkbox.prop('checked', true).next().addClass('layui-form-checked'); |
||||
|
var radio = $('#'+tableName+'').next().find('tr[data-index=' + index + '] input[type="radio"]'); |
||||
|
radio.prop('checked', true).next().addClass('layui-form-radioed').find("i").html(''); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
var checkStatus = table.checkStatus(tableName); |
||||
|
if(checkStatus.isAll){ |
||||
|
$('#'+tableName+'').next().find('.layui-table-header th[data-field="0"] input[type="checkbox"]').prop('checked', true); |
||||
|
$('#'+tableName+'').next().find('.layui-table-header th[data-field="0"] input[type="checkbox"]').next().addClass('layui-form-checked'); |
||||
|
} |
||||
|
updataButton(checkedData.length) |
||||
|
} |
||||
|
|
||||
|
//写入默认选中值(puash checkedData)
|
||||
|
function defaultChecked (res, curr, count){ |
||||
|
if(opt.checkedKey && elem.attr('ts-selected')){ |
||||
|
var selected = elem.attr('ts-selected').split(","); |
||||
|
for(var i=0;i<res.data.length;i++){ |
||||
|
for(var j=0;j<selected.length;j++){ |
||||
|
if(res.data[i][opt.checkedKey] == selected[j]){ |
||||
|
checkedData.push(res.data[i]) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
checkedData = uniqueObjArray(checkedData, opt.checkedKey); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//更新选中数量
|
||||
|
function updataButton (n) { |
||||
|
tableBox.find('.tableSelect_btn_select span').html(n==0?'':'('+n+')') |
||||
|
} |
||||
|
|
||||
|
//数组去重
|
||||
|
function uniqueObjArray(arr, type){ |
||||
|
var newArr = []; |
||||
|
var tArr = []; |
||||
|
if(arr.length == 0){ |
||||
|
return arr; |
||||
|
}else{ |
||||
|
if(type){ |
||||
|
for(var i=0;i<arr.length;i++){ |
||||
|
if(!tArr[arr[i][type]]){ |
||||
|
newArr.push(arr[i]); |
||||
|
tArr[arr[i][type]] = true; |
||||
|
} |
||||
|
} |
||||
|
return newArr; |
||||
|
}else{ |
||||
|
for(var i=0;i<arr.length;i++){ |
||||
|
if(!tArr[arr[i]]){ |
||||
|
newArr.push(arr[i]); |
||||
|
tArr[arr[i]] = true; |
||||
|
} |
||||
|
} |
||||
|
return newArr; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//FIX位置
|
||||
|
var overHeight = (elem.offset().top + elem.outerHeight() + tableBox.outerHeight() - $(window).scrollTop()) > $(window).height(); |
||||
|
var overWidth = (elem.offset().left + tableBox.outerWidth()) > $(window).width(); |
||||
|
overHeight && tableBox.css({'top':'auto','bottom':'0px'}); |
||||
|
overWidth && tableBox.css({'left':'auto','right':'5px'}) |
||||
|
|
||||
|
//关键词搜索
|
||||
|
form.on('submit(tableSelect_btn_search)', function(data){ |
||||
|
tableSelect_table.reload({ |
||||
|
where: data.field, |
||||
|
page: { |
||||
|
curr: 1 |
||||
|
} |
||||
|
}); |
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
//双击行选中
|
||||
|
table.on('rowDouble('+tableName+')', function(obj){ |
||||
|
var checkStatus = {data:[obj.data]}; |
||||
|
selectDone(checkStatus); |
||||
|
}) |
||||
|
|
||||
|
//按钮选中
|
||||
|
tableBox.find('.tableSelect_btn_select').on('click', function() { |
||||
|
var checkStatus = table.checkStatus(tableName); |
||||
|
if(checkedData.length > 1){ |
||||
|
checkStatus.data = checkedData; |
||||
|
} |
||||
|
selectDone(checkStatus); |
||||
|
}) |
||||
|
|
||||
|
//写值回调和关闭
|
||||
|
function selectDone (checkStatus){ |
||||
|
if(opt.checkedKey){ |
||||
|
var selected = []; |
||||
|
for(var i=0;i<checkStatus.data.length;i++){ |
||||
|
selected.push(checkStatus.data[i][opt.checkedKey]) |
||||
|
} |
||||
|
elem.attr("ts-selected",selected.join(",")); |
||||
|
} |
||||
|
opt.done(elem, checkStatus); |
||||
|
tableBox.remove(); |
||||
|
delete table.cache[tableName]; |
||||
|
checkedData = []; |
||||
|
} |
||||
|
|
||||
|
//点击其他区域关闭
|
||||
|
$(document).mouseup(function(e){ |
||||
|
var userSet_con = $(''+opt.elem+',.tableSelect'); |
||||
|
if(!userSet_con.is(e.target) && userSet_con.has(e.target).length === 0){ |
||||
|
tableBox.remove(); |
||||
|
delete table.cache[tableName]; |
||||
|
checkedData = []; |
||||
|
} |
||||
|
}); |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 隐藏选择器 |
||||
|
*/ |
||||
|
tableSelect.prototype.hide = function (opt) { |
||||
|
$('.tableSelect').remove(); |
||||
|
} |
||||
|
|
||||
|
//自动完成渲染
|
||||
|
var tableSelect = new tableSelect(); |
||||
|
|
||||
|
//FIX 滚动时错位
|
||||
|
if(window.top == window.self){ |
||||
|
$(window).scroll(function () { |
||||
|
tableSelect.hide(); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
exports(MOD_NAME, tableSelect); |
||||
|
}) |
||||
@ -0,0 +1,18 @@ |
|||||
|
.treeTable-empty { |
||||
|
width: 20px; |
||||
|
display: inline-block; |
||||
|
} |
||||
|
|
||||
|
.treeTable-icon { |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
|
||||
|
.treeTable-icon .layui-icon-triangle-d:before { |
||||
|
content: "\e623"; |
||||
|
} |
||||
|
|
||||
|
.treeTable-icon.open .layui-icon-triangle-d:before { |
||||
|
content: "\e625"; |
||||
|
background-color: transparent; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,206 @@ |
|||||
|
layui.define(['layer', 'table'], function (exports) { |
||||
|
var $ = layui.jquery; |
||||
|
var layer = layui.layer; |
||||
|
var table = layui.table; |
||||
|
|
||||
|
var treetable = { |
||||
|
// 渲染树形表格
|
||||
|
render: function (param) { |
||||
|
// 检查参数
|
||||
|
if (!treetable.checkParam(param)) { |
||||
|
return; |
||||
|
} |
||||
|
// 获取数据
|
||||
|
if (param.data) { |
||||
|
treetable.init(param, param.data); |
||||
|
} else { |
||||
|
$.getJSON(param.url, param.where, function (res) { |
||||
|
treetable.init(param, res.data); |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
// 渲染表格
|
||||
|
init: function (param, data) { |
||||
|
var mData = []; |
||||
|
var doneCallback = param.done; |
||||
|
var tNodes = data; |
||||
|
// 补上id和pid字段
|
||||
|
for (var i = 0; i < tNodes.length; i++) { |
||||
|
var tt = tNodes[i]; |
||||
|
if (!tt.id) { |
||||
|
if (!param.treeIdName) { |
||||
|
layer.msg('参数treeIdName不能为空', {icon: 5}); |
||||
|
return; |
||||
|
} |
||||
|
tt.id = tt[param.treeIdName]; |
||||
|
} |
||||
|
if (!tt.pid) { |
||||
|
if (!param.treePidName) { |
||||
|
layer.msg('参数treePidName不能为空', {icon: 5}); |
||||
|
return; |
||||
|
} |
||||
|
tt.pid = tt[param.treePidName]; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 对数据进行排序
|
||||
|
var sort = function (s_pid, data) { |
||||
|
for (var i = 0; i < data.length; i++) { |
||||
|
if (data[i].pid == s_pid) { |
||||
|
var len = mData.length; |
||||
|
if (len > 0 && mData[len - 1].id == s_pid) { |
||||
|
mData[len - 1].isParent = true; |
||||
|
} |
||||
|
mData.push(data[i]); |
||||
|
sort(data[i].id, data); |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
sort(param.treeSpid, tNodes); |
||||
|
|
||||
|
// 重写参数
|
||||
|
param.url = undefined; |
||||
|
param.data = mData; |
||||
|
param.page = { |
||||
|
count: param.data.length, |
||||
|
limit: param.data.length |
||||
|
}; |
||||
|
param.cols[0][param.treeColIndex].templet = function (d) { |
||||
|
var mId = d.id; |
||||
|
var mPid = d.pid; |
||||
|
var isDir = d.isParent; |
||||
|
var emptyNum = treetable.getEmptyNum(mPid, mData); |
||||
|
var iconHtml = ''; |
||||
|
for (var i = 0; i < emptyNum; i++) { |
||||
|
iconHtml += '<span class="treeTable-empty"></span>'; |
||||
|
} |
||||
|
if (isDir) { |
||||
|
iconHtml += '<i class="layui-icon layui-icon-triangle-d"></i> <i class="layui-icon layui-icon-layer"></i>'; |
||||
|
} else { |
||||
|
iconHtml += '<i class="layui-icon layui-icon-file"></i>'; |
||||
|
} |
||||
|
iconHtml += ' '; |
||||
|
var ttype = isDir ? 'dir' : 'file'; |
||||
|
var vg = '<span class="treeTable-icon open" lay-tid="' + mId + '" lay-tpid="' + mPid + '" lay-ttype="' + ttype + '">'; |
||||
|
return vg + iconHtml + d[param.cols[0][param.treeColIndex].field] + '</span>' |
||||
|
}; |
||||
|
|
||||
|
param.done = function (res, curr, count) { |
||||
|
$(param.elem).next().addClass('treeTable'); |
||||
|
$('.treeTable .layui-table-page').css('display', 'none'); |
||||
|
$(param.elem).next().attr('treeLinkage', param.treeLinkage); |
||||
|
// 绑定事件换成对body绑定
|
||||
|
/*$('.treeTable .treeTable-icon').click(function () { |
||||
|
treetable.toggleRows($(this), param.treeLinkage); |
||||
|
});*/ |
||||
|
if (param.treeDefaultClose) { |
||||
|
treetable.foldAll(param.elem); |
||||
|
} |
||||
|
if (doneCallback) { |
||||
|
doneCallback(res, curr, count); |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
// 渲染表格
|
||||
|
table.render(param); |
||||
|
}, |
||||
|
// 计算缩进的数量
|
||||
|
getEmptyNum: function (pid, data) { |
||||
|
var num = 0; |
||||
|
if (!pid) { |
||||
|
return num; |
||||
|
} |
||||
|
var tPid; |
||||
|
for (var i = 0; i < data.length; i++) { |
||||
|
if (pid == data[i].id) { |
||||
|
num += 1; |
||||
|
tPid = data[i].pid; |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
return num + treetable.getEmptyNum(tPid, data); |
||||
|
}, |
||||
|
// 展开/折叠行
|
||||
|
toggleRows: function ($dom, linkage) { |
||||
|
var type = $dom.attr('lay-ttype'); |
||||
|
if ('file' == type) { |
||||
|
return; |
||||
|
} |
||||
|
var mId = $dom.attr('lay-tid'); |
||||
|
var isOpen = $dom.hasClass('open'); |
||||
|
if (isOpen) { |
||||
|
$dom.removeClass('open'); |
||||
|
} else { |
||||
|
$dom.addClass('open'); |
||||
|
} |
||||
|
$dom.closest('tbody').find('tr').each(function () { |
||||
|
var $ti = $(this).find('.treeTable-icon'); |
||||
|
var pid = $ti.attr('lay-tpid'); |
||||
|
var ttype = $ti.attr('lay-ttype'); |
||||
|
var tOpen = $ti.hasClass('open'); |
||||
|
if (mId == pid) { |
||||
|
if (isOpen) { |
||||
|
$(this).hide(); |
||||
|
if ('dir' == ttype && tOpen == isOpen) { |
||||
|
$ti.trigger('click'); |
||||
|
} |
||||
|
} else { |
||||
|
$(this).show(); |
||||
|
if (linkage && 'dir' == ttype && tOpen == isOpen) { |
||||
|
$ti.trigger('click'); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
// 检查参数
|
||||
|
checkParam: function (param) { |
||||
|
if (!param.treeSpid && param.treeSpid != 0) { |
||||
|
layer.msg('参数treeSpid不能为空', {icon: 5}); |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
if (!param.treeColIndex && param.treeColIndex != 0) { |
||||
|
layer.msg('参数treeColIndex不能为空', {icon: 5}); |
||||
|
return false; |
||||
|
} |
||||
|
return true; |
||||
|
}, |
||||
|
// 展开所有
|
||||
|
expandAll: function (dom) { |
||||
|
$(dom).next('.treeTable').find('.layui-table-body tbody tr').each(function () { |
||||
|
var $ti = $(this).find('.treeTable-icon'); |
||||
|
var ttype = $ti.attr('lay-ttype'); |
||||
|
var tOpen = $ti.hasClass('open'); |
||||
|
if ('dir' == ttype && !tOpen) { |
||||
|
$ti.trigger('click'); |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
// 折叠所有
|
||||
|
foldAll: function (dom) { |
||||
|
$(dom).next('.treeTable').find('.layui-table-body tbody tr').each(function () { |
||||
|
var $ti = $(this).find('.treeTable-icon'); |
||||
|
var ttype = $ti.attr('lay-ttype'); |
||||
|
var tOpen = $ti.hasClass('open'); |
||||
|
if ('dir' == ttype && tOpen) { |
||||
|
$ti.trigger('click'); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
layui.link(layui.cache.base + 'treetable-lay/treetable.css'); |
||||
|
|
||||
|
// 给图标列绑定事件
|
||||
|
$('body').on('click', '.treeTable .treeTable-icon', function () { |
||||
|
var treeLinkage = $(this).parents('.treeTable').attr('treeLinkage'); |
||||
|
if ('true' == treeLinkage) { |
||||
|
treetable.toggleRows($(this), true); |
||||
|
} else { |
||||
|
treetable.toggleRows($(this), false); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
exports('treetable', treetable); |
||||
|
}); |
||||
@ -0,0 +1,7 @@ |
|||||
|
I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, |
||||
|
Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, |
||||
|
comprehensive icon sets or copy and paste your own. |
||||
|
|
||||
|
Please. Check it out. |
||||
|
|
||||
|
-Dave Gandy |
||||
|
After Width: | Height: | Size: 434 KiB |
@ -0,0 +1,34 @@ |
|||||
|
// Animated Icons |
||||
|
// -------------------------- |
||||
|
|
||||
|
.@{fa-css-prefix}-spin { |
||||
|
-webkit-animation: fa-spin 2s infinite linear; |
||||
|
animation: fa-spin 2s infinite linear; |
||||
|
} |
||||
|
|
||||
|
.@{fa-css-prefix}-pulse { |
||||
|
-webkit-animation: fa-spin 1s infinite steps(8); |
||||
|
animation: fa-spin 1s infinite steps(8); |
||||
|
} |
||||
|
|
||||
|
@-webkit-keyframes fa-spin { |
||||
|
0% { |
||||
|
-webkit-transform: rotate(0deg); |
||||
|
transform: rotate(0deg); |
||||
|
} |
||||
|
100% { |
||||
|
-webkit-transform: rotate(359deg); |
||||
|
transform: rotate(359deg); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@keyframes fa-spin { |
||||
|
0% { |
||||
|
-webkit-transform: rotate(0deg); |
||||
|
transform: rotate(0deg); |
||||
|
} |
||||
|
100% { |
||||
|
-webkit-transform: rotate(359deg); |
||||
|
transform: rotate(359deg); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
// Bordered & Pulled |
||||
|
// ------------------------- |
||||
|
|
||||
|
.@{fa-css-prefix}-border { |
||||
|
padding: .2em .25em .15em; |
||||
|
border: solid .08em @fa-border-color; |
||||
|
border-radius: .1em; |
||||
|
} |
||||
|
|
||||
|
.@{fa-css-prefix}-pull-left { float: left; } |
||||
|
.@{fa-css-prefix}-pull-right { float: right; } |
||||
|
|
||||
|
.@{fa-css-prefix} { |
||||
|
&.@{fa-css-prefix}-pull-left { margin-right: .3em; } |
||||
|
&.@{fa-css-prefix}-pull-right { margin-left: .3em; } |
||||
|
} |
||||
|
|
||||
|
/* Deprecated as of 4.4.0 */ |
||||
|
.pull-right { float: right; } |
||||
|
.pull-left { float: left; } |
||||
|
|
||||
|
.@{fa-css-prefix} { |
||||
|
&.pull-left { margin-right: .3em; } |
||||
|
&.pull-right { margin-left: .3em; } |
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
// Base Class Definition |
||||
|
// ------------------------- |
||||
|
|
||||
|
.@{fa-css-prefix} { |
||||
|
display: inline-block; |
||||
|
font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration |
||||
|
font-size: inherit; // can't have font-size inherit on line above, so need to override |
||||
|
text-rendering: auto; // optimizelegibility throws things off #1094 |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,6 @@ |
|||||
|
// Fixed Width Icons |
||||
|
// ------------------------- |
||||
|
.@{fa-css-prefix}-fw { |
||||
|
width: (18em / 14); |
||||
|
text-align: center; |
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
/*! |
||||
|
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome |
||||
|
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) |
||||
|
*/ |
||||
|
|
||||
|
@import "variables.less"; |
||||
|
@import "mixins.less"; |
||||
|
@import "path.less"; |
||||
|
@import "core.less"; |
||||
|
@import "larger.less"; |
||||
|
@import "fixed-width.less"; |
||||
|
@import "list.less"; |
||||
|
@import "bordered-pulled.less"; |
||||
|
@import "animated.less"; |
||||
|
@import "rotated-flipped.less"; |
||||
|
@import "stacked.less"; |
||||
|
@import "icons.less"; |
||||
|
@import "screen-reader.less"; |
||||
@ -0,0 +1,789 @@ |
|||||
|
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen |
||||
|
readers do not read off random characters that represent icons */ |
||||
|
|
||||
|
.@{fa-css-prefix}-glass:before { content: @fa-var-glass; } |
||||
|
.@{fa-css-prefix}-music:before { content: @fa-var-music; } |
||||
|
.@{fa-css-prefix}-search:before { content: @fa-var-search; } |
||||
|
.@{fa-css-prefix}-envelope-o:before { content: @fa-var-envelope-o; } |
||||
|
.@{fa-css-prefix}-heart:before { content: @fa-var-heart; } |
||||
|
.@{fa-css-prefix}-star:before { content: @fa-var-star; } |
||||
|
.@{fa-css-prefix}-star-o:before { content: @fa-var-star-o; } |
||||
|
.@{fa-css-prefix}-user:before { content: @fa-var-user; } |
||||
|
.@{fa-css-prefix}-film:before { content: @fa-var-film; } |
||||
|
.@{fa-css-prefix}-th-large:before { content: @fa-var-th-large; } |
||||
|
.@{fa-css-prefix}-th:before { content: @fa-var-th; } |
||||
|
.@{fa-css-prefix}-th-list:before { content: @fa-var-th-list; } |
||||
|
.@{fa-css-prefix}-check:before { content: @fa-var-check; } |
||||
|
.@{fa-css-prefix}-remove:before, |
||||
|
.@{fa-css-prefix}-close:before, |
||||
|
.@{fa-css-prefix}-times:before { content: @fa-var-times; } |
||||
|
.@{fa-css-prefix}-search-plus:before { content: @fa-var-search-plus; } |
||||
|
.@{fa-css-prefix}-search-minus:before { content: @fa-var-search-minus; } |
||||
|
.@{fa-css-prefix}-power-off:before { content: @fa-var-power-off; } |
||||
|
.@{fa-css-prefix}-signal:before { content: @fa-var-signal; } |
||||
|
.@{fa-css-prefix}-gear:before, |
||||
|
.@{fa-css-prefix}-cog:before { content: @fa-var-cog; } |
||||
|
.@{fa-css-prefix}-trash-o:before { content: @fa-var-trash-o; } |
||||
|
.@{fa-css-prefix}-home:before { content: @fa-var-home; } |
||||
|
.@{fa-css-prefix}-file-o:before { content: @fa-var-file-o; } |
||||
|
.@{fa-css-prefix}-clock-o:before { content: @fa-var-clock-o; } |
||||
|
.@{fa-css-prefix}-road:before { content: @fa-var-road; } |
||||
|
.@{fa-css-prefix}-download:before { content: @fa-var-download; } |
||||
|
.@{fa-css-prefix}-arrow-circle-o-down:before { content: @fa-var-arrow-circle-o-down; } |
||||
|
.@{fa-css-prefix}-arrow-circle-o-up:before { content: @fa-var-arrow-circle-o-up; } |
||||
|
.@{fa-css-prefix}-inbox:before { content: @fa-var-inbox; } |
||||
|
.@{fa-css-prefix}-play-circle-o:before { content: @fa-var-play-circle-o; } |
||||
|
.@{fa-css-prefix}-rotate-right:before, |
||||
|
.@{fa-css-prefix}-repeat:before { content: @fa-var-repeat; } |
||||
|
.@{fa-css-prefix}-refresh:before { content: @fa-var-refresh; } |
||||
|
.@{fa-css-prefix}-list-alt:before { content: @fa-var-list-alt; } |
||||
|
.@{fa-css-prefix}-lock:before { content: @fa-var-lock; } |
||||
|
.@{fa-css-prefix}-flag:before { content: @fa-var-flag; } |
||||
|
.@{fa-css-prefix}-headphones:before { content: @fa-var-headphones; } |
||||
|
.@{fa-css-prefix}-volume-off:before { content: @fa-var-volume-off; } |
||||
|
.@{fa-css-prefix}-volume-down:before { content: @fa-var-volume-down; } |
||||
|
.@{fa-css-prefix}-volume-up:before { content: @fa-var-volume-up; } |
||||
|
.@{fa-css-prefix}-qrcode:before { content: @fa-var-qrcode; } |
||||
|
.@{fa-css-prefix}-barcode:before { content: @fa-var-barcode; } |
||||
|
.@{fa-css-prefix}-tag:before { content: @fa-var-tag; } |
||||
|
.@{fa-css-prefix}-tags:before { content: @fa-var-tags; } |
||||
|
.@{fa-css-prefix}-book:before { content: @fa-var-book; } |
||||
|
.@{fa-css-prefix}-bookmark:before { content: @fa-var-bookmark; } |
||||
|
.@{fa-css-prefix}-print:before { content: @fa-var-print; } |
||||
|
.@{fa-css-prefix}-camera:before { content: @fa-var-camera; } |
||||
|
.@{fa-css-prefix}-font:before { content: @fa-var-font; } |
||||
|
.@{fa-css-prefix}-bold:before { content: @fa-var-bold; } |
||||
|
.@{fa-css-prefix}-italic:before { content: @fa-var-italic; } |
||||
|
.@{fa-css-prefix}-text-height:before { content: @fa-var-text-height; } |
||||
|
.@{fa-css-prefix}-text-width:before { content: @fa-var-text-width; } |
||||
|
.@{fa-css-prefix}-align-left:before { content: @fa-var-align-left; } |
||||
|
.@{fa-css-prefix}-align-center:before { content: @fa-var-align-center; } |
||||
|
.@{fa-css-prefix}-align-right:before { content: @fa-var-align-right; } |
||||
|
.@{fa-css-prefix}-align-justify:before { content: @fa-var-align-justify; } |
||||
|
.@{fa-css-prefix}-list:before { content: @fa-var-list; } |
||||
|
.@{fa-css-prefix}-dedent:before, |
||||
|
.@{fa-css-prefix}-outdent:before { content: @fa-var-outdent; } |
||||
|
.@{fa-css-prefix}-indent:before { content: @fa-var-indent; } |
||||
|
.@{fa-css-prefix}-video-camera:before { content: @fa-var-video-camera; } |
||||
|
.@{fa-css-prefix}-photo:before, |
||||
|
.@{fa-css-prefix}-image:before, |
||||
|
.@{fa-css-prefix}-picture-o:before { content: @fa-var-picture-o; } |
||||
|
.@{fa-css-prefix}-pencil:before { content: @fa-var-pencil; } |
||||
|
.@{fa-css-prefix}-map-marker:before { content: @fa-var-map-marker; } |
||||
|
.@{fa-css-prefix}-adjust:before { content: @fa-var-adjust; } |
||||
|
.@{fa-css-prefix}-tint:before { content: @fa-var-tint; } |
||||
|
.@{fa-css-prefix}-edit:before, |
||||
|
.@{fa-css-prefix}-pencil-square-o:before { content: @fa-var-pencil-square-o; } |
||||
|
.@{fa-css-prefix}-share-square-o:before { content: @fa-var-share-square-o; } |
||||
|
.@{fa-css-prefix}-check-square-o:before { content: @fa-var-check-square-o; } |
||||
|
.@{fa-css-prefix}-arrows:before { content: @fa-var-arrows; } |
||||
|
.@{fa-css-prefix}-step-backward:before { content: @fa-var-step-backward; } |
||||
|
.@{fa-css-prefix}-fast-backward:before { content: @fa-var-fast-backward; } |
||||
|
.@{fa-css-prefix}-backward:before { content: @fa-var-backward; } |
||||
|
.@{fa-css-prefix}-play:before { content: @fa-var-play; } |
||||
|
.@{fa-css-prefix}-pause:before { content: @fa-var-pause; } |
||||
|
.@{fa-css-prefix}-stop:before { content: @fa-var-stop; } |
||||
|
.@{fa-css-prefix}-forward:before { content: @fa-var-forward; } |
||||
|
.@{fa-css-prefix}-fast-forward:before { content: @fa-var-fast-forward; } |
||||
|
.@{fa-css-prefix}-step-forward:before { content: @fa-var-step-forward; } |
||||
|
.@{fa-css-prefix}-eject:before { content: @fa-var-eject; } |
||||
|
.@{fa-css-prefix}-chevron-left:before { content: @fa-var-chevron-left; } |
||||
|
.@{fa-css-prefix}-chevron-right:before { content: @fa-var-chevron-right; } |
||||
|
.@{fa-css-prefix}-plus-circle:before { content: @fa-var-plus-circle; } |
||||
|
.@{fa-css-prefix}-minus-circle:before { content: @fa-var-minus-circle; } |
||||
|
.@{fa-css-prefix}-times-circle:before { content: @fa-var-times-circle; } |
||||
|
.@{fa-css-prefix}-check-circle:before { content: @fa-var-check-circle; } |
||||
|
.@{fa-css-prefix}-question-circle:before { content: @fa-var-question-circle; } |
||||
|
.@{fa-css-prefix}-info-circle:before { content: @fa-var-info-circle; } |
||||
|
.@{fa-css-prefix}-crosshairs:before { content: @fa-var-crosshairs; } |
||||
|
.@{fa-css-prefix}-times-circle-o:before { content: @fa-var-times-circle-o; } |
||||
|
.@{fa-css-prefix}-check-circle-o:before { content: @fa-var-check-circle-o; } |
||||
|
.@{fa-css-prefix}-ban:before { content: @fa-var-ban; } |
||||
|
.@{fa-css-prefix}-arrow-left:before { content: @fa-var-arrow-left; } |
||||
|
.@{fa-css-prefix}-arrow-right:before { content: @fa-var-arrow-right; } |
||||
|
.@{fa-css-prefix}-arrow-up:before { content: @fa-var-arrow-up; } |
||||
|
.@{fa-css-prefix}-arrow-down:before { content: @fa-var-arrow-down; } |
||||
|
.@{fa-css-prefix}-mail-forward:before, |
||||
|
.@{fa-css-prefix}-share:before { content: @fa-var-share; } |
||||
|
.@{fa-css-prefix}-expand:before { content: @fa-var-expand; } |
||||
|
.@{fa-css-prefix}-compress:before { content: @fa-var-compress; } |
||||
|
.@{fa-css-prefix}-plus:before { content: @fa-var-plus; } |
||||
|
.@{fa-css-prefix}-minus:before { content: @fa-var-minus; } |
||||
|
.@{fa-css-prefix}-asterisk:before { content: @fa-var-asterisk; } |
||||
|
.@{fa-css-prefix}-exclamation-circle:before { content: @fa-var-exclamation-circle; } |
||||
|
.@{fa-css-prefix}-gift:before { content: @fa-var-gift; } |
||||
|
.@{fa-css-prefix}-leaf:before { content: @fa-var-leaf; } |
||||
|
.@{fa-css-prefix}-fire:before { content: @fa-var-fire; } |
||||
|
.@{fa-css-prefix}-eye:before { content: @fa-var-eye; } |
||||
|
.@{fa-css-prefix}-eye-slash:before { content: @fa-var-eye-slash; } |
||||
|
.@{fa-css-prefix}-warning:before, |
||||
|
.@{fa-css-prefix}-exclamation-triangle:before { content: @fa-var-exclamation-triangle; } |
||||
|
.@{fa-css-prefix}-plane:before { content: @fa-var-plane; } |
||||
|
.@{fa-css-prefix}-calendar:before { content: @fa-var-calendar; } |
||||
|
.@{fa-css-prefix}-random:before { content: @fa-var-random; } |
||||
|
.@{fa-css-prefix}-comment:before { content: @fa-var-comment; } |
||||
|
.@{fa-css-prefix}-magnet:before { content: @fa-var-magnet; } |
||||
|
.@{fa-css-prefix}-chevron-up:before { content: @fa-var-chevron-up; } |
||||
|
.@{fa-css-prefix}-chevron-down:before { content: @fa-var-chevron-down; } |
||||
|
.@{fa-css-prefix}-retweet:before { content: @fa-var-retweet; } |
||||
|
.@{fa-css-prefix}-shopping-cart:before { content: @fa-var-shopping-cart; } |
||||
|
.@{fa-css-prefix}-folder:before { content: @fa-var-folder; } |
||||
|
.@{fa-css-prefix}-folder-open:before { content: @fa-var-folder-open; } |
||||
|
.@{fa-css-prefix}-arrows-v:before { content: @fa-var-arrows-v; } |
||||
|
.@{fa-css-prefix}-arrows-h:before { content: @fa-var-arrows-h; } |
||||
|
.@{fa-css-prefix}-bar-chart-o:before, |
||||
|
.@{fa-css-prefix}-bar-chart:before { content: @fa-var-bar-chart; } |
||||
|
.@{fa-css-prefix}-twitter-square:before { content: @fa-var-twitter-square; } |
||||
|
.@{fa-css-prefix}-facebook-square:before { content: @fa-var-facebook-square; } |
||||
|
.@{fa-css-prefix}-camera-retro:before { content: @fa-var-camera-retro; } |
||||
|
.@{fa-css-prefix}-key:before { content: @fa-var-key; } |
||||
|
.@{fa-css-prefix}-gears:before, |
||||
|
.@{fa-css-prefix}-cogs:before { content: @fa-var-cogs; } |
||||
|
.@{fa-css-prefix}-comments:before { content: @fa-var-comments; } |
||||
|
.@{fa-css-prefix}-thumbs-o-up:before { content: @fa-var-thumbs-o-up; } |
||||
|
.@{fa-css-prefix}-thumbs-o-down:before { content: @fa-var-thumbs-o-down; } |
||||
|
.@{fa-css-prefix}-star-half:before { content: @fa-var-star-half; } |
||||
|
.@{fa-css-prefix}-heart-o:before { content: @fa-var-heart-o; } |
||||
|
.@{fa-css-prefix}-sign-out:before { content: @fa-var-sign-out; } |
||||
|
.@{fa-css-prefix}-linkedin-square:before { content: @fa-var-linkedin-square; } |
||||
|
.@{fa-css-prefix}-thumb-tack:before { content: @fa-var-thumb-tack; } |
||||
|
.@{fa-css-prefix}-external-link:before { content: @fa-var-external-link; } |
||||
|
.@{fa-css-prefix}-sign-in:before { content: @fa-var-sign-in; } |
||||
|
.@{fa-css-prefix}-trophy:before { content: @fa-var-trophy; } |
||||
|
.@{fa-css-prefix}-github-square:before { content: @fa-var-github-square; } |
||||
|
.@{fa-css-prefix}-upload:before { content: @fa-var-upload; } |
||||
|
.@{fa-css-prefix}-lemon-o:before { content: @fa-var-lemon-o; } |
||||
|
.@{fa-css-prefix}-phone:before { content: @fa-var-phone; } |
||||
|
.@{fa-css-prefix}-square-o:before { content: @fa-var-square-o; } |
||||
|
.@{fa-css-prefix}-bookmark-o:before { content: @fa-var-bookmark-o; } |
||||
|
.@{fa-css-prefix}-phone-square:before { content: @fa-var-phone-square; } |
||||
|
.@{fa-css-prefix}-twitter:before { content: @fa-var-twitter; } |
||||
|
.@{fa-css-prefix}-facebook-f:before, |
||||
|
.@{fa-css-prefix}-facebook:before { content: @fa-var-facebook; } |
||||
|
.@{fa-css-prefix}-github:before { content: @fa-var-github; } |
||||
|
.@{fa-css-prefix}-unlock:before { content: @fa-var-unlock; } |
||||
|
.@{fa-css-prefix}-credit-card:before { content: @fa-var-credit-card; } |
||||
|
.@{fa-css-prefix}-feed:before, |
||||
|
.@{fa-css-prefix}-rss:before { content: @fa-var-rss; } |
||||
|
.@{fa-css-prefix}-hdd-o:before { content: @fa-var-hdd-o; } |
||||
|
.@{fa-css-prefix}-bullhorn:before { content: @fa-var-bullhorn; } |
||||
|
.@{fa-css-prefix}-bell:before { content: @fa-var-bell; } |
||||
|
.@{fa-css-prefix}-certificate:before { content: @fa-var-certificate; } |
||||
|
.@{fa-css-prefix}-hand-o-right:before { content: @fa-var-hand-o-right; } |
||||
|
.@{fa-css-prefix}-hand-o-left:before { content: @fa-var-hand-o-left; } |
||||
|
.@{fa-css-prefix}-hand-o-up:before { content: @fa-var-hand-o-up; } |
||||
|
.@{fa-css-prefix}-hand-o-down:before { content: @fa-var-hand-o-down; } |
||||
|
.@{fa-css-prefix}-arrow-circle-left:before { content: @fa-var-arrow-circle-left; } |
||||
|
.@{fa-css-prefix}-arrow-circle-right:before { content: @fa-var-arrow-circle-right; } |
||||
|
.@{fa-css-prefix}-arrow-circle-up:before { content: @fa-var-arrow-circle-up; } |
||||
|
.@{fa-css-prefix}-arrow-circle-down:before { content: @fa-var-arrow-circle-down; } |
||||
|
.@{fa-css-prefix}-globe:before { content: @fa-var-globe; } |
||||
|
.@{fa-css-prefix}-wrench:before { content: @fa-var-wrench; } |
||||
|
.@{fa-css-prefix}-tasks:before { content: @fa-var-tasks; } |
||||
|
.@{fa-css-prefix}-filter:before { content: @fa-var-filter; } |
||||
|
.@{fa-css-prefix}-briefcase:before { content: @fa-var-briefcase; } |
||||
|
.@{fa-css-prefix}-arrows-alt:before { content: @fa-var-arrows-alt; } |
||||
|
.@{fa-css-prefix}-group:before, |
||||
|
.@{fa-css-prefix}-users:before { content: @fa-var-users; } |
||||
|
.@{fa-css-prefix}-chain:before, |
||||
|
.@{fa-css-prefix}-link:before { content: @fa-var-link; } |
||||
|
.@{fa-css-prefix}-cloud:before { content: @fa-var-cloud; } |
||||
|
.@{fa-css-prefix}-flask:before { content: @fa-var-flask; } |
||||
|
.@{fa-css-prefix}-cut:before, |
||||
|
.@{fa-css-prefix}-scissors:before { content: @fa-var-scissors; } |
||||
|
.@{fa-css-prefix}-copy:before, |
||||
|
.@{fa-css-prefix}-files-o:before { content: @fa-var-files-o; } |
||||
|
.@{fa-css-prefix}-paperclip:before { content: @fa-var-paperclip; } |
||||
|
.@{fa-css-prefix}-save:before, |
||||
|
.@{fa-css-prefix}-floppy-o:before { content: @fa-var-floppy-o; } |
||||
|
.@{fa-css-prefix}-square:before { content: @fa-var-square; } |
||||
|
.@{fa-css-prefix}-navicon:before, |
||||
|
.@{fa-css-prefix}-reorder:before, |
||||
|
.@{fa-css-prefix}-bars:before { content: @fa-var-bars; } |
||||
|
.@{fa-css-prefix}-list-ul:before { content: @fa-var-list-ul; } |
||||
|
.@{fa-css-prefix}-list-ol:before { content: @fa-var-list-ol; } |
||||
|
.@{fa-css-prefix}-strikethrough:before { content: @fa-var-strikethrough; } |
||||
|
.@{fa-css-prefix}-underline:before { content: @fa-var-underline; } |
||||
|
.@{fa-css-prefix}-table:before { content: @fa-var-table; } |
||||
|
.@{fa-css-prefix}-magic:before { content: @fa-var-magic; } |
||||
|
.@{fa-css-prefix}-truck:before { content: @fa-var-truck; } |
||||
|
.@{fa-css-prefix}-pinterest:before { content: @fa-var-pinterest; } |
||||
|
.@{fa-css-prefix}-pinterest-square:before { content: @fa-var-pinterest-square; } |
||||
|
.@{fa-css-prefix}-google-plus-square:before { content: @fa-var-google-plus-square; } |
||||
|
.@{fa-css-prefix}-google-plus:before { content: @fa-var-google-plus; } |
||||
|
.@{fa-css-prefix}-money:before { content: @fa-var-money; } |
||||
|
.@{fa-css-prefix}-caret-down:before { content: @fa-var-caret-down; } |
||||
|
.@{fa-css-prefix}-caret-up:before { content: @fa-var-caret-up; } |
||||
|
.@{fa-css-prefix}-caret-left:before { content: @fa-var-caret-left; } |
||||
|
.@{fa-css-prefix}-caret-right:before { content: @fa-var-caret-right; } |
||||
|
.@{fa-css-prefix}-columns:before { content: @fa-var-columns; } |
||||
|
.@{fa-css-prefix}-unsorted:before, |
||||
|
.@{fa-css-prefix}-sort:before { content: @fa-var-sort; } |
||||
|
.@{fa-css-prefix}-sort-down:before, |
||||
|
.@{fa-css-prefix}-sort-desc:before { content: @fa-var-sort-desc; } |
||||
|
.@{fa-css-prefix}-sort-up:before, |
||||
|
.@{fa-css-prefix}-sort-asc:before { content: @fa-var-sort-asc; } |
||||
|
.@{fa-css-prefix}-envelope:before { content: @fa-var-envelope; } |
||||
|
.@{fa-css-prefix}-linkedin:before { content: @fa-var-linkedin; } |
||||
|
.@{fa-css-prefix}-rotate-left:before, |
||||
|
.@{fa-css-prefix}-undo:before { content: @fa-var-undo; } |
||||
|
.@{fa-css-prefix}-legal:before, |
||||
|
.@{fa-css-prefix}-gavel:before { content: @fa-var-gavel; } |
||||
|
.@{fa-css-prefix}-dashboard:before, |
||||
|
.@{fa-css-prefix}-tachometer:before { content: @fa-var-tachometer; } |
||||
|
.@{fa-css-prefix}-comment-o:before { content: @fa-var-comment-o; } |
||||
|
.@{fa-css-prefix}-comments-o:before { content: @fa-var-comments-o; } |
||||
|
.@{fa-css-prefix}-flash:before, |
||||
|
.@{fa-css-prefix}-bolt:before { content: @fa-var-bolt; } |
||||
|
.@{fa-css-prefix}-sitemap:before { content: @fa-var-sitemap; } |
||||
|
.@{fa-css-prefix}-umbrella:before { content: @fa-var-umbrella; } |
||||
|
.@{fa-css-prefix}-paste:before, |
||||
|
.@{fa-css-prefix}-clipboard:before { content: @fa-var-clipboard; } |
||||
|
.@{fa-css-prefix}-lightbulb-o:before { content: @fa-var-lightbulb-o; } |
||||
|
.@{fa-css-prefix}-exchange:before { content: @fa-var-exchange; } |
||||
|
.@{fa-css-prefix}-cloud-download:before { content: @fa-var-cloud-download; } |
||||
|
.@{fa-css-prefix}-cloud-upload:before { content: @fa-var-cloud-upload; } |
||||
|
.@{fa-css-prefix}-user-md:before { content: @fa-var-user-md; } |
||||
|
.@{fa-css-prefix}-stethoscope:before { content: @fa-var-stethoscope; } |
||||
|
.@{fa-css-prefix}-suitcase:before { content: @fa-var-suitcase; } |
||||
|
.@{fa-css-prefix}-bell-o:before { content: @fa-var-bell-o; } |
||||
|
.@{fa-css-prefix}-coffee:before { content: @fa-var-coffee; } |
||||
|
.@{fa-css-prefix}-cutlery:before { content: @fa-var-cutlery; } |
||||
|
.@{fa-css-prefix}-file-text-o:before { content: @fa-var-file-text-o; } |
||||
|
.@{fa-css-prefix}-building-o:before { content: @fa-var-building-o; } |
||||
|
.@{fa-css-prefix}-hospital-o:before { content: @fa-var-hospital-o; } |
||||
|
.@{fa-css-prefix}-ambulance:before { content: @fa-var-ambulance; } |
||||
|
.@{fa-css-prefix}-medkit:before { content: @fa-var-medkit; } |
||||
|
.@{fa-css-prefix}-fighter-jet:before { content: @fa-var-fighter-jet; } |
||||
|
.@{fa-css-prefix}-beer:before { content: @fa-var-beer; } |
||||
|
.@{fa-css-prefix}-h-square:before { content: @fa-var-h-square; } |
||||
|
.@{fa-css-prefix}-plus-square:before { content: @fa-var-plus-square; } |
||||
|
.@{fa-css-prefix}-angle-double-left:before { content: @fa-var-angle-double-left; } |
||||
|
.@{fa-css-prefix}-angle-double-right:before { content: @fa-var-angle-double-right; } |
||||
|
.@{fa-css-prefix}-angle-double-up:before { content: @fa-var-angle-double-up; } |
||||
|
.@{fa-css-prefix}-angle-double-down:before { content: @fa-var-angle-double-down; } |
||||
|
.@{fa-css-prefix}-angle-left:before { content: @fa-var-angle-left; } |
||||
|
.@{fa-css-prefix}-angle-right:before { content: @fa-var-angle-right; } |
||||
|
.@{fa-css-prefix}-angle-up:before { content: @fa-var-angle-up; } |
||||
|
.@{fa-css-prefix}-angle-down:before { content: @fa-var-angle-down; } |
||||
|
.@{fa-css-prefix}-desktop:before { content: @fa-var-desktop; } |
||||
|
.@{fa-css-prefix}-laptop:before { content: @fa-var-laptop; } |
||||
|
.@{fa-css-prefix}-tablet:before { content: @fa-var-tablet; } |
||||
|
.@{fa-css-prefix}-mobile-phone:before, |
||||
|
.@{fa-css-prefix}-mobile:before { content: @fa-var-mobile; } |
||||
|
.@{fa-css-prefix}-circle-o:before { content: @fa-var-circle-o; } |
||||
|
.@{fa-css-prefix}-quote-left:before { content: @fa-var-quote-left; } |
||||
|
.@{fa-css-prefix}-quote-right:before { content: @fa-var-quote-right; } |
||||
|
.@{fa-css-prefix}-spinner:before { content: @fa-var-spinner; } |
||||
|
.@{fa-css-prefix}-circle:before { content: @fa-var-circle; } |
||||
|
.@{fa-css-prefix}-mail-reply:before, |
||||
|
.@{fa-css-prefix}-reply:before { content: @fa-var-reply; } |
||||
|
.@{fa-css-prefix}-github-alt:before { content: @fa-var-github-alt; } |
||||
|
.@{fa-css-prefix}-folder-o:before { content: @fa-var-folder-o; } |
||||
|
.@{fa-css-prefix}-folder-open-o:before { content: @fa-var-folder-open-o; } |
||||
|
.@{fa-css-prefix}-smile-o:before { content: @fa-var-smile-o; } |
||||
|
.@{fa-css-prefix}-frown-o:before { content: @fa-var-frown-o; } |
||||
|
.@{fa-css-prefix}-meh-o:before { content: @fa-var-meh-o; } |
||||
|
.@{fa-css-prefix}-gamepad:before { content: @fa-var-gamepad; } |
||||
|
.@{fa-css-prefix}-keyboard-o:before { content: @fa-var-keyboard-o; } |
||||
|
.@{fa-css-prefix}-flag-o:before { content: @fa-var-flag-o; } |
||||
|
.@{fa-css-prefix}-flag-checkered:before { content: @fa-var-flag-checkered; } |
||||
|
.@{fa-css-prefix}-terminal:before { content: @fa-var-terminal; } |
||||
|
.@{fa-css-prefix}-code:before { content: @fa-var-code; } |
||||
|
.@{fa-css-prefix}-mail-reply-all:before, |
||||
|
.@{fa-css-prefix}-reply-all:before { content: @fa-var-reply-all; } |
||||
|
.@{fa-css-prefix}-star-half-empty:before, |
||||
|
.@{fa-css-prefix}-star-half-full:before, |
||||
|
.@{fa-css-prefix}-star-half-o:before { content: @fa-var-star-half-o; } |
||||
|
.@{fa-css-prefix}-location-arrow:before { content: @fa-var-location-arrow; } |
||||
|
.@{fa-css-prefix}-crop:before { content: @fa-var-crop; } |
||||
|
.@{fa-css-prefix}-code-fork:before { content: @fa-var-code-fork; } |
||||
|
.@{fa-css-prefix}-unlink:before, |
||||
|
.@{fa-css-prefix}-chain-broken:before { content: @fa-var-chain-broken; } |
||||
|
.@{fa-css-prefix}-question:before { content: @fa-var-question; } |
||||
|
.@{fa-css-prefix}-info:before { content: @fa-var-info; } |
||||
|
.@{fa-css-prefix}-exclamation:before { content: @fa-var-exclamation; } |
||||
|
.@{fa-css-prefix}-superscript:before { content: @fa-var-superscript; } |
||||
|
.@{fa-css-prefix}-subscript:before { content: @fa-var-subscript; } |
||||
|
.@{fa-css-prefix}-eraser:before { content: @fa-var-eraser; } |
||||
|
.@{fa-css-prefix}-puzzle-piece:before { content: @fa-var-puzzle-piece; } |
||||
|
.@{fa-css-prefix}-microphone:before { content: @fa-var-microphone; } |
||||
|
.@{fa-css-prefix}-microphone-slash:before { content: @fa-var-microphone-slash; } |
||||
|
.@{fa-css-prefix}-shield:before { content: @fa-var-shield; } |
||||
|
.@{fa-css-prefix}-calendar-o:before { content: @fa-var-calendar-o; } |
||||
|
.@{fa-css-prefix}-fire-extinguisher:before { content: @fa-var-fire-extinguisher; } |
||||
|
.@{fa-css-prefix}-rocket:before { content: @fa-var-rocket; } |
||||
|
.@{fa-css-prefix}-maxcdn:before { content: @fa-var-maxcdn; } |
||||
|
.@{fa-css-prefix}-chevron-circle-left:before { content: @fa-var-chevron-circle-left; } |
||||
|
.@{fa-css-prefix}-chevron-circle-right:before { content: @fa-var-chevron-circle-right; } |
||||
|
.@{fa-css-prefix}-chevron-circle-up:before { content: @fa-var-chevron-circle-up; } |
||||
|
.@{fa-css-prefix}-chevron-circle-down:before { content: @fa-var-chevron-circle-down; } |
||||
|
.@{fa-css-prefix}-html5:before { content: @fa-var-html5; } |
||||
|
.@{fa-css-prefix}-css3:before { content: @fa-var-css3; } |
||||
|
.@{fa-css-prefix}-anchor:before { content: @fa-var-anchor; } |
||||
|
.@{fa-css-prefix}-unlock-alt:before { content: @fa-var-unlock-alt; } |
||||
|
.@{fa-css-prefix}-bullseye:before { content: @fa-var-bullseye; } |
||||
|
.@{fa-css-prefix}-ellipsis-h:before { content: @fa-var-ellipsis-h; } |
||||
|
.@{fa-css-prefix}-ellipsis-v:before { content: @fa-var-ellipsis-v; } |
||||
|
.@{fa-css-prefix}-rss-square:before { content: @fa-var-rss-square; } |
||||
|
.@{fa-css-prefix}-play-circle:before { content: @fa-var-play-circle; } |
||||
|
.@{fa-css-prefix}-ticket:before { content: @fa-var-ticket; } |
||||
|
.@{fa-css-prefix}-minus-square:before { content: @fa-var-minus-square; } |
||||
|
.@{fa-css-prefix}-minus-square-o:before { content: @fa-var-minus-square-o; } |
||||
|
.@{fa-css-prefix}-level-up:before { content: @fa-var-level-up; } |
||||
|
.@{fa-css-prefix}-level-down:before { content: @fa-var-level-down; } |
||||
|
.@{fa-css-prefix}-check-square:before { content: @fa-var-check-square; } |
||||
|
.@{fa-css-prefix}-pencil-square:before { content: @fa-var-pencil-square; } |
||||
|
.@{fa-css-prefix}-external-link-square:before { content: @fa-var-external-link-square; } |
||||
|
.@{fa-css-prefix}-share-square:before { content: @fa-var-share-square; } |
||||
|
.@{fa-css-prefix}-compass:before { content: @fa-var-compass; } |
||||
|
.@{fa-css-prefix}-toggle-down:before, |
||||
|
.@{fa-css-prefix}-caret-square-o-down:before { content: @fa-var-caret-square-o-down; } |
||||
|
.@{fa-css-prefix}-toggle-up:before, |
||||
|
.@{fa-css-prefix}-caret-square-o-up:before { content: @fa-var-caret-square-o-up; } |
||||
|
.@{fa-css-prefix}-toggle-right:before, |
||||
|
.@{fa-css-prefix}-caret-square-o-right:before { content: @fa-var-caret-square-o-right; } |
||||
|
.@{fa-css-prefix}-euro:before, |
||||
|
.@{fa-css-prefix}-eur:before { content: @fa-var-eur; } |
||||
|
.@{fa-css-prefix}-gbp:before { content: @fa-var-gbp; } |
||||
|
.@{fa-css-prefix}-dollar:before, |
||||
|
.@{fa-css-prefix}-usd:before { content: @fa-var-usd; } |
||||
|
.@{fa-css-prefix}-rupee:before, |
||||
|
.@{fa-css-prefix}-inr:before { content: @fa-var-inr; } |
||||
|
.@{fa-css-prefix}-cny:before, |
||||
|
.@{fa-css-prefix}-rmb:before, |
||||
|
.@{fa-css-prefix}-yen:before, |
||||
|
.@{fa-css-prefix}-jpy:before { content: @fa-var-jpy; } |
||||
|
.@{fa-css-prefix}-ruble:before, |
||||
|
.@{fa-css-prefix}-rouble:before, |
||||
|
.@{fa-css-prefix}-rub:before { content: @fa-var-rub; } |
||||
|
.@{fa-css-prefix}-won:before, |
||||
|
.@{fa-css-prefix}-krw:before { content: @fa-var-krw; } |
||||
|
.@{fa-css-prefix}-bitcoin:before, |
||||
|
.@{fa-css-prefix}-btc:before { content: @fa-var-btc; } |
||||
|
.@{fa-css-prefix}-file:before { content: @fa-var-file; } |
||||
|
.@{fa-css-prefix}-file-text:before { content: @fa-var-file-text; } |
||||
|
.@{fa-css-prefix}-sort-alpha-asc:before { content: @fa-var-sort-alpha-asc; } |
||||
|
.@{fa-css-prefix}-sort-alpha-desc:before { content: @fa-var-sort-alpha-desc; } |
||||
|
.@{fa-css-prefix}-sort-amount-asc:before { content: @fa-var-sort-amount-asc; } |
||||
|
.@{fa-css-prefix}-sort-amount-desc:before { content: @fa-var-sort-amount-desc; } |
||||
|
.@{fa-css-prefix}-sort-numeric-asc:before { content: @fa-var-sort-numeric-asc; } |
||||
|
.@{fa-css-prefix}-sort-numeric-desc:before { content: @fa-var-sort-numeric-desc; } |
||||
|
.@{fa-css-prefix}-thumbs-up:before { content: @fa-var-thumbs-up; } |
||||
|
.@{fa-css-prefix}-thumbs-down:before { content: @fa-var-thumbs-down; } |
||||
|
.@{fa-css-prefix}-youtube-square:before { content: @fa-var-youtube-square; } |
||||
|
.@{fa-css-prefix}-youtube:before { content: @fa-var-youtube; } |
||||
|
.@{fa-css-prefix}-xing:before { content: @fa-var-xing; } |
||||
|
.@{fa-css-prefix}-xing-square:before { content: @fa-var-xing-square; } |
||||
|
.@{fa-css-prefix}-youtube-play:before { content: @fa-var-youtube-play; } |
||||
|
.@{fa-css-prefix}-dropbox:before { content: @fa-var-dropbox; } |
||||
|
.@{fa-css-prefix}-stack-overflow:before { content: @fa-var-stack-overflow; } |
||||
|
.@{fa-css-prefix}-instagram:before { content: @fa-var-instagram; } |
||||
|
.@{fa-css-prefix}-flickr:before { content: @fa-var-flickr; } |
||||
|
.@{fa-css-prefix}-adn:before { content: @fa-var-adn; } |
||||
|
.@{fa-css-prefix}-bitbucket:before { content: @fa-var-bitbucket; } |
||||
|
.@{fa-css-prefix}-bitbucket-square:before { content: @fa-var-bitbucket-square; } |
||||
|
.@{fa-css-prefix}-tumblr:before { content: @fa-var-tumblr; } |
||||
|
.@{fa-css-prefix}-tumblr-square:before { content: @fa-var-tumblr-square; } |
||||
|
.@{fa-css-prefix}-long-arrow-down:before { content: @fa-var-long-arrow-down; } |
||||
|
.@{fa-css-prefix}-long-arrow-up:before { content: @fa-var-long-arrow-up; } |
||||
|
.@{fa-css-prefix}-long-arrow-left:before { content: @fa-var-long-arrow-left; } |
||||
|
.@{fa-css-prefix}-long-arrow-right:before { content: @fa-var-long-arrow-right; } |
||||
|
.@{fa-css-prefix}-apple:before { content: @fa-var-apple; } |
||||
|
.@{fa-css-prefix}-windows:before { content: @fa-var-windows; } |
||||
|
.@{fa-css-prefix}-android:before { content: @fa-var-android; } |
||||
|
.@{fa-css-prefix}-linux:before { content: @fa-var-linux; } |
||||
|
.@{fa-css-prefix}-dribbble:before { content: @fa-var-dribbble; } |
||||
|
.@{fa-css-prefix}-skype:before { content: @fa-var-skype; } |
||||
|
.@{fa-css-prefix}-foursquare:before { content: @fa-var-foursquare; } |
||||
|
.@{fa-css-prefix}-trello:before { content: @fa-var-trello; } |
||||
|
.@{fa-css-prefix}-female:before { content: @fa-var-female; } |
||||
|
.@{fa-css-prefix}-male:before { content: @fa-var-male; } |
||||
|
.@{fa-css-prefix}-gittip:before, |
||||
|
.@{fa-css-prefix}-gratipay:before { content: @fa-var-gratipay; } |
||||
|
.@{fa-css-prefix}-sun-o:before { content: @fa-var-sun-o; } |
||||
|
.@{fa-css-prefix}-moon-o:before { content: @fa-var-moon-o; } |
||||
|
.@{fa-css-prefix}-archive:before { content: @fa-var-archive; } |
||||
|
.@{fa-css-prefix}-bug:before { content: @fa-var-bug; } |
||||
|
.@{fa-css-prefix}-vk:before { content: @fa-var-vk; } |
||||
|
.@{fa-css-prefix}-weibo:before { content: @fa-var-weibo; } |
||||
|
.@{fa-css-prefix}-renren:before { content: @fa-var-renren; } |
||||
|
.@{fa-css-prefix}-pagelines:before { content: @fa-var-pagelines; } |
||||
|
.@{fa-css-prefix}-stack-exchange:before { content: @fa-var-stack-exchange; } |
||||
|
.@{fa-css-prefix}-arrow-circle-o-right:before { content: @fa-var-arrow-circle-o-right; } |
||||
|
.@{fa-css-prefix}-arrow-circle-o-left:before { content: @fa-var-arrow-circle-o-left; } |
||||
|
.@{fa-css-prefix}-toggle-left:before, |
||||
|
.@{fa-css-prefix}-caret-square-o-left:before { content: @fa-var-caret-square-o-left; } |
||||
|
.@{fa-css-prefix}-dot-circle-o:before { content: @fa-var-dot-circle-o; } |
||||
|
.@{fa-css-prefix}-wheelchair:before { content: @fa-var-wheelchair; } |
||||
|
.@{fa-css-prefix}-vimeo-square:before { content: @fa-var-vimeo-square; } |
||||
|
.@{fa-css-prefix}-turkish-lira:before, |
||||
|
.@{fa-css-prefix}-try:before { content: @fa-var-try; } |
||||
|
.@{fa-css-prefix}-plus-square-o:before { content: @fa-var-plus-square-o; } |
||||
|
.@{fa-css-prefix}-space-shuttle:before { content: @fa-var-space-shuttle; } |
||||
|
.@{fa-css-prefix}-slack:before { content: @fa-var-slack; } |
||||
|
.@{fa-css-prefix}-envelope-square:before { content: @fa-var-envelope-square; } |
||||
|
.@{fa-css-prefix}-wordpress:before { content: @fa-var-wordpress; } |
||||
|
.@{fa-css-prefix}-openid:before { content: @fa-var-openid; } |
||||
|
.@{fa-css-prefix}-institution:before, |
||||
|
.@{fa-css-prefix}-bank:before, |
||||
|
.@{fa-css-prefix}-university:before { content: @fa-var-university; } |
||||
|
.@{fa-css-prefix}-mortar-board:before, |
||||
|
.@{fa-css-prefix}-graduation-cap:before { content: @fa-var-graduation-cap; } |
||||
|
.@{fa-css-prefix}-yahoo:before { content: @fa-var-yahoo; } |
||||
|
.@{fa-css-prefix}-google:before { content: @fa-var-google; } |
||||
|
.@{fa-css-prefix}-reddit:before { content: @fa-var-reddit; } |
||||
|
.@{fa-css-prefix}-reddit-square:before { content: @fa-var-reddit-square; } |
||||
|
.@{fa-css-prefix}-stumbleupon-circle:before { content: @fa-var-stumbleupon-circle; } |
||||
|
.@{fa-css-prefix}-stumbleupon:before { content: @fa-var-stumbleupon; } |
||||
|
.@{fa-css-prefix}-delicious:before { content: @fa-var-delicious; } |
||||
|
.@{fa-css-prefix}-digg:before { content: @fa-var-digg; } |
||||
|
.@{fa-css-prefix}-pied-piper-pp:before { content: @fa-var-pied-piper-pp; } |
||||
|
.@{fa-css-prefix}-pied-piper-alt:before { content: @fa-var-pied-piper-alt; } |
||||
|
.@{fa-css-prefix}-drupal:before { content: @fa-var-drupal; } |
||||
|
.@{fa-css-prefix}-joomla:before { content: @fa-var-joomla; } |
||||
|
.@{fa-css-prefix}-language:before { content: @fa-var-language; } |
||||
|
.@{fa-css-prefix}-fax:before { content: @fa-var-fax; } |
||||
|
.@{fa-css-prefix}-building:before { content: @fa-var-building; } |
||||
|
.@{fa-css-prefix}-child:before { content: @fa-var-child; } |
||||
|
.@{fa-css-prefix}-paw:before { content: @fa-var-paw; } |
||||
|
.@{fa-css-prefix}-spoon:before { content: @fa-var-spoon; } |
||||
|
.@{fa-css-prefix}-cube:before { content: @fa-var-cube; } |
||||
|
.@{fa-css-prefix}-cubes:before { content: @fa-var-cubes; } |
||||
|
.@{fa-css-prefix}-behance:before { content: @fa-var-behance; } |
||||
|
.@{fa-css-prefix}-behance-square:before { content: @fa-var-behance-square; } |
||||
|
.@{fa-css-prefix}-steam:before { content: @fa-var-steam; } |
||||
|
.@{fa-css-prefix}-steam-square:before { content: @fa-var-steam-square; } |
||||
|
.@{fa-css-prefix}-recycle:before { content: @fa-var-recycle; } |
||||
|
.@{fa-css-prefix}-automobile:before, |
||||
|
.@{fa-css-prefix}-car:before { content: @fa-var-car; } |
||||
|
.@{fa-css-prefix}-cab:before, |
||||
|
.@{fa-css-prefix}-taxi:before { content: @fa-var-taxi; } |
||||
|
.@{fa-css-prefix}-tree:before { content: @fa-var-tree; } |
||||
|
.@{fa-css-prefix}-spotify:before { content: @fa-var-spotify; } |
||||
|
.@{fa-css-prefix}-deviantart:before { content: @fa-var-deviantart; } |
||||
|
.@{fa-css-prefix}-soundcloud:before { content: @fa-var-soundcloud; } |
||||
|
.@{fa-css-prefix}-database:before { content: @fa-var-database; } |
||||
|
.@{fa-css-prefix}-file-pdf-o:before { content: @fa-var-file-pdf-o; } |
||||
|
.@{fa-css-prefix}-file-word-o:before { content: @fa-var-file-word-o; } |
||||
|
.@{fa-css-prefix}-file-excel-o:before { content: @fa-var-file-excel-o; } |
||||
|
.@{fa-css-prefix}-file-powerpoint-o:before { content: @fa-var-file-powerpoint-o; } |
||||
|
.@{fa-css-prefix}-file-photo-o:before, |
||||
|
.@{fa-css-prefix}-file-picture-o:before, |
||||
|
.@{fa-css-prefix}-file-image-o:before { content: @fa-var-file-image-o; } |
||||
|
.@{fa-css-prefix}-file-zip-o:before, |
||||
|
.@{fa-css-prefix}-file-archive-o:before { content: @fa-var-file-archive-o; } |
||||
|
.@{fa-css-prefix}-file-sound-o:before, |
||||
|
.@{fa-css-prefix}-file-audio-o:before { content: @fa-var-file-audio-o; } |
||||
|
.@{fa-css-prefix}-file-movie-o:before, |
||||
|
.@{fa-css-prefix}-file-video-o:before { content: @fa-var-file-video-o; } |
||||
|
.@{fa-css-prefix}-file-code-o:before { content: @fa-var-file-code-o; } |
||||
|
.@{fa-css-prefix}-vine:before { content: @fa-var-vine; } |
||||
|
.@{fa-css-prefix}-codepen:before { content: @fa-var-codepen; } |
||||
|
.@{fa-css-prefix}-jsfiddle:before { content: @fa-var-jsfiddle; } |
||||
|
.@{fa-css-prefix}-life-bouy:before, |
||||
|
.@{fa-css-prefix}-life-buoy:before, |
||||
|
.@{fa-css-prefix}-life-saver:before, |
||||
|
.@{fa-css-prefix}-support:before, |
||||
|
.@{fa-css-prefix}-life-ring:before { content: @fa-var-life-ring; } |
||||
|
.@{fa-css-prefix}-circle-o-notch:before { content: @fa-var-circle-o-notch; } |
||||
|
.@{fa-css-prefix}-ra:before, |
||||
|
.@{fa-css-prefix}-resistance:before, |
||||
|
.@{fa-css-prefix}-rebel:before { content: @fa-var-rebel; } |
||||
|
.@{fa-css-prefix}-ge:before, |
||||
|
.@{fa-css-prefix}-empire:before { content: @fa-var-empire; } |
||||
|
.@{fa-css-prefix}-git-square:before { content: @fa-var-git-square; } |
||||
|
.@{fa-css-prefix}-git:before { content: @fa-var-git; } |
||||
|
.@{fa-css-prefix}-y-combinator-square:before, |
||||
|
.@{fa-css-prefix}-yc-square:before, |
||||
|
.@{fa-css-prefix}-hacker-news:before { content: @fa-var-hacker-news; } |
||||
|
.@{fa-css-prefix}-tencent-weibo:before { content: @fa-var-tencent-weibo; } |
||||
|
.@{fa-css-prefix}-qq:before { content: @fa-var-qq; } |
||||
|
.@{fa-css-prefix}-wechat:before, |
||||
|
.@{fa-css-prefix}-weixin:before { content: @fa-var-weixin; } |
||||
|
.@{fa-css-prefix}-send:before, |
||||
|
.@{fa-css-prefix}-paper-plane:before { content: @fa-var-paper-plane; } |
||||
|
.@{fa-css-prefix}-send-o:before, |
||||
|
.@{fa-css-prefix}-paper-plane-o:before { content: @fa-var-paper-plane-o; } |
||||
|
.@{fa-css-prefix}-history:before { content: @fa-var-history; } |
||||
|
.@{fa-css-prefix}-circle-thin:before { content: @fa-var-circle-thin; } |
||||
|
.@{fa-css-prefix}-header:before { content: @fa-var-header; } |
||||
|
.@{fa-css-prefix}-paragraph:before { content: @fa-var-paragraph; } |
||||
|
.@{fa-css-prefix}-sliders:before { content: @fa-var-sliders; } |
||||
|
.@{fa-css-prefix}-share-alt:before { content: @fa-var-share-alt; } |
||||
|
.@{fa-css-prefix}-share-alt-square:before { content: @fa-var-share-alt-square; } |
||||
|
.@{fa-css-prefix}-bomb:before { content: @fa-var-bomb; } |
||||
|
.@{fa-css-prefix}-soccer-ball-o:before, |
||||
|
.@{fa-css-prefix}-futbol-o:before { content: @fa-var-futbol-o; } |
||||
|
.@{fa-css-prefix}-tty:before { content: @fa-var-tty; } |
||||
|
.@{fa-css-prefix}-binoculars:before { content: @fa-var-binoculars; } |
||||
|
.@{fa-css-prefix}-plug:before { content: @fa-var-plug; } |
||||
|
.@{fa-css-prefix}-slideshare:before { content: @fa-var-slideshare; } |
||||
|
.@{fa-css-prefix}-twitch:before { content: @fa-var-twitch; } |
||||
|
.@{fa-css-prefix}-yelp:before { content: @fa-var-yelp; } |
||||
|
.@{fa-css-prefix}-newspaper-o:before { content: @fa-var-newspaper-o; } |
||||
|
.@{fa-css-prefix}-wifi:before { content: @fa-var-wifi; } |
||||
|
.@{fa-css-prefix}-calculator:before { content: @fa-var-calculator; } |
||||
|
.@{fa-css-prefix}-paypal:before { content: @fa-var-paypal; } |
||||
|
.@{fa-css-prefix}-google-wallet:before { content: @fa-var-google-wallet; } |
||||
|
.@{fa-css-prefix}-cc-visa:before { content: @fa-var-cc-visa; } |
||||
|
.@{fa-css-prefix}-cc-mastercard:before { content: @fa-var-cc-mastercard; } |
||||
|
.@{fa-css-prefix}-cc-discover:before { content: @fa-var-cc-discover; } |
||||
|
.@{fa-css-prefix}-cc-amex:before { content: @fa-var-cc-amex; } |
||||
|
.@{fa-css-prefix}-cc-paypal:before { content: @fa-var-cc-paypal; } |
||||
|
.@{fa-css-prefix}-cc-stripe:before { content: @fa-var-cc-stripe; } |
||||
|
.@{fa-css-prefix}-bell-slash:before { content: @fa-var-bell-slash; } |
||||
|
.@{fa-css-prefix}-bell-slash-o:before { content: @fa-var-bell-slash-o; } |
||||
|
.@{fa-css-prefix}-trash:before { content: @fa-var-trash; } |
||||
|
.@{fa-css-prefix}-copyright:before { content: @fa-var-copyright; } |
||||
|
.@{fa-css-prefix}-at:before { content: @fa-var-at; } |
||||
|
.@{fa-css-prefix}-eyedropper:before { content: @fa-var-eyedropper; } |
||||
|
.@{fa-css-prefix}-paint-brush:before { content: @fa-var-paint-brush; } |
||||
|
.@{fa-css-prefix}-birthday-cake:before { content: @fa-var-birthday-cake; } |
||||
|
.@{fa-css-prefix}-area-chart:before { content: @fa-var-area-chart; } |
||||
|
.@{fa-css-prefix}-pie-chart:before { content: @fa-var-pie-chart; } |
||||
|
.@{fa-css-prefix}-line-chart:before { content: @fa-var-line-chart; } |
||||
|
.@{fa-css-prefix}-lastfm:before { content: @fa-var-lastfm; } |
||||
|
.@{fa-css-prefix}-lastfm-square:before { content: @fa-var-lastfm-square; } |
||||
|
.@{fa-css-prefix}-toggle-off:before { content: @fa-var-toggle-off; } |
||||
|
.@{fa-css-prefix}-toggle-on:before { content: @fa-var-toggle-on; } |
||||
|
.@{fa-css-prefix}-bicycle:before { content: @fa-var-bicycle; } |
||||
|
.@{fa-css-prefix}-bus:before { content: @fa-var-bus; } |
||||
|
.@{fa-css-prefix}-ioxhost:before { content: @fa-var-ioxhost; } |
||||
|
.@{fa-css-prefix}-angellist:before { content: @fa-var-angellist; } |
||||
|
.@{fa-css-prefix}-cc:before { content: @fa-var-cc; } |
||||
|
.@{fa-css-prefix}-shekel:before, |
||||
|
.@{fa-css-prefix}-sheqel:before, |
||||
|
.@{fa-css-prefix}-ils:before { content: @fa-var-ils; } |
||||
|
.@{fa-css-prefix}-meanpath:before { content: @fa-var-meanpath; } |
||||
|
.@{fa-css-prefix}-buysellads:before { content: @fa-var-buysellads; } |
||||
|
.@{fa-css-prefix}-connectdevelop:before { content: @fa-var-connectdevelop; } |
||||
|
.@{fa-css-prefix}-dashcube:before { content: @fa-var-dashcube; } |
||||
|
.@{fa-css-prefix}-forumbee:before { content: @fa-var-forumbee; } |
||||
|
.@{fa-css-prefix}-leanpub:before { content: @fa-var-leanpub; } |
||||
|
.@{fa-css-prefix}-sellsy:before { content: @fa-var-sellsy; } |
||||
|
.@{fa-css-prefix}-shirtsinbulk:before { content: @fa-var-shirtsinbulk; } |
||||
|
.@{fa-css-prefix}-simplybuilt:before { content: @fa-var-simplybuilt; } |
||||
|
.@{fa-css-prefix}-skyatlas:before { content: @fa-var-skyatlas; } |
||||
|
.@{fa-css-prefix}-cart-plus:before { content: @fa-var-cart-plus; } |
||||
|
.@{fa-css-prefix}-cart-arrow-down:before { content: @fa-var-cart-arrow-down; } |
||||
|
.@{fa-css-prefix}-diamond:before { content: @fa-var-diamond; } |
||||
|
.@{fa-css-prefix}-ship:before { content: @fa-var-ship; } |
||||
|
.@{fa-css-prefix}-user-secret:before { content: @fa-var-user-secret; } |
||||
|
.@{fa-css-prefix}-motorcycle:before { content: @fa-var-motorcycle; } |
||||
|
.@{fa-css-prefix}-street-view:before { content: @fa-var-street-view; } |
||||
|
.@{fa-css-prefix}-heartbeat:before { content: @fa-var-heartbeat; } |
||||
|
.@{fa-css-prefix}-venus:before { content: @fa-var-venus; } |
||||
|
.@{fa-css-prefix}-mars:before { content: @fa-var-mars; } |
||||
|
.@{fa-css-prefix}-mercury:before { content: @fa-var-mercury; } |
||||
|
.@{fa-css-prefix}-intersex:before, |
||||
|
.@{fa-css-prefix}-transgender:before { content: @fa-var-transgender; } |
||||
|
.@{fa-css-prefix}-transgender-alt:before { content: @fa-var-transgender-alt; } |
||||
|
.@{fa-css-prefix}-venus-double:before { content: @fa-var-venus-double; } |
||||
|
.@{fa-css-prefix}-mars-double:before { content: @fa-var-mars-double; } |
||||
|
.@{fa-css-prefix}-venus-mars:before { content: @fa-var-venus-mars; } |
||||
|
.@{fa-css-prefix}-mars-stroke:before { content: @fa-var-mars-stroke; } |
||||
|
.@{fa-css-prefix}-mars-stroke-v:before { content: @fa-var-mars-stroke-v; } |
||||
|
.@{fa-css-prefix}-mars-stroke-h:before { content: @fa-var-mars-stroke-h; } |
||||
|
.@{fa-css-prefix}-neuter:before { content: @fa-var-neuter; } |
||||
|
.@{fa-css-prefix}-genderless:before { content: @fa-var-genderless; } |
||||
|
.@{fa-css-prefix}-facebook-official:before { content: @fa-var-facebook-official; } |
||||
|
.@{fa-css-prefix}-pinterest-p:before { content: @fa-var-pinterest-p; } |
||||
|
.@{fa-css-prefix}-whatsapp:before { content: @fa-var-whatsapp; } |
||||
|
.@{fa-css-prefix}-server:before { content: @fa-var-server; } |
||||
|
.@{fa-css-prefix}-user-plus:before { content: @fa-var-user-plus; } |
||||
|
.@{fa-css-prefix}-user-times:before { content: @fa-var-user-times; } |
||||
|
.@{fa-css-prefix}-hotel:before, |
||||
|
.@{fa-css-prefix}-bed:before { content: @fa-var-bed; } |
||||
|
.@{fa-css-prefix}-viacoin:before { content: @fa-var-viacoin; } |
||||
|
.@{fa-css-prefix}-train:before { content: @fa-var-train; } |
||||
|
.@{fa-css-prefix}-subway:before { content: @fa-var-subway; } |
||||
|
.@{fa-css-prefix}-medium:before { content: @fa-var-medium; } |
||||
|
.@{fa-css-prefix}-yc:before, |
||||
|
.@{fa-css-prefix}-y-combinator:before { content: @fa-var-y-combinator; } |
||||
|
.@{fa-css-prefix}-optin-monster:before { content: @fa-var-optin-monster; } |
||||
|
.@{fa-css-prefix}-opencart:before { content: @fa-var-opencart; } |
||||
|
.@{fa-css-prefix}-expeditedssl:before { content: @fa-var-expeditedssl; } |
||||
|
.@{fa-css-prefix}-battery-4:before, |
||||
|
.@{fa-css-prefix}-battery:before, |
||||
|
.@{fa-css-prefix}-battery-full:before { content: @fa-var-battery-full; } |
||||
|
.@{fa-css-prefix}-battery-3:before, |
||||
|
.@{fa-css-prefix}-battery-three-quarters:before { content: @fa-var-battery-three-quarters; } |
||||
|
.@{fa-css-prefix}-battery-2:before, |
||||
|
.@{fa-css-prefix}-battery-half:before { content: @fa-var-battery-half; } |
||||
|
.@{fa-css-prefix}-battery-1:before, |
||||
|
.@{fa-css-prefix}-battery-quarter:before { content: @fa-var-battery-quarter; } |
||||
|
.@{fa-css-prefix}-battery-0:before, |
||||
|
.@{fa-css-prefix}-battery-empty:before { content: @fa-var-battery-empty; } |
||||
|
.@{fa-css-prefix}-mouse-pointer:before { content: @fa-var-mouse-pointer; } |
||||
|
.@{fa-css-prefix}-i-cursor:before { content: @fa-var-i-cursor; } |
||||
|
.@{fa-css-prefix}-object-group:before { content: @fa-var-object-group; } |
||||
|
.@{fa-css-prefix}-object-ungroup:before { content: @fa-var-object-ungroup; } |
||||
|
.@{fa-css-prefix}-sticky-note:before { content: @fa-var-sticky-note; } |
||||
|
.@{fa-css-prefix}-sticky-note-o:before { content: @fa-var-sticky-note-o; } |
||||
|
.@{fa-css-prefix}-cc-jcb:before { content: @fa-var-cc-jcb; } |
||||
|
.@{fa-css-prefix}-cc-diners-club:before { content: @fa-var-cc-diners-club; } |
||||
|
.@{fa-css-prefix}-clone:before { content: @fa-var-clone; } |
||||
|
.@{fa-css-prefix}-balance-scale:before { content: @fa-var-balance-scale; } |
||||
|
.@{fa-css-prefix}-hourglass-o:before { content: @fa-var-hourglass-o; } |
||||
|
.@{fa-css-prefix}-hourglass-1:before, |
||||
|
.@{fa-css-prefix}-hourglass-start:before { content: @fa-var-hourglass-start; } |
||||
|
.@{fa-css-prefix}-hourglass-2:before, |
||||
|
.@{fa-css-prefix}-hourglass-half:before { content: @fa-var-hourglass-half; } |
||||
|
.@{fa-css-prefix}-hourglass-3:before, |
||||
|
.@{fa-css-prefix}-hourglass-end:before { content: @fa-var-hourglass-end; } |
||||
|
.@{fa-css-prefix}-hourglass:before { content: @fa-var-hourglass; } |
||||
|
.@{fa-css-prefix}-hand-grab-o:before, |
||||
|
.@{fa-css-prefix}-hand-rock-o:before { content: @fa-var-hand-rock-o; } |
||||
|
.@{fa-css-prefix}-hand-stop-o:before, |
||||
|
.@{fa-css-prefix}-hand-paper-o:before { content: @fa-var-hand-paper-o; } |
||||
|
.@{fa-css-prefix}-hand-scissors-o:before { content: @fa-var-hand-scissors-o; } |
||||
|
.@{fa-css-prefix}-hand-lizard-o:before { content: @fa-var-hand-lizard-o; } |
||||
|
.@{fa-css-prefix}-hand-spock-o:before { content: @fa-var-hand-spock-o; } |
||||
|
.@{fa-css-prefix}-hand-pointer-o:before { content: @fa-var-hand-pointer-o; } |
||||
|
.@{fa-css-prefix}-hand-peace-o:before { content: @fa-var-hand-peace-o; } |
||||
|
.@{fa-css-prefix}-trademark:before { content: @fa-var-trademark; } |
||||
|
.@{fa-css-prefix}-registered:before { content: @fa-var-registered; } |
||||
|
.@{fa-css-prefix}-creative-commons:before { content: @fa-var-creative-commons; } |
||||
|
.@{fa-css-prefix}-gg:before { content: @fa-var-gg; } |
||||
|
.@{fa-css-prefix}-gg-circle:before { content: @fa-var-gg-circle; } |
||||
|
.@{fa-css-prefix}-tripadvisor:before { content: @fa-var-tripadvisor; } |
||||
|
.@{fa-css-prefix}-odnoklassniki:before { content: @fa-var-odnoklassniki; } |
||||
|
.@{fa-css-prefix}-odnoklassniki-square:before { content: @fa-var-odnoklassniki-square; } |
||||
|
.@{fa-css-prefix}-get-pocket:before { content: @fa-var-get-pocket; } |
||||
|
.@{fa-css-prefix}-wikipedia-w:before { content: @fa-var-wikipedia-w; } |
||||
|
.@{fa-css-prefix}-safari:before { content: @fa-var-safari; } |
||||
|
.@{fa-css-prefix}-chrome:before { content: @fa-var-chrome; } |
||||
|
.@{fa-css-prefix}-firefox:before { content: @fa-var-firefox; } |
||||
|
.@{fa-css-prefix}-opera:before { content: @fa-var-opera; } |
||||
|
.@{fa-css-prefix}-internet-explorer:before { content: @fa-var-internet-explorer; } |
||||
|
.@{fa-css-prefix}-tv:before, |
||||
|
.@{fa-css-prefix}-television:before { content: @fa-var-television; } |
||||
|
.@{fa-css-prefix}-contao:before { content: @fa-var-contao; } |
||||
|
.@{fa-css-prefix}-500px:before { content: @fa-var-500px; } |
||||
|
.@{fa-css-prefix}-amazon:before { content: @fa-var-amazon; } |
||||
|
.@{fa-css-prefix}-calendar-plus-o:before { content: @fa-var-calendar-plus-o; } |
||||
|
.@{fa-css-prefix}-calendar-minus-o:before { content: @fa-var-calendar-minus-o; } |
||||
|
.@{fa-css-prefix}-calendar-times-o:before { content: @fa-var-calendar-times-o; } |
||||
|
.@{fa-css-prefix}-calendar-check-o:before { content: @fa-var-calendar-check-o; } |
||||
|
.@{fa-css-prefix}-industry:before { content: @fa-var-industry; } |
||||
|
.@{fa-css-prefix}-map-pin:before { content: @fa-var-map-pin; } |
||||
|
.@{fa-css-prefix}-map-signs:before { content: @fa-var-map-signs; } |
||||
|
.@{fa-css-prefix}-map-o:before { content: @fa-var-map-o; } |
||||
|
.@{fa-css-prefix}-map:before { content: @fa-var-map; } |
||||
|
.@{fa-css-prefix}-commenting:before { content: @fa-var-commenting; } |
||||
|
.@{fa-css-prefix}-commenting-o:before { content: @fa-var-commenting-o; } |
||||
|
.@{fa-css-prefix}-houzz:before { content: @fa-var-houzz; } |
||||
|
.@{fa-css-prefix}-vimeo:before { content: @fa-var-vimeo; } |
||||
|
.@{fa-css-prefix}-black-tie:before { content: @fa-var-black-tie; } |
||||
|
.@{fa-css-prefix}-fonticons:before { content: @fa-var-fonticons; } |
||||
|
.@{fa-css-prefix}-reddit-alien:before { content: @fa-var-reddit-alien; } |
||||
|
.@{fa-css-prefix}-edge:before { content: @fa-var-edge; } |
||||
|
.@{fa-css-prefix}-credit-card-alt:before { content: @fa-var-credit-card-alt; } |
||||
|
.@{fa-css-prefix}-codiepie:before { content: @fa-var-codiepie; } |
||||
|
.@{fa-css-prefix}-modx:before { content: @fa-var-modx; } |
||||
|
.@{fa-css-prefix}-fort-awesome:before { content: @fa-var-fort-awesome; } |
||||
|
.@{fa-css-prefix}-usb:before { content: @fa-var-usb; } |
||||
|
.@{fa-css-prefix}-product-hunt:before { content: @fa-var-product-hunt; } |
||||
|
.@{fa-css-prefix}-mixcloud:before { content: @fa-var-mixcloud; } |
||||
|
.@{fa-css-prefix}-scribd:before { content: @fa-var-scribd; } |
||||
|
.@{fa-css-prefix}-pause-circle:before { content: @fa-var-pause-circle; } |
||||
|
.@{fa-css-prefix}-pause-circle-o:before { content: @fa-var-pause-circle-o; } |
||||
|
.@{fa-css-prefix}-stop-circle:before { content: @fa-var-stop-circle; } |
||||
|
.@{fa-css-prefix}-stop-circle-o:before { content: @fa-var-stop-circle-o; } |
||||
|
.@{fa-css-prefix}-shopping-bag:before { content: @fa-var-shopping-bag; } |
||||
|
.@{fa-css-prefix}-shopping-basket:before { content: @fa-var-shopping-basket; } |
||||
|
.@{fa-css-prefix}-hashtag:before { content: @fa-var-hashtag; } |
||||
|
.@{fa-css-prefix}-bluetooth:before { content: @fa-var-bluetooth; } |
||||
|
.@{fa-css-prefix}-bluetooth-b:before { content: @fa-var-bluetooth-b; } |
||||
|
.@{fa-css-prefix}-percent:before { content: @fa-var-percent; } |
||||
|
.@{fa-css-prefix}-gitlab:before { content: @fa-var-gitlab; } |
||||
|
.@{fa-css-prefix}-wpbeginner:before { content: @fa-var-wpbeginner; } |
||||
|
.@{fa-css-prefix}-wpforms:before { content: @fa-var-wpforms; } |
||||
|
.@{fa-css-prefix}-envira:before { content: @fa-var-envira; } |
||||
|
.@{fa-css-prefix}-universal-access:before { content: @fa-var-universal-access; } |
||||
|
.@{fa-css-prefix}-wheelchair-alt:before { content: @fa-var-wheelchair-alt; } |
||||
|
.@{fa-css-prefix}-question-circle-o:before { content: @fa-var-question-circle-o; } |
||||
|
.@{fa-css-prefix}-blind:before { content: @fa-var-blind; } |
||||
|
.@{fa-css-prefix}-audio-description:before { content: @fa-var-audio-description; } |
||||
|
.@{fa-css-prefix}-volume-control-phone:before { content: @fa-var-volume-control-phone; } |
||||
|
.@{fa-css-prefix}-braille:before { content: @fa-var-braille; } |
||||
|
.@{fa-css-prefix}-assistive-listening-systems:before { content: @fa-var-assistive-listening-systems; } |
||||
|
.@{fa-css-prefix}-asl-interpreting:before, |
||||
|
.@{fa-css-prefix}-american-sign-language-interpreting:before { content: @fa-var-american-sign-language-interpreting; } |
||||
|
.@{fa-css-prefix}-deafness:before, |
||||
|
.@{fa-css-prefix}-hard-of-hearing:before, |
||||
|
.@{fa-css-prefix}-deaf:before { content: @fa-var-deaf; } |
||||
|
.@{fa-css-prefix}-glide:before { content: @fa-var-glide; } |
||||
|
.@{fa-css-prefix}-glide-g:before { content: @fa-var-glide-g; } |
||||
|
.@{fa-css-prefix}-signing:before, |
||||
|
.@{fa-css-prefix}-sign-language:before { content: @fa-var-sign-language; } |
||||
|
.@{fa-css-prefix}-low-vision:before { content: @fa-var-low-vision; } |
||||
|
.@{fa-css-prefix}-viadeo:before { content: @fa-var-viadeo; } |
||||
|
.@{fa-css-prefix}-viadeo-square:before { content: @fa-var-viadeo-square; } |
||||
|
.@{fa-css-prefix}-snapchat:before { content: @fa-var-snapchat; } |
||||
|
.@{fa-css-prefix}-snapchat-ghost:before { content: @fa-var-snapchat-ghost; } |
||||
|
.@{fa-css-prefix}-snapchat-square:before { content: @fa-var-snapchat-square; } |
||||
|
.@{fa-css-prefix}-pied-piper:before { content: @fa-var-pied-piper; } |
||||
|
.@{fa-css-prefix}-first-order:before { content: @fa-var-first-order; } |
||||
|
.@{fa-css-prefix}-yoast:before { content: @fa-var-yoast; } |
||||
|
.@{fa-css-prefix}-themeisle:before { content: @fa-var-themeisle; } |
||||
|
.@{fa-css-prefix}-google-plus-circle:before, |
||||
|
.@{fa-css-prefix}-google-plus-official:before { content: @fa-var-google-plus-official; } |
||||
|
.@{fa-css-prefix}-fa:before, |
||||
|
.@{fa-css-prefix}-font-awesome:before { content: @fa-var-font-awesome; } |
||||
|
.@{fa-css-prefix}-handshake-o:before { content: @fa-var-handshake-o; } |
||||
|
.@{fa-css-prefix}-envelope-open:before { content: @fa-var-envelope-open; } |
||||
|
.@{fa-css-prefix}-envelope-open-o:before { content: @fa-var-envelope-open-o; } |
||||
|
.@{fa-css-prefix}-linode:before { content: @fa-var-linode; } |
||||
|
.@{fa-css-prefix}-address-book:before { content: @fa-var-address-book; } |
||||
|
.@{fa-css-prefix}-address-book-o:before { content: @fa-var-address-book-o; } |
||||
|
.@{fa-css-prefix}-vcard:before, |
||||
|
.@{fa-css-prefix}-address-card:before { content: @fa-var-address-card; } |
||||
|
.@{fa-css-prefix}-vcard-o:before, |
||||
|
.@{fa-css-prefix}-address-card-o:before { content: @fa-var-address-card-o; } |
||||
|
.@{fa-css-prefix}-user-circle:before { content: @fa-var-user-circle; } |
||||
|
.@{fa-css-prefix}-user-circle-o:before { content: @fa-var-user-circle-o; } |
||||
|
.@{fa-css-prefix}-user-o:before { content: @fa-var-user-o; } |
||||
|
.@{fa-css-prefix}-id-badge:before { content: @fa-var-id-badge; } |
||||
|
.@{fa-css-prefix}-drivers-license:before, |
||||
|
.@{fa-css-prefix}-id-card:before { content: @fa-var-id-card; } |
||||
|
.@{fa-css-prefix}-drivers-license-o:before, |
||||
|
.@{fa-css-prefix}-id-card-o:before { content: @fa-var-id-card-o; } |
||||
|
.@{fa-css-prefix}-quora:before { content: @fa-var-quora; } |
||||
|
.@{fa-css-prefix}-free-code-camp:before { content: @fa-var-free-code-camp; } |
||||
|
.@{fa-css-prefix}-telegram:before { content: @fa-var-telegram; } |
||||
|
.@{fa-css-prefix}-thermometer-4:before, |
||||
|
.@{fa-css-prefix}-thermometer:before, |
||||
|
.@{fa-css-prefix}-thermometer-full:before { content: @fa-var-thermometer-full; } |
||||
|
.@{fa-css-prefix}-thermometer-3:before, |
||||
|
.@{fa-css-prefix}-thermometer-three-quarters:before { content: @fa-var-thermometer-three-quarters; } |
||||
|
.@{fa-css-prefix}-thermometer-2:before, |
||||
|
.@{fa-css-prefix}-thermometer-half:before { content: @fa-var-thermometer-half; } |
||||
|
.@{fa-css-prefix}-thermometer-1:before, |
||||
|
.@{fa-css-prefix}-thermometer-quarter:before { content: @fa-var-thermometer-quarter; } |
||||
|
.@{fa-css-prefix}-thermometer-0:before, |
||||
|
.@{fa-css-prefix}-thermometer-empty:before { content: @fa-var-thermometer-empty; } |
||||
|
.@{fa-css-prefix}-shower:before { content: @fa-var-shower; } |
||||
|
.@{fa-css-prefix}-bathtub:before, |
||||
|
.@{fa-css-prefix}-s15:before, |
||||
|
.@{fa-css-prefix}-bath:before { content: @fa-var-bath; } |
||||
|
.@{fa-css-prefix}-podcast:before { content: @fa-var-podcast; } |
||||
|
.@{fa-css-prefix}-window-maximize:before { content: @fa-var-window-maximize; } |
||||
|
.@{fa-css-prefix}-window-minimize:before { content: @fa-var-window-minimize; } |
||||
|
.@{fa-css-prefix}-window-restore:before { content: @fa-var-window-restore; } |
||||
|
.@{fa-css-prefix}-times-rectangle:before, |
||||
|
.@{fa-css-prefix}-window-close:before { content: @fa-var-window-close; } |
||||
|
.@{fa-css-prefix}-times-rectangle-o:before, |
||||
|
.@{fa-css-prefix}-window-close-o:before { content: @fa-var-window-close-o; } |
||||
|
.@{fa-css-prefix}-bandcamp:before { content: @fa-var-bandcamp; } |
||||
|
.@{fa-css-prefix}-grav:before { content: @fa-var-grav; } |
||||
|
.@{fa-css-prefix}-etsy:before { content: @fa-var-etsy; } |
||||
|
.@{fa-css-prefix}-imdb:before { content: @fa-var-imdb; } |
||||
|
.@{fa-css-prefix}-ravelry:before { content: @fa-var-ravelry; } |
||||
|
.@{fa-css-prefix}-eercast:before { content: @fa-var-eercast; } |
||||
|
.@{fa-css-prefix}-microchip:before { content: @fa-var-microchip; } |
||||
|
.@{fa-css-prefix}-snowflake-o:before { content: @fa-var-snowflake-o; } |
||||
|
.@{fa-css-prefix}-superpowers:before { content: @fa-var-superpowers; } |
||||
|
.@{fa-css-prefix}-wpexplorer:before { content: @fa-var-wpexplorer; } |
||||
|
.@{fa-css-prefix}-meetup:before { content: @fa-var-meetup; } |
||||
@ -0,0 +1,13 @@ |
|||||
|
// Icon Sizes |
||||
|
// ------------------------- |
||||
|
|
||||
|
/* makes the font 33% larger relative to the icon container */ |
||||
|
.@{fa-css-prefix}-lg { |
||||
|
font-size: (4em / 3); |
||||
|
line-height: (3em / 4); |
||||
|
vertical-align: -15%; |
||||
|
} |
||||
|
.@{fa-css-prefix}-2x { font-size: 2em; } |
||||
|
.@{fa-css-prefix}-3x { font-size: 3em; } |
||||
|
.@{fa-css-prefix}-4x { font-size: 4em; } |
||||
|
.@{fa-css-prefix}-5x { font-size: 5em; } |
||||
@ -0,0 +1,19 @@ |
|||||
|
// List Icons |
||||
|
// ------------------------- |
||||
|
|
||||
|
.@{fa-css-prefix}-ul { |
||||
|
padding-left: 0; |
||||
|
margin-left: @fa-li-width; |
||||
|
list-style-type: none; |
||||
|
> li { position: relative; } |
||||
|
} |
||||
|
.@{fa-css-prefix}-li { |
||||
|
position: absolute; |
||||
|
left: -@fa-li-width; |
||||
|
width: @fa-li-width; |
||||
|
top: (2em / 14); |
||||
|
text-align: center; |
||||
|
&.@{fa-css-prefix}-lg { |
||||
|
left: (-@fa-li-width + (4em / 14)); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,60 @@ |
|||||
|
// Mixins |
||||
|
// -------------------------- |
||||
|
|
||||
|
.fa-icon() { |
||||
|
display: inline-block; |
||||
|
font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration |
||||
|
font-size: inherit; // can't have font-size inherit on line above, so need to override |
||||
|
text-rendering: auto; // optimizelegibility throws things off #1094 |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
.fa-icon-rotate(@degrees, @rotation) { |
||||
|
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})"; |
||||
|
-webkit-transform: rotate(@degrees); |
||||
|
-ms-transform: rotate(@degrees); |
||||
|
transform: rotate(@degrees); |
||||
|
} |
||||
|
|
||||
|
.fa-icon-flip(@horiz, @vert, @rotation) { |
||||
|
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)"; |
||||
|
-webkit-transform: scale(@horiz, @vert); |
||||
|
-ms-transform: scale(@horiz, @vert); |
||||
|
transform: scale(@horiz, @vert); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
// Only display content to screen readers. A la Bootstrap 4. |
||||
|
// |
||||
|
// See: http://a11yproject.com/posts/how-to-hide-content/ |
||||
|
|
||||
|
.sr-only() { |
||||
|
position: absolute; |
||||
|
width: 1px; |
||||
|
height: 1px; |
||||
|
padding: 0; |
||||
|
margin: -1px; |
||||
|
overflow: hidden; |
||||
|
clip: rect(0,0,0,0); |
||||
|
border: 0; |
||||
|
} |
||||
|
|
||||
|
// Use in conjunction with .sr-only to only display content when it's focused. |
||||
|
// |
||||
|
// Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 |
||||
|
// |
||||
|
// Credit: HTML5 Boilerplate |
||||
|
|
||||
|
.sr-only-focusable() { |
||||
|
&:active, |
||||
|
&:focus { |
||||
|
position: static; |
||||
|
width: auto; |
||||
|
height: auto; |
||||
|
margin: 0; |
||||
|
overflow: visible; |
||||
|
clip: auto; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
/* FONT PATH |
||||
|
* -------------------------- */ |
||||
|
|
||||
|
@font-face { |
||||
|
font-family: 'FontAwesome'; |
||||
|
src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); |
||||
|
src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), |
||||
|
url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), |
||||
|
url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), |
||||
|
url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), |
||||
|
url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); |
||||
|
// src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts |
||||
|
font-weight: normal; |
||||
|
font-style: normal; |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
// Rotated & Flipped Icons |
||||
|
// ------------------------- |
||||
|
|
||||
|
.@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } |
||||
|
.@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } |
||||
|
.@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } |
||||
|
|
||||
|
.@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } |
||||
|
.@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } |
||||
|
|
||||
|
// Hook for IE8-9 |
||||
|
// ------------------------- |
||||
|
|
||||
|
:root .@{fa-css-prefix}-rotate-90, |
||||
|
:root .@{fa-css-prefix}-rotate-180, |
||||
|
:root .@{fa-css-prefix}-rotate-270, |
||||
|
:root .@{fa-css-prefix}-flip-horizontal, |
||||
|
:root .@{fa-css-prefix}-flip-vertical { |
||||
|
filter: none; |
||||
|
} |
||||
@ -0,0 +1,5 @@ |
|||||
|
// Screen Readers |
||||
|
// ------------------------- |
||||
|
|
||||
|
.sr-only { .sr-only(); } |
||||
|
.sr-only-focusable { .sr-only-focusable(); } |
||||