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
f24867f5
Commit
f24867f5
authored
Oct 19, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台 站点管理 修改
parent
465c28b0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
31 deletions
+54
-31
siteLogList.html
application/index/view/site/siteLogList.html
+19
-2
site_list.js
public/resource/js/site_list.js
+33
-27
site_list_template_tpl.html
public/resource/template/site_list_template_tpl.html
+2
-2
No files found.
application/index/view/site/siteLogList.html
View file @
f24867f5
...
...
@@ -64,12 +64,29 @@
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
id=
'form_reset'
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
所属城市:
</label>
<select
name=
"district_id"
class=
"form-control btn6"
>
<option
value=
""
>
选择城市
</option>
<option
value=
"上海市"
>
上海市
</option>
<option
value=
"杭州市"
>
杭州市
</option>
<option
value=
"深圳市"
>
深圳市
</option>
<option
value=
"南京市"
>
南京市
</option>
<option
value=
"苏州市"
>
苏州市
</option>
<option
value=
"北京市"
>
北京市
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
站点名称:
</label>
<input
type=
"text"
value=
""
name=
"title"
class=
"form-control btn6"
placeholder=
"请输入"
>
</div>
</form>
</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
type=
"button"
class=
"btn btn-primary submit_
add
"
>
提交
</button>
</div>
...
...
public/resource/js/site_list.js
View file @
f24867f5
...
...
@@ -9,33 +9,35 @@ site={
site
.
event
();
},
event
:
function
()
{
$
(
document
).
delegate
(
".edit_add"
,
"click"
,
function
()
{
//新增
document
.
getElementById
(
"form-horizontal"
).
reset
();
site
.
Edid_add
();
$
(
document
).
delegate
(
".edit_add"
,
"click"
,
function
()
{
//点击新增
document
.
getElementById
(
"form_reset"
).
reset
();
});
$
(
document
).
delegate
(
".submit_add"
,
"click"
,
function
()
{
//新增 保存
site
.
siteAdd
();
});
$
(
document
).
delegate
(
".is_show"
,
"click"
,
function
()
{
//点击禁用
if
(
!
confirm
(
'是否继续?'
))
{
return
;
}
site
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
params
=
{
};
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
(
'正常'
);
if
(
str
===
"开启"
)
{
params
.
is_del
=
1
;
$
(
this
).
html
(
'关闭'
);
$
(
this
).
attr
(
'class'
,
'btn1 btn-default is_show'
);
}
else
if
(
str
===
"关闭"
){
params
.
is_del
=
0
;
$
(
this
).
html
(
'开启'
);
$
(
this
).
attr
(
'class'
,
'btn1 btn-info is_show'
);
}
else
{
params
.
type
=
2
;
params
.
is_del
=
2
;
}
$
.
ajax
({
//禁用
'type'
:
'POST'
,
'url'
:
'/index/
updateRoleStatus
'
,
data
:
{
"ids"
:
site
.
id
,
"status"
:
params
.
type
}
,
'url'
:
'/index/
delImageDepot
'
,
data
:
params
,
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
...
...
@@ -49,30 +51,34 @@ site={
});
},
Submit_edit
:
function
(){
//提交编辑的信息
siteAdd
:
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
();
par
.
city
=
$
(
"select[name = district_id]"
).
val
();
par
.
name
=
$
(
"input[name = title]"
).
val
();
if
(
par
.
city
==
''
){
alert
(
'请选择城市'
);
return
;
}
if
(
par
.
name
==
''
){
alert
(
'请填写站点名称'
);
return
;
}
$
.
ajax
({
'type'
:
'
POS
T'
,
'url'
:
'/index/
updateAuthRul
e'
,
'type'
:
'
GE
T'
,
'url'
:
'/index/
addSit
e'
,
data
:
par
,
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
$
(
"#modal-edit"
).
modal
(
'hide'
);
site
.
getList
(
1
);
}
else
{
alert
(
data
.
msg
);
}
}
});
},
getList
:
function
(
pageNo
){
getList
:
function
(
pageNo
){
//获取站点列表
site
.
pageNo
=
pageNo
;
var
params
=
{};
$
.
ajax
({
...
...
public/resource/template/site_list_template_tpl.html
View file @
f24867f5
...
...
@@ -6,10 +6,10 @@
<
td
>
[
%=
it
[
item
][
"id"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"city"
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"
status
"
]
==
0
)
{
%
]
[
%
if
(
it
[
item
][
"
is_del
"
]
==
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
>
<
a
class
=
"btn1 btn-default
is_show
"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
关闭
<
/a
>
[
%
}
%
]
<
/td
>
<
/tr
>
...
...
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