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
a6dcf4a7
Commit
a6dcf4a7
authored
Nov 26, 2019
by
wangjiangze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
播控管理优化大批量数据操作性能问题和操作界面友好优化
parent
37400604
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
17 deletions
+22
-17
PlayCtrlAction.class.php
...nerHotel/App/Lib/Action/Playctrl/PlayCtrlAction.class.php
+7
-17
add.html
SooonerHotel/App/Tpl/Playctrl/zh-cn/PlayCtrl/add.html
+15
-0
No files found.
SooonerHotel/App/Lib/Action/Playctrl/PlayCtrlAction.class.php
View file @
a6dcf4a7
...
...
@@ -109,7 +109,8 @@ class PlayCtrlAction extends CommonAction{
$id
=
I
(
'id'
,
''
,
int
);
$hotel_lists
=
I
(
"post.hotel_lists"
);
$media_lists
=
I
(
"post.media_lists"
);
// $media_lists = I("post.media_lists");
$media_lists
=
$_POST
[
"media_lists"
];
if
(
$id
){
$data
[
'id'
]
=
$id
;
...
...
@@ -129,35 +130,25 @@ class PlayCtrlAction extends CommonAction{
$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
();
$mapData
=
array
();
$tmp
=
explode
(
"_"
,
$v
);
$media_id
=
$tmp
[
0
];
$media_code
=
$tmp
[
1
];
list
(
$media_id
,
$media_code
)
=
explode
(
"_"
,
$v
);
$mapData
[
'media_id'
]
=
$media_id
;
$mapData
[
'media_code'
]
=
"
$media_code
"
;
;
$mapData
[
'media_code'
]
=
$media_code
;
$mapData
[
'hotel_id'
]
=
$hotel_id
;
$mapData
[
'status'
]
=
I
(
"status"
,
1
,
int
)
;
$mapData
[
'status'
]
=
$taskData
[
'status'
]
;
$isExists
=
M
(
"Map_
$sp_id
"
,
"sh_hotel_media_"
)
->
field
(
"id"
)
->
where
(
"media_id =
$media_id
and hotel_id=
$hotel_id
"
)
->
find
();
if
(
$isExists
){
$mapData
[
'id'
]
=
$isExists
[
'id'
];
M
(
"Map_
$sp_id
"
,
"sh_hotel_media_"
)
->
save
(
$mapData
);
}
else
{
M
(
"Map_
$sp_id
"
,
"sh_hotel_media_"
)
->
add
(
$mapData
);
}
M
(
"Map_
$sp_id
"
,
"sh_hotel_media_"
)
->
add
(
$mapData
,
array
(
"media_id"
=>
$media_id
,
"hotel_id"
=>
$hotel_id
),
true
);
$logData
[
'task_id'
]
=
$task_id
;
$logData
[
'media_id'
]
=
$media_id
;
$logData
[
'hotel_id'
]
=
$hotel_id
;
$logData
[
'sp_id'
]
=
$sp_id
;
$logData
[
'status'
]
=
I
(
"status"
,
1
,
int
)
;
$logData
[
'status'
]
=
$taskData
[
'status'
]
;
if
(
$logData
){
$logDataLists
[]
=
$logData
;
...
...
@@ -167,7 +158,6 @@ class PlayCtrlAction extends CommonAction{
$log_r
=
$logModel
->
addAll
(
$logDataLists
);
}
}
}
if
(
$task_id
){
...
...
SooonerHotel/App/Tpl/Playctrl/zh-cn/PlayCtrl/add.html
View file @
a6dcf4a7
...
...
@@ -152,6 +152,19 @@ body{padding:20px}
<input
name=
""
type=
"reset"
class=
"btn btn-warning"
value=
"取消"
onclick=
"parentDialog.close();"
/>
</div>
</form>
<!-- loading -->
<div
class=
"modal fade"
id=
"loading"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
data-backdrop=
'static'
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h4
class=
"modal-title"
id=
"myModalLabel"
>
系统提示
</h4>
</div>
<div
class=
"modal-body"
>
正在处理数据,请稍等......
<span
id=
"result"
></span>
</div>
</div>
</div>
</div>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
(
$
)
{
$
(
'#multiselect'
).
multiselect
({
...
...
@@ -182,6 +195,7 @@ function submitForm(){
$
(
"select[name='hotel_lists[]'] option"
).
prop
(
"selected"
,
true
);
$
(
"select[name='media_lists[]'] option"
).
prop
(
"selected"
,
true
);
$
(
'#loading'
).
modal
(
'show'
);
$
(
'#ff'
).
form
(
'submit'
,
{
url
:
'/PlayCtrl/PlayCtrl/addHandle/'
,
onSubmit
:
function
(){
...
...
@@ -191,6 +205,7 @@ function submitForm(){
return
isValid
;
},
success
:
function
(
data
){
$
(
'#loading'
).
modal
(
'hide'
);
if
(
data
==
'true'
){
// $.messager.confirm('友情提示', '操作成功! 是否关闭窗口?', function(r){
// if (r){
...
...
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