layui_crud.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. var ActiveCurdObject = null;
  2. var CurdObj = function() {
  3. this.list_table_id = "";
  4. //单行数据信息
  5. this.Row = null;
  6. //添加从表数据时,设置主表数据。此数据可能会在从表添加界面上被使用到
  7. this.MasterData = null;
  8. this.opt = {
  9. //模块名称/文件夹名称
  10. "module_name": "",
  11. "columns": [],
  12. //新增编辑窗口默认大小
  13. "window_size": ['600px', '350px'],
  14. "window_title": ['新增/编辑窗口标题', '详情窗口标题'],
  15. "targetEle": {},
  16. //名称列名
  17. "nameColKey": "name",
  18. "idColKey": "",
  19. "height": "",
  20. //默认的数据table ID
  21. "table_datalist_control": "table_datalist_control",
  22. //默认的数据table工具栏ID
  23. "table_tools_bar": "table_tools_bar",
  24. //默认的数据table查询条件元素ID
  25. "table_search_panel": "table_search_panel",
  26. //默认的数据table操作模板ID
  27. "table_row_operator": "table_row_operator",
  28. "apiUrl": {
  29. "save_url": "",
  30. "read_url": "",
  31. "delete_url": "",
  32. "list_url": ""
  33. }
  34. };
  35. this.Init = function(opt) {
  36. var thisObj = this;
  37. $.extend(this.opt, opt);
  38. this.list_table_id = this.opt.list_table_id || "t_" + new Date().getTime();
  39. if (this.opt.module_name == "") {
  40. layer.msg("未正确配置模块名称参数:module_name");
  41. return;
  42. }
  43. if ($("#" + this.opt.module_name).length != 1) {
  44. layer.msg("未正确设置模块" + this.opt.module_name + "对应的主控件!");
  45. return;
  46. }
  47. this.opt.targetEle.list_data = "#" + this.opt.module_name + " #" + this.opt.table_datalist_control;
  48. if ($(this.opt.targetEle.list_data).length != 1) {
  49. layer.msg("未正确设置数据列表显示控件!");
  50. return;
  51. }
  52. this.opt.targetEle.list_toolbar = "#" + this.opt.module_name + " #" + this.opt.table_tools_bar;
  53. var toolbar = $(this.opt.targetEle.list_toolbar);
  54. if (toolbar.length != 1) {
  55. this.opt.targetEle.list_toolbar = "";
  56. }
  57. this.opt.targetEle.list_action = "#" + this.opt.module_name + " #" + this.opt.table_row_operator;
  58. if ($(this.opt.targetEle.list_action).length != 1) {
  59. this.opt.targetEle.list_action = "";
  60. }
  61. this.opt.targetEle.list_search = "#" + this.opt.module_name + " #" + this.opt.table_search_panel;
  62. if ($(this.opt.targetEle.list_search).length != 1) {
  63. this.opt.targetEle.list_search = "";
  64. }
  65. //绑定操作事件
  66. layui.table.on('toolbar(' + $(this.opt.targetEle.list_data).attr('lay-filter') + ')', function(obj) {
  67. var data = obj.data;
  68. var layEvent = obj.event;
  69. if (layEvent == "add") {
  70. thisObj.New(thisObj.opt.window_title.length > 0 ? thisObj.opt.window_title[0] : "");
  71. }
  72. });
  73. layui.table.on('tool(' + $(this.opt.targetEle.list_data).attr('lay-filter') + ')', function(obj) {
  74. var data = obj.data;
  75. var layEvent = obj.event;
  76. var Id = thisObj.opt.idColKey == "" ? (data["id"] || data["ID"] || data["Id"] || data["iD"]) : data[thisObj.opt.idColKey];
  77. if (layEvent === 'delete') {
  78. layer.confirm('<div style="text-align:center;">是否删除<span style="color:red;font-weight:700;padding:0 2px;">' + data[thisObj.opt.nameColKey] + "</span>的数据记录?</div>", function(index) {
  79. obj.del();
  80. thisObj.Delete(Id);
  81. });
  82. } else if (layEvent === 'edit') {
  83. thisObj.Edit(thisObj.opt.window_title.length > 0 ? thisObj.opt.window_title[0] : "", Id);
  84. } else if (layEvent === "detail") {
  85. thisObj.Detail(thisObj.opt.window_title.length > 1 ? thisObj.opt.window_title[1] : "", Id);
  86. } else {
  87. //判断是否定义了对应的处理事件
  88. if (layEvent != "") {
  89. eval(layEvent + "(data)");
  90. }
  91. }
  92. });
  93. };
  94. this.New = function(title, pageurl, callback) {
  95. ActiveCurdObject = this;
  96. this.Row = null;
  97. if (pageurl == null || pageurl == "")
  98. pageurl = '/static/module/' + this.opt.module_name + '/add.html';
  99. var curdObj = this;
  100. layui.use(['layer', 'form'], function() {
  101. layui.layer.open({
  102. "type": 2,
  103. "resize": false,
  104. "scrollbar": false,
  105. "title": title == null ? "新增" : "新增" + title,
  106. "area": curdObj.opt.window_size,
  107. "content": pageurl
  108. });
  109. if (callback) callback();
  110. });
  111. };
  112. this.Edit = function(title, id, pageurl, callback) {
  113. if (id == null || id == "") {
  114. layer.msg("操作的数据编号不能为空!");
  115. return;
  116. }
  117. ActiveCurdObject = this;
  118. this.Row = {
  119. "id": id
  120. };
  121. if (pageurl == null || pageurl == "")
  122. pageurl = '/static/module/' + this.opt.module_name + '/add.html';
  123. var curdObj = this;
  124. layui.use(['layer', 'form'], function() {
  125. layui.layer.open({
  126. "type": 2,
  127. "resize": false,
  128. "scrollbar": false,
  129. "title": title == null ? "编辑信息" : "编辑" + title,
  130. "area": curdObj.opt.window_size,
  131. "content": pageurl
  132. });
  133. if (callback) callback();
  134. });
  135. };
  136. this.One = function(id, callback) {
  137. var thisObj = this;
  138. var paramlist = {};
  139. if (thisObj.opt.idColKey != "") paramlist[thisObj.opt.idColKey] = id;
  140. else paramlist["id"] = id;
  141. //获取单行数据
  142. $.getJSON(Global.AccessUrl + this.opt.apiUrl.read_url, paramlist, function(result) {
  143. thisObj.Row = null;
  144. if ((result.code == 0 ||
  145. result.returncode == 200) && result.data != null && result.data.length > 0) {
  146. thisObj.Row = result.data[0];
  147. }
  148. if (callback) callback(result);
  149. })
  150. };
  151. this.Detail = function(title, Id, pageurl, callback) {
  152. if (Id == null || Id == "") {
  153. layer.msg("操作的数据编号不能为空!");
  154. return;
  155. }
  156. ActiveCurdObject = this;
  157. this.Row = {
  158. "id": Id
  159. };
  160. if (pageurl == null || pageurl == "")
  161. pageurl = '/static/module/' + this.opt.module_name + '/detail.html';
  162. var curdObj = this;
  163. layui.use(['layer', 'form'], function() {
  164. layui.layer.open({
  165. type: 2,
  166. maxmin: true,
  167. resize: false,
  168. scrollbar: true,
  169. title: [title == null ? "详细信息" : title + "详细信息", "font-weight:700;color:red;"],
  170. area: curdObj.opt.window_size,
  171. content: pageurl,
  172. success: function(layero, index) {
  173. if (callback != null) callback();
  174. //layer.full(index);
  175. //layero.find(".layui-layer-maxmin").remove(); //去年恢复按钮
  176. }
  177. });
  178. });
  179. };
  180. this.Save = function(parameter, callback) {
  181. var thisObj = this;
  182. layer.msg("正在提交数据中...", {
  183. time: 0
  184. });
  185. $.post(Global.AccessUrl + this.opt.apiUrl.save_url, parameter, function(returnData) {
  186. if (returnData.code == 0 || returnData.returncode == 200) {
  187. layer.msg("数据保存成功");
  188. thisObj.RefrshZtree(null);
  189. if (callback != null) callback();
  190. parent.layer.closeAll();
  191. } else {
  192. layer.alert(returnData["msg"]);
  193. return;
  194. }
  195. });
  196. };
  197. this.Delete = function(Id, callback) {
  198. ActiveCurdObject = this;
  199. var thisObj = this;
  200. $.post(Global.AccessUrl + this.opt.apiUrl.delete_url, {
  201. "id": Id
  202. }, function(returnData) {
  203. if (returnData["code"] == 1 || returnData.returncode == 500) {
  204. layer.alert(returnData["msg"]);
  205. } else {
  206. layer.msg("数据删除成功");
  207. thisObj.Reset();
  208. thisObj.RemoveZtreeNode(null, Id);
  209. if (callback != null) callback();
  210. }
  211. });
  212. };
  213. this.Reset = function() {
  214. ActiveCurdObject = this;
  215. if ($.trim(this.opt.targetEle.list_search) != "") {
  216. $(this.opt.targetEle.list_search).find("input,select").each(function() {
  217. var eleId = $.trim($(this).attr("id"));
  218. if (eleId != "") $(this).val("");
  219. });
  220. layui.form.render("select");
  221. }
  222. layui.table.reload(this.list_table_id, {
  223. page: {
  224. pageIndex: 1,
  225. },
  226. where: ""
  227. });
  228. };
  229. this.Query = function() {
  230. ActiveCurdObject = this;
  231. var whereCondition = {};
  232. if ($.trim(this.opt.targetEle.list_search) != "") {
  233. $(this.opt.targetEle.list_search).find("input,select").each(function() {
  234. var eleId = $.trim($(this).attr("id"));
  235. var v = $.trim($(this).val());
  236. if (eleId != "" && v != "") whereCondition[eleId] = v;
  237. });
  238. }
  239. //执行重载
  240. layui.table.reload(this.list_table_id, {
  241. page: {
  242. pageIndex: 1,
  243. },
  244. where: whereCondition
  245. });
  246. };
  247. this.GetList = function(param, callback) {
  248. this._list("GET", param, callback);
  249. };
  250. this.PostList = function(param, callback) {
  251. this._list("POST", param, callback);
  252. };
  253. this.List = function(param, callback) {
  254. this.GetList(param, callback);
  255. };
  256. this._list = function(method, param, callback) {
  257. var _url = Global.AccessUrl + this.opt.apiUrl.list_url;
  258. if (param != null) {
  259. var _tmpParamStr = [];
  260. for (var key in param) {
  261. if (key == "height") continue;
  262. _tmpParamStr.push(key + "=" + param[key]);
  263. }
  264. if (_tmpParamStr.length > 0) {
  265. if (_url.indexOf("?") == -1) _url = _url + "?" + _tmpParamStr.join("&");
  266. else _url = _url + "&" + _tmpParamStr.join("&");
  267. }
  268. }
  269. var parameter = {
  270. elem: this.opt.targetEle.list_data,
  271. url: _url,
  272. defaultToolbar: [],
  273. toolbar: this.opt.targetEle.list_toolbar,
  274. id: this.list_table_id,
  275. cols: this.opt.columns,
  276. method: method,
  277. done: function(res, curr, count) {
  278. if (callback != null) callback(res, curr, count);
  279. }
  280. }
  281. if (this.opt.height != null || this.opt.height != "")
  282. parameter["height"] = this.opt.height;
  283. Tools.BindTable(parameter);
  284. }
  285. this.RefrshZtree = function(treeId, nodeId, nodename) {
  286. ActiveCurdObject = this;
  287. if (Global.Ztree.zTreeObj == null) return;
  288. if (treeId != null && treeId != "") treeObj = $.fn.zTree.getZTreeObj(treeId);
  289. else treeObj = Global.Ztree.zTreeObj;
  290. //更新树节点
  291. var nodes = treeObj.getSelectedNodes();
  292. if (nodes.length > 0) {
  293. if (nodeId != null && nodeId != "" && nodes[0].id != nodeId) {
  294. var tNode = treeObj.getNodeByParam("id", nodeId, null);
  295. if (tNode != null && nodename != null) {
  296. //修改记录
  297. tNode.title = nodename;
  298. }
  299. treeObj.updateNode(tNode, true);
  300. } else {
  301. if (!nodes[0].isParent) {
  302. //没有子节点的节点处理
  303. nodes[0].isParent = true;
  304. treeObj.updateNode(nodes[0], true);
  305. }
  306. treeObj.reAsyncChildNodes(nodes[0], "refresh");
  307. }
  308. } else {
  309. //更新树
  310. treeObj.reAsyncChildNodes(null, "refresh");
  311. }
  312. };
  313. this.RemoveZtreeNode = function(treeId, nodeId) {
  314. ActiveCurdObject = this;
  315. if (Global.Ztree.zTreeObj == null) return;
  316. if (treeId != null && treeId != "") treeObj = $.fn.zTree.getZTreeObj(treeId);
  317. else treeObj = Global.Ztree.zTreeObj;
  318. //同步删除树节点
  319. var tNode = treeObj.getNodeByParam("id", nodeId, null);
  320. if (tNode != null) {
  321. treeObj.removeNode(tNode, true);
  322. }
  323. };
  324. }
  325. var Curd = {
  326. //控件标识。未设置时自动生成
  327. list_table_id: "",
  328. opt: {
  329. //模块名称/文件夹名称
  330. "module_name": "",
  331. "columns": [],
  332. //新增编辑窗口默认大小
  333. "window_size": ['600px', '350px'],
  334. "targetEle": {},
  335. //名称列名
  336. "nameColKey": "name",
  337. "height": "",
  338. //默认的数据table ID
  339. "table_datalist_control": "table_datalist_control",
  340. //默认的数据table工具栏ID
  341. "table_tools_bar": "table_tools_bar",
  342. //默认的数据table查询条件元素ID
  343. "table_search_panel": "table_search_panel",
  344. //默认的数据table操作模板ID
  345. "table_row_operator": "table_row_operator"
  346. },
  347. //单行数据信息
  348. Row: null,
  349. //添加从表数据时,设置主表数据。此数据可能会在从表添加界面上被使用到
  350. MasterData: null,
  351. Init: function(opt) {
  352. $.extend(this.opt, opt);
  353. this.list_table_id = this.opt.list_table_id || "t_" + new Date().getTime();
  354. if (this.opt.module_name == "") {
  355. layer.msg("未正确配置模块名称参数:module_name");
  356. return;
  357. }
  358. if ($("#" + this.opt.module_name).length != 1) {
  359. layer.msg("未正确设置模块" + this.opt.module_name + "对应的主控件!");
  360. return;
  361. }
  362. this.opt.targetEle.list_data = "#" + this.opt.module_name + " #" + this.opt.table_datalist_control;
  363. if ($(this.opt.targetEle.list_data).length != 1) {
  364. layer.msg("未正确设置数据列表显示控件!");
  365. return;
  366. }
  367. this.opt.targetEle.list_toolbar = "#" + this.opt.module_name + " #" + this.opt.table_tools_bar;
  368. if ($(this.opt.targetEle.list_toolbar).length != 1) {
  369. this.opt.targetEle.list_toolbar = "";
  370. }
  371. this.opt.targetEle.list_action = "#" + this.opt.module_name + " #" + this.opt.table_row_operator;
  372. if ($(this.opt.targetEle.list_action).length != 1) {
  373. this.opt.targetEle.list_action = "";
  374. }
  375. this.opt.targetEle.list_search = "#" + this.opt.module_name + " #" + this.opt.table_search_panel;
  376. if ($(this.opt.targetEle.list_search).length != 1) {
  377. this.opt.targetEle.list_search = "";
  378. }
  379. layui.table.on('tool(' + $(this.opt.targetEle.list_data).attr('lay-filter') + ')', function(obj) {
  380. var data = obj.data;
  381. var layEvent = obj.event;
  382. var Id = data["id"] || data["ID"] || data["Id"] || data["iD"];
  383. if (layEvent === 'delete') {
  384. layer.confirm('<div style="text-align:center;">是否删除<span style="color:red;font-weight:700;padding:0 2px;">' + data[Curd.opt.nameColKey] + "</span>的数据记录?</div>", function(index) {
  385. obj.del();
  386. Curd.Delete(Id);
  387. });
  388. } else if (layEvent === 'edit') {
  389. Curd.Edit(Id);
  390. } else if (layEvent === "detail") {
  391. Curd.Detail(Id);
  392. }
  393. });
  394. },
  395. New: function(pageurl, callback) {
  396. this.Row = null;
  397. if (pageurl == null || pageurl == "")
  398. pageurl = '/static/module/' + this.opt.module_name + '/add.html';
  399. var curdObj = this;
  400. layui.use(['layer', 'form'], function() {
  401. layui.layer.open({
  402. type: 2,
  403. resize: false,
  404. scrollbar: false,
  405. title: "新增",
  406. area: curdObj.opt.window_size,
  407. content: pageurl
  408. });
  409. if (callback) callback();
  410. });
  411. },
  412. Edit: function(id, pageurl, callback) {
  413. if (id == null || id == "") {
  414. layer.msg("操作的数据编号不能为空!");
  415. return;
  416. }
  417. this.Row = {
  418. "id": id
  419. };
  420. if (pageurl == null || pageurl == "")
  421. pageurl = '/static/module/' + this.opt.module_name + '/add.html';
  422. var curdObj = this;
  423. layui.use(['layer', 'form'], function() {
  424. layui.layer.open({
  425. type: 2,
  426. resize: false,
  427. scrollbar: false,
  428. title: "编辑信息",
  429. area: curdObj.opt.window_size,
  430. content: pageurl
  431. });
  432. if (callback) callback();
  433. });
  434. },
  435. One: function(id, callback) {
  436. //获取单行数据
  437. $.getJSON(Global.AccessUrl + this.opt.apiUrl.read_url, {
  438. "id": id
  439. }, function(result) {
  440. Curd.Row = null;
  441. if ((result.code == 0 ||
  442. result.returncode == 200) && result.data != null && result.data.length > 0) {
  443. Curd.Row = result.data[0];
  444. }
  445. if (callback) callback(result);
  446. })
  447. },
  448. Detail: function(Id, pageurl, callback) {
  449. if (Id == null || Id == "") {
  450. layer.msg("操作的数据编号不能为空!");
  451. return;
  452. }
  453. this.Row = {
  454. "id": Id
  455. };
  456. if (pageurl == null || pageurl == "")
  457. pageurl = '/static/module/' + this.opt.module_name + '/detail.html';
  458. var curdObj = this;
  459. layui.use(['layer', 'form'], function() {
  460. layui.layer.open({
  461. type: 2,
  462. maxmin: true,
  463. resize: false,
  464. scrollbar: true,
  465. title: ["详细信息", "font-weight:700;color:red;"],
  466. area: curdObj.opt.window_size,
  467. content: pageurl,
  468. success: function(layero, index) {
  469. if (callback != null) callback();
  470. //layer.full(index);
  471. //layero.find(".layui-layer-maxmin").remove(); //去年恢复按钮
  472. }
  473. });
  474. });
  475. },
  476. Save: function(parameter, callback) {
  477. $.post(Global.AccessUrl + this.opt.apiUrl.save_url, parameter, function(returnData) {
  478. if (returnData.code == 0 || returnData.returncode == 200) {
  479. layer.msg("数据保存成功");
  480. Curd.RefrshZtree(null);
  481. if (callback != null) callback();
  482. parent.layer.closeAll();
  483. } else {
  484. layer.alert(returnData["msg"]);
  485. return;
  486. }
  487. });
  488. },
  489. Delete: function(Id, callback) {
  490. $.post(Global.AccessUrl + this.opt.apiUrl.delete_url, {
  491. "id": Id
  492. }, function(returnData) {
  493. if (returnData["code"] == 1 || returnData.returncode == 500) {
  494. layer.alert(returnData["msg"]);
  495. } else {
  496. layer.msg("数据删除成功");
  497. Curd.RemoveZtreeNode(null, Id);
  498. if (callback != null) callback();
  499. }
  500. });
  501. },
  502. Reset: function() {
  503. if ($.trim(this.opt.targetEle.list_search) != "") {
  504. $(this.opt.targetEle.list_search).find("input,select").each(function() {
  505. var eleId = $.trim($(this).attr("id"));
  506. if (eleId != "") $(this).val("");
  507. });
  508. }
  509. layui.table.reload(this.list_table_id, {
  510. page: {
  511. pageIndex: 1,
  512. },
  513. where: ""
  514. });
  515. },
  516. Query: function() {
  517. var whereCondition = {};
  518. if ($.trim(this.opt.targetEle.list_search) != "") {
  519. $(this.opt.targetEle.list_search).find("input,select").each(function() {
  520. var eleId = $.trim($(this).attr("id"));
  521. var v = $.trim($(this).val());
  522. if (eleId != "" && v != "") whereCondition[eleId] = v;
  523. });
  524. }
  525. //执行重载
  526. layui.table.reload(this.list_table_id, {
  527. page: {
  528. pageIndex: 1,
  529. },
  530. where: whereCondition
  531. });
  532. },
  533. List: function(param, callback) {
  534. var _url = Global.AccessUrl + this.opt.apiUrl.list_url;
  535. if (param != null) {
  536. var _tmpParamStr = [];
  537. for (var key in param) {
  538. _tmpParamStr.push(key + "=" + param[key]);
  539. }
  540. if (_tmpParamStr.length > 0) {
  541. if (_url.indexOf("?") == -1) _url = _url + "?" + _tmpParamStr.join("&");
  542. else _url = _url + "&" + _tmpParamStr.join("&");
  543. }
  544. }
  545. var parameter = {
  546. elem: this.opt.targetEle.list_data,
  547. url: _url,
  548. toolbar: this.opt.targetEle.list_toolbar,
  549. id: this.list_table_id,
  550. cols: this.opt.columns,
  551. method: "GET",
  552. done: function(res, curr, count) {
  553. if (callback != null) callback(res, curr, count);
  554. }
  555. }
  556. if (this.opt.height != null || this.opt.height != "")
  557. parameter["height"] = this.opt.height;
  558. Tools.BindTable(parameter);
  559. },
  560. RefrshZtree: function(treeId, nodeId, nodename) {
  561. if (Global.Ztree.zTreeObj == null) return;
  562. if (treeId != null && treeId != "") treeObj = $.fn.zTree.getZTreeObj(treeId);
  563. else treeObj = Global.Ztree.zTreeObj;
  564. //更新树节点
  565. var nodes = treeObj.getSelectedNodes();
  566. if (nodes.length > 0) {
  567. if (nodeId != null && nodeId != "" && nodes[0].id != nodeId) {
  568. var tNode = treeObj.getNodeByParam("id", nodeId, null);
  569. if (tNode != null && nodename != null) {
  570. //修改记录
  571. tNode.title = nodename;
  572. }
  573. treeObj.updateNode(tNode, true);
  574. } else {
  575. if (!nodes[0].isParent) {
  576. //没有子节点的节点处理
  577. nodes[0].isParent = true;
  578. treeObj.updateNode(nodes[0], true);
  579. }
  580. treeObj.reAsyncChildNodes(nodes[0], "refresh");
  581. }
  582. } else {
  583. //更新树
  584. treeObj.reAsyncChildNodes(null, "refresh");
  585. }
  586. },
  587. RemoveZtreeNode: function(treeId, nodeId) {
  588. if (Global.Ztree.zTreeObj == null) return;
  589. if (treeId != null && treeId != "") treeObj = $.fn.zTree.getZTreeObj(treeId);
  590. else treeObj = Global.Ztree.zTreeObj;
  591. //同步删除树节点
  592. var tNode = treeObj.getNodeByParam("id", nodeId, null);
  593. if (tNode != null) {
  594. treeObj.removeNode(tNode, true);
  595. }
  596. }
  597. }