jry_emergencyCtrl.js 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017
  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. if(time){
  139. return moment(time).format('YYYY-MM-DD HH:mm');
  140. }else{
  141. return '无';
  142. }
  143. }
  144. // $scope.record = function() {
  145. // api_text.record($rootScope.takes).then(function(data){
  146. // if(data.errno==0){
  147. // $scope.busy=false;
  148. // }
  149. // })
  150. // };
  151. $scope.gridOptions.onRegisterApi = function(gridApi) {
  152. // console.log(row);
  153. $scope.gridApi = gridApi;
  154. // var index = 0;
  155. // var oldheader = {};
  156. // gridApi.grid.sortColumn = function(gridApi) {
  157. // if (oldheader.field) {
  158. // if (oldheader.field == gridApi.field) {
  159. // // index = 0;
  160. // } else {
  161. // index = 0;
  162. // }
  163. // }
  164. // index++;
  165. // oldheader = gridApi;
  166. // var fildata = $scope.memoryfilterData;
  167. // if (index % 3 == 0) {
  168. // delete $scope.memoryfilterData.incident;
  169. // fildata = $scope.memoryfilterData;
  170. // } else if (index % 3 == 1) {
  171. // angular.extend(fildata, { 'incident': { "sort": gridApi.field } });
  172. // } else if (index % 3 == 2) {
  173. // angular.extend(fildata, { 'incident': { "sort": gridApi.field, "order": "asc" } });
  174. // }
  175. // $scope.refreshData('expand-right', fildata);
  176. // }
  177. gridApi.pagination.on.paginationChanged($scope, function(newPage, pageSize) {
  178. var filtersData = $scope.memoryfilterData;
  179. filtersData.idx = newPage - 1;
  180. filtersData.sum = pageSize;
  181. $scope.fileData.idx=newPage - 1;
  182. $scope.fileData.sum=pageSize;
  183. $scope.refreshData('expand-right', $scope.fileData);
  184. // $scope.refreshData('expand-right', {"assignee":$rootScope.user.id, "candidateGroups":$rootScope.user.group[0].id, "idx":newPage-1,"sum":pageSize});
  185. });
  186. $scope.selected = {
  187. items: []
  188. }
  189. };
  190. $scope.memoryfilterData = defaultFilterData = {
  191. // "assignee":$rootScope.user.id,
  192. // "candidateGroups":$rootScope.user.group[0].id,
  193. "idx": 0,
  194. "sum": mun,
  195. 'alarmIncident': {
  196. "state": ''
  197. }
  198. };
  199. $scope.selectRowFunction = function(data) {
  200. console.log(data)
  201. var formdata = {
  202. // 'model': {
  203. // 'incident': {
  204. // 'requester': data.requester,
  205. // 'area': data.area,
  206. // 'place': data.place,
  207. // 'houseNumber': data.address,
  208. // 'contacts': data.contacts,
  209. // 'contactsInformation': data.contactsInformation,
  210. // // 'category': data.wxIncidentClassifyDTO.category,
  211. // 'description': data.incidentDescription,
  212. // 'source': { 'id': 4 },
  213. // 'sourceType': data.sourceType,
  214. // 'fileUrl': data.fileUrl
  215. // },
  216. // 'networkInformation': data.requester,
  217. // 'flow': data.id
  218. // }
  219. 'model':{
  220. 'incident':{
  221. 'description':data.alarm.alarmContent,
  222. 'alarm':data.alarm
  223. }
  224. },
  225. 'alarmIncident': data
  226. }
  227. console.log(formdata)
  228. // if (formdata.alarmIncident.state == '未建单') {
  229. // formdata.alarmIncident.state = 0;
  230. // }
  231. delete(formdata.alarmIncident.item);
  232. console.log(formdata);
  233. // if (data.requester.requesterTypeDTO && data.requester.requesterTypeDTO.id == 2) {
  234. // angular.extend(formdata.model.incident, { 'priority': { 'id': 2 } });
  235. // }
  236. if (formdata.alarmIncident.alarm.alarmExtension) {
  237. formdata.alarmIncident.alarm.alarmExtension = formdata.alarmIncident.alarm.alarmExtension.replace('{', "");
  238. formdata.alarmIncident.alarm.alarmExtension = formdata.alarmIncident.alarm.alarmExtension.replace('}', "");
  239. // formdata.alarmIncident.alarm.alarmExtension = formdata.alarmIncident.alarm.alarmExtension.replace(/,/g, '\n');
  240. }
  241. console.log(formdata);
  242. $state.go('app.incident.chart', { 'model': JSON.stringify(formdata) });
  243. };
  244. $scope.lookFunction = function(data) {
  245. var modelfile = { model: { incident: data } };
  246. // $state.go('app.incident.detail', { formKey: 'incident_back', pdKey: 'incident', dataId: data.id, taskId: data.taskId, processInstanceId: data.processInstanceId });
  247. if (data.state == "未受理") {
  248. angular.extend(modelfile.model.incident, { status: 1 })
  249. } else {
  250. angular.extend(modelfile.model.incident, { status: 0 })
  251. }
  252. $state.go('app.desk.form_editor', { formKey: 'desk_detail', service: 'api_user_data', model: JSON.stringify(modelfile) });
  253. };
  254. // $scope.followFunction = function(data){
  255. // //console.log('data='+JSON.stringify(data));
  256. // $state.go('app.detail', { formKey:'statusform', pdKey:'incident', dataId: data.id,processInstanceId: data.processInstanceId});
  257. // };
  258. $scope.onDblClick = function(row) {
  259. console.log(row)
  260. if (row.entity.alarm.alarmExtension) {
  261. row.entity.alarm.alarmExtension = row.entity.alarm.alarmExtension.replace('{', "");
  262. row.entity.alarm.alarmExtension = row.entity.alarm.alarmExtension.replace('}', "");
  263. row.entity.alarm.alarmExtension = row.entity.alarm.alarmExtension.replace(/,/g, '\n');
  264. }
  265. event.stopPropagation();
  266. var modelfile = { model: row.entity };
  267. // if (row.entity.state == "未受理") {
  268. // angular.extend(modelfile.model.incident, { status: 1 })
  269. // } else {
  270. // angular.extend(modelfile.model.incident, { status: 0 })
  271. // }
  272. console.log(modelfile)
  273. $state.go('app.desk.form_editor', { formKey: 'desk_emergency', service: 'api_user_data', model: JSON.stringify(modelfile) });
  274. };
  275. var defaultFilterData = {
  276. // "assignee":$rootScope.user.id,
  277. // "candidateGroups":$rootScope.user.group[0].id,
  278. "idx": 0,
  279. "sum": 15,
  280. alarmIncident: {
  281. state: '未处理',
  282. }
  283. };
  284. // if(angular.isDefined($rootScope.search)&&angular.isDefined($rootScope.search.incident)){
  285. // defaultFilterData['searchType']=$rootScope.search.incident;
  286. // $scope.searchTypes=$rootScope.search.incident;
  287. // }
  288. // if($rootScope['cmdbs']!='incident'){$rootScope.idx=1}
  289. // if(angular.isDefined($rootScope.idx)&&$rootScope.cmdbs!="false"){
  290. // $rootScope['cmdbs']='incident';
  291. // defaultFilterData.idx=$rootScope.idx-1;
  292. // }else{$rootScope.cmdbs="";}
  293. $scope.ldloading = {};
  294. // $scope.Change= function(upTypes){
  295. // if(angular.isDefined(upTypes)&&upTypes=='upincident'){
  296. // $state.go('app.problem.incident',{});
  297. // }
  298. // else if(angular.isDefined(upTypes)&&upTypes=='upchange'){
  299. // $state.go('app.change.incident',{});
  300. // }
  301. // }
  302. // $scope.submit = function(searchType) {
  303. // api_apply.wxIncidentReject(1, { "rejectRemark": "不受理" }).then(function(data) {
  304. // if (data && data.status == 200) {
  305. // SweetAlert.swal({
  306. // title: "提交成功",
  307. // text: '不受理提交成功',
  308. // type: "success",
  309. // }, function() {
  310. // $scope.reload();
  311. // });
  312. // } else {
  313. // SweetAlert.swal({
  314. // title: "提交失败",
  315. // text: '不受理提交失败',
  316. // type: "error"
  317. // });
  318. // }
  319. // });
  320. // }
  321. $scope.onChange = function(searchType) {
  322. // console.log(searchType)
  323. // $scope.searchstate = searchType;
  324. // defaultFilterData = $scope.memoryfilterData;
  325. // defaultFilterData['searchType'] = searchType;
  326. // defaultFilterData.alarmIncident.state = searchType
  327. // console.log(defaultFilterData)
  328. $scope.searchstate=searchType;
  329. $scope.fileData.alarmIncident.state=searchType;
  330. $scope.refreshData('expand-right',$scope.fileData);
  331. }
  332. $scope.refreshData = function(style, filterData) {
  333. // $scope.ldloading[style.replace('-', '_')] = true;
  334. // if (angular.isUndefined(filterData)) {
  335. // filterData = defaultFilterData;
  336. // }
  337. // console.log($scope.searchstate);
  338. // filterData.alarmIncident.state = $scope.searchstate
  339. // console.log(filterData);
  340. console.log(filterData);
  341. $scope.myData = [];
  342. $scope.gridOptions['sum'] = filterData.sum;
  343. api_bpm_data.fetchDataList("alarmIncident", filterData, 'alarmIncident').then(function(data) {
  344. console.log(data)
  345. var myData6 = Restangular.stripRestangular(data);
  346. $scope.gridOptions['totalItems'] = myData6.totalNum;
  347. $scope.myData = myData6.list;
  348. for (var i = 0; i < $scope.myData.length; i++) {
  349. $scope.myData[i]['item'] = i + 1 + filterData.idx * filterData.sum
  350. }
  351. // $scope.handle = false;
  352. // $scope.notBeing = false;
  353. // for (var i = 0; i < $scope.myData.length; i++) {
  354. // $scope.myData[i]['item'] = i + 1 + filterData.idx * filterData.sum;
  355. // // $scope.TIME = $scope.myData[i].alarm['alarmActiveTime'];
  356. // // $scope.myData[i].alarm.alarmActiveTime = moment($scope.TIME).format("YYYY-MM-DD HH:mm:ss");
  357. // console.log($scope.myData[i]['state'])
  358. // if ($scope.myData[i]['state'] == '未处理') {
  359. // $scope.handle = true;
  360. // $scope.notBeing = true;
  361. // }
  362. // else {
  363. // $scope.handle = false;
  364. // }
  365. // if ($scope.myData[i]['state'] == '暂不处理') {
  366. // $scope.notBeing = false;
  367. // $scope.handle = true;
  368. // }
  369. // }
  370. // $scope.ldloading[style.replace('-', '_')] = false;
  371. }, function() {
  372. // $scope.ldloading[style.replace('-', '_')] = false;
  373. });
  374. };
  375. $scope.dictionaryData=[];
  376. $scope.getDictionary=function(){
  377. var data={
  378. "key":"alarmincident_state",
  379. "type":"list"
  380. }
  381. api_wechatfile.getDictionary(data).then(function(res){
  382. $scope.dictionaryData=res;
  383. $scope.fileData={
  384. "idx":0,
  385. "sum":mun,
  386. "alarmIncident":{
  387. "state":$scope.dictionaryData[0]
  388. }
  389. };
  390. $scope.searchstate = $scope.dictionaryData[0];
  391. $scope.refreshData('expand-right', $scope.fileData);
  392. })
  393. } ;
  394. $scope.getDictionary();
  395. }
  396. ]);
  397. app.controller('WechatOperCtrl2', ['$rootScope', '$http', '$scope', '$modal', 'SweetAlert', '$state', 'api_bpm_data', function($rootScope, $http, $scope, $modal, SweetAlert, $state, api_bpm_data) {
  398. $scope.handle = false;
  399. var loginUser = $rootScope.user;
  400. console.log($scope.item);
  401. if ($scope.item.state.name == '未处理') {
  402. $scope.handle = true;
  403. $scope.notBeing = true;
  404. } else {
  405. $scope.handle = false;
  406. }
  407. if ($scope.item.state.name == '暂不处理') {
  408. $scope.notBeing = false;
  409. $scope.handle = true;
  410. }
  411. // if ($scope.item.alarm.alarmStatus == '恢复') {
  412. // $scope.notBeing = false;
  413. // $scope.handle = false;
  414. // }
  415. // console.log($scope.notBeing);
  416. // 处理 --wt
  417. $scope.edit = function() {
  418. $scope.colobject.grid.appScope.selectRowFunction($scope.item);
  419. // $scope.doEdit($scope.item.id);
  420. // console.log($scope.item)
  421. }
  422. // 不处理 --wt
  423. $scope.notAccept = function() {
  424. console.log($scope.item);
  425. var modalInstance = $modal.open({
  426. templateUrl: 'assets/views/desk/emergencyReason.html',
  427. controller: function($scope, $modalInstance, SweetAlert, item, $scope1, style, filterData) {
  428. $scope.ok = function() {
  429. console.log(item)
  430. console.log($scope1.colobject.grid.appScope);
  431. if ($scope.rejectRemark) {
  432. item.rejectRemark = $scope.rejectRemark;
  433. item.oprator = $rootScope.user.name;
  434. delete(item.item);
  435. console.log(item);
  436. // item.state = "不受理";
  437. item.state.id=1605;
  438. // item = { alarmIncident: item };
  439. item={"alarmIncident":item};
  440. api_bpm_data.updData("alarmIncident",item).then(function(data) {
  441. console.log(data);
  442. console.log(item)
  443. SweetAlert.swal({
  444. title: "提交成功!",
  445. confirmButtonColor: "#007AFF"
  446. });
  447. $modalInstance.dismiss('cancel');
  448. $scope1.colobject.grid.appScope.refreshData('expand-right', $scope1.colobject.grid.appScope.fileData);
  449. })
  450. } else {
  451. SweetAlert.swal({
  452. title: "不受理原因为空!",
  453. confirmButtonColor: "#007AFF"
  454. });
  455. }
  456. // $state.go('app.desk.emergency', {});
  457. };
  458. $scope.cancel = function() {
  459. $modalInstance.dismiss('cancel');
  460. };
  461. },
  462. size: 'sm',
  463. resolve: {
  464. item: function() {
  465. return $scope.item;
  466. },
  467. $scope1: function() {
  468. return $scope;
  469. },
  470. style: function() {
  471. return $rootScope.stylewt;
  472. },
  473. filterData: function() {
  474. return $rootScope.filterDatawt;
  475. }
  476. }
  477. });
  478. // $scope.colobject.grid.appScope.lookFunction($scope.item);
  479. // $scope.doEdit($scope.item.id);
  480. };
  481. // 暂不处理 --wt
  482. $scope.being = function() {
  483. console.log($scope.item);
  484. console.log($scope.colobject.grid.appScope)
  485. $scope.item.oprator = $rootScope.user.name;
  486. // $scope.item.state = '暂不处理'
  487. $scope.item.state.id=1606;
  488. delete($scope.item.item);
  489. console.log($scope.item)
  490. $scope.item = { alarmIncident: $scope.item };
  491. api_bpm_data.updData("alarmIncident",$scope.item).then(function(data) {
  492. console.log(data)
  493. if (data.status == 200) {
  494. $scope.notBeing = false;
  495. SweetAlert.swal({
  496. title: "提交成功!",
  497. confirmButtonColor: "#007AFF"
  498. });
  499. $scope.colobject.grid.appScope.refreshData('expand-right', $scope.colobject.grid.appScope.fileData);
  500. }
  501. })
  502. }
  503. console.log($scope.handle)
  504. }]);
  505. app.directive('wechatoperator2', function() {
  506. return {
  507. restrict: 'E',
  508. scope: {
  509. item: '=',
  510. colobject: '='
  511. },
  512. controller: 'WechatOperCtrl2',
  513. template: '<div class="links cl-effect-1 ui-grid-cell-contents pull-left" >' +
  514. // '<a ng-click="edit()" ng-show="{{handle}}" tooltip="生成事件" tooltip-placement="left"><i class="icon iconfont icon-bianji bianjifont"></i></a>' +
  515. '<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>' +
  516. // '<a ng-click="look()" ng-show="{{!handle}}" tooltip="查看" tooltip-placement="right"><i class="ti-eye"></i></a>' +
  517. '</div>'
  518. };
  519. });