MyAppeal.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  1. MWF.xDesktop.requireApp("Attendance", "Explorer", null, false);
  2. MWF.xDesktop.requireApp("Selector", "package", null, false);
  3. MWF.xDesktop.requireApp("Template", "MForm", null, false);
  4. MWF.xApplication.Attendance.MyAppeal = new Class({
  5. Extends: MWF.xApplication.Attendance.Explorer,
  6. Implements: [Options, Events],
  7. initialize: function(node, app, actions, options){
  8. this.setOptions(options);
  9. this.app = app;
  10. this.path = "/x_component_Attendance/$MyAppeal/";
  11. this.cssPath = "/x_component_Attendance/$MyAppeal/"+this.options.style+"/css.wcss";
  12. this._loadCss();
  13. this.actions = actions;
  14. this.node = $(node);
  15. this.initData();
  16. if (!this.personActions) this.personActions = new MWF.xAction.org.express.RestActions();
  17. },
  18. load: function(){
  19. this.loadToolbar();
  20. this.loadFilter();
  21. this.loadContentNode();
  22. var month = (new Date().getMonth()+1).toString();
  23. if( month.length == 1 )month = "0"+month;
  24. var filterData = {
  25. "status" : "999",
  26. "yearString" : new Date().getFullYear().toString(),
  27. "monthString" : month
  28. };
  29. this.loadView( filterData );
  30. this.setNodeScroll();
  31. },
  32. loadFilter: function(){
  33. this.fileterNode = new Element("div.fileterNode", {
  34. "styles" : this.css.fileterNode
  35. }).inject(this.node);
  36. var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' style='width: 560px;font-size: 14px;color:#666'>"+
  37. "<tr>" +
  38. " <td styles='filterTableTitle' item='date'></td>"+
  39. " <td styles='filterTableTitle' lable='status'></td>"+
  40. " <td styles='filterTableValue' item='status'></td>" +
  41. " <td styles='filterTableTitle' lable='appealReason'></td>"+
  42. " <td styles='filterTableValue' item='appealReason'></td>" +
  43. " <td styles='filterTableValue' item='action'></td>" +
  44. "</tr>" +
  45. "</table>";
  46. this.fileterNode.set("html",html);
  47. MWF.xDesktop.requireApp("Template", "MForm", function(){
  48. this.form = new MForm( this.fileterNode, {}, {
  49. isEdited : true,
  50. itemTemplate : {
  51. date : { "type" : "innerText", value : (new Date).format(this.app.lp.dateFormatMonth) },
  52. status : {
  53. "text" : "申述状态",
  54. "type" : "select",
  55. "value" : "999",
  56. "selectText" :["所有状态","待处理","审批通过","审批未通过"],
  57. "selectValue" :["999","0","1","-1"]
  58. },
  59. appealReason : {
  60. "text" : "申述原因",
  61. "type" : "select",
  62. "selectText" :["","临时请假","出差","因公外出","其他"]
  63. },
  64. action : { "value" : "查询", type : "button", className : "filterButton", event : {
  65. click : function(){
  66. var result = this.form.getResult(true,",",true,true,false);
  67. if( !result )return;
  68. this.loadView( result );
  69. }.bind(this)
  70. }}
  71. }
  72. }, this.app, this.css);
  73. this.form.load();
  74. }.bind(this), true);
  75. },
  76. //loadFilter : function(){
  77. // this.fileterNode = new Element("div.fileterNode", {
  78. // "styles" : this.css.fileterNode
  79. // }).inject(this.node)
  80. //
  81. // var table = new Element("table", {
  82. // "width" : "100%", "border" : "0", "cellpadding" : "5", "cellspacing" : "0", "styles" : this.css.filterTable, "class" : "filterTable"
  83. // }).inject( this.fileterNode );
  84. //
  85. // var tr = new Element("tr").inject(table);
  86. //
  87. // var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : (new Date).format(this.app.lp.dateFormatMonth) }).inject(tr);
  88. //
  89. // this.createStatusSelectTd(tr);
  90. // this.createAppealReasonTd(tr);
  91. // //this.createUnitTd(tr);
  92. // //this.createPersonTd( tr );
  93. // //this.createYearSelectTd( tr );
  94. // //this.createMonthSelectTd( tr );
  95. // this.createActionTd( tr );
  96. //},
  97. //createStatusSelectTd : function( tr ){
  98. // var _self = this;
  99. // var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "审批状态" }).inject(tr);
  100. // var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
  101. // this.status = new MDomItem( td, {
  102. // "name" : "status",
  103. // "type" : "select",
  104. // "value" : "999",
  105. // "selectText" :["所有状态","待处理","审批通过","审批未通过"],
  106. // "selectValue" :["999","0","1","-1"]
  107. // }, true, this.app );
  108. // this.status.load();
  109. //},
  110. //createAppealReasonTd : function( tr ){
  111. // var _self = this;
  112. // var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "申诉原因" }).inject(tr);
  113. // var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
  114. // this.appealReason = new MDomItem( td, {
  115. // "name" : "appealReason",
  116. // "type" : "select",
  117. // "selectText" :["","临时请假","出差","因公外出","其他"]
  118. // }, true, this.app );
  119. // this.appealReason.load();
  120. //},
  121. //createUnitTd : function(tr){
  122. // var _self = this;
  123. // var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "部门" }).inject(tr);
  124. // var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
  125. // this.unitName = new MDomItem( td, {
  126. // "name" : "unitName",
  127. // "style" : {"width":"60px"},
  128. // "defaultValue" : this.app.manageUnits.length > 0 ? this.app.manageUnits[0] : "",
  129. // "event" : {
  130. // "click" : function(mdi){ _self.selecePerson( mdi, "unit" ); }
  131. // }
  132. // }, true, this.app );
  133. // this.unitName.load();
  134. //},
  135. //createPersonTd : function(tr){
  136. // var _self = this;
  137. // var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "人员" }).inject(tr);
  138. // var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
  139. // this.empName = new MDomItem( td, {
  140. // "name" : "empName",
  141. // "style" : {"width":"60px"},
  142. // "event" : {
  143. // "click" : function(mdi){ _self.selecePerson( mdi, "person" ); }
  144. // }
  145. // }, true, this.app );
  146. // this.empName.load();
  147. //},
  148. //createYearSelectTd : function( tr ){
  149. // var _self = this;
  150. // var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "年度" }).inject(tr);
  151. // var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
  152. // this.yearString = new MDomItem( td, {
  153. // "name" : "yearString",
  154. // "type" : "select",
  155. // "selectValue" : function(){
  156. // var years = [];
  157. // var year = new Date().getFullYear();
  158. // for(var i=0; i<6; i++ ){
  159. // years.push( year-- );
  160. // }
  161. // return years;
  162. // }
  163. // }, true, this.app );
  164. // this.yearString.load();
  165. //},
  166. //createMonthSelectTd : function( tr ){
  167. // var _self = this;
  168. // var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "月份" }).inject(tr);
  169. // var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
  170. // this.monthString = new MDomItem( td, {
  171. // "name" : "monthString",
  172. // "type" : "select",
  173. // "selectValue" :["","01","02","03","04","05","06","07","08","09","10","11","12"]
  174. // }, true, this.app );
  175. // this.monthString.load();
  176. //},
  177. //createActionTd : function( tr ){
  178. // var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
  179. // var input = new Element("button",{
  180. // "text" : "查询",
  181. // "styles" : this.css.filterButton
  182. // }).inject(td);
  183. // input.addEvent("click", function(){
  184. // var filterData = {
  185. // status : this.status.getValue(),
  186. // appealReason : this.appealReason.getValue(),
  187. // //unitName : this.unitName.getValue(),
  188. // //empName : this.empName.getValue(),
  189. // //yearString : this.yearString.getValue(),
  190. // //monthString : this.monthString.getValue()
  191. // }
  192. // this.loadView( filterData );
  193. // }.bind(this))
  194. //},
  195. //selecePerson: function( el, type ){
  196. // var text = "选择人员"
  197. // if( type=="topUnit") {
  198. // text = "选择公司"
  199. // }else if( type=="unit"){
  200. // text = "选择部门"
  201. // }
  202. // var options = {
  203. // "type": type, //topUnit unit person,
  204. // "title": text,
  205. // "count" : "1",
  206. // "values": [ el.get("value") ] || [],
  207. // "onComplete": function(items){
  208. // var arr = [];
  209. // items.each(function(item){
  210. // arr.push(item.data.name);
  211. // }.bind(this));
  212. // el.set("value",arr.join(","));
  213. // }.bind(this)
  214. // };
  215. // var selector = new MWF.O2Selector(this.app.content, options);
  216. //},
  217. setContentSize: function(){
  218. var toolbarSize = this.toolbarNode ? this.toolbarNode.getSize() : {"x":0,"y":0};
  219. var titlebarSize = this.app.titleBar ? this.app.titleBar.getSize() : {"x":0,"y":0};
  220. var filterSize = this.fileterNode ? this.fileterNode.getSize() : {"x":0,"y":0};
  221. var nodeSize = this.node.getSize();
  222. var pt = this.elementContentNode.getStyle("padding-top").toFloat();
  223. var pb = this.elementContentNode.getStyle("padding-bottom").toFloat();
  224. //var filterSize = this.filterNode.getSize();
  225. var filterConditionSize = this.filterConditionNode ? this.filterConditionNode.getSize() : {"x":0,"y":0};
  226. var height = nodeSize.y-toolbarSize.y-pt-pb-filterConditionSize.y-titlebarSize.y-filterSize.y;
  227. this.elementContentNode.setStyle("height", ""+height+"px");
  228. this.pageCount = (height/30).toInt()+5;
  229. if (this.view && this.view.items.length<this.pageCount){
  230. this.view.loadElementList(this.pageCount-this.view.items.length);
  231. }
  232. },
  233. loadView : function( filterData ){
  234. this.elementContentNode.empty();
  235. this.view = new MWF.xApplication.Attendance.MyAppeal.View(this.elementContentNode, this.app,this, this.viewData, this.options.searchKey );
  236. this.view.filterData = filterData;
  237. this.view.load();
  238. this.setContentSize();
  239. },
  240. createDocument: function(){
  241. if(this.view)this.view._createDocument();
  242. }
  243. });
  244. MWF.xApplication.Attendance.MyAppeal.View = new Class({
  245. Extends: MWF.xApplication.Attendance.Explorer.View,
  246. _createItem: function(data){
  247. return new MWF.xApplication.Attendance.MyAppeal.Document(this.table, data, this.explorer, this);
  248. },
  249. _getCurrentPageData: function(callback, count){
  250. if(!count )count=20;
  251. var id = (this.items.length) ? this.items[this.items.length-1].data.id : "(0)";
  252. var filter = this.filterData || {};
  253. var month = (new Date().getMonth()+1).toString();
  254. if( month.length == 1 )month = "0"+month;
  255. filter.yearString = new Date().getFullYear().toString();
  256. filter.monthString = month;
  257. filter.empName = layout.desktop.session.user.distinguishedName;
  258. this.actions.listAppealFilterNext(id, count, filter, function(json){
  259. var data = json.data;
  260. data.sort( function( a, b ){
  261. return parseInt( b.appealDateString.replace(/-/g,"") ) - parseInt( a.appealDateString.replace(/-/g,"") );
  262. });
  263. json.data = data;
  264. if (callback) callback(json);
  265. });
  266. },
  267. _removeDocument: function(documentData, all){
  268. },
  269. _createDocument: function(){
  270. },
  271. _openDocument: function( documentData ){
  272. var appeal = new MWF.xApplication.Attendance.MyAppeal.Appeal(this.explorer, documentData );
  273. appeal.open();
  274. }
  275. });
  276. MWF.xApplication.Attendance.MyAppeal.Document = new Class({
  277. Extends: MWF.xApplication.Attendance.Explorer.Document,
  278. agree : function(){
  279. },
  280. deny : function(){
  281. }
  282. });
  283. MWF.xApplication.Attendance.MyAppeal.Appeal = new Class({
  284. Extends: MWF.widget.Common,
  285. initialize: function( explorer, data ){
  286. this.explorer = explorer;
  287. this.app = explorer.app;
  288. this.data = data || {};
  289. //this.app.restActions.getAppeal(this.data.detailId, function(json){
  290. // this.data = json.data
  291. //}.bind(this),null,false)
  292. //alert(JSON.stringify(this.data))
  293. this.css = this.explorer.css;
  294. this.load();
  295. },
  296. load: function(){
  297. this.app.restActions.getDetail(this.data.detailId, function(json){
  298. this.data.onDutyTime = json.data.onDutyTime;
  299. this.data.offDutyTime = json.data.offDutyTime;
  300. }.bind(this),null,false)
  301. },
  302. open: function(e){
  303. this.isNew = false;
  304. this.isEdited = false;
  305. this._open();
  306. },
  307. create: function(){
  308. this.isNew = true;
  309. this._open();
  310. },
  311. edit: function(){
  312. this.isEdited = true;
  313. this._open();
  314. },
  315. _open : function(){
  316. this.createMarkNode = new Element("div", {
  317. "styles": this.css.createMarkNode,
  318. "events": {
  319. "mouseover": function(e){e.stopPropagation();},
  320. "mouseout": function(e){e.stopPropagation();}
  321. }
  322. }).inject(this.app.content, "after");
  323. this.createAreaNode = new Element("div", {
  324. "styles": this.css.createAreaNode
  325. });
  326. this.createNode();
  327. this.createAreaNode.inject(this.createMarkNode, "after");
  328. this.createAreaNode.fade("in");
  329. this.setCreateNodeSize();
  330. this.setCreateNodeSizeFun = this.setCreateNodeSize.bind(this);
  331. this.addEvent("resize", this.setCreateNodeSizeFun);
  332. },
  333. createNode: function(){
  334. var _self = this;
  335. this.createNode = new Element("div", {
  336. "styles": this.css.createNode
  337. }).inject(this.createAreaNode);
  338. //
  339. //this.createIconNode = new Element("div", {
  340. // "styles": this.isNew ? this.css.createNewNode : this.css.createIconNode
  341. //}).inject(this.createNode);
  342. this.createContainerNode = new Element("div", {
  343. "styles": this.css.createContainerNode
  344. }).inject(this.createNode);
  345. this.setScrollBar( this.createContainerNode );
  346. this.createFormNode = new Element("div", {
  347. "styles": this.css.createFormNode
  348. }).inject(this.createContainerNode);
  349. this.createTableContainer = new Element("div", {
  350. "styles": this.css.createTableContainer
  351. }).inject(this.createFormNode);
  352. this.createTableArea = new Element("div", {
  353. "styles": this.css.createTableArea
  354. }).inject(this.createTableContainer);
  355. var d = this.data;
  356. var appealStatus = "发起";
  357. if (d.status == 0 ) {
  358. appealStatus = "待处理"
  359. } else if (d.status == 1) {
  360. appealStatus = "审批通过"
  361. } else if (d.status == -1) {
  362. appealStatus = "申诉不通过"
  363. }
  364. this.data.appealStatusShow = appealStatus;
  365. var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' styles='formTable'>"+
  366. "<tr><td colspan='4' styles='formTableHead'>申诉申请单</td></tr>" +
  367. "<tr><td styles='formTableTitle'>员工姓名</td>"+
  368. " <td styles='formTableValue'>"+this.data.empName.split("@")[0]+"</td>" +
  369. " <td styles='formTableTitle' lable='recordDateString'></td>"+
  370. " <td styles='formTableValue' item='recordDateString'></td></tr>" +
  371. "<tr><td styles='formTableTitle' lable='onDutyTime'></td>"+
  372. " <td styles='formTableValue' item='onDutyTime'></td>" +
  373. " <td styles='formTableTitle' lable='offDutyTime'></td>"+
  374. " <td styles='formTableValue' item='offDutyTime'></td></tr>" +
  375. "<tr><td styles='formTableTitle' lable='appealStatusShow'></td>"+
  376. " <td styles='formTableValue' item='appealStatusShow' colspan='3'></td></tr>" +
  377. "<tr><td styles='formTableTitle' lable='appealReason'></td>"+
  378. " <td styles='formTableValue' item='appealReason'></td>" +
  379. " <td styles='formTableTitle' lable='processPerson1Show'></td>"+
  380. " <td styles='formTableValue' item='processPerson1Show'></td></tr>" +
  381. "<tr contain='selfHolidayType'><td styles='formTableTitle' lable='selfHolidayType'></td>"+
  382. " <td styles='formTableValue' item='selfHolidayType' colspan='3'></td></tr>" +
  383. "<tr contain='address'><td styles='formTableTitle' lable='address'></td>"+
  384. " <td styles='formTableValue' item='address' colspan='3'></td></tr>" +
  385. "<tr contain='startTime'><td styles='formTableTitle' lable='startTime'></td>"+
  386. " <td styles='formTableValue' item='startTime' colspan='3'></td></tr>" +
  387. "<tr contain='endTime'><td styles='formTableTitle' lable='endTime'></td>"+
  388. " <td styles='formTableValue' item='endTime' colspan='3'></td></tr>" +
  389. "<tr contain='appealDescription'><td styles='formTableTitle' lable='appealDescription'></td>"+
  390. " <td styles='formTableValue' item='appealDescription' colspan='3'></td></tr>" +
  391. "<tr contain='opinion1'><td styles='formTableTitle' lable='opinion1'></td>"+
  392. " <td styles='formTableValue' item='opinion1' colspan='3'></td></tr>" +
  393. "</table>";
  394. this.createTableArea.set("html",html);
  395. this.document = new MForm( this.createTableArea, this.data, {
  396. style : "popup",
  397. isEdited : this.isEdited || this.isNew,
  398. itemTemplate : {
  399. recordDateString : { text:"考勤日期", type : "innertext"},
  400. onDutyTime : { text:"上班打卡时间", type : "innertext"},
  401. offDutyTime : { text:"下班打卡时间", type : "innertext"},
  402. statusShow : { text:"考勤状态", type : "innertext" },
  403. appealStatusShow : { text:"审批状态",type : "innertext"},
  404. processPerson1Show : {text:"审核人",type:"innertext", value : this.data.processPerson1.split("@")[0] },
  405. appealReason : {
  406. notEmpty : true,
  407. text:"申述原因",
  408. type : "select",
  409. selectValue : ["","临时请假","出差","因公外出","其他"],
  410. event : { change : function(mdi){
  411. _self.switchFieldByAppealReason(mdi.getValue());
  412. }}
  413. },
  414. address : { text:"地点" },
  415. selfHolidayType : {
  416. text:"请假类型",
  417. type : "select",
  418. selectValue : ["","带薪年休假","带薪病假","带薪福利假","扣薪事假","其他"]
  419. },
  420. startTime : { text:"开始日期", tType : "datetime" },
  421. endTime : { text:"结束日期", tType : "datetime" },
  422. appealDescription : { text:"事由" },
  423. opinion1 : { text :"审批意见" }
  424. }
  425. }, this.app,this.css);
  426. this.document.load();
  427. _self.switchFieldByAppealReason(this.data.appealReason);
  428. //createFormNode.set("html", html);
  429. //this.setScrollBar(this.createTableContainer)
  430. this.cancelActionNode = new Element("div", {
  431. "styles": this.css.createCancelActionNode,
  432. "text": "关闭"
  433. }).inject(this.createFormNode);
  434. this.cancelActionNode.addEvent("click", function(e){
  435. this.cancelCreate(e);
  436. }.bind(this));
  437. if( this.isNew || this.isEdited){
  438. this.denyActionNode = new Element("div", {
  439. "styles": this.css.createDenyActionNode,
  440. "text": "不同意"
  441. }).inject(this.createFormNode);
  442. this.createOkActionNode = new Element("div", {
  443. "styles": this.css.createOkActionNode,
  444. "text": "同意"
  445. }).inject(this.createFormNode);
  446. this.denyActionNode.addEvent("click", function(e){
  447. this.deny(e);
  448. }.bind(this));
  449. this.createOkActionNode.addEvent("click", function(e){
  450. this.okCreate(e);
  451. }.bind(this));
  452. }
  453. },
  454. switchFieldByAppealReason : function( ar ){
  455. var tempField = ["selfHolidayType","startTime","endTime","address","appealDescription"];
  456. var showField = [];
  457. if( ar == "临时请假" ){
  458. showField = ["selfHolidayType","startTime","endTime"];
  459. }else if( ar == "出差" ){
  460. showField = ["address","startTime","endTime"];
  461. }else if( ar == "因公外出" ){
  462. showField = ["address","startTime","endTime","appealDescription"];
  463. }else if( ar == "其他" ){
  464. showField = ["appealDescription"];
  465. }
  466. tempField.each( function( f ){
  467. this.createTableArea.getElement("[contain='"+f+"']").setStyle("display", showField.contains(f) ? "" : "none" );
  468. if( this.isNew || this.isEdited )this.document.items[f].options.notEmpty = (showField.contains(f) ? true : false )
  469. }.bind(this))
  470. },
  471. setCreateNodeSize: function(){
  472. var size = this.app.node.getSize();
  473. var allSize = this.app.content.getSize();
  474. var height = "560";
  475. var width = "800";
  476. this.createAreaNode.setStyles({
  477. "width": ""+size.x+"px",
  478. "height": ""+size.y+"px"
  479. });
  480. var hY = height;
  481. var mY = (size.y-height)/2;
  482. this.createNode.setStyles({
  483. "height": ""+hY+"px",
  484. "margin-top": ""+mY+"px",
  485. "width" : ""+width+"px"
  486. });
  487. this.createContainerNode.setStyles({
  488. "height": ""+hY+"px"
  489. });
  490. var iconSize = this.createIconNode ? this.createIconNode.getSize() : {x:0,y:0};
  491. var formMargin = hY-iconSize.y-60;
  492. this.createFormNode.setStyles({
  493. "height": ""+formMargin+"px",
  494. "margin-top": ""+60+"px"
  495. });
  496. },
  497. cancelCreate: function(e){
  498. this.createMarkNode.destroy();
  499. this.createAreaNode.destroy();
  500. delete this;
  501. },
  502. deny : function(e){
  503. var data = { 'ids' : [this.data.id], 'status':'-1', 'opinion1': this.opinion1.getValue() };
  504. if (data.opinion1 ){
  505. this.process( data );
  506. }else{
  507. this.app.notice( "请填写意见", "error");
  508. }
  509. },
  510. okCreate: function(e){
  511. var data = { 'ids' : [this.data.id], 'status':'1', 'opinion1': this.opinion1.getValue() };
  512. this.process( data );
  513. },
  514. process: function( data ){
  515. this.app.restActions.processAppeal( data, function(json){
  516. if( json.type == "ERROR" ){
  517. this.app.notice( json.message , "error");
  518. }else{
  519. this.createMarkNode.destroy();
  520. this.createAreaNode.destroy();
  521. if(this.explorer.view)this.explorer.view.reload();
  522. this.app.notice( "处理成功" , "success");
  523. }
  524. // this.app.processConfig();
  525. }.bind(this));
  526. }
  527. });