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
7b5d64f5
Commit
7b5d64f5
authored
Aug 20, 2019
by
吴贤德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并
parent
71799c83
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
831 deletions
+0
-831
PlayCtrlLogAction.class.php
...Hotel/App/Lib/Action/Playctrl/PlayCtrlLogAction.class.php
+0
-136
index.html
SooonerHotel/App/Tpl/Playctrl/zh-cn/PlayCtrl/index.html
+0
-227
lists.html
SooonerHotel/App/Tpl/Playctrl/zh-cn/PlayCtrl/lists.html
+0
-234
index.html
SooonerHotel/App/Tpl/Playctrl/zh-cn/PlayCtrlLog/index.html
+0
-234
No files found.
SooonerHotel/App/Lib/Action/Playctrl/PlayCtrlLogAction.class.php
deleted
100644 → 0
View file @
71799c83
<?php
class
PlayCtrlLogAction
extends
CommonAction
{
//管理
public
function
index
(){
$op
=
I
(
'op'
);
$userInfo
=
$_SESSION
[
"_USER_INFO"
];
if
(
$op
==
"getjson"
){
$model
=
D
(
"PlayCtrlLog"
);
$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
{
$hotelModel
=
D
(
"Hotel"
);
$spModel
=
D
(
"Sp"
);
if
(
$userInfo
[
'sp_ids'
]
&&
$userInfo
[
'grade'
]
>=
3
){
$sp_lists
=
$spModel
->
where
(
"`status`=0 and id in("
.
$userInfo
[
'sp_ids'
]
.
")"
)
->
select
();
$hotel_lists
=
$hotelModel
->
where
(
"`status`=0 and sp_id in("
.
$userInfo
[
'sp_ids'
]
.
")"
)
->
select
();
}
else
{
$sp_lists
=
$spModel
->
where
(
"`status`=0"
)
->
select
();
$hotel_lists
=
$hotelModel
->
where
(
"`status`=0"
)
->
select
();
}
$this
->
hotel_lists
=
$hotel_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
(
"PlayCtrlLog"
);
$spModel
=
D
(
"Sp"
);
$mediaModel
=
D
(
"Media"
);
$hotelModel
=
D
(
"Hotel"
);
$spPlaylistModel
=
D
(
"SpPlaylist"
);
if
(
$id
){
$info
=
$model
->
where
(
"id =
$id
"
)
->
find
();
$this
->
info
=
$info
;
}
$hotel_lists
=
$hotelModel
->
field
(
"id,`name`,sp_id"
)
->
where
(
"`status`=0"
)
->
select
();
$sp_lists
=
$spModel
->
field
(
"id,`name`"
)
->
select
();
$media_lists
=
$mediaModel
->
field
(
"id,title"
)
->
select
();
$play_lists
=
$spPlaylistModel
->
join
(
" A join sh_sp_playlist_media_map B on A.id = B.playlist_id "
)
->
field
(
"A.id,A.`name`,A.sp_id,group_concat(B.media_id) media_ids"
)
->
group
(
"A.id"
)
->
select
();
$this
->
hotel_lists
=
$hotel_lists
;
$this
->
sp_lists
=
$sp_lists
;
$this
->
media_lists_json
=
json_encode
(
$media_lists
);
$this
->
hotel_lists_json
=
json_encode
(
$hotel_lists
);
$this
->
play_lists
=
$play_lists
;
$this
->
display
();
}
//添加处理
public
function
addHandle
(){
//sh_hotel_media_map_1、sh_task_inject、sh_task_inject_log
$model
=
D
(
"PlayCtrlLog"
);
$logModel
=
D
(
"PlayCtrlLog"
);
$id
=
I
(
'id'
,
''
,
int
);
$hotel_lists
=
I
(
"post.hotel_lists"
);
$media_lists
=
I
(
"post.media_lists"
);
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
{
$taskData
[
'name'
]
=
I
(
"name"
);
$taskData
[
'addtime'
]
=
date
(
'Y-m-d H:i:s'
);
$taskData
[
'remark'
]
=
I
(
"remark"
);
$task_id
=
$model
->
add
(
$taskData
);
if
(
$task_id
){
foreach
(
$hotel_lists
as
$key
=>
$value
){
list
(
$hotel_id
,
$sp_id
)
=
explode
(
"-"
,
$value
);
$logDataLists
=
array
();
foreach
(
$media_lists
as
$k
=>
$v
){
$logData
=
array
();
$logData
[
'task_id'
]
=
$task_id
;
$logData
[
'media_id'
]
=
$v
;
$logData
[
'hotel_id'
]
=
$hotel_id
;
$logData
[
'sp_id'
]
=
$sp_id
;
if
(
$logData
){
$logDataLists
[]
=
$logData
;
}
}
if
(
$logDataLists
){
$log_r
=
$logModel
->
addAll
(
$logDataLists
);
}
}
}
if
(
$task_id
){
echo
'true'
;
}
else
{
echo
'false'
;
}
}
}
//删除处理
public
function
deleteHandle
(){
if
(
D
(
"PlayCtrlLog"
)
->
where
(
"id="
.
I
(
"id"
,
""
,
int
))
->
delete
()){
echo
'true'
;
}
else
{
echo
'false'
;
}
}
//ajax修改状态
public
function
updateStatusAjaxHandle
(){
$model
=
D
(
"PlayCtrlLog"
);
$data
=
$_POST
;
$data
[
'updatetime'
]
=
date
(
'Y-m-d H:i:s'
);
if
(
$model
->
save
(
$data
)){
echo
'true'
;
}
else
{
echo
'false'
;
}
}
}
SooonerHotel/App/Tpl/Playctrl/zh-cn/PlayCtrl/index.html
deleted
100644 → 0
View file @
71799c83
<!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
href=
"__PUBLIC__/css/style_frame.css"
rel=
"stylesheet"
type=
"text/css"
/>
<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"
rel=
"stylesheet"
type=
"text/css"
/>
</head>
<body>
<!--搜索和按钮 开始 -->
<div
class=
"searchPlayCtrl 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"
/>
</form>
</div>
<!--hyperchanne end-->
<div
class=
""
>
<ul
class=
"operationBox"
>
<li
class=
"add"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrl
','
add
')}
>
<a
href=
"javascript:;"
onclick=
"add()"
class=
"on"
><span></span>
新增
</a>
</li>
</ul>
</div>
<!--mainBox end-->
</div>
</div>
</div>
<!--搜索和按钮 结束-->
<table
id=
"dg"
title=
""
data-options=
"
iconCls: 'icon-edit',
singleSelect: true,
url: '/PlayCtrl/PlayCtrl/index/',
method: 'post',
pagination: true,
pageList:[15,30,45,60],
rownumbers: true,
sortName:'id',
sortOrder:'asc',
queryParams: form2Json('searchform'),
fitColumns: true,
height:'auto',
onRowContextMenu : onRowContextMenu
"
>
<thead>
<tr>
<th
data-options=
"field:'name',width:100"
sortable=
"true"
>
播控名称
</th>
<th
data-options=
"field:'addtime',width:30"
sortable=
"true"
>
创建时间
</th>
<th
data-options=
"field:'updatetime',width:30"
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-list"
id=
"menuEdit"
onclick=
"lists()"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrl
','
lists
')}
>
播控列表
</div>
<div
iconCls=
"icon-cancel"
id=
"menuDel"
onclick=
"del()"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrl
','
deletehandle
')}
>
删除
</div>
<!-- <div class="menu-sep"></div>
<div iconCls="icon-edit" id="menuEdit" onclick="edit()" {:buttonAuth('PlayCtrl','PlayCtrl','add')}>列表</div>-->
<!-- <div class="menu-sep"></div>
<div iconCls="icon-start" id="menuStop" onclick="enable(1)" {:buttonAuth('PlayCtrl','PlayCtrl','updateStatusAjaxHandle')}>上线</div>
<div iconCls="icon-stop" id="menuStart" onclick="enable(2)" {:buttonAuth('PlayCtrl','PlayCtrl','updateStatusAjaxHandle')}>下线</div>-->
</div>
<div
id=
"mm2"
class=
"easyui-menu"
style=
"width:120px;display: none"
>
<div
iconCls=
"icon-list"
id=
"menuEdit"
onclick=
"lists()"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrl
','
lists
')}
>
播控列表
</div>
<div
iconCls=
"icon-cancel"
id=
"menuDel"
onclick=
"del()"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrl
','
deletehandle
')}
>
删除
</div>
<!-- <div class="menu-sep"></div>
<div iconCls="icon-edit" id="menuEdit" onclick="edit()" {:buttonAuth('PlayCtrl','PlayCtrl','add')}>列表</div>-->
<!-- <div class="menu-sep"></div>
<div iconCls="icon-start" id="menuStop" onclick="enable(1)" {:buttonAuth('PlayCtrl','PlayCtrl','updateStatusAjaxHandle')}>上线</div>
<div iconCls="icon-stop" id="menuStart" onclick="enable(2)" {:buttonAuth('PlayCtrl','PlayCtrl','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
TypeAction
(
value
,
row
,
index
){
if
(
value
==
0
){
return
'主(Master)'
;
}
else
{
return
'从(Slave)'
;
}
}
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
==
2
)
msg
=
'下线'
$
.
messager
.
confirm
(
'操作确认'
,
'确认['
+
msg
+
']该记录?'
,
function
(
r
){
if
(
r
){
$
.
post
(
"/PlayCtrl/PlayCtrl/updateStatusAjaxHandle/"
,
{
id
:
row
.
id
,
status
:
status
},
function
(
data
){
$
(
'#dg'
).
datagrid
(
'reload'
);
});
}
});
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
add
(){
pop
(
'80%'
,
700
,
true
,
'dg'
,
'datagrid'
,
'/PlayCtrl/PlayCtrl/add/'
)
}
function
lists
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
pop
(
'80%'
,
550
,
true
,
'dg'
,
'datagrid'
,
'/PlayCtrl/PlayCtrl/lists/id/'
+
row
.
id
)
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
edit
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
pop
(
'80%'
,
700
,
true
,
'dg'
,
'datagrid'
,
'/PlayCtrl/PlayCtrl/add/id/'
+
row
.
id
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
del
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
$
.
messager
.
confirm
(
'操作确认'
,
'确认[删除]该记录?'
,
function
(
r
){
if
(
r
){
$
.
post
(
"/PlayCtrl/PlayCtrl/deleteHandle/"
,
{
id
:
row
.
id
},
function
(
data
){
$
(
'#dg'
).
datagrid
(
'reload'
);
});
}
});
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
$
(
"#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/Playctrl/zh-cn/PlayCtrl/lists.html
deleted
100644 → 0
View file @
71799c83
<!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
href=
"__PUBLIC__/css/style_frame.css"
rel=
"stylesheet"
type=
"text/css"
/>
<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"
rel=
"stylesheet"
type=
"text/css"
/>
</head>
<body
style=
"padding:20px"
>
<!--搜索和按钮 开始 -->
<div
class=
"searchPlayCtrl 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"
>
<select
class=
"select"
name=
"searchSp"
>
<option
value=
"0"
>
合作方
</option>
<volist
name=
"sp_lists"
id=
"item"
>
<option
value=
"{$item.id}"
>
{$item.name}
</option>
</volist>
</select>
<select
class=
"select"
name=
"searchHotel"
>
<option
value=
"0"
>
酒店
</option>
<volist
name=
"hotel_lists"
id=
"item"
>
<option
value=
"{$item.id}"
>
{$item.name}
</option>
</volist>
</select>
<input
class=
"input"
type=
"hidden"
value=
"{$id}"
name=
"searchTaskID"
>
</div>
<input
id=
"submit_search"
name=
""
type=
"button"
value=
"查询"
class=
"btn_go_s btn_orange"
/>
</form>
</div>
<!--hyperchanne end-->
<div
class=
""
>
<!-- <ul class="operationBox">
<li class="add">
<a href="javascript:;" onclick="add()" class="on"><span></span>新增</a>
</li>
</ul>-->
</div>
<!--mainBox end-->
</div>
</div>
</div>
<!--搜索和按钮 结束-->
<table
id=
"dg"
title=
""
data-options=
"
iconCls: 'icon-edit',
singleSelect: true,
url: '/PlayCtrl/PlayCtrl/lists/',
method: 'post',
pagination: true,
pageList:[15,30,45,60],
rownumbers: true,
sortName:'id',
sortOrder:'asc',
queryParams: form2Json('searchform'),
fitColumns: true,
height:'auto',
onRowContextMenu : onRowContextMenu
"
>
<thead>
<tr>
<th
data-options=
"field:'task_name',width:50"
sortable=
"true"
>
播控名称
</th>
<th
data-options=
"field:'media_name',width:100"
sortable=
"true"
>
媒资名称
</th>
<th
data-options=
"field:'hotel_name',width:50"
sortable=
"true"
>
酒店名称
</th>
<th
data-options=
"field:'sp_name',width:30"
sortable=
"true"
>
合作方名称
</th>
<th
data-options=
"field:'addtime',width:30"
sortable=
"true"
>
创建时间
</th>
<th
data-options=
"field:'updatetime',width:30"
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
('
PlayCtrl
','
PlayCtrlLog
','
add
')}
>
编辑
</div>
<div
iconCls=
"icon-cancel"
id=
"menuDel"
onclick=
"del()"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrlLog
','
deletehandle
')}
>
删除
</div>
<div
class=
"menu-sep"
></div>
<div
iconCls=
"icon-edit"
id=
"menuEdit"
onclick=
"edit()"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrlLog
','
add
')}
>
列表
</div>
<!-- <div class="menu-sep"></div>
<div iconCls="icon-stop" id="menuStop" onclick="enable(1)" {:buttonAuth('PlayCtrl','PlayCtrlLog','updateStatusAjaxHandle')}>禁用</div>
<div iconCls="icon-start" id="menuStart" onclick="enable(0)" {:buttonAuth('PlayCtrl','PlayCtrlLog','updateStatusAjaxHandle')}>启用</div>-->
</div>
<div
id=
"mm2"
class=
"easyui-menu"
style=
"width:120px;display: none"
>
<div
iconCls=
"icon-edit"
id=
"menuEdit"
onclick=
"edit()"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrlLog
','
add
')}
>
编辑
</div>
<div
iconCls=
"icon-cancel"
id=
"menuDel"
onclick=
"del()"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrlLog
','
deletehandle
')}
>
删除
</div>
<div
class=
"menu-sep"
></div>
<div
iconCls=
"icon-edit"
id=
"menuEdit"
onclick=
"edit()"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrlLog
','
add
')}
>
列表
</div>
<!-- <div class="menu-sep"></div>
<div iconCls="icon-stop" id="menuStop" onclick="enable(1)" {:buttonAuth('PlayCtrl','PlayCtrlLog','updateStatusAjaxHandle')}>禁用</div>
<div iconCls="icon-start" id="menuStart" onclick="enable(0)" {:buttonAuth('PlayCtrl','PlayCtrlLog','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
TypeAction
(
value
,
row
,
index
){
if
(
value
==
0
){
return
'主(Master)'
;
}
else
{
return
'从(Slave)'
;
}
}
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
(
"/PlayCtrl/PlayCtrlLog/updateStatusAjaxHandle/"
,
{
id
:
row
.
id
,
status
:
status
},
function
(
data
){
$
(
'#dg'
).
datagrid
(
'reload'
);
});
}
});
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
add
(){
pop
(
'80%'
,
700
,
true
,
'dg'
,
'datagrid'
,
'/PlayCtrl/PlayCtrlLog/add/'
)
}
function
edit
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
pop
(
'80%'
,
700
,
true
,
'dg'
,
'datagrid'
,
'/PlayCtrl/PlayCtrlLog/add/id/'
+
row
.
id
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
del
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
$
.
messager
.
confirm
(
'操作确认'
,
'确认[删除]该记录?'
,
function
(
r
){
if
(
r
){
$
.
post
(
"/PlayCtrl/PlayCtrlLog/deleteHandle/"
,
{
id
:
row
.
id
},
function
(
data
){
$
(
'#dg'
).
datagrid
(
'reload'
);
});
}
});
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
$
(
"#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/Playctrl/zh-cn/PlayCtrlLog/index.html
deleted
100644 → 0
View file @
71799c83
<!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
href=
"__PUBLIC__/css/style_frame.css"
rel=
"stylesheet"
type=
"text/css"
/>
<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"
rel=
"stylesheet"
type=
"text/css"
/>
</head>
<body>
<!--搜索和按钮 开始 -->
<div
class=
"searchPlayCtrl 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"
>
<select
class=
"select"
name=
"searchSp"
>
<option
value=
"0"
>
合作方
</option>
<volist
name=
"sp_lists"
id=
"item"
>
<option
value=
"{$item.id}"
>
{$item.name}
</option>
</volist>
</select>
<select
class=
"select"
name=
"searchHotel"
>
<option
value=
"0"
>
酒店
</option>
<volist
name=
"hotel_lists"
id=
"item"
>
<option
value=
"{$item.id}"
>
{$item.name}
</option>
</volist>
</select>
<input
class=
"input"
type=
"text"
placeholder=
"播控名称"
name=
"searchValue"
>
</div>
<input
id=
"submit_search"
name=
""
type=
"button"
value=
"查询"
class=
"btn_go_s btn_orange"
/>
</form>
</div>
<!--hyperchanne end-->
<div
class=
""
>
<!-- <ul class="operationBox">
<li class="add">
<a href="javascript:;" onclick="add()" class="on"><span></span>新增</a>
</li>
</ul>-->
</div>
<!--mainBox end-->
</div>
</div>
</div>
<!--搜索和按钮 结束-->
<table
id=
"dg"
title=
""
data-options=
"
iconCls: 'icon-edit',
singleSelect: true,
url: '/PlayCtrl/PlayCtrlLog/index/',
method: 'post',
pagination: true,
pageList:[15,30,45,60],
rownumbers: true,
sortName:'id',
sortOrder:'asc',
queryParams: form2Json('searchform'),
fitColumns: true,
height:'auto',
onRowContextMenu : onRowContextMenu
"
>
<thead>
<tr>
<th
data-options=
"field:'task_name',width:50"
sortable=
"true"
>
播控名称
</th>
<th
data-options=
"field:'media_name',width:100"
sortable=
"true"
>
媒资名称
</th>
<th
data-options=
"field:'hotel_name',width:50"
sortable=
"true"
>
酒店名称
</th>
<th
data-options=
"field:'sp_name',width:30"
sortable=
"true"
>
合作方名称
</th>
<th
data-options=
"field:'addtime',width:30"
sortable=
"true"
>
创建时间
</th>
<th
data-options=
"field:'updatetime',width:30"
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
('
PlayCtrl
','
PlayCtrlLog
','
add
')}
>
编辑
</div>
<div
iconCls=
"icon-cancel"
id=
"menuDel"
onclick=
"del()"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrlLog
','
deletehandle
')}
>
删除
</div>
<div
class=
"menu-sep"
></div>
<div
iconCls=
"icon-edit"
id=
"menuEdit"
onclick=
"edit()"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrlLog
','
add
')}
>
列表
</div>
<!-- <div class="menu-sep"></div>
<div iconCls="icon-stop" id="menuStop" onclick="enable(1)" {:buttonAuth('PlayCtrl','PlayCtrlLog','updateStatusAjaxHandle')}>禁用</div>
<div iconCls="icon-start" id="menuStart" onclick="enable(0)" {:buttonAuth('PlayCtrl','PlayCtrlLog','updateStatusAjaxHandle')}>启用</div>-->
</div>
<div
id=
"mm2"
class=
"easyui-menu"
style=
"width:120px;display: none"
>
<div
iconCls=
"icon-edit"
id=
"menuEdit"
onclick=
"edit()"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrlLog
','
add
')}
>
编辑
</div>
<div
iconCls=
"icon-cancel"
id=
"menuDel"
onclick=
"del()"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrlLog
','
deletehandle
')}
>
删除
</div>
<div
class=
"menu-sep"
></div>
<div
iconCls=
"icon-edit"
id=
"menuEdit"
onclick=
"edit()"
{
:buttonAuth
('
PlayCtrl
','
PlayCtrlLog
','
add
')}
>
列表
</div>
<!-- <div class="menu-sep"></div>
<div iconCls="icon-stop" id="menuStop" onclick="enable(1)" {:buttonAuth('PlayCtrl','PlayCtrlLog','updateStatusAjaxHandle')}>禁用</div>
<div iconCls="icon-start" id="menuStart" onclick="enable(0)" {:buttonAuth('PlayCtrl','PlayCtrlLog','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
TypeAction
(
value
,
row
,
index
){
if
(
value
==
0
){
return
'主(Master)'
;
}
else
{
return
'从(Slave)'
;
}
}
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
(
"/PlayCtrl/PlayCtrlLog/updateStatusAjaxHandle/"
,
{
id
:
row
.
id
,
status
:
status
},
function
(
data
){
$
(
'#dg'
).
datagrid
(
'reload'
);
});
}
});
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
add
(){
pop
(
'80%'
,
700
,
true
,
'dg'
,
'datagrid'
,
'/PlayCtrl/PlayCtrlLog/add/'
)
}
function
edit
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
pop
(
'80%'
,
700
,
true
,
'dg'
,
'datagrid'
,
'/PlayCtrl/PlayCtrlLog/add/id/'
+
row
.
id
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
del
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
$
.
messager
.
confirm
(
'操作确认'
,
'确认[删除]该记录?'
,
function
(
r
){
if
(
r
){
$
.
post
(
"/PlayCtrl/PlayCtrlLog/deleteHandle/"
,
{
id
:
row
.
id
},
function
(
data
){
$
(
'#dg'
).
datagrid
(
'reload'
);
});
}
});
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
$
(
"#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
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