Browse Source

init project

Rockery 2 years ago
commit
17ac9a64c6
100 changed files with 6208 additions and 0 deletions
  1. 4 0
      .project
  2. 10 0
      README.md
  3. 12 0
      admin/css/animate.min.css
  4. 182 0
      admin/css/common.css
  5. 21 0
      admin/css/images.css
  6. 143 0
      admin/css/main.css
  7. 15 0
      admin/css/message.css
  8. 8 0
      admin/css/news.css
  9. 38 0
      admin/css/systemTree.css
  10. 28 0
      admin/css/user.css
  11. 81 0
      admin/iconfont/iconfont.css
  12. BIN
      admin/iconfont/iconfont.eot
  13. 1 0
      admin/iconfont/iconfont.js
  14. 122 0
      admin/iconfont/iconfont.svg
  15. BIN
      admin/iconfont/iconfont.ttf
  16. BIN
      admin/iconfont/iconfont.woff
  17. 82 0
      admin/index.js
  18. 1 0
      admin/js/ajaxhook.min.js
  19. 29 0
      admin/js/common.js
  20. 338 0
      admin/js/config.js
  21. 22 0
      admin/js/echarts.min.js
  22. 169 0
      admin/js/layuiPlugins/cascade.js
  23. 760 0
      admin/js/layuiPlugins/eleTree.js
  24. 1733 0
      admin/js/layuiPlugins/formSelects-v4.js
  25. 411 0
      admin/js/layuiPlugins/layui-xtree.js
  26. 332 0
      admin/js/layuiPlugins/step.js
  27. 3 0
      admin/js/layuiPlugins/treeGrid.css
  28. 23 0
      admin/js/layuiPlugins/treeGrid.js
  29. 18 0
      admin/js/layuiPlugins/treetable-lay/treetable.css
  30. 206 0
      admin/js/layuiPlugins/treetable-lay/treetable.js
  31. 58 0
      admin/js/leftNav.js
  32. 98 0
      admin/js/main.js
  33. 167 0
      admin/js/md5.js
  34. 140 0
      admin/js/nav.js
  35. 160 0
      admin/layui/css/eleTree.css
  36. 174 0
      admin/layui/css/formSelects-v4.css
  37. 2 0
      admin/layui/css/layui.css
  38. 2 0
      admin/layui/css/layui.mobile.css
  39. 2 0
      admin/layui/css/modules/code.css
  40. 2 0
      admin/layui/css/modules/laydate/default/laydate.css
  41. BIN
      admin/layui/css/modules/laydate/icon.png
  42. 2 0
      admin/layui/css/modules/laydate/laydate.css
  43. BIN
      admin/layui/css/modules/layer/default/icon-ext.png
  44. BIN
      admin/layui/css/modules/layer/default/icon.png
  45. 2 0
      admin/layui/css/modules/layer/default/layer.css
  46. BIN
      admin/layui/css/modules/layer/default/loading-0.gif
  47. BIN
      admin/layui/css/modules/layer/default/loading-1.gif
  48. BIN
      admin/layui/css/modules/layer/default/loading-2.gif
  49. 134 0
      admin/layui/css/step.css
  50. BIN
      admin/layui/font/iconfont.eot
  51. 473 0
      admin/layui/font/iconfont.svg
  52. BIN
      admin/layui/font/iconfont.ttf
  53. BIN
      admin/layui/font/iconfont.woff
  54. BIN
      admin/layui/images/face/0.gif
  55. BIN
      admin/layui/images/face/1.gif
  56. BIN
      admin/layui/images/face/10.gif
  57. BIN
      admin/layui/images/face/11.gif
  58. BIN
      admin/layui/images/face/12.gif
  59. BIN
      admin/layui/images/face/13.gif
  60. BIN
      admin/layui/images/face/14.gif
  61. BIN
      admin/layui/images/face/15.gif
  62. BIN
      admin/layui/images/face/16.gif
  63. BIN
      admin/layui/images/face/17.gif
  64. BIN
      admin/layui/images/face/18.gif
  65. BIN
      admin/layui/images/face/19.gif
  66. BIN
      admin/layui/images/face/2.gif
  67. BIN
      admin/layui/images/face/20.gif
  68. BIN
      admin/layui/images/face/21.gif
  69. BIN
      admin/layui/images/face/22.gif
  70. BIN
      admin/layui/images/face/23.gif
  71. BIN
      admin/layui/images/face/24.gif
  72. BIN
      admin/layui/images/face/25.gif
  73. BIN
      admin/layui/images/face/26.gif
  74. BIN
      admin/layui/images/face/27.gif
  75. BIN
      admin/layui/images/face/28.gif
  76. BIN
      admin/layui/images/face/29.gif
  77. BIN
      admin/layui/images/face/3.gif
  78. BIN
      admin/layui/images/face/30.gif
  79. BIN
      admin/layui/images/face/31.gif
  80. BIN
      admin/layui/images/face/32.gif
  81. BIN
      admin/layui/images/face/33.gif
  82. BIN
      admin/layui/images/face/34.gif
  83. BIN
      admin/layui/images/face/35.gif
  84. BIN
      admin/layui/images/face/36.gif
  85. BIN
      admin/layui/images/face/37.gif
  86. BIN
      admin/layui/images/face/38.gif
  87. BIN
      admin/layui/images/face/39.gif
  88. BIN
      admin/layui/images/face/4.gif
  89. BIN
      admin/layui/images/face/40.gif
  90. BIN
      admin/layui/images/face/41.gif
  91. BIN
      admin/layui/images/face/42.gif
  92. BIN
      admin/layui/images/face/43.gif
  93. BIN
      admin/layui/images/face/44.gif
  94. BIN
      admin/layui/images/face/45.gif
  95. BIN
      admin/layui/images/face/46.gif
  96. BIN
      admin/layui/images/face/47.gif
  97. BIN
      admin/layui/images/face/48.gif
  98. BIN
      admin/layui/images/face/49.gif
  99. BIN
      admin/layui/images/face/5.gif
  100. 0 0
      admin/layui/images/face/50.gif

+ 4 - 0
.project

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>生鲜供应链B2B系统</name>
+</projectDescription>

+ 10 - 0
README.md

@@ -0,0 +1,10 @@
+# 供应链-商城-web端
+
+```bash
+# 项目名称
+$ supply-chain-web
+
+# 请求url配置
+$ ./admin/js/config.js => window.hywa.config.href = '/buyer-side-web'
+
+```

File diff suppressed because it is too large
+ 12 - 0
admin/css/animate.min.css


+ 182 - 0
admin/css/common.css

@@ -0,0 +1,182 @@
+/* 公用的 */
+html {
+	color: #333;
+}
+
+.layui-fluid {
+	padding: 15px;
+}
+
+.layui-layer-btn a {
+	margin: 0 5px 0 !important;
+}
+
+.ui-required:before {
+	content: "*";
+	color: red;
+	vertical-align: middle;
+}
+
+/* 滚动条 */
+/* ::-webkit-scrollbar-thumb {
+	background-color: rgba(50, 50, 50, 0.6)
+}
+
+::-webkit-scrollbar-track {
+	-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
+	box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
+	background-color: #f5f5f5;
+}
+
+::-webkit-scrollbar {
+	width: 6px;
+	height: 6px;
+	background-color: #f5f5f5;
+} */
+
+/* 表格 */
+.layui-table,
+.layui-table-view {
+	margin-top: 0;
+}
+
+.layout-header .layui-form-item {
+	margin-bottom: 0;
+}
+
+.layout-header .layui-form-item .layui-inline:first-child {
+	width: 40%;
+}
+
+.layout-header.layui-card-header {
+	padding: 0 0 5px;
+	height: auto;
+}
+
+.layout-body.layui-card-body {
+	padding: 0 0;
+}
+
+.search-icon {
+	position: absolute;
+	left: 10px;
+	top: 50%;
+	transform: translate(0, -50%);
+}
+
+.search-icon+input {
+	padding-left: 35px;
+}
+
+.imgBox {
+	height: 190px;
+	overflow: hidden;
+	border: 1px solid #ddd;
+}
+
+.imgBox img {
+	max-width: 100%;
+}
+
+#detailBox {
+	padding: 20px;
+	background-color: #f2f2f2;
+}
+
+#detailBox .layui-card-header {
+	border-left: 4px solid #009688;
+	font-weight: bold;
+}
+
+#detailBox .layui-card-body ul li {
+	padding: 5px;
+	display: flex;
+	align-items: center;
+}
+
+#detailBox .layui-card-body ul li span {
+	flex: 1;
+}
+#detailBox .layui-card-body ul li img{
+	width: auto;
+	max-height: 250px;
+	vertical-align: text-top;
+}
+#detailBox .layui-card-body ul li span img {
+	width: auto;
+	max-width: 400px;
+	max-height: 300px;
+	vertical-align: text-top;
+}
+
+#detailBox .layui-card-body ul li span:first-child {
+	flex: 1.5;
+}
+
+.layui-btn-container .counter {
+	font-size: 14px;
+	line-height: 38px;
+	float: right;
+	color: #FF5722
+}
+
+.date-btn {
+	position: relative;
+	padding: 0 15px;
+}
+
+.date-btn .layui-icon {
+	font-size: 26px;
+	margin-right: 0;
+}
+
+.date-btn .dateClass {
+	position: absolute;
+	left: 0;
+	right: 0;
+	width: 100%;
+	height: 100%;
+	opacity: 0;
+}
+
+.chart-box {
+	margin-top: 30px;
+}
+
+.goodsTotal {
+	text-align: center;
+	padding: 15px;
+	border: 1px solid #ECECEC;
+	margin: 15px 0 0;
+}
+
+.goodsTotal>div {
+	border-right: 1px solid #ECECEC;
+}
+
+.goodsTotal>div:last-child {
+	border: none;
+}
+
+.goodsTotal span {
+	font-size: 28px;
+}
+
+.goodsTotal p {
+	font-size: :16px;
+	margin-top: 5px;
+}
+
+
+
+
+
+
+
+
+
+@media screen and (max-width: 450px) {
+	.layout-header .layui-form-item .layui-inline {
+		width: auto !important;
+	}
+}

+ 21 - 0
admin/css/images.css

@@ -0,0 +1,21 @@
+.layui-flow-more{ clear: both; margin-top: 20px; }
+#Images li{ width:19%; margin:0.5% 0.5%; float: left; overflow:hidden;}
+#Images li img{ width:100%; }
+#Images li .operate{ display: block; height: 40px; width:100%; background:#f4f5f9; }
+#Images li .operate .check{ float:left; margin-left:11px; height:18px; padding:11px 0; }
+#Images li .operate .img_del{ float:right; margin:7px 11px 0 0; font-size: 22px; cursor:pointer; }
+#Images li .operate .img_del:hover{ color:#f00; }
+
+/*适配*/
+@media screen and (max-width:1050px){
+	/*用户信息*/
+	#Images li{ width:24%;}
+}
+@media screen and (max-width: 750px){
+	/*用户信息*/
+	#Images li{ width:49%;}
+}
+@media screen and (max-width:432px){
+	/*用户信息*/
+	#Images li{ width:99%;}
+}

File diff suppressed because it is too large
+ 143 - 0
admin/css/main.css


+ 15 - 0
admin/css/message.css

@@ -0,0 +1,15 @@
+.selectMsg{ width:110px; margin-right: 15px; }
+
+.msg_info,.msg_time,.msg_reply,.msg_opr{min-height:50px; text-align:center;}
+.msg_info{text-align:left; position: relative; }
+.msg_info>img{ position: absolute; left:10px; top:10px; cursor:pointer; }
+.msg_info .user_info{ padding-left:55px; line-height:25px; }
+.msg_info .user_info h2{ color:#222; cursor:pointer; }
+.msg_info .user_info h2:hover{ color:#1AA094;}
+.msg_info .user_info p{ color:#8d8d8d; }
+.msg_reply{ color:#e15f63; }
+.msg_opr .layui-btn{ margin:2px 5px; }
+
+/*回复*/
+.replay_edit{ overflow: hidden; margin-bottom:20px; }
+.replay_edit a{margin-top: 10px; width:100px; float:right;}

+ 8 - 0
admin/css/news.css

@@ -0,0 +1,8 @@
+.news_search{ padding:10px 10px; }
+.news_search .layui-inline{ margin:5px 5px 5px 0; }
+.layui-table,.layui-table th{ text-align:center; }
+.news_list .layui-btn,.news_list .layui-btn+.layui-btn{ margin:2px 5px; }
+.news_list .layui-form-switch{ margin-top:0; }
+
+/*分页*/
+#page{ text-align:right; }

+ 38 - 0
admin/css/systemTree.css

@@ -0,0 +1,38 @@
+.region, .role, .system{
+    height: calc(100vh - 30px);
+    overflow-y: auto;
+}
+.layui-card-header{
+    padding: 10px 15px;
+    border-bottom: 1px solid #e6e6e6;
+    text-align: center
+}
+.layui-card-header .layui-btn{
+    width: 150px;
+    height: 32px
+}
+.layui-card-body{
+    padding: 0 15px;
+}
+.layui-bot-ul .li-item{
+    display: flex; 
+    padding: 12px 15px;
+    border-bottom: 1px solid #e6e6e6;
+    cursor: pointer;
+    align-items: center;
+}
+.layui-bot-ul .li-item.active{ background-color: #f5f5f5}
+.layui-bot-ul .li-item:hover{ background-color: #f5f5f5}
+.layui-bot-ul .li-item:hover .bot-btn-group{display: flex;}
+.layui-bot-ul .li-item.active .li-item-left h4{color: #1E9FFF}
+.layui-bot-ul .li-item-left h4{font-size: 15px; font-weight: normal; }
+.layui-bot-ul .li-item-left p{font-size: 14px; color: #999; margin-top: 6px}
+.bot-btn-group{
+    display: flex;
+    display: none;
+}
+.bot-btn-group li{cursor: pointer}
+.bot-btn-group li i{font-size: 16px; padding: 5px 3px; color: #000;}
+.layui-bot-ul .group{margin-bottom: 15px}
+.layui-bot-ul .group .li-group-top{padding: 15px; margin-bottom: 10px; border-bottom: 1px solid #e6e6e6; display: flex; align-items: center}
+.layui-bot-ul .group .li-group-top h4{font-size: 15px; margin-top: 8px; font-weight: normal; flex: 1}

+ 28 - 0
admin/css/user.css

@@ -0,0 +1,28 @@
+form input.layui-input[disabled]{ background:#f2f2f2; color:#595963!important; }
+.user_left{ width:45%; float: left; margin:20px 0 0 5%; }
+.user_right{ width:25%; float: left; margin:20px 0 0 5%; text-align: center; }
+.user_right p{ margin:10px 0 25px; font-size: 12px; text-align: center; color: #FF5722;}
+.user_right img#userFace{ width:200px; height:200px; }
+.layui-table,.layui-table th{ text-align:center; }
+
+/*用户列表*/
+.news_list .layui-btn,.news_list .layui-btn+.layui-btn{ margin:2px 5px; }
+#page{ text-align:right; }
+
+
+/*适配*/
+@media screen and (max-width:1050px){
+	/*用户信息*/
+	.user_left,.user_right,.changePwd{ width:100%; float:none; margin-left: 0; }
+	.user_right{ margin-bottom: 20px; }
+}
+@media screen and (max-width: 750px){
+	/*用户信息*/
+	.user_left,.user_right,.changePwd{ width:100%; float:none; margin-left: 0; }
+	.user_right{ margin-bottom: 20px; }
+}
+@media screen and (max-width:432px){
+	/*用户信息*/
+	.user_left,.user_right,.changePwd{ width:100%; float:none; margin-left: 0; }
+	.user_right{ margin-bottom: 20px; }
+}

File diff suppressed because it is too large
+ 81 - 0
admin/iconfont/iconfont.css


BIN
admin/iconfont/iconfont.eot


File diff suppressed because it is too large
+ 1 - 0
admin/iconfont/iconfont.js


File diff suppressed because it is too large
+ 122 - 0
admin/iconfont/iconfont.svg


BIN
admin/iconfont/iconfont.ttf


BIN
admin/iconfont/iconfont.woff


+ 82 - 0
admin/index.js

@@ -0,0 +1,82 @@
+//入口js
+'use strict';
+//版本控制
+var versions = 'v_1.0';
+//不缓存
+versions = 'v_' + new Date().getTime();
+//加载完成全局数组
+var LOAD = [];
+//获取当前目录级别
+var script = document.querySelector('script[door]');
+var dire = ''; //目录
+var _dire = ''; //相对目录
+
+if (script) {
+	var jHtml = script.outerHTML,
+		srcS = 'src="',
+		strE = '"';
+	srcS = jHtml.indexOf(srcS) + srcS.length; //路径开始位置
+	strE = jHtml.indexOf(strE, srcS); //路径结束位置
+	jHtml = jHtml.substring(srcS, strE); //完整路径带文件名
+	strE = jHtml.lastIndexOf('/'); //查找倒数第一斜杠位置
+	dire = jHtml.substring(0, strE + 1); //完整相对路径
+	/**
+	 * (项目跟目录) 预留本地加载文件名,实现预先本地配置 貌似无法完成
+	 * 通过配置项目名(项目目录)来获取项目路劲进行全项目页面相对路径配置
+	 * 完成通过全域名引用admin框架
+	 * 目前未实现
+	 */
+	if (dire.lastIndexOf("../") > -1) {
+		_dire = dire.substr(0, dire.lastIndexOf("../") + 3);
+	}
+	//载入ajax拦截器,引入layui,载入配置文件
+	require(['js/ajaxhook.min.js', "layui/layui.js", 'js/config.js']);
+} else {
+	console.error("入口js标签没有关键属性 door");
+}
+
+//动态加载js函数 连接,成功或失败回调
+function require(url, type) {
+	if (!Array.isArray(url)) {
+		url = [url];
+	}
+	for (var i = 0; i < url.length; i++) {
+		___load('script', url[i], type);
+	}
+}
+//动态载入CSS
+function link(url, type) {
+	if (!Array.isArray(url)) {
+		url = [url];
+	}
+	for (var i = 0; i < url.length; i++) {
+		___load('link', url[i], type);
+	}
+}
+//加载公共函数
+function ___load(type, url, _type) {
+	//拼接地址
+	var href = dire + url;
+	//_type为true 不进行url转换
+	_type && (href = url);
+	//全路劲直接访问
+	(url.substr(0, 2) == '//' || /^http(s*):\/\//.test(url)) && (href = url);
+	//添加版本号
+	href = href + '?v=' + versions;
+	//js类型
+	if (type == 'script') {
+		document.write("<script type='text/javascript' src='" + href + "'></script>");
+	} else { //样式类型
+		document.write("<link rel='stylesheet' type='text/css' media='all' href='" + href + "'>");
+	}
+}
+
+//加载完毕执行
+function ready(callback) {
+	LOAD.push(callback);
+	window.onload = function() {
+		for (var i = 0; i < LOAD.length; i++) {
+			LOAD[i] && (typeof LOAD[i] == 'function') && LOAD[i]();
+		}
+	}
+}

File diff suppressed because it is too large
+ 1 - 0
admin/js/ajaxhook.min.js


+ 29 - 0
admin/js/common.js

@@ -0,0 +1,29 @@
+;
+layui.use('jquery', function() {
+	$ = layui.jquery;
+	$(function() {
+		layui.data('auth', null);
+		console.log('wo',location.searchObj().menuId)
+		if(location.searchObj().menuId){
+			console.log(2)
+			$.ajax({
+				url: 'getMenuBtn',
+				type: 'get',
+				data: {
+					menuId: location.searchObj().menuId || '0'
+				},
+				success: function(res) {
+					
+					if (res.code == 0) {
+						let auth = res.data[0];
+						layui.data('auth', {
+							key: 'data',
+							value: auth
+						})
+						console.log('ee', layui.data('auth').data);
+					}
+				}
+			});
+		}
+	});
+});

+ 338 - 0
admin/js/config.js

@@ -0,0 +1,338 @@
+;
+!(function(win) {
+	"use strict";
+	var pcLogin = function(){
+		let path = top.location.pathname.split('/');
+		path.splice(-1,1,'');
+		path = path.join('/');
+		console.log(path + 'login/');
+		top.location.href = path + 'login/';
+		return true;
+	};
+	window.hywa = {
+		config: {
+			href: '/buyer-side-web',
+			// href: 'http://172.16.90.125:8765',
+			port: {
+				login: '/user/pcLogin', //登录
+				loginOut: "/user/pcLogout", //退出
+				mainMenu: '/menu/sysMenuTree', //获取左侧菜单
+				changePassword: "/user/changePwd", //修改密码
+				check_userPhone: "/login/userCheck", //检验手机号
+				mainInfo: '/user/findSysInfoByUserId', //主页信息
+				uploadFileUrl: '/file/upload', //上传图片
+				getMenuBtn: '/menu/getButton', //获取菜单按钮
+
+				// 农产品
+				productTableUrl: '/product/findProductByWebFrom',
+				productBigTypeUrl: '/dict',
+				productSmallTypeUrl: '/dict/productSmallType',
+				productAddFormUrl: '/product',
+				productUpdateFormUrl: '/product/update',
+				productStatusUrl: '/product/onOff',
+				productByIdUrl: '/product',
+				del_productTableData: '/product',
+
+				// 店铺
+				shopTableUrl: '/sellerInfo',
+				shopStatusUrl: '/sellerInfo/isAvailable',
+				shopByIdUrl: '/sellerInfo',
+
+				// 用户-买家
+				userTableUrl: '/buyer/buyerList',
+				userByIdUrl: '/buyer/examine',
+				userStatusUrl: '/buyer/onOff',
+
+				// 骑手
+				riderTableUrl: '/rider',
+				riderAddFormUrl: '/rider',
+				riderUpdateFormUrl: '/rider',
+				riderByIdUrl: '/product',
+				riderDelUrl: '/rider',
+				riderStatusUrl: '/rider/available',
+
+				// 消息发布
+				mesTableUrl: '/announcement/findAnnouncementInfoAll',
+				mesStatusUrl: '/announcement/available',
+				mesFormUrl: '/announcement/saveOrUpdate',
+				mesByIdUrl: '/announcement/findAnnouncementById',
+				imgContentUpload: '/file/uploadImage',
+				show_img: '/file/showImage?filePath=',
+
+				// 交易统计
+				tradeTableUrl: '/analysis/transaction/list',
+				shopsTableUrl: '/analysis/seller/list',
+				tradeTotalUrl: '/analysis/transaction',
+				shopsTotalUrl: '/analysis/seller',
+				tradeExportUrl: '/analysis/transaction/excel',
+				shopExportUrl: '/analysis/seller/excel',
+
+				// 访客分析
+				visitorTableUrl: '/analysis/customer',
+				viewsVolumeUrl: '/analysis/views',
+
+				// 排行榜
+				goodsTableUrl: '/analysis/product/leaderboard',
+				sellerTableUrl: '/analysis/seller/leaderboard',
+
+				// 单品分析
+				singleGoodsTotalUrl: '/analysis/product',
+				singleGoodsTableUrl: '/analysis/product/details',
+				singleOrderVolumeUrl: '/analysis/orders',
+
+				multiTypeSelect: "/dict", //参数多条件查询
+				getProvince: "/region/province/index", //获取省
+				getCity: "/region/city/index", //获取市
+				getCounty: "/region/county/index", //获取县
+
+				// 订单
+				purchaseOrderTableUrl: "/orderInfo/list",
+				flowOrderTableUrl: "/transferOrder/findByOrderId",
+				orderByIdUrl: '/orderInfo/orderDetails',
+
+				// 骑手取货
+				riderPickTableUrl: '/transferOrder/list',
+				
+				//费用设置
+				costsSetUrl:'/costsSet',
+
+				// 权限
+				userList: "/user/findAll", //用户列表
+				userAddNew: "/user", //添加用户
+				delete_newAddUser: "/user", //删除用户
+				select_user: "/user/findById", //查询用户
+				forbidUser: '/user/disableUser', //禁止用户
+				purchaseUserList: '/user/findSpotName', //获取用户收购点信息
+
+				regionListUrl: '/area/search',
+				regionFormUrl: '/area',
+				roleDataList: "/role/getAll", //获取角色列表
+
+				roleListUrl: '/role/getAll',
+				roleFormUrl: '/role',
+				roleByid: '/role/findById',
+
+				menuListUrl: '/menu/getMenuByRole',
+				menuFormUrl: '/menu/saveRoleMenu',
+			}
+		},
+		sessionTable: {
+			tableName: 'system',
+			userData: 'userData',
+		},
+		jumpPage: {
+			home: "../index.html",
+			login: 'login/'
+		},
+		codeVerify: {
+			401: pcLogin,
+			402: pcLogin,
+			403: pcLogin,
+			404: pcLogin,
+			405: pcLogin,
+			1004: function() {
+				return true;
+			},
+			2006: function() {
+				return false;
+			},
+			default: function() {
+				return true;
+			}
+		},
+		//字体库,layui样式,自己的公共样式,所有页面样式
+		css: ['iconfont/iconfont.css', 'layui/css/layui.css', 'css/common.css'],
+		//需要加载的js
+		js: []
+	};
+	//加载样式
+	link(window.hywa.css);
+	//加载JS
+	require(window.hywa.js);
+
+	win.hijack = function() {
+		var _this = this;
+		layui.use(['layer'], function() {
+			_this.layer = layui.layer;
+		});
+		_this.json = {
+			code: -404,
+			msg: "返回数据格式错误",
+			count: 0,
+			data: []
+		};
+	};
+	win.hijack.prototype.onload = function(xhr) {
+		var _this = this;
+		if (xhr.readyState === 4) { // 成功完成
+			// 判断响应结果:
+			if (xhr.status === 200) {
+				//layer.close(xhr.xhr.lay_loading);
+				xhr.responseText = JSON.stringify(_this.changeJSON(xhr.responseText).json);
+				switch (_this.json.code) {
+					case 0:
+						// return _this.okMsg(_this.json.msg);
+						return false;
+					default:
+						return _this.errorMsg(_this.json.code, _this.json.msg);
+				};
+			} else {
+				return _this.errorMsg(xhr.status);
+			}
+		} else if (xhr.readyState === 1) {
+			xhr.setRequestHeader('x-requested-with', "XMLHttpRequest");
+		} else {
+
+		}
+	};
+	win.hijack.prototype.open = function(arg, xhr) {
+		var _this = this;
+		_this.url = location.searchObj(arg[1]);
+		//xhr.lay_loading =  layer.load(0, {shade: false});
+		try {
+			if (!_this.url.userId) {
+				var token = layui.sessionData(window.hywa.sessionTable.tableName);
+				_this.url.userId = (JSON.stringify(token) != '{}' ? token.userData.userId : false);
+			}
+		} catch (e) {
+
+		}
+		// debugger
+		_this.url.pageNum = _this.url.page - 0;
+		_this.url.pageSize = _this.url.limit - 0;
+		_this.url.pageNum || (delete _this.url.pageNum);
+		_this.url.pageSize || (delete _this.url.pageSize);
+
+		_this.url.pageNum && (delete _this.url.page);
+		_this.url.pageSize && (delete _this.url.limit);
+		arg[1] = _this.changeUrl(_this.url, arg[1].split('?')[0]).url;
+	};
+	win.hijack.prototype.changeUrl = function(obj, url) {
+		var _this = this;
+		_this.url = (_this.httpVerify(url) ? (function() {
+			return _this.httpVerify(hywa.config.port[url]) ? hywa.config.href + hywa.config.port[url] : hywa.config.port[
+				url];
+		})() : url);
+		console.log("url", _this.url += "?");
+		for (var i in obj) {
+			_this.url += i + "=" + obj[i] + "&";
+		}
+		_this.url = _this.url.substr(0, _this.url.length - 1);
+		return this;
+	};
+	win.hijack.prototype.httpVerify = function(url) {
+		return (url.substr(0, 5) != 'http:' && url.substr(0, 6) != 'https:' && url.substr(0, 2) != '//');
+	};
+	win.hijack.prototype.changeJSON = function(json) {
+		var _this = this;
+		try {
+			json = JSON.parse(json);
+			if (json.retHead) {
+				_this.json.code = json.retHead.errCode;
+				_this.json.msg = json.retHead.errMsg || "不知道怎么了!!!";
+			}
+			if (json.retBody && !!json.retBody.list && !!json.retBody.list.length) {
+				_this.json.count = json.retBody.total || 0;
+				_this.json.data = json.retBody.list || [];
+			} else if (json.retBody != "null" && !!json.retBody && Array.isArray(json.retBody.list) && !json.retBody.total) {
+				_this.json.data = [];
+			} else {
+				_this.json.data = Array.isArray(json.retBody) ? (function() {
+					_this.json.count = json.retBody.length;
+					return json.retBody;
+				})() : (json.retBody != 'null' ? [json.retBody] : []);
+			}
+		} catch (e) {
+			_this.json = {
+				code: -404,
+				msg: "返回数据格式错误",
+				count: 0,
+				data: []
+			};
+		}
+		return this;
+	};
+	win.hijack.prototype.errorMsg = function(code, msg) {
+		var _this = this;
+		_this.layer.msg("(" + code + ") " + (msg || "服务器通讯不畅!"), {
+			icon: 2,
+			time: 3000
+		});
+		return (window.hywa.codeVerify[(code - 0 || 'default')] || window.hywa.codeVerify['default'])();
+	};
+	win.hijack.prototype.okMsg = function(msg) {
+		var _this = this;
+		_this.layer.msg(msg, {
+			icon: 1,
+			time: 800
+		});
+		return false;
+	};
+	win.hijack.prototype.setRequestHeader = function(xhr) {
+		var _this = this;
+		if (typeof xhr.RequestHeader == 'undefined') {
+			xhr.RequestHeader = true;
+			var token = layui.sessionData(window.hywa.sessionTable.tableName);
+			xhr.setRequestHeader('accessToken', (JSON.stringify(token) != '{}' ? token.token : false));
+		}
+	};
+	var hook = new hijack();
+	hookAjax({
+		//拦截函数
+		open: function(arg) {
+			return hook.open(arg, this.xhr);
+		},
+		//拦截回调
+		onreadystatechange: function(xhr) {
+			// console.log(xhr.readyState)
+			return hook.onload(xhr);
+		},
+		onload: function(xhr) {
+			return hook.onload(xhr);
+		},
+		setRequestHeader: function(h, xhr) {
+			// console.log("加头",JSON.stringify(xhr));
+			hook.setRequestHeader(xhr);
+		}
+	});
+})(window);
+/**
+ * 时间格式化
+ */
+Date.prototype.format = function(format) {
+
+	var date = {
+		"M+": this.getMonth() + 1,
+		"d+": this.getDate(),
+		"h+": this.getHours(),
+		"m+": this.getMinutes(),
+		"s+": this.getSeconds(),
+		"q+": Math.floor((this.getMonth() + 3) / 3),
+		"S+": this.getMilliseconds()
+	};
+	if (/(y+)/i.test(format)) {
+		format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
+	}
+	for (var k in date) {
+		if (new RegExp("(" + k + ")").test(format)) {
+			format = format.replace(RegExp.$1, RegExp.$1.length == 1 ?
+				date[k] : ("00" + date[k]).substr(("" + date[k]).length));
+		}
+	}
+	return format;
+}
+/**
+ * URL参数转换为对象
+ */
+Location.prototype.searchObj = function(url) {
+	var obj = {};
+	var arr = (url || this.search).match(/[?&][^?&]+=[^?&]+/g);
+	if (arr) {
+		arr.forEach(function(item) {
+			var tempArr = item.substring(1).split('=');
+			obj[decodeURIComponent(tempArr[0])] = decodeURIComponent(tempArr[1]);
+			length++;
+		});
+	}
+	return obj;
+}

File diff suppressed because it is too large
+ 22 - 0
admin/js/echarts.min.js


+ 169 - 0
admin/js/layuiPlugins/cascade.js

@@ -0,0 +1,169 @@
+/**
+ * 请求接口格式
+ * {
+ }
+ */
+layui.define(['jquery', 'form', 'layer'], function (exports) {
+	var $ = layui.jquery,
+		form = layui.form,
+		layer = layui.layer;
+	var Class = function (obj) {
+		var _this = this;
+		_this.elem = obj.elem || 'body'; //级联容器
+		_this.url = obj.url || {}; //级联接口
+		_this.formParm = []; //表单参数名
+		typeof obj.url == 'object' && ($.each(obj.url, function (key, value) {
+			_this.formParm.push(key);
+		}));
+		_this.listParamName = obj.listParamName || {
+			valueName: 'id',
+			name: 'name'
+		};
+		_this.width = {};
+		_this.placeholder = {};
+		_this.box = $('body'); //子集容器
+		_this.boxs = []; //所有子集
+		_this.title = obj.title || null; //标题
+		_this.hostParm = { //默认请求参数名
+			idName: 'id',
+			rowsName: 'limit'
+		};
+		_this.valObj = {}; //初始值对象
+		_this[_this.hostParm['rowsName']] = obj[_this.hostParm['rowsName']] || 10000; //请求条数
+		for (var i in obj.hostParm) { //自定义请求参数名
+			_this.hostParm[i] = obj.hostParm[i];
+		}
+		_this.data = {}; //默认请求参数
+		_this.data[_this.hostParm['rowsName']] = _this[_this.hostParm['rowsName']]; //赋值参数
+		_this.verify = obj.verify || {};
+
+		$.extend(this, obj);
+		_this.init(); //初始化
+	};
+	/**
+	 *返回当前元素在数组中的下标 
+	 * @param {Object} val
+	 */
+	Class.prototype.indexOf = function (arr, val) {
+		for (var i = 0; i < arr.length; i++) {
+			if (arr[i] == val) return i;
+		}
+		return -1;
+	};
+	/**
+	 * 初始化父下拉列表
+	 */
+	Class.prototype.init = function () {
+		var _this = this;
+		//select 容器
+		_this.box = $('<div class="layui-input-inline"></div>');
+		//初始化值
+		if(JSON.stringify(_this.valObj) != '{}'){
+			_this.val();
+		}
+		//渲染首下拉框
+		_this.element(_this.formParm[0]);
+	};
+	Class.prototype.element = function (name, code, callback) {
+		var _this = this;
+		//验证子接口配置
+		if (!_this.url[name]) {
+			// layer.msg("没有配置下级接口",{icon:2,time:600});
+			return _this;
+		}
+		//获取设置默认子集请求参数(子集合父id)
+		_this.data[_this.hostParm['idName']] = code || null;
+		//设置默认请求页码
+		_this.data['page'] = _this.data['page'] || 1;
+		$.ajax({
+			url: _this.url[name],
+			data: _this.data,
+			success: function (res) {
+				//指定select唯一ID
+				let select_id = "select_"+_this.___id;
+				//获取当前级联字段下标
+				let subscript = _this.indexOf(_this.formParm, name);
+				// _this.thanName(name);
+				//保存当前select对象
+				_this.boxs[subscript] = $(_this.selectHtml(select_id, name, res));
+				//往select容器添加包装好的select对象
+				$(_this.elem).append(_this.boxs[subscript]);
+				//绑定select点击事件
+				_this.event(name,select_id);
+				//执行赋值回调函数
+				!!callback && callback(name, select_id);
+				typeof _this.valObj[name] != 'undefined' && ($("#" + select_id+name).val(_this.valObj[name]));
+				form.render();
+			}
+		});
+	};
+	/**
+	 * 包装Html
+	 */
+	Class.prototype.selectHtml = function (select_id, name, res) {
+		var _this = this;
+		var html = '<div class="layui-input-inline" style="width:'+(this.width[name] || "auto")+';"><select name="' + name + '" lay-verify="' + this.verify[name] +
+			'" lay-filter="' + select_id+name + '" id="' +
+			select_id+name + '"><option value="">'+(this.placeholder[name] || '请选择')+'</option>';
+		for (let xyz = 0; xyz < res.data.length; xyz++) {
+			html += '<option value="' + res.data[xyz][_this.listParamName['valueName']] + '">' + res.data[xyz][_this.listParamName[
+				'name']] + '</option>';
+		}
+		return (html + '</select></div>');
+	};
+	Class.prototype.event = function (name,select_id) {
+		var _this = this;
+		var x = _this.indexOf(_this.formParm, name);
+		form.on("select(" + select_id+name + ")", function (obj) {
+			_this.removeBox(x);
+			_this.click(obj);
+			if(!obj.value){
+				return false;
+			};
+			_this.element(_this.formParm[x - 0 + 1], obj.value);
+			return false;
+		});
+	};
+	Class.prototype.click = function (obj) {
+
+	};
+	Class.prototype.removeBox = function (i) {
+		var _this = this;
+		for (var x = i + 1; x < _this.boxs.length; x++) {
+			_this.boxs[x].remove();
+		}
+	};
+	Class.prototype.thanName = function (name) {
+		for (let i = 0; i < this.boxs.length; i++) {
+			if (this.boxs[i][0].firstChild && this.boxs[i][0].firstChild.name == name) {
+				this.boxs[i].remove();
+			}
+		}
+	};
+	/**
+	 * 初始值
+	 */
+	Class.prototype.val = function (obj) {
+		var _this = this;
+		$.extend(_this.valObj, obj);
+		(function temp(i) {
+			if (_this.valObj[_this.formParm[i + 1]]) {
+				_this.element(_this.formParm[i - 0 + 1], _this.valObj[_this.formParm[i]], function (name, select_id) {
+					if (i == -1) {
+						_this.removeBox(i);
+					}
+					temp(++i);
+				});
+			}
+		})(-1);
+		return _this;
+	};
+	var cascade = {};
+	cascade.render = function (e) {
+		e.___id = this.id = (this.id || 0) - 0 + 1;
+		var i = new Class(e = e || {});
+		t = $(e.elem);
+		return t[0] ? i : layui.hint().error("layui.cascade 没有找到" + e.elem + "元素");
+	};
+	exports('cascade', cascade);
+});

+ 760 - 0
admin/js/layuiPlugins/eleTree.js

@@ -0,0 +1,760 @@
+/**
+ * 基于layui的tree重写
+ * author: hsianglee
+ * 最近修改时间: 2018/09/26
+ */
+
+layui.define(["jquery", "laytpl", "layer", "form"], function (exports) {
+    var $ = layui.jquery;
+    var laytpl = layui.laytpl;
+    var layer = layui.layer;
+    var form = layui.form;
+
+    function Class(option) {
+        this.option = option;     // 获取传入的数据
+        this.elem = "";
+        this.data = [];
+        this.showCheckbox = this.option.showCheckbox;
+        this.showIcon = this.option.showIcon;
+        this.drag = this.option.drag;
+        this.accordion = this.option.accordion;
+        this.contextmenuList = [];
+        this.node = "";               // 生成树的dom字符串
+        this.checkedData = [];        // 被选中的数据
+        this.prevClickEle;          // 记录上次点击的dom
+        this.treeMenu = "";           // 右键菜单字符串
+        this.filter = "";
+        this.menuShow = this.option.menuShow;
+        this.open = this.option.open;
+
+        this.render();
+    }
+
+    Class.prototype = {
+        constructor: Class,
+        // 初始化参数数据
+        render: function () {
+            var self = this;
+            self.option.elem ? (function () {
+                self.elem = self.option.elem;
+            })() : (function () {
+                throw "缺少elem节点选择器";
+            })();
+            self.contextmenuList = self.option.contextmenuList ? self.option.contextmenuList : [];
+            self.filter = $(self.elem).attr("lay-filter");
+            // 判断data参数
+            if (self.option.data) {
+                self.data = self.option.data;
+                self.init();
+                return;
+            }
+            // 判断url参数
+            if (self.option.url) {
+                $.ajax({
+                    url: self.option.url,
+                    type: self.option.type ? self.option.type : "get",
+                    data: self.option.where ? self.option.where : {},
+                    success: function (data) {
+                        if (data.code === 0) {
+                            self.data = data.data;
+                            self.init();
+                            return;
+                        }
+                        layer.alert(data.Msg, { title: "选择器" + self.elem + "获取数据失败", icon: 2 });
+                    }
+                });
+                return;
+            }
+            throw "选择器" + self.elem + "缺少data或url参数";
+        },
+        // 初始化容器和标签
+        init: function () {
+            var self = this;
+            this.node = "";
+            $(this.elem).empty();
+            $(this.elem).off();
+            this.nodeInit(this.data, 0, false);
+
+            $(this.elem).html(this.node);
+            this.checkboxEvent();
+            // 更新选中的数据
+            this.getCheckedData();
+
+            this.drag && this.nodeDrag();
+
+            this.eleTreeEvent();
+            this.eleTreeClick();
+
+            this.contextmenuList.length && this.contextmenuList.length > 0 && this.rightClickMenu();
+            this.checkInit();
+
+        },
+        // dom生成
+        nodeInit: function (arr, count, spread) {
+            // count: 第几层
+            // spread: 是否不展开
+            var self = this;
+            var a = [];
+            arr.forEach(function (val, index) {
+                var b = ['<div class="eleTree-node ', spread ? 'eleTree-hide' : "", '" eleTree-floor="' + count + '">'
+                    , '<div class="eleTree-node-content" style="padding-left: ' + 18 * count + 'px;">'
+                    , '<span class="eleTree-node-content-icon">'
+                    // 判断叶子节点
+                    , (function () {
+                        if (val.children && val.children.length > 0) {
+                            var s = '<i class="layui-icon layui-icon-triangle-r ';
+                            if (val.spread) {
+                                s += 'icon-rotate';
+                            }
+                            s += ' "></i>'
+                            return s;
+                        } else {
+                            return '<i class="layui-icon layui-icon-triangle-r" style="color: transparent;"></i>'
+                        }
+                    })()
+                    , '</span>'
+                    // 判断是否启用checkbox
+                    , (function () {
+                        var s = '';
+                        if (self.showCheckbox) {
+                            s += '<input type="checkbox" value="' + val.id + '" name="eleTree-node"';
+                            if (val.checked == 1) {
+                                s += ' eleTree-status="1" checked '
+                            } else {
+                                s += ' eleTree-status="0"'
+                            }
+                            s += 'class="eleTree-hideen '
+                            if (self.open == 0) {
+                                val.disabled = true;
+                                if (val.disabled) {
+                                    s += 'eleTree-disabled'
+                                }
+                            }
+                            s += '" >';
+                        }
+
+                        return s;
+                    })()
+                    , (function () {
+                        if (self.showIcon) {
+                            return '<span class="eleTree-node-content-iconfont"><i class="layui-icon iconfont">' + val.icon + '</i></span>'
+                        }
+                    })()
+                    , (function () {
+                        if (self.menuShow) {
+                            return '<span class="eleTree-node-content-label">' + val.name + '</span>'
+                        } else {
+                            return '<span class="eleTree-node-content-label">' + val.areaName + '</span>'
+                        }
+                    })()
+                    , (function () {
+                        if (val.status == 2) {
+                            return '<span class="eleTree-node-content-btn"><i class="layui-icon layui-forbid iconfont icon-forbid"></i></span>'
+                        }
+                    })()
+                    , (function () {
+                        if (val.status == 1) {
+                            return '<span class="eleTree-node-content-btn"><i class="layui-icon layui-lock iconfont icon-lock"></i></span>'
+                        }
+                    })()
+                    , '</div>'
+                    , '<div class="eleTree-node-group">'
+                    , (function () {
+                        if (val.children && val.children.length > 0) {
+                            return self.nodeInit(val.children, count + 1, !val.spread);  // 获取已经遍历完的子节点
+                        }
+                    })()
+                    , '</div>'
+                    , '</div>'];
+                a = a.concat(b);
+            }, this);
+            this.node = a.join("");
+            return this.node;   // 返回已经遍历完的子节点
+        },
+        // 手风琴效果
+        accordionFn: function (ele, d) {
+            if (!this.accordion) return;
+            // 手风琴
+            var parentSibling = ele.parent(".eleTree-node").siblings(".eleTree-node");
+            parentSibling.children(".eleTree-node-group").children().slideUp("fast");
+            parentSibling.children(".eleTree-node-content").find(".layui-icon-triangle-r").removeClass("icon-rotate");
+            var parentData = d.parentData;
+            // 最外层判断
+            if (d.index.length === 1) {
+                this.data.forEach(function (val, index) {
+                    if (index !== parentData.childIndex) {
+                        delete val.spread;
+                    }
+                })
+            } else {
+                parentData.data.children.forEach(function (val, index) {
+                    if (index !== parentData.childIndex) {
+                        delete val.spread;
+                    }
+                })
+            }
+        },
+        // 展开合并动画
+        eleTreeEvent: function () {
+            var self = this;
+            $(this.elem).on("click", ".eleTree-node-content-icon", function (e) {
+                e.stopPropagation();
+                // 获取点击所在数据
+                var node = $(this).parents(".eleTree-node ");
+                var data = self.reInitData(node);
+                var d = data.currentData;
+                // 切换下拉
+                var el = $(this).find(".layui-icon-triangle-r");
+                if (el.hasClass("icon-rotate")) {
+                    $(this).parent(".eleTree-node-content").siblings(".eleTree-node-group").children().slideUp("fast");
+                    el.removeClass("icon-rotate");
+                    // 数据修改
+                    delete d.spread;
+                } else {
+                    $(this).parent(".eleTree-node-content").siblings(".eleTree-node-group").children().slideDown("fast");
+                    el.addClass("icon-rotate");
+                    // 数据修改
+                    d.spread = true;
+
+                    self.accordionFn($(this), data);
+
+                }
+                self.prevClickEle = $(this);
+
+                // 数据返回
+                layui.event.call(this, "eleTree", 'toggleSlide(' + self.filter + ')', {
+                    data: self.data
+                    , currentData: d
+                });
+
+                $("#tree-menu").hide().remove();
+            });
+            $(document).on("click", function () {
+                $("#tree-menu").hide().remove();
+            });
+        },
+        // 单击动画
+        eleTreeClick: function () {
+            var self = this;
+            $(this.elem).on("click", ".eleTree-node-content", function (e) {
+                if ($(this).find(".layui-lock").length > 0) {
+                    ;
+                    return true
+                }
+                e.stopPropagation();
+                // 添加active背景
+                $(".eleTree-node-content").removeClass("eleTree-node-content-active");
+                $(this).addClass("eleTree-node-content-active");
+                // 获取点击所在数据
+                var node = $(this).parent(".eleTree-node ");
+                var data = self.reInitData(node);
+                var d = data.currentData;
+                // 数据返回
+                layui.event.call(this, "eleTree", 'click(' + self.filter + ')', {
+                    currentData: d
+                });
+                $("#tree-menu").hide().remove();
+            });
+            $(document).on("click", function () {
+                $("#tree-menu").hide().remove();
+            });
+        },
+        // 右键菜单
+        rightClickMenu: function () {
+            var self = this;
+            var menuStr = ['<ul id="tree-menu" lay-filter="treeMenu">'
+                , $.inArray("copy", this.contextmenuList) !== -1 ? '<li class="copy"><a href="javascript:;">复制</a></li>' : ''
+                , $.inArray("add", this.contextmenuList) !== -1 ? '<li class="add"><a href="javascript:;">新增子区域</a></li>' : ''
+                , $.inArray("edit", this.contextmenuList) !== -1 ? '<li class="edit"><a href="javascript:;">修改</a></li>' : ''
+                , $.inArray("forbid", this.contextmenuList) !== -1 ? '<li class="forbid"><a href="javascript:;">禁用</a></li>' : ''
+                , $.inArray("remove", this.contextmenuList) !== -1 ? '<li class="remove"><a href="javascript:;">删除</a></li>' : ''
+                , '</ul>'].join("");
+            this.treeMenu = $(menuStr);
+            $(this.elem).on("contextmenu", ".eleTree-node-content", function (e) {
+                if ($(this).find(".eleTree-node-content-btn").length > 0) {
+                    ;
+                    return true
+                }
+                var _self = this;
+                e.stopPropagation();
+                e.preventDefault();
+                // 添加active背景
+                $(".eleTree-node-content").removeClass("eleTree-node-content-active");
+                if (self.prevClickEle) self.prevClickEle.removeClass("eleTree-node-content-active");
+                $(this).addClass("eleTree-node-content-active");
+
+                // 菜单位置
+                $(self.elem).after(self.treeMenu);
+                $("#tree-menu").css({
+                    left: e.pageX + 10,
+                    top: e.pageY - 30,
+                }).show();
+                // 复制
+                $("#tree-menu li.copy").off().on("click", function () {
+                    var el = $(_self).children(".eleTree-node-content-label").get(0);
+                    var selection = window.getSelection();
+                    var range = document.createRange();
+                    range.selectNodeContents(el);
+                    selection.removeAllRanges();
+                    selection.addRange(range);
+                    document.execCommand('Copy', 'false', null);
+                    selection.removeAllRanges();
+                });
+                // 新增
+                $("#tree-menu li.add").off().on("click", function () {
+                    var node = $(_self).parent(".eleTree-node ");
+                    var data = self.reInitData(node);
+                    var d = data.parentData.data;
+                    // 数据返回
+                    layui.event.call(_self, "eleTree", 'add(' + self.filter + ')', {
+                        data: data.currentData,
+                        parentData: d
+                    });
+                });
+                // 删除
+                $("#tree-menu li.remove").off().on("click", function () {
+                    // 数据删除
+                    var node = $(_self).parent(".eleTree-node ");
+
+                    var data = self.reInitData(node);
+                    var d = data.parentData.data;
+                    var arr = data.index;
+                    console.log(data)
+                    // 最外层判断
+                    if (arr.length === 1) {
+                        self.data.splice(arr[arr.length - 1], 1);
+                    } else {
+                        if (d["children"]) {
+                            d["children"].splice(arr[arr.length - 1], 1);
+                            d["children"].length === 0 && delete d["children"];
+                        }
+                    }
+
+                    // 数据返回
+                    layui.event.call(_self, "eleTree", 'remove(' + self.filter + ')', {
+                        data: data.currentData
+                        , parentData: d
+                    });
+                    // dom删除
+                    var tem = $(_self).parent(".eleTree-node").parent(".eleTree-node-group");
+                    //$(_self).parent(".eleTree-node").remove();
+                    var isLeaf = tem.children(".eleTree-node").length === 0;
+                    isLeaf && tem.siblings(".eleTree-node-content").children(".eleTree-node-content-icon").children("i").css("color", "transparent").removeClass("icon-rotate");
+                });
+
+                // 禁用
+                $("#tree-menu li.forbid").off().on("click", function () {
+                    // 数据删除
+                    var node = $(_self).parent(".eleTree-node ");
+                    var data = self.reInitData(node);
+                    var d = data.parentData.data;
+                    var arr = data.index;
+                    // 最外层判断
+                    if (arr.length === 1) {
+                        self.data.splice(arr[arr.length - 1], 1);
+                    } else {
+                        if (d["children"]) {
+                            d["children"].splice(arr[arr.length - 1], 1);
+                            d["children"].length === 0 && delete d["children"];
+                        }
+                    }
+
+                    // 数据返回
+                    layui.event.call(_self, "eleTree", 'forbid(' + self.filter + ')', {
+                        data: data.currentData,
+                        parentData: d
+                    });
+                    // dom禁止
+                    var tem = $(_self).parent(".eleTree-node").parent(".eleTree-node-group");
+                    var isLeaf = tem.children(".eleTree-node").length === 0;
+                    isLeaf && tem.siblings(".eleTree-node-content").children(".eleTree-node-content-icon").children("i").css("color", "transparent").removeClass("icon-rotate");
+                });
+
+                self.prevClickEle = $(this);
+            })
+        },
+        // 自定义checkbox解析
+        checkboxRender: function () {
+            $(this.elem).find(this.elem + " .eleTree-checkbox").remove();
+            $(this.elem + " input.eleTree-hideen[type=checkbox]").each(function (index, item) {
+                if ($(item).hasClass("eleTree-disabled")) {
+                    $(item).after('<div class="eleTree-checkbox eleTree-checkbox-disabled"><i class="layui-icon"></i></div>');
+                } else {
+                    $(item).after('<div class="eleTree-checkbox"><i class="layui-icon"></i></div>');
+                }
+
+            })
+        },
+        // 通过子孙选中祖父(递归)
+        selectParents: function (inp, eleNode, siblingNode) {
+            // inp: 实际input(dom元素)
+            // eleNode: input父层类(.eleTree-node)
+            // siblingNode: 父层同级兄弟
+            while (Number(eleNode.attr("eletree-floor")) !== 0) {
+                // 同级input状态存入数组
+                var arr = [];
+                arr.push($(inp).attr("eleTree-status"));
+                siblingNode.each(function (index, item) {
+                    var siblingIsChecked = $(item).children(".eleTree-node-content").children("input[name='eleTree-node']").attr("eleTree-status");
+                    arr.push(siblingIsChecked);
+                })
+                // 父元素的实际input
+                var parentInput = eleNode.parent(".eleTree-node-group").siblings(".eleTree-node-content").children("input[name='eleTree-node']");
+                // 父元素的checkbox替代
+                var parentCheckbox = parentInput.siblings(".eleTree-checkbox");
+                // 父元素的icon
+                var parentIcon = parentCheckbox.children("i");
+                if (arr.every(function (val) {
+                    return val === "1";
+                })) {
+                    // 子都选中则选中父
+                    parentInput.prop("checked", "checked").attr("eleTree-status", "1");
+                    parentCheckbox.addClass("eleTree-checkbox-checked");
+                    parentIcon.addClass("layui-icon-ok").removeClass("eleTree-checkbox-line");
+                }
+                if (arr.some(function (val) {
+                    return val === "0" || val === "2";
+                })) {
+                    // 子有一个未选中则checkbox第三种状态
+                    // parentInput.prop("checked","checked");
+                    parentInput.attr("eleTree-status", "2");
+                    parentCheckbox.addClass("eleTree-checkbox-checked");
+                    parentIcon.removeClass("layui-icon-ok").addClass("eleTree-checkbox-line");
+                }
+                if (arr.every(function (val) {
+                    return val === "0";
+                })) {
+                    // 子全部未选中则取消父选中(并且取消第三种状态)
+                    parentInput.removeAttr("checked");
+                    parentInput.attr("eleTree-status", "0");
+                    parentCheckbox.removeClass("eleTree-checkbox-checked");
+                    parentIcon.removeClass("layui-icon-ok eleTree-checkbox-line");
+                }
+
+                var parentNode = eleNode.parents("[eletree-floor='" + (Number(eleNode.attr("eletree-floor")) - 1) + "']");
+                var parentCheckbox = parentNode.children(".eleTree-node-content").children("input[name='eleTree-node']").get(0);
+                var parentSiblingNode = parentNode.siblings(".eleTree-node");
+                eleNode = parentNode;
+                inp = parentCheckbox;
+                siblingNode = parentSiblingNode;
+            }
+        },
+        // checkbox添加选中事件
+        checkboxEvent: function () {
+            var self = this;
+            this.checkboxRender();
+            // input添加属性eleTree-status:即input的三种状态,"0":未选中,"1":选中,"2":子孙部分选中
+            $(this.elem).on("click", ".eleTree-checkbox", function (e) {
+                e.stopPropagation();
+                if ($(this).hasClass("eleTree-checkbox-disabled")) return;
+                // 获取点击所在数据
+                var node = $(this).parent(".eleTree-node-content").parent(".eleTree-node ");
+                var d = self.reInitData(node).currentData;
+                // 实际的input
+                var inp = $(this).siblings(".eleTree-hideen").get(0);
+                if (inp.checked) {
+                    $(inp).removeAttr("checked").attr("eleTree-status", "0");
+                    $(this).removeClass("eleTree-checkbox-checked");
+                    $(this).children("i").removeClass("layui-icon-ok eleTree-checkbox-line");
+                    // 数据更新
+                    delete d.checked;
+                } else {
+                    $(inp).prop("checked", "checked").attr("eleTree-status", "1");
+                    $(this).addClass("eleTree-checkbox-checked");
+                    $(this).children("i").addClass("layui-icon-ok").removeClass("eleTree-checkbox-line");
+                    d.checked = true;
+                }
+
+                var childNode = $(inp).parent(".eleTree-node-content").siblings(".eleTree-node-group").find("input[name='eleTree-node']");
+                // 点击祖父层选中子孙层
+                inp.checked ? (function () {
+                    childNode.prop("checked", "checked").attr("eleTree-status", "1");
+                    childNode.siblings(".eleTree-checkbox").addClass("eleTree-checkbox-checked");
+                    childNode.siblings(".eleTree-checkbox").children("i").addClass("layui-icon-ok").removeClass("eleTree-checkbox-line");
+                })() : (function () {
+                    childNode.removeAttr("checked");
+                    childNode.attr("eleTree-status", "0");
+                    childNode.siblings(".eleTree-checkbox").removeClass("eleTree-checkbox-checked");
+                    childNode.siblings(".eleTree-checkbox").children("i").removeClass("layui-icon-ok eleTree-checkbox-line");
+                })();
+
+
+                var eleNode = $(inp).parent(".eleTree-node-content").parent(".eleTree-node");
+                var siblingNode = eleNode.siblings(".eleTree-node");
+                // 点击子孙层选中祖父层(递归)
+                self.selectParents(inp, eleNode, siblingNode);
+                // 更新选中的数据
+                self.getCheckedData();
+
+                // 数据返回
+                layui.event.call(inp, "eleTree", 'checkbox(' + self.filter + ')', {
+                    data: self.data
+                    , checkedData: self.checkedData
+                    , currentData: d
+                });
+            })
+        },
+        // 拖拽
+        nodeDrag: function () {
+            var self = this;
+            $(this.elem).on("mousedown", ".eleTree-node-content", function (e) {
+                var _self = this;
+                var time = 0;
+                e.stopPropagation();
+                $(self.elem).css("user-select", "none");
+                var node = $(this).parent(".eleTree-node ");
+                var cloneNode = node.clone(true);
+                var temNode = node.clone(true);
+
+                var x = e.clientX - $(self.elem).offset().left;
+                var y = e.clientY - $(self.elem).offset().top;
+                $(self.elem).append(cloneNode);
+                cloneNode.css({
+                    display: "none",
+                    position: "absolute",
+                    "background-color": "#f5f5f5",
+                    width: "100%"
+                })
+                $("#tree-menu").hide().remove();
+
+                $(document.body).on("mousemove", function (e) {
+                    // t为了区别click事件
+                    time++;
+                    if (time > 2) {
+                        var xx = e.clientX - $(self.elem).offset().left + 10;
+                        var yy = e.clientY - $(self.elem).offset().top - 5;
+
+                        cloneNode.css({
+                            display: "block",
+                            left: xx + "px",
+                            top: yy + "px"
+                        })
+                    }
+                }).on("mouseup", function (e) {
+                    // dom更改
+                    var groupNode = node.parent(".eleTree-node-group");
+                    cloneNode.remove();
+                    $(self.elem).css("user-select", "auto");
+                    $(document.body).off("mousemove").off("mouseup");
+                    var target = $(e.target);
+                    // 数据更改
+                    var dataReset = function (len, childIndex, t) {
+                        // 删除数据
+                        var d = self.reInitData(node);
+                        var parentData = d.parentData.data;
+                        var temData = d.currentData;
+                        var i = d.parentData.childIndex;
+
+                        if (len === 0) {
+                            // 判断目标是否超出范围
+                            return false;
+                        }
+                        // 判断当前是否是最外层
+                        if (d.index.length === 1) {
+                            self.data.splice(d.index[0], 1);
+                        } else {
+                            parentData.children.splice(i, 1);
+                            parentData.children.length === 0 && delete parentData.children;
+                        }
+                        // 如果是同级的,并且从上面的移动到下面,则index减一
+                        var f1 = Number(node.attr("eletree-floor")) - 1;
+                        var f2 = Number(node.attr("eletree-floor")) - 1;
+                        if (i < childIndex && node.parents(".eleTree-node[eletree-floor='" + f1 + "']").get(0).isEqualNode(t.parents(".eleTree-node[eletree-floor='" + f2 + "']").get(0))) {
+                            childIndex = childIndex - 1;
+                        }
+
+                        return {
+                            temData: temData,
+                            childIndex: childIndex
+                        };
+                    }
+
+                    // 判断是否是同一个dom树
+                    var isOwnTarget = target.parents(".eleTree").length === 0 ? target.get(0) : target.parents(".eleTree").get(0);
+                    if (!(isOwnTarget.isEqualNode($(self.elem + ".eleTree").get(0)))) {
+                        return;
+                    }
+
+                    // 判断目标是否是最外层
+                    if (target.get(0).isEqualNode($(self.elem + ".eleTree").get(0))) {
+                        var dataRe = dataReset();
+                        var d = dataRe.temData;
+                        self.data.push(d);
+                        node.remove();
+                        // 添加节点
+                        $(self.elem + ".eleTree").append(temNode);
+                        // 改floor
+                        temNode.attr("eletree-floor", "0");
+                        // 加padding
+                        temNode.children(".eleTree-node-content").css("padding-left", "0px");
+                        // 原dom去三角
+                        var leaf = groupNode.children(".eleTree-node").length === 0;
+                        leaf && groupNode.siblings(".eleTree-node-content")
+                            .children(".eleTree-node-content-icon").children(".layui-icon-triangle-r")
+                            .removeClass("icon-rotate").css("color", "transparent");
+
+                        // 数据返回
+                        if (time > 2) {
+                            layui.event.call(_self, "eleTree", 'drag(' + self.filter + ')', {
+                                data: self.data
+                                , currentData: d
+                            });
+                            eleTree.reload(self.elem, { data: self.data });
+                        }
+                        return;
+                    }
+                    // 判断是否不是同一个dom节点或者是其子节点(父节点不能放到子节点)
+                    var t = target;
+                    if (!target.hasClass("eleTree-node-content")) {
+                        t = target.parents(".eleTree-node-content");
+                    }
+                    var f = Number(node.attr("eletree-floor"));
+                    var isNotParentsNode = node.get(0).isEqualNode(t.parents("[eletree-floor='" + f + "']").get(0));
+
+                    if (!isNotParentsNode) {
+                        var d = self.reInitData(t.parent(".eleTree-node"));
+                        var i = d.parentData.childIndex;
+                        var dataRe = dataReset(d.index.length, i, t);
+                        var temData = dataRe.temData;
+                        i = dataRe.childIndex;
+
+                        // 判断目标是否超出范围
+                        if (temData) {
+                            node.remove();
+                            // 添加之前先删dom
+                            var parentData = d.parentData.data;
+                            if (d.index.length === 1) {
+                                parentData.children ? parentData.children.push(temData) : parentData.children = [temData];
+                            } else {
+                                parentData.children[i].children ? parentData.children[i].children.push(temData) : parentData.children[i].children = [temData];
+                            }
+
+                            // 添加节点
+                            target.siblings(".eleTree-node-group").append(temNode);
+                            // 改floor
+                            var floor = Number(target.parent(".eleTree-node").attr("eletree-floor")) + 1;
+                            temNode.attr("eletree-floor", String(floor));
+                            // 加padding
+                            temNode.children(".eleTree-node-content").css("padding-left", floor * 18 + "px");
+                            // 加三角
+                            target.children(".eleTree-node-content-icon").children(".layui-icon-triangle-r")
+                                .addClass("icon-rotate").css("color", "#c0c4cc");
+                            // 原dom去三角
+                            var leaf = groupNode.children(".eleTree-node").length === 0;
+                            leaf && groupNode.siblings(".eleTree-node-content")
+                                .children(".eleTree-node-content-icon").children(".layui-icon-triangle-r")
+                                .removeClass("icon-rotate").css("color", "transparent");
+
+                            // 数据返回
+                            if (time > 2) {
+                                layui.event.call(_self, "eleTree", 'drag(' + self.filter + ')', {
+                                    data: self.data
+                                    , currentData: temData
+                                    , targetData: d.currentData
+                                });
+                                eleTree.reload(self.elem, { data: self.data });
+                            }
+                        }
+                    }
+
+                })
+
+
+            })
+        },
+        // 初始化checkbox选中状态
+        checkInit: function (arr, floor) {
+            var self = this;
+            $(self.elem + " input[eleTree-status='1']").each(function (index, item) {
+                var checkboxEl = $(item).siblings(".eleTree-checkbox");
+                var childNode = checkboxEl.parent(".eleTree-node-content").siblings(".eleTree-node-group").find("input[name='eleTree-node']");
+                // 选择当前
+                checkboxEl.addClass("eleTree-checkbox-checked");
+                checkboxEl.children("i").addClass("layui-icon-ok").removeClass("eleTree-checkbox-line");
+                // 选择子孙
+                childNode.prop("checked", "checked").attr("eleTree-status", "1");
+                childNode.siblings(".eleTree-checkbox").addClass("eleTree-checkbox-checked");
+                childNode.siblings(".eleTree-checkbox").children("i").addClass("layui-icon-ok").removeClass("eleTree-checkbox-line");
+
+                // 选择祖父
+                var eleNode = checkboxEl.parent(".eleTree-node-content").parent(".eleTree-node");
+                var siblingNode = eleNode.siblings(".eleTree-node");
+                self.selectParents(item, eleNode, siblingNode);
+            })
+        },
+        // 获取选中的数据
+        getCheckedData: function () {
+            this.checkedData = [];
+            var self = this;
+            $(this.elem + " input[eletree-status='1']").each(function (index, item) {
+                var node = $(item).parent(".eleTree-node-content").parent(".eleTree-node ");
+                var d = self.reInitData(node).currentData;
+                self.checkedData.push(d);
+            });
+            return this.checkedData
+        },
+        // 通过dom节点找对应数据
+        reInitData: function (node) {
+            var i = node.index();
+            var floor = Number(node.attr("eletree-floor"));
+            var arr = [];     // 节点对应的index
+            while (floor >= 0) {
+                arr.push(i);
+                floor = floor - 1;
+                node = node.parents("[eletree-floor='" + floor + "']");
+                i = node.index();
+            }
+            arr = arr.reverse();
+            var oData = this.data;
+            // 当前节点的父节点数据
+            var parentData = oData[arr[0]];
+            // 当前节点的data数据
+            var d = oData[arr[0]];
+            for (var i = 1; i < arr.length; i++) {
+                d = d["children"] ? d["children"][arr[i]] : d;
+            }
+            for (var i = 1; i < arr.length - 1; i++) {
+                parentData = parentData["children"] ? parentData["children"][arr[i]] : parentData;
+            }
+            return {
+                currentData: d,
+                parentData: {
+                    data: parentData,
+                    childIndex: arr[arr.length - 1]
+                },
+                index: arr
+            }
+        },
+    }
+
+    var thisEleTree = function () {
+        thisEleTree.o[this.elem] = this;
+        thisEleTree.config[this.elem] = this.option;
+        thisEleTree.getCheckedData[this.elem] = this.getCheckedData;
+    }
+    // 保存当前对象(为了获取选中元素时改变this指向)
+    thisEleTree.o = {};
+    // 保存对象的option
+    thisEleTree.config = {};
+    // 获取选中的元素
+    thisEleTree.getCheckedData = {};
+
+    var eleTree = {
+        checkedData: function (elem) {
+            return thisEleTree.getCheckedData[elem].call(thisEleTree.o[elem]);
+        },
+        render: function (option) {
+            var inst = new Class(option);
+            thisEleTree.call(inst);
+        },
+        on: function (events, callback) {
+            return layui.onevent.call(this, "eleTree", events, callback);
+        },
+        reload: function (elem, option) {
+            var config = thisEleTree.config[elem];
+            this.render($.extend({}, config, option));
+        }
+    }
+
+    exports('eleTree', eleTree);
+})

File diff suppressed because it is too large
+ 1733 - 0
admin/js/layuiPlugins/formSelects-v4.js


+ 411 - 0
admin/js/layuiPlugins/layui-xtree.js

@@ -0,0 +1,411 @@
+//**********************************
+//**   本插件依赖 贤心 layui form模块   
+//**   由 小巷 制作 QQ:151446298    
+//**   版本3.0 时间 2018-01-10 20:48 
+//**********************************
+
+//构造
+function layuiXtree(options) {
+    var _this = this;
+    _this._containerid = options.elem;
+    _this.tool = options.tool;
+	_this.checkbox = options.checkbox;
+    typeof options.toolbar == 'function' && (_this.toolbar = options.toolbar);
+    _this._container = document.getElementById(options.elem); //容器
+    _this._container.style.minHeight = "100px";
+    _this._options = options;
+    _this.Loading(options);
+}
+
+//封装IE8 Class选择
+layuiXtree.prototype.getByClassName = function (cn) {
+    if (document.getElementsByClassName) return this._container.getElementsByClassName(cn);
+    var _xlist = this._container.childNodes;
+    var _xtemp = new Array();
+    for (var i = 0; i < _xlist.length; i++) {
+        var _xchild = _xlist[i];
+        var _xclassNames = _xchild.getAttribute('class').split(' ');
+        for (var j = 0; j < _xclassNames.length; j++) {
+            if (_xclassNames[j] == cn) {
+                _xtemp.push(_xchild);
+                break;
+            }
+        }
+    }
+    return _xtemp;
+}
+
+//在一个对象下面找子级
+layuiXtree.prototype.getChildByClassName = function (obj, cn) {
+    var _xlist = obj.childNodes;
+    var _xtemp = new Array();
+    for (var i = 0; i < _xlist.length; i++) {
+        var _xchild = _xlist[i];
+        var _xclassNames = _xchild.getAttribute('class').split(' ');
+        for (var j = 0; j < _xclassNames.length; j++) {
+            if (_xclassNames[j] == cn) {
+                _xtemp.push(_xchild);
+                break;
+            }
+        }
+    }
+    return _xtemp;
+}
+
+//加载特效,且获取数据
+layuiXtree.prototype.Loading = function (options) {
+    var _this = this;
+    _this.xloading = document.createElement("span"); //创建加载对象
+    _this.xloading.setAttribute('class', 'layui-icon layui-anim layui-anim-rotate layui-anim-loop');
+    _this.xloading.innerHTML = '&#xe63e;';
+    _this.xloading.style.fontSize = "50px";
+    _this.xloading.style.color = "#009688";
+    _this.xloading.style.fontWeight = "bold";
+    _this.xloading.style.marginLeft = _this._container.offsetWidth / 2 - 25 + 'px';
+    _this.xloading.style.marginTop = _this._container.offsetHeight / 2 - 50 + 'px';
+    _this._container.innerHTML = '';
+    _this._container.appendChild(_this.xloading); //加载显示
+    if (typeof (options.data) == 'object') {
+        _this._dataJson = options.data;
+        _this.Initial(options);
+        return;
+    }
+
+    //如果是字符串url,进行异步加载
+    var obj = new XMLHttpRequest();
+    obj.open('get', options.data, true);
+    obj.onreadystatechange = function () {
+        if (obj.readyState == 4 && obj.status == 200 || obj.status == 304) { //回调成功
+            if (JSON.parse(obj.responseText).menu) {
+                _this._dataJson = eval('(' + obj.responseText + ')').menu;
+                //_this._dataJson = eval('(' + JSON.parse(obj.responseText).menu + ')'); //将返回的数据转为json
+            }
+            _this.Initial(options);
+        }
+    };
+    obj.send();
+}
+
+//data验证后的数据初始化
+layuiXtree.prototype.Initial = function (o) {
+    var _this = this;
+    _this._form = o.form; //layui from对象
+    _this._domStr = ""; //结构字符串
+    _this._isopen = o.isopen != null ? o.isopen : true;
+    if (o.color == null) o.color = {
+        open: '#2F4056',
+        close: '#2F4056',
+        end: '#2F4056'
+    }; //图标颜色
+    _this._iconOpenColor = o.color.open != null ? o.color.open : "#2F4056";
+    _this._iconCloseColor = o.color.close != null ? o.color.close : "#2F4056";
+    _this._iconEndColor = o.color.end != null ? o.color.end : "#2F4056";
+    if (o.icon == null) o.icon = {
+        open: '&#xe625;',
+        close: '&#xe623;',
+        end: '&#xe621;'
+    }; //图标样式
+    _this._iconOpen = o.icon.open != null ? o.icon.open : '&#xe625;';
+    _this._iconClose = o.icon.close != null ? o.icon.close : '&#xe623;';
+    _this._iconEnd = o.icon.end != null ? o.icon.end : '&#xe621;';
+    _this._click = o.click != null ? o.click : function () {};
+    _this._ckall = o.ckall != null ? o.ckall : false; //全选是否启用
+    _this._ckallSuccess = o.ckallback != null ? o.ckallback : function () {}; //全选回调
+    _this.CreateCkAll();
+    _this.dataBind(_this._dataJson);
+    _this.Rendering();
+}
+
+//全选框
+layuiXtree.prototype.CreateCkAll = function () {
+    var _this = this;
+    if (_this._ckall) {
+        _this._domStr += '<div class="layui-xtree-item">';
+        _this._domStr +=
+            '<input type="checkbox" class="layui-xtree-checkbox layui-xtree-ckall" title="全选" lay-skin="primary" lay-filter="xtreeckall' +
+            _this._containerid + '">';
+        _this._domStr += '</div>';
+    }
+}
+
+//生产结构
+layuiXtree.prototype.dataBind = function (d) {
+    var _this = this;
+    if (d.length > 0) {
+        for (i in d) {
+            var xtree_isend = '';
+            var xtree_ischecked = '';
+            var xtree_isdisabled = d[i].disabled ? ' disabled="disabled" ' : '';
+            _this._domStr += '<div class="layui-xtree-item">';
+            if (!d[i].childrenMenu) {
+                d[i].childrenMenu = [];
+            }
+            if (d[i].childrenMenu.length > 0)
+                _this._domStr += '<i class="layui-icon layui-xtree-icon" data-xtree="' + (_this._isopen ? '1' : '0') +
+                '">' + (_this._isopen ? _this._iconOpen : _this._iconClose) + '</i>';
+            else {
+                _this._domStr += '<i class="layui-icon layui-xtree-icon-null">' + (d[i].icon || _this._iconEnd) +
+                    '</i>';
+                xtree_isend = 'data-xend="1"';
+                xtree_ischecked = !!d[i].roleId ? ' checked ' : '';
+                xtree_isdisabled = d[i].disabled ? ' disabled="disabled" ' : '';
+            }
+            if (!!_this.checkbox) {
+                _this._domStr += '<input type="checkbox" class="layui-xtree-checkbox" ' + xtree_isend +
+                    xtree_ischecked +
+                    xtree_isdisabled + ' value="' + d[i].id + '" title="' + d[i].name +
+                    '" lay-skin="primary" lay-filter="xtreeck' + _this._containerid + '">';
+            }else{
+				_this._domStr += '<div class="layui-inline" style="margin-top: 10px;margin-bottom:0;"><span>'+d[i].name+'</span></div>';
+			}
+            if (!!_this.tool) {
+                _this._domStr +=
+                    '<div class="layui-inline" style="margin-top: 10px;margin-bottom:0;"><a class="layui-btn layui-btn-xs" name="tree_event" event="edit"id="' +
+                    d[i].id +
+                    '">修改</a><a class="layui-btn layui-btn-danger layui-btn-xs" name="tree_event" event="del" id="' +
+                    d[i].id + '">删除</a></div>';
+            }
+            _this.dataBind(d[i].childrenMenu);
+            _this._domStr += '</div>';
+        }
+    }
+}
+//工具栏监听回调
+layuiXtree.prototype.toolbar = function (obj) {
+    
+}
+//通过ID获取
+layuiXtree.prototype.idGetObj = function (id) {
+    var _this = this;
+    var obj = {};
+    (function get(d) {
+        if (d.length > 0) {
+            for (i in d) {
+                if (!d[i].childrenMenu) {
+                    d[i].childrenMenu = [];
+                }
+                if (d[i].id == id) {
+                    obj = d[i];
+                }
+                get(d[i].childrenMenu);
+            }
+        }
+    })(_this._dataJson);
+    return obj;
+}
+//渲染呈现
+layuiXtree.prototype.Rendering = function () {
+    var _this = this;
+    _this._container.innerHTML = _this._domStr;
+    _this._domStr = "";
+
+    //检查选中状态
+    var xtree_ckitems = _this.getByClassName('layui-xtree-checkbox');
+    for (var i = 0; i < xtree_ckitems.length; i++) {
+        if (xtree_ckitems[i].getAttribute('data-xend') == '1' && xtree_ckitems[i].checked) {
+            _this.ParentCheckboxChecked(xtree_ckitems[i]);
+        }
+    }
+
+    _this._form.render('checkbox'); //layui渲染
+    //绑定工具条事件
+    var tree_event = document.getElementsByName('tree_event');
+    for (var tr_i in tree_event) {
+        tree_event[tr_i].onclick = function (e) {
+            _this.toolbar({
+                event: this.getAttribute('event'),
+                data: _this.idGetObj(this.id)
+            });
+        };
+    }
+
+    var xtree_items = _this.getByClassName('layui-xtree-item');
+    var xtree_icons = _this.getByClassName('layui-xtree-icon');
+    var xtree_nullicons = _this.getByClassName('layui-xtree-icon-null');
+
+    for (var i = 0; i < xtree_items.length; i++) {
+        if (xtree_items[i].parentNode == _this._container)
+            xtree_items[i].style.margin = '5px 0 0 10px';
+        else {
+            xtree_items[i].style.margin = '5px 0 0 45px';
+            if (!_this._isopen) xtree_items[i].style.display = 'none';
+        }
+    }
+
+    for (var i = 0; i < xtree_icons.length; i++) {
+        xtree_icons[i].style.position = "relative";
+        xtree_icons[i].style.top = "3px";
+        xtree_icons[i].style.margin = "0 5px 0 0";
+        xtree_icons[i].style.fontSize = "18px";
+        xtree_icons[i].style.color = _this._isopen ? _this._iconOpenColor : _this._iconCloseColor;
+        xtree_icons[i].style.cursor = "pointer";
+
+        xtree_icons[i].onclick = function () {
+            var xtree_chi = this.parentNode.childNodes;
+            if (this.getAttribute('data-xtree') == 1) {
+                for (var j = 0; j < xtree_chi.length; j++) {
+                    if (xtree_chi[j].getAttribute('class') == 'layui-xtree-item')
+                        xtree_chi[j].style.display = 'none';
+                }
+                this.setAttribute('data-xtree', '0')
+                this.innerHTML = _this._iconClose;
+                this.style.color = _this._iconCloseColor;
+            } else {
+                for (var j = 0; j < xtree_chi.length; j++) {
+                    if (xtree_chi[j].getAttribute('class') == 'layui-xtree-item')
+                        xtree_chi[j].style.display = 'block';
+                }
+                this.setAttribute('data-xtree', '1')
+                this.innerHTML = _this._iconOpen;
+                this.style.color = _this._iconOpenColor;
+            }
+        }
+    }
+
+    for (var i = 0; i < xtree_nullicons.length; i++) {
+        xtree_nullicons[i].style.position = "relative";
+        xtree_nullicons[i].style.top = "3px";
+        xtree_nullicons[i].style.margin = "0 5px 0 0";
+        xtree_nullicons[i].style.fontSize = "18px";
+        xtree_nullicons[i].style.color = _this._iconEndColor;
+    }
+
+    _this._form.on('checkbox(xtreeck' + _this._containerid + ')', function (da) {
+        //获取当前点击复选框的容器下面的所有子级容器 
+        var xtree_chis = da.elem.parentNode.getElementsByClassName('layui-xtree-item');
+        //遍历它们,选中状态与它们的父级一致(类似全选功能)
+        for (var i = 0; i < xtree_chis.length; i++) {
+            if (!_this.getChildByClassName(xtree_chis[i], 'layui-xtree-checkbox')[0].disabled) {
+                _this.getChildByClassName(xtree_chis[i], 'layui-xtree-checkbox')[0].checked = da.elem.checked;
+                if (da.elem.checked) _this.getChildByClassName(xtree_chis[i], 'layui-xtree-checkbox')[0].nextSibling
+                    .classList.add('layui-form-checked');
+                else _this.getChildByClassName(xtree_chis[i], 'layui-xtree-checkbox')[0].nextSibling.classList
+                    .remove('layui-form-checked');
+            }
+        }
+        _this.ParendCheck(da.elem);
+        _this._click(da);
+    });
+
+    var _xtree_disableds = _this.getByClassName('layui-disabled');
+    for (var i = 0; i < _xtree_disableds.length; i++) {
+        _xtree_disableds[i].getElementsByTagName('span')[0].style.color = "#B5B5B5";
+    }
+
+    //全选按钮
+    if (_this._ckall) {
+        _this._form.on('checkbox(xtreeckall' + _this._containerid + ')', function (data) {
+            var xtree_allck = data.elem.parentNode.parentNode.getElementsByClassName('layui-form-checkbox');
+            for (var i = 0; i < xtree_allck.length; i++) {
+                if (xtree_allck[i].getAttribute('class').indexOf('layui-checkbox-disbaled') == -1) {
+                    if (data.elem.checked) {
+                        xtree_allck[i].classList.add('layui-form-checked');
+                    } else {
+                        xtree_allck[i].classList.remove('layui-form-checked');
+                    }
+                    xtree_allck[i].parentNode.getElementsByClassName('layui-xtree-checkbox')[0].checked =
+                        data.elem.checked;
+                }
+            }
+            _this._ckallSuccess();
+        });
+    }
+}
+
+//更新渲染
+layuiXtree.prototype.render = function () {
+    var _this = this;
+    _this.Loading(_this._options);
+}
+
+//子节点选中改变,父节点更改自身状态
+layuiXtree.prototype.ParendCheck = function (ckelem) {
+    var _this = this;
+    var xtree_p = ckelem.parentNode.parentNode;
+    if (xtree_p.getAttribute('class') == 'layui-xtree-item') {
+        var xtree_all = _this.getChildByClassName(xtree_p, 'layui-xtree-item');
+        var xtree_count = 0;
+
+        for (var i = 0; i < xtree_all.length; i++) {
+            if (_this.getChildByClassName(xtree_all[i], 'layui-xtree-checkbox')[0].checked) {
+                xtree_count++;
+            }
+        }
+
+        if (xtree_count <= 0) {
+            _this.getChildByClassName(xtree_p, 'layui-xtree-checkbox')[0].checked = false;
+            _this.getChildByClassName(xtree_p, 'layui-xtree-checkbox')[0].nextSibling.classList.remove(
+                'layui-form-checked');
+        } else {
+            _this.getChildByClassName(xtree_p, 'layui-xtree-checkbox')[0].checked = true;
+            _this.getChildByClassName(xtree_p, 'layui-xtree-checkbox')[0].nextSibling.classList.add(
+                'layui-form-checked');
+        }
+        this.ParendCheck(_this.getChildByClassName(xtree_p, 'layui-xtree-checkbox')[0]);
+    }
+}
+
+//渲染之前按照选中的末级去改变父级选中状态
+layuiXtree.prototype.ParentCheckboxChecked = function (e) {
+    var _this = this;
+    if (e.parentNode.parentNode.getAttribute('class') == 'layui-xtree-item') {
+        var _pe = _this.getChildByClassName(e.parentNode.parentNode, 'layui-xtree-checkbox')[0];
+        _pe.checked = true;
+        _this.ParentCheckboxChecked(_pe);
+    }
+}
+
+//获取全部选中的末级checkbox对象
+layuiXtree.prototype.GetChecked = function () {
+    var _this = this;
+    var arr = new Array();
+    var arrIndex = 0;
+    var cks = _this.getByClassName('layui-xtree-checkbox');
+    for (var i = 0; i < cks.length; i++) {
+        if (cks[i].checked && cks[i].getAttribute('data-xend') == '1') {
+            arr[arrIndex] = cks[i];
+            arrIndex++;
+        }
+    }
+    return arr;
+}
+//获取全部选中的checkbox对象value
+layuiXtree.prototype.GetCheckedVal = function () {
+    var _this = this;
+    var arr = new Array();
+    var arrIndex = 0;
+    var cks = _this.getByClassName('layui-xtree-checkbox');
+    for (var i = 0; i < cks.length; i++) {
+        if (cks[i].checked) {
+            arr[arrIndex] = cks[i].value;
+            arrIndex++;
+        }
+    }
+    return arr;
+}
+
+//获取全部的原始checkbox对象
+layuiXtree.prototype.GetAllCheckBox = function () {
+    var _this = this;
+    var arr = new Array();
+    var arrIndex = 0;
+    var cks = _this.getByClassName('layui-xtree-checkbox');
+    for (var i = 0; i < cks.length; i++) {
+        arr[arrIndex] = cks[i];
+        arrIndex++;
+    }
+    return arr;
+}
+
+//根据值来获取其父级的checkbox原dom对象
+layuiXtree.prototype.GetParent = function (a) {
+    var _this = this;
+    var cks = _this.getByClassName('layui-xtree-checkbox');
+    for (var i = 0; i < cks.length; i++) {
+        if (cks[i].value == a) {
+            if (cks[i].parentNode.parentNode.getAttribute('id') == _this._container.getAttribute('id')) return null;
+            return _this.getChildByClassName(cks[i].parentNode.parentNode, 'layui-xtree-checkbox')[0];
+        }
+    }
+    return null;
+}

+ 332 - 0
admin/js/layuiPlugins/step.js

@@ -0,0 +1,332 @@
+ /**
+ 
+ @Name : layui.step 基于layui的步骤条面板
+ @Author:hsianglee
+ @License:MIT
+ 
+ */
+
+layui.define(["jquery"], function (exports) {
+    var $ = layui.jquery;
+    
+    function Step(option) {
+        this.option=option;     // 获取传入的数据
+        this.elem=option.elem;
+        // this.methods=option.methods?option.methods:"";
+        this.title=option.title?option.title:[];
+        this.description=option.description?option.description:[];
+        this.canIconClick=option.canIconClick?option.canIconClick:false;
+        this.isOpenStepLevel=option.isOpenStepLevel?option.isOpenStepLevel:false;
+        this.len=0;   // 页面个数
+        this.currentStep=(option.currentStep && option.currentStep>=1)?option.currentStep:1;    // 当前走到第几步
+
+        this.disabledStep=[];
+
+        this.finalStep=1;       // 当前走到最远的步骤
+
+        this.parameterInit();
+        this.domRender();
+        this.init();
+        this.openStepLevel();
+        this.changeStep();
+    }
+
+    Step.prototype={
+        constructor: Step,
+        // 初始化参数数据
+        parameterInit: function() {
+            var self=this;
+            this.len=$(this.elem).find(".layui-step-content-item").length;   // 页面个数
+            // 不传title参数
+            if(this.title.length<=0){
+                $(this.elem).find(".layui-step-content-item").each(function(index,val) {
+                    self.title.push("第"+(index+1)+"步");
+                })
+            }
+            if(this.len!==this.title.length){
+                throw "title参数长度与页面长度不匹配";
+            }
+            // 不传description参数
+            if(this.description.length<=0){
+                $(this.elem).find(".layui-step-content-item").each(function(index,val) {
+                    self.description.push("");
+                })
+            }
+            if(this.len!==this.description.length){
+                throw "description参数长度与页面长度不匹配";
+            }
+            // 若当前步超过最大步,则默认为最后一步
+            this.currentStep=this.currentStep>=this.len?this.len:this.currentStep;
+        },
+        domRender: function() {
+            var self=this;
+            var titleStr='<div class="layui-step-title layui-clear">'+
+            '<div class="layui-step-title-item step-first" style="width: '+(100/this.len)+'%;">'+
+                '<div class="step-icon">'+
+                    '<i>1</i>'+
+                '</div>'+
+                '<div class="step-text">'+
+                    this.title[0]+
+                '</div>'+
+                '<div class="step-description">'+
+                    this.description[0]+
+                '</div>'+
+            '</div>';
+            for(var i=1;i<this.title.length-1;i++){
+                titleStr+='<div class="layui-step-title-item" style="width: '+(100/this.len)+'%;">'+
+                    '<div class="step-icon">'+
+                        '<i>'+(i+1)+'</i>'+
+                    '</div>'+
+                    '<div class="step-text">'+
+                        this.title[i]+
+                    '</div>'+
+                    '<div class="step-description">'+
+                        this.description[i]+
+                    '</div>'+
+                '</div>';
+            };
+            titleStr+='<div class="layui-step-title-item step-last" style="width: '+(100/this.len)+'%;">'+
+                    '<div class="step-icon">'+
+                        '<i>'+this.len+'</i>'+
+                    '</div>'+
+                    '<div class="step-text">'+
+                        this.title[this.title.length-1]+
+                    '</div>'+
+                    '<div class="step-description">'+
+                        this.description[this.title.length-1]+
+                    '</div>'+
+                '</div>'+
+            '</div>'
+            $(this.elem).prepend(titleStr);
+
+            // 生成三角
+            $(this.elem).find(".layui-step-content-item").each(function(index,val) {
+                $(this).append("<span class='content-item-before' style='left: calc("+((100/(self.len*2))+((100*index)/self.len))+"% - 10px);'></span>");
+            })
+        },
+        // 添加样式
+        init: function() {
+            var self=this;
+            this.disabledStep.forEach(function(val){
+                $(self.elem).find(".layui-step-title-item").eq(val-1).addClass("step-disabled");
+            })
+            
+            $(this.elem).find(".layui-step-title-item").eq(this.currentStep-1).addClass("step-current");
+            $(this.elem).find(".layui-step-content-item").eq(this.currentStep-1).show();
+            if(this.currentStep<2) return;
+            for(var i=this.currentStep-2;i>=0;i--){
+                $(this.elem).find(".layui-step-title-item").eq(i).addClass("step-finish");
+            }
+        },
+        // 恢复默认样式
+        reInit: function() {
+            $(this.elem).find(".layui-step-title-item").each(function(index,val) {
+                $(val).removeClass("step-disabled");
+            })
+            
+            $(this.elem).find(".layui-step-title-item").eq(this.currentStep-1).removeClass("step-current");
+            $(this.elem).find(".layui-step-content-item").eq(this.currentStep-1).hide();
+            if(this.currentStep<2) return;
+            for(var i=this.currentStep-2;i>=0;i--){
+                $(this.elem).find(".layui-step-title-item").eq(i).removeClass("step-finish");
+            }
+        },
+        // 给上面的icon添加事件
+        changeStep: function() {
+            var self=this;
+            this.canIconClick?(function() {
+                $(self.elem).on("click",".layui-step-title-item .step-icon",function() {
+                    var index=$(this).parent(".layui-step-title-item").index()+1;
+                    // 判断点击的是否为disabled
+                    if($.inArray(index, self.disabledStep) === -1){
+                        self.goStep(index);
+                    }
+                })
+            })():"";
+        },
+        // 是否严格按照步骤条顺序执行步骤
+        openStepLevel: function() {
+            var self=this;
+            this.isOpenStepLevel?(function() {
+                // 如果开启这一项,则默认关闭icon点击事件
+                self.canIconClick=false;
+                $(self.elem).off().on("click",".layui-step-title-item .step-icon",function() {
+                    var index=$(this).parent(".layui-step-title-item").index()+1;
+                    // 判断如果当前点击的步骤超过已走过的最大步,则不跳转
+                    if(index>self.finalStep){
+                        return;
+                    }
+                    // 判断点击的是否为disabled
+                    if($.inArray(index, self.disabledStep) === -1){
+                        self.goStep(index);
+                    }
+                })
+            })():"";
+        },
+        // 跳转第几步
+        goStep: function(i) {
+            if((i<1 || i>this.len)){
+                throw "goStep函数参数不在范围内";
+            }
+            // 判断当前页是否禁用,即i是否在数组中
+            if($.inArray(i, this.disabledStep) === -1){
+                this.reInit();
+                this.currentStep=i;
+                this.init();
+            }else{
+                throw "该页已禁用";
+            }
+        },
+        // 跳到第一步
+        goFirst: function() {
+            this.goStep(1);
+        },
+        // 跳到最后一步
+        goLast: function() {
+            this.goStep(this.len);
+            this.finalStep=this.len;
+            this.openStepLevel();
+        },
+        // 跳到上一步
+        prev: function () {
+            if(this.currentStep<=1){
+                return;
+            }
+            this.reInit();
+            // 先保存当前位置,若前面的全都已经禁用,则可以回到当前位置
+            var origin=this.currentStep;
+            this.PrevGo(origin);
+        },
+        PrevGo: function(origin) {
+            this.currentStep--;
+            // 判断前面的是否全都已经禁用
+            if(this.currentStep<1){
+                this.currentStep=origin;
+                this.init();
+                return;
+            }
+            // 判断当前页是否禁用
+            if($.inArray(this.currentStep, this.disabledStep) === -1){
+                this.init();
+            }else{
+                this.PrevGo(origin);
+            }
+        },
+        // 跳到下一部
+        next: function () {
+            if(this.currentStep>=this.len){
+                return;
+            }
+            this.reInit();
+            // 先保存当前位置,若后面的全都已经禁用,则可以回到当前位置
+            var origin=this.currentStep;
+            this.nextGo(origin);
+        },
+        nextGo: function(origin) {
+            if(this.currentStep===this.finalStep){
+                // 更新最远步
+                this.finalStep++;
+                this.openStepLevel();
+            }
+
+            this.currentStep++;
+            // 判断后面的是否全都已经禁用
+            if(this.currentStep>this.len){
+                this.currentStep=origin;
+                this.init();
+                return;
+            }
+            // 判断当前步是否禁用
+            if($.inArray(this.currentStep, this.disabledStep) === -1){
+                this.init();
+            }else{
+                this.nextGo(origin);
+            }
+        },
+        // 禁用某一步
+        disabled: function (j) {
+            if(j<=this.currentStep){
+                throw "已经走过的步骤不能禁用";
+            }
+            // 当前步不存在则加入数组,否存重复添加
+            if($.inArray(j,this.disabledStep)===-1){
+                this.disabledStep.push(j);
+            }
+            //默认为起始从第一步开始,若第一步为disabled,则从前往后找到第一个不是disabled的作为第一步
+            for(var i=this.currentStep;i<this.len;i++){
+                if($.inArray(i, this.disabledStep) === -1){
+                    this.reInit();
+                    this.currentStep=i;
+                    this.init();
+                    i=this.len+1;
+                }
+            }
+            
+        },
+        // 解除禁用
+        abled: function (j) {
+            if(j<=this.currentStep){
+                throw "已经走过的步骤不能解除禁用";
+            }
+            // 删除数组数据
+            var tem=this.disabledStep.concat();
+            if($.inArray(j, tem) !== -1){
+                this.disabledStep.splice($.inArray(j, tem),1);
+            }
+            this.reInit();
+            this.init();
+        }
+    }
+
+    var stepObj;    // new的对象,作为内部变量
+    var step={
+        option: "",
+        currentStep: 1,
+        render: function(option) {
+            var self=this;
+            this.option=option || {};
+
+            this.option.elem?"":(function() {
+                throw '缺少参数,需要传入elem元素';
+            })();
+
+            !$(this.option.elem)[0]?(function() {
+                throw '没有找到'+ self.option.elem +'元素';
+            })():"";
+
+            stepObj=new Step(this.option);
+            this.currentStep=stepObj.currentStep;
+        },
+        goStep: function(i) {
+            if(typeof i !== "number"){
+                throw 'goStep参数不合法';
+            }
+            stepObj.goStep(i);
+            this.currentStep=stepObj.currentStep;
+        },
+        goFirst: function() {
+            stepObj.goFirst();
+            this.currentStep=stepObj.currentStep;
+        },
+        goLast: function() {
+            stepObj.goLast();
+            this.currentStep=stepObj.currentStep;
+        },
+        prev: function() {
+            stepObj.prev();
+            this.currentStep=stepObj.currentStep;
+        },
+        next: function() {
+            stepObj.next();
+            this.currentStep=stepObj.currentStep;
+        },
+        disabled: function(i) {
+            stepObj.disabled(i);
+        },
+        abled: function(i) {
+            stepObj.abled(i);
+        }
+    }
+    
+    exports('step', step);
+})

+ 3 - 0
admin/js/layuiPlugins/treeGrid.css

@@ -0,0 +1,3 @@
+.layui-tree-head{
+    cursor: pointer;
+}

+ 23 - 0
admin/js/layuiPlugins/treeGrid.js

@@ -0,0 +1,23 @@
+/**
+
+ @Name:treeGrid树状表格
+ @Author:lrd
+ */
+layui.config({
+    base: "//" + location.host + '/js/layuiPlugins/'
+}).extend({
+    dltable:'dltable'
+}).define(['laytpl', 'laypage','dltable', 'layer', 'form'], function(exports){
+    "use strict";
+    var $ = layui.jquery;
+    var layer = layui.layer;
+    var dltable = layui.dltable;
+    var MOD_NAME='treeGrid';
+    var treeGrid=$.extend({},dltable);
+    treeGrid._render=treeGrid.render;
+    treeGrid.render=function(param){//重写渲染方法
+        param.isTree=true;//是树表格
+        treeGrid._render(param);
+    };
+    exports(MOD_NAME, treeGrid);
+});

+ 18 - 0
admin/js/layuiPlugins/treetable-lay/treetable.css

@@ -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;
+}
+

+ 206 - 0
admin/js/layuiPlugins/treetable-lay/treetable.js

@@ -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 += '&nbsp;&nbsp;';
+                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);
+});

+ 58 - 0
admin/js/leftNav.js

@@ -0,0 +1,58 @@
+function navBar(data){
+	var ulHtml = '<ul class="layui-nav layui-nav-tree">';
+	for(var i=0;i<data.length;i++){
+		if(data[i].spread){
+			ulHtml += '<li class="layui-nav-item layui-nav-itemed">';
+		}else{
+			ulHtml += '<li class="layui-nav-item">';
+		}
+		if(data[i].childMenus != undefined && data[i].childMenus.length > 0){
+			ulHtml += '<a href="javascript:;">';
+			if(data[i].icon != undefined && data[i].icon != ''){
+				if(data[i].icon - 0 == 0){
+					data[i].icon = "&nbsp;";
+				}
+				if(data[i].icon.indexOf("icon-") != -1){
+					ulHtml += '<i class="iconfont '+data[i].icon+'" data-icon="'+data[i].icon+'"></i>';
+				}else{
+					ulHtml += '<i class="layui-icon" data-icon="'+data[i].icon+'">'+data[i].icon+'</i>';
+				}
+			}
+			ulHtml += '<cite>'+data[i].name+'</cite>';
+			ulHtml += '<span class="layui-nav-more"></span>';
+			ulHtml += '</a>'
+			ulHtml += '<dl class="layui-nav-child">';
+			for(var j=0;j<data[i].childMenus.length;j++){
+				ulHtml += '<dd><a href="javascript:;" data-url="'+data[i].childMenus[j].description+'?menuId='+data[i].childMenus[j].id+'">';
+				if(data[i].childMenus[j].icon != undefined && data[i].childMenus[j].icon != ''){
+					if(data[i].childMenus[j].icon - 0 == 0){
+						data[i].childMenus[j].icon = "&nbsp;";
+					}
+					if(data[i].childMenus[j].icon.indexOf("icon-") != -1){
+						ulHtml += '<i class="iconfont '+data[i].childMenus[j].icon+'" data-icon="'+data[i].childMenus[j].icon+'"></i>';
+					}else{
+						ulHtml += '<i class="layui-icon" data-icon="'+data[i].childMenus[j].icon+'">'+data[i].childMenus[j].icon+'</i>';
+					}
+				}
+				ulHtml += '<cite>'+data[i].childMenus[j].name+'</cite></a></dd>';
+			}
+			ulHtml += "</dl>"
+		}else{
+			ulHtml += '<a href="javascript:;" data-url="'+data[i].description+'?menuId='+data[i].id+'">';
+			if(data[i].icon != undefined && data[i].icon != ''){
+				if(data[i].icon - 0 == 0){
+					data[i].icon = "&nbsp;";
+				}
+				if(data[i].icon.indexOf("icon-") != -1){
+					ulHtml += '<i class="iconfont '+data[i].icon+'" data-icon="'+data[i].icon+'"></i>';
+				}else{
+					ulHtml += '<i class="layui-icon" data-icon="'+data[i].icon+'">'+data[i].icon+'</i>';
+				}
+			}
+			ulHtml += '<cite>'+data[i].name+'</cite></a>';
+		}
+		ulHtml += '</li>'
+	}
+	ulHtml += '</ul>';
+	return ulHtml;
+}

+ 98 - 0
admin/js/main.js

@@ -0,0 +1,98 @@
+layui.config({
+	base: "js/"
+}).use(['form', 'element', 'layer', 'jquery'], function () {
+	var form = layui.form,
+		layer = layui.layer,
+		element = layui.element,
+		$ = layui.jquery;
+
+	$(".panel a").on("click", function () {
+		window.parent.addTab($(this));
+	})
+
+	//动态获取文章总数和待审核文章数量,最新文章
+	$.get("../json/newsList.json",
+		function (data) {
+			var waitNews = [];
+			$(".allNews span").text(data.length);  //文章总数
+			for (var i = 0; i < data.length; i++) {
+				var newsStr = data[i];
+				if (newsStr["newsStatus"] == "待审核") {
+					waitNews.push(newsStr);
+				}
+			}
+			$(".waitNews span").text(waitNews.length);  //待审核文章
+			//加载最新文章
+			var hotNewsHtml = '';
+			for (var i = 0; i < 5; i++) {
+				hotNewsHtml += '<tr>'
+					+ '<td align="left">' + data[i].newsName + '</td>'
+					+ '<td>' + data[i].newsTime + '</td>'
+					+ '</tr>';
+			}
+			$(".hot_news").html(hotNewsHtml);
+		}
+	)
+
+	//图片总数
+	$.get("../json/images.json",
+		function (data) {
+			$(".imgAll span").text(data.length);
+		}
+	)
+
+	//用户数
+	$.get("../json/usersList.json",
+		function (data) {
+			$(".userAll span").text(data.length);
+		}
+	)
+
+	//新消息
+	$.get("../json/message.json",
+		function (data) {
+			$(".newMessage span").text(data.length);
+		}
+	)
+
+
+	//数字格式化
+	$(".panel span").each(function () {
+		$(this).html($(this).text() > 9999 ? ($(this).text() / 10000).toFixed(2) + "<em>万</em>" : $(this).text());
+	})
+
+	//系统基本参数
+	if (window.sessionStorage.getItem("systemParameter")) {
+		var systemParameter = JSON.parse(window.sessionStorage.getItem("systemParameter"));
+		fillParameter(systemParameter);
+	} else {
+		$.ajax({
+			url: "../json/systemParameter.json",
+			type: "get",
+			dataType: "json",
+			success: function (data) {
+				fillParameter(data);
+			}
+		})
+	}
+
+	//填充数据方法
+	function fillParameter(data) {
+		//判断字段数据是否存在
+		function nullData(data) {
+			if (data == '' || data == "undefined") {
+				return "未定义";
+			} else {
+				return data;
+			}
+		}
+		$(".version").text(nullData(data.version));      //当前版本
+		$(".author").text(nullData(data.author));        //开发作者
+		$(".homePage").text(nullData(data.homePage));    //网站首页
+		$(".server").text(nullData(data.server));        //服务器环境
+		$(".dataBase").text(nullData(data.dataBase));    //数据库版本
+		$(".maxUpload").text(nullData(data.maxUpload));    //最大上传限制
+		$(".userRights").text(nullData(data.userRights));//当前用户权限
+	}
+
+})

+ 167 - 0
admin/js/md5.js

@@ -0,0 +1,167 @@
+/**
+ * Des: MD5加密
+ * User: Yanbo
+ * Date: 2017-09-01
+ * Time: 10:50
+ * Mail: <a href="yanbo@hyphoneit.com">Yanbo</a>.
+ */
+;!function (win) {
+    'use strict';
+    layui.define(function (exports) {
+        var md5 = {
+            config: {
+                MOD_NAME: 'md5'
+            }
+            /**
+             * 对字符串进行MD5加密
+             * @param str 要加密的字符串
+             */
+            , calcMD5: function (str) {
+                var self = this
+                    , x = self.str2blksMD5(str)
+                    , a = 0x67452301
+                    , b = 0xEFCDAB89
+                    , c = 0x98BADCFE
+                    , d = 0x10325476;
+                for (var i = 0; i < x.length; i += 16) {
+                    var olda = a
+                        , oldb = b
+                        , oldd = d
+                        , oldc = c;
+                    a = self.ff(a, b, c, d, x[i + 0], 7, 0xD76AA478);
+                    d = self.ff(d, a, b, c, x[i + 1], 12, 0xE8C7B756);
+                    c = self.ff(c, d, a, b, x[i + 2], 17, 0x242070DB);
+                    b = self.ff(b, c, d, a, x[i + 3], 22, 0xC1BDCEEE);
+                    a = self.ff(a, b, c, d, x[i + 4], 7, 0xF57C0FAF);
+                    d = self.ff(d, a, b, c, x[i + 5], 12, 0x4787C62A);
+                    c = self.ff(c, d, a, b, x[i + 6], 17, 0xA8304613);
+                    b = self.ff(b, c, d, a, x[i + 7], 22, 0xFD469501);
+                    a = self.ff(a, b, c, d, x[i + 8], 7, 0x698098D8);
+                    d = self.ff(d, a, b, c, x[i + 9], 12, 0x8B44F7AF);
+                    c = self.ff(c, d, a, b, x[i + 10], 17, 0xFFFF5BB1);
+                    b = self.ff(b, c, d, a, x[i + 11], 22, 0x895CD7BE);
+                    a = self.ff(a, b, c, d, x[i + 12], 7, 0x6B901122);
+                    d = self.ff(d, a, b, c, x[i + 13], 12, 0xFD987193);
+                    c = self.ff(c, d, a, b, x[i + 14], 17, 0xA679438E);
+                    b = self.ff(b, c, d, a, x[i + 15], 22, 0x49B40821);
+
+                    a = self.gg(a, b, c, d, x[i + 1], 5, 0xF61E2562);
+                    d = self.gg(d, a, b, c, x[i + 6], 9, 0xC040B340);
+                    c = self.gg(c, d, a, b, x[i + 11], 14, 0x265E5A51);
+                    b = self.gg(b, c, d, a, x[i + 0], 20, 0xE9B6C7AA);
+                    a = self.gg(a, b, c, d, x[i + 5], 5, 0xD62F105D);
+                    d = self.gg(d, a, b, c, x[i + 10], 9, 0x02441453);
+                    c = self.gg(c, d, a, b, x[i + 15], 14, 0xD8A1E681);
+                    b = self.gg(b, c, d, a, x[i + 4], 20, 0xE7D3FBC8);
+                    a = self.gg(a, b, c, d, x[i + 9], 5, 0x21E1CDE6);
+                    d = self.gg(d, a, b, c, x[i + 14], 9, 0xC33707D6);
+                    c = self.gg(c, d, a, b, x[i + 3], 14, 0xF4D50D87);
+                    b = self.gg(b, c, d, a, x[i + 8], 20, 0x455A14ED);
+                    a = self.gg(a, b, c, d, x[i + 13], 5, 0xA9E3E905);
+                    d = self.gg(d, a, b, c, x[i + 2], 9, 0xFCEFA3F8);
+                    c = self.gg(c, d, a, b, x[i + 7], 14, 0x676F02D9);
+                    b = self.gg(b, c, d, a, x[i + 12], 20, 0x8D2A4C8A);
+
+                    a = self.hh(a, b, c, d, x[i + 5], 4, 0xFFFA3942);
+                    d = self.hh(d, a, b, c, x[i + 8], 11, 0x8771F681);
+                    c = self.hh(c, d, a, b, x[i + 11], 16, 0x6D9D6122);
+                    b = self.hh(b, c, d, a, x[i + 14], 23, 0xFDE5380C);
+                    a = self.hh(a, b, c, d, x[i + 1], 4, 0xA4BEEA44);
+                    d = self.hh(d, a, b, c, x[i + 4], 11, 0x4BDECFA9);
+                    c = self.hh(c, d, a, b, x[i + 7], 16, 0xF6BB4B60);
+                    b = self.hh(b, c, d, a, x[i + 10], 23, 0xBEBFBC70);
+                    a = self.hh(a, b, c, d, x[i + 13], 4, 0x289B7EC6);
+                    d = self.hh(d, a, b, c, x[i + 0], 11, 0xEAA127FA);
+                    c = self.hh(c, d, a, b, x[i + 3], 16, 0xD4EF3085);
+                    b = self.hh(b, c, d, a, x[i + 6], 23, 0x04881D05);
+                    a = self.hh(a, b, c, d, x[i + 9], 4, 0xD9D4D039);
+                    d = self.hh(d, a, b, c, x[i + 12], 11, 0xE6DB99E5);
+                    c = self.hh(c, d, a, b, x[i + 15], 16, 0x1FA27CF8);
+                    b = self.hh(b, c, d, a, x[i + 2], 23, 0xC4AC5665);
+
+                    a = self.ii(a, b, c, d, x[i + 0], 6, 0xF4292244);
+                    d = self.ii(d, a, b, c, x[i + 7], 10, 0x432AFF97);
+                    c = self.ii(c, d, a, b, x[i + 14], 15, 0xAB9423A7);
+                    b = self.ii(b, c, d, a, x[i + 5], 21, 0xFC93A039);
+                    a = self.ii(a, b, c, d, x[i + 12], 6, 0x655B59C3);
+                    d = self.ii(d, a, b, c, x[i + 3], 10, 0x8F0CCC92);
+                    c = self.ii(c, d, a, b, x[i + 10], 15, 0xFFEFF47D);
+                    b = self.ii(b, c, d, a, x[i + 1], 21, 0x85845DD1);
+                    a = self.ii(a, b, c, d, x[i + 8], 6, 0x6FA87E4F);
+                    d = self.ii(d, a, b, c, x[i + 15], 10, 0xFE2CE6E0);
+                    c = self.ii(c, d, a, b, x[i + 6], 15, 0xA3014314);
+                    b = self.ii(b, c, d, a, x[i + 13], 21, 0x4E0811A1);
+                    a = self.ii(a, b, c, d, x[i + 4], 6, 0xF7537E82);
+                    d = self.ii(d, a, b, c, x[i + 11], 10, 0xBD3AF235);
+                    c = self.ii(c, d, a, b, x[i + 2], 15, 0x2AD7D2BB);
+                    b = self.ii(b, c, d, a, x[i + 9], 21, 0xEB86D391);
+
+                    a = self.add(a, olda);
+                    b = self.add(b, oldb);
+                    c = self.add(c, oldc);
+                    d = self.add(d, oldd);
+                }
+                return self.rhex(a) + self.rhex(b) + self.rhex(c) + self.rhex(d);
+            }
+            /*
+             * Convert a string to a sequence of 16-word blocks, stored as an array.
+             * Append padding bits and the length, as described in the MD5 standard.
+             */
+            , str2blksMD5: function (str) {
+                var nblk = ((str.length + 8) >> 6) + 1
+                    , blks = new Array(nblk * 16);
+                for (var i = 0; i < nblk * 16; i++) blks[i] = 0;
+                for (var i = 0; i < str.length; i++)
+                    blks[i >> 2] |= str.charCodeAt(i) << ((i % 4) * 8);
+                blks[i >> 2] |= 0x80 << ((i % 4) * 8);
+                blks[nblk * 16 - 2] = str.length * 8;
+                return blks;
+            }
+            /*
+             * Add integers, wrapping at 2^32
+             */
+            , add: function (x, y) {
+                return ((x & 0x7FFFFFFF) + (y & 0x7FFFFFFF)) ^ (x & 0x80000000) ^ (y & 0x80000000);
+            }
+            /*
+             * Bitwise rotate a 32-bit number to the left
+             */
+            , rol: function (num, cnt) {
+                return (num << cnt) | (num >>> (32 - cnt));
+            }
+            /*
+             * These functions implement the basic operation for each round of the
+             * algorithm.
+             */
+            , cmn: function (q, a, b, x, s, t) {
+                var self = this;
+                return self.add(self.rol(self.add(self.add(a, q), self.add(x, t)), s), b);
+            }
+            , ff: function (a, b, c, d, x, s, t) {
+                var self = this;
+                return self.cmn((b & c) | ((~b) & d), a, b, x, s, t);
+            }
+            , gg: function (a, b, c, d, x, s, t) {
+                var self = this;
+                return self.cmn((b & d) | (c & (~d)), a, b, x, s, t);
+            }
+            , hh: function (a, b, c, d, x, s, t) {
+                var self = this;
+                return self.cmn(b ^ c ^ d, a, b, x, s, t);
+            }
+            , ii: function (a, b, c, d, x, s, t) {
+                var self = this;
+                return self.cmn(c ^ (b | (~d)), a, b, x, s, t);
+            }
+            , rhex: function (num) {
+                var hex_chr = '0123456789abcdef'
+                    , str = '';
+                for (var j = 0; j <= 3; j++)
+                    str += hex_chr.charAt((num >> (j * 8 + 4)) & 0x0F) + hex_chr.charAt((num >> (j * 8)) & 0x0F);
+                return str;
+            }
+        }
+            , _config = md5.config;
+        exports(_config.MOD_NAME, md5);
+    });
+}(window);

+ 140 - 0
admin/js/nav.js

@@ -0,0 +1,140 @@
+var navs = [{
+    "id": 1,
+    "name": "基础设置",
+    "icon": "",
+    "description": "",
+	url:'',
+    "childrenMenu": [{
+            "name": "农产品基础信息",
+            "icon": "&nbsp;",
+            "description": "page/basicsSet/productBasicsInfo.html",
+            "spread": true
+        },
+        {
+            "name": "市场基础信息",
+            "icon": "&nbsp;",
+            "description": "page/basicsSet/marketBasisInfo.html",
+            "spread": true
+        }
+    ]
+}, {
+    "id": 2,
+    "name": "价格数据",
+    "icon": "&#xe65e;",
+    "description": "",
+    "spread": true,
+    "childrenMenu": [{
+            "name": "导入数据",
+            "icon": "&nbsp;",
+            "description": "page/priceData/importData.html",
+            "spread": true
+        },
+        {
+            "name": "数据列表",
+            "icon": "&nbsp;",
+            "description": "page/priceData/priceDataList/",
+            "spread": true
+        },
+        {
+            "name": "价格设置",
+            "icon": "&nbsp;",
+            "description": "page/priceData/priceSet/",
+            "spread": true,
+			"childrenMenu": [{
+					"name": "导入数据",
+					"icon": "&nbsp;",
+					"description": "page/priceData/importData.html",
+					"spread": true
+				},
+				{
+					"name": "数据列表",
+					"icon": "&nbsp;",
+					"description": "page/priceData/priceDataList/",
+					"spread": true
+				},
+				{
+					"name": "价格设置",
+					"icon": "&nbsp;",
+					"description": "page/priceData/priceSet/",
+					"spread": true,
+					"childrenMenu": [{
+							"name": "导入数据",
+							"icon": "&nbsp;",
+							"description": "page/priceData/importData.html",
+							"spread": true
+						},
+						{
+							"name": "数据列表",
+							"icon": "&nbsp;",
+							"description": "page/priceData/priceDataList/",
+							"spread": true
+						},
+						{
+							"name": "价格设置",
+							"icon": "&nbsp;",
+							"description": "page/priceData/priceSet/",
+							"spread": true
+						}
+					]
+				}
+			]
+        }
+    ]
+}, {
+    "id": 4,
+    "name": "系统设置",
+    "icon": "&#xe631;",
+    "description": "page/systemParameter/systemParameter.html",
+    "spread": true,
+    "childrenMenu": [{
+            "name": "角色管理",
+            "icon": "&nbsp;",
+            "description": "/page/systemParameter/systemRole/",
+            "spread": true
+        },
+        {
+            "name": "用户管理",
+            "icon": "&nbsp;",
+            "description": "page/systemParameter/userManagement",
+            "spread": true
+        },
+        {
+            "name": "菜单管理",
+            "icon": "&nbsp;",
+            "description": "page/systemParameter/systemMenu",
+            "spread": true
+        }
+    ]
+}];
+// , {
+// 	"id":3,
+//     "name": "数据分析",
+//     "icon": "&#xe629;",
+//     "description": "",
+//     "spread": true,
+//     "childrenMenu": [{
+//             "name": "排行榜",
+//             "icon": "&nbsp;",
+//             "description": "page/basicsSet/productBasicsInfo.html",
+//             "spread": true
+//         },
+//         {
+//             "name": "增长率",
+//             "icon": "&nbsp;",
+//             "description": "page/main.html",
+//             "spread": true
+//         },
+//         {
+//             "name": "价格走势",
+//             "icon": "&nbsp;",
+//             "description": "page/main.html",
+//             "spread": true
+//         },
+//         {
+//             "name": "价格举报",
+//             "icon": "&nbsp;",
+//             "description": "page/main.html",
+//             "spread": true
+//         }
+//     ]
+// }

+ 160 - 0
admin/layui/css/eleTree.css

@@ -0,0 +1,160 @@
+/* #region tree */
+.eleTree{
+    min-width: 200px;
+    position: relative;
+    overflow: hidden;
+}
+.eleTree-hide{
+    display: none;
+}
+.eleTree-node-content{
+    cursor: pointer;
+    height: 28px;
+    line-height: 1.5;
+}
+.eleTree-node-content.eleTree-node-content-active{
+    color: #1E9FFF;
+    background-color: #eee;
+}
+.eleTree-node-content:hover{
+    background-color: #eee;
+}
+/* #regionTree .eleTree-node-content-label{
+    font-size: 15px;
+} */
+.eleTree-node-content-icon .layui-icon{
+    padding: 6px 3px;
+    color: #c0c4cc;
+    font-size: 12px;
+    display: inline-block;
+    transform: rotate(0deg);
+    transition: transform .3s ease-in-out;
+}
+.eleTree-node-content-iconfont .iconfont{
+    padding: 0 0 0 5px;
+    color: #999;
+    font-size: 18px;
+    display: inline-block;
+    vertical-align: middle;
+}
+.eleTree-node-content-iconfont .icon-folder{
+    color: #ff9800;
+}
+.eleTree-node-content-iconfont .icon-file{
+    color: #457fd9;
+}
+.eleTree-node-content-btn{
+    float: right;
+    margin-top: 3px;
+}
+.eleTree-node-content-btn .layui-lock{
+    color: #f8bf00;
+    font-weight: bold;
+}
+.eleTree-node-content-btn .layui-forbid{
+    color: red;
+    font-weight: bold;
+}
+.eleTree-node-content-icon .layui-icon.icon-rotate{
+    transform: rotate(90deg);
+}
+.eleTree-node-content .layui-form-checkbox[lay-skin=primary] i{
+    width: 13px;
+    height: 14px;
+    line-height: 1.3;
+}
+.eleTree-node-content-label{
+    padding-left: 5px;
+}
+
+/* checkbox第三种状态 */
+input.eleTree-hideen[type=checkbox]{
+    display: none;
+}
+.eleTree-checkbox {
+    height: auto!important;
+    line-height: normal!important;
+    min-height: 12px;
+    border: none!important;
+    margin-right: 0;
+    padding-left: 18px;
+    position: relative;
+    display: inline-block;
+}
+.eleTree-checkbox i {
+    left: 0;
+    border: 1px solid #d2d2d2;
+    font-size: 12px;
+    border-radius: 2px;
+    background-color: #fff;
+    -webkit-transition: .1s linear;
+    transition: .1s linear;
+    position: absolute;
+    top: 0;
+    color: #fff;
+    cursor: pointer;
+    text-align: center;
+    width: 13px;
+    height: 14px;
+    line-height: 1.3;
+}
+.eleTree-checkbox i:hover {
+    border-color: #5FB878;
+}
+.eleTree-checkbox-checked i {
+    border-color: #5FB878;
+    background-color: #5FB878;
+    color: #fff;
+}
+.eleTree-checkbox-line:after{
+    content: "";
+    position: relative;
+    width: 8px;
+    height: 1px;
+    background-color: #fff;
+    display: inline-block;
+    top: -4px;
+}
+
+.eleTree-checkbox.eleTree-checkbox-disabled i{
+    cursor: not-allowed;
+    background-color: #f2f6fc;
+    border-color: #dcdfe6;
+    color: #c2c2c2;
+}
+.eleTree-checkbox.eleTree-checkbox-disabled i.eleTree-checkbox-line:after{
+    background-color: #c2c2c2;
+}
+.eleTree-checkbox.eleTree-checkbox-disabled i:hover{
+    border-color: #dcdfe6;
+}
+
+#tree-menu{
+    position: absolute;
+    z-index: 1001;
+    border: 1px solid #e4e7ed;
+    border-radius: 4px;
+    background-color: #fff;
+    box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
+    box-sizing: border-box;
+    margin: 0;
+}
+#tree-menu li>a{
+    display: block;
+    padding: 0 1.5em;
+    text-decoration: none;
+    width: auto;
+    color: #000;
+    white-space: nowrap;
+    line-height: 2.4em;
+    text-shadow: 1px 1px 0 #fff;
+    border-radius: 1px;
+    font-size: 13px;
+}
+#tree-menu li>a:hover{
+    background-color: #e8eff7;
+}
+.tree-menu-bg{
+    background-color: #ccc;
+}
+/* #endregion */

File diff suppressed because it is too large
+ 174 - 0
admin/layui/css/formSelects-v4.css


File diff suppressed because it is too large
+ 2 - 0
admin/layui/css/layui.css


File diff suppressed because it is too large
+ 2 - 0
admin/layui/css/layui.mobile.css


File diff suppressed because it is too large
+ 2 - 0
admin/layui/css/modules/code.css


File diff suppressed because it is too large
+ 2 - 0
admin/layui/css/modules/laydate/default/laydate.css


BIN
admin/layui/css/modules/laydate/icon.png


File diff suppressed because it is too large
+ 2 - 0
admin/layui/css/modules/laydate/laydate.css


BIN
admin/layui/css/modules/layer/default/icon-ext.png


BIN
admin/layui/css/modules/layer/default/icon.png


File diff suppressed because it is too large
+ 2 - 0
admin/layui/css/modules/layer/default/layer.css


BIN
admin/layui/css/modules/layer/default/loading-0.gif


BIN
admin/layui/css/modules/layer/default/loading-1.gif


BIN
admin/layui/css/modules/layer/default/loading-2.gif


+ 134 - 0
admin/layui/css/step.css

@@ -0,0 +1,134 @@
+/* #region 步骤条面板 */
+html,body{
+    width: 100%;
+}
+.layui-step{
+    width: 100%;
+    height: 100%;
+    position: relative;
+    background-color: #fff;
+}
+
+.layui-step-title {
+    width: 100%;
+    padding-top: 10px;
+}
+.layui-step-title-item{
+    min-height: 60px;
+    float: left;
+    background-color: #fff;
+    text-align: center;
+    position: relative;
+}
+.layui-step-title-item::after{
+    content: "";
+    width: 100%;
+    display: inline-block;
+    height: 2px;
+    background-color: #ccc;
+    position: absolute;
+    top: 14px;
+    left: 0px;
+}
+.layui-step-title-item.step-finish::after{
+    background-color: #1E9FFF;
+}
+.layui-step-title-item.step-current::after{
+    background-color: #1E9FFF;
+}
+.layui-step-title-item.step-disabled::after{
+    background-color: #ccc;
+}
+.layui-step-title-item.step-first::after{
+    width: 50%;
+    left: 50%;
+}
+.layui-step-title-item.step-last::after{
+    width: 50%;
+    right: 50%;
+}
+.layui-step-title-item.step-finish .step-icon{
+    background-color: #1E9FFF;
+    color: #fff;
+    border: 1px solid #1E9FFF
+}
+.layui-step-title-item.step-current .step-icon{
+    background-color: #1E9FFF;
+    color: #fff;
+    border: 1px solid #1E9FFF;
+}
+.layui-step-title-item.step-disabled .step-icon{
+    background-color: #ccc;
+    color: #fff;
+    border: 1px solid #ccc;
+    cursor: not-allowed;
+}
+.layui-step-title-item.step-disabled .step-text{
+    color: #bbb;
+}
+.layui-step-title-item.step-disabled .step-description{
+    color: #ddd;
+}
+.step-icon{
+    height: 26px;
+    width: 26px;
+    z-index: 1;
+    color: #999;
+    cursor: pointer;
+    text-align: center;
+    position: relative;
+    border-radius: 50%;
+    display: inline-block;
+    background: #ffffff;
+    border: 1px solid #ccc;
+}
+.step-icon>i{
+    position: absolute;
+    top: 5px;
+    font-style: normal;
+    left: 9px;
+}
+.step-text{
+    font-weight: bolder;
+    color: #555555;
+    margin-bottom: 10px;
+    padding: 0px 15px;
+}
+.step-description{
+    color: #aaa;
+    font-weight: 300;
+    padding: 0px 15px;
+}
+
+.layui-step-content{
+    width: 100%;
+    min-height: calc(100% - 105px);
+    position: relative;
+    margin-top: 10px;
+    background-color: #f5f5f5;
+}
+.layui-step-content-item{
+    width: 100%;
+    position: relative;
+    padding: 15px 0px 0;
+    top: 0px;
+    left: 0px;
+    display: none;
+}
+.layui-step-content-item .content-item-before{
+    content: " ";
+    width: 20px;
+    height: 20px;
+    background-color: #f5f5f5;
+    position: absolute;
+    top: -10px;
+    transform: rotate(45deg);
+}
+
+.layui-step-btn{
+    position: fixed;
+    top: calc(100% - 48px);
+    right: 50%;
+    margin-right: -46px;
+}
+/* #endregion */

BIN
admin/layui/font/iconfont.eot


File diff suppressed because it is too large
+ 473 - 0
admin/layui/font/iconfont.svg


BIN
admin/layui/font/iconfont.ttf


BIN
admin/layui/font/iconfont.woff


BIN
admin/layui/images/face/0.gif


BIN
admin/layui/images/face/1.gif


BIN
admin/layui/images/face/10.gif


BIN
admin/layui/images/face/11.gif


BIN
admin/layui/images/face/12.gif


BIN
admin/layui/images/face/13.gif


BIN
admin/layui/images/face/14.gif


BIN
admin/layui/images/face/15.gif


BIN
admin/layui/images/face/16.gif


BIN
admin/layui/images/face/17.gif


BIN
admin/layui/images/face/18.gif


BIN
admin/layui/images/face/19.gif


BIN
admin/layui/images/face/2.gif


BIN
admin/layui/images/face/20.gif


BIN
admin/layui/images/face/21.gif


BIN
admin/layui/images/face/22.gif


BIN
admin/layui/images/face/23.gif


BIN
admin/layui/images/face/24.gif


BIN
admin/layui/images/face/25.gif


BIN
admin/layui/images/face/26.gif


BIN
admin/layui/images/face/27.gif


BIN
admin/layui/images/face/28.gif


BIN
admin/layui/images/face/29.gif


BIN
admin/layui/images/face/3.gif


BIN
admin/layui/images/face/30.gif


BIN
admin/layui/images/face/31.gif


BIN
admin/layui/images/face/32.gif


BIN
admin/layui/images/face/33.gif


BIN
admin/layui/images/face/34.gif


BIN
admin/layui/images/face/35.gif


BIN
admin/layui/images/face/36.gif


BIN
admin/layui/images/face/37.gif


BIN
admin/layui/images/face/38.gif


BIN
admin/layui/images/face/39.gif


BIN
admin/layui/images/face/4.gif


BIN
admin/layui/images/face/40.gif


BIN
admin/layui/images/face/41.gif


BIN
admin/layui/images/face/42.gif


BIN
admin/layui/images/face/43.gif


BIN
admin/layui/images/face/44.gif


BIN
admin/layui/images/face/45.gif


BIN
admin/layui/images/face/46.gif


BIN
admin/layui/images/face/47.gif


BIN
admin/layui/images/face/48.gif


BIN
admin/layui/images/face/49.gif


BIN
admin/layui/images/face/5.gif


+ 0 - 0
admin/layui/images/face/50.gif


Some files were not shown because too many files changed in this diff