|
|
|
@ -128,8 +128,8 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('riskBusinessCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog', 'industryMap',
|
|
|
|
|
function ($scope, $state, $http, $uibModal, $filter, commonDialog, industryMap) {
|
|
|
|
|
app.controller('riskBusinessCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog', 'industryMap','chartParser',
|
|
|
|
|
function ($scope, $state, $http, $uibModal, $filter, commonDialog, industryMap, chartParser) {
|
|
|
|
|
$scope.orderTypes = orderTypesMap;
|
|
|
|
|
$scope.orderTypesForBD = orderTypesMapForBD;
|
|
|
|
|
$scope.resultTypes = resultTypesMap;
|
|
|
|
@ -139,13 +139,20 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
$scope.amountSection = amountSectionMap;
|
|
|
|
|
$scope.pagination = {};
|
|
|
|
|
$scope.params = {};
|
|
|
|
|
|
|
|
|
|
var industries = new Array();
|
|
|
|
|
angular.forEach($scope.industries, function (industry) {
|
|
|
|
|
industries.push(industry.label);
|
|
|
|
|
});
|
|
|
|
|
industries.push('未知行业');
|
|
|
|
|
console.log(industries);
|
|
|
|
|
// 加载风险注册事件
|
|
|
|
|
$scope.loadRiskEvents = function (page) {
|
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
|
params.page = page || $scope.pagination.page || 1;
|
|
|
|
|
params.replyEmailDate = $filter('date')(params.replyEmailDate, 'yyyy-MM-dd');
|
|
|
|
|
params.receiveEmailDate = $filter('date')(params.receiveEmailDate, 'yyyy-MM-dd');
|
|
|
|
|
params.replyEmailDateBegin = $filter('date')(params.replyEmailDateBegin, 'yyyy-MM-dd');
|
|
|
|
|
params.replyEmailDateEnd = $filter('date')(params.replyEmailDateEnd, 'yyyy-MM-dd');
|
|
|
|
|
params.receiveEmailDateBegin = $filter('date')(params.receiveEmailDateBegin, 'yyyy-MM-dd');
|
|
|
|
|
params.receiveEmailDateEnd = $filter('date')(params.receiveEmailDateEnd, 'yyyy-MM-dd');
|
|
|
|
|
if (params.section != null) {
|
|
|
|
|
var sectionArray = params.section.split('-');
|
|
|
|
|
params.startAmount = sectionArray[0];
|
|
|
|
@ -155,6 +162,54 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
$scope.riskEvents = resp.data.data;
|
|
|
|
|
$scope.pagination = resp.data.pagination;
|
|
|
|
|
});
|
|
|
|
|
$http.get('/risk/business/events/analysis/industry', {params: params}).then(function (resp) {
|
|
|
|
|
$scope.riskEventsByIndustry = resp.data;
|
|
|
|
|
$scope.risk_industry_chart = chartParser.parse(industryAmount(industries),$scope.riskEventsByIndustry);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var industryAmount = function (industries) {
|
|
|
|
|
return {
|
|
|
|
|
chart: {
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'item',
|
|
|
|
|
formatter: "{a} <br/>{b} : {c}"
|
|
|
|
|
},
|
|
|
|
|
// color: colors,
|
|
|
|
|
legend: {
|
|
|
|
|
orient: 'vertical',
|
|
|
|
|
left: 'right',
|
|
|
|
|
data: industries
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
series: [{
|
|
|
|
|
basic: {
|
|
|
|
|
name: '风控事件单量', type: 'pie',
|
|
|
|
|
radius: '80%',
|
|
|
|
|
center: ['50%', '60%'],
|
|
|
|
|
label:{ //饼图图形上的文本标签
|
|
|
|
|
normal:{
|
|
|
|
|
show:true,
|
|
|
|
|
position:'outer', //标签的位置
|
|
|
|
|
textStyle : {
|
|
|
|
|
fontWeight : 300 ,
|
|
|
|
|
fontSize : 16 //文字的字体大小
|
|
|
|
|
},
|
|
|
|
|
formatter:'{d}%'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
itemStyle: {
|
|
|
|
|
emphasis: {
|
|
|
|
|
shadowBlur: 10,
|
|
|
|
|
shadowOffsetX: 0,
|
|
|
|
|
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
column: {key: 'amount', name: 'industry'}
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$scope.loadRiskEvents(1);
|
|
|
|
|