charts3.js 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377
  1. 'use strict';
  2. app.controller('charts3Ctrl', ["$scope", "$rootScope", "$state", "$timeout", "$interval", "$http", "$cookieStore", "Restangular", "api_hkreport", "api_wechat_operate", function ($scope, $rootScope, $state, $timeout, $interval, $http, $cookieStore, Restangular, api_hkreport, api_wechat_operate) {
  3. $scope.ceshi = ["110", "105", "84", "125", "110", "92", "98"];
  4. // 来电趋势图
  5. var dom_laidianqushitu = document.getElementById("laidianqushitu");
  6. var myChart_laidianqushitu = echarts.init(dom_laidianqushitu);
  7. var app = {};
  8. // 旧趋势图
  9. {
  10. // option_laidianqushitu = {
  11. // backgroundColor: "transparent",
  12. // tooltip: {},
  13. // grid: {
  14. // top: '8%',
  15. // left: '1%',
  16. // right: '1%',
  17. // bottom: '8%',
  18. // containLabel: true,
  19. // },
  20. // xAxis: [{
  21. // type: 'category',
  22. // boundaryGap: false,
  23. // axisLine: { //坐标轴轴线相关设置。数学上的x轴
  24. // show: true,
  25. // lineStyle: {
  26. // color: '#233e64'
  27. // },
  28. // },
  29. // axisLabel: { //坐标轴刻度标签的相关设置
  30. // textStyle: {
  31. // color: 'white',
  32. // margin: 15,
  33. // align: 'right'
  34. // },
  35. // },
  36. // axisTick: {
  37. // show: false,
  38. // },
  39. // data: ['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00'],
  40. // }],
  41. // yAxis: [{
  42. // type: 'value',
  43. // min: 0,
  44. // // max: 16,
  45. // minInterval: 1,
  46. // // splitNumber: 7,
  47. // splitLine: {
  48. // show: true,
  49. // lineStyle: {
  50. // color: '#233e64'
  51. // }
  52. // },
  53. // axisLine: {
  54. // show: false,
  55. // },
  56. // axisLabel: {
  57. // margin: 20,
  58. // textStyle: {
  59. // color: 'white',
  60. // },
  61. // },
  62. // axisTick: {
  63. // show: false,
  64. // },
  65. // }],
  66. // series: [{
  67. // name: '异常流量',
  68. // type: 'line',
  69. // smooth: true, //是否平滑曲线显示
  70. // // symbol:'circle', // 默认是空心圆(中间是白色的),改成实心圆
  71. // symbolSize: 0,
  72. // lineStyle: {
  73. // normal: {
  74. // color: "rgb(34,142,215)" // 线条颜色
  75. // }
  76. // },
  77. // areaStyle: { //区域填充样式
  78. // normal: {
  79. // //线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’,则该四个值是绝对像素位置。
  80. // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  81. // offset: 0,
  82. // color: 'rgba(34,142,215, 0.6)'
  83. // },
  84. // {
  85. // offset: 1,
  86. // color: 'rgba(34,142,215, 0.1)'
  87. // }
  88. // ], false),
  89. // shadowColor: 'rgba(34,142,215, 0.9)', //阴影颜色
  90. // shadowBlur: 20 //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
  91. // }
  92. // },
  93. // // data: [90, 105, 84, 125, 110, 92, 98]
  94. // data: $scope.ceshi
  95. // }]
  96. // };
  97. }
  98. var option_laidianqushitu = null;
  99. option_laidianqushitu = {
  100. backgroundColor: "transparent",
  101. tooltip: {},
  102. grid: {
  103. top: '8%',
  104. left: '1%',
  105. right: '1%',
  106. bottom: '8%',
  107. containLabel: true,
  108. },
  109. xAxis: [{
  110. type: 'category',
  111. // boundaryGap: false,
  112. axisLine: { //坐标轴轴线相关设置。数学上的x轴
  113. show: true,
  114. lineStyle: {
  115. color: '#233e64'
  116. },
  117. },
  118. axisLabel: { //坐标轴刻度标签的相关设置
  119. textStyle: {
  120. color: 'white',
  121. // margin: 15,
  122. align: 'center'
  123. },
  124. // margin:10,
  125. // rotate:40
  126. },
  127. axisTick: {
  128. show: false,
  129. },
  130. data: ['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00'],
  131. }],
  132. yAxis: [{
  133. type: 'value',
  134. min: 0,
  135. // max: 16,
  136. minInterval: 1,
  137. // splitNumber: 7,
  138. splitLine: {
  139. show: true,
  140. lineStyle: {
  141. color: '#233e64'
  142. }
  143. },
  144. axisLine: {
  145. show: false,
  146. },
  147. axisLabel: {
  148. margin: 20,
  149. textStyle: {
  150. color: 'white',
  151. },
  152. },
  153. axisTick: {
  154. show: false,
  155. },
  156. }],
  157. series: [{
  158. name: '异常流量',
  159. type: 'line',
  160. // smooth: true, //是否平滑曲线显示
  161. symbolSize: 5,
  162. symbol: 'emptyCircle',
  163. tooltip: {
  164. show: false
  165. },
  166. "itemStyle": {
  167. "normal": {
  168. "color": "rgb(34,142,215)",
  169. "barBorderRadius": 0,
  170. },
  171. borderColor: '#f0f'
  172. },
  173. // data: [90, 105, 84, 125, 110, 92, 98]
  174. data: $scope.ceshi
  175. },
  176. {
  177. name: '异常流量',
  178. type: 'bar',
  179. barWidth: 15,
  180. tooltip: {
  181. show: false
  182. },
  183. itemStyle: {
  184. normal: {
  185. color: "rgb(34,142,215)" // 线条颜色
  186. }
  187. },
  188. // data: [90, 105, 84, 125, 110, 92, 98]
  189. data: $scope.ceshi
  190. }
  191. ]
  192. };
  193. // 报修趋势图
  194. var dom_baoxiuqushitu = document.getElementById("baoxiuqushitu");
  195. var myChart_baoxiuqushitu = echarts.init(dom_baoxiuqushitu);
  196. var app = {};
  197. var option_baoxiuqushitu = null;
  198. option_baoxiuqushitu = {
  199. backgroundColor: "transparent",
  200. tooltip: {},
  201. grid: {
  202. top: '8%',
  203. left: '1%',
  204. right: '1%',
  205. bottom: '8%',
  206. containLabel: true,
  207. },
  208. xAxis: [{
  209. type: 'category',
  210. // boundaryGap: false,
  211. axisLine: { //坐标轴轴线相关设置。数学上的x轴
  212. show: true,
  213. lineStyle: {
  214. color: '#233e64'
  215. },
  216. },
  217. axisLabel: { //坐标轴刻度标签的相关设置
  218. textStyle: {
  219. color: 'white',
  220. margin: 15,
  221. align: 'center'
  222. },
  223. },
  224. axisTick: {
  225. show: false,
  226. },
  227. data: ['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00'],
  228. }],
  229. yAxis: [{
  230. type: 'value',
  231. min: 0,
  232. // max: 16,
  233. minInterval: 1,
  234. // splitNumber: 7,
  235. splitLine: {
  236. show: true,
  237. lineStyle: {
  238. color: '#233e64'
  239. }
  240. },
  241. axisLine: {
  242. show: false,
  243. },
  244. axisLabel: {
  245. margin: 20,
  246. textStyle: {
  247. color: 'white',
  248. },
  249. },
  250. axisTick: {
  251. show: false,
  252. },
  253. }],
  254. series: [{
  255. name: '异常流量',
  256. type: 'line',
  257. // smooth: true, //是否平滑曲线显示
  258. symbol: 'emptyCircle', // 默认是空心圆(中间是白色的),改成实心圆
  259. symbolSize: 5,
  260. itemStyle: {
  261. normal: {
  262. color: "#eb9341" // 线条颜色
  263. },
  264. borderColor: '#f0f'
  265. },
  266. tooltip: {
  267. show: false
  268. },
  269. data: [90, 105, 84, 125, 110, 92, 98]
  270. },
  271. {
  272. name: '异常流量',
  273. type: 'bar',
  274. barWidth: 15,
  275. itemStyle: {
  276. normal: {
  277. color: "#eb9341" // 线条颜色
  278. }
  279. },
  280. data: [90, 105, 84, 125, 110, 92, 98]
  281. }
  282. ]
  283. };
  284. // 旧趋势图
  285. {
  286. // option_baoxiuqushitu = {
  287. // backgroundColor: "transparent",
  288. // tooltip: {},
  289. // grid: {
  290. // top: '8%',
  291. // left: '1%',
  292. // right: '1%',
  293. // bottom: '8%',
  294. // containLabel: true,
  295. // },
  296. // xAxis: [{
  297. // type: 'category',
  298. // boundaryGap: false,
  299. // axisLine: { //坐标轴轴线相关设置。数学上的x轴
  300. // show: true,
  301. // lineStyle: {
  302. // color: '#233e64'
  303. // },
  304. // },
  305. // axisLabel: { //坐标轴刻度标签的相关设置
  306. // textStyle: {
  307. // color: 'white',
  308. // margin: 15,
  309. // align: 'right'
  310. // },
  311. // },
  312. // axisTick: {
  313. // show: false,
  314. // },
  315. // data: ['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00'],
  316. // }],
  317. // yAxis: [{
  318. // type: 'value',
  319. // min: 0,
  320. // // max: 16,
  321. // minInterval: 1,
  322. // // splitNumber: 7,
  323. // splitLine: {
  324. // show: true,
  325. // lineStyle: {
  326. // color: '#233e64'
  327. // }
  328. // },
  329. // axisLine: {
  330. // show: false,
  331. // },
  332. // axisLabel: {
  333. // margin: 20,
  334. // textStyle: {
  335. // color: 'white',
  336. // },
  337. // },
  338. // axisTick: {
  339. // show: false,
  340. // },
  341. // }],
  342. // series: [{
  343. // name: '异常流量',
  344. // type: 'line',
  345. // smooth: true, //是否平滑曲线显示
  346. // // symbol:'circle', // 默认是空心圆(中间是白色的),改成实心圆
  347. // symbolSize: 0,
  348. // lineStyle: {
  349. // normal: {
  350. // color: "rgb(208,64,47)" // 线条颜色
  351. // }
  352. // },
  353. // areaStyle: { //区域填充样式
  354. // normal: {
  355. // //线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’,则该四个值是绝对像素位置。
  356. // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  357. // offset: 0,
  358. // color: 'rgba(208,64,47, 0.6)'
  359. // },
  360. // {
  361. // offset: 1,
  362. // color: 'rgba(208,64,47, 0.1)'
  363. // }
  364. // ], false),
  365. // shadowColor: 'rgba(208,64,47, 0.9)', //阴影颜色
  366. // shadowBlur: 20 //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
  367. // }
  368. // },
  369. // data: [90, 105, 84, 125, 110, 92, 98]
  370. // }]
  371. // };
  372. }
  373. // myChart_baoxiuqushitu.setOption(option_baoxiuqushitu);
  374. // 事件工单列表轮播图
  375. // var shijian_index=1;
  376. // setInterval(function(){
  377. // var l='-'+414*shijian_index+'px';
  378. // $('.shijian_tables_box:eq(0)').animate({left:l},1000,function(){
  379. // if(shijian_index == $('.shijian_tables').length-1){
  380. // $(this).css('left',0);
  381. // shijian_index=1;
  382. // }else{
  383. // shijian_index++;
  384. // }
  385. // });
  386. // },5000)
  387. // 报修列表轮播图
  388. // var baoxiu_index=1;
  389. // setInterval(function(){
  390. // var l='-'+414*baoxiu_index+'px';
  391. // $('.baoxiu_tables_box:eq(0)').animate({left:l},1000,function(){
  392. // if(baoxiu_index == $('.baoxiu_tables').length-1){
  393. // $(this).css('left',0);
  394. // baoxiu_index=1;
  395. // }else{
  396. // baoxiu_index++;
  397. // }
  398. // });
  399. // },5000)
  400. // 调用数据
  401. var nowDay = moment(new Date().getTime() + 86400000).format("YYYY-MM-DD");
  402. var yesterDay = moment(new Date().getTime()).format("YYYY-MM-DD");
  403. var nowHour = moment(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss");
  404. // 一个月前
  405. var lastMonth = moment(new Date()).subtract(1, 'months').format('YYYY-MM-DD');
  406. var sixHourAgo = moment(new Date().getTime() - 3600000 * 6).format("YYYY-MM-DD HH:mm:ss");
  407. // 近1年
  408. var lastYear = moment().subtract(1, "years").format("YYYY-MM-DD");
  409. // 获取工单实时总数数据
  410. // 开始
  411. $scope.incident_allData = "";
  412. function getIncident_allData(time) {
  413. api_hkreport.incidentreport(time, 'large_screen_incident_total').then(function (res) {
  414. console.log(res);
  415. $scope.incident_allData = res.data[0].sum
  416. })
  417. }
  418. getIncident_allData({
  419. })
  420. // 结束
  421. // 获取及时响应数据
  422. // 开始
  423. $scope.incident_responseData = "";
  424. function getIncident_responseData(time) {
  425. api_hkreport.incidentreport(time, 'large_screen_incident_pending_total').then(function (res) {
  426. console.log(res);
  427. $scope.incident_responseData = res.data[0].sum
  428. })
  429. }
  430. getIncident_responseData({})
  431. // 结束
  432. // 获取解决中数据
  433. // 开始
  434. $scope.incident_solveNowData = "";
  435. function getIncident_solveNowData(time) {
  436. api_hkreport.incidentreport(time, 'large_screen_incident_handler_total').then(function (res) {
  437. console.log(res);
  438. $scope.incident_solveNowData = res.data[0].sum
  439. })
  440. }
  441. getIncident_solveNowData({
  442. })
  443. // // 结束
  444. // // 获取已解决数据
  445. // // 开始
  446. $scope.incident_solvedData = "";
  447. function getIncident_solvedData(time) {
  448. api_hkreport.incidentreport(time, 'large_screen_incident_resolved_total').then(function (res) {
  449. $scope.incident_solvedData = res.data[0].sum
  450. })
  451. }
  452. getIncident_solvedData({})
  453. // 结束
  454. // // 获取近一年建单总数数据
  455. // // 开始
  456. $scope.incident_total_year = "";
  457. function getYear_incident_total(time) {
  458. api_hkreport.incidentreport(time, 'large_screen_year_incident_total').then(function (res) {
  459. $scope.incident_total_year = res.data[0].sum
  460. })
  461. }
  462. getYear_incident_total({
  463. "start": lastYear + " 00:00:00",
  464. "end": yesterDay + " 23:59:59"
  465. })
  466. // 结束
  467. // // 获取近一个月建单总数数据
  468. // // 开始
  469. $scope.incident_total_month = "";
  470. function getYear_incident_total_month(time) {
  471. api_hkreport.incidentreport(time, 'large_screen_year_incident_total').then(function (res) {
  472. $scope.incident_total_month = res.data[0].sum
  473. })
  474. }
  475. getYear_incident_total_month({
  476. "start": lastMonth + " 00:00:00",
  477. "end": yesterDay + " 23:59:59"
  478. })
  479. // 结束
  480. // // 获取近一年事件解决总时长数据
  481. // // 开始
  482. $scope.incident_solve_time_year = "";
  483. function getIncident_solve_time(time) {
  484. api_hkreport.incidentreport(time, 'large_screen_year_incident_solve_time').then(function (res) {
  485. $scope.incident_solve_time_year = res.data[0].hour || 0
  486. })
  487. }
  488. getIncident_solve_time({
  489. "start": lastYear + " 00:00:00",
  490. "end": yesterDay + " 23:59:59"
  491. })
  492. // 结束
  493. // // 获取近一个月事件解决总时长数据
  494. // // 开始
  495. $scope.incident_solve_time_month = "";
  496. function getIncident_solve_time_month(time) {
  497. api_hkreport.incidentreport(time, 'large_screen_year_incident_solve_time').then(function (res) {
  498. $scope.incident_solve_time_month = res.data[0].hour || 0
  499. })
  500. }
  501. getIncident_solve_time_month({
  502. "start": lastMonth + " 00:00:00",
  503. "end": yesterDay + " 23:59:59"
  504. })
  505. // 结束
  506. // // 获取近一年已解决工单数据
  507. // // 开始
  508. $scope.incident_solve_total_year = "";
  509. function getIncident_solve_total(time) {
  510. api_hkreport.incidentreport(time, 'large_screen_year_incident_solve_total').then(function (res) {
  511. $scope.incident_solve_total_year = res.data[0].sum
  512. })
  513. }
  514. getIncident_solve_total({
  515. "start": lastYear + " 00:00:00",
  516. "end": yesterDay + " 23:59:59"
  517. })
  518. // 结束
  519. // // 获取近一个月已解决工单数据
  520. // // 开始
  521. $scope.incident_solve_total_month = "";
  522. function getIncident_solve_total_month(time) {
  523. api_hkreport.incidentreport(time, 'large_screen_year_incident_solve_total').then(function (res) {
  524. $scope.incident_solve_total_month = res.data[0].sum
  525. })
  526. }
  527. getIncident_solve_total_month({
  528. "start": lastMonth + " 00:00:00",
  529. "end": yesterDay + " 23:59:59"
  530. })
  531. // 结束
  532. // // 获取近一年满意度数据
  533. // // 开始
  534. $scope.incident_degree_year = "";
  535. function getIncident_degree(time) {
  536. api_hkreport.incidentreport(time, 'large_screen_year_incident_degree').then(function (res) {
  537. $scope.incident_degree_year = res.data[0].degree || 0
  538. })
  539. }
  540. getIncident_degree({
  541. "start": lastYear + " 00:00:00",
  542. "end": yesterDay + " 23:59:59"
  543. })
  544. // 结束
  545. // // 获取近一个月满意度数据
  546. // // 开始
  547. $scope.incident_degree_month = "";
  548. function getIncident_degree_month(time) {
  549. api_hkreport.incidentreport(time, 'large_screen_year_incident_degree').then(function (res) {
  550. $scope.incident_degree_month = res.data[0].degree || 0
  551. })
  552. }
  553. getIncident_degree_month({
  554. "start": lastMonth + " 00:00:00",
  555. "end": yesterDay + " 23:59:59"
  556. })
  557. // 结束
  558. // 获取呼叫中心来电趋势图数据
  559. // 开始
  560. function getCallPitData(time) {
  561. api_hkreport.incidentreport(time, 'large_screen_call_trend').then(function (res) {
  562. var timeArr = [];
  563. var time = [];
  564. var value = [];
  565. var time = res.date;
  566. $scope.allIncidentreport = 0;
  567. for (var i = 0; i < res.value.length; i++) {
  568. $scope.allIncidentreport = $scope.allIncidentreport + Number(res.value[i])
  569. }
  570. for (var i = 0; i < time.length; i++) {
  571. timeArr.push(time[i].substring(time[i].length - 2, time[i].length) + ":00");
  572. }
  573. value = res.value;
  574. option_laidianqushitu.xAxis[0].data = timeArr;
  575. option_laidianqushitu.series[0].data = value;
  576. option_laidianqushitu.series[1].data = value;
  577. myChart_laidianqushitu.setOption(option_laidianqushitu);
  578. // $scope.incident_solveData=res.data[0].sum
  579. })
  580. }
  581. getCallPitData({
  582. "start": yesterDay + " 08",
  583. // "start": "2018-05-28 00",
  584. "end": yesterDay + " 18"
  585. });
  586. // 结束
  587. // 呼叫中心来电总数
  588. // 开始
  589. // $scope.callAll=0;
  590. // function getCallPitAllData(time){
  591. // api_hkreport.incidentreport(time, 'service_counter').then(function(res) {
  592. // console.log(res);
  593. // $scope.callAll=res.workCallProportion.sum
  594. // })
  595. // }
  596. // getCallPitAllData({
  597. // "start":yesterDay,
  598. // "end":moment(new Date().getTime()+86400000).format("YYYY-MM-DD")
  599. // })
  600. // $interval(function(){
  601. // getCallPitAllData({
  602. // "start":yesterDay,
  603. // "end":moment(new Date().getTime()+86400000).format("YYYY-MM-DD")
  604. // })
  605. // },30000)
  606. // 结束
  607. // 微信报修总数
  608. // 开始
  609. $scope.wxAll = 0;
  610. function getWxPitAllData(time) {
  611. api_hkreport.incidentreport(time, 'large_screen_wx_incident_sum').then(function (res) {
  612. console.log(res);
  613. $scope.wxAll = res.data[0].sum
  614. // $scope.callAll=res.workCallProportion.sum
  615. })
  616. }
  617. getWxPitAllData({
  618. "start": yesterDay + " 00:00:00",
  619. // "start": "2018-05-28 00:00:00",
  620. "end": yesterDay + " 23:59:59"
  621. })
  622. // 结束
  623. // 获取微信报修趋势图数据
  624. // 开始
  625. function getWechatPitData(time) {
  626. api_hkreport.incidentreport(time, 'large_screen_wx_incident_trend').then(function (res) {
  627. var timeArr = [];
  628. var time = [];
  629. var value = [];
  630. var time = res.date;
  631. for (var i = 0; i < time.length; i++) {
  632. timeArr.push(time[i].substring(time[i].length - 2, time[i].length) + ":00");
  633. }
  634. value = res.value;
  635. option_baoxiuqushitu.xAxis[0].data = timeArr;
  636. option_baoxiuqushitu.series[0].data = value;
  637. option_baoxiuqushitu.series[1].data = value;
  638. myChart_baoxiuqushitu.setOption(option_baoxiuqushitu);
  639. })
  640. }
  641. getWechatPitData({
  642. "start": yesterDay + " 08:00:00",
  643. // "start": "2018-05-28 00:00:00",
  644. "end": yesterDay + " 18:00:00"
  645. });
  646. // 结束
  647. // 获取事件工单处理实时情况数据
  648. // 开始
  649. $scope.incidentHandleList1 = [];
  650. // $scope.incidentHandleList2 = [];
  651. function getIncidentHandleData(time, inter) {
  652. api_hkreport.incidentreport(time, 'large_screen_incident_rt_status').then(function (res) {
  653. $scope.incidentHandleList1 = res.data;
  654. setTimeout(() => {
  655. $scope.slides('body', 'box', 'box1', 'list1', 5, inter);
  656. }, 1000);
  657. // if (res.data.length > 14) {
  658. // $scope.incidentHandleList2 = res.data.slice(8, 15);
  659. // } else {
  660. // $scope.incidentHandleList1 = res.data;
  661. // $scope.incidentHandleList2 = res.data;
  662. // }
  663. })
  664. }
  665. getIncidentHandleData({}, 1)
  666. // 结束
  667. // 获取微信报修详情列表数据
  668. // 开始
  669. $scope.weChatList1 = [];
  670. // $scope.weChatList2 = [];
  671. function getWeChatData(time, inter) {
  672. api_hkreport.incidentreport(time, 'large_screen_wx_incident_details').then(function (res) {
  673. var str = []
  674. for (var i = 0; i < res.data.length; i++) {
  675. if (res.data[i].name != '咨询' && res.data[i].name != '管理员' && res.data[i].name != '' && res.data[i].name != null) {
  676. str.push(res.data[i]);
  677. }
  678. }
  679. $scope.weChatList1 = str;
  680. // console.log($scope.weChatList1)
  681. setTimeout(() => {
  682. $scope.slides('body', 'box2', 'box3', 'list2', 5, inter);
  683. }, 1000);
  684. // console.log(res);
  685. // for (var i = 0; i < res.data.length; i++) {
  686. // if (res.data[i].name == "咨询") {
  687. // // delete res.data[i]
  688. // res.data.splice(i, 1)
  689. // }
  690. // }
  691. // if (res.data.length > 14) {
  692. // $scope.weChatList1 = res.data.slice(0, 7);
  693. // $scope.weChatList2 = res.data.slice(8, 15);
  694. // } else {
  695. // $scope.weChatList2 = res.data;
  696. // }
  697. })
  698. }
  699. getWeChatData({}, 1)
  700. // 结束
  701. // 获取处理地点列表数据
  702. // 开始
  703. $scope.placeList = [];
  704. function getPlaceListData(time, inter) {
  705. api_hkreport.incidentreport(time, 'large_screen_incident_area').then(function (res) {
  706. console.log(res);
  707. // res.data=[
  708. // {"area":"主校区","statusid":4,"priority":"重大"},
  709. // {"area":"主校区","statusid":4,"priority":"普通"},
  710. // {"area":"主校区","statusid":4,"priority":"普通"},
  711. // {"area":"同济校区","statusid":4,"priority":"重大"},
  712. // {"area":"同济校区","statusid":4,"priority":"普通"},
  713. // ]
  714. // $("#box5").html('');
  715. $scope.placeList = res.data;
  716. var shijian_index = 0;
  717. $(".map_list_body_poi:eq(0)").scrollTop(0);
  718. $scope.tongjixiaoquSum = 0;
  719. $scope.tongjixiaoqu_zhongdaSum = 0;
  720. $scope.tongjixiaoqu_gaoSum = 0;
  721. $scope.tongjixiaoqu_jiaogaoSum = 0;
  722. $scope.tongjixiaoqu_putongSum = 0;
  723. $scope.zhuxiaoquSum = 0;
  724. $scope.zhuxiaoqu_zhongdaSum = 0;
  725. $scope.zhuxiaoqu_gaoSum = 0;
  726. $scope.zhuxiaoqu_jiaogaoSum = 0;
  727. $scope.zhuxiaoqu_putongSum = 0;
  728. $scope.dongxiaoquSum = 0;
  729. $scope.dongxiaoqu_zhongdaSum = 0;
  730. $scope.dongxiaoqu_gaoSum = 0;
  731. $scope.dongxiaoqu_jiaogaoSum = 0;
  732. $scope.dongxiaoqu_putongSum = 0;
  733. $scope.tongjixiaoqu_chuliguo = 0;
  734. $scope.zhuxiaoqu_chuliguo = 0;
  735. $scope.dongxiaoqu_chuliguo = 0;
  736. for (var i = 0; i < res.data.length; i++) {
  737. if (res.data[i].area == "主校区" && res.data[i].statusid == 4 || res.data[i].statusid == 2) {
  738. $scope.zhuxiaoquSum++
  739. if (res.data[i].priority == "重大") {
  740. $scope.zhuxiaoqu_zhongdaSum++
  741. } else if (res.data[i].priority == "高") {
  742. $scope.zhuxiaoqu_gaoSum++
  743. } else if (res.data[i].priority == "较高") {
  744. $scope.zhuxiaoqu_jiaogaoSum++
  745. } else {
  746. $scope.zhuxiaoqu_putongSum++
  747. }
  748. } else if (res.data[i].area == "同济校区" && res.data[i].statusid == 4 || res.data[i].statusid == 2) {
  749. $scope.tongjixiaoquSum++
  750. if (res.data[i].priority == "重大") {
  751. $scope.tongjixiaoqu_zhongdaSum++
  752. } else if (res.data[i].priority == "高") {
  753. $scope.tongjixiaoqu_gaoSum++
  754. } else if (res.data[i].priority == "较高") {
  755. $scope.tongjixiaoqu_jiaogaoSum++
  756. } else {
  757. $scope.tongjixiaoqu_putongSum++
  758. }
  759. } else if (res.data[i].area == "东校区" && res.data[i].statusid == 4 || res.data[i].statusid == 2) {
  760. $scope.dongxiaoquSum++
  761. if (res.data[i].priority == "重大") {
  762. $scope.dongxiaoqu_zhongdaSum++
  763. } else if (res.data[i].priority == "高") {
  764. $scope.dongxiaoqu_gaoSum++
  765. } else if (res.data[i].priority == "较高") {
  766. $scope.dongxiaoqu_jiaogaoSum++
  767. } else {
  768. $scope.dongxiaoqu_putongSum++
  769. }
  770. }
  771. }
  772. for (var i = 0; i < res.data.length; i++) {
  773. if (res.data[i].statusid != 4 && res.data[i].statusid != 2) {
  774. if (res.data[i].area == "主校区") {
  775. $scope.zhuxiaoqu_chuliguo++;
  776. $scope.zhuxiaoquSum++;
  777. $scope.zhuxiaoqu_zhongdaSum++
  778. } else if (res.data[i].area == "同济校区") {
  779. $scope.tongjixiaoqu_chuliguo++;
  780. $scope.tongjixiaoquSum++;
  781. $scope.tongjixiaoqu_zhongdaSum++
  782. } else if (res.data[i].area == "东校区") {
  783. $scope.dongxiaoqu_chuliguo++;
  784. $scope.dongxiaoquSum++;
  785. $scope.dongxiaoqu_zhongdaSum++
  786. }
  787. }
  788. }
  789. setTimeout(() => {
  790. $scope.slides('body1', 'box4', 'box5', 'list3', 3, inter);
  791. }, 1000);
  792. // console.log("zhongda " + $scope.zhuxiaoqu_zhongdaSum + "; putong" + $scope.zhuxiaoquSum);
  793. // if (res.data.length > 5) {
  794. // $scope.listTimerFn = function () {
  795. // $scope.listTimer = $interval(function timer() {
  796. // $(".map_list_body_poi:eq(0)").scrollTop(shijian_index);
  797. // if (shijian_index - 2 > $(".map_list_body_poi:eq(0)").scrollTop()) {
  798. // $interval.cancel($scope.listTimer);
  799. // $timeout(function () {
  800. // $scope.listTimerFn();
  801. // $(".map_list_body_poi:eq(0)").scrollTop(0);
  802. // shijian_index = 0;
  803. // }, 5000)
  804. // };
  805. // shijian_index++;
  806. // }, 240)
  807. // }
  808. // $scope.listTimerFn()
  809. // }
  810. })
  811. }
  812. getPlaceListData({
  813. "start": yesterDay + " 00:00:00",
  814. // "start": "2018-05-28 00:00:00",
  815. "end": yesterDay + " 23:59:59"
  816. // "start":"2019-04-17 23:59:59",
  817. }, 1)
  818. // 结束
  819. // 获取近一年区域地点事件发生详情列表数据
  820. // 开始
  821. // 热力图
  822. {
  823. // 热力图
  824. // $scope.heatMaps = function (boxId, list) {
  825. // var heatmapInstance = h337.create({
  826. // container: document.getElementById(boxId),
  827. // radius: 40,
  828. // maxOpacity: .7,
  829. // gradient: {
  830. // '.3': 'rgba(115,255,155,.5)',//白
  831. // '.7': 'rgba(238,239,11,.4)',//黄
  832. // '.9': 'rgba(208,64,47,.1)',//红
  833. // }
  834. // });
  835. // var dataPoints = [{
  836. // x: 0,
  837. // y: 0,
  838. // // radius: 40,
  839. // value: 160
  840. // }, {
  841. // x: 0,
  842. // y: 0,
  843. // // radius: 40,
  844. // value: 180
  845. // }];
  846. // for (var i = 0; i < list.length; i++) {
  847. // if (list[i].coordinates) {
  848. // var point = list[i].coordinates.split(',');
  849. // heatmapInstance.addData([{
  850. // x: point[0] / 2 + 10,
  851. // y: point[1] / 2 + 10,
  852. // // radius: 40,
  853. // value: list[i].proportion
  854. // }, {
  855. // x: point[0] / 2 + 10,
  856. // y: point[1] / 2 + 10,
  857. // // radius: 40,
  858. // value: list[i].proportion
  859. // }]);
  860. // }
  861. // }
  862. // }
  863. }
  864. // 一年热力图&表格数据
  865. $scope.areaList = [];
  866. function getAreaListData(time, inter) {
  867. api_hkreport.incidentreport(time, 'large_screen_areaplace_incident_details').then(function (res) {
  868. console.log(res);
  869. $scope.areaList = res.data;
  870. setTimeout(() => {
  871. $scope.slides('body1', 'box6', 'box7', 'list4', 3, inter);
  872. // $scope.heatMaps('container', $scope.areaList)
  873. }, 1000);
  874. })
  875. }
  876. getAreaListData({
  877. sum: 100,
  878. "start": lastYear + " 00:00:00",
  879. "end": yesterDay + " 23:59:59"
  880. // "start":"2019-04-17 23:59:59",
  881. }, 1)
  882. // 一个月热力图
  883. $scope.areaMonthList = [];
  884. function getAreaMonthListData(time, inter) {
  885. api_hkreport.incidentreport(time, 'large_screen_areaplace_incident_details').then(function (res) {
  886. $scope.areaMonthList = res.data;
  887. setTimeout(() => {
  888. $scope.slides('body1', 'box8', 'box9', 'list5', 3, inter);
  889. // $scope.heatMaps('containerMonth', $scope.areaMonthList)
  890. }, 1000);
  891. })
  892. }
  893. getAreaMonthListData({
  894. sum: 100,
  895. "start": lastMonth + " 00:00:00",
  896. "end": yesterDay + " 23:59:59"
  897. // "start":"2019-04-17 23:59:59",
  898. }, 1)
  899. // 结束
  900. // 地图事件位置&数量
  901. // $scope.dayMapDataList = []; //当天
  902. $scope.monthMapDataList = []; //当月
  903. $scope.yearMapDataList = []; //当年
  904. // function getMapData(time) {
  905. // api_hkreport.incidentreport(time, 'large_screen_map_data').then(function (res) {
  906. // $scope.dayMapDataList = res.data;
  907. // })
  908. // }
  909. function getMonthMapData(time) {
  910. api_hkreport.incidentreport(time, 'large_screen_map_data').then(function (res) {
  911. $scope.monthMapDataList = res.data;
  912. })
  913. }
  914. function getYearMapData(time) {
  915. api_hkreport.incidentreport(time, 'large_screen_map_data').then(function (res) {
  916. $scope.yearMapDataList = res.data;
  917. })
  918. }
  919. // getMapData({
  920. // sum: 100,
  921. // "start": yesterDay + " 00:00:00",
  922. // "end": yesterDay + " 23:59:59"
  923. // })
  924. getMonthMapData({
  925. sum: 10,
  926. "start": lastMonth + " 00:00:00",
  927. "end": yesterDay + " 23:59:59"
  928. })
  929. getYearMapData({
  930. sum: 20,
  931. "start": lastYear + " 00:00:00",
  932. "end": yesterDay + " 23:59:59"
  933. })
  934. // 事件工单列表状态颜色
  935. $scope.statusColor = function (res) {
  936. if (res == "接单") {
  937. return "jiedai"
  938. } else if (res == "事件处理") {
  939. return "chulizhong"
  940. } else if (res == "事件关闭") {
  941. return "guanbi"
  942. } else {
  943. return "qita"
  944. }
  945. }
  946. // 事件工单处理实时情况状态转换
  947. $scope.incident_status = function (res) {
  948. if (res == "事件处理") {
  949. return "处理中"
  950. } else if (res == "事件关闭") {
  951. return "已办结"
  952. } else {
  953. return res
  954. }
  955. }
  956. // 列表前点颜色
  957. $scope.liebiao_zhuangtai = function (status, priority) {
  958. if (status == 4 || status == 2) {
  959. if (priority == "重大") {
  960. return "zhongda"
  961. } else {
  962. return ""
  963. }
  964. } else {
  965. return "chuliguo"
  966. }
  967. }
  968. // 来电趋势/微信报修趋势...(页面数据轮播)
  969. $scope.slideBoxLeft = 0;
  970. $scope.slideBoxLeft1 = 0;
  971. $scope.slideBoxLeft2 = 0;
  972. $scope.slideBoxLeft3 = 0; //索引
  973. function move1() {
  974. if ($scope.slideBoxLeft == 0) {
  975. $scope.slideBoxLeft = '-100%';
  976. } else {
  977. $scope.slideBoxLeft = 0;
  978. }
  979. if ($scope.slideBoxLeft1 == 0) {
  980. $scope.slideBoxLeft1 = '-100%';
  981. } else if ($scope.slideBoxLeft1 == '-100%') {
  982. $scope.slideBoxLeft1 = '-200%';
  983. } else if ($scope.slideBoxLeft1 == '-200%') {
  984. $scope.slideBoxLeft1 = '-300%';
  985. } else if ($scope.slideBoxLeft1 == '-300%') {
  986. $scope.slideBoxLeft1 = '-400%';
  987. } else if ($scope.slideBoxLeft1 == '-400%') {
  988. $scope.slideBoxLeft1 = '-500%';
  989. } else {
  990. $scope.slideBoxLeft1 = 0;
  991. }
  992. if ($scope.slideBoxLeft2 == 0) {
  993. $scope.slideBoxLeft2 = '-100%';
  994. } else if ($scope.slideBoxLeft2 == '-100%') {
  995. $scope.slideBoxLeft2 = '-200%';
  996. } else {
  997. $scope.slideBoxLeft2 = 0;
  998. }
  999. if ($scope.slideBoxLeft3 >= 0) {
  1000. $scope.slideBoxLeft3++;
  1001. if($scope.slideBoxLeft3 == 6){
  1002. $scope.slideBoxLeft3 = 0;
  1003. }
  1004. // console.log($scope.slideBoxLeft3, '$scope.slideBoxLeft3')
  1005. if($scope.slideBoxLeft3 == 0 || $scope.slideBoxLeft3 == 1 || $scope.slideBoxLeft3 == 2){
  1006. $scope.cloudMap.goTo(114.41276, 30.51515, 1, 16);//主校区
  1007. }
  1008. if($scope.slideBoxLeft3 == 3 || $scope.slideBoxLeft3 == 4 || $scope.slideBoxLeft3 == 5){
  1009. $scope.cloudMap.goTo(114.254, 30.5855, 3, 16);//同济校区
  1010. }
  1011. }
  1012. }
  1013. // 列表滚动
  1014. // a:table body 的class名;b:滚动父盒子的id名;c:滚动盒子的id名;d:滚动项的class名;e:每页展示的条数;f:interval定时器开启1/关闭0
  1015. $scope.slides = function (a, b, c, d, e, f) {
  1016. var speed = 45; //设置向上轮动的速度
  1017. var list = $('.' + d).clone();
  1018. if (list.length >= e) {
  1019. var body1 = $('.' + a)[0];
  1020. var box = $("#" + b);
  1021. if (f) {
  1022. $("#" + c).append(list.splice(0, e))
  1023. }
  1024. var top = 0;
  1025. function moveTop() {
  1026. if (top <= body1.offsetHeight - box[0].offsetHeight) {
  1027. top = 0;
  1028. } else {
  1029. top--;
  1030. }
  1031. box.css({
  1032. 'top': top + 'px'
  1033. })
  1034. }
  1035. var interval = setInterval(() => {
  1036. moveTop()
  1037. }, 50);
  1038. if (!f) {
  1039. clearInterval(interval)
  1040. }
  1041. }
  1042. }
  1043. // 区域地点实时动态图标点
  1044. $scope.pointPosition = function (point, statusid) {
  1045. var style = {};
  1046. if (point) {
  1047. var arr = point.split(',');
  1048. style.left = arr[0] / 2 + 10 + 'px';
  1049. style.top = arr[1] / 2 - 10 + 'px';
  1050. } else {
  1051. // 南1楼 - 南8楼
  1052. style.left = 800 / 2 + 10 + 'px';
  1053. style.top = 800 / 2 - 10 + 'px';
  1054. }
  1055. return style;
  1056. }
  1057. // 地图上的提示框闪烁
  1058. var a = 0;
  1059. function flicker(className) {
  1060. setInterval(() => {
  1061. a++
  1062. $(className).hide()
  1063. $($(className)[a]).show();
  1064. if (a >= $(className).length - 1) {
  1065. a = 0;
  1066. }
  1067. }, 1500);
  1068. }
  1069. // flicker('.dataHaoRooms')
  1070. // flicker('.dataHaoRooms1')
  1071. // flicker('.dataHaoRooms2')
  1072. // 定时刷新
  1073. function getDataInter(time) {
  1074. $interval(function () {
  1075. $interval.cancel($scope.listTimer);
  1076. getIncidentHandleData({}, 0);
  1077. getWeChatData({}, 0);
  1078. getPlaceListData({
  1079. "start": yesterDay + " 00:00:00",
  1080. // "start": "2018-05-28 00:00:00",
  1081. "end": yesterDay + " 23:59:59"
  1082. }, 0)
  1083. getIncident_allData({});
  1084. getIncident_responseData({});
  1085. getIncident_solveNowData({})
  1086. getIncident_solvedData({})
  1087. getYear_incident_total({
  1088. "start": lastYear + " 00:00:00",
  1089. "end": yesterDay + " 23:59:59"
  1090. })
  1091. getYear_incident_total_month({
  1092. "start": lastMonth + " 00:00:00",
  1093. "end": yesterDay + " 23:59:59"
  1094. })
  1095. getIncident_solve_time({
  1096. "start": lastYear + " 00:00:00",
  1097. "end": yesterDay + " 23:59:59"
  1098. })
  1099. getIncident_solve_time_month({
  1100. "start": lastMonth + " 00:00:00",
  1101. "end": yesterDay + " 23:59:59"
  1102. })
  1103. getIncident_solve_total({
  1104. "start": lastYear + " 00:00:00",
  1105. "end": yesterDay + " 23:59:59"
  1106. })
  1107. getIncident_solve_total_month({
  1108. "start": lastMonth + " 00:00:00",
  1109. "end": yesterDay + " 23:59:59"
  1110. })
  1111. getIncident_degree({
  1112. "start": lastYear + " 00:00:00",
  1113. "end": yesterDay + " 23:59:59"
  1114. })
  1115. getIncident_degree_month({
  1116. "start": lastMonth + " 00:00:00",
  1117. "end": yesterDay + " 23:59:59"
  1118. })
  1119. getCallPitData({
  1120. "start": yesterDay + " 08",
  1121. // "start": "2018-05-28 00",
  1122. "end": yesterDay + " 18"
  1123. });
  1124. getWxPitAllData({
  1125. "start": yesterDay + " 00:00:00",
  1126. // "start": "2018-05-28 00:00:00",
  1127. "end": yesterDay + " 23:59:59"
  1128. })
  1129. getWechatPitData({
  1130. "start": yesterDay + " 08:00:00",
  1131. // "start": "2018-05-28 00:00:00",
  1132. "end": yesterDay + " 18:00:00"
  1133. });
  1134. getMonthMapData({
  1135. sum: 10,
  1136. "start": lastMonth + " 00:00:00",
  1137. "end": yesterDay + " 23:59:59"
  1138. })
  1139. getYearMapData({
  1140. sum: 20,
  1141. "start": lastYear + " 00:00:00",
  1142. "end": yesterDay + " 23:59:59"
  1143. })
  1144. }, time)
  1145. }
  1146. getDataInter(300000) //5分钟
  1147. // 切屏
  1148. setInterval(() => {
  1149. move1()
  1150. }, 15000); //15秒
  1151. // 获取地图token
  1152. api_wechat_operate.mapToken({active: 1}, 'mapToken').then(function (res) {
  1153. //#region 渲染地图--------------------start
  1154. //arcgis字体文件资质
  1155. //var arcgisFontUrl = "";
  1156. var is3d = false;
  1157. var username = "yunweixt20221207";
  1158. var addressToken = res.token; //通过api获取
  1159. //点位聚合
  1160. // var reductionCustom = {
  1161. // 室内消火栓: {
  1162. // clusterRadius: 100,
  1163. // clusterMinSize: 28,
  1164. // clusterMaxSize: 36,
  1165. // },
  1166. // 图层名称2: {
  1167. // clusterRadius: 100,
  1168. // clusterMinSize: 28,
  1169. // clusterMaxSize: 36,
  1170. // },
  1171. // };
  1172. var reductionCustom = null;
  1173. // var layerColor = null;
  1174. var layerColor = {
  1175. baseMap: "dark",
  1176. floorMap: "dark",
  1177. };
  1178. $scope.$watch('$viewContentLoaded', function() {
  1179. console.log('viewContentLoaded');
  1180. $scope.cloudMap = Object.create(CloudMap); //页面加载完成后,创建map对象
  1181. // $scope.cloudMap2 = Object.create(CloudMap); //页面加载完成后,创建map对象
  1182. // $scope.cloudMap3 = Object.create(CloudMap); //页面加载完成后,创建map对象
  1183. // $scope.cloudMap4 = Object.create(CloudMap); //页面加载完成后,创建map对象
  1184. // $scope.cloudMap5 = Object.create(CloudMap); //页面加载完成后,创建map对象
  1185. // $scope.cloudMap6 = Object.create(CloudMap); //页面加载完成后,创建map对象
  1186. // 主校区
  1187. $scope.cloudMap.initMap(
  1188. "viewDiv",
  1189. 114.41276,
  1190. 30.51515,
  1191. 1,
  1192. username,
  1193. is3d,
  1194. addressToken,
  1195. null,
  1196. reductionCustom,
  1197. layerColor,
  1198. mapReady
  1199. );
  1200. // $scope.cloudMap2.initMap(
  1201. // "viewDiv2",
  1202. // 114.41276,
  1203. // 30.51515,
  1204. // 1,
  1205. // username,
  1206. // is3d,
  1207. // addressToken,
  1208. // null,
  1209. // reductionCustom,
  1210. // layerColor,
  1211. // mapReady
  1212. // );
  1213. // $scope.cloudMap3.initMap(
  1214. // "viewDiv3",
  1215. // 114.41276,
  1216. // 30.51515,
  1217. // 1,
  1218. // username,
  1219. // is3d,
  1220. // addressToken,
  1221. // null,
  1222. // reductionCustom,
  1223. // layerColor,
  1224. // mapReady
  1225. // );
  1226. // // 同济校区
  1227. // $scope.cloudMap4.initMap(
  1228. // "viewDiv4",
  1229. // 114.254,
  1230. // 30.5855,
  1231. // 3,
  1232. // username,
  1233. // is3d,
  1234. // addressToken,
  1235. // null,
  1236. // reductionCustom,
  1237. // layerColor,
  1238. // mapReady
  1239. // );
  1240. // $scope.cloudMap5.initMap(
  1241. // "viewDiv5",
  1242. // 114.254,
  1243. // 30.5855,
  1244. // 3,
  1245. // username,
  1246. // is3d,
  1247. // addressToken,
  1248. // null,
  1249. // reductionCustom,
  1250. // layerColor,
  1251. // mapReady
  1252. // );
  1253. // $scope.cloudMap6.initMap(
  1254. // "viewDiv6",
  1255. // 114.254,
  1256. // 30.5855,
  1257. // 3,
  1258. // username,
  1259. // is3d,
  1260. // addressToken,
  1261. // null,
  1262. // reductionCustom,
  1263. // layerColor,
  1264. // mapReady
  1265. // );
  1266. });
  1267. function mapReady() {
  1268. //cloudMap.changeLayerVisible('建筑物中心点', false);
  1269. //地图加载成功
  1270. // cloudMap.initLayerList("top-right"); //显示图层管理模块,位置top-right,top-left,bottom-right,bottom-right
  1271. // cloudMap.initLegend("top-left"); //显示图例
  1272. // cloudMap.click(doSomeThing); //绑定点击查询事件,点击空白处返回 “0”,点击具体的点则会返回相应数doSomeThing是回调函数,根据返回的结果
  1273. //获取全部图层名称
  1274. // var allLayerTitle = cloudMap.getAllLayerTitle();
  1275. // console.log(allLayerTitle);
  1276. //动态添加图层(下拉列表)
  1277. // allLayerTitle.forEach((element) => {
  1278. // //console.log(element);
  1279. // document
  1280. // .getElementById("txt_layer")
  1281. // .options.add(new Option(element, element));
  1282. // document
  1283. // .getElementById("txt_layer2")
  1284. // .options.add(new Option(element, element));
  1285. // });
  1286. }
  1287. //#endregion 渲染地图--------------------end
  1288. //
  1289. })
  1290. }]);