dwdt.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511
  1. (function ($app) {
  2. 'use strict';
  3. $app.module('gtPartyApp').controller('showDjdsj_dwdtCtrl', function ($scope, $state, $alert, AuthUser, flowaudit, $http, $ocLazyLoad, $loading,$timeout) {
  4. if (AuthUser.getUser().Id == null || AuthUser.getUser().Id == '') {
  5. window.location.href = "/app/main/index.html#!/login";
  6. return false;
  7. }
  8. //图表取数begin
  9. {
  10. //评先评优
  11. $scope.pxpy_x_dataList = [];
  12. $scope.pxpy_y_dataList = [
  13. {
  14. name: '先进基层党组织',
  15. type: 'bar',
  16. data: [],
  17. color: '#fff'
  18. },
  19. {
  20. name: '优秀共产党员',
  21. type: 'bar',
  22. data: [],
  23. color: '#fff'
  24. },
  25. {
  26. name: '优秀党务工作者',
  27. type: 'bar',
  28. data: [],
  29. color: '#fff'
  30. }
  31. ];
  32. $scope.pxpy_legend = ['先进基层党组织', '优秀共产党员', '优秀党务工作者'];
  33. $scope.pxpy_barOption = {
  34. tooltip: {
  35. trigger: 'axis',
  36. axisPointer: {
  37. type: 'shadow'
  38. }
  39. },
  40. legend: {
  41. x: 'center',
  42. y: 'bottom',
  43. data: $scope.pxpy_legend,
  44. icon: "circle",
  45. textStyle: {
  46. color: '#fff'
  47. }
  48. },
  49. xAxis: {
  50. type: "category",
  51. data: $scope.pxpy_x_dataList,
  52. axisLabel: {
  53. color: '#fff'
  54. }
  55. },
  56. yAxis: {
  57. type: "value",
  58. axisLabel: {
  59. color: '#fff'
  60. },
  61. axisTick: { //y轴刻度线
  62. show: false
  63. },
  64. splitLine: { //网格线
  65. show: false
  66. }
  67. },
  68. series: $scope.pxpy_y_dataList,
  69. grid: {
  70. top: 20,
  71. bottom: 25,
  72. containLabel: true
  73. }
  74. };
  75. $scope.load_pxpy = function () {
  76. $http
  77. ({
  78. method: 'get',
  79. url: '../../api/bigdata/getDsjPxpyList',
  80. params: {}
  81. }).then(function (result) {
  82. if (result.data != null && result.data.length > 0) {
  83. angular.forEach(result.data, function (val) {
  84. $scope.pxpy_x_dataList.push(val.nd);
  85. $scope.pxpy_y_dataList[0].data.push(val.xjjcdzz);
  86. $scope.pxpy_y_dataList[1].data.push(val.yxgcdy);
  87. $scope.pxpy_y_dataList[2].data.push(val.yxdwgzz);
  88. });
  89. }
  90. });
  91. };
  92. $scope.load_pxpy();
  93. //创岗建区
  94. $scope.cgjq_dataList = [];
  95. $scope.cgjq_nameList = ['责任岗', '党员先锋岗', '责任区', '红旗责任区'];
  96. ;
  97. $scope.cgjq_barOption = {
  98. tooltip: {
  99. trigger: 'axis',
  100. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  101. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  102. },
  103. formatter: "{a} <br/>{b} : {c}"
  104. },
  105. xAxis: {
  106. type: "category",
  107. axisLabel: {
  108. color: '#fff'
  109. },
  110. data: $scope.cgjq_nameList
  111. },
  112. yAxis: {
  113. type: "value",
  114. axisLabel: {
  115. color: '#fff'
  116. },
  117. axisTick: { //y轴刻度线
  118. show: false
  119. },
  120. splitLine: { //网格线
  121. show: false
  122. }
  123. },
  124. series: [
  125. {
  126. name: '创岗建区情况',
  127. data: $scope.cgjq_dataList,
  128. type: "bar",
  129. barWidth: 30,
  130. itemStyle: {
  131. normal: {
  132. color: function (params) {
  133. var colorList = ['#F8B551', '#918879', '#EFF0C7', '#91C7AE'];
  134. return colorList[params.dataIndex];
  135. }
  136. }
  137. }
  138. }
  139. ],
  140. grid: {
  141. top: 20,
  142. bottom: 20
  143. }
  144. }
  145. ;
  146. $scope.load_cgjq = function () {
  147. /*$http
  148. ({
  149. method: 'get',
  150. url: '../../api/bigdata/getDsjCgjqList',
  151. params: {}
  152. }).then(function (result) {
  153. if (result.data != null && result.data.length > 0) {
  154. angular.forEach(result.data, function (val) {
  155. $scope.cgjq_nameList.push(val.lbmc);
  156. $scope.cgjq_dataList.push(val.sl);
  157. });
  158. }
  159. });*/
  160. $http
  161. ({
  162. method: 'get', url: '../../api/bigdata/getCGJQTotal', params: {}
  163. }).then(function (res) {
  164. $scope.cgjq_dataList.push(res.data.POSTTOTAL);
  165. $scope.cgjq_dataList.push(res.data.POSTCOUNT);
  166. $scope.cgjq_dataList.push(res.data.AREATOTAL);
  167. $scope.cgjq_dataList.push(res.data.AREACOUNT);
  168. }, function (resp) {
  169. });
  170. };
  171. $scope.load_cgjq();
  172. //党内品牌
  173. $scope.dnpp_dataList = [];
  174. $scope.dnpp_legend_dataList = [];
  175. $scope.dnpp_pieOption = {
  176. legend: {
  177. bottom: 0,
  178. left: 'center',
  179. data: $scope.dnpp_legend_dataList,
  180. icon: "circle",
  181. textStyle: {
  182. color: '#fff'
  183. }
  184. },
  185. tooltip: {
  186. trigger: 'item',
  187. formatter: "{a} <br/>{b} : {c} ({d}%)"
  188. },
  189. series: [
  190. {
  191. name: '党内品牌',
  192. type: 'pie',
  193. avoidLabelOverlap: false,
  194. label: {
  195. normal: {
  196. show: false,
  197. position: 'center'
  198. },
  199. emphasis: {
  200. show: true,
  201. textStyle: {
  202. fontSize: '20',
  203. fontWeight: 'bold'
  204. }
  205. }
  206. },
  207. labelLine: {
  208. normal: {
  209. show: false
  210. }
  211. },
  212. data: $scope.dnpp_dataList
  213. }
  214. ]
  215. };
  216. $scope.load_dnpp = function () {
  217. /*$http
  218. ({
  219. method: 'get',
  220. url: '../../api/bigdata/getDsjDnppList',
  221. params: {
  222. nd: $scope.ndkpjg_nd
  223. }
  224. }).then(function (result) {
  225. if (result.data != null && result.data.length > 0) {
  226. var colors = ['#4565f4', '#c4cffd', '#01588d', '#84cac8', '#019e97'];
  227. angular.forEach(result.data, function (val, index) {
  228. $scope.dnpp_legend_dataList.push(val.lbmc);
  229. $scope.dnpp_dataList.push($scope.getPieData(val.sl, val.lbmc, colors.length > index ? colors[index] : ''));
  230. });
  231. }
  232. });*/
  233. $scope.dnpp_dataList.length = 0;
  234. $http
  235. ({
  236. method: 'get',
  237. url: '../../api/bigdata/getDjkpxxTotalList',
  238. params: {}
  239. }).then(function (result) {
  240. var colorList = ['#F8B551', '#918879', '#EFF0C7', '#91C7AE', '#DCDCDC', '#F0FFFF', '#005983'];
  241. if (result.data != null && result.data.length > 0) {
  242. angular.forEach(result.data, function (item, index) {
  243. $scope.dnpp_dataList.push($scope.getPieData(item.COUNT, item.NAME, colorList[index < colorList.length ? index : (colorList.length - 1)]));
  244. $scope.dnpp_legend_dataList.push(item.NAME);
  245. });
  246. }
  247. });
  248. };
  249. $scope.load_dnpp();
  250. //党员动态
  251. $scope.nydt_x_dataList = [];
  252. $scope.nydt_y_dataList = [
  253. {
  254. name: '转入党员人数',
  255. type: 'line',
  256. stack: '总量',
  257. data: [],
  258. color: '#fff'
  259. },
  260. {
  261. name: '转出党员人数',
  262. type: 'line',
  263. stack: '总量',
  264. data: [],
  265. color: '#fff'
  266. },
  267. {
  268. name: '内部接转人数',
  269. type: 'line',
  270. stack: '总量',
  271. data: [],
  272. color: '#fff'
  273. }
  274. ];
  275. $scope.nydt_lineOption = {
  276. title: {
  277. text: ''
  278. },
  279. tooltip: {
  280. trigger: 'axis'
  281. },
  282. legend: {
  283. x: 'center',
  284. y: 'bottom',
  285. data: ['转入党员人数', '转出党员人数', '内部接转人数'],
  286. textStyle: {
  287. color: '#fff'
  288. }
  289. },
  290. xAxis: {
  291. type: 'category',
  292. boundaryGap: false,
  293. data: $scope.nydt_x_dataList,
  294. axisLabel: {
  295. color: '#fff'
  296. }
  297. },
  298. yAxis: {
  299. type: 'value',
  300. axisLabel: {
  301. color: '#fff'
  302. },
  303. axisTick: { //y轴刻度线
  304. show: false
  305. },
  306. splitLine: { //网格线
  307. show: false
  308. }
  309. },
  310. series: $scope.nydt_y_dataList,
  311. grid: {
  312. top: 20,
  313. bottom: 25,
  314. containLabel: true
  315. }
  316. };
  317. $scope.load_nydt = function () {
  318. $http
  319. ({
  320. method: 'get',
  321. url: '../../api/bigdata/getDsjDydtList',
  322. params: {
  323. nd_OrderBy: 1
  324. }
  325. }).then(function (result) {
  326. if (result.data != null && result.data.length > 0) {
  327. angular.forEach(result.data, function (val) {
  328. $scope.nydt_x_dataList.push(val.nd);
  329. $scope.nydt_y_dataList[0].data.push(val.zr);
  330. $scope.nydt_y_dataList[1].data.push(val.zc);
  331. $scope.nydt_y_dataList[2].data.push(val.nbjz);
  332. });
  333. }
  334. });
  335. };
  336. $scope.load_nydt();
  337. //处置情况
  338. $scope.czqk_x_dataList = [];
  339. $scope.czqk_y_dataList = []/*[
  340. {
  341. name: '警告',
  342. type: 'bar',
  343. data: [],
  344. color: '#4565f4'
  345. },
  346. {
  347. name: '严重警告',
  348. type: 'bar',
  349. data: [],
  350. color: '#c4cffd'
  351. },
  352. {
  353. name: '撤销党内职务',
  354. type: 'bar',
  355. data: [],
  356. color: '#01588d'
  357. },
  358. {
  359. name: '留党察看',
  360. type: 'bar',
  361. data: [],
  362. color: '#84cac8'
  363. },
  364. {
  365. name: '开除党籍',
  366. type: 'bar',
  367. data: [],
  368. color: '#005983'
  369. }
  370. ]*/;
  371. $scope.czqk_legend = []//['警告', '严重警告', '撤销党内职务', '留党察看','开除党籍'];
  372. $scope.czqk_barOption = {
  373. tooltip: {
  374. trigger: 'axis',
  375. axisPointer: {
  376. type: 'shadow'
  377. }
  378. },
  379. legend: {
  380. x: 'center',
  381. y: 'bottom',
  382. data: $scope.czqk_legend,
  383. icon: "circle",
  384. textStyle: {
  385. color: '#fff'
  386. }
  387. },
  388. xAxis: {
  389. type: "category",
  390. data: $scope.czqk_x_dataList,
  391. axisLabel: {
  392. color: '#fff'
  393. }
  394. },
  395. yAxis: {
  396. type: "value",
  397. axisLabel: {
  398. color: '#fff'
  399. },
  400. axisTick: { //y轴刻度线
  401. show: false
  402. },
  403. splitLine: { //网格线
  404. show: false
  405. }
  406. },
  407. series: $scope.czqk_y_dataList,
  408. grid: {
  409. top: 20,
  410. bottom: 20
  411. }
  412. };
  413. $scope.load_czqk = function () {
  414. /*$http
  415. ({
  416. method: 'get',
  417. url: '../../api/bigdata/getDsjCzqkList',
  418. params: {}
  419. }).then(function (result) {
  420. if (result.data != null && result.data.length > 0) {
  421. angular.forEach(result.data, function (val) {
  422. $scope.czqk_x_dataList.push(val.nd);
  423. $scope.czqk_y_dataList[0].data.push(val.cpdy);
  424. $scope.czqk_y_dataList[1].data.push(val.bhgdy);
  425. $scope.czqk_y_dataList[2].data.push(val.cldbhgdy);
  426. $scope.czqk_y_dataList[3].data.push(val.cdzrs);
  427. });
  428. }
  429. });*/
  430. $http
  431. ({
  432. method: 'get',
  433. url: '../../api/bigdata/getJlcfxxTotalList',
  434. params: {}
  435. }).then(function (result) {
  436. var colorList = ['#F8B551', '#918879', '#EFF0C7', '#91C7AE', '#DCDCDC', '#F0FFFF', '#005983'];
  437. if (result.data != null && result.data.length > 0) {
  438. /*angular.forEach(result.data, function (item, index) {
  439. $scope.czqk_x_dataList.push(item.YEAR);
  440. $scope.czqk_y_dataList[0].data.push(item.COUNT1);
  441. $scope.czqk_y_dataList[1].data.push(item.COUNT2);
  442. $scope.czqk_y_dataList[2].data.push(item.COUNT3);
  443. $scope.czqk_y_dataList[3].data.push(item.COUNT4);
  444. $scope.czqk_y_dataList[4].data.push(item.COUNT5);
  445. });*/
  446. $.unique(result.data.map(it => it.YEAR).sort()).forEach(item => {
  447. $scope.czqk_x_dataList.push(item)
  448. });
  449. var types = $.unique(result.data.map(it => it.TYPE).sort());
  450. types.forEach((type, index) => {
  451. var name = result.data.filter(it => it.TYPE == type)[0].NAME;
  452. var data = result.data.filter(it => it.TYPE == type).map(it => it.COUNT);
  453. //$scope.czqk_legend.push(name);
  454. $scope.czqk_y_dataList.push({
  455. name: name,
  456. type: 'bar',
  457. data: data,
  458. color: colorList[index < colorList.length ? index : (colorList.length - 1)]
  459. })
  460. });
  461. }
  462. });
  463. };
  464. $scope.load_czqk();
  465. //三会一课
  466. $scope.shykData = [];
  467. $scope.shykDataTotal = 0;
  468. $scope.load_shyk = function () {
  469. $http
  470. ({
  471. method: 'get',
  472. url: '../../api/bigdata/getShykCount',
  473. params: {
  474. dzzdm: ''
  475. }
  476. }).then(function (result) {
  477. if (result.data != null) {
  478. $scope.shykData = result.data.item;
  479. angular.forEach($scope.shykData, function (val, index) {
  480. $scope.shykDataTotal += val.NUM;
  481. });
  482. }
  483. });
  484. };
  485. $scope.load_shyk();
  486. //组织饼图数据
  487. $scope.getPieData = function (val, name, color) {
  488. return {value: val, name: name, itemStyle: {color: color}};
  489. };
  490. }
  491. //图表取数end
  492. });
  493. })(angular);