e17c3aa7 by yangjianbin

init

1 parent f410280d
...@@ -117,6 +117,37 @@ ...@@ -117,6 +117,37 @@
117 }, 0); 117 }, 0);
118 return false; 118 return false;
119 } 119 }
120 var targetUrl = 'department/update/' + treeNode.id;
121 var data = {
122 newName:newName
123 }
124 $.ajax({
125 type: 'put',
126 url: apiBaseUrl + targetUrl,
127 cache: false,
128 dataType: 'json',
129 data: JSON.stringify(data),
130 contentType: "application/json; charset=UTF-8",
131 success: function (data) {
132 if (data.msg) {
133 layer.alert(data.msg);
134 } else if (data.code != 0) {
135 layer.alert('操作失败');
136 } else {
137 layer.msg('操作成功');
138 }
139 setTimeout(function () {
140 if(!data.code) {
141 layer_close();
142 }
143 },500);
144 },
145 error: function () {
146 layer.alert("操作失败")
147 }
148 })
149
150
120 return true; 151 return true;
121 } 152 }
122 153
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!