切换导航条
此项目
正在载入...
登录
何书鹏
/
recruit
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
Karson
5 years ago
提交
beccee081136da604e7f2a25d03503c135291dec
1 个父辈
614d88eb
新增null或空字符串筛选过滤
新增表格列表字段renderDefault控制默认数据
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
23 行增加
和
10 行删除
application/common/controller/Backend.php
public/assets/js/bootstrap-table-commonsearch.js
public/assets/js/require-backend.min.js
application/common/controller/Backend.php
查看文件 @
beccee0
...
...
@@ -296,6 +296,17 @@ class Backend extends Controller
}
$v
=
!
is_array
(
$v
)
?
trim
(
$v
)
:
$v
;
$sym
=
strtoupper
(
isset
(
$op
[
$k
])
?
$op
[
$k
]
:
$sym
);
//null和空字符串特殊处理
if
(
!
is_array
(
$v
))
{
if
(
in_array
(
strtoupper
(
$v
),
[
'NULL'
,
'NOT NULL'
]))
{
$sym
=
strtoupper
(
$v
);
}
if
(
in_array
(
$v
,
[
'""'
,
"''"
]))
{
$v
=
''
;
$sym
=
'='
;
}
}
switch
(
$sym
)
{
case
'='
:
case
'<>'
:
...
...
public/assets/js/bootstrap-table-commonsearch.js
查看文件 @
beccee0
...
...
@@ -64,8 +64,9 @@
var
query
=
Fast
.
api
.
query
(
vObjCol
.
field
);
var
operate
=
Fast
.
api
.
query
(
vObjCol
.
field
+
"-operate"
);
vObjCol
.
defaultValue
=
that
.
options
.
renderDefault
&&
query
?
query
:
(
typeof
vObjCol
.
defaultValue
===
'undefined'
?
''
:
vObjCol
.
defaultValue
);
vObjCol
.
operate
=
that
.
options
.
renderDefault
&&
operate
?
operate
:
(
typeof
vObjCol
.
operate
===
'undefined'
?
'='
:
vObjCol
.
operate
);
var
renderDefault
=
that
.
options
.
renderDefault
&&
(
typeof
vObjCol
.
renderDefault
==
'undefined'
||
vObjCol
.
renderDefault
);
vObjCol
.
defaultValue
=
renderDefault
&&
query
?
query
:
(
typeof
vObjCol
.
defaultValue
===
'undefined'
?
''
:
vObjCol
.
defaultValue
);
vObjCol
.
operate
=
renderDefault
&&
operate
?
operate
:
(
typeof
vObjCol
.
operate
===
'undefined'
?
'='
:
vObjCol
.
operate
);
ColumnsForSearch
.
push
(
vObjCol
);
htmlForm
.
push
(
'<div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">'
);
...
...
@@ -333,7 +334,7 @@
}
else
if
(
obj
.
size
()
>
1
)
{
$
(
"form [name='"
+
$
(
this
).
data
(
"field"
)
+
"'][value='"
+
value
+
"']"
,
that
.
$commonsearch
).
prop
(
"checked"
,
true
);
}
else
{
obj
.
val
(
value
);
obj
.
val
(
value
+
""
);
}
obj
.
trigger
(
"change"
);
$
(
"form"
,
that
.
$commonsearch
).
trigger
(
"submit"
);
...
...
@@ -382,8 +383,8 @@
[
value
,
item
,
i
],
value
);
if
(
!
(
$
.
inArray
(
key
,
that
.
header
.
fields
)
!==
-
1
&&
(
typeof
value
===
'string'
||
typeof
value
===
'number'
)
&&
(
value
+
''
).
toLowerCase
().
indexOf
(
fval
)
!==
-
1
))
{
(
typeof
value
===
'string'
||
typeof
value
===
'number'
)
&&
(
value
+
''
).
toLowerCase
().
indexOf
(
fval
)
!==
-
1
))
{
return
false
;
}
}
...
...
public/assets/js/require-backend.min.js
查看文件 @
beccee0
...
...
@@ -10565,8 +10565,9 @@ define('form',['jquery', 'bootstrap', 'upload', 'validator'], function ($, undef
var
query
=
Fast
.
api
.
query
(
vObjCol
.
field
);
var
operate
=
Fast
.
api
.
query
(
vObjCol
.
field
+
"-operate"
);
vObjCol
.
defaultValue
=
that
.
options
.
renderDefault
&&
query
?
query
:
(
typeof
vObjCol
.
defaultValue
===
'undefined'
?
''
:
vObjCol
.
defaultValue
);
vObjCol
.
operate
=
that
.
options
.
renderDefault
&&
operate
?
operate
:
(
typeof
vObjCol
.
operate
===
'undefined'
?
'='
:
vObjCol
.
operate
);
var
renderDefault
=
that
.
options
.
renderDefault
&&
(
typeof
vObjCol
.
renderDefault
==
'undefined'
||
vObjCol
.
renderDefault
);
vObjCol
.
defaultValue
=
renderDefault
&&
query
?
query
:
(
typeof
vObjCol
.
defaultValue
===
'undefined'
?
''
:
vObjCol
.
defaultValue
);
vObjCol
.
operate
=
renderDefault
&&
operate
?
operate
:
(
typeof
vObjCol
.
operate
===
'undefined'
?
'='
:
vObjCol
.
operate
);
ColumnsForSearch
.
push
(
vObjCol
);
htmlForm
.
push
(
'<div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">'
);
...
...
@@ -10834,7 +10835,7 @@ define('form',['jquery', 'bootstrap', 'upload', 'validator'], function ($, undef
}
else
if
(
obj
.
size
()
>
1
)
{
$
(
"form [name='"
+
$
(
this
).
data
(
"field"
)
+
"'][value='"
+
value
+
"']"
,
that
.
$commonsearch
).
prop
(
"checked"
,
true
);
}
else
{
obj
.
val
(
value
);
obj
.
val
(
value
+
""
);
}
obj
.
trigger
(
"change"
);
$
(
"form"
,
that
.
$commonsearch
).
trigger
(
"submit"
);
...
...
@@ -10883,8 +10884,8 @@ define('form',['jquery', 'bootstrap', 'upload', 'validator'], function ($, undef
[
value
,
item
,
i
],
value
);
if
(
!
(
$
.
inArray
(
key
,
that
.
header
.
fields
)
!==
-
1
&&
(
typeof
value
===
'string'
||
typeof
value
===
'number'
)
&&
(
value
+
''
).
toLowerCase
().
indexOf
(
fval
)
!==
-
1
))
{
(
typeof
value
===
'string'
||
typeof
value
===
'number'
)
&&
(
value
+
''
).
toLowerCase
().
indexOf
(
fval
)
!==
-
1
))
{
return
false
;
}
}
...
...
请
注册
或
登录
后发表评论