Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨建斌
/
page
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
3d54a3f0
authored
2018-03-30 00:25:45 +0800
by
wang
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
init
1 parent
e84adfae
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
application/views/perm/branch.php
application/views/perm/branch.php
View file @
3d54a3f
...
...
@@ -162,6 +162,38 @@
if
(
btn
)
btn
.
bind
(
"click"
,
function
(){
var
zTree
=
$
.
fn
.
zTree
.
getZTreeObj
(
"tree"
);
zTree
.
addNodes
(
treeNode
,
{
id
:(
100
+
newCount
),
pId
:
treeNode
.
id
,
name
:
"new node"
+
(
newCount
++
)});
var
data
=
{
name
:
'new node'
,
parentId
:
treeNode
.
id
}
var
targetUrl1
=
'department/add'
;
$
.
ajax
({
type
:
'put'
,
url
:
apiBaseUrl
+
targetUrl1
,
cache
:
false
,
dataType
:
'json'
,
data
:
JSON
.
stringify
(
data
),
contentType
:
"application/json; charset=UTF-8"
,
success
:
function
(
data
)
{
if
(
data
.
msg
)
{
layer
.
alert
(
data
.
msg
);
}
else
if
(
data
.
code
!=
0
)
{
layer
.
alert
(
'操作失败'
);
}
else
{
layer
.
msg
(
'操作成功'
);
}
setTimeout
(
function
()
{
if
(
!
data
.
code
)
{
layer_close
();
}
},
500
);
},
error
:
function
()
{
layer
.
alert
(
"操作失败"
)
}
})
return
false
;
});
};
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment