123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511 |
- (function ($app) {
- 'use strict';
- $app.module('gtPartyApp').controller('showDjdsj_dwdtCtrl', function ($scope, $state, $alert, AuthUser, flowaudit, $http, $ocLazyLoad, $loading,$timeout) {
- if (AuthUser.getUser().Id == null || AuthUser.getUser().Id == '') {
- window.location.href = "/app/main/index.html#!/login";
- return false;
- }
- //图表取数begin
- {
- //评先评优
- $scope.pxpy_x_dataList = [];
- $scope.pxpy_y_dataList = [
- {
- name: '先进基层党组织',
- type: 'bar',
- data: [],
- color: '#fff'
- },
- {
- name: '优秀共产党员',
- type: 'bar',
- data: [],
- color: '#fff'
- },
- {
- name: '优秀党务工作者',
- type: 'bar',
- data: [],
- color: '#fff'
- }
- ];
- $scope.pxpy_legend = ['先进基层党组织', '优秀共产党员', '优秀党务工作者'];
- $scope.pxpy_barOption = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- legend: {
- x: 'center',
- y: 'bottom',
- data: $scope.pxpy_legend,
- icon: "circle",
- textStyle: {
- color: '#fff'
- }
- },
- xAxis: {
- type: "category",
- data: $scope.pxpy_x_dataList,
- axisLabel: {
- color: '#fff'
- }
- },
- yAxis: {
- type: "value",
- axisLabel: {
- color: '#fff'
- },
- axisTick: { //y轴刻度线
- show: false
- },
- splitLine: { //网格线
- show: false
- }
- },
- series: $scope.pxpy_y_dataList,
- grid: {
- top: 20,
- bottom: 25,
- containLabel: true
- }
- };
- $scope.load_pxpy = function () {
- $http
- ({
- method: 'get',
- url: '../../api/bigdata/getDsjPxpyList',
- params: {}
- }).then(function (result) {
- if (result.data != null && result.data.length > 0) {
- angular.forEach(result.data, function (val) {
- $scope.pxpy_x_dataList.push(val.nd);
- $scope.pxpy_y_dataList[0].data.push(val.xjjcdzz);
- $scope.pxpy_y_dataList[1].data.push(val.yxgcdy);
- $scope.pxpy_y_dataList[2].data.push(val.yxdwgzz);
- });
- }
- });
- };
- $scope.load_pxpy();
- //创岗建区
- $scope.cgjq_dataList = [];
- $scope.cgjq_nameList = ['责任岗', '党员先锋岗', '责任区', '红旗责任区'];
- ;
- $scope.cgjq_barOption = {
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- },
- formatter: "{a} <br/>{b} : {c}"
- },
- xAxis: {
- type: "category",
- axisLabel: {
- color: '#fff'
- },
- data: $scope.cgjq_nameList
- },
- yAxis: {
- type: "value",
- axisLabel: {
- color: '#fff'
- },
- axisTick: { //y轴刻度线
- show: false
- },
- splitLine: { //网格线
- show: false
- }
- },
- series: [
- {
- name: '创岗建区情况',
- data: $scope.cgjq_dataList,
- type: "bar",
- barWidth: 30,
- itemStyle: {
- normal: {
- color: function (params) {
- var colorList = ['#F8B551', '#918879', '#EFF0C7', '#91C7AE'];
- return colorList[params.dataIndex];
- }
- }
- }
- }
- ],
- grid: {
- top: 20,
- bottom: 20
- }
- }
- ;
- $scope.load_cgjq = function () {
- /*$http
- ({
- method: 'get',
- url: '../../api/bigdata/getDsjCgjqList',
- params: {}
- }).then(function (result) {
- if (result.data != null && result.data.length > 0) {
- angular.forEach(result.data, function (val) {
- $scope.cgjq_nameList.push(val.lbmc);
- $scope.cgjq_dataList.push(val.sl);
- });
- }
- });*/
- $http
- ({
- method: 'get', url: '../../api/bigdata/getCGJQTotal', params: {}
- }).then(function (res) {
- $scope.cgjq_dataList.push(res.data.POSTTOTAL);
- $scope.cgjq_dataList.push(res.data.POSTCOUNT);
- $scope.cgjq_dataList.push(res.data.AREATOTAL);
- $scope.cgjq_dataList.push(res.data.AREACOUNT);
- }, function (resp) {
- });
- };
- $scope.load_cgjq();
- //党内品牌
- $scope.dnpp_dataList = [];
- $scope.dnpp_legend_dataList = [];
- $scope.dnpp_pieOption = {
- legend: {
- bottom: 0,
- left: 'center',
- data: $scope.dnpp_legend_dataList,
- icon: "circle",
- textStyle: {
- color: '#fff'
- }
- },
- tooltip: {
- trigger: 'item',
- formatter: "{a} <br/>{b} : {c} ({d}%)"
- },
- series: [
- {
- name: '党内品牌',
- type: 'pie',
- avoidLabelOverlap: false,
- label: {
- normal: {
- show: false,
- position: 'center'
- },
- emphasis: {
- show: true,
- textStyle: {
- fontSize: '20',
- fontWeight: 'bold'
- }
- }
- },
- labelLine: {
- normal: {
- show: false
- }
- },
- data: $scope.dnpp_dataList
- }
- ]
- };
- $scope.load_dnpp = function () {
- /*$http
- ({
- method: 'get',
- url: '../../api/bigdata/getDsjDnppList',
- params: {
- nd: $scope.ndkpjg_nd
- }
- }).then(function (result) {
- if (result.data != null && result.data.length > 0) {
- var colors = ['#4565f4', '#c4cffd', '#01588d', '#84cac8', '#019e97'];
- angular.forEach(result.data, function (val, index) {
- $scope.dnpp_legend_dataList.push(val.lbmc);
- $scope.dnpp_dataList.push($scope.getPieData(val.sl, val.lbmc, colors.length > index ? colors[index] : ''));
- });
- }
- });*/
- $scope.dnpp_dataList.length = 0;
- $http
- ({
- method: 'get',
- url: '../../api/bigdata/getDjkpxxTotalList',
- params: {}
- }).then(function (result) {
- var colorList = ['#F8B551', '#918879', '#EFF0C7', '#91C7AE', '#DCDCDC', '#F0FFFF', '#005983'];
- if (result.data != null && result.data.length > 0) {
- angular.forEach(result.data, function (item, index) {
- $scope.dnpp_dataList.push($scope.getPieData(item.COUNT, item.NAME, colorList[index < colorList.length ? index : (colorList.length - 1)]));
- $scope.dnpp_legend_dataList.push(item.NAME);
- });
- }
- });
- };
- $scope.load_dnpp();
- //党员动态
- $scope.nydt_x_dataList = [];
- $scope.nydt_y_dataList = [
- {
- name: '转入党员人数',
- type: 'line',
- stack: '总量',
- data: [],
- color: '#fff'
- },
- {
- name: '转出党员人数',
- type: 'line',
- stack: '总量',
- data: [],
- color: '#fff'
- },
- {
- name: '内部接转人数',
- type: 'line',
- stack: '总量',
- data: [],
- color: '#fff'
- }
- ];
- $scope.nydt_lineOption = {
- title: {
- text: ''
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- x: 'center',
- y: 'bottom',
- data: ['转入党员人数', '转出党员人数', '内部接转人数'],
- textStyle: {
- color: '#fff'
- }
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: $scope.nydt_x_dataList,
- axisLabel: {
- color: '#fff'
- }
- },
- yAxis: {
- type: 'value',
- axisLabel: {
- color: '#fff'
- },
- axisTick: { //y轴刻度线
- show: false
- },
- splitLine: { //网格线
- show: false
- }
- },
- series: $scope.nydt_y_dataList,
- grid: {
- top: 20,
- bottom: 25,
- containLabel: true
- }
- };
- $scope.load_nydt = function () {
- $http
- ({
- method: 'get',
- url: '../../api/bigdata/getDsjDydtList',
- params: {
- nd_OrderBy: 1
- }
- }).then(function (result) {
- if (result.data != null && result.data.length > 0) {
- angular.forEach(result.data, function (val) {
- $scope.nydt_x_dataList.push(val.nd);
- $scope.nydt_y_dataList[0].data.push(val.zr);
- $scope.nydt_y_dataList[1].data.push(val.zc);
- $scope.nydt_y_dataList[2].data.push(val.nbjz);
- });
- }
- });
- };
- $scope.load_nydt();
- //处置情况
- $scope.czqk_x_dataList = [];
- $scope.czqk_y_dataList = []/*[
- {
- name: '警告',
- type: 'bar',
- data: [],
- color: '#4565f4'
- },
- {
- name: '严重警告',
- type: 'bar',
- data: [],
- color: '#c4cffd'
- },
- {
- name: '撤销党内职务',
- type: 'bar',
- data: [],
- color: '#01588d'
- },
- {
- name: '留党察看',
- type: 'bar',
- data: [],
- color: '#84cac8'
- },
- {
- name: '开除党籍',
- type: 'bar',
- data: [],
- color: '#005983'
- }
- ]*/;
- $scope.czqk_legend = []//['警告', '严重警告', '撤销党内职务', '留党察看','开除党籍'];
- $scope.czqk_barOption = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- legend: {
- x: 'center',
- y: 'bottom',
- data: $scope.czqk_legend,
- icon: "circle",
- textStyle: {
- color: '#fff'
- }
- },
- xAxis: {
- type: "category",
- data: $scope.czqk_x_dataList,
- axisLabel: {
- color: '#fff'
- }
- },
- yAxis: {
- type: "value",
- axisLabel: {
- color: '#fff'
- },
- axisTick: { //y轴刻度线
- show: false
- },
- splitLine: { //网格线
- show: false
- }
- },
- series: $scope.czqk_y_dataList,
- grid: {
- top: 20,
- bottom: 20
- }
- };
- $scope.load_czqk = function () {
- /*$http
- ({
- method: 'get',
- url: '../../api/bigdata/getDsjCzqkList',
- params: {}
- }).then(function (result) {
- if (result.data != null && result.data.length > 0) {
- angular.forEach(result.data, function (val) {
- $scope.czqk_x_dataList.push(val.nd);
- $scope.czqk_y_dataList[0].data.push(val.cpdy);
- $scope.czqk_y_dataList[1].data.push(val.bhgdy);
- $scope.czqk_y_dataList[2].data.push(val.cldbhgdy);
- $scope.czqk_y_dataList[3].data.push(val.cdzrs);
- });
- }
- });*/
- $http
- ({
- method: 'get',
- url: '../../api/bigdata/getJlcfxxTotalList',
- params: {}
- }).then(function (result) {
- var colorList = ['#F8B551', '#918879', '#EFF0C7', '#91C7AE', '#DCDCDC', '#F0FFFF', '#005983'];
- if (result.data != null && result.data.length > 0) {
- /*angular.forEach(result.data, function (item, index) {
- $scope.czqk_x_dataList.push(item.YEAR);
- $scope.czqk_y_dataList[0].data.push(item.COUNT1);
- $scope.czqk_y_dataList[1].data.push(item.COUNT2);
- $scope.czqk_y_dataList[2].data.push(item.COUNT3);
- $scope.czqk_y_dataList[3].data.push(item.COUNT4);
- $scope.czqk_y_dataList[4].data.push(item.COUNT5);
- });*/
- $.unique(result.data.map(it => it.YEAR).sort()).forEach(item => {
- $scope.czqk_x_dataList.push(item)
- });
- var types = $.unique(result.data.map(it => it.TYPE).sort());
- types.forEach((type, index) => {
- var name = result.data.filter(it => it.TYPE == type)[0].NAME;
- var data = result.data.filter(it => it.TYPE == type).map(it => it.COUNT);
- //$scope.czqk_legend.push(name);
- $scope.czqk_y_dataList.push({
- name: name,
- type: 'bar',
- data: data,
- color: colorList[index < colorList.length ? index : (colorList.length - 1)]
- })
- });
- }
- });
- };
- $scope.load_czqk();
- //三会一课
- $scope.shykData = [];
- $scope.shykDataTotal = 0;
- $scope.load_shyk = function () {
- $http
- ({
- method: 'get',
- url: '../../api/bigdata/getShykCount',
- params: {
- dzzdm: ''
- }
- }).then(function (result) {
- if (result.data != null) {
- $scope.shykData = result.data.item;
- angular.forEach($scope.shykData, function (val, index) {
- $scope.shykDataTotal += val.NUM;
- });
- }
- });
- };
- $scope.load_shyk();
- //组织饼图数据
- $scope.getPieData = function (val, name, color) {
- return {value: val, name: name, itemStyle: {color: color}};
- };
- }
- //图表取数end
- });
- })(angular);
|