|
@@ -0,0 +1,580 @@
|
|
|
+(function ($app) {
|
|
|
+ 'use strict';
|
|
|
+ $app.module('gtPartyApp').controller('showKBDjdsjCtrl', function ($scope, $state, $alert, AuthUser, flowaudit, $http, $ocLazyLoad, $loading, $filter) {
|
|
|
+ if (AuthUser.getUser().Id == null || AuthUser.getUser().Id == '') {
|
|
|
+ window.location.href = "/app/main/index.html#!/loginkb";
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $scope.id = $state.params.id;
|
|
|
+ //初始化查询参数
|
|
|
+ $scope.selectparams = {
|
|
|
+ colors: ['#F8B551', '#918879', '#EFF0C7', '#91C7AE', '#DCDCDC', '#F0FFFF', '#005983'],
|
|
|
+ dzzdm: "001091209017010" // 康保学院党组织代码
|
|
|
+ };
|
|
|
+
|
|
|
+ // 图标取数
|
|
|
+ {
|
|
|
+ //正式和预备党员统计图
|
|
|
+ $scope.dyzsrate_dataList = [];
|
|
|
+ $scope.dyzsrate_pieOption = {
|
|
|
+ legend: {
|
|
|
+ type: 'scroll',
|
|
|
+ orient: 'vertical',
|
|
|
+ right: 0,
|
|
|
+ bottom: 5,
|
|
|
+ data: ["正式党员", "预备党员"],
|
|
|
+ top: '10%',
|
|
|
+ icon: "circle",
|
|
|
+ textStyle: {
|
|
|
+ color: '#fff'
|
|
|
+ },
|
|
|
+ formatter: function (name) {
|
|
|
+ var target = 0;
|
|
|
+ angular.forEach($scope.dyzsrate_dataList, function (item, index) {
|
|
|
+ if (item.name == name) {
|
|
|
+ target = item.value;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return name + ':' + target;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '正式党员和预备党员比例',
|
|
|
+ type: 'pie',
|
|
|
+ radius: ['50%', '80%'],
|
|
|
+ avoidLabelOverlap: false,
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: false,
|
|
|
+ position: 'center'
|
|
|
+ },
|
|
|
+ emphasis: {
|
|
|
+ show: true,
|
|
|
+ textStyle: {
|
|
|
+ fontSize: '20',
|
|
|
+ fontWeight: 'bold'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ labelLine: {
|
|
|
+ normal: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data: $scope.dyzsrate_dataList,
|
|
|
+ center: ['30%', '50%']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ formatter: function (data) {
|
|
|
+ return data.seriesName + "<br/>" + data.name + " : " + data.value + " (" + data.percent.toFixed(0) + "%)";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ // 学生党员/教师党员比例
|
|
|
+ $scope.xsjsfbqk_dataList = [];
|
|
|
+ $scope.xsjsfbqk_pieOption = {
|
|
|
+ legend: {
|
|
|
+ type: 'scroll',
|
|
|
+ orient: 'vertical',
|
|
|
+ right: 0,
|
|
|
+ bottom: 5,
|
|
|
+ data: ["学生党员", "教师党员"],
|
|
|
+ top: '10%',
|
|
|
+ icon: "circle",
|
|
|
+ textStyle: {
|
|
|
+ color: '#fff'
|
|
|
+ },
|
|
|
+ formatter: function (name) {
|
|
|
+ var target = 0;
|
|
|
+ angular.forEach($scope.xsjsfbqk_dataList, function (item, index) {
|
|
|
+ if (item.name == name) {
|
|
|
+ target = item.value;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return name + ':' + target;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '党员身份',
|
|
|
+ type: 'pie',
|
|
|
+ radius: ['50%', '80%'],
|
|
|
+ avoidLabelOverlap: false,
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: false,
|
|
|
+ position: 'center'
|
|
|
+ },
|
|
|
+ emphasis: {
|
|
|
+ show: true,
|
|
|
+ textStyle: {
|
|
|
+ fontSize: '20',
|
|
|
+ fontWeight: 'bold'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ labelLine: {
|
|
|
+ normal: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data: $scope.xsjsfbqk_dataList,
|
|
|
+ center: ['30%', '50%']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ formatter: function (data) {
|
|
|
+ return data.seriesName + "<br/>" + data.name + " : " + data.value + " (" + data.percent.toFixed(0) + "%)";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ //党员数量信息
|
|
|
+ $scope.dyxx = {};
|
|
|
+ $scope.load_dyxx = function () {
|
|
|
+ $http
|
|
|
+ ({
|
|
|
+ method: 'get', url: '../../api/partyExpand/getJoinUserTotalList', params: {
|
|
|
+ pageindex: 1,
|
|
|
+ pagesize: 10,
|
|
|
+ ssdzzdm: $scope.selectparams.dzzdm
|
|
|
+ }
|
|
|
+ }).then(function (result) {
|
|
|
+ if (result.data != null) {
|
|
|
+ var data = result.data.item.list[0];
|
|
|
+ $scope.dyxx.ybdys = data.YBDY;
|
|
|
+ $scope.dyxx.rdjjfzs = data.JJFZ;
|
|
|
+ $scope.dyxx.sqrds = data.SQRD;
|
|
|
+ $scope.dyxx.fzdx = data.FZDX + data.SQRD + data.JJFZ;
|
|
|
+ $scope.dyxx.zsdy = data.ZSDY;
|
|
|
+ $scope.dyxx.xsdy = data.XSDY;
|
|
|
+ $scope.dyxx.lsdy = data.LSDY;
|
|
|
+
|
|
|
+ $scope.fzdyqk_dataList.push(data.YBDY);
|
|
|
+ $scope.fzdyqk_dataList.push(data.SQRD);
|
|
|
+ $scope.fzdyqk_dataList.push(data.JJFZ);
|
|
|
+ $scope.fzdyqk_dataList.push(data.FZDX);
|
|
|
+
|
|
|
+ // 正式党员和预备党员饼图数据
|
|
|
+ $scope.dyzsrate_dataList.push($scope.getPieData(data.ZSDY, "正式党员", $scope.selectparams.colors[0]));
|
|
|
+ $scope.dyzsrate_dataList.push($scope.getPieData(data.YBDY, "预备党员", $scope.selectparams.colors[1]));
|
|
|
+
|
|
|
+ // 教师和学生党员分布情况
|
|
|
+ $scope.xsjsfbqk_dataList.push($scope.getPieData(data.XSDY, "学生党员", $scope.selectparams.colors[0]));
|
|
|
+ $scope.xsjsfbqk_dataList.push($scope.getPieData(data.LSDY, "教师党员", $scope.selectparams.colors[1]));
|
|
|
+ }
|
|
|
+ }, function (resp) {
|
|
|
+ });
|
|
|
+
|
|
|
+ $http
|
|
|
+ ({
|
|
|
+ method: 'get', url: '../../api/bigdata/getPartyUserTotalList', params: {
|
|
|
+ dzzdm: "001091209017010",// 康保学院党组织代码
|
|
|
+ }
|
|
|
+ }).then(function (result) {
|
|
|
+ if (result.data != null) {
|
|
|
+ $scope.dyxx.dys = result.data.TOTAL;
|
|
|
+ $scope.dyxx.zgcount = result.data.ZGCOUNT;
|
|
|
+ $scope.dyxx.zgrs = result.data.ZGRS;
|
|
|
+ $scope.dyxx.ltxcount = result.data.LTXCOUNT;
|
|
|
+ }
|
|
|
+ }, function (resp) {
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ //发展党员情况
|
|
|
+ $scope.fzdyqk_dataList = [];
|
|
|
+ $scope.fzdyqk_nameList = ["入党申请人数", "入党积极分子", "发展对象", "预备党员"];
|
|
|
+ $scope.fzdyqk_barOption = {
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'axis',
|
|
|
+ axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
|
|
+ type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
|
|
+ },
|
|
|
+ formatter: "{a} <br/>{b} : {c}"
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: 'value',
|
|
|
+ name: '数量',
|
|
|
+ axisLabel: {
|
|
|
+ formatter: '{value}',
|
|
|
+ color: '#fff'
|
|
|
+ },
|
|
|
+ axisTick: { //y轴刻度线
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ splitLine: { //网格线
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'category',
|
|
|
+ inverse: true,
|
|
|
+ axisLabel: {
|
|
|
+ color: '#fff'
|
|
|
+ },
|
|
|
+ data: $scope.fzdyqk_nameList
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '发展党员情况',
|
|
|
+ data: $scope.fzdyqk_dataList,
|
|
|
+ type: "bar",
|
|
|
+ barWidth: 20,
|
|
|
+ itemStyle: {
|
|
|
+ normal: {
|
|
|
+ color: function (params) {
|
|
|
+ var colorList = ['#F8B551', '#918879', '#EFF0C7', '#91C7AE'];
|
|
|
+ return colorList[params.dataIndex];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ grid: {
|
|
|
+ top: 20,
|
|
|
+ bottom: 10,
|
|
|
+ containLabel: true
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ //学历比例
|
|
|
+ $scope.xueli_data = [];
|
|
|
+ $scope.xueli_legend_data = [];
|
|
|
+ $scope.pieOption_xueli = {
|
|
|
+ legend: {
|
|
|
+ type: 'scroll',
|
|
|
+ orient: 'vertical',
|
|
|
+ right: 0,
|
|
|
+ bottom: 5,
|
|
|
+ data: $scope.xueli_legend_data,
|
|
|
+ top: '10%',
|
|
|
+ icon: "circle",
|
|
|
+ textStyle: {
|
|
|
+ color: '#fff'
|
|
|
+ },
|
|
|
+ formatter: function (name) {
|
|
|
+ var target = 0;
|
|
|
+ angular.forEach($scope.xueli_data, function (item, index) {
|
|
|
+ if (item.name == name) {
|
|
|
+ target = item.value;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return name + ':' + target;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '学历水平',
|
|
|
+ type: 'pie',
|
|
|
+ radius: ['50%', '80%'],
|
|
|
+ avoidLabelOverlap: false,
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: false,
|
|
|
+ position: 'center'
|
|
|
+ },
|
|
|
+ emphasis: {
|
|
|
+ show: true,
|
|
|
+ textStyle: {
|
|
|
+ fontSize: '20',
|
|
|
+ fontWeight: 'bold'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ labelLine: {
|
|
|
+ normal: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data: $scope.xueli_data,
|
|
|
+ center: ['30%', '50%']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ formatter: function (data) {
|
|
|
+ return data.seriesName + "<br/>" + data.name + " : " + data.value + " (" + data.percent.toFixed(0) + "%)";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ $scope.load_dyxl = function () {
|
|
|
+ $scope.xueli_legend_data.length = 0;
|
|
|
+ $scope.xueli_data.length = 0;
|
|
|
+ $http
|
|
|
+ ({
|
|
|
+ method: 'get',
|
|
|
+ url: '../../api/bigdata/getUserEducationList',
|
|
|
+ params: {
|
|
|
+ dzzdm: $scope.selectparams.dzzdm,
|
|
|
+ }
|
|
|
+ }).then(function (result) {
|
|
|
+ $scope.xueli_legend_data.length = 0;
|
|
|
+ $scope.xueli_data.length = 0;
|
|
|
+ if (result.data.item != null) {
|
|
|
+ angular.forEach(result.data.item, function (val, index) {
|
|
|
+ $scope.xueli_legend_data.push(val.EDUCATIONNAME);
|
|
|
+ $scope.xueli_data.push($scope.getPieData(val.NUM, val.EDUCATIONNAME, $scope.selectparams.colors[index]));
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ //年龄分布
|
|
|
+ $scope.dynl_dataList = [];
|
|
|
+ $scope.dynl_pieOption = {
|
|
|
+ legend: {
|
|
|
+ type: 'scroll',
|
|
|
+ orient: 'vertical',
|
|
|
+ right: 0,
|
|
|
+ bottom: 5,
|
|
|
+ data: $scope.dynl_dataList,
|
|
|
+ top: '10%',
|
|
|
+ icon: "circle",
|
|
|
+ textStyle: {
|
|
|
+ color: '#fff'
|
|
|
+ },
|
|
|
+ formatter: function (name) {
|
|
|
+ var target = 0;
|
|
|
+ angular.forEach($scope.dynl_dataList, function (item, index) {
|
|
|
+ if (item.name == name) {
|
|
|
+ target = item.value;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return name + ':' + target;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '年龄分布',
|
|
|
+ type: 'pie',
|
|
|
+ radius: ['50%', '80%'],
|
|
|
+ avoidLabelOverlap: false,
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: false,
|
|
|
+ position: 'center'
|
|
|
+ },
|
|
|
+ emphasis: {
|
|
|
+ show: true,
|
|
|
+ textStyle: {
|
|
|
+ fontSize: '20',
|
|
|
+ fontWeight: 'bold'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ labelLine: {
|
|
|
+ normal: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data: $scope.dynl_dataList,
|
|
|
+ center: ['30%', '50%']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ formatter: function (data) {
|
|
|
+ return data.seriesName + "<br/>" + data.name + " : " + data.value + " (" + data.percent.toFixed(0) + "%)";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ $scope.load_dynl = function () {
|
|
|
+ $scope.dynl_dataList.length = 0;
|
|
|
+ $http
|
|
|
+ ({
|
|
|
+ method: 'get',
|
|
|
+ url: '../../api/bigdata/getDynlCount',
|
|
|
+ params: {
|
|
|
+ dzzdm: $scope.selectparams.dzzdm
|
|
|
+ }
|
|
|
+ }).then(function (result) {
|
|
|
+ $scope.dynl_dataList.length = 0;
|
|
|
+ if (result.data != null && result.data.length > 0) {
|
|
|
+ angular.forEach(result.data, function (val, index) {
|
|
|
+ $scope.dynl_dataList.push($scope.getPieData(val.NUM, val.AGENAME, $scope.selectparams.colors[index]));
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ //党员党龄
|
|
|
+ $scope.dydl_dataList = [];
|
|
|
+ $scope.dydl_pieOption = {
|
|
|
+ legend: {
|
|
|
+ type: 'scroll',
|
|
|
+ orient: 'vertical',
|
|
|
+ right: 0,
|
|
|
+ bottom: 5,
|
|
|
+ data: $scope.dydl_dataList,
|
|
|
+ top: '10%',
|
|
|
+ icon: "circle",
|
|
|
+ textStyle: {
|
|
|
+ color: '#fff'
|
|
|
+ },
|
|
|
+ formatter: function (name) {
|
|
|
+ var target = 0;
|
|
|
+ angular.forEach($scope.dydl_dataList, function (item, index) {
|
|
|
+ if (item.name == name) {
|
|
|
+ target = item.value;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return name + ':' + target;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '党员党龄',
|
|
|
+ type: 'pie',
|
|
|
+ radius: ['50%', '80%'],
|
|
|
+ avoidLabelOverlap: false,
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: false,
|
|
|
+ position: 'center'
|
|
|
+ },
|
|
|
+ emphasis: {
|
|
|
+ show: true,
|
|
|
+ textStyle: {
|
|
|
+ fontSize: '20',
|
|
|
+ fontWeight: 'bold'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ labelLine: {
|
|
|
+ normal: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data: $scope.dydl_dataList,
|
|
|
+ center: ['20%', '50%']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ formatter: function (data) {
|
|
|
+ return data.seriesName + "<br/>" + data.name + " : " + data.value + " (" + data.percent.toFixed(0) + "%)";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ $scope.load_dydl = function () {
|
|
|
+ $scope.dydl_dataList.length = 0;
|
|
|
+ $http
|
|
|
+ ({
|
|
|
+ method: 'get',
|
|
|
+ url: '../../api/bigdata/getDydlCount',
|
|
|
+ params: {
|
|
|
+ dzzdm: $scope.selectparams.dzzdm
|
|
|
+ }
|
|
|
+ }).then(function (result) {
|
|
|
+ $scope.dydl_dataList.length = 0;
|
|
|
+ if (result.data != null && result.data.length > 0) {
|
|
|
+ angular.forEach(result.data, function (val, index) {
|
|
|
+ $scope.dydl_dataList.push($scope.getPieData(val.NUM, val.AGENAME, $scope.selectparams.colors[index]));
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ //党员性别
|
|
|
+ $scope.dyxb_dataList = [];
|
|
|
+ $scope.dyxb_pieOption = {
|
|
|
+ legend: {
|
|
|
+ type: 'scroll',
|
|
|
+ orient: 'vertical',
|
|
|
+ right: 0,
|
|
|
+ bottom: 5,
|
|
|
+ data: $scope.dyxb_dataList,
|
|
|
+ top: '10%',
|
|
|
+ icon: "circle",
|
|
|
+ textStyle: {
|
|
|
+ color: '#fff'
|
|
|
+ },
|
|
|
+ formatter: function (name) {
|
|
|
+ var target = 0;
|
|
|
+ angular.forEach($scope.dyxb_dataList, function (item, index) {
|
|
|
+ if (item.name == name) {
|
|
|
+ target = item.value;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return name + ':' + target;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+
|
|
|
+ {
|
|
|
+ name: '党员性别',
|
|
|
+ type: 'pie',
|
|
|
+ radius: ['50%', '80%'],
|
|
|
+ avoidLabelOverlap: false,
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: false,
|
|
|
+ position: 'center'
|
|
|
+ },
|
|
|
+ emphasis: {
|
|
|
+ show: true,
|
|
|
+ textStyle: {
|
|
|
+ fontSize: '20',
|
|
|
+ fontWeight: 'bold'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ labelLine: {
|
|
|
+ normal: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data: $scope.dyxb_dataList,
|
|
|
+ center: ['30%', '50%']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ formatter: function (data) {
|
|
|
+ return data.seriesName + "<br/>" + data.name + " : " + data.value + " (" + data.percent.toFixed(0) + "%)";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ $scope.load_dyxb = function () {
|
|
|
+ $scope.dyxb_dataList.length = 0;
|
|
|
+ $http
|
|
|
+ ({
|
|
|
+ method: 'get',
|
|
|
+ url: '../../api/bigdata/getDyxbCount',
|
|
|
+ params: {
|
|
|
+ dzzdm: $scope.selectparams.dzzdm
|
|
|
+ }
|
|
|
+ }).then(function (result) {
|
|
|
+ $scope.dyxb_dataList.length = 0;
|
|
|
+ if (result.data != null && result.data.length > 0) {
|
|
|
+ var colors = ['#F8B551', '#918879'];
|
|
|
+ angular.forEach(result.data, function (val, index) {
|
|
|
+ $scope.dyxb_dataList.push($scope.getPieData(val.NUM, val.SEXNAME, colors[index]));
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ //组织饼图数据
|
|
|
+ $scope.getPieData = function (val, name, color) {
|
|
|
+ return {value: val, name: name, itemStyle: {color: color}};
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
+ // 执行查询方法
|
|
|
+ $scope.load_dyxx();
|
|
|
+ $scope.load_dyxl();
|
|
|
+ $scope.load_dynl();
|
|
|
+ $scope.load_dydl();
|
|
|
+ $scope.load_dyxb();
|
|
|
+ });
|
|
|
+})(angular);
|