list.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  1. 'use strict';
  2. var app = angular.module('app', [
  3. 'angularUtils.directives.dirPagination'
  4. ]);
  5. app.controller("indexCtrl", ["$scope", "$http", "$timeout", function ($scope, $http, $timeout) {
  6. var self = this;
  7. var s4 = new SM4Util();
  8. self.userId = $.cookie("GlWorkPlatform-userid");
  9. self.userName = $.cookie("GlWorkPlatform-chineseName");
  10. self.get_AccessToken = localStorage.getItem("GlWorkPlatform-AccessToken");
  11. self.get_lastReturnPageno = sp.getUrlName("lastReturnPageno");
  12. self.get_type = sp.getUrlName("type");
  13. var postCfg = {
  14. headers: {
  15. 'Content-Type': 'application/json',
  16. 'Authorization': "Bearer " + self.get_AccessToken
  17. }
  18. }
  19. sp.fitHeight('#treeDivPart', 120);
  20. sp.fitHeight('.fp-part-right', 80);
  21. //获取树形结构
  22. self.treeData = [];
  23. self.getLeftTreeData = function () {
  24. var postData = {
  25. "tablename": "CODE_YPTYPE",
  26. "sql_data": "YPBH",
  27. "tablename_data": "SX_BGYPMGR"
  28. }
  29. $http.post(apiurljs.login + "g2app/richang/getTreeList", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  30. .success(function (obj) {
  31. var res = strToJson(s4.decryptData_CBC(obj.data));
  32. self.getMenuBtnList(res.data);
  33. self.treeData = res.data;
  34. setTimeout(function () {
  35. self.nowNodeCode = self.treeData[0].CODE;
  36. self.nowNodeName = self.treeData[0].CNAME;
  37. self.nowNodeID = self.treeData[0].ID;
  38. self.treeData[0].checked = true;
  39. self.getData(1);
  40. })
  41. })
  42. .error(function (XMLHttpRequest, textStatus, errorThrown) {
  43. self.treeData = [];
  44. })
  45. }
  46. self.getLeftTreeData();
  47. self.getMenuBtnList = function (data) {
  48. for (var item of data) {
  49. item.checked = false;
  50. if (sp.isval(item.C_H_I_L_D_DATA) && item.C_H_I_L_D_DATA.length > 0) {
  51. self.getMenuBtnList(item.C_H_I_L_D_DATA);
  52. } else {
  53. item.C_H_I_L_D_DATA = [];
  54. }
  55. }
  56. }
  57. self.nowNodeCode = "";
  58. self.nowNodeName = "";
  59. self.nowNodeID = "";
  60. self.itemCheck = function ($item) {
  61. self.treeData.forEach(function (item) {
  62. if (item.ID == $item.ID) {
  63. $item.checked = !$item.checked;
  64. } else {
  65. item.checked = false;
  66. }
  67. if (item.C_H_I_L_D_DATA != "" && item.C_H_I_L_D_DATA != null && item.C_H_I_L_D_DATA != null) {
  68. item.C_H_I_L_D_DATA.forEach(function (item2) {
  69. if (item2.ID == $item.ID) {
  70. $item.checked = !$item.checked;
  71. } else {
  72. item2.checked = false;
  73. }
  74. if (item2.C_H_I_L_D_DATA != "" && item2.C_H_I_L_D_DATA != null && item2.C_H_I_L_D_DATA != null) {
  75. item2.C_H_I_L_D_DATA.forEach(function (item3) {
  76. if (item3.ID == $item.ID) {
  77. $item.checked = !$item.checked;
  78. } else {
  79. item3.checked = false;
  80. }
  81. if (item3.C_H_I_L_D_DATA != "" && item3.C_H_I_L_D_DATA != null && item3.C_H_I_L_D_DATA != null) {
  82. item3.C_H_I_L_D_DATA.forEach(function (item4) {
  83. if (item4.ID == $item.ID) {
  84. $item.checked = !$item.checked;
  85. } else {
  86. item4.checked = false;
  87. }
  88. if (item4.C_H_I_L_D_DATA != "" && item4.C_H_I_L_D_DATA != null && item4.C_H_I_L_D_DATA != null) {
  89. item4.C_H_I_L_D_DATA.forEach(function (item5) {
  90. if (item5.ID == $item.ID) {
  91. $item.checked = !$item.checked;
  92. } else {
  93. item5.checked = false;
  94. }
  95. if (item5.C_H_I_L_D_DATA != "" && item5.C_H_I_L_D_DATA != null && item5.C_H_I_L_D_DATA != null) {
  96. item5.C_H_I_L_D_DATA.forEach(function (item6) {
  97. if (item6.ID == $item.ID) {
  98. $item.checked = !$item.checked;
  99. } else {
  100. item6.checked = false;
  101. }
  102. if (item6.C_H_I_L_D_DATA != "" && item6.C_H_I_L_D_DATA != null && item6.C_H_I_L_D_DATA != null) {
  103. item6.C_H_I_L_D_DATA.forEach(function (item7) {
  104. if (item7.ID == $item.ID) {
  105. $item.checked = !$item.checked;
  106. } else {
  107. item7.checked = false;
  108. }
  109. })
  110. }
  111. })
  112. }
  113. })
  114. }
  115. })
  116. }
  117. })
  118. }
  119. })
  120. }
  121. })
  122. if ($item.checked) {
  123. self.nowNodeCode = $item.CODE;
  124. self.nowNodeID = $item.ID;
  125. self.nowNodeName = $item.CNAME;
  126. self.getData(1);
  127. } else {
  128. self.nowNodeCode = self.treeData[0].CODE;
  129. self.nowNodeName = self.treeData[0].CNAME;
  130. self.nowNodeID = self.treeData[0].ID;
  131. self.treeData[0].checked = true;
  132. }
  133. }
  134. //根据选择的底稿目录获取当前目录下的文件
  135. self.noDataTip = 1;
  136. self.rows = [];
  137. self.pageno = 1;
  138. self.total_count = 0;
  139. self.itemsPerPage = 10;
  140. self.pageOptions = [10, 15, 20, 25, 30];
  141. self.search = {
  142. NAME: ""
  143. }
  144. self.getData = function (pageno) {
  145. self.pageno = pageno;
  146. $scope.__default__currentPage = self.pageno;
  147. let postData = {
  148. "pageno": self.pageno,
  149. "pagesize": self.itemsPerPage,
  150. "code": self.nowNodeCode,
  151. "data_col": "YPBH",
  152. "tablename_code": "CODE_YPTYPE",
  153. "tablename_data": "SX_BGYPMGR",
  154. "order": "id",
  155. "sqlwhere": {},
  156. "sqllikewhere": {
  157. "YPMC": self.search.YPMC
  158. }
  159. }
  160. $http.post(apiurljs.login + "g2app/richang/queryFormDataBySqlWithPage", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  161. .success(function (res) {
  162. var res = strToJson(s4.decryptData_CBC(res.data));
  163. if (sp.isval(res.data)) {
  164. self.noDataTip = 1;
  165. self.rows = res.data;
  166. self.total_count = res.totalCount;
  167. } else {
  168. self.rows = [];
  169. self.noDataTip = 0;
  170. }
  171. self.sumTotal();
  172. }).error(function (err) {
  173. sp.dialog(JSON.stringify(err));
  174. });
  175. }
  176. //删除底稿
  177. self.itemDelete = function ($item) {
  178. let postData = {
  179. "pageno": 1,
  180. "pagesize": 1,
  181. "code": $item.CODE,
  182. "data_col": "YPBH",
  183. "tablename_code": "CODE_YPTYPE",
  184. "tablename_data": "SX_BGYPMGR",
  185. "order": "id",
  186. "sqlwhere": {},
  187. "sqllikewhere": {}
  188. }
  189. $http.post(apiurljs.login + "g2app/richang/queryFormDataBySqlWithPage", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  190. .success(function (res) {
  191. var res = strToJson(s4.decryptData_CBC(res.data));
  192. var totalCount = res.totalCount;
  193. if (parseInt(totalCount) > 0) {
  194. //sp.dialog("当前分类下存在数据,无法删除");
  195. } else {
  196. var getDelID = $item.CODE;
  197. var dialogHead = "<span class=\"sp-dialog-head\"><span class=\"sp-dialog-tip\">温馨提示</span><span class=\"sp-dialog-close sp-closeDialog\" title=\"关闭\">×</span></span>";
  198. var dialogBody = "<div class=\"sp-dialog-body\">删除后不可恢复,您确认要删除吗?</div>";
  199. var dialogFoot = "<div class=\"sp-dialog-foot\"><input data-id=" + getDelID + " id='delDataTrue' type='button' value='确 认' class='sp-dialog-btnTrue' /><input type='button' value='取 消' class='sp-dialog-btnCancle sp-closeDialog' /></div>";
  200. $('.sp-dialog').html(dialogHead + dialogBody + dialogFoot);
  201. sp.openCenter(".sp-dialog");
  202. ///取消按钮
  203. $('.sp-closeDialog').click(function (event) {
  204. sp.closeCenter(".sp-dialog");
  205. event.preventDefault();
  206. event.stopPropagation();
  207. });
  208. //post消息的id
  209. $("#delDataTrue").click(function () {
  210. var getid = $(this).attr("data-id");
  211. sp.dialoghide();
  212. var data = {
  213. "id": $item.ID,
  214. "tablename": "CODE_YPTYPE",
  215. "parentid": $item.PARENTID,
  216. "tablename_data": "SX_BGYPMGR"
  217. }
  218. //console.log(data);
  219. $http.post(apiurljs.login + "g2app/richang/delNode", {data: s4.encryptData_CBC(JSON.stringify(data))}, postCfg)
  220. .success(function (obj) {
  221. var res = strToJson(s4.decryptData_CBC(obj.data));
  222. if (res.success) {
  223. sp.dialog("删除成功");
  224. self.getLeftTreeData();
  225. } else {
  226. sp.dialog(res.message);
  227. }
  228. })
  229. .error(function (XMLHttpRequest, textStatus, errorThrown) {
  230. })
  231. });
  232. }
  233. }).error(function (err) {
  234. sp.dialog(JSON.stringify(err));
  235. });
  236. }
  237. self.selectedItem = {
  238. "level": "",
  239. "id": "",
  240. "layerTitle": "",
  241. "add": false,
  242. "name": "",
  243. "code": "",
  244. "child_title": ""
  245. }
  246. //添加目录树形非一级
  247. self.itemAdd = function ($item) {
  248. self.selectedItem.layerTitle = "新增分类";
  249. self.selectedItem.level = $item.LEVELS;
  250. self.selectedItem.id = $item.ID;
  251. self.selectedItem.add = true;
  252. self.selectedItem.name = $item.CNAME;
  253. self.selectedItem.code = $item.CODE;
  254. self.selectedItem.child_title = "";
  255. sp.layer('#layer_box');
  256. };
  257. //修改目录
  258. self.itemEdit = function ($item) {
  259. self.selectedItem.layerTitle = "编辑分类";
  260. self.selectedItem.level = $item.LEVELS;
  261. self.selectedItem.id = $item.ID;
  262. self.selectedItem.add = false;
  263. self.selectedItem.name = $item.CNAME;
  264. self.selectedItem.code = $item.CODE;
  265. self.selectedItem.child_title = "";
  266. sp.layer('#layer_box');
  267. };
  268. //弹出层-提交按钮事件
  269. self.btnSetTitle = function () {
  270. if (!self.selectedItem.add) {
  271. if (spngvld.submit("#layer_box")) {
  272. let postData = {
  273. "id": self.selectedItem.id,
  274. "tablename": "CODE_YPTYPE",
  275. "setwhere": {
  276. "CNAME": self.selectedItem.name
  277. }
  278. }
  279. $http.post(apiurljs.login + "g2app/richang/setColumnsById", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  280. .success(function (obj) {
  281. sp.closeCenter('.sp-layer');
  282. var res = strToJson(s4.decryptData_CBC(obj.data));
  283. if (res.success) {
  284. self.getLeftTreeData();
  285. } else {
  286. sp.dialog(res.message);
  287. }
  288. })
  289. .error(function (XMLHttpRequest, textStatus, errorThrown) {
  290. })
  291. }
  292. } else {
  293. if (spngvld.submit("#layer_box")) {
  294. let postData = {
  295. "tablename": "CODE_YPTYPE",
  296. "code": self.selectedItem.code,
  297. "levels": self.selectedItem.level,
  298. "cname": self.selectedItem.child_title
  299. }
  300. $http.post(apiurljs.login + "g2app/richang/TreeAdd", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  301. .success(function (obj) {
  302. sp.closeCenter('.sp-layer');
  303. var res = strToJson(s4.decryptData_CBC(obj.data));
  304. if (res.success) {
  305. self.getLeftTreeData();
  306. } else {
  307. sp.dialog(res.message);
  308. }
  309. })
  310. .error(function (XMLHttpRequest, textStatus, errorThrown) {
  311. })
  312. }
  313. }
  314. }
  315. self.search = {
  316. YPMC: "",
  317. }
  318. //弹出筛选框
  319. self.openSearchLayer = function () {
  320. sp.layer("#layer_search");
  321. }
  322. self.doSearch = function () {
  323. sp.closeCenter('.sp-layer');
  324. self.pageno = 1; // 初始化 当前页为 1
  325. self.getData(self.pageno);
  326. }
  327. //新增数据
  328. self.insertData = [];
  329. self.opneInsertLayer = function () {
  330. self.insertData = [];
  331. self.typeList = [];
  332. self.parseTreeJson(self.treeData);
  333. sp.layer('#layer_insert');
  334. }
  335. self.addItemData = function () {
  336. self.insertData.push({
  337. YPBH1: "",
  338. YPBH: self.typeList[0].CODE,
  339. PP: "",
  340. YPMC: "",
  341. FL: self.typeList[0].CODE,
  342. GG: "",
  343. DJ: 0,
  344. KC: 0,
  345. JDLW: "",
  346. BZ: ""
  347. });
  348. }
  349. self.typeList = [];
  350. self.parseTreeJson = function (array) {
  351. for (let index = 0; index < array.length; index++) {
  352. const element = array[index];
  353. // 1.判断element.children是对象
  354. if (sp.isval(element.C_H_I_L_D_DATA) && element.C_H_I_L_D_DATA.length > 0) {
  355. self.parseTreeJson(element.C_H_I_L_D_DATA)
  356. } else {
  357. // 判断是否为子节点
  358. if (element.LEAF == 1) {
  359. self.typeList.push(element);
  360. }
  361. }
  362. }
  363. }
  364. self.changeItem = function (index, code) {
  365. self.insertData[index].YPBH = code;
  366. }
  367. self.deleteItem = function (index) {
  368. self.insertData.splice(index, 1);
  369. }
  370. self.saveInsertData = function () {
  371. if (spngvld.submit("#layer_insert")) {
  372. var postData = {
  373. "tablename": "SX_BGYPMGR",
  374. "data": []
  375. }
  376. self.insertData.forEach(function (item) {
  377. self.typeList.forEach(function (item2) {
  378. if (item.FL == item2.CODE) {
  379. item.FL = item2.CNAME;
  380. }
  381. })
  382. if (item.KC != "" && item.KC != undefined && item.KC != null && item.KC != 0 && item.DJ != "" && item.DJ != undefined && item.DJ != null && item.DJ != 0) {
  383. item.JEHJ = item.KC * item.DJ;
  384. } else {
  385. item.JEHJ = 0;
  386. }
  387. if (item.KC != "" && item.KC != undefined && item.KC != null) {
  388. } else {
  389. item.KC = 0;
  390. }
  391. if (item.DJ != "" && item.DJ != undefined && item.DJ != null) {
  392. } else {
  393. item.DJ = 0;
  394. }
  395. })
  396. self.insertData.forEach(function (item) {
  397. postData.data.push({
  398. YPBH: item.YPBH,
  399. YPBH1: item.YPBH1,
  400. PP: item.PP,
  401. YPMC: item.YPMC,
  402. FL: item.FL,
  403. GG: item.GG,
  404. DJ: item.DJ,
  405. KC: item.KC,
  406. JDLW: item.JDLW,
  407. BZ: item.BZ,
  408. JEHJ: item.JEHJ
  409. });
  410. })
  411. $http.post(apiurljs.login + "g2app/dataabase/insertDataList", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  412. .success(function (obj) {
  413. sp.closeCenter('.sp-layer');
  414. var res = strToJson(s4.decryptData_CBC(obj.data));
  415. if (res.success) {
  416. self.getData(1);
  417. } else {
  418. sp.dialog(res.message);
  419. }
  420. })
  421. .error(function (XMLHttpRequest, textStatus, errorThrown) {
  422. })
  423. }
  424. }
  425. self.deleteData = function ($item) {
  426. var getDelID = $item.ID;
  427. var dialogHead = "<span class=\"sp-dialog-head\"><span class=\"sp-dialog-tip\">温馨提示</span><span class=\"sp-dialog-close sp-closeDialog\" title=\"关闭\">×</span></span>";
  428. var dialogBody = "<div class=\"sp-dialog-body\">删除后不可恢复,您确认要删除吗?</div>";
  429. var dialogFoot = "<div class=\"sp-dialog-foot\"><input data-id=" + getDelID + " id='delDataTrue' type='button' value='确 认' class='sp-dialog-btnTrue' /><input type='button' value='取 消' class='sp-dialog-btnCancle sp-closeDialog' /></div>";
  430. $('.sp-dialog').html(dialogHead + dialogBody + dialogFoot);
  431. sp.openCenter(".sp-dialog");
  432. ///取消按钮
  433. $('.sp-closeDialog').click(function (event) {
  434. sp.closeCenter(".sp-dialog");
  435. event.preventDefault();
  436. event.stopPropagation();
  437. });
  438. //post消息的id
  439. $("#delDataTrue").click(function () {
  440. var getid = $(this).attr("data-id");
  441. sp.dialoghide();
  442. var data = {"id": $item.ID, "tablename": "SX_BGYPMGR"}
  443. //console.log(data);
  444. $http.post(apiurljs.login + "g2app/richang/delDataById", {data: s4.encryptData_CBC(JSON.stringify(data))}, postCfg)
  445. .success(function (obj) {
  446. var res = strToJson(s4.decryptData_CBC(obj.data));
  447. if (res.success) {
  448. sp.dialog("删除成功");
  449. self.getData(1);
  450. } else {
  451. sp.dialog(res.message);
  452. }
  453. })
  454. .error(function (XMLHttpRequest, textStatus, errorThrown) {
  455. })
  456. });
  457. }
  458. self.sumTotalNum = "";
  459. self.sumTotal = function () {
  460. var data = {
  461. "tablename_code": "CODE_YPTYPE",
  462. "code": self.nowNodeCode,
  463. "tablename": "SX_BGYPMGR",
  464. "data_col": "YPBH",
  465. "hj_col": "KC"
  466. }
  467. $http.post(apiurljs.login + "g2app/richang/querybangonghj", {data: s4.encryptData_CBC(JSON.stringify(data))}, postCfg)
  468. .success(function (obj) {
  469. var res = strToJson(s4.decryptData_CBC(obj.data));
  470. if (res.data != null && res.data != undefined && res.data != "") {
  471. self.sumTotalNum = res.data;
  472. }
  473. })
  474. .error(function (XMLHttpRequest, textStatus, errorThrown) {
  475. })
  476. }
  477. self.itemObj = {
  478. YPMC: "",
  479. PP: "",
  480. GG: "",
  481. KC: "",
  482. DJ: "",
  483. BZ: "",
  484. JDLW: "",
  485. ID: ""
  486. }
  487. self.itemDataEdit = function ($item) {
  488. self.itemObj.YPMC = $item.YPMC;
  489. self.itemObj.PP = $item.PP;
  490. self.itemObj.GG = $item.GG;
  491. self.itemObj.KC = parseInt($item.KC);
  492. self.itemObj.DJ = parseInt($item.DJ);
  493. self.itemObj.BZ = $item.BZ;
  494. self.itemObj.JDLW = $item.JDLW;
  495. self.itemObj.ID = $item.ID;
  496. sp.layer('#layer_edit');
  497. };
  498. self.editBtn = function () {
  499. if (spngvld.submit("#layer_edit")) {
  500. if (self.itemObj.KC != "" && self.itemObj.KC != undefined && self.itemObj.KC != null) {
  501. } else {
  502. self.itemObj.KC = 0;
  503. }
  504. if (self.itemObj.DJ != "" && self.itemObj.DJ != undefined && self.itemObj.DJ != null) {
  505. } else {
  506. self.itemObj.DJ = 0;
  507. }
  508. let JEHJNum=0;
  509. if (self.itemObj.KC != 0 && self.itemObj.DJ != 0) {
  510. JEHJNum = self.itemObj.DJ * self.itemObj.KC;
  511. } else {
  512. JEHJNum = 0;
  513. }
  514. var postData = {
  515. "entity": "SX_BGYPMGR",
  516. "data": {
  517. YPMC: self.itemObj.YPMC,
  518. PP: self.itemObj.PP,
  519. GG: self.itemObj.GG,
  520. KC: self.itemObj.KC,
  521. DJ: self.itemObj.DJ,
  522. BZ: self.itemObj.BZ,
  523. JDLW: self.itemObj.JDLW,
  524. JEHJ: JEHJNum
  525. },
  526. "setwhere": " WHERE id=" + self.itemObj.ID + ""
  527. }
  528. $http.post(apiurljs.login + "g2app/dataabase/UpdataBySql", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  529. .success(function (obj) {
  530. sp.closeCenter('.sp-layer');
  531. var res = strToJson(s4.decryptData_CBC(obj.data));
  532. if (res.success) {
  533. self.getData(1);
  534. } else {
  535. sp.dialog(res.message);
  536. }
  537. })
  538. .error(function (XMLHttpRequest, textStatus, errorThrown) {
  539. })
  540. } else {
  541. }
  542. }
  543. }])
  544. app.directive('treeView', [function () {
  545. return {
  546. restrict: 'EA',
  547. templateUrl: '/treeView.html',
  548. scope: {
  549. treeData: '=',///声明数据
  550. textField: '@',
  551. itemAdd: '&', ///声明新增变量
  552. itemEdit: '&',///声明修改变量
  553. itemCheck: '&',///声明修改变量
  554. itemDelete: '&',///声明修改变量
  555. itemUp: '&',
  556. itemDown: '&'
  557. },
  558. controller: ['$scope', function ($scope) {
  559. $scope.itemExpended = function (item, $event) {
  560. item.$$isExpend = !item.$$isExpend;
  561. $event.stopPropagation();
  562. };
  563. ///展开折叠图标设置
  564. $scope.getItemIcon = function (item) {
  565. var isEnd = $scope.isEnd(item);
  566. if (isEnd) {
  567. return 'fa fa-paper-plane-o';
  568. }
  569. return item.$$isExpend ? 'fa fa-plus-square-o' : 'fa fa-minus-square-o';
  570. };
  571. ///判断是否是最后一级菜单
  572. $scope.isEnd = function (item) {
  573. return !item.C_H_I_L_D_DATA || !item.C_H_I_L_D_DATA.length;
  574. };
  575. ///事件调用返回
  576. $scope.warpCallback = function (callback, item, $event) {
  577. ($scope[callback] || angular.noop)({
  578. $item: item,
  579. $event: $event
  580. });
  581. };
  582. }]
  583. };
  584. }]);