Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
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
hujun
tl_estate
Commits
0e52fb8c
Commit
0e52fb8c
authored
Oct 18, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台新增站点
parent
a8d792a4
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
206 additions
and
0 deletions
+206
-0
Site.php
application/index/controller/Site.php
+8
-0
siteLogList.html
application/index/view/site/siteLogList.html
+79
-0
route.php
application/route.php
+1
-0
site_list.js
public/resource/js/site_list.js
+96
-0
site_list_template_tpl.html
public/resource/template/site_list_template_tpl.html
+22
-0
No files found.
application/index/controller/Site.php
View file @
0e52fb8c
...
@@ -113,4 +113,11 @@ class Site extends Basic
...
@@ -113,4 +113,11 @@ class Site extends Basic
}
}
}
}
public
function
siteLogList
()
{
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'site/siteLogList'
);
}
}
}
}
\ No newline at end of file
application/index/view/site/siteLogList.html
0 → 100644
View file @
0e52fb8c
{layout name="global/frame_tpl" /}
<!--关联js元素-->
<input
type=
"hidden"
class=
"page-load"
id=
"site_list"
/>
<style>
.title-0
{
font-weight
:
bold
;
font-size
:
15px
;
}
</style>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
""
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading breadcrumb"
>
<li><a
href=
"#"
>
站点管理
</a></li>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<li>
<a
href=
"#modal-edit"
data-toggle=
"modal"
class=
"btn btn-default edit_add"
><i
class=
"icon-plus"
></i>
新增站点
</a>
</li>
</ul>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<th
class=
"text-center"
>
站点名称
</th>
<th
class=
"text-center"
>
站点ID
</th>
<th
class=
"text-center"
>
所属城市
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</thead>
<tbody
id=
"site_list_con"
>
</tbody>
</table>
</div>
<!-- /#page-content-wrapper//分页 -->
<div
class=
"text-right pageinfo"
id=
"pagediv"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--编辑-->
<div
class=
"modal fade"
id=
"modal-edit"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
新增站点
</h4>
</div>
<div
class=
"modal-body"
>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary submit_edit"
data-dismiss=
"modal"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
application/route.php
View file @
0e52fb8c
...
@@ -301,6 +301,7 @@ Route::group('index', [
...
@@ -301,6 +301,7 @@ Route::group('index', [
//‘页面的地址’ =》 index/控制器名称/使用的方法
//‘页面的地址’ =》 index/控制器名称/使用的方法
'inviteStatistics'
=>
[
'index/InviteStatistics/inviteStatisticsList'
,
[
'method'
=>
'POST|GET'
]
],
//邀请注册liu
'inviteStatistics'
=>
[
'index/InviteStatistics/inviteStatisticsList'
,
[
'method'
=>
'POST|GET'
]
],
//邀请注册liu
'operationalData'
=>
[
'index/OperationalData/operationalDataList'
,
[
'method'
=>
'POST|GET'
]
],
//运营数据统计liu
'operationalData'
=>
[
'index/OperationalData/operationalDataList'
,
[
'method'
=>
'POST|GET'
]
],
//运营数据统计liu
'siteList'
=>
[
'index/site/siteLogList'
,
[
'method'
=>
'POST|GET'
]
],
//站点列表liu
'lookShopIndex'
=>
[
'index/LookShop/lookShopIndex'
,
[
'method'
=>
'GET'
]
],
//商铺查看日志
'lookShopIndex'
=>
[
'index/LookShop/lookShopIndex'
,
[
'method'
=>
'GET'
]
],
//商铺查看日志
'selectDistrictPerformance'
=>
[
'index/Performance/selectDistrictPerformance'
,
[
'method'
=>
'POST|GET'
]
],
//区域业绩排行 朱伟 2018-07-31
'selectDistrictPerformance'
=>
[
'index/Performance/selectDistrictPerformance'
,
[
'method'
=>
'POST|GET'
]
],
//区域业绩排行 朱伟 2018-07-31
'selectStorePerformance'
=>
[
'index/Performance/selectStorePerformance'
,
[
'method'
=>
'POST|GET'
]
],
//门店业绩排行 朱伟 2018-07-31
'selectStorePerformance'
=>
[
'index/Performance/selectStorePerformance'
,
[
'method'
=>
'POST|GET'
]
],
//门店业绩排行 朱伟 2018-07-31
...
...
public/resource/js/site_list.js
0 → 100644
View file @
0e52fb8c
define
([
'doT'
,
'text!temp/site_list_template_tpl.html'
,
'css!style/home.css'
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
site
=
{
pageNo
:
1
,
pageSize
:
15
,
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
);
site
.
getList
();
site
.
event
();
},
event
:
function
()
{
$
(
document
).
delegate
(
".edit_add"
,
"click"
,
function
()
{
//新增
document
.
getElementById
(
"form-horizontal"
).
reset
();
site
.
Edid_add
();
});
$
(
document
).
delegate
(
".is_show"
,
"click"
,
function
()
{
//点击禁用
if
(
!
confirm
(
'是否继续?'
))
{
return
;
}
site
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
params
=
{
};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
str
=
$
.
trim
(
$
(
this
).
html
());
if
(
str
===
"正常"
)
{
params
.
type
=
1
;
$
(
this
).
html
(
'冻结'
);
}
else
if
(
str
===
"冻结"
){
params
.
type
=
0
;
$
(
this
).
html
(
'正常'
);
}
else
{
params
.
type
=
2
;
}
$
.
ajax
({
//禁用
'type'
:
'POST'
,
'url'
:
'/index/updateRoleStatus'
,
data
:
{
"ids"
:
site
.
id
,
"status"
:
params
.
type
},
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
if
(
data
.
data
)
{
}
}
else
{
alert
(
"禁用失败!"
)
}
}
});
});
},
Submit_edit
:
function
(){
//提交编辑的信息
var
par
=
{}
par
.
id
=
site
.
house_id
;
par
.
title
=
$
(
"input[name = title]"
).
val
();
par
.
name
=
$
(
"input[name = name]"
).
val
();
par
.
sort
=
$
(
"input[name = sort]"
).
val
();
par
.
pid
=
$
(
"#pid"
).
val
();
par
.
is_menu
=
$
(
"input[name =is_menu]:checked"
).
val
();
par
.
search
=
$
(
"input[name='search']"
).
val
();
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/updateAuthRule'
,
data
:
par
,
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
}
else
{
alert
(
data
.
msg
);
}
}
});
},
getList
:
function
(
pageNo
){
site
.
pageNo
=
pageNo
;
var
params
=
{};
$
.
ajax
({
url
:
'/index/getSiteList'
,
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'site_list_tpl'
).
innerHTML
;
var
doTempl
=
doT
.
template
(
temp
);
$
(
"#site_list_con"
).
html
(
doTempl
(
data
.
data
.
list
));
/*分页代码*/
}
})
}
}
return
site
;
});
\ No newline at end of file
public/resource/template/site_list_template_tpl.html
0 → 100644
View file @
0e52fb8c
<script
id=
"site_list_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
td
>
[
%=
it
[
item
][
"name"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"id"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"city"
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"status"
]
==
0
)
{
%
]
<
a
class
=
"btn1 btn-info is_show"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
开启
<
/a
>
[
%
}
else
{
%
]
<
a
class
=
"btn1 btn-default"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
关闭
<
/a
>
[
%
}
%
]
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"8"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
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