jry_emergencyCtrl.js 25 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013
  1. 'use strict';
  2. app.controller('jry_emergencyCtrl', ["$scope", "i18nService", "$rootScope", "$state", "$timeout", "$interval", "$modal", "SweetAlert", "uiGridConstants", "uiGridGroupingConstants", "Restangular", "api_bpm_data", "api_text", 'moment','api_wechatfile',
  3. function($scope, i18nService, $rootScope, $state, $timeout, $interval, $modal, SweetAlert, uiGridConstants, uiGridGroupingConstants, Restangular, api_bpm_data, api_text, moment,api_wechatfile) {
  4. console.log($scope);
  5. $scope.langs = i18nService.getAllLangs();
  6. $scope.lang = 'zh-cn';
  7. i18nService.setCurrentLang($scope.lang);
  8. // $(window).resize(function() {
  9. // // console.log("1111")
  10. // });
  11. var loginUser = $rootScope.user;
  12. // var voiceurl=$rootScope.audioiIp;
  13. // delete $rootScope.user.authority;
  14. var pdKey = $state.current.pdKey;
  15. $scope.gridOptions = {};
  16. $scope.gridOptions.data = 'myData';
  17. $scope.gridOptions.enableColumnResizing = true;
  18. $scope.gridOptions.enableFiltering = false;
  19. $scope.gridOptions.enableGridMenu = true;
  20. $scope.gridOptions.enableSelectAll = true;
  21. $scope.gridOptions.enableRowSelection = true;
  22. $scope.gridOptions.showGridFooter = true;
  23. $scope.gridOptions.showColumnFooter = false;
  24. $scope.gridOptions.fastWatch = true;
  25. $scope.gridOptions.enableSorting = true;
  26. $scope.gridOptions.useExternalSorting = true;
  27. $scope.gridOptions.useExternalFiltering = false;
  28. $scope.gridOptions.useExternalPagination = true;
  29. $scope.gridOptions.paginationPageSizes = [10, 15, 20, 50, 100];
  30. $scope.gridOptions.paginationPageSize = 15;
  31. $scope.gridOptions.multiSelect = true;
  32. var mun = $scope.gridOptions.paginationPageSize;
  33. // $scope.gridOptions.rowTemplate = "<div ng-click=\"lookFunction(row)\" ng-repeat=\"(colRenderIndex, col) in colContainer.renderedColumns track by col.uid\" ui-grid-one-bind-id-grid=\"rowRenderIndex + '-' + col.uid + '-cell'\" class=\"ui-grid-cell\" ng-class=\"{ 'ui-grid-row-header-cell': col.isRowHeader }\" role=\"{{col.isRowHeader ? 'rowheader' : 'gridcell'}}\" ui-grid-cell></div>";
  34. $scope.gridOptions.rowIdentity = function(row) {
  35. return row.id;
  36. };
  37. $scope.gridOptions.getRowIdentity = function(row) {
  38. return row.id;
  39. };
  40. $scope.gridOptions.columnDefs = [
  41. {
  42. name: 'item',
  43. displayName: '序号',
  44. width: 50,
  45. cellTemplate: '<div>' +
  46. '<div class="ui-grid-cell-contents">{{row.entity.item}}</div>' +
  47. '</div>'
  48. },
  49. {
  50. name: 'alarmSystem',
  51. displayName: '告警来源',
  52. width: '10%',
  53. maxWidth:'120',
  54. cellTemplate: '<div>' +
  55. '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center" >{{row.entity.alarm.alarmSystem}}</div>' +
  56. '</div>'
  57. }, {
  58. name: 'incidentDescription',
  59. displayName: '告警内容',
  60. width: '20%',
  61. cellTemplate: '<div>' +
  62. '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center" >{{row.entity.alarm.alarmContent}}</div>' +
  63. '</div>'
  64. }, {
  65. name: 'requester.name',
  66. displayName: '告警类型',
  67. width: '10%',
  68. cellTemplate: '<div>' +
  69. '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center" >{{row.entity.alarm.alarmType}}</div>' +
  70. '</div>'
  71. }, {
  72. name: 'alarmStatus',
  73. displayName: '告警状态',
  74. width: '8%',
  75. cellTemplate: '<div>' +
  76. '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center" >{{row.entity.alarm.alarmStatus}}</div>' +
  77. '</div>'
  78. }, {
  79. name: 'state',
  80. displayName: '工单状态',
  81. width: '8%',
  82. cellTemplate: '<div>' +
  83. '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center" >{{row.entity.state.name}}</div>' +
  84. '</div>'
  85. }, {
  86. name: 'address',
  87. displayName: '定位',
  88. width: '13%',
  89. maxWidth:'120',
  90. cellTemplate: '<div>' +
  91. '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center" > {{row.entity.alarm.alarmLocation}}</div>' +
  92. '</div>'
  93. }, {
  94. name: 'contactsInformation',
  95. displayName: '紧急度',
  96. width: '6%',
  97. cellTemplate: '<div>' +
  98. '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center" >{{row.entity.alarm.alarmSeverity}}</div>' +
  99. '</div>'
  100. },
  101. {
  102. name: 'createTime',
  103. displayName: '告警时间',
  104. width: '140',
  105. cellTemplate: '<div>' +
  106. '<div class="ui-grid-cell-contents" style="cursor:pointer;text-align:center" >{{grid.appScope.transferTime(row.entity.alarm.alarmActiveTime)}}</div>' +
  107. '</div>'
  108. // },
  109. // {
  110. // name: '生成事件',
  111. // width: 80,
  112. // cellTemplate: '<div class="links cl-effect-1">' +
  113. // '<a ng-click="grid.appScope.selectRowFunction(row.entity)" tooltip="新建事件" tooltip-placement="left"><i class="fa fa-pencil-square-o"></i></a>' +
  114. // '</div>'
  115. },
  116. {
  117. name: '操作',
  118. enableSorting: false,
  119. enableFiltering: false,
  120. width: 295,
  121. cellTemplate: '<wechatoperator2 item="row.entity" colobject="col">'
  122. // '<div class="links cl-effect-1 ui-grid-cell-contents pull-left" >' +
  123. // // '<a ng-click="edit()" ng-show="{{handle}}" tooltip="生成事件" tooltip-placement="left"><i class="icon iconfont icon-bianji bianjifont"></i></a>' +
  124. // '<a ng-click="edit()" ng-if="handle" class="bianjifont">建单</a>' + '<a ng-click="notAccept ()" class="bianjifont">不受理</a>' + '<a ng-click="being ()" class="bianjifont">暂不处理</a>' +
  125. // // '<a ng-click="look()" ng-show="{{!handle}}" tooltip="查看" tooltip-placement="right"><i class="ti-eye"></i></a>' +
  126. // '</div>'
  127. }
  128. ];
  129. // console.log(row);
  130. $scope.wtwt = function(row) {
  131. console.log(row)
  132. }
  133. $scope.value = 10;
  134. $scope.decrement = function(row) {
  135. $scope.value = $scope.value - 1;
  136. };
  137. $scope.transferTime = function(time) {
  138. return moment(time).format('YYYY-MM-DD HH:mm');
  139. }
  140. // $scope.record = function() {
  141. // api_text.record($rootScope.takes).then(function(data){
  142. // if(data.errno==0){
  143. // $scope.busy=false;
  144. // }
  145. // })
  146. // };
  147. $scope.gridOptions.onRegisterApi = function(gridApi) {
  148. // console.log(row);
  149. $scope.gridApi = gridApi;
  150. // var index = 0;
  151. // var oldheader = {};
  152. // gridApi.grid.sortColumn = function(gridApi) {
  153. // if (oldheader.field) {
  154. // if (oldheader.field == gridApi.field) {
  155. // // index = 0;
  156. // } else {
  157. // index = 0;
  158. // }
  159. // }
  160. // index++;
  161. // oldheader = gridApi;
  162. // var fildata = $scope.memoryfilterData;
  163. // if (index % 3 == 0) {
  164. // delete $scope.memoryfilterData.incident;
  165. // fildata = $scope.memoryfilterData;
  166. // } else if (index % 3 == 1) {
  167. // angular.extend(fildata, { 'incident': { "sort": gridApi.field } });
  168. // } else if (index % 3 == 2) {
  169. // angular.extend(fildata, { 'incident': { "sort": gridApi.field, "order": "asc" } });
  170. // }
  171. // $scope.refreshData('expand-right', fildata);
  172. // }
  173. gridApi.pagination.on.paginationChanged($scope, function(newPage, pageSize) {
  174. var filtersData = $scope.memoryfilterData;
  175. filtersData.idx = newPage - 1;
  176. filtersData.sum = pageSize;
  177. $scope.fileData.idx=newPage - 1;
  178. $scope.fileData.sum=pageSize;
  179. $scope.refreshData('expand-right', $scope.fileData);
  180. // $scope.refreshData('expand-right', {"assignee":$rootScope.user.id, "candidateGroups":$rootScope.user.group[0].id, "idx":newPage-1,"sum":pageSize});
  181. });
  182. $scope.selected = {
  183. items: []
  184. }
  185. };
  186. $scope.memoryfilterData = defaultFilterData = {
  187. // "assignee":$rootScope.user.id,
  188. // "candidateGroups":$rootScope.user.group[0].id,
  189. "idx": 0,
  190. "sum": mun,
  191. 'alarmIncident': {
  192. "state": ''
  193. }
  194. };
  195. $scope.selectRowFunction = function(data) {
  196. console.log(data)
  197. var formdata = {
  198. // 'model': {
  199. // 'incident': {
  200. // 'requester': data.requester,
  201. // 'area': data.area,
  202. // 'place': data.place,
  203. // 'houseNumber': data.address,
  204. // 'contacts': data.contacts,
  205. // 'contactsInformation': data.contactsInformation,
  206. // // 'category': data.wxIncidentClassifyDTO.category,
  207. // 'description': data.incidentDescription,
  208. // 'source': { 'id': 4 },
  209. // 'sourceType': data.sourceType,
  210. // 'fileUrl': data.fileUrl
  211. // },
  212. // 'networkInformation': data.requester,
  213. // 'flow': data.id
  214. // }
  215. 'model':{
  216. 'incident':{
  217. 'description':data.alarm.alarmContent,
  218. 'alarm':data.alarm
  219. }
  220. },
  221. 'alarmIncident': data
  222. }
  223. console.log(formdata)
  224. // if (formdata.alarmIncident.state == '未建单') {
  225. // formdata.alarmIncident.state = 0;
  226. // }
  227. delete(formdata.alarmIncident.item);
  228. console.log(formdata);
  229. // if (data.requester.requesterTypeDTO && data.requester.requesterTypeDTO.id == 2) {
  230. // angular.extend(formdata.model.incident, { 'priority': { 'id': 2 } });
  231. // }
  232. if (formdata.alarmIncident.alarm.alarmExtension) {
  233. formdata.alarmIncident.alarm.alarmExtension = formdata.alarmIncident.alarm.alarmExtension.replace('{', "");
  234. formdata.alarmIncident.alarm.alarmExtension = formdata.alarmIncident.alarm.alarmExtension.replace('}', "");
  235. // formdata.alarmIncident.alarm.alarmExtension = formdata.alarmIncident.alarm.alarmExtension.replace(/,/g, '\n');
  236. }
  237. console.log(formdata);
  238. $state.go('app.incident.chart', { 'model': JSON.stringify(formdata) });
  239. };
  240. $scope.lookFunction = function(data) {
  241. var modelfile = { model: { incident: data } };
  242. // $state.go('app.incident.detail', { formKey: 'incident_back', pdKey: 'incident', dataId: data.id, taskId: data.taskId, processInstanceId: data.processInstanceId });
  243. if (data.state == "未受理") {
  244. angular.extend(modelfile.model.incident, { status: 1 })
  245. } else {
  246. angular.extend(modelfile.model.incident, { status: 0 })
  247. }
  248. $state.go('app.desk.form_editor', { formKey: 'desk_detail', service: 'api_user_data', model: JSON.stringify(modelfile) });
  249. };
  250. // $scope.followFunction = function(data){
  251. // //console.log('data='+JSON.stringify(data));
  252. // $state.go('app.detail', { formKey:'statusform', pdKey:'incident', dataId: data.id,processInstanceId: data.processInstanceId});
  253. // };
  254. $scope.onDblClick = function(row) {
  255. console.log(row)
  256. if (row.entity.alarm.alarmExtension) {
  257. row.entity.alarm.alarmExtension = row.entity.alarm.alarmExtension.replace('{', "");
  258. row.entity.alarm.alarmExtension = row.entity.alarm.alarmExtension.replace('}', "");
  259. row.entity.alarm.alarmExtension = row.entity.alarm.alarmExtension.replace(/,/g, '\n');
  260. }
  261. event.stopPropagation();
  262. var modelfile = { model: row.entity };
  263. // if (row.entity.state == "未受理") {
  264. // angular.extend(modelfile.model.incident, { status: 1 })
  265. // } else {
  266. // angular.extend(modelfile.model.incident, { status: 0 })
  267. // }
  268. console.log(modelfile)
  269. $state.go('app.desk.form_editor', { formKey: 'desk_emergency', service: 'api_user_data', model: JSON.stringify(modelfile) });
  270. };
  271. var defaultFilterData = {
  272. // "assignee":$rootScope.user.id,
  273. // "candidateGroups":$rootScope.user.group[0].id,
  274. "idx": 0,
  275. "sum": 15,
  276. alarmIncident: {
  277. state: '未处理',
  278. }
  279. };
  280. // if(angular.isDefined($rootScope.search)&&angular.isDefined($rootScope.search.incident)){
  281. // defaultFilterData['searchType']=$rootScope.search.incident;
  282. // $scope.searchTypes=$rootScope.search.incident;
  283. // }
  284. // if($rootScope['cmdbs']!='incident'){$rootScope.idx=1}
  285. // if(angular.isDefined($rootScope.idx)&&$rootScope.cmdbs!="false"){
  286. // $rootScope['cmdbs']='incident';
  287. // defaultFilterData.idx=$rootScope.idx-1;
  288. // }else{$rootScope.cmdbs="";}
  289. $scope.ldloading = {};
  290. // $scope.Change= function(upTypes){
  291. // if(angular.isDefined(upTypes)&&upTypes=='upincident'){
  292. // $state.go('app.problem.incident',{});
  293. // }
  294. // else if(angular.isDefined(upTypes)&&upTypes=='upchange'){
  295. // $state.go('app.change.incident',{});
  296. // }
  297. // }
  298. // $scope.submit = function(searchType) {
  299. // api_apply.wxIncidentReject(1, { "rejectRemark": "不受理" }).then(function(data) {
  300. // if (data && data.status == 200) {
  301. // SweetAlert.swal({
  302. // title: "提交成功",
  303. // text: '不受理提交成功',
  304. // type: "success",
  305. // }, function() {
  306. // $scope.reload();
  307. // });
  308. // } else {
  309. // SweetAlert.swal({
  310. // title: "提交失败",
  311. // text: '不受理提交失败',
  312. // type: "error"
  313. // });
  314. // }
  315. // });
  316. // }
  317. $scope.onChange = function(searchType) {
  318. // console.log(searchType)
  319. // $scope.searchstate = searchType;
  320. // defaultFilterData = $scope.memoryfilterData;
  321. // defaultFilterData['searchType'] = searchType;
  322. // defaultFilterData.alarmIncident.state = searchType
  323. // console.log(defaultFilterData)
  324. $scope.searchstate=searchType;
  325. $scope.fileData.alarmIncident.state=searchType;
  326. $scope.refreshData('expand-right',$scope.fileData);
  327. }
  328. $scope.refreshData = function(style, filterData) {
  329. // $scope.ldloading[style.replace('-', '_')] = true;
  330. // if (angular.isUndefined(filterData)) {
  331. // filterData = defaultFilterData;
  332. // }
  333. // console.log($scope.searchstate);
  334. // filterData.alarmIncident.state = $scope.searchstate
  335. // console.log(filterData);
  336. console.log(filterData);
  337. $scope.myData = [];
  338. $scope.gridOptions['sum'] = filterData.sum;
  339. api_bpm_data.fetchDataList("alarmIncident", filterData, 'alarmIncident').then(function(data) {
  340. console.log(data)
  341. var myData6 = Restangular.stripRestangular(data);
  342. $scope.gridOptions['totalItems'] = myData6.totalNum;
  343. $scope.myData = myData6.list;
  344. for (var i = 0; i < $scope.myData.length; i++) {
  345. $scope.myData[i]['item'] = i + 1 + filterData.idx * filterData.sum
  346. }
  347. // $scope.handle = false;
  348. // $scope.notBeing = false;
  349. // for (var i = 0; i < $scope.myData.length; i++) {
  350. // $scope.myData[i]['item'] = i + 1 + filterData.idx * filterData.sum;
  351. // // $scope.TIME = $scope.myData[i].alarm['alarmActiveTime'];
  352. // // $scope.myData[i].alarm.alarmActiveTime = moment($scope.TIME).format("YYYY-MM-DD HH:mm:ss");
  353. // console.log($scope.myData[i]['state'])
  354. // if ($scope.myData[i]['state'] == '未处理') {
  355. // $scope.handle = true;
  356. // $scope.notBeing = true;
  357. // }
  358. // else {
  359. // $scope.handle = false;
  360. // }
  361. // if ($scope.myData[i]['state'] == '暂不处理') {
  362. // $scope.notBeing = false;
  363. // $scope.handle = true;
  364. // }
  365. // }
  366. // $scope.ldloading[style.replace('-', '_')] = false;
  367. }, function() {
  368. // $scope.ldloading[style.replace('-', '_')] = false;
  369. });
  370. };
  371. $scope.dictionaryData=[];
  372. $scope.getDictionary=function(){
  373. var data={
  374. "key":"alarmincident_state",
  375. "type":"list"
  376. }
  377. api_wechatfile.getDictionary(data).then(function(res){
  378. $scope.dictionaryData=res;
  379. $scope.fileData={
  380. "idx":0,
  381. "sum":mun,
  382. "alarmIncident":{
  383. "state":$scope.dictionaryData[0]
  384. }
  385. };
  386. $scope.searchstate = $scope.dictionaryData[0];
  387. $scope.refreshData('expand-right', $scope.fileData);
  388. })
  389. } ;
  390. $scope.getDictionary();
  391. }
  392. ]);
  393. app.controller('WechatOperCtrl2', ['$rootScope', '$http', '$scope', '$modal', 'SweetAlert', '$state', 'api_bpm_data', function($rootScope, $http, $scope, $modal, SweetAlert, $state, api_bpm_data) {
  394. $scope.handle = false;
  395. var loginUser = $rootScope.user;
  396. console.log($scope.item);
  397. if ($scope.item.state.name == '未处理') {
  398. $scope.handle = true;
  399. $scope.notBeing = true;
  400. } else {
  401. $scope.handle = false;
  402. }
  403. if ($scope.item.state.name == '暂不处理') {
  404. $scope.notBeing = false;
  405. $scope.handle = true;
  406. }
  407. // if ($scope.item.alarm.alarmStatus == '恢复') {
  408. // $scope.notBeing = false;
  409. // $scope.handle = false;
  410. // }
  411. // console.log($scope.notBeing);
  412. // 处理 --wt
  413. $scope.edit = function() {
  414. $scope.colobject.grid.appScope.selectRowFunction($scope.item);
  415. // $scope.doEdit($scope.item.id);
  416. // console.log($scope.item)
  417. }
  418. // 不处理 --wt
  419. $scope.notAccept = function() {
  420. console.log($scope.item);
  421. var modalInstance = $modal.open({
  422. templateUrl: 'assets/views/desk/emergencyReason.html',
  423. controller: function($scope, $modalInstance, SweetAlert, item, $scope1, style, filterData) {
  424. $scope.ok = function() {
  425. console.log(item)
  426. console.log($scope1.colobject.grid.appScope);
  427. if ($scope.rejectRemark) {
  428. item.rejectRemark = $scope.rejectRemark;
  429. item.oprator = $rootScope.user.name;
  430. delete(item.item);
  431. console.log(item);
  432. // item.state = "不受理";
  433. item.state.id=1605;
  434. // item = { alarmIncident: item };
  435. item={"alarmIncident":item};
  436. api_bpm_data.updData("alarmIncident",item).then(function(data) {
  437. console.log(data);
  438. console.log(item)
  439. SweetAlert.swal({
  440. title: "提交成功!",
  441. confirmButtonColor: "#007AFF"
  442. });
  443. $modalInstance.dismiss('cancel');
  444. $scope1.colobject.grid.appScope.refreshData('expand-right', $scope1.colobject.grid.appScope.fileData);
  445. })
  446. } else {
  447. SweetAlert.swal({
  448. title: "不受理原因为空!",
  449. confirmButtonColor: "#007AFF"
  450. });
  451. }
  452. // $state.go('app.desk.emergency', {});
  453. };
  454. $scope.cancel = function() {
  455. $modalInstance.dismiss('cancel');
  456. };
  457. },
  458. size: 'sm',
  459. resolve: {
  460. item: function() {
  461. return $scope.item;
  462. },
  463. $scope1: function() {
  464. return $scope;
  465. },
  466. style: function() {
  467. return $rootScope.stylewt;
  468. },
  469. filterData: function() {
  470. return $rootScope.filterDatawt;
  471. }
  472. }
  473. });
  474. // $scope.colobject.grid.appScope.lookFunction($scope.item);
  475. // $scope.doEdit($scope.item.id);
  476. };
  477. // 暂不处理 --wt
  478. $scope.being = function() {
  479. console.log($scope.item);
  480. console.log($scope.colobject.grid.appScope)
  481. $scope.item.oprator = $rootScope.user.name;
  482. // $scope.item.state = '暂不处理'
  483. $scope.item.state.id=1606;
  484. delete($scope.item.item);
  485. console.log($scope.item)
  486. $scope.item = { alarmIncident: $scope.item };
  487. api_bpm_data.updData("alarmIncident",$scope.item).then(function(data) {
  488. console.log(data)
  489. if (data.status == 200) {
  490. $scope.notBeing = false;
  491. SweetAlert.swal({
  492. title: "提交成功!",
  493. confirmButtonColor: "#007AFF"
  494. });
  495. $scope.colobject.grid.appScope.refreshData('expand-right', $scope.colobject.grid.appScope.fileData);
  496. }
  497. })
  498. }
  499. console.log($scope.handle)
  500. }]);
  501. app.directive('wechatoperator2', function() {
  502. return {
  503. restrict: 'E',
  504. scope: {
  505. item: '=',
  506. colobject: '='
  507. },
  508. controller: 'WechatOperCtrl2',
  509. template: '<div class="links cl-effect-1 ui-grid-cell-contents pull-left" >' +
  510. // '<a ng-click="edit()" ng-show="{{handle}}" tooltip="生成事件" tooltip-placement="left"><i class="icon iconfont icon-bianji bianjifont"></i></a>' +
  511. '<a ng-click="edit()" ng-show="{{handle}}" class="bianjifont">建单</a>' + '<a ng-click="notAccept ()" ng-show="{{handle}}" class="bianjifont">不受理</a>' + '<a ng-click="being ()" ng-show="{{notBeing}}" class="bianjifont">暂不处理</a>' +
  512. // '<a ng-click="look()" ng-show="{{!handle}}" tooltip="查看" tooltip-placement="right"><i class="ti-eye"></i></a>' +
  513. '</div>'
  514. };
  515. });