incidentSetUpCtrl.js 70 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807
  1. app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "$interval", "SweetAlert", "$modal", "Restangular", "api_bpm_data", "api_solution", "api_user_data","api_wechatfile","api_sysinfo","api_statistic","api_bpm","jry_api_bpm", function($rootScope, $scope, $state, $timeout, $interval, SweetAlert, $modal, Restangular, api_bpm_data, api_solution, api_user_data,api_wechatfile,api_sysinfo,api_statistic,api_bpm,jry_api_bpm) {
  2. var loginUser = $rootScope.user;
  3. $scope.xinzeng=false;
  4. $scope.shanchu=false;
  5. $scope.bianji=false;
  6. for(var i=0;i<loginUser.menu.length;i++){
  7. if(loginUser.menu[i].link=="shijianshezhi_xinzeng"){
  8. $scope.xinzeng=true
  9. }
  10. if(loginUser.menu[i].link=="shijianshezhi_shanchu"){
  11. $scope.shanchu=true
  12. }
  13. if(loginUser.menu[i].link=="shijianshezhi_bianji"){
  14. $scope.bianji=true
  15. }
  16. }
  17. $scope.listData=[
  18. // {"name":"故障现象"},
  19. {"name":"巡检范围"},
  20. {"name":"事件紧急度"},
  21. {"name":"事件影响度"},
  22. {"name":"事件优先级"},
  23. {"name":"优先级规则"},
  24. {"name":"工时"},
  25. {"name":"服务级别协议"},
  26. {"name":"事件来源"},
  27. {"name":"关闭代码"},
  28. {"name":"事件状态"},
  29. {"name":"满意度评价"},
  30. {"name":"结果类型"},
  31. {"name":"维修记录"},
  32. {"name":"维修方式"},
  33. ]
  34. $scope.leftListIdx=0;
  35. $scope.leftListName="巡检范围";
  36. $scope.leftListCli=function(idx,data){
  37. $scope.leftListIdx=idx;
  38. $scope.leftListName=data.name
  39. }
  40. // 故障现象开始
  41. // $scope.langs=i18nService.getAllLangs();
  42. // $scope.lang = 'zh-cn';
  43. var loginUser = $rootScope.user;
  44. //组
  45. api_user_data.fetchDataList('group', { "idx": 0, "sum": 1000 }).then(function(data) {
  46. $scope.group = data.list;
  47. });
  48. //优先级
  49. // api_bpm_data.fetchDataList('priority', { "idx": 0, "sum": 10 }).then(function(data) {
  50. // $scope.priority = data.list;
  51. // });
  52. api_wechatfile.getDictionary({"key":"incident_priority","type":"list"}).then(function(data){
  53. $scope.priority=data
  54. })
  55. // 工时
  56. api_wechatfile.getDictionary({"key":"incident_complexity","type":"list"}).then(function(data){
  57. $scope.complexity=data
  58. })
  59. /* ----- tree----- */
  60. var apple_selected, tree, treedata_avm, treedata_geography;
  61. //$scope.selectedTreeNode = {};ssss
  62. var i = 0;
  63. $scope.out = [];
  64. $scope.outdata = [];
  65. var systemtype = [];
  66. $scope.subdata={};
  67. $scope.sub1data={};
  68. $scope.addcate = false;
  69. $scope.add1cate = false;
  70. $scope.changecate = false;
  71. // $scope.refreshListData = function(){
  72. // var data ={"idx":0,"sum":1000};
  73. // api_bpm_data.fetchDataList('incidentcategory',data).then(function(response){
  74. // if(response){
  75. // if(response.status=200){
  76. // $scope.outdata = response.list;
  77. // }
  78. // }
  79. // })
  80. // }
  81. // $scope.refreshListData();
  82. $scope.filterTree = function (data,id) {
  83. data = angular.copy(data);
  84. var newTree = data.filter(x => x.id !== id)
  85. newTree.forEach(x => x.children && (x.children = $scope.filterTree(x.children,id)))
  86. return newTree
  87. }
  88. var childdata = {};
  89. $scope.thisParent={};//当前点击节点的父节点
  90. $scope.userOrGroupType={type:0};//当前节点运维组/运维人员
  91. $scope.dataSave = [];//储存$scope.tree_data
  92. $scope.my_tree_handler = function(branch) {
  93. console.log($scope.dataSave)
  94. if($scope.dataSave.length === 0){
  95. $scope.dataSave = angular.copy($scope.tree_data);
  96. }
  97. console.log(branch)
  98. if(branch.parent){
  99. $scope.tree_data = $scope.filterTree($scope.dataSave,branch.id);
  100. console.log($scope.tree_data,'过滤后');
  101. }
  102. $scope.changecate = true;
  103. $scope.addcate = false;
  104. filterData.treeIds = branch.id;
  105. // $scope.selectedTreeNode = branch;
  106. $scope.output = branch;
  107. $scope.thisParent=branch.parent||null;
  108. if($scope.thisParent){
  109. $scope.thisParent.label=$scope.thisParent.category;
  110. $scope.thisParent.isExpanded=true;
  111. $scope.thisParent.selected=true;
  112. $scope.subdata['parent']=$scope.thisParent
  113. };
  114. // console.log($scope.thisParent,$scope.subdata)
  115. if(branch.hasPlace==1){
  116. $scope.subdata.hasPlace=true
  117. }else{
  118. $scope.subdata.hasPlace=false
  119. }
  120. convertchildToTree(branch,'故障现象');
  121. console.log(branch)
  122. if(branch.managerUser){
  123. $scope.subdata.managerUser = branch.managerUser
  124. }
  125. if(branch.userOrGroupType){
  126. $scope.userOrGroupType['type']=branch.userOrGroupType;
  127. $scope.userGroupChecked['groupCheck']=branch.group||{};
  128. $scope.userGroupChecked['userCheck']=branch.handleUser||{};
  129. }else{
  130. $scope.userOrGroupType['type']=0;
  131. $scope.userGroupChecked={}
  132. }
  133. // $scope.subdata=branch;
  134. $scope.subdata.category=branch.label;
  135. var eqflag = false;
  136. angular.forEach($scope.outdata, function(item) {
  137. if (item.id == $scope.output.id) eqflag = true;
  138. });
  139. if (eqflag) {
  140. } else {
  141. $scope.outdata.push({
  142. 'name': $scope.output.label,
  143. 'id': $scope.output.id
  144. });
  145. var postData = {
  146. typeList: []
  147. };
  148. if ($scope.outdata.length > 0) {
  149. angular.forEach($scope.outdata, function(data) {
  150. postData.typeList.push({ id: data.id });
  151. })
  152. }
  153. // api_solution.findSolutionTypesUser(postData).then(function(response){
  154. // //Restangular.
  155. // $scope.userdata = response.data;
  156. // });
  157. }
  158. };
  159. $scope.thisParent={};//当前点击节点的父节点
  160. // $scope.userOrGroupType1={};//当前节点运维组/运维人员
  161. $scope.group_user = {
  162. // offlineGroup:{},//线下组
  163. // onlineUser:{}//线上人
  164. }
  165. $scope.dataSave1 = [];//储存$scope.tree_data
  166. $scope.my_tree_1handler = function(branch) {
  167. console.log($scope.dataSave1)
  168. if($scope.dataSave1.length === 0){
  169. $scope.dataSave1 = angular.copy($scope.tree_1data);
  170. }
  171. console.log(branch)
  172. if(branch.parent){
  173. $scope.tree_1data = $scope.filterTree($scope.dataSave1,branch.id);
  174. console.log($scope.tree_1data,'过滤后');
  175. }
  176. $scope.changecate = true;
  177. $scope.add1cate = false;
  178. filterData.treeIds = branch.id;
  179. // $scope.selectedTreeNode = branch;
  180. $scope.output = branch;
  181. $scope.thisParent=branch.parent||null;
  182. if($scope.thisParent){
  183. $scope.thisParent.label=$scope.thisParent.type;
  184. $scope.thisParent.isExpanded=true;
  185. $scope.thisParent.selected=true;
  186. $scope.sub1data['parent']=$scope.thisParent
  187. };
  188. convertchildToTree(branch,'巡检范围');//2022年5月27日,暂存,明明
  189. console.log(branch);
  190. if(branch.user){
  191. $scope.group_user['onlineUser']=branch.user||{};
  192. }else{
  193. $scope.group_user['onlineUser']={}
  194. }
  195. if(branch.group){
  196. $scope.group_user['offlineGroup']=branch.group||{};
  197. }else{
  198. $scope.group_user['offlineGroup']={}
  199. }
  200. $scope.sub1data.type=branch.label;
  201. var eqflag = false;
  202. angular.forEach($scope.outdata, function(item) {
  203. if (item.id == $scope.output.id) eqflag = true;
  204. });
  205. if (eqflag) {
  206. } else {
  207. $scope.outdata.push({
  208. 'name': $scope.output.label,
  209. 'id': $scope.output.id
  210. });
  211. var postData = {
  212. typeList: []
  213. };
  214. if ($scope.outdata.length > 0) {
  215. angular.forEach($scope.outdata, function(data) {
  216. postData.typeList.push({ id: data.id });
  217. })
  218. }
  219. }
  220. };
  221. $scope.addType = function(element) {
  222. $scope.tree_data = $scope.dataSave.length?angular.copy($scope.dataSave):$scope.tree_data;
  223. $scope.addcate = true
  224. $scope.changecate = false
  225. // var modalInstance = $modal.open({
  226. // templateUrl: 'assets/views/system/tpl/systemclose.html',
  227. // controller: function($scope, $modalInstance, api_bpm_data){
  228. // // api_bpm_data.fetchDataList('closecode',filterData).then(function(data){
  229. // // var myData = Restangular.stripRestangular(data);
  230. // // }
  231. // }
  232. // });
  233. }
  234. $scope.addType1 = function(element) {
  235. $scope.tree_1data = $scope.dataSave1.length?angular.copy($scope.dataSave1):$scope.tree_1data;
  236. $scope.add1cate = true
  237. $scope.changecate = false
  238. }
  239. /* -----start remove incidet category----- */
  240. $scope.remove = function(element) {
  241. var modalInstance = $modal.open({
  242. templateUrl: 'assets/views/delete.html',
  243. controller: function($scope, scope, $modalInstance, api_bpm_data) {
  244. // $scope.title = '优先级删除';
  245. // $scope.connect = '确定要删除此优先级?';
  246. $scope.title = "故障现象删除?";
  247. $scope.connect = "确定要删除此故障现象?";
  248. $scope.ok = function() {
  249. $modalInstance.close(element);
  250. };
  251. $scope.cancel = function() {
  252. $modalInstance.dismiss('cancel');
  253. };
  254. },
  255. size: 'sm',
  256. resolve: {
  257. scope: function() {
  258. return $scope;
  259. }
  260. }
  261. });
  262. modalInstance.result.then(function(selectedItem) {
  263. if (selectedItem) {
  264. var rmvList = [];
  265. rmvList.push(selectedItem.id);
  266. if (selectedItem.children.length > 0) {
  267. SweetAlert.swal({
  268. title: "删除失败!",
  269. text: "请先删除选中的分类的子级",
  270. type: "error"
  271. })
  272. } else {
  273. api_bpm_data.rmvData('incidentcategory', rmvList).then(function(response) {
  274. if (response.data) {
  275. SweetAlert.swal({
  276. title: "删除成功!",
  277. type: "success",
  278. confirmButtonColor: "#007AFF"
  279. }, function() {
  280. $scope.try_async_load();
  281. $scope.$apply($scope.my_data);
  282. });
  283. } else {
  284. SweetAlert.swal({
  285. title: "操作异常!",
  286. text: "系统异常,请稍后重试,或者联系管理员!",
  287. type: "error"
  288. });
  289. }
  290. })
  291. }
  292. }
  293. })
  294. }
  295. $scope.remove1 = function(element) {
  296. var modalInstance = $modal.open({
  297. templateUrl: 'assets/views/delete.html',
  298. controller: function($scope, scope, $modalInstance, api_bpm_data) {
  299. $scope.title = "巡检范围删除?";
  300. $scope.connect = "确定要删除此巡检范围?";
  301. $scope.ok = function() {
  302. $modalInstance.close(element);
  303. };
  304. $scope.cancel = function() {
  305. $modalInstance.dismiss('cancel');
  306. };
  307. },
  308. size: 'sm',
  309. resolve: {
  310. scope: function() {
  311. return $scope;
  312. }
  313. }
  314. });
  315. modalInstance.result.then(function(selectedItem) {
  316. if (selectedItem) {
  317. var rmvList = [];
  318. rmvList.push(selectedItem.id);
  319. if (selectedItem.children.length > 0) {
  320. SweetAlert.swal({
  321. title: "删除失败!",
  322. text: "请先删除选中的范围的子级",
  323. type: "error"
  324. })
  325. } else {
  326. api_bpm_data.rmvData('inspectionType', rmvList).then(function(response) {
  327. if (response.data) {
  328. SweetAlert.swal({
  329. title: "删除成功!",
  330. type: "success",
  331. confirmButtonColor: "#007AFF"
  332. }, function() {
  333. $scope.try_async_1load();
  334. $scope.$apply($scope.my_1data);
  335. });
  336. } else {
  337. SweetAlert.swal({
  338. title: "操作异常!",
  339. text: "系统异常,请稍后重试,或者联系管理员!",
  340. type: "error"
  341. });
  342. }
  343. })
  344. }
  345. }
  346. })
  347. }
  348. /* -----end remove incidet category----- */
  349. function convertchildToTree(datum,type) {
  350. if(type === '故障现象'){
  351. $scope.subdata = {};
  352. if(datum.branchUserGroups){
  353. for (var i = 0; i < datum.branchUserGroups.length; i++) {
  354. if(datum.branchUserGroups[i].userId){
  355. datum.branchUserGroups[i].user = {id:datum.branchUserGroups[i].userId,name:datum.branchUserGroups[i].userName};
  356. delete datum.branchUserGroups[i].userId;
  357. delete datum.branchUserGroups[i].userName;
  358. }
  359. if(datum.branchUserGroups[i].groupId){
  360. datum.branchUserGroups[i].group = {id:datum.branchUserGroups[i].groupId,groupName:datum.branchUserGroups[i].groupName};
  361. delete datum.branchUserGroups[i].groupId;
  362. delete datum.branchUserGroups[i].groupName;
  363. }
  364. }
  365. }
  366. if (datum.parent) {
  367. $scope.subdata = { 'id': datum.id, 'category': datum.label, 'group': datum.group||{}, 'hasPlace': datum.hasPlace, 'hasSimple': datum.hasSimple, 'priority': datum.priority, 'complexity': datum.complexity, 'parent': datum.parent, branchType:datum.branchType,branchUserGroups:datum.branchUserGroups||[] }
  368. } else {
  369. $scope.subdata = { 'id': datum.id, 'category': datum.label, 'group': datum.group||{}, 'hasSimple': datum.hasSimple, 'hasPlace': datum.hasPlace, 'priority': datum.priority, 'complexity': datum.complexity, branchType:datum.branchType,branchUserGroups:datum.branchUserGroups||[] }
  370. }
  371. }else if(type === '巡检范围'){
  372. $scope.sub1data = {};
  373. if (datum.parent) {
  374. $scope.sub1data = { 'id': datum.id, 'type': datum.label, 'parent': datum.parent }
  375. } else {
  376. $scope.sub1data = { 'id': datum.id, 'type': datum.label }
  377. }
  378. }
  379. }
  380. function convertListToTree(data, treeMap) {
  381. var idToNodeMap = {}; //Keeps track of nodes using id as key, for fast lookup
  382. var root = null; //Initially set our loop to null
  383. //loop over data
  384. for (var i = 0; i < data.length; i++) {
  385. var datum = data[i];
  386. //each node will have children, so let's give it a "children" poperty
  387. datum.children = [];
  388. //add an entry for this node to the map so that any future children can
  389. //lookup the parent
  390. idToNodeMap[datum.id] = datum;
  391. //Does this node have a parent?
  392. // console.log("datum="+JSON.stringify(datum))
  393. if (typeof datum.parent === "undefined") {
  394. //Doesn't look like it, so this node is the root of the tree
  395. root = datum;
  396. treeMap[datum.id] = root;
  397. } else {
  398. //This node has a parent, so let's look it up using the id
  399. parentNode = idToNodeMap[datum.parent.id];
  400. //We don't need this property, so let's delete it.
  401. // delete datum.parent;
  402. //Let's add the current node as a child of the parent node.
  403. parentNode.children.push(datum);
  404. }
  405. }
  406. return root;
  407. }
  408. function convertParentToChildList(data) {
  409. var treeMap = {};
  410. var list = [];
  411. convertListToTree(data, treeMap);
  412. angular.forEach(treeMap, function(item) {
  413. list.push(item);
  414. });
  415. return list;
  416. }
  417. $scope.onFilterCallback = function(item){
  418. // $scope.addcategory.parent=item.label;
  419. $scope.selectedChangeCategory=item;
  420. console.log(item)
  421. }
  422. // $scope.parentdata = {};
  423. $scope.try_async_load = function() {
  424. $scope.my_data = [];
  425. $scope.doing_async = true;
  426. api_bpm_data.fetchDataList('branch', { "idx": 0, "sum": 1000 }).then(function(result) {
  427. result = result.list || [];
  428. $scope.adddata = {branchType:0,branchUserGroups:result.map(v=>({branchName:v.hosName,branchId:v.id}))}
  429. api_bpm_data.fetchDataList('incidentcategory', { "idx": 0, "sum": 1000 }).then(function(response) {
  430. var data = response.list;
  431. var objects = [];
  432. // $scope.parentdata = data;
  433. for (var i = 0; i < data.length; i++) {
  434. var object = {};
  435. object.id = data[i].id;
  436. if (angular.isDefined(data[i].parent)) {
  437. object.parent = data[i].parent;
  438. }
  439. if (angular.isDefined(data[i].hasPlace)) {
  440. object.hasPlace = data[i].hasPlace;
  441. }
  442. if (angular.isDefined(data[i].hasSimple)) {
  443. object.hasSimple = data[i].hasSimple;
  444. }
  445. if (angular.isDefined(data[i].group)) {
  446. object.group = data[i].group||{};
  447. }
  448. if (angular.isDefined(data[i].priority)) {
  449. object.priority = data[i].priority;
  450. }
  451. if (angular.isDefined(data[i].complexity)) {
  452. object.complexity = data[i].complexity;
  453. }
  454. if (angular.isDefined(data[i].handleUser)) {
  455. object.handleUser = data[i].handleUser||{};
  456. }
  457. if(angular.isDefined(data[i].userOrGroupType)){
  458. object.userOrGroupType=data[i].userOrGroupType;
  459. }
  460. if(angular.isDefined(data[i].managerUser)){
  461. object.managerUser=data[i].managerUser||{};
  462. }
  463. if(angular.isDefined(data[i].branchType)){
  464. object.branchType=data[i].branchType||0;
  465. }
  466. if(angular.isDefined(data[i].branchUserGroups)){
  467. data[i].branchUserGroups = data[i].branchUserGroups|| [];
  468. if(data[i].branchUserGroups.length){
  469. var arr_b = result.map(v=>({branchName:v.hosName,branchId:v.id,categoryId:data[i].id}));
  470. for (var j = 0; j < arr_b.length; j++) {
  471. for (var p = 0; p < data[i].branchUserGroups.length; p++) {
  472. if(arr_b[j].branchId == data[i].branchUserGroups[p].branchId){
  473. arr_b[j] = data[i].branchUserGroups[p];
  474. }
  475. }
  476. }
  477. object.branchUserGroups=arr_b;
  478. }else{
  479. object.branchUserGroups = result.map(v=>({branchName:v.hosName,branchId:v.id,categoryId:data[i].id}))
  480. }
  481. }else{
  482. object.branchUserGroups = result.map(v=>({branchName:v.hosName,branchId:v.id,categoryId:data[i].id}))
  483. }
  484. object.label = data[i].category;
  485. object.state = {
  486. "opened": true
  487. };
  488. object.typeName = "type";
  489. $scope.showAddSolutionType = true;
  490. $scope.showReviewKnowledgeType = true;
  491. objects.push(object);
  492. }
  493. $scope.my_data = convertParentToChildList(objects);
  494. $scope.tree_data = angular.copy($scope.my_data);
  495. $scope.doing_async = false;
  496. });
  497. });
  498. };
  499. $scope.try_async_1load = function() {
  500. $scope.my_1data = [];
  501. $scope.doing_async = true;
  502. var data = { "idx": 0, "sum": 1000,inspectionType:{deleteFlag:0} };
  503. api_bpm_data.fetchDataList('inspectionType', data).then(function(response) {
  504. var data = response.list;
  505. var objects = [];
  506. for (var i = 0; i < data.length; i++) {
  507. var object = {};
  508. object.id = data[i].id;
  509. if (angular.isDefined(data[i].user)) {
  510. object.user = data[i].user||{};
  511. }
  512. if (angular.isDefined(data[i].group)) {
  513. object.group = data[i].group||{};
  514. }
  515. if (angular.isDefined(data[i].parent)) {
  516. object.parent = data[i].parent;
  517. }
  518. object.label = data[i].type;
  519. objects.push(object);
  520. }
  521. $scope.my_1data = convertParentToChildList(objects);
  522. $scope.tree_1data = angular.copy($scope.my_1data);
  523. $scope.doing_async = false;
  524. });
  525. };
  526. $scope.closethis = function(formdata) {
  527. formdata.category = "";
  528. formdata.parent.category = "";
  529. };
  530. /* -----start submit incidet category----- */
  531. $scope.userGroupChecked={};//选中人/组数据
  532. $scope.submitchange = function(formdata1) {
  533. var formdata = angular.copy(formdata1);
  534. // if (formdata.hasArea) {
  535. // formdata.hasArea = 1;
  536. // formdata.hasPlace = 1;
  537. // } else {
  538. // formdata.hasArea = 0;
  539. // formdata.hasPlace = 0;
  540. // }
  541. if (formdata.hasPlace==true) {
  542. formdata.hasPlace = 1;
  543. } else {
  544. formdata.hasPlace = 0;
  545. }
  546. // }
  547. if (formdata.hasSimple == true) {
  548. formdata.hasSimple = 1;
  549. } else {
  550. formdata.hasSimple = 0;
  551. }
  552. // if ($scope.selectedTreeNode.parent) {
  553. // formdata.parent = { "id": $scope.selectedTreeNode.parent.id };
  554. // }
  555. // console.log($scope.thisParent)
  556. if($scope.selectedChangeCategory){
  557. formdata['parentCategory'] ={'id':$scope.selectedChangeCategory.id};
  558. delete formdata.parent
  559. }else if($scope.thisParent){
  560. formdata['parentCategory'] ={'id':$scope.thisParent.id};
  561. delete formdata.parent
  562. }
  563. // console.log(formdata)
  564. // if($scope.userOrGroupType.type){
  565. // formdata.userOrGroupType=$scope.userOrGroupType.type
  566. // }
  567. // if($scope.userGroupChecked&&$scope.userGroupChecked.groupCheck){
  568. // formdata.group={id:$scope.userGroupChecked.groupCheck.id};
  569. // // delete formdata.handleUser;
  570. // }
  571. // if($scope.userGroupChecked&&$scope.userGroupChecked.userCheck){
  572. // formdata.handleUser={id:$scope.userGroupChecked.userCheck.id};
  573. // // delete formdata.group;
  574. // }
  575. // ------------------------ start----------------------------
  576. if($scope.subdata.branchType == 1){
  577. delete formdata.handleUser;
  578. delete formdata.group;
  579. delete formdata.userOrGroupType;
  580. for (var i = 0; i < formdata.branchUserGroups.length; i++) {
  581. if(formdata.branchUserGroups[i].branchUserOrGroupType){
  582. formdata.branchUserGroups[i].branchUserOrGroupType = Number(formdata.branchUserGroups[i].branchUserOrGroupType);
  583. }
  584. if(formdata.branchUserGroups[i].user && formdata.branchUserGroups[i].branchUserOrGroupType == 1){
  585. formdata.branchUserGroups[i].userId=formdata.branchUserGroups[i].user.id;
  586. delete formdata.branchUserGroups[i].user;
  587. delete formdata.branchUserGroups[i].groupId;
  588. }
  589. if(formdata.branchUserGroups[i].group && formdata.branchUserGroups[i].branchUserOrGroupType == 2){
  590. formdata.branchUserGroups[i].groupId=formdata.branchUserGroups[i].group.id;
  591. delete formdata.branchUserGroups[i].group;
  592. delete formdata.branchUserGroups[i].userId;
  593. }
  594. }
  595. }else if($scope.subdata.branchType == 0){
  596. formdata.branchUserGroups = [];
  597. if($scope.userOrGroupType.type){
  598. formdata.userOrGroupType=$scope.userOrGroupType.type
  599. }
  600. if($scope.userGroupChecked&&$scope.userGroupChecked.groupCheck){
  601. formdata.group={id:$scope.userGroupChecked.groupCheck.id};
  602. delete formdata.handleUser;
  603. }
  604. if($scope.userGroupChecked&&$scope.userGroupChecked.userCheck){
  605. formdata.handleUser={id:$scope.userGroupChecked.userCheck.id};
  606. delete formdata.group;
  607. }
  608. }
  609. // ------------------------ end----------------------------
  610. if($scope.subdata.complexity){
  611. formdata.complexity=$scope.subdata.complexity
  612. }
  613. if($scope.subdata.priority){
  614. formdata.priority=$scope.subdata.priority
  615. }
  616. if($scope.subdata.managerUser){
  617. formdata.managerUser=$scope.subdata.managerUser
  618. }
  619. var filedata = { "incidentcategory": formdata }
  620. filedata.incidentcategory.branchType = Number(filedata.incidentcategory.branchType);
  621. console.log(filedata,$scope.userGroupChecked);
  622. // return;
  623. api_bpm_data.updData('incidentcategory', filedata).then(function(response) {
  624. if (response) {
  625. if (response.status == 200) {
  626. $scope.try_async_load()
  627. SweetAlert.swal({
  628. title: "修改成功!",
  629. type: "success"
  630. }, function() {
  631. $scope.$apply($scope.my_data);
  632. })
  633. } else {
  634. SweetAlert.swal({
  635. title: "修改失败!",
  636. type: "error"
  637. })
  638. }
  639. }
  640. });
  641. };
  642. $scope.submit1change = function(formdata) {
  643. console.log($scope.output)
  644. if($scope.selectedChangeCategory){
  645. formdata['parent'] ={'id':$scope.selectedChangeCategory.id};
  646. }else if($scope.thisParent){
  647. formdata['parent'] ={'id':$scope.thisParent.id};
  648. }
  649. if($scope.group_user.offlineGroup&&$scope.group_user.offlineGroup.id){
  650. formdata.group={id:$scope.group_user.offlineGroup.id};
  651. }
  652. if($scope.group_user.onlineUser&&$scope.group_user.onlineUser.id){
  653. formdata.user={id:$scope.group_user.onlineUser.id};
  654. }
  655. // if($scope.userGroupChecked&&$scope.userGroupChecked.groupCheck){
  656. // formdata.group={id:$scope.userGroupChecked.groupCheck.id};
  657. // }
  658. // if($scope.userGroupChecked&&$scope.userGroupChecked.userCheck){
  659. // formdata.handleUser={id:$scope.userGroupChecked.userCheck.id};
  660. // }
  661. // if($scope.subdata.complexity){
  662. // formdata.complexity=$scope.subdata.complexity
  663. // }
  664. // if($scope.subdata.priority){
  665. // formdata.priority=$scope.subdata.priority
  666. // }
  667. // if($scope.subdata.managerUser){
  668. // formdata.managerUser=$scope.subdata.managerUser
  669. // }
  670. var filedata = { "inspectionType": formdata }
  671. console.log(filedata,$scope.group_user);
  672. // return;
  673. api_bpm_data.updData('inspectionType', filedata).then(function(response) {
  674. if (response) {
  675. if (response.status == 200) {
  676. $scope.try_async_1load()
  677. SweetAlert.swal({
  678. title: "修改成功!",
  679. type: "success"
  680. }, function() {
  681. $scope.$apply($scope.my_1data);
  682. })
  683. } else {
  684. SweetAlert.swal({
  685. title: "修改失败!",
  686. type: "error"
  687. })
  688. }
  689. }
  690. });
  691. };
  692. $scope.adddata = {};
  693. $scope.add1data = {};
  694. $scope.addparent = false;
  695. // 新增保存提交
  696. $scope.userGroupCheckedAdd={};//选中人/组数据
  697. $scope.group_user_Add={};//选中人/组数据
  698. $scope.userOrGroupTypeAdd={type:0};//运维组/运维人员
  699. $scope.submitadd = function(formdata1) {
  700. var formdata = angular.copy(formdata1);
  701. console.log(formdata)
  702. // var paret = {};
  703. // var filedata = {};
  704. // filedata = angular.copy(formdata);
  705. // delete filedata.addp
  706. // if (angular.isDefined(formdata.parent) && addparent) {
  707. // angular.forEach($scope.parentdata, function(data) {
  708. // if (formdata.parent.category.id == data.id) {
  709. // filedata = { "incidentcategory": { "category": formdata.category, "parent": { "id": data.id } } }
  710. // }
  711. // })
  712. // } else {
  713. // filedata = { "incidentcategory": { "category": formdata.category } }
  714. // }
  715. // filedata = { "incidentcategory": { "category": formdata.category, "parent": { "id": formdata.parentNode.id } } }
  716. // if (formdata.hasArea && formdata.hasArea == true) {
  717. // if (formdata.hasArea) {
  718. // formdata.hasArea = 1;
  719. // formdata.hasPlace = 1;
  720. // } else {
  721. // formdata.hasArea = 0;
  722. // formdata.hasPlace = 0;
  723. // }
  724. if (formdata.hasPlace == true) {
  725. formdata.hasPlace = 1;
  726. } else {
  727. formdata.hasPlace = 0;
  728. }
  729. if (formdata.hasSimple == true) {
  730. formdata.hasSimple = 1;
  731. } else {
  732. formdata.hasSimple = 0;
  733. }
  734. if (formdata.parent) {
  735. formdata['parentCategory'] = { "id": formdata.parent.id };
  736. delete formdata.parent
  737. }
  738. if($scope.adddata.branchType == 1){
  739. delete formdata.handleUser;
  740. delete formdata.group;
  741. delete formdata.userOrGroupType;
  742. for (var i = 0; i < formdata.branchUserGroups.length; i++) {
  743. if(formdata.branchUserGroups[i].branchUserOrGroupType){
  744. formdata.branchUserGroups[i].branchUserOrGroupType = Number(formdata.branchUserGroups[i].branchUserOrGroupType);
  745. }
  746. if(formdata.branchUserGroups[i].user && formdata.branchUserGroups[i].branchUserOrGroupType == 1){
  747. formdata.branchUserGroups[i].userId=formdata.branchUserGroups[i].user.id;
  748. delete formdata.branchUserGroups[i].user;
  749. delete formdata.branchUserGroups[i].groupId;
  750. }
  751. if(formdata.branchUserGroups[i].group && formdata.branchUserGroups[i].branchUserOrGroupType == 2){
  752. formdata.branchUserGroups[i].groupId=formdata.branchUserGroups[i].group.id;
  753. delete formdata.branchUserGroups[i].group;
  754. delete formdata.branchUserGroups[i].userId;
  755. }
  756. }
  757. }else if($scope.adddata.branchType == 0){
  758. formdata.branchUserGroups = [];
  759. if($scope.userOrGroupTypeAdd.type){
  760. formdata.userOrGroupType=$scope.userOrGroupTypeAdd.type
  761. }
  762. if($scope.userGroupCheckedAdd&&$scope.userGroupCheckedAdd.groupCheck){
  763. formdata.group={id:$scope.userGroupCheckedAdd.groupCheck.id};
  764. delete formdata.handleUser;
  765. }
  766. if($scope.userGroupCheckedAdd&&$scope.userGroupCheckedAdd.userCheck){
  767. formdata.handleUser={id:$scope.userGroupCheckedAdd.userCheck.id};
  768. delete formdata.group;
  769. }
  770. }
  771. var filedata = { "incidentcategory": formdata }
  772. console.log(filedata);
  773. // return;
  774. api_bpm_data.addData('incidentcategory', filedata).then(function(response) {
  775. if (response) {
  776. if (response.status == 200) {
  777. $scope.userdata = [];
  778. $scope.outdata = [];
  779. $scope.try_async_load();
  780. SweetAlert.swal({
  781. title: "增加成功!",
  782. type: "success"
  783. })
  784. } else if (response.status == 408) {
  785. SweetAlert.swal({
  786. title: "增加失败!",
  787. text: response.error,
  788. type: "error"
  789. })
  790. } else {
  791. SweetAlert.swal({
  792. title: "增加失败!",
  793. type: "error"
  794. })
  795. }
  796. }
  797. });
  798. };
  799. $scope.submit1add = function(formdata) {//lmm
  800. console.log(formdata)
  801. if($scope.group_user_Add&&$scope.group_user_Add.group&&$scope.group_user_Add.group.id){
  802. formdata.group={id:$scope.group_user_Add.group.id};
  803. }
  804. if($scope.group_user_Add&&$scope.group_user_Add.user&&$scope.group_user_Add.user.id){
  805. formdata.user={id:$scope.group_user_Add.user.id};
  806. }
  807. formdata.deleteFlag = 0;
  808. formdata.formUiName = 'inspection_LinHu_detail';
  809. formdata.formUiEdit = 'inspection_LinHu_confirm';
  810. formdata.processKey = 'bpm_inspection';
  811. var filedata = { "inspectionType": formdata }
  812. console.log(filedata);
  813. // return;
  814. api_bpm_data.addData('inspectionType', filedata).then(function(response) {
  815. if (response) {
  816. if (response.status == 200) {
  817. $scope.userdata = [];
  818. $scope.outdata = [];
  819. $scope.try_async_1load();
  820. SweetAlert.swal({
  821. title: "增加成功!",
  822. type: "success"
  823. })
  824. } else if (response.status == 408) {
  825. SweetAlert.swal({
  826. title: "增加失败!",
  827. text: response.error,
  828. type: "error"
  829. })
  830. } else {
  831. SweetAlert.swal({
  832. title: "增加失败!",
  833. type: "error"
  834. })
  835. }
  836. }
  837. });
  838. };
  839. /* -----end submit incidet category----- */
  840. // $scope.try_async_load();
  841. $scope.try_async_1load();
  842. // $scope.ldloading={};
  843. var filterData = {
  844. key: 'null',
  845. status: 0,
  846. pageIndex: 0,
  847. pageSum: 10,
  848. //treeIds:'[]',
  849. userId: loginUser.id
  850. }
  851. // 故障现象结束
  852. // 事件紧急度开始
  853. $scope.incident_emergencyData=[];
  854. $scope.getIncident_emergency=function(){
  855. var data={
  856. "key":"incident_emergency",
  857. "type":"list"
  858. }
  859. api_wechatfile.getDictionary(data).then(function(res){
  860. $scope.incident_emergencyData=res;
  861. })
  862. }
  863. $scope.getIncident_emergency();
  864. $scope.incident_emergencySave=function(){
  865. for(var i=0;i<$scope.incident_emergencyData.length;i++){
  866. api_sysinfo.addData('dictionary', $scope.incident_emergencyData[i]).then(function(res) {
  867. })
  868. }
  869. SweetAlert.swal({
  870. title: "保存成功!",
  871. type: "success",
  872. confirmButtonColor: "#007AFF"
  873. });
  874. $timeout(function(){
  875. $scope.getIncident_emergency();
  876. },2000)
  877. }
  878. $scope.incident_emergencyReturn=function(){
  879. $scope.incident_emergencyData[0].name="紧急";
  880. $scope.incident_emergencyData[1].name="高";
  881. $scope.incident_emergencyData[2].name="中";
  882. $scope.incident_emergencyData[3].name="低";
  883. for(var i=0;i<$scope.incident_emergencyData.length;i++){
  884. api_sysinfo.addData('dictionary', $scope.incident_emergencyData[i]).then(function(res) {
  885. })
  886. }
  887. SweetAlert.swal({
  888. title: "恢复成功!",
  889. type: "success",
  890. confirmButtonColor: "#007AFF"
  891. });
  892. $timeout(function(){
  893. $scope.getIncident_emergency();
  894. },2000)
  895. }
  896. // 事件紧急度结束
  897. // 事件影响度开始
  898. $scope.incident_influenceData=[];
  899. $scope.getIncident_influence=function(){
  900. var data={
  901. "key":"incident_influence",
  902. "type":"list"
  903. }
  904. api_wechatfile.getDictionary(data).then(function(res){
  905. $scope.incident_influenceData=res;
  906. })
  907. }
  908. $scope.getIncident_influence();
  909. $scope.incident_influenceSave=function(){
  910. for(var i=0;i<$scope.incident_influenceData.length;i++){
  911. api_sysinfo.addData('dictionary', $scope.incident_influenceData[i]).then(function(res) {
  912. })
  913. }
  914. SweetAlert.swal({
  915. title: "保存成功!",
  916. type: "success",
  917. confirmButtonColor: "#007AFF"
  918. });
  919. $timeout(function(){
  920. $scope.getIncident_influence();
  921. },2000)
  922. }
  923. $scope.incident_influenceReturn=function(){
  924. $scope.incident_influenceData[0].name="高";
  925. $scope.incident_influenceData[1].name="中";
  926. $scope.incident_influenceData[2].name="低";
  927. for(var i=0;i<$scope.incident_influenceData.length;i++){
  928. api_sysinfo.addData('dictionary', $scope.incident_influenceData[i]).then(function(res) {
  929. })
  930. }
  931. SweetAlert.swal({
  932. title: "恢复成功!",
  933. type: "success",
  934. confirmButtonColor: "#007AFF"
  935. });
  936. $timeout(function(){
  937. $scope.getIncident_influence();
  938. },2000)
  939. }
  940. // 事件影响度结束
  941. // 事件状态开始
  942. $scope.incident_classificationData=[];
  943. $scope.getIncident_classification=function(){
  944. var data={
  945. "key":"incident_status",
  946. "type":"list"
  947. }
  948. api_wechatfile.getDictionary(data).then(function(res){
  949. $scope.incident_classificationData=res;
  950. })
  951. }
  952. $scope.getIncident_classification();
  953. $scope.incident_classificationSave=function(){
  954. for(var i=0;i<$scope.incident_classificationData.length;i++){
  955. api_sysinfo.addData('dictionary', $scope.incident_classificationData[i]).then(function(res) {
  956. })
  957. }
  958. SweetAlert.swal({
  959. title: "保存成功!",
  960. type: "success",
  961. confirmButtonColor: "#007AFF"
  962. });
  963. $timeout(function(){
  964. $scope.getIncident_classification();
  965. },2000)
  966. }
  967. $scope.incident_classificationReturn=function(){
  968. $scope.incident_classificationData[0].name="待接单";
  969. $scope.incident_classificationData[1].name="处理中";
  970. $scope.incident_classificationData[2].name="已解决";
  971. $scope.incident_classificationData[3].name="已关闭";
  972. $scope.incident_classificationData[4].name="暂存";
  973. $scope.incident_classificationData[5].name="重新指派";
  974. for(var i=0;i<$scope.incident_classificationData.length;i++){
  975. api_sysinfo.addData('dictionary', $scope.incident_classificationData[i]).then(function(res) {
  976. })
  977. }
  978. SweetAlert.swal({
  979. title: "恢复成功!",
  980. type: "success",
  981. confirmButtonColor: "#007AFF"
  982. });
  983. $timeout(function(){
  984. $scope.getIncident_classification();
  985. },2000)
  986. }
  987. // 事件状态结束
  988. // 满意度评价开始
  989. $scope.incident_evaluateData=[];
  990. $scope.getIncident_evaluate=function(){
  991. var data={
  992. "key":"incident_degree",
  993. "type":"list"
  994. }
  995. api_wechatfile.getDictionary(data).then(function(res){
  996. $scope.incident_evaluateData=res;
  997. })
  998. }
  999. $scope.getIncident_evaluate();
  1000. $scope.incident_evaluateSave=function(){
  1001. for(var i=0;i<$scope.incident_evaluateData.length;i++){
  1002. api_sysinfo.addData('dictionary', $scope.incident_evaluateData[i]).then(function(res) {
  1003. })
  1004. }
  1005. SweetAlert.swal({
  1006. title: "保存成功!",
  1007. type: "success",
  1008. confirmButtonColor: "#007AFF"
  1009. });
  1010. $timeout(function(){
  1011. $scope.getIncident_evaluate();
  1012. },2000)
  1013. }
  1014. $scope.incident_evaluateReturn=function(){
  1015. $scope.incident_evaluateData[0].name="非常满意";
  1016. $scope.incident_evaluateData[1].name="较满意";
  1017. $scope.incident_evaluateData[2].name="满意";
  1018. $scope.incident_evaluateData[3].name="一般";
  1019. $scope.incident_evaluateData[4].name="不满意";
  1020. for(var i=0;i<$scope.incident_evaluateData.length;i++){
  1021. api_sysinfo.addData('dictionary', $scope.incident_evaluateData[i]).then(function(res) {
  1022. })
  1023. }
  1024. SweetAlert.swal({
  1025. title: "恢复成功!",
  1026. type: "success",
  1027. confirmButtonColor: "#007AFF"
  1028. });
  1029. $timeout(function(){
  1030. $scope.getIncident_evaluate();
  1031. },2000)
  1032. }
  1033. // 满意度评价结束
  1034. // 结果类型开始
  1035. $scope.incident_resultData=[];
  1036. $scope.getIncident_result=function(){
  1037. var data={
  1038. "key":"incident_handleresult",
  1039. "type":"list"
  1040. }
  1041. api_wechatfile.getDictionary(data).then(function(res){
  1042. $scope.incident_resultData=res;
  1043. })
  1044. }
  1045. $scope.getIncident_result();
  1046. $scope.incident_resultSave=function(){
  1047. for(var i=0;i<$scope.incident_resultData.length;i++){
  1048. api_sysinfo.addData('dictionary', $scope.incident_resultData[i]).then(function(res) {
  1049. })
  1050. }
  1051. SweetAlert.swal({
  1052. title: "保存成功!",
  1053. type: "success",
  1054. confirmButtonColor: "#007AFF"
  1055. });
  1056. $timeout(function(){
  1057. $scope.getIncident_result();
  1058. },2000)
  1059. }
  1060. $scope.incident_resultReturn=function(){
  1061. $scope.incident_resultData[0].name="全部解决";
  1062. $scope.incident_resultData[1].name="部分解决";
  1063. $scope.incident_resultData[2].name="未解决";
  1064. $scope.incident_resultData[3].name="其它";
  1065. for(var i=0;i<$scope.incident_resultData.length;i++){
  1066. api_sysinfo.addData('dictionary', $scope.incident_resultData[i]).then(function(res) {
  1067. })
  1068. }
  1069. SweetAlert.swal({
  1070. title: "恢复成功!",
  1071. type: "success",
  1072. confirmButtonColor: "#007AFF"
  1073. });
  1074. $timeout(function(){
  1075. $scope.getIncident_result();
  1076. },2000)
  1077. }
  1078. // 结果类型结束
  1079. // 事件优先级开始
  1080. $scope.incident_priorityData=[];
  1081. $scope.getIncident_priority=function(){
  1082. var data={
  1083. "key":"incident_priority",
  1084. "type":"list"
  1085. }
  1086. api_wechatfile.getDictionary(data).then(function(res){
  1087. $scope.incident_priorityData=res;
  1088. })
  1089. }
  1090. $scope.getIncident_priority();
  1091. $scope.incident_prioritySave=function(){
  1092. for(var i=0;i<$scope.incident_priorityData.length;i++){
  1093. api_sysinfo.addData('dictionary', $scope.incident_priorityData[i]).then(function(res) {
  1094. })
  1095. }
  1096. SweetAlert.swal({
  1097. title: "保存成功!",
  1098. type: "success",
  1099. confirmButtonColor: "#007AFF"
  1100. });
  1101. $timeout(function(){
  1102. $scope.getIncident_priority();
  1103. },2000)
  1104. }
  1105. $scope.incident_priorityReturn=function(){
  1106. $scope.incident_priorityData[0].name="重大";
  1107. $scope.incident_priorityData[1].name="高";
  1108. $scope.incident_priorityData[2].name="较高";
  1109. $scope.incident_priorityData[3].name="普通";
  1110. for(var i=0;i<$scope.incident_priorityData.length;i++){
  1111. api_sysinfo.addData('dictionary', $scope.incident_priorityData[i]).then(function(res) {
  1112. })
  1113. }
  1114. SweetAlert.swal({
  1115. title: "恢复成功!",
  1116. type: "success",
  1117. confirmButtonColor: "#007AFF"
  1118. });
  1119. $timeout(function(){
  1120. $scope.getIncident_priority();
  1121. },2000)
  1122. }
  1123. // 事件优先级结束
  1124. // 事件工时开始
  1125. $scope.incident_complexityData=[];
  1126. $scope.getIncident_complexity=function(){
  1127. var data={
  1128. "key":"incident_complexity",
  1129. "type":"list"
  1130. }
  1131. api_wechatfile.getDictionary(data).then(function(res){
  1132. $scope.incident_complexityData=res;
  1133. })
  1134. }
  1135. $scope.getIncident_complexity();
  1136. $scope.incident_complexitySave=function(){
  1137. for(var i=0;i<$scope.incident_complexityData.length;i++){
  1138. api_sysinfo.addData('dictionary', $scope.incident_complexityData[i]).then(function(res) {
  1139. })
  1140. }
  1141. SweetAlert.swal({
  1142. title: "保存成功!",
  1143. type: "success",
  1144. confirmButtonColor: "#007AFF"
  1145. });
  1146. $timeout(function(){
  1147. $scope.getIncident_complexity();
  1148. },2000)
  1149. }
  1150. // 没有恢复默认
  1151. // $scope.incident_complexityReturn=function(){
  1152. // $scope.incident_complexityData[0].name="重大";
  1153. // $scope.incident_complexityData[1].name="高";
  1154. // $scope.incident_complexityData[2].name="较高";
  1155. // $scope.incident_complexityData[3].name="普通";
  1156. // for(var i=0;i<$scope.incident_complexityData.length;i++){
  1157. // api_sysinfo.addData('dictionary', $scope.incident_complexityData[i]).then(function(res) {
  1158. // })
  1159. // }
  1160. // SweetAlert.swal({
  1161. // title: "恢复成功!",
  1162. // type: "success",
  1163. // confirmButtonColor: "#007AFF"
  1164. // });
  1165. // $timeout(function(){
  1166. // $scope.getIncident_complexity();
  1167. // },2000)
  1168. // }
  1169. // 事件工时结束
  1170. // 服务级别协议开始
  1171. $scope.incident_SLA_Data=[];
  1172. $scope.getIncident_SLA=function(){
  1173. var data={
  1174. "idx":0,
  1175. "sum":10
  1176. };
  1177. jry_api_bpm.jry_getFetchDataList(data,"servicelevelagreement").then(function(res){
  1178. $scope.incident_SLA_Data=res.list
  1179. })
  1180. };
  1181. $scope.getIncident_SLA();
  1182. $scope.incident_SLASave=function(){
  1183. for(var i=0;i<$scope.incident_SLA_Data.length;i++){
  1184. $scope.incident_SLA_Data[i].availabilityDate=$scope.incident_SLA_Data[i].availabilityDate+" 08:00:00";
  1185. $scope.incident_SLA_Data[i].terminationDate=$scope.incident_SLA_Data[i].terminationDate+" 08:00:00";
  1186. var data={
  1187. "servicelevelagreement":$scope.incident_SLA_Data[i]
  1188. }
  1189. jry_api_bpm.jry_editFn(data,"servicelevelagreement").then(function(){
  1190. })
  1191. SweetAlert.swal({
  1192. title: "保存成功!",
  1193. type: "success",
  1194. confirmButtonColor: "#007AFF"
  1195. });
  1196. $timeout(function(){
  1197. $scope.getIncident_SLA();
  1198. },2000)
  1199. }
  1200. }
  1201. $scope.incident_SLAReturn=function(){
  1202. $scope.incident_SLA_Data[0].resolveTime=450;
  1203. $scope.incident_SLA_Data[1].resolveTime=480;
  1204. $scope.incident_SLA_Data[2].resolveTime=480;
  1205. $scope.incident_SLA_Data[3].resolveTime=960;
  1206. $scope.incident_SLA_Data[0].responseTime=30;
  1207. $scope.incident_SLA_Data[1].responseTime=45;
  1208. $scope.incident_SLA_Data[2].responseTime=60;
  1209. $scope.incident_SLA_Data[3].responseTime=240;
  1210. for(var i=0;i<$scope.incident_SLA_Data.length;i++){
  1211. $scope.incident_SLA_Data[i].availabilityDate=$scope.incident_SLA_Data[i].availabilityDate+" 08:00:00";
  1212. $scope.incident_SLA_Data[i].terminationDate=$scope.incident_SLA_Data[i].terminationDate+" 08:00:00";
  1213. var data={
  1214. "servicelevelagreement":$scope.incident_SLA_Data[i]
  1215. }
  1216. jry_api_bpm.jry_editFn(data,"servicelevelagreement").then(function(){
  1217. })
  1218. SweetAlert.swal({
  1219. title: "保存成功!",
  1220. type: "success",
  1221. confirmButtonColor: "#007AFF"
  1222. });
  1223. $timeout(function(){
  1224. $scope.getIncident_SLA();
  1225. },2000)
  1226. }
  1227. }
  1228. // 服务级别协议结束
  1229. // 事件来源开始
  1230. $scope.incident_sourceData=[];
  1231. $scope.getIncident_source=function(){
  1232. var data={
  1233. "key":"incident_source",
  1234. "type":"list"
  1235. }
  1236. api_wechatfile.getDictionary(data).then(function(res){
  1237. $scope.incident_sourceData=res;
  1238. })
  1239. }
  1240. $scope.getIncident_source();
  1241. $scope.incident_sourceSave=function(){
  1242. for(var i=0;i<$scope.incident_sourceData.length;i++){
  1243. api_sysinfo.addData('dictionary', $scope.incident_sourceData[i]).then(function(res) {
  1244. })
  1245. }
  1246. SweetAlert.swal({
  1247. title: "保存成功!",
  1248. type: "success",
  1249. confirmButtonColor: "#007AFF"
  1250. });
  1251. $timeout(function(){
  1252. $scope.getIncident_source();
  1253. },2000)
  1254. }
  1255. $scope.incident_sourceReturn=function(){
  1256. $scope.incident_sourceData[0].name="电话";
  1257. $scope.incident_sourceData[1].name="留言";
  1258. $scope.incident_sourceData[2].name="微信/web";
  1259. $scope.incident_sourceData[3].name="主动发现";
  1260. $scope.incident_sourceData[4].name="领导指派";
  1261. $scope.incident_sourceData[5].name="其他";
  1262. $scope.incident_sourceData[0].value="phone";
  1263. $scope.incident_sourceData[1].value="record";
  1264. $scope.incident_sourceData[2].value="im";
  1265. $scope.incident_sourceData[3].value="discover";
  1266. $scope.incident_sourceData[4].value="leader";
  1267. $scope.incident_sourceData[5].value="other";
  1268. for(var i=0;i<$scope.incident_sourceData.length;i++){
  1269. api_sysinfo.addData('dictionary', $scope.incident_sourceData[i]).then(function(res) {
  1270. })
  1271. }
  1272. SweetAlert.swal({
  1273. title: "恢复成功!",
  1274. type: "success",
  1275. confirmButtonColor: "#007AFF"
  1276. });
  1277. $timeout(function(){
  1278. $scope.getIncident_source();
  1279. },2000)
  1280. }
  1281. // 事件来源结束
  1282. // 关闭代码开始
  1283. $scope.incident_closecodeData=[];
  1284. $scope.getIncident_closecode=function(){
  1285. var data={
  1286. "key":"incident_closecode",
  1287. "type":"list"
  1288. }
  1289. api_wechatfile.getDictionary(data).then(function(res){
  1290. $scope.incident_closecodeData=res;
  1291. })
  1292. }
  1293. $scope.getIncident_closecode();
  1294. $scope.incident_closecodeSave=function(){
  1295. for(var i=0;i<$scope.incident_closecodeData.length;i++){
  1296. api_sysinfo.addData('dictionary', $scope.incident_closecodeData[i]).then(function(res) {
  1297. })
  1298. }
  1299. SweetAlert.swal({
  1300. title: "保存成功!",
  1301. type: "success",
  1302. confirmButtonColor: "#007AFF"
  1303. });
  1304. $timeout(function(){
  1305. $scope.getIncident_closecode();
  1306. },2000)
  1307. }
  1308. $scope.incident_closecodeReturn=function(){
  1309. $scope.incident_closecodeData[0].value="060";
  1310. $scope.incident_closecodeData[1].value="061";
  1311. $scope.incident_closecodeData[2].value="062";
  1312. $scope.incident_closecodeData[3].value="063";
  1313. $scope.incident_closecodeData[4].value="064";
  1314. $scope.incident_closecodeData[5].value="065";
  1315. $scope.incident_closecodeData[0].desc="事件已经完全解决";
  1316. $scope.incident_closecodeData[1].desc="事件未能完全解决";
  1317. $scope.incident_closecodeData[2].desc="由服务提供商对事件进行处理";
  1318. $scope.incident_closecodeData[3].desc="事件自行消失";
  1319. $scope.incident_closecodeData[4].desc="事件请求不在服务范围内";
  1320. $scope.incident_closecodeData[5].desc="通过问题或变更流程处理";
  1321. $scope.incident_closecodeData[0].desc="完全解决";
  1322. $scope.incident_closecodeData[1].desc="临时解决";
  1323. $scope.incident_closecodeData[2].desc="供应商解决";
  1324. $scope.incident_closecodeData[3].desc="事件消失";
  1325. $scope.incident_closecodeData[4].desc="拒绝";
  1326. $scope.incident_closecodeData[5].desc="进入其他流程处理";
  1327. for(var i=0;i<$scope.incident_closecodeData.length;i++){
  1328. api_sysinfo.addData('dictionary', $scope.incident_closecodeData[i]).then(function(res) {
  1329. })
  1330. }
  1331. SweetAlert.swal({
  1332. title: "恢复成功!",
  1333. type: "success",
  1334. confirmButtonColor: "#007AFF"
  1335. });
  1336. $timeout(function(){
  1337. $scope.getIncident_closecode();
  1338. },2000)
  1339. }
  1340. // 关闭代码结束
  1341. // 优先级规则开始
  1342. $scope.incident_prioritymatrixAdd=function(){
  1343. var modalInstance = $modal.open({
  1344. templateUrl: 'assets/views/system/tpl/systemprioritymatrix.html',
  1345. controller: function($scope, $modalInstance, api_bpm_data) {
  1346. $scope.prioritymatrixdata={};
  1347. var prioritymatrixInfluenceData={
  1348. "key":"incident_influence",
  1349. "type":"list"
  1350. }
  1351. $scope.prioritymatrixInfluenceData=[];
  1352. api_wechatfile.getDictionary(prioritymatrixInfluenceData).then(function(res){
  1353. $scope.prioritymatrixInfluenceData=res;
  1354. })
  1355. var prioritymatrixEmergencyData={
  1356. "key":"incident_emergency",
  1357. "type":"list"
  1358. }
  1359. $scope.prioritymatrixEmergencyData=[];
  1360. api_wechatfile.getDictionary(prioritymatrixEmergencyData).then(function(res){
  1361. $scope.prioritymatrixEmergencyData=res;
  1362. })
  1363. var prioritymatrixPriorityData={
  1364. "key":"incident_priority",
  1365. "type":"list"
  1366. }
  1367. $scope.prioritymatrixPriorityData=[];
  1368. api_wechatfile.getDictionary(prioritymatrixPriorityData).then(function(res){
  1369. $scope.prioritymatrixPriorityData=res;
  1370. })
  1371. $scope.cancel = function() {
  1372. $modalInstance.dismiss('cancel');
  1373. };
  1374. $scope.savercode = function(prioritymatrixdata) {
  1375. $modalInstance.close(prioritymatrixdata);
  1376. };
  1377. }
  1378. });
  1379. modalInstance.result.then(function(selectedItem) {
  1380. // console.log('selectedItem='+JSON.stringify(selectedItem));
  1381. if (selectedItem) {
  1382. console.log(selectedItem);
  1383. var fildata = { "prioritymatrix": { "priority": { "id": selectedItem.priority.id }, "emergency": { "id": selectedItem.emergency.id }, "influence": { "id": selectedItem.influence.id } } }
  1384. api_bpm_data.addData('prioritymatrix', fildata).then(function(response) {
  1385. if (response) {
  1386. if (response.status == 200) {
  1387. SweetAlert.swal({
  1388. title: "新增成功!",
  1389. type: "success"
  1390. }, function() {
  1391. $scope.getPrioritymatrix()
  1392. })
  1393. } else {
  1394. SweetAlert.swal({
  1395. title: "新增失败!",
  1396. text: "已有此类优先级规则!",
  1397. type: "error"
  1398. })
  1399. }
  1400. }
  1401. })
  1402. }
  1403. });
  1404. }
  1405. $scope.prioritymatrixData=[];
  1406. $scope.getPrioritymatrix=function(){
  1407. var data={
  1408. "idx":0,
  1409. "sum":999
  1410. }
  1411. api_statistic.tableData(data,"prioritymatrix").then(function(res){
  1412. $scope.prioritymatrixData=res.list
  1413. })
  1414. }
  1415. $scope.incident_prioritymatrixSave=function(){
  1416. SweetAlert.swal({
  1417. title: "修改成功!",
  1418. type: "success"
  1419. })
  1420. for(var i=0;i<$scope.prioritymatrixData.length;i++){
  1421. api_bpm.updData("prioritymatrix",{"prioritymatrix":$scope.prioritymatrixData[i]}).then(function(res){
  1422. if(res.status!=200){
  1423. SweetAlert.swal({
  1424. title: "修改失败!",
  1425. text: "已有此类优先级规则,或者规则不合理!",
  1426. type: "error"
  1427. })
  1428. }
  1429. })
  1430. }
  1431. $timeout(function(){
  1432. $scope.getPrioritymatrix()
  1433. },2000)
  1434. }
  1435. $scope.removePrioritymatrix=function(data){
  1436. SweetAlert.swal({
  1437. title: "确认删除?",
  1438. text: "删除的数据不可恢复,请确认继续操作!",
  1439. type: "warning",
  1440. showCancelButton: true,
  1441. confirmButtonColor: "#DD6B55",
  1442. confirmButtonText: "继续删除",
  1443. cancelButtonText: "取消操作",
  1444. closeOnConfirm: false,
  1445. closeOnCancel: false
  1446. }, function (isConfirm) {
  1447. if (isConfirm) {
  1448. api_bpm_data.rmvData("prioritymatrix",[data.id]).then(function(res){
  1449. console.log(res);
  1450. if(res.status==200){
  1451. SweetAlert.swal({
  1452. title: "删除成功!",
  1453. type: "success",
  1454. confirmButtonColor: "#007AFF"
  1455. }, function() {
  1456. $scope.getPrioritymatrix()
  1457. });
  1458. }else{
  1459. SweetAlert.swal({
  1460. title: "删除失败",
  1461. text: "系统错误,请稍后重试!",
  1462. type: "error",
  1463. confirmButtonColor: "#DD6B55"
  1464. });
  1465. }
  1466. })
  1467. } else {
  1468. SweetAlert.swal("操作取消", "数据安全", "error");
  1469. }
  1470. });
  1471. }
  1472. $scope.getPrioritymatrix()
  1473. // 优先级规则结束
  1474. // 维修记录开始
  1475. $scope.incident_prioritymatrixAdd=function(){
  1476. var modalInstance = $modal.open({
  1477. templateUrl: 'assets/views/system/tpl/systemprocessingLog.html',
  1478. controller: function($scope, $modalInstance, api_bpm_data) {
  1479. $scope.processingLogdata={description:''};
  1480. $scope.cancel = function() {
  1481. $modalInstance.dismiss('cancel');
  1482. };
  1483. $scope.savercode = function(processingLogdata) {
  1484. $modalInstance.close(processingLogdata);
  1485. };
  1486. }
  1487. });
  1488. modalInstance.result.then(function(selectedItem) {
  1489. console.log(selectedItem);
  1490. if (selectedItem.description.trim()) {
  1491. console.log(selectedItem);
  1492. var fildata = { "dictionary": { key:'processingLog',name:1,value:selectedItem.description.trim(),deleted:false,system:0 } }
  1493. api_bpm_data.addData('dictionary', fildata).then(function(response) {
  1494. $scope.getProcessingLogList()
  1495. if (response) {
  1496. if (response.status == 200 && response.data.value) {
  1497. SweetAlert.swal({
  1498. title: "新增成功!",
  1499. type: "success"
  1500. })
  1501. } else {
  1502. SweetAlert.swal({
  1503. title: "新增失败!",
  1504. text: "内容重复!",
  1505. type: "error"
  1506. })
  1507. }
  1508. }
  1509. })
  1510. }else{
  1511. SweetAlert.swal({
  1512. title: "新增失败!",
  1513. text: "请填写内容!",
  1514. type: "error"
  1515. })
  1516. }
  1517. });
  1518. }
  1519. $scope.processingLogList=[];
  1520. $scope.getProcessingLogList=function(){
  1521. var data={
  1522. "idx":0,
  1523. "sum":999,
  1524. dictionary:{key:'processingLog'}
  1525. }
  1526. api_statistic.tableData(data,"dictionary").then(function(res){
  1527. $scope.processingLogList=res.list
  1528. })
  1529. }
  1530. $scope.incident_processingLogListSave=function(){
  1531. var n = 0;
  1532. for(var i=0;i<$scope.processingLogList.length;i++){
  1533. n++;
  1534. api_bpm.updData("dictionary",{"dictionary":$scope.processingLogList[i]}).then(function(res){
  1535. if(res.status==200 && res.data.value){
  1536. if(--n == 0){
  1537. SweetAlert.swal({
  1538. title: "修改成功!",
  1539. type: "success"
  1540. })
  1541. $scope.getProcessingLogList()
  1542. }
  1543. }else{
  1544. SweetAlert.swal({
  1545. title: "修改失败!",
  1546. text: "内容重复!",
  1547. type: "error"
  1548. })
  1549. }
  1550. })
  1551. }
  1552. // $timeout(function(){
  1553. // $scope.getProcessingLogList()
  1554. // },2000)
  1555. }
  1556. $scope.removePrioritymatrix=function(data){
  1557. SweetAlert.swal({
  1558. title: "确认删除?",
  1559. text: "删除的数据不可恢复,请确认继续操作!",
  1560. type: "warning",
  1561. showCancelButton: true,
  1562. confirmButtonColor: "#DD6B55",
  1563. confirmButtonText: "继续删除",
  1564. cancelButtonText: "取消操作",
  1565. closeOnConfirm: false,
  1566. closeOnCancel: false
  1567. }, function (isConfirm) {
  1568. if (isConfirm) {
  1569. api_bpm_data.rmvData("dictionary",[data.id]).then(function(res){
  1570. console.log(res);
  1571. $scope.getProcessingLogList();
  1572. if(res.status==200){
  1573. SweetAlert.swal({
  1574. title: "删除成功!",
  1575. type: "success",
  1576. confirmButtonColor: "#007AFF"
  1577. });
  1578. }else{
  1579. SweetAlert.swal({
  1580. title: "删除失败",
  1581. text: "系统错误,请稍后重试!",
  1582. type: "error",
  1583. confirmButtonColor: "#DD6B55"
  1584. });
  1585. }
  1586. })
  1587. } else {
  1588. SweetAlert.swal("操作取消", "数据安全", "error");
  1589. }
  1590. });
  1591. }
  1592. $scope.getProcessingLogList()
  1593. // 维修记录结束
  1594. // 维修方式开始
  1595. $scope.incident_maintenanceModeAdd=function(){
  1596. var modalInstance = $modal.open({
  1597. templateUrl: 'assets/views/system/tpl/systemmaintenanceMode.html',
  1598. controller: function($scope, $modalInstance, api_bpm_data) {
  1599. $scope.processingLogdata={description:''};
  1600. $scope.cancel = function() {
  1601. $modalInstance.dismiss('cancel');
  1602. };
  1603. $scope.savercode = function(processingLogdata) {
  1604. $modalInstance.close(processingLogdata);
  1605. };
  1606. }
  1607. });
  1608. modalInstance.result.then(function(selectedItem) {
  1609. console.log(selectedItem);
  1610. if (selectedItem.description.trim()) {
  1611. console.log(selectedItem);
  1612. var fildata = { "dictionary": { key:'repair_type',name:selectedItem.description.trim(),value:new Date().getTime().toString(36),deleted:false,system:0 } }
  1613. api_bpm_data.addData('dictionary', fildata).then(function(response) {
  1614. $scope.getMaintenanceModList()
  1615. if (response) {
  1616. if (response.status == 200 && response.data.value) {
  1617. SweetAlert.swal({
  1618. title: "新增成功!",
  1619. type: "success"
  1620. })
  1621. } else {
  1622. SweetAlert.swal({
  1623. title: "新增失败!",
  1624. text: "内容重复!",
  1625. type: "error"
  1626. })
  1627. }
  1628. }
  1629. })
  1630. }else{
  1631. SweetAlert.swal({
  1632. title: "新增失败!",
  1633. text: "请填写内容!",
  1634. type: "error"
  1635. })
  1636. }
  1637. });
  1638. }
  1639. $scope.maintenanceModList=[];
  1640. $scope.getMaintenanceModList=function(){
  1641. var data={
  1642. "idx":0,
  1643. "sum":999,
  1644. dictionary:{key:'repair_type'}
  1645. }
  1646. api_statistic.tableData(data,"dictionary").then(function(res){
  1647. $scope.maintenanceModList=res.list
  1648. })
  1649. }
  1650. $scope.incident_maintenanceModeListSave=function(){
  1651. var n = 0;
  1652. for(var i=0;i<$scope.maintenanceModList.length;i++){
  1653. n++;
  1654. api_bpm.updData("dictionary",{"dictionary":$scope.maintenanceModList[i]}).then(function(res){
  1655. if(res.status==200 && res.data.value){
  1656. if(--n == 0){
  1657. SweetAlert.swal({
  1658. title: "修改成功!",
  1659. type: "success"
  1660. })
  1661. $scope.getMaintenanceModList()
  1662. }
  1663. }else{
  1664. SweetAlert.swal({
  1665. title: "修改失败!",
  1666. text: "内容重复!",
  1667. type: "error"
  1668. })
  1669. }
  1670. })
  1671. }
  1672. }
  1673. $scope.removeMaintenanceMode=function(data){
  1674. SweetAlert.swal({
  1675. title: "确认删除?",
  1676. text: "删除的数据不可恢复,请确认继续操作!",
  1677. type: "warning",
  1678. showCancelButton: true,
  1679. confirmButtonColor: "#DD6B55",
  1680. confirmButtonText: "继续删除",
  1681. cancelButtonText: "取消操作",
  1682. closeOnConfirm: false,
  1683. closeOnCancel: false
  1684. }, function (isConfirm) {
  1685. if (isConfirm) {
  1686. api_bpm_data.rmvData("dictionary",[data.id]).then(function(res){
  1687. console.log(res);
  1688. $scope.getMaintenanceModList();
  1689. if(res.status==200){
  1690. SweetAlert.swal({
  1691. title: "删除成功!",
  1692. type: "success",
  1693. confirmButtonColor: "#007AFF"
  1694. });
  1695. }else{
  1696. SweetAlert.swal({
  1697. title: "删除失败",
  1698. text: "系统错误,请稍后重试!",
  1699. type: "error",
  1700. confirmButtonColor: "#DD6B55"
  1701. });
  1702. }
  1703. })
  1704. } else {
  1705. SweetAlert.swal("操作取消", "数据安全", "error");
  1706. }
  1707. });
  1708. }
  1709. $scope.getMaintenanceModList()
  1710. // 维修方式结束
  1711. // 获取组数据
  1712. $scope.getGroupList=function(){
  1713. var postData={
  1714. idx: 0,
  1715. sum: 1000,
  1716. group: {selectType: "nouser"}
  1717. }
  1718. api_user_data.fetchDataList('group',postData).then(res=>{
  1719. $scope.groupList=res.list;
  1720. })
  1721. }
  1722. $scope.getGroupList()
  1723. // 获取人数据
  1724. $scope.getUserList=function(){
  1725. var postData={
  1726. idx: 0,
  1727. sum: 1000,
  1728. user: {
  1729. roledata: {rolecode: "first-line support"},
  1730. name:'',
  1731. selectType: "pinyin_qs",
  1732. engineer: 1,
  1733. }
  1734. }
  1735. api_user_data.fetchDataList('user',postData).then(res=>{
  1736. $scope.userList=res.list;
  1737. })
  1738. }
  1739. $scope.getUserList()
  1740. // 获取故障现象人员
  1741. $scope.getUserList1=function(){
  1742. var postData={
  1743. idx: 0,
  1744. sum: 1000,
  1745. user: {
  1746. name:'',
  1747. selectType: "pinyin_qs",
  1748. roledata:{
  1749. rolecode:'incident-category-manager'
  1750. },
  1751. engineer: 1,
  1752. }
  1753. }
  1754. api_user_data.fetchDataList('user',postData).then(res=>{
  1755. $scope.userList1=res.list;
  1756. })
  1757. }
  1758. $scope.getUserList1()
  1759. }]);