mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-08 19:12:48 +08:00
新增time_limit查询;新增number_limit查询;新增同一个字段多个搜索项;
This commit is contained in:
@@ -174,7 +174,7 @@ class AdminController extends BaseController
|
|||||||
|
|
||||||
$message = array_merge($this->validateMessage, $message);
|
$message = array_merge($this->validateMessage, $message);
|
||||||
|
|
||||||
if(is_null($batch)){
|
if (is_null($batch)) {
|
||||||
$batch = $this->batchValidate;
|
$batch = $this->batchValidate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +187,6 @@ class AdminController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->validateRule->failException(true)->check($data);
|
$this->validateRule->failException(true)->check($data);
|
||||||
|
|
||||||
} else if (is_array($this->validateRule)) {
|
} else if (is_array($this->validateRule)) {
|
||||||
parent::validate($data, $this->validateRule, $message, $batch);
|
parent::validate($data, $this->validateRule, $message, $batch);
|
||||||
} else {
|
} else {
|
||||||
@@ -226,6 +225,13 @@ class AdminController extends BaseController
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$op = isset($ops[$key]) && !empty($ops[$key]) ? $ops[$key] : '%*%';
|
$op = isset($ops[$key]) && !empty($ops[$key]) ? $ops[$key] : '%*%';
|
||||||
|
|
||||||
|
if (strpos($key, '[') === 0) {
|
||||||
|
$key = str_replace('[', '', $key);
|
||||||
|
|
||||||
|
$key = explode(']', $key)[0];
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->relationSearch && count(explode('.', $key)) == 1) {
|
if ($this->relationSearch && count(explode('.', $key)) == 1) {
|
||||||
$key = "{$tableName}.{$key}";
|
$key = "{$tableName}.{$key}";
|
||||||
}
|
}
|
||||||
@@ -242,6 +248,18 @@ class AdminController extends BaseController
|
|||||||
case '%*':
|
case '%*':
|
||||||
$where[] = [$key, 'LIKE', "%{$val}"];
|
$where[] = [$key, 'LIKE', "%{$val}"];
|
||||||
break;
|
break;
|
||||||
|
case 'min':
|
||||||
|
$where[] = [$key, '>=', $val];
|
||||||
|
break;
|
||||||
|
case 'max':
|
||||||
|
$where[] = [$key, '<=', $val];
|
||||||
|
break;
|
||||||
|
case 'min_date':
|
||||||
|
$where[] = [$key, '>=', strtotime($val)];
|
||||||
|
break;
|
||||||
|
case 'max_date':
|
||||||
|
$where[] = [$key, '<=', strtotime($val)];
|
||||||
|
break;
|
||||||
case 'range':
|
case 'range':
|
||||||
[$beginTime, $endTime] = explode(' - ', $val);
|
[$beginTime, $endTime] = explode(' - ', $val);
|
||||||
$where[] = [$key, '>=', strtotime($beginTime)];
|
$where[] = [$key, '>=', strtotime($beginTime)];
|
||||||
|
|||||||
@@ -2,31 +2,32 @@
|
|||||||
@import url("../../plugs/font-awesome-4.7.0/css/font-awesome.min.css");
|
@import url("../../plugs/font-awesome-4.7.0/css/font-awesome.min.css");
|
||||||
@import url("../css/iconfont.css");
|
@import url("../css/iconfont.css");
|
||||||
|
|
||||||
html, body {
|
html,
|
||||||
height: 100%;
|
body {
|
||||||
|
height : 100%;
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-container {
|
.layuimini-container {
|
||||||
min-height: 250px;
|
min-height : 250px;
|
||||||
padding: 15px;
|
padding : 15px;
|
||||||
margin-right: auto;
|
margin-right : auto;
|
||||||
margin-left: auto;
|
margin-left : auto;
|
||||||
padding-left: 15px;
|
padding-left : 15px;
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-main {
|
.layuimini-main {
|
||||||
position: relative;
|
position : relative;
|
||||||
padding: 15px 15px;
|
padding : 15px 15px;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border: 1px solid #f2f2f2;
|
border : 1px solid #f2f2f2;
|
||||||
border-radius: 5px;
|
border-radius : 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-form .layui-form-item {
|
.layuimini-form .layui-form-item {
|
||||||
position: relative;
|
position : relative;
|
||||||
padding: 0 60px 0 0;
|
padding : 0 60px 0 0;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,29 +41,29 @@ html, body {
|
|||||||
|
|
||||||
.easy-bg-white {
|
.easy-bg-white {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
height: auto;
|
height : auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hr-line {
|
.hr-line {
|
||||||
color: #fff;
|
color : #fff;
|
||||||
height: 1px;
|
height : 1px;
|
||||||
margin: 30px 0;
|
margin : 30px 0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-top: 1px dashed #e7eaec;
|
border-top : 1px dashed #e7eaec;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**重写layui表格自适应*/
|
/**重写layui表格自适应*/
|
||||||
.layuimini-container .layui-table-cell {
|
.layuimini-container .layui-table-cell {
|
||||||
height: 100%;
|
height : 100%;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**数据表格-搜索表单样式*/
|
/**数据表格-搜索表单样式*/
|
||||||
.layuimini-container .table-search-fieldset {
|
.layuimini-container .table-search-fieldset {
|
||||||
margin: 0;
|
margin : 0;
|
||||||
border: 1px solid #e6e6e6;
|
border : 1px solid #e6e6e6;
|
||||||
padding: 10px 20px 5px 20px;
|
padding: 10px 20px 5px 20px;
|
||||||
color: #6b6b6b;
|
color : #6b6b6b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-container .table-search-fieldset input::-webkit-input-placeholder {
|
.layuimini-container .table-search-fieldset input::-webkit-input-placeholder {
|
||||||
@@ -83,30 +84,31 @@ html, body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**必填红点 */
|
/**必填红点 */
|
||||||
.layuimini-form > .layui-form-item .required:after {
|
.layuimini-form>.layui-form-item .required:after {
|
||||||
content: '*';
|
content : '*';
|
||||||
color: red;
|
color : red;
|
||||||
position: absolute;
|
position : absolute;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: 1.8em;
|
line-height: 1.8em;
|
||||||
top: 6px;
|
top : 6px;
|
||||||
right: 5px;
|
right : 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*.layuimini-form>.layui-form-item>.layui-form-label {width:120px !important;}*/
|
/*.layuimini-form>.layui-form-item>.layui-form-label {width:120px !important;}*/
|
||||||
/*.layuimini-form>.layui-form-item>.layui-input-block {margin-left:150px !important;}*/
|
/*.layuimini-form>.layui-form-item>.layui-input-block {margin-left:150px !important;}*/
|
||||||
.layuimini-form > .layui-form-item > .layui-input-block tip, .layuimini-form > .layui-form-item > .layui-inline tip {
|
.layuimini-form>.layui-form-item>.layui-input-block tip,
|
||||||
display: inline-block;
|
.layuimini-form>.layui-form-item>.layui-inline tip {
|
||||||
margin-top: 10px;
|
display : inline-block;
|
||||||
|
margin-top : 10px;
|
||||||
line-height: 15px;
|
line-height: 15px;
|
||||||
font-size: 10px;
|
font-size : 10px;
|
||||||
color: #a29c9c;
|
color : #a29c9c;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 按钮背景色 */
|
/** 按钮背景色 */
|
||||||
.layuimini-container .layuimini-btn-primary {
|
.layuimini-container .layuimini-btn-primary {
|
||||||
color: #fff;
|
color : #fff;
|
||||||
background-color: #2c3e50;
|
background-color: #2c3e50;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,34 +122,34 @@ html, body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-upload .layuimini-upload-btn {
|
.layuimini-upload .layuimini-upload-btn {
|
||||||
display: inline-block;
|
display : inline-block;
|
||||||
position: absolute;
|
position : absolute;
|
||||||
right: 0px;
|
right : 0px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-upload-show {
|
.layuimini-upload-show {
|
||||||
margin-top: 10px;
|
margin-top : 10px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-upload-show li {
|
.layuimini-upload-show li {
|
||||||
position: relative;
|
position : relative;
|
||||||
display: inline-block;
|
display : inline-block;
|
||||||
padding: 5px 0 5px 0;
|
padding : 5px 0 5px 0;
|
||||||
padding-left: 10px;
|
padding-left : 10px;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
border: 1px solid #e2e2e2;
|
border : 1px solid #e2e2e2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-upload-show a img {
|
.layuimini-upload-show a img {
|
||||||
height: 80px;
|
height : 80px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-upload-show .uploads-delete-tip {
|
.layuimini-upload-show .uploads-delete-tip {
|
||||||
position: absolute;
|
position : absolute;
|
||||||
right: 10px;
|
right : 10px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,18 +162,18 @@ html, body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.badge {
|
.badge {
|
||||||
display: inline-block;
|
display : inline-block;
|
||||||
min-width: 10px;
|
min-width : 10px;
|
||||||
padding: 3px 7px;
|
padding : 3px 7px;
|
||||||
font-size: 11px;
|
font-size : 11px;
|
||||||
font-weight: bold;
|
font-weight : bold;
|
||||||
color: #fff;
|
color : #fff;
|
||||||
line-height: 1;
|
line-height : 1;
|
||||||
vertical-align: middle;
|
vertical-align : middle;
|
||||||
white-space: nowrap;
|
white-space : nowrap;
|
||||||
text-align: center;
|
text-align : center;
|
||||||
background-color: #777777;
|
background-color: #777777;
|
||||||
border-radius: 10px;
|
border-radius : 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**vue隐藏样式*/
|
/**vue隐藏样式*/
|
||||||
@@ -182,18 +184,18 @@ html, body {
|
|||||||
/**表格url样式*/
|
/**表格url样式*/
|
||||||
.layuimini-table-url {
|
.layuimini-table-url {
|
||||||
background-color: #1497f3;
|
background-color: #1497f3;
|
||||||
color: #ffffff;
|
color : #ffffff;
|
||||||
border-radius: 3px;
|
border-radius : 3px;
|
||||||
size: 8px !important;
|
size : 8px !important;
|
||||||
padding: 2px
|
padding : 2px
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-table-url:hover {
|
.layuimini-table-url:hover {
|
||||||
background-color: #1497f3;
|
background-color: #1497f3;
|
||||||
color: #ffffff;
|
color : #ffffff;
|
||||||
border-radius: 3px;
|
border-radius : 3px;
|
||||||
size: 8px !important;
|
size : 8px !important;
|
||||||
padding: 2px
|
padding : 2px
|
||||||
}
|
}
|
||||||
|
|
||||||
/**后台权限隐藏*/
|
/**后台权限隐藏*/
|
||||||
@@ -205,21 +207,21 @@ html, body {
|
|||||||
|
|
||||||
.layui-input-block {
|
.layui-input-block {
|
||||||
margin-left: 130px;
|
margin-left: 130px;
|
||||||
min-height: 36px
|
min-height : 36px
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
table样式
|
table样式
|
||||||
*/
|
*/
|
||||||
.layuimini-container .layui-laypage .layui-laypage-curr .layui-laypage-em {
|
.layuimini-container .layui-laypage .layui-laypage-curr .layui-laypage-em {
|
||||||
border-radius: 30px !important;
|
border-radius : 30px !important;
|
||||||
background-color: #1e9fff !important;
|
background-color: #1e9fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-container .layui-table-tool {
|
.layuimini-container .layui-table-tool {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-bottom: none !important;
|
border-bottom : none !important;
|
||||||
padding-bottom: 15px !important;
|
padding-bottom : 15px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-container .layui-table-view {
|
.layuimini-container .layui-table-view {
|
||||||
@@ -232,28 +234,29 @@ table样式
|
|||||||
border-color: #e6e6e6;
|
border-color: #e6e6e6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-container .layui-table-page, .layui-table-total {
|
.layuimini-container .layui-table-page,
|
||||||
|
.layui-table-total {
|
||||||
border-width: 0px 0 0;
|
border-width: 0px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-container .layui-table-box .layui-table-header th {
|
.layuimini-container .layui-table-box .layui-table-header th {
|
||||||
font-weight: bold !important;
|
font-weight: bold !important;
|
||||||
color: #565656 !important;
|
color : #565656 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
搜索
|
搜索
|
||||||
*/
|
*/
|
||||||
.form-search .layui-btn {
|
.form-search .layui-btn {
|
||||||
height: 32px;
|
height : 32px;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
font-size: 12px;
|
font-size : 12px;
|
||||||
padding: 0 10px;
|
padding : 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-search .layui-form-label {
|
.form-search .layui-form-label {
|
||||||
padding: 0 8px;
|
padding : 0 8px;
|
||||||
height: 32px;
|
height : 32px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,14 +266,15 @@ table样式
|
|||||||
|
|
||||||
.form-search .layui-input-inline input,
|
.form-search .layui-input-inline input,
|
||||||
.form-search .layui-input-inline select {
|
.form-search .layui-input-inline select {
|
||||||
width: 100%;
|
width : 100%;
|
||||||
height: 32px;
|
height : 32px;
|
||||||
padding: 2px 8px;
|
padding : 2px 8px;
|
||||||
line-height: 1em;
|
line-height: 1em;
|
||||||
|
font-size : 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-search .layui-form-select dl {
|
.form-search .layui-form-select dl {
|
||||||
top: 31px;
|
top : 31px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,26 +283,26 @@ table样式
|
|||||||
按钮
|
按钮
|
||||||
*/
|
*/
|
||||||
.layuimini-container .layui-btn-success {
|
.layuimini-container .layui-btn-success {
|
||||||
color: #fff;
|
color : #fff;
|
||||||
background-color: #4bb368;
|
background-color: #4bb368;
|
||||||
border-color: #4bb368;
|
border-color : #4bb368;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-container .layui-btn-danger {
|
.layuimini-container .layui-btn-danger {
|
||||||
color: #fff;
|
color : #fff;
|
||||||
background-color: #f56c6c;
|
background-color: #f56c6c;
|
||||||
border-color: #f56c6c;
|
border-color : #f56c6c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-container .layui-table-tool .layui-btn + .layui-btn {
|
.layuimini-container .layui-table-tool .layui-btn+.layui-btn {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-container .layui-table-tool .layui-inline[lay-event] {
|
.layuimini-container .layui-table-tool .layui-inline[lay-event] {
|
||||||
width: 30px;
|
width : 30px;
|
||||||
height: 30px;
|
height : 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
padding: 0px;
|
padding : 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-container .layui-table-tool .layui-inline .layui-icon {
|
.layuimini-container .layui-table-tool .layui-inline .layui-icon {
|
||||||
@@ -317,7 +321,7 @@ table样式
|
|||||||
开关
|
开关
|
||||||
*/
|
*/
|
||||||
.layuimini-container .layui-form-switch {
|
.layuimini-container .layui-form-switch {
|
||||||
border: 1px solid #f56d6d;
|
border : 1px solid #f56d6d;
|
||||||
background-color: #f56d6d;
|
background-color: #f56d6d;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,7 +334,7 @@ table样式
|
|||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-container .layui-form-onswitch {
|
.layuimini-container .layui-form-onswitch {
|
||||||
border-color: #1f9fff;
|
border-color : #1f9fff;
|
||||||
background-color: #1f9fff;
|
background-color: #1f9fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,24 +349,24 @@ table样式
|
|||||||
弹出层样式
|
弹出层样式
|
||||||
*/
|
*/
|
||||||
.layui-layer-easy .layui-layer-title {
|
.layui-layer-easy .layui-layer-title {
|
||||||
background: #2c3e50 !important;
|
background : #2c3e50 !important;
|
||||||
color: #fff !important;
|
color : #fff !important;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-layer-easy .layui-layer-title ~ .layui-layer-setwin {
|
.layui-layer-easy .layui-layer-title~.layui-layer-setwin {
|
||||||
top: 0px;
|
top : 0px;
|
||||||
height: 42px;
|
height: 42px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-layer-easy .layui-layer-title ~ .layui-layer-setwin > a {
|
.layui-layer-easy .layui-layer-title~.layui-layer-setwin>a {
|
||||||
height: 42px;
|
height : 42px;
|
||||||
line-height: 42px;
|
line-height: 42px;
|
||||||
display: inline-block;
|
display : inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-layer-easy.layui-layer-border {
|
.layui-layer-easy.layui-layer-border {
|
||||||
border: none !important;
|
border : none !important;
|
||||||
box-shadow: 1px 1px 50px rgba(0, 0, 0, 0.3) !important;
|
box-shadow: 1px 1px 50px rgba(0, 0, 0, 0.3) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -372,65 +376,65 @@ table样式
|
|||||||
|
|
||||||
.layui-layer-easy .layui-layer-moves {
|
.layui-layer-easy .layui-layer-moves {
|
||||||
-webkit-box-sizing: content-box;
|
-webkit-box-sizing: content-box;
|
||||||
-moz-box-sizing: content-box;
|
-moz-box-sizing : content-box;
|
||||||
box-sizing: content-box;
|
box-sizing : content-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-layer-easy .layui-layer-btn {
|
.layui-layer-easy .layui-layer-btn {
|
||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
padding: 10px !important;
|
padding : 10px !important;
|
||||||
background: #ecf0f1;
|
background: #ecf0f1;
|
||||||
overflow: hidden;
|
overflow : hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-layer-easy .layui-layer-btn a {
|
.layui-layer-easy .layui-layer-btn a {
|
||||||
background-color: #95a5a6;
|
background-color: #95a5a6;
|
||||||
border-color: #95a5a6;
|
border-color : #95a5a6;
|
||||||
color: #fff !important;
|
color : #fff !important;
|
||||||
height: 31px;
|
height : 31px;
|
||||||
margin-top: 0;
|
margin-top : 0;
|
||||||
border: 1px solid transparent;
|
border : 1px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-layer-easy .layui-layer-btn .layui-layer-btn0 {
|
.layui-layer-easy .layui-layer-btn .layui-layer-btn0 {
|
||||||
background-color: #1E9FFF;
|
background-color: #1E9FFF;
|
||||||
border-color: #1E9FFF;
|
border-color : #1E9FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-layer-easy .layui-layer-footer {
|
.layui-layer-easy .layui-layer-footer {
|
||||||
padding: 8px 20px;
|
padding : 8px 20px;
|
||||||
background-color: #ecf0f1;
|
background-color: #ecf0f1;
|
||||||
height: auto;
|
height : auto;
|
||||||
text-align: inherit !important;
|
text-align : inherit !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-layer-easy .layui-layer-setwin > a {
|
.layui-layer-easy .layui-layer-setwin>a {
|
||||||
background: none !important;
|
background: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-layer-easy .layui-layer-setwin > a cite {
|
.layui-layer-easy .layui-layer-setwin>a cite {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-layer-easy .layui-layer-setwin > a:after {
|
.layui-layer-easy .layui-layer-setwin>a:after {
|
||||||
content: "\e625";
|
content : "\e625";
|
||||||
font-family: iconfont;
|
font-family : iconfont;
|
||||||
font-style: normal;
|
font-style : normal;
|
||||||
font-weight: normal;
|
font-weight : normal;
|
||||||
text-decoration: inherit;
|
text-decoration: inherit;
|
||||||
position: absolute;
|
position : absolute;
|
||||||
font-size: 18px;
|
font-size : 18px;
|
||||||
color: #fff;
|
color : #fff;
|
||||||
margin: 0;
|
margin : 0;
|
||||||
z-index: 1;
|
z-index : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-layer-easy .layui-layer-setwin > a:hover {
|
.layui-layer-easy .layui-layer-setwin>a:hover {
|
||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
background: none !important;
|
background : none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-layer-easy .layui-layer-setwin > a:focus {
|
.layui-layer-easy .layui-layer-setwin>a:focus {
|
||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,8 +469,8 @@ table样式
|
|||||||
.layui-layer-easy .layui-layer-setwin .layui-layer-close2,
|
.layui-layer-easy .layui-layer-setwin .layui-layer-close2,
|
||||||
.layui-layer-easy .layui-layer-setwin .layui-layer-close2:hover {
|
.layui-layer-easy .layui-layer-setwin .layui-layer-close2:hover {
|
||||||
background: url('../libs/layer/dist/theme/default/icon.png') no-repeat -149px -31px !important;
|
background: url('../libs/layer/dist/theme/default/icon.png') no-repeat -149px -31px !important;
|
||||||
top: -30px;
|
top : -30px;
|
||||||
right: -30px;
|
right : -30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-layer-easy .layui-layer-setwin .layui-layer-close2:after,
|
.layui-layer-easy .layui-layer-setwin .layui-layer-close2:after,
|
||||||
@@ -487,20 +491,20 @@ table样式
|
|||||||
}
|
}
|
||||||
|
|
||||||
.layui-layer-easy-tab .layui-layer-content .layui-layer-tabmain {
|
.layui-layer-easy-tab .layui-layer-content .layui-layer-tabmain {
|
||||||
margin: 0;
|
margin : 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 1024px) {
|
@media screen and (max-width: 1024px) {
|
||||||
.layuimini-form .layui-form-item {
|
.layuimini-form .layui-form-item {
|
||||||
position: relative;
|
position : relative;
|
||||||
padding: 0 30px 0 0;
|
padding : 0 30px 0 0;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
.easyadmin-export-btn{
|
.easyadmin-export-btn {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -513,20 +517,20 @@ table样式
|
|||||||
}
|
}
|
||||||
|
|
||||||
.line-limit-length {
|
.line-limit-length {
|
||||||
width: 200px;
|
width : 200px;
|
||||||
overflow: hidden;
|
overflow : hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
background: goldenrod;
|
background : goldenrod;
|
||||||
white-space: nowrap;
|
white-space : nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-item{
|
.data-item {
|
||||||
display: none;
|
display : none;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 450px) {
|
@media screen and (max-width: 450px) {
|
||||||
.data-item{
|
.data-item {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -602,12 +606,20 @@ table样式
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-table-header{
|
.layui-table-header {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-hide-item{
|
.search-hide-item {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-item-time-limit .layui-input-inline {
|
||||||
|
display: flex;
|
||||||
|
width : 274px;
|
||||||
|
}
|
||||||
|
.form-item-number-limit .layui-input-inline {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
@@ -21,7 +21,9 @@ define(["jquery", "easy-admin"], function ($, ea) {
|
|||||||
limit: 50,
|
limit: 50,
|
||||||
cols: [[
|
cols: [[
|
||||||
{ type: 'checkbox' },
|
{ type: 'checkbox' },
|
||||||
{ field: 'id', title: 'id' },
|
{ field: 'id', title: 'id', search: 'number_limit' },
|
||||||
|
{ field: 'id', title: 'id模糊匹配', trueHide: true, fieldAlias: '[id]like' },
|
||||||
|
{ field: 'id', title: '最大id', trueHide: true, fieldAlias: '[id]max', searchOp: 'max' },
|
||||||
{
|
{
|
||||||
field: 'uid', title: 'uid', minWidth: 120,
|
field: 'uid', title: 'uid', minWidth: 120,
|
||||||
},
|
},
|
||||||
@@ -36,11 +38,9 @@ define(["jquery", "easy-admin"], function ($, ea) {
|
|||||||
|
|
||||||
var className = 'log-group log-group-' + (currentUidIndex % 2)
|
var className = 'log-group log-group-' + (currentUidIndex % 2)
|
||||||
return '<div class="' + className + '">' + data.content + '</div>'
|
return '<div class="' + className + '">' + data.content + '</div>'
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'create_time', title: 'create_time', minWidth: 160 },
|
{ field: 'create_time', title: '记录时间', minWidth: 160, search: 'time_limit' },
|
||||||
{ field: 'app_name', title: 'app_name' },
|
{ field: 'app_name', title: 'app_name' },
|
||||||
{ field: 'controller_name', title: 'controller_name', },
|
{ field: 'controller_name', title: 'controller_name', },
|
||||||
{ field: 'action_name', title: 'action_name' },
|
{ field: 'action_name', title: 'action_name' },
|
||||||
|
|||||||
@@ -288,6 +288,14 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
// 判断是否有操作列表权限
|
// 判断是否有操作列表权限
|
||||||
options.cols = admin.table.renderOperat(options.cols, options.elem);
|
options.cols = admin.table.renderOperat(options.cols, options.elem);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 判断是否有操作列表权限
|
||||||
|
options.cols = admin.table.renderTrueHide(options.cols, options.elem);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 初始化表格
|
// 初始化表格
|
||||||
var newTable = table.render(options);
|
var newTable = table.render(options);
|
||||||
|
|
||||||
@@ -363,6 +371,15 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
d.searchOp = d.searchOp || '%*%';
|
d.searchOp = d.searchOp || '%*%';
|
||||||
d.timeType = d.timeType || 'datetime';
|
d.timeType = d.timeType || 'datetime';
|
||||||
|
|
||||||
|
d.elemIdName = d.fieldAlias;
|
||||||
|
|
||||||
|
if (typeof d.fieldAlias == 'string' && d.fieldAlias.indexOf('[') == 0) {
|
||||||
|
|
||||||
|
var fieldPlusArr = d.fieldAlias.replace('[').split(']');
|
||||||
|
|
||||||
|
d.elemIdName = fieldPlusArr.join('-')
|
||||||
|
}
|
||||||
|
|
||||||
if (d.defaultSearchValue.length > 0) {
|
if (d.defaultSearchValue.length > 0) {
|
||||||
if (d.searchValue.length == 0) {
|
if (d.searchValue.length == 0) {
|
||||||
d.searchValue = d.defaultSearchValue;
|
d.searchValue = d.defaultSearchValue;
|
||||||
@@ -385,7 +402,7 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
formHtml += '\t<div class="layui-form-item layui-inline ' + formSearchHideClass + ' ">\n' +
|
formHtml += '\t<div class="layui-form-item layui-inline ' + formSearchHideClass + ' ">\n' +
|
||||||
'<label class="layui-form-label">' + d.title + '</label>\n' +
|
'<label class="layui-form-label">' + d.title + '</label>\n' +
|
||||||
'<div class="layui-input-inline">\n' +
|
'<div class="layui-input-inline">\n' +
|
||||||
'<input id="c-' + d.fieldAlias + '" name="' + d.fieldAlias + '" data-search-op="' + d.searchOp + '" value="' + d.searchValue + '" placeholder="' + d.searchTip + '" class="layui-input">\n' +
|
'<input id="c-' + d.elemIdName + '" name="' + d.fieldAlias + '" data-search-op="' + d.searchOp + '" value="' + d.searchValue + '" placeholder="' + d.searchTip + '" class="layui-input">\n' +
|
||||||
'</div>\n' +
|
'</div>\n' +
|
||||||
'</div>';
|
'</div>';
|
||||||
break;
|
break;
|
||||||
@@ -403,7 +420,7 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
formHtml += '\t<div class="layui-form-item layui-inline ' + formSearchHideClass + ' ">\n' +
|
formHtml += '\t<div class="layui-form-item layui-inline ' + formSearchHideClass + ' ">\n' +
|
||||||
'<label class="layui-form-label">' + d.title + '</label>\n' +
|
'<label class="layui-form-label">' + d.title + '</label>\n' +
|
||||||
'<div class="layui-input-inline">\n' +
|
'<div class="layui-input-inline">\n' +
|
||||||
'<select class="layui-select" id="c-' + d.fieldAlias + '" name="' + d.fieldAlias + '" data-search-op="' + d.searchOp + '" >\n' +
|
'<select class="layui-select" id="c-' + d.elemIdName + '" name="' + d.fieldAlias + '" data-search-op="' + d.searchOp + '" >\n' +
|
||||||
'<option value="">- 全部 -</option> \n' +
|
'<option value="">- 全部 -</option> \n' +
|
||||||
selectHtml +
|
selectHtml +
|
||||||
'</select>\n' +
|
'</select>\n' +
|
||||||
@@ -415,7 +432,7 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
formHtml += '\t<div class="layui-form-item layui-inline ' + formSearchHideClass + ' ">\n' +
|
formHtml += '\t<div class="layui-form-item layui-inline ' + formSearchHideClass + ' ">\n' +
|
||||||
'<label class="layui-form-label">' + d.title + '</label>\n' +
|
'<label class="layui-form-label">' + d.title + '</label>\n' +
|
||||||
'<div class="layui-input-inline">\n' +
|
'<div class="layui-input-inline">\n' +
|
||||||
'<input id="c-' + d.fieldAlias + '" name="' + d.fieldAlias + '" data-search-op="' + d.searchOp + '" value="' + d.searchValue + '" placeholder="' + d.searchTip + '" class="layui-input">\n' +
|
'<input id="c-' + d.elemIdName + '" name="' + d.fieldAlias + '" data-search-op="' + d.searchOp + '" value="' + d.searchValue + '" placeholder="' + d.searchTip + '" class="layui-input">\n' +
|
||||||
'</div>\n' +
|
'</div>\n' +
|
||||||
'</div>';
|
'</div>';
|
||||||
break;
|
break;
|
||||||
@@ -424,7 +441,27 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
formHtml += '\t<div class="layui-form-item layui-inline ' + formSearchHideClass + ' ">\n' +
|
formHtml += '\t<div class="layui-form-item layui-inline ' + formSearchHideClass + ' ">\n' +
|
||||||
'<label class="layui-form-label">' + d.title + '</label>\n' +
|
'<label class="layui-form-label">' + d.title + '</label>\n' +
|
||||||
'<div class="layui-input-inline">\n' +
|
'<div class="layui-input-inline">\n' +
|
||||||
'<input id="c-' + d.fieldAlias + '" name="' + d.fieldAlias + '" data-search-op="' + d.searchOp + '" value="' + d.searchValue + '" placeholder="' + d.searchTip + '" class="layui-input">\n' +
|
'<input id="c-' + d.elemIdName + '" name="' + d.fieldAlias + '" data-search-op="' + d.searchOp + '" value="' + d.searchValue + '" placeholder="' + d.searchTip + '" class="layui-input">\n' +
|
||||||
|
'</div>\n' +
|
||||||
|
'</div>';
|
||||||
|
break;
|
||||||
|
case 'time_limit':
|
||||||
|
d.searchOp = '=';
|
||||||
|
formHtml += '\t<div class="layui-form-item form-item-time-limit layui-inline ' + formSearchHideClass + ' ">\n' +
|
||||||
|
'<label class="layui-form-label">' + d.title + '</label>\n' +
|
||||||
|
'<div class="layui-input-inline">\n' +
|
||||||
|
'<input id="c-' + d.elemIdName + '-min_date" name="[' + d.fieldAlias + ']min_date" data-search-op="min_date" value="' + d.searchValue + '" placeholder="' + d.searchTip + '最小值" class="layui-input">\n' +
|
||||||
|
'<input id="c-' + d.elemIdName + '-max_date" name="[' + d.fieldAlias + ']max_date" data-search-op="max_date" value="' + d.searchValue + '" placeholder="' + d.searchTip + '最大值" class="layui-input">\n' +
|
||||||
|
'</div>\n' +
|
||||||
|
'</div>';
|
||||||
|
break;
|
||||||
|
case 'number_limit':
|
||||||
|
d.searchOp = '=';
|
||||||
|
formHtml += '\t<div class="layui-form-item form-item-number-limit layui-inline ' + formSearchHideClass + ' ">\n' +
|
||||||
|
'<label class="layui-form-label">' + d.title + '</label>\n' +
|
||||||
|
'<div class="layui-input-inline">\n' +
|
||||||
|
'<input id="c-' + d.elemIdName + '-min" name="[' + d.fieldAlias + ']min" data-search-op="min" type="text" value="' + d.searchValue + '" placeholder="' + d.searchTip + '最小值" class="layui-input">\n' +
|
||||||
|
'<input id="c-' + d.elemIdName + '-max" name="[' + d.fieldAlias + ']max" data-search-op="max" type="text" value="' + d.searchValue + '" placeholder="' + d.searchTip + '最大值" class="layui-input">\n' +
|
||||||
'</div>\n' +
|
'</div>\n' +
|
||||||
'</div>';
|
'</div>';
|
||||||
break;
|
break;
|
||||||
@@ -456,6 +493,10 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
if (ncV.search === 'time') {
|
if (ncV.search === 'time') {
|
||||||
laydate.render({ type: ncV.timeType, elem: '[name="' + ncV.fieldAlias + '"]' });
|
laydate.render({ type: ncV.timeType, elem: '[name="' + ncV.fieldAlias + '"]' });
|
||||||
}
|
}
|
||||||
|
if (ncV.search === 'time_limit') {
|
||||||
|
laydate.render({ type: ncV.timeType, elem: '[name="[' + ncV.fieldAlias + ']min_date"]' });
|
||||||
|
laydate.render({ type: ncV.timeType, elem: '[name="[' + ncV.fieldAlias + ']max_date"]' });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -509,9 +550,27 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
data[dk].pop()
|
data[dk].pop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
|
renderTrueHide(data, elem) {
|
||||||
|
var newData = [];
|
||||||
|
for (dk in data) {
|
||||||
|
var newCol = [];
|
||||||
|
var col = data[dk];
|
||||||
|
|
||||||
|
col.forEach(colItem => {
|
||||||
|
if (!colItem.trueHide) {
|
||||||
|
newCol.push(colItem)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
newData.push(newCol)
|
||||||
|
}
|
||||||
|
|
||||||
|
return newData;
|
||||||
|
},
|
||||||
buildToolbarHtml: function (toolbar, tableId) {
|
buildToolbarHtml: function (toolbar, tableId) {
|
||||||
var html = '';
|
var html = '';
|
||||||
toolbar.class = toolbar.class || '';
|
toolbar.class = toolbar.class || '';
|
||||||
@@ -864,7 +923,16 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
$.each(dataField, function (key, val) {
|
$.each(dataField, function (key, val) {
|
||||||
if (val !== '') {
|
if (val !== '') {
|
||||||
formatFilter[key] = val;
|
formatFilter[key] = val;
|
||||||
var op = $('#c-' + key).attr('data-search-op');
|
|
||||||
|
var elemId = key;
|
||||||
|
|
||||||
|
if (key.indexOf('[') == 0) {
|
||||||
|
var keyArr = key.replace('[', '').split(']');
|
||||||
|
|
||||||
|
elemId = keyArr[0] + '-' + keyArr[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
var op = $('#c-' + elemId).attr('data-search-op');
|
||||||
op = op || '%*%';
|
op = op || '%*%';
|
||||||
formatOp[key] = op;
|
formatOp[key] = op;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user