DocCaTreeGrid.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. /**
  2. * ERP项目gridpanel样式5:documentCatalog专用treegrid
  3. */
  4. Ext.define('erp.view.core.grid.DocCaTreeGrid',{
  5. extend: 'Ext.tree.Panel',
  6. alias: 'widget.erpDocCaTreeGrid',
  7. BaseUtil: Ext.create('erp.util.BaseUtil'),
  8. FormUtil: Ext.create('erp.util.FormUtil'),
  9. region: 'south',
  10. layout : 'fit',
  11. id: 'treegrid',
  12. emptyText : $I18N.common.grid.emptyText,
  13. useArrows: true,
  14. rootVisible: false,
  15. singleExpand: true,
  16. saveNodes: [],
  17. updateNodes: [],
  18. deleteNodes: [],
  19. expandedNodes: [],
  20. store: Ext.create('Ext.data.TreeStore', {
  21. fields: fields,
  22. root : {
  23. text: 'root',
  24. id: 'root',
  25. expanded: true
  26. }
  27. }),
  28. columns: columns,
  29. plugins: Ext.create('Ext.grid.plugin.CellEditing', {
  30. clicksToEdit: 1
  31. }),
  32. tbar: [{
  33. iconCls: 'tree-add',
  34. text: $I18N.common.button.erpAddButton,
  35. handler: function(){
  36. // var treegrid = Ext.getCmp('treegrid');
  37. // var items = treegrid.selModel.selected.items;
  38. // var bool = false;
  39. // Ext.Ajax.request({//拿到tree数据
  40. // url : basePath + 'oa/document/queryDocPower.action',
  41. // params:{
  42. // id : items[0].data["dc_id"],
  43. // field : "add"
  44. // },
  45. // async: false,
  46. // callback : function(options,success,response){
  47. //// console.log(response);
  48. // var res = new Ext.decode(response.responseText);
  49. //// alert(res.error);
  50. // if(res.error){
  51. // showError(res.error);
  52. // } else {
  53. // bool = true;
  54. // }
  55. // }
  56. // });
  57. //// alert(bool);
  58. // if(bool){
  59. // if(items.length > 0 && items[0].isLeaf() == false){
  60. // if(items[0].data['dc_id'] == null || items[0].data['dc_id'] == ''){
  61. // warnMsg('如果在该文件夹下添加子文件夹,需先保存该文件夹,是否保存?', function(btn){
  62. // if(btn == 'yes'){
  63. // if(items[0].data['dc_displayname'] == null || items[0].data['dc_displayname'] == ''){
  64. // showError('请先描述该节点');
  65. // return;
  66. // } else {
  67. // treegrid.saveNodes.push(items[0]);
  68. // treegrid.saveNode();
  69. // }
  70. // } else if(btn == 'no'){
  71. // return;
  72. // }
  73. // });
  74. // } else {
  75. // items[0].data['leaf'] = false;
  76. // items[0].data['cls'] = 'x-tree-cls-parent';
  77. // items[0].data['dc_isfile'] = 'F';
  78. // items[0].dirty = true;
  79. // var o = {
  80. // dc_parentid: items[0].data['dc_id'],
  81. // dc_isfile: 'T',
  82. // cls: "x-tree-cls-parent",
  83. // parentId: items[0].data['dc_id'],
  84. // leaf: false,
  85. //// dc_deleteable: 'T',
  86. //// deleteable: true,
  87. // allowDrag: true
  88. // };
  89. // items[0].appendChild(o);
  90. // items[0].expand(true);
  91. // }
  92. // } else {
  93. // var record = treegrid.getExpandItem();
  94. // if(record){
  95. // var o = {
  96. // dc_parentid: record.data['dc_id'],
  97. // dc_isfile: 'F',
  98. // cls: "x-tree-cls-parent",
  99. // parentId: record.data['dc_id'],
  100. //// dc_deleteable: 'T',
  101. //// deleteable: true,
  102. // leaf: false,
  103. // allowDrag: true
  104. // };
  105. // record.appendChild(o);
  106. // }
  107. // }
  108. // }
  109. }
  110. },{
  111. iconCls: 'tree-delete',
  112. text: $I18N.common.button.erpDeleteButton,
  113. handler: function(){
  114. // var treegrid = Ext.getCmp('treegrid');
  115. // var items = treegrid.selModel.selected.items;
  116. // var bool = false;
  117. // Ext.Ajax.request({//拿到tree数据
  118. // url : basePath + 'oa/document/queryDocPower.action',
  119. // params:{
  120. // id : items[0].data["dc_id"],
  121. // field : "delete"
  122. // },
  123. // async: false,
  124. // callback : function(options,success,response){
  125. // console.log(response);
  126. // var res = new Ext.decode(response.responseText);
  127. // if(res.error){
  128. // showError(res.error);
  129. // } else {
  130. // bool = true;
  131. // }
  132. // }
  133. // });
  134. //// alert(bool);
  135. // if(bool){
  136. //// console.log(items);alert(items.length);alert(items[0].isLeaf());
  137. // if(items.length > 0){
  138. // if(items[0].isLeaf() == true){
  139. // if(items[0].data['dc_id'] != null && items[0].data['dc_id'] != ''){
  140. // if(items[0].data['dc_deleteable'] == 'T'){
  141. // warnMsg('确定删除文件 [' + items[0].data['dc_displayname'] + "]?", function(btn){
  142. // if(btn == 'yes'){
  143. //// console.log(items[0]);
  144. // treegrid.deleteNode(items[0]);
  145. // } else if(btn == 'no'){
  146. // return;
  147. // }
  148. // });
  149. // } else {
  150. // showError('该文件不允许删除!');
  151. // }
  152. // } else {
  153. // items[0].remove(true);
  154. // }
  155. // } else {
  156. // if(items[0].data['dc_id'] != null || items[0].data['dc_id'] != ''){
  157. // if(items[0].data['dc_deleteable'] == 'T'){
  158. // Ext.each(items[0].childNodes, function(){
  159. // if(this.data['dc_deleteable'] == 'F'){
  160. // showError('该文件夹有不可删除子节点,无法删除该文件夹!');
  161. // return;
  162. // }
  163. // });
  164. // warnMsg('确定删除文件夹[' + items[0].data['dc_displayname'] + ']及其所有子文件?', function(btn){
  165. // if(btn == 'yes'){
  166. // treegrid.deleteNode(items[0]);
  167. // } else if(btn == 'no'){
  168. // return;
  169. // }
  170. // });
  171. // } else {
  172. // showError('该文件夹不允许删除!');
  173. // }
  174. // } else {
  175. // items[0].remove(true);
  176. // }
  177. // }
  178. // } else {
  179. // var record = treegrid.getExpandItem();
  180. // if(record){
  181. // if(record.childNodes.length == 0){
  182. // if(record.data['dc_id'] != null && record.data['dc_id'] != ''){
  183. // if(record.data['dc_deleteable'] == 'T'){
  184. // warnMsg('确定删除文件夹[' + record.data['dc_displayname'] + ']?', function(btn){
  185. // if(btn == 'yes'){
  186. // treegrid.deleteNode(record);
  187. // } else if(btn == 'no'){
  188. // return;
  189. // }
  190. // });
  191. // } else {
  192. // showError('该文件夹不允许删除!');
  193. // }
  194. // } else {
  195. // record.remove(true);
  196. // }
  197. // }
  198. // }
  199. // }
  200. // }
  201. }
  202. },{
  203. iconCls: 'tree-save',
  204. text: $I18N.common.button.erpSaveButton,
  205. handler: function(){
  206. // var treegrid = Ext.getCmp('treegrid'),
  207. // nodes = treegrid.store.tree.root.childNodes;
  208. // treegrid.saveNodes = [];
  209. // Ext.each(nodes, function(){
  210. // treegrid.checkChild(this);
  211. // });
  212. // treegrid.saveNode();
  213. }
  214. // },{
  215. // iconCls: 'x-button-icon-download',
  216. // text: '下载',
  217. // handler: function(){
  218. // var treegrid = Ext.getCmp('treegrid');
  219. // var items = treegrid.selModel.selected.items;
  220. // var bool = false;
  221. // Ext.Ajax.request({
  222. // url : basePath + 'oa/document/queryDocPower.action',
  223. // params:{
  224. // id : items[0].data["dc_id"],
  225. // field : "download"
  226. // },
  227. // async: false,
  228. // callback : function(options,success,response){
  229. //// console.log(response);
  230. // var res = new Ext.decode(response.responseText);
  231. // if(res.error){
  232. // showError(res.error);
  233. // } else {
  234. // bool = true;
  235. // }
  236. // }
  237. // });
  238. // if (bool) {
  239. // if (items[0].data['dc_isfile'] == 'T') {
  240. // window.location.href = basePath + 'oa/download.action?path=' + items[0].data["dc_url"];
  241. //// Ext.Ajax.request({
  242. //// url : basePath + 'oa/online.action',
  243. //// params : {
  244. //// filepath : items[0].data["dc_url"],
  245. //// isOnline : true
  246. //// },
  247. //// async : false,
  248. //// callback : function(options,success,response) {
  249. //// console.log(response);
  250. //// var res = new Ext.decode(response.responseText);
  251. //// if (res.error) {
  252. //// showError(res.error);
  253. //// }
  254. //// }
  255. //// });
  256. // } else {
  257. // Ext.Ajax.request({
  258. // url : basePath + 'oa/zip.action',
  259. // params : {
  260. // id : items[0].data["dc_id"]
  261. // },
  262. // async : false,
  263. // callback : function(options,success,response) {
  264. // console.log(response);
  265. // var res = new Ext.decode(response.responseText);
  266. // if (res.error) {
  267. // showError(res.error);
  268. // } else {
  269. // if (res.warning) {
  270. // alert(res.warning);
  271. // }
  272. // alert(res.path);
  273. // window.location.href = basePath + 'oa/download.action?path=' + res.path;
  274. // }
  275. // }
  276. // });
  277. // }
  278. //// path = items[0].data['dc_id'];
  279. // }
  280. // }
  281. },{
  282. iconCls: 'x-button-icon-print',
  283. text: "查看",
  284. handler: function(){
  285. var me = Ext.getCmp('treegrid');
  286. var items = me.selModel.selected.items;
  287. if(items[0] != null && items[0].data.dc_isfile == 'T'){
  288. var id = items[0].data.dc_version.split(".")[1];
  289. if(id != null && id != ''){
  290. if(items[0].data.dc_creator_id == em_uu || Ext.getCmp('treegrid').getDocumentListPower(id).see == 1){
  291. var panel = Ext.getCmp("documentlist" + id);
  292. var main = parent.Ext.getCmp("content-panel");
  293. if(!panel){
  294. var title = items[0].data.dc_displayname;
  295. panel = {
  296. title : title,
  297. tag : 'iframe',
  298. tabConfig:{tooltip: items[0].data.dc_displayname},
  299. frame : true,
  300. border : false,
  301. layout : 'fit',
  302. iconCls : 'x-tree-icon-tab-tab1',
  303. html : '<iframe id="iframe_documentlist_' + id + '" src="' + basePath + "jsps/oa/document/documentDetail.jsp?id=" + id + '" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>',
  304. closable : true,
  305. listeners : {
  306. close : function(){
  307. main.setActiveTab(main.getActiveTab().id);
  308. }
  309. }
  310. };
  311. me.FormUtil.openTab(panel, "documentlist" + id);
  312. }else{
  313. main.setActiveTab(panel);
  314. }
  315. } else {
  316. showError("亲!你没有相关操作权限哦!");return;
  317. }
  318. }
  319. } else {
  320. showError("亲!请选择要查看的文档");return;
  321. }
  322. }
  323. },{
  324. iconCls: 'x-button-icon-scan',
  325. text: "刷新",
  326. handler: function(){
  327. Ext.getCmp('treegrid').getTreeGridNode({parentId: 0});
  328. }
  329. },{
  330. xtype: 'tbtext',
  331. id: 'path',
  332. style: 'background: #C6d1c5'
  333. }],
  334. bodyStyle:'background-color:#f1f1f1;',
  335. initComponent : function(){
  336. Ext.override(Ext.data.AbstractStore,{
  337. indexOf: Ext.emptyFn
  338. });
  339. this.callParent(arguments);
  340. this.getTreeGridNode({parentId: 0});
  341. },
  342. listeners: {//滚动条有时候没反应,添加此监听器
  343. scrollershow: function(scroller) {
  344. if (scroller && scroller.scrollEl) {
  345. scroller.clearManagedListeners();
  346. scroller.mon(scroller.scrollEl, 'scroll', scroller.onElScroll, scroller);
  347. }
  348. }
  349. },
  350. getTreeGridNode: function(param){
  351. var me = this;
  352. var activeTab = me.getActiveTab();
  353. activeTab.setLoading(true);
  354. Ext.Ajax.request({//拿到tree数据
  355. url : basePath + 'common/lazyDocumentTree.action',
  356. params: param,
  357. callback : function(options,success,response){
  358. var res = new Ext.decode(response.responseText);
  359. activeTab.setLoading(false);
  360. if(res.tree){
  361. var tree = res.tree;
  362. console.log(response);
  363. Ext.each(tree, function(t){
  364. t.dc_id = t.id;
  365. t.dc_parentid = t.parentId;
  366. t.dc_displayname = t.text;
  367. t.dc_isfile = t.leaf ? 'T' : 'F';
  368. // t.dc_tabtitle = t.text;
  369. // t.dc_url = t.url;
  370. // t.dc_deleteable = t.deleteable ? 'T' : 'F';
  371. t.dc_updatetime = t.updatetime;
  372. // t.dc_filesize = t.filesize;
  373. t.dc_creator = t.creator;
  374. t.dc_creator_id = t.creator_id;
  375. t.dc_version = t.version;
  376. });
  377. me.store.setRootNode({
  378. text: 'root',
  379. id: 'root',
  380. expanded: true,
  381. children: tree
  382. });
  383. Ext.each(me.store.tree.root.childNodes, function(){
  384. this.dirty = false;
  385. });
  386. } else if(res.exceptionInfo){
  387. showError(res.exceptionInfo);
  388. }
  389. }
  390. });
  391. },
  392. checkChild: function(record){
  393. var me = this;
  394. if(!record.data['leaf']){
  395. if(record.childNodes.length > 0){
  396. if(record.data['dc_id'] == null || record.data['dc_id'] == ''){
  397. warnMsg('如果在节点' + record.data['dc_id'] + '下添加子节点,需先保存该节点,是否保存?', function(btn){
  398. if(btn == 'yes'){
  399. if(items[0].data['dc_displayname'] == null || items[0].data['dc_displayname'] == ''){
  400. showError('请先描述该节点');
  401. return;
  402. } else {
  403. me.saveNodes.push(items[0]);
  404. me.saveNode();
  405. }
  406. } else if(btn == 'no'){
  407. return;
  408. }
  409. });
  410. }
  411. Ext.each(record.childNodes, function(){
  412. me.checkChild(this);
  413. });
  414. } else if(record.childNodes.length == 0){
  415. if(record.data['dc_id'] == null || record.data['dc_id'] == '')
  416. if(record.data['dc_displayname'] == null || record.data['dc_displayname'] == ''){
  417. showError('请先描述该节点');
  418. return;
  419. } else {
  420. me.saveNodes.push(record);
  421. me.saveNode();
  422. }
  423. }
  424. } else {
  425. if(record.dirty){
  426. if(record.data['dc_id'] == null || record.data['dc_id'] == ''){
  427. me.saveNodes.push(record);
  428. } else {
  429. me.updateNodes.push(record);
  430. }
  431. }
  432. }
  433. },
  434. saveNode: function(){
  435. var me = this;
  436. me.getUpdateNodes();
  437. var save = new Array();
  438. var update = new Array();
  439. var index = 0;
  440. Ext.each(me.saveNodes, function(){
  441. if(this.data.dc_displayname != null && this.data.dc_displayname != ''){
  442. if(this.data.dc_tabtitle == null || this.data.dc_tabtitle == ''){
  443. this.data.dc_tabtitle == this.data.dc_displayname;
  444. }
  445. // if(this.data.dc_deleteable == null || this.data.dc_deleteable == ''){
  446. // this.data.dc_deleteable == 'T';
  447. // }
  448. var o = {
  449. dc_id: this.data.dc_id,
  450. dc_displayname: this.data.dc_displayname,
  451. // dc_url: this.data.dc_url,
  452. dc_isfile: this.data.dc_isfile,
  453. // dc_tabtitle: this.data.dc_tabtitle,
  454. dc_parentid: this.data.dc_parentid,
  455. // dc_deleteable: this.data.dc_deleteable
  456. };
  457. save[index++] = Ext.JSON.encode(o);
  458. }
  459. });
  460. index = 0;
  461. Ext.each(me.updateNodes, function(){
  462. if(this.data.dc_displayname != null && this.data.dc_displayname != ''){
  463. if(this.data.dc_tabtitle == null || this.data.dc_tabtitle == ''){
  464. this.data.dc_tabtitle == this.data.dc_displayname;
  465. }
  466. // if(this.data.dc_deleteable == null || this.data.dc_deleteable == ''){
  467. // this.data.dc_deleteable == 'T';
  468. // }
  469. var o = {
  470. dc_id: this.data.dc_id,
  471. dc_displayname: this.data.dc_displayname,
  472. // dc_url: this.data.dc_url,
  473. dc_isfile: this.data.dc_isfile,
  474. // dc_tabtitle: this.data.dc_tabtitle,
  475. dc_parentid: this.data.dc_parentid,
  476. // dc_deleteable: this.data.dc_deleteable
  477. };
  478. update[index++] = Ext.JSON.encode(o);
  479. }
  480. });
  481. if(save.length > 0 || update.length > 0){
  482. var activeTab = me.getActiveTab();
  483. activeTab.setLoading(true);
  484. Ext.Ajax.request({
  485. url : basePath + 'oa/saveDocumentCatalog.action',
  486. params: {
  487. save: unescape(save.toString().replace(/\\/g,"%")),
  488. update: unescape(update.toString().replace(/\\/g,"%"))
  489. },
  490. callback : function(options,success,response){
  491. var res = new Ext.decode(response.responseText);
  492. activeTab.setLoading(false);
  493. if(res.success){
  494. me.saveNodes = [];
  495. me.updateNodes = [];
  496. me.getTreeGridNode({parentId: 0});
  497. } else if(res.exceptionInfo){
  498. showError(res.exceptionInfo);
  499. }
  500. }
  501. });
  502. }
  503. },
  504. getExpandItem: function(root){
  505. var me = this;
  506. if(!root){
  507. root = this.store.tree.root;
  508. }
  509. var node = null;
  510. if(root.childNodes.length > 0){
  511. Ext.each(root.childNodes, function(){
  512. if(this.isExpanded()){
  513. node = this;
  514. if(this.childNodes.length > 0){
  515. var n = me.getExpandItem(this);
  516. node = n == null ? node : n;
  517. }
  518. }
  519. });
  520. }
  521. return node;
  522. },
  523. getExpandNode: function(root){
  524. var treegrid = Ext.getCmp('treegrid');
  525. var items = treegrid.selModel.selected.items;
  526. var road = '';
  527. Ext.each(items,function(){
  528. // console.log(items.length);
  529. road += this.data['dc_id'];
  530. });
  531. return road;
  532. },
  533. deleteNode: function(record){
  534. var me = this;
  535. if(record){
  536. var activeTab = me.getActiveTab();
  537. activeTab.setLoading(true);
  538. Ext.Ajax.request({
  539. url : basePath + 'oa/deleteDocumentCatalog.action',
  540. params: {
  541. id: Number(record.data['dc_id'])
  542. },
  543. callback : function(options,success,response){
  544. var res = new Ext.decode(response.responseText);
  545. // console.log(response);
  546. activeTab.setLoading(false);
  547. if(res.success){
  548. record.remove(true);
  549. } else if(res.exceptionInfo){
  550. showError(res.exceptionInfo);
  551. }
  552. }
  553. });
  554. }
  555. },
  556. getUpdateNodes: function(root){
  557. var me = this;
  558. if(!root){
  559. root = this.store.tree.root;
  560. me.updateNodes = [];
  561. }
  562. if(root.childNodes.length > 0){
  563. Ext.each(root.childNodes, function(){
  564. if(this.dirty){
  565. if(this.data['dc_id'] != null && this.data['dc_id'] != ''){
  566. me.updateNodes.push(this);
  567. }
  568. }
  569. if(this.data['leaf'] == false && this.childNodes.length > 0){
  570. me.getUpdateNodes(this);
  571. }
  572. });
  573. } else {
  574. if(root.dirty){
  575. if(root.data['dc_id'] != null && root.data['dc_id'] != ''){
  576. me.updateNodes.push(root);
  577. }
  578. }
  579. }
  580. },
  581. getActiveTab: function(){
  582. var tab = null;
  583. if(Ext.getCmp("content-panel")){
  584. tab = Ext.getCmp("content-panel").getActiveTab();
  585. }
  586. if(!tab){
  587. var win = parent.Ext.ComponentQuery.query('window');
  588. if(win.length > 0){
  589. tab = win[win.length-1];
  590. }
  591. }
  592. if(!tab && parent.Ext.getCmp("content-panel"))
  593. tab = parent.Ext.getCmp("content-panel").getActiveTab();
  594. if(!tab && parent.parent.Ext.getCmp("content-panel"))
  595. tab = parent.parent.Ext.getCmp("content-panel").getActiveTab();
  596. return tab;
  597. },
  598. getExpandedItems: function(record){
  599. var me = this;
  600. me.getRecordParents(record);
  601. if(record.isExpanded()){
  602. } else {
  603. me.expandedNodes.push(record);
  604. }
  605. },
  606. getRecordParents: function(record, parent){
  607. var me = this;
  608. if(!parent){
  609. parent = me.store.tree.root;
  610. me.expandedNodes = [];
  611. }
  612. if(parent.childNodes.length > 0){
  613. Ext.each(parent.childNodes, function(){
  614. if(this.isExpanded()){
  615. me.expandedNodes.push(this);
  616. if(this.childNodes.length > 0){
  617. me.getRecordParents(record, this);
  618. }
  619. }
  620. });
  621. }
  622. },
  623. getDocumentListPower: function(id){
  624. var o = new Object();
  625. Ext.Ajax.request({//拿到grid的columns
  626. url : basePath + 'hr/employee/getJobDocumentListPower.action',
  627. params: {
  628. dcl_id: id,
  629. em_id: em_uu
  630. },
  631. method : 'post',
  632. async: false,
  633. callback : function(options, success, response){
  634. parent.Ext.getCmp("content-panel").getActiveTab().setLoading(false);
  635. console.log(response);
  636. var res = new Ext.decode(response.responseText);
  637. if(res.exceptionInfo){
  638. showError(res.exceptionInfo);return;
  639. }
  640. if(!res.success){
  641. return;
  642. } else {
  643. // alert(o.DELETE);
  644. o.see = res.documentlistpower == null ? 0 : res.documentlistpower.dlp_see;
  645. o.edit = res.documentlistpower == null ? 0 : res.documentlistpower.dlp_edit;
  646. o.share = res.documentlistpower == null ? 0 : res.documentlistpower.dlp_share;
  647. o.del = res.documentlistpower == null ? 0 : res.documentlistpower.dlp_delete;
  648. o.download = res.documentlistpower == null ? 0 : res.documentlistpower.dlp_download;
  649. o.journal = res.documentlistpower == null ? 0 : res.documentlistpower.dlp_journal;
  650. }
  651. }
  652. });
  653. return o;
  654. }
  655. });