Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SooonerHotel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴贤德
SooonerHotel
Commits
f15339b9
Commit
f15339b9
authored
Sep 09, 2019
by
wangjiangze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
站点管理功能新增
parent
5408ad92
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
478 additions
and
2 deletions
+478
-2
config.php
SooonerHotel/App/Conf/config.php
+1
-1
IndexAction.class.php
SooonerHotel/App/Lib/Action/IndexAction.class.php
+3
-0
SiteAction.class.php
SooonerHotel/App/Lib/Action/Site/SiteAction.class.php
+105
-0
SiteModel.class.php
SooonerHotel/App/Lib/Model/SiteModel.class.php
+34
-0
add.html
SooonerHotel/App/Tpl/Site/zh-cn/Site/add.html
+116
-0
index.html
SooonerHotel/App/Tpl/Site/zh-cn/Site/index.html
+218
-0
index.html
SooonerHotel/App/Tpl/zh-cn/Index/index.html
+1
-1
No files found.
SooonerHotel/App/Conf/config.php
View file @
f15339b9
...
...
@@ -33,7 +33,7 @@ return array(
'APP_STATUS'
=>
'release'
,
//分组
'APP_GROUP_LIST'
=>
'System,Hotel,Sp,Media,Inject,Api,PlayCtrl,Log,Monitor'
,
//项目分组列表(配置即表示开启分组)
'APP_GROUP_LIST'
=>
'System,Hotel,Sp,Media,Inject,Api,PlayCtrl,Log,Monitor
,Site
'
,
//项目分组列表(配置即表示开启分组)
'DEFAULT_GROUP'
=>
''
,
//多语言
...
...
SooonerHotel/App/Lib/Action/IndexAction.class.php
View file @
f15339b9
...
...
@@ -12,6 +12,9 @@ class IndexAction extends CommonAction {
if
(
$a
[
'pid'
]
==
1
){
switch
(
$a
[
'title'
])
{
case
'站点管理'
:
$cla
=
'fa-sitemap'
;
break
;
case
'酒店管理'
:
$cla
=
'fa-institution'
;
break
;
...
...
SooonerHotel/App/Lib/Action/Site/SiteAction.class.php
0 → 100644
View file @
f15339b9
<?php
class
SiteAction
extends
CommonAction
{
//管理
public
function
index
(){
$op
=
I
(
'op'
);
$userInfo
=
$_SESSION
[
"_USER_INFO"
];
if
(
$op
==
"getjson"
){
$model
=
D
(
"Site"
);
$inputs
=
I
();
$list
=
$model
->
getList
(
"list"
,
$userInfo
,
$inputs
);
$count
=
$model
->
getList
(
"count"
,
$userInfo
,
$inputs
);
$total
=
$count
[
0
][
"count"
];
echo
"
{
\"total\":\"".$total."\",\"rows\":".json_encode($list)."
}
"
;
}
else
{
$spModel
=
D
(
"Sp"
);
$regionModel
=
D
(
"Region"
);
if
(
$userInfo
[
'sp_ids'
]
&&
$userInfo
[
'grade'
]
>=
3
){
$sp_lists
=
$spModel
->
where
(
"`status`=0 and id in("
.
$userInfo
[
'sp_ids'
]
.
")"
)
->
select
();
}
else
{
$sp_lists
=
$spModel
->
where
(
"`status`=0"
)
->
select
();
}
$region_lists
=
$regionModel
->
where
(
"`level` < 4 and pid < 999999"
)
->
select
();
$this
->
region_lists
=
$region_lists
;
$this
->
sp_lists
=
$sp_lists
;
$this
->
display
();
}
}
//添加
public
function
add
(){
$userInfo
=
$_SESSION
[
"_USER_INFO"
];
$id
=
I
(
'id'
,
''
,
int
)
?
I
(
'id'
,
''
,
int
)
:
0
;
$model
=
D
(
"Site"
);
$spModel
=
D
(
"Sp"
);
$regionModel
=
D
(
"Region"
);
if
(
$id
){
$info
=
$model
->
where
(
"id =
$id
"
)
->
find
();
$this
->
info
=
$info
;
}
if
(
$userInfo
[
'sp_ids'
]
&&
$userInfo
[
'grade'
]
>=
3
){
$sp_lists
=
$spModel
->
where
(
"`status`=0 and id in("
.
$userInfo
[
'sp_ids'
]
.
")"
)
->
select
();
}
else
{
$sp_lists
=
$spModel
->
where
(
"`status`=0"
)
->
select
();
}
$this
->
display
();
}
//添加处理
public
function
addHandle
(){
$model
=
D
(
"Site"
);
$id
=
I
(
'id'
,
''
,
int
);
$data
[
'name'
]
=
I
(
"name"
);
$data
[
'pull_api'
]
=
I
(
"pull_api"
);
$data
[
'offline_key'
]
=
I
(
"offline_key"
);
$data
[
'check_seconds'
]
=
I
(
"check_seconds"
);
$data
[
'remark'
]
=
I
(
"remark"
);
$data
[
'status'
]
=
I
(
"status"
);
if
(
$id
){
$data
[
'id'
]
=
$id
;
$data
[
"updatetime"
]
=
date
(
'Y-m-d H:i:s'
);
$r
=
$model
->
save
(
$data
);
if
(
$r
){
echo
'true'
;
}
else
{
echo
'false'
;
}
}
else
{
$data
[
"addtime"
]
=
date
(
'Y-m-d H:i:s'
);
$id
=
$model
->
add
(
$data
);
if
(
$id
){
echo
'true'
;
}
else
{
echo
'false'
;
}
}
}
//删除处理
public
function
deleteHandle
(){
if
(
D
(
"Site"
)
->
where
(
"id="
.
I
(
"id"
,
""
,
int
))
->
delete
()){
echo
'true'
;
}
else
{
echo
'false'
;
}
}
//ajax修改状态
public
function
updateStatusAjaxHandle
(){
$model
=
D
(
"Site"
);
$data
=
$_POST
;
$data
[
'updatetime'
]
=
date
(
'Y-m-d H:i:s'
);
if
(
$model
->
save
(
$data
)){
echo
'true'
;
}
else
{
echo
'false'
;
}
}
}
SooonerHotel/App/Lib/Model/SiteModel.class.php
View file @
f15339b9
<?php
class
SiteModel
extends
RelationModel
{
protected
$tableName
=
'sh_site'
;
//重新定义表名
public
function
getList
(
$queryType
,
$userInfo
,
$inputs
){
$p
=
$inputs
[
"page"
]
?
$inputs
[
"page"
]
:
1
;
$n
=
$inputs
[
"rows"
]
?
$inputs
[
"rows"
]
:
10
;
$limit
=
"limit "
.
(
$p
-
1
)
*
$n
.
","
.
$n
;
$sort
=
""
;
if
(
$inputs
[
"sort"
])
$sort
=
"order by "
.
$inputs
[
"sort"
]
.
" "
.
$inputs
[
"order"
];
//=============
$searchField
=
$inputs
[
"searchField"
]
?
$inputs
[
"searchField"
]
:
'name'
;
$searchValue
=
$inputs
[
"searchValue"
]
?
$inputs
[
"searchValue"
]
:
''
;
if
(
$searchValue
){
$where
=
" and (`name` like '%"
.
$searchValue
.
"%') "
;
}
// if($userInfo['sp_ids']&&$userInfo['grade']>=3){
// $where .= " and A.sp_id in(".$userInfo['sp_ids'].") ";
// }
$model
=
new
Model
();
//======================
$fields
=
"count(id) count"
;
//返回列表(limit分页)
if
(
$queryType
==
"list"
){
$where
.=
$sort
.
" "
.
$limit
;
$fields
=
"*,case `status` when 1 then '<font color=red>禁用</font>' when 0 then '<font color=green>启用</font>' end as `status`"
;
}
$sql
=
"select "
.
$fields
.
" from sh_site where 1=1 "
.
$where
.
";"
;
// echo $sql;
return
$model
->
query
(
$sql
);
}
}
\ No newline at end of file
SooonerHotel/App/Tpl/Site/zh-cn/Site/add.html
0 → 100644
View file @
f15339b9
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
站点添加/修改
</title>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/bootstrap3.3.7/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/bootstrap3.3.7/bootstrap.min.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/jquery-easyui-1.3.4/jquery.easyui.min.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/jquery-easyui-1.3.4/plugins/jquery.validatebox.extend.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/jquery-easyui-1.3.4/locale/easyui-lang-{$language}.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__PUBLIC__/js/jquery-easyui-1.3.4/themes/default/easyui.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__PUBLIC__/js/jquery-easyui-1.3.4/themes/icon.css"
>
<link
rel=
"stylesheet"
href=
"__PUBLIC__/js/bootstrap3.3.7/bootstrap.min.css"
>
<style>
body
{
padding
:
20px
}
</style>
</head>
<body>
<form
class=
"form-horizontal"
role=
"form"
id=
"ff"
action=
"{:U('/Site/Site/addHandle')}"
method=
"POST"
>
<input
name=
"id"
type=
"hidden"
value=
"{$info.id}"
/>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-3 control-label"
><font
color=
"red"
>
*
</font>
站点名称
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
placeholder=
"请输入酒店名称"
value=
"{$info.name}"
name=
"name"
>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-3 control-label"
><font
color=
"red"
>
*
</font>
增量媒资拉取地址
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
placeholder=
"请输入增量媒资拉取地址"
value=
"{$info.pull_api}"
name=
"pull_api"
>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-3 control-label"
><font
color=
"red"
>
*
</font>
实时下线接口秘钥
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
placeholder=
"请输入实时下线接口秘钥"
value=
"{$info.offline_key}"
name=
"offline_key"
>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-3 control-label"
><font
color=
"red"
>
*
</font>
拉取频率
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
placeholder=
"请输入拉取频率"
value=
"{$info.check_seconds}"
name=
"check_seconds"
>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputPassword3"
class=
"col-sm-3 control-label"
>
备注
</label>
<div
class=
"col-sm-8"
>
<textarea
class=
"form-control"
rows=
"3"
name=
"remark"
>
{$info.remark}
</textarea>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputPassword3"
class=
"col-sm-3 control-label"
>
状态
</label>
<div
class=
"col-sm-9"
>
<label
class=
"radio-inline"
>
<input
type=
"radio"
name=
"status"
id=
"optionsRadios4"
value=
"1"
>
禁用
</label>
<label
class=
"radio-inline"
>
<input
type=
"radio"
name=
"status"
id=
"optionsRadios4"
value=
"0"
checked=
"checked"
>
启用
</label>
</div>
</div>
<div
class=
"btnSite col-sm-6 control-label"
>
<input
name=
""
type=
"button"
class=
"btn btn-success"
value=
"确定"
onclick=
"submitForm()"
{
:buttonAuth
('
Site
','
Site
','
addhandle
')}
/>
<input
name=
""
type=
"reset"
class=
"btn btn-warning"
value=
"取消"
onclick=
"parentDialog.close();"
/>
</div>
</form>
<script
type=
"text/javascript"
>
function
submitForm
(){
var
name_v
=
$
(
"input[name='name']"
).
val
();
var
pull_api_v
=
$
(
"input[name='pull_api']"
).
val
();
var
offline_key_v
=
$
(
"input[name='offline_key']"
).
val
();
var
check_seconds_v
=
$
(
"input[name='check_seconds']"
).
val
();
if
(
!
name_v
){
alert
(
"请输入站点名称"
);
return
;
}
if
(
!
pull_api_v
){
alert
(
"请输入增量媒资拉取地址"
);
return
;
}
if
(
!
offline_key_v
){
alert
(
"请输入实时下线接口秘钥"
);
return
;
}
if
(
!
check_seconds_v
){
alert
(
"请输入拉取频率"
);
return
;
}
$
(
'#ff'
).
form
(
'submit'
,
{
url
:
'/Site/Site/addHandle/'
,
onSubmit
:
function
(){
var
isValid
=
$
(
this
).
form
(
'validate'
);
//触发form内的所有validatebox验证,并返回true/false
if
(
!
isValid
)
$
(
'#tab'
).
tabs
(
'select'
,
0
);
return
isValid
;
},
success
:
function
(
data
){
if
(
data
==
'true'
){
// $.messager.confirm('友情提示', '操作成功! 是否关闭窗口?', function(r){
// if (r){
// parentDialog.CancelEvent();
// }
// });
parentDialog
.
CancelEvent
();
// $.messager.alert('友情提示','操作成功!','info');
}
else
$
.
messager
.
alert
(
'友情提示'
,
'操作失败!'
,
'info'
);
}
});
}
$
().
ready
(
function
(){
<
if
condition
=
"$info"
>
$
(
"input[name='status'][value='{$info.status}']"
).
attr
(
"checked"
,
true
);
<
/if
>
});
</script>
</body>
</html>
\ No newline at end of file
SooonerHotel/App/Tpl/Site/zh-cn/Site/index.html
0 → 100644
View file @
f15339b9
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
站点管理
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__PUBLIC__/js/jquery-easyui-1.3.4/themes/default/easyui.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__PUBLIC__/js/jquery-easyui-1.3.4/themes/icon.css"
>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/jquery-easyui-1.3.4/jquery.easyui.min.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/jquery-easyui-1.3.4/locale/easyui-lang-{$language}.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/newVsdn/js/zDialog/zDrag.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/newVsdn/js/zDialog/zDialog.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/common/functions.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/common/md5.js"
></script>
<link
href=
"__PUBLIC__/newVsdn/css/style_frame.css?v=20190829"
rel=
"stylesheet"
type=
"text/css"
/>
</head>
<body>
<!--搜索和按钮 开始 -->
<div
class=
"searchSite clearfix"
>
<div
class=
"layui-tab-content"
>
<div
class=
"layui-tab-item layui-show"
>
<div
class=
"hyperchanne clearfix"
>
<form
name=
"searchform"
method=
"post"
action=
""
id =
"searchform"
>
<input
type=
"hidden"
name=
"op"
value=
"getjson"
>
<div
class=
"inputBox"
>
<input
class=
"input"
type=
"text"
placeholder=
"站点名称"
name=
"searchValue"
>
</div>
<input
id=
"submit_search"
name=
""
type=
"button"
value=
"查询"
class=
"btn_go_s btn_orange"
/>
<input
onclick=
"add()"
type=
"button"
value=
"+ 新增"
{
:buttonAuth
('
Site
','
Site
','
add
')}
class=
"btn_go_s btn_add"
/>
</form>
</div>
<!--hyperchanne end-->
</div>
</div>
</div>
<!--搜索和按钮 结束-->
<table
id=
"dg"
title=
""
data-options=
"
iconCls: 'icon-edit',
singleSelect: true,
url: '/Site/Site/index/',
method: 'post',
pagination: true,
pageList:[15,30,45,60],
rownumbers: true,
sortName:'id',
sortOrder:'desc',
queryParams: form2Json('searchform'),
fitColumns: true,
height:'auto',
onRowContextMenu : onRowContextMenu
"
>
<thead>
<tr>
<th
data-options=
"field:'id',width:15"
align=
"center"
>
标识
</th>
<th
data-options=
"field:'name',width:20"
>
酒店名称
</th>
<th
data-options=
"field:'pull_api',width:50"
>
增量媒资拉取地址
</th>
<th
data-options=
"field:'offline_key',width:30"
>
实时下线接口秘钥
</th>
<th
data-options=
"field:'check_seconds',width:10"
>
拉取频率
</th>
<th
data-options=
"field:'remark',width:40"
>
备注
</th>
<th
data-options=
"field:'addtime',width:20"
sortable=
"true"
>
创建时间
</th>
<th
data-options=
"field:'updatetime',width:20"
sortable=
"true"
>
更新时间
</th>
<th
data-options=
"field:'status'"
sortable=
"true"
align=
"center"
>
状态
</th>
<th
field=
"action"
align=
"center"
formatter=
"InputAction"
>
操作
</th>
</tr>
</thead>
</table>
<div
id=
"mm1"
class=
"easyui-menu"
style=
"width:120px;display: none"
>
<div
iconCls=
"icon-edit"
id=
"menuEdit"
onclick=
"edit()"
{
:buttonAuth
('
Site
','
Site
','
add
')}
>
编辑
</div>
<div
iconCls=
"icon-cancel"
id=
"menuDel"
onclick=
"del()"
{
:buttonAuth
('
Site
','
Site
','
deletehandle
')}
>
删除
</div>
<div
class=
"menu-sep"
></div>
<div
iconCls=
"icon-stop"
id=
"menuStop"
onclick=
"enable(1)"
{
:buttonAuth
('
Site
','
Site
','
updateStatusAjaxHandle
')}
>
禁用
</div>
<div
iconCls=
"icon-start"
id=
"menuStart"
onclick=
"enable(0)"
{
:buttonAuth
('
Site
','
Site
','
updateStatusAjaxHandle
')}
>
启用
</div>
</div>
<div
id=
"mm2"
class=
"easyui-menu"
style=
"width:120px;display: none"
>
<div
iconCls=
"icon-edit"
id=
"menuEdit"
onclick=
"edit()"
{
:buttonAuth
('
Site
','
Site
','
add
')}
>
编辑
</div>
<div
iconCls=
"icon-cancel"
id=
"menuDel"
onclick=
"del()"
{
:buttonAuth
('
Site
','
Site
','
deletehandle
')}
>
删除
</div>
<div
class=
"menu-sep"
></div>
<div
iconCls=
"icon-stop"
id=
"menuStop"
onclick=
"enable(1)"
{
:buttonAuth
('
Site
','
Site
','
updateStatusAjaxHandle
')}
>
禁用
</div>
<div
iconCls=
"icon-start"
id=
"menuStart"
onclick=
"enable(0)"
{
:buttonAuth
('
Site
','
Site
','
updateStatusAjaxHandle
')}
>
启用
</div>
</div>
<script
type=
"text/javascript"
>
function
onRowContextMenu
(
e
,
rowIndex
,
rowData
){
e
.
preventDefault
();
$
(
'#dg'
).
datagrid
(
'unselectAll'
);
$
(
'#dg'
).
datagrid
(
'selectRow'
,
rowIndex
);
$
(
'#mm2'
).
menu
(
'show'
,
{
left
:
e
.
pageX
,
top
:
e
.
pageY
});
}
function
InputAction
(
value
,
row
,
index
)
{
return
'<a href="javascript:void(0)" id="mb'
+
index
+
'" class="easyui-menubutton" menu="#mm1" iconCls="icon-list" onmouseover="setSelectRow('
+
index
+
')">'
+
this
.
title
+
'</a>'
;
}
function
setSelectRow
(
index
)
{
$
(
'#dg'
).
datagrid
(
'unselectAll'
);
$
(
'#dg'
).
datagrid
(
'selectRow'
,
index
);
}
//初始化菜单按钮
$
(
function
(){
$
(
'#dg'
).
datagrid
({
onLoadSuccess
:
function
(
data
)
{
for
(
i
=
0
;
i
<
$
(
'#dg'
).
datagrid
(
'getRows'
).
length
;
i
++
)
{
$
(
'#mb'
+
i
).
menubutton
();
}
}
})
});
//禁用启用
function
enable
(
status
){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
var
msg
=
'启用'
;
if
(
status
==
1
)
msg
=
'禁用'
$
.
messager
.
confirm
(
'操作确认'
,
'确认['
+
msg
+
']该记录?'
,
function
(
r
){
if
(
r
){
$
.
post
(
"/Site/Site/updateStatusAjaxHandle/"
,
{
id
:
row
.
id
,
status
:
status
},
function
(
data
){
$
(
'#dg'
).
datagrid
(
'reload'
);
});
}
});
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
add
(){
pop
(
800
,
450
,
true
,
'dg'
,
'datagrid'
,
'/Site/Site/add/'
)
}
function
edit
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
pop
(
800
,
450
,
true
,
'dg'
,
'datagrid'
,
'/Site/Site/add/id/'
+
row
.
id
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
del
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
$
.
messager
.
confirm
(
'操作确认'
,
'确认[删除]该记录?'
,
function
(
r
){
if
(
r
){
$
.
post
(
"/Site/Site/deleteHandle/"
,
{
id
:
row
.
id
},
function
(
data
){
$
(
'#dg'
).
datagrid
(
'reload'
);
});
}
});
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
$
().
ready
(
function
(){
var
region_lists
=
{
$region_lists
|
json_encode
};
$
.
each
(
region_lists
,
function
(
i
,
item
){
if
(
item
.
level
==
3
){
if
(
$
(
"select[name='searchRegion'] option[pid='"
+
item
.
pid
+
"']"
).
length
==
0
){
$
(
"select[name='searchRegion'] optgroup[value='"
+
item
.
pid
+
"']"
).
append
(
'<option value="'
+
item
.
id
+
'" pid="'
+
item
.
pid
+
'"> |--'
+
item
.
name
+
'</option>'
);
}
else
{
$
(
"select[name='searchRegion'] option[pid='"
+
item
.
pid
+
"']:last"
).
after
(
'<option value="'
+
item
.
id
+
'" pid="'
+
item
.
pid
+
'"> |--'
+
item
.
name
+
'</option>'
);
}
}
});
});
$
(
"#submit_search"
).
click
(
function
()
{
$
(
'#dg'
).
datagrid
({
queryParams
:
form2Json
(
"searchform"
)
});
//点击搜索
});
/**
* JQuery扩展方法,用户对JQuery EasyUI的DataGrid控件进行操作。
*/
$
.
fn
.
extend
({
/**
* 修改DataGrid对象的默认大小,以适应页面宽度。
*
* @param heightMargin
* 高度对页内边距的距离。
* @param widthMargin
* 宽度对页内边距的距离。
* @param minHeight
* 最小高度。
* @param minWidth
* 最小宽度。
*
*/
resizeDataGrid
:
function
(
heightMargin
,
widthMargin
,
minHeight
,
minWidth
)
{
var
height
=
$
(
document
.
body
).
height
()
-
heightMargin
;
var
width
=
$
(
document
.
body
).
width
()
-
widthMargin
;
height
=
height
<
minHeight
?
minHeight
:
height
;
width
=
width
<
minWidth
?
minWidth
:
width
;
$
(
this
).
datagrid
(
'resize'
,
{
//height : height,
width
:
width
});
}
});
$
(
function
()
{
// datagrid数据表格ID
var
datagridId
=
'dg'
;
// 第一次加载时自动变化大小
$
(
'#'
+
datagridId
).
resizeDataGrid
(
0
,
10
,
0
,
0
);
// 当窗口大小发生变化时,调整DataGrid的大小
$
(
window
).
resize
(
function
()
{
$
(
'#'
+
datagridId
).
resizeDataGrid
(
0
,
10
,
0
,
0
);
});
});
</script>
</body>
</html>
\ No newline at end of file
SooonerHotel/App/Tpl/zh-cn/Index/index.html
View file @
f15339b9
...
...
@@ -102,7 +102,7 @@
</script>
<style
type=
"text/css"
>
.fa-cog
,
.fa-institution
,
.fa-handshake-o
,
.fa-tv
,
.fa-film
,
.fa-toggle-on
,
.fa-warning
,
.fa-info
,
.fa-volume-up
,
.fa-sitemap
,
.fa-desktop
,
.fa-suitcase
,
.fa-random
,
.fa-tasks
,
.fa-video-camera
,
.fa-gears
{
vertical-align
:
middle
;
padding-bottom
:
1px
;
margin-right
:
10px
;
font-size
:
16px
;
color
:
#e3e3e3
}
.fa-cog
,
.fa-
sitemap
,
.fa-
institution
,
.fa-handshake-o
,
.fa-tv
,
.fa-film
,
.fa-toggle-on
,
.fa-warning
,
.fa-info
,
.fa-volume-up
,
.fa-sitemap
,
.fa-desktop
,
.fa-suitcase
,
.fa-random
,
.fa-tasks
,
.fa-video-camera
,
.fa-gears
{
vertical-align
:
middle
;
padding-bottom
:
1px
;
margin-right
:
10px
;
font-size
:
16px
;
color
:
#e3e3e3
}
.system
,
.net
,
.dis
,
.equ
,
.bus
,
.dev
,
.monitor
,
.fa-home
{
color
:
#6a6f73
;
margin
:
0
5px
;}
.fa-home
{
font-size
:
17px
;}
.fa-tablet
{
vertical-align
:
middle
;
padding-bottom
:
1px
;
margin-right
:
10px
;
color
:
#adadad
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment