Index: arms/js/analysisCost.js
===================================================================
diff -u -rbdd316a6bccbd38a7f53cd179ff18b1abe594c24 -r0ad7573971d1c58599aaae665d7b5c99acb41648
--- arms/js/analysisCost.js (.../analysisCost.js) (revision bdd316a6bccbd38a7f53cd179ff18b1abe594c24)
+++ arms/js/analysisCost.js (.../analysisCost.js) (revision 0ad7573971d1c58599aaae665d7b5c99acb41648)
@@ -324,7 +324,7 @@
title: "비용 (입력)",
className: "dt-center",
render: function(data, type, row) {
- return ' 만원';
+ return ' 만원';
}
}
],
@@ -338,7 +338,11 @@
// 연봉 정보
let mockManpowerData2 = Object.keys(인력맵).map((key) => {
- return 인력맵[key];
+ let data = {};
+ data.이름 = key;
+ data.연봉 = 인력맵[key].연봉;
+ data.성과 = 인력맵[key].성과;
+ return data;
});
console.log(mockManpowerData2);
@@ -395,7 +399,7 @@
data: "연봉",
className: "dt-center",
render: function(data, type, row) {
- return ' 만원';
+ return ' 만원';
}
}
],
@@ -419,27 +423,57 @@
function 비용분석계산() {
$("#cost-analysis-calculation").click(function() {
- /*var inputValues = $('input[name="yourName"]').map(function() {
- return $(this).val();
- }).get();*/
-
+ // 버전 비용 계산 샘플
+ versionListData = versionListData.map(item => {
+ item.versionCost = 10000000;
+ item.consumptionCost = 9000000;
+ return item;
+ });
$("#compare_costs").height("620px");
// 버전별 투자 대비 소모 비용 차트
compareCostsChart(selectedPdServiceId, selectedVersionId);
+
+
$("#circularPacking").height("620px");
// Circular Packing with D3 차트
var versionTag = $(".multiple-select").val();
getReqCostRatio(selectedPdServiceId, versionTag);
-
+
+
+
+
// 요구사항별 수익현황 차트
$("#income_status_chart").height("620px");
incomeStatusChart();
+
+
+
// 요구사항 가격 바 차트 및 난이도, 우선순위 분포 차트
$("#req-cost-analysis-chart").height("500px");
reqCostAnalysisChart(버전별요구사항별);
+
+
+ let inputVersionValues = $('input[name="version-cost"]').map(function() {
+ return $(this).val();
+ }).get();
+
+ console.log(inputVersionValues);
+
+ let inputSalaryValues = $('input[name="person-salary"]').map(function() {
+ let data = {};
+
+ let owner = $(this).data('owner');
+ console.log(owner);
+ data.사용자 = owner;
+ data.연봉 = $(this).val();
+ return data;
+ }).get();
+
+ console.log(inputSalaryValues);
+
// 인력별 성과 측정 차트
$("#manpower-analysis-chart").height("500px");
인력별_연봉대비_성과차트_기본세팅(인력맵);
@@ -469,11 +503,15 @@
// 투입 비용 현황 차트
/////////////////////////////////////////////////////////
function compareCostsChart(selectedPdServiceId, selectedVersionId){
- var chartDom = document.getElementById("compare_costs");
- var myChart = echarts.init(chartDom);
- var option;
- var titles = versionListData.map(item => item.c_title);
+ let chartDom = document.getElementById("compare_costs");
+ let myChart = echarts.init(chartDom);
+ let option;
+ let titles = versionListData.map(item => item.c_title);
+ let versionCosts = versionListData.map(item => item.versionCost);
+
+ let consumptionCosts = versionListData.map(item => item.consumptionCost);
+
option = {
tooltip: {
trigger: 'axis',
@@ -510,12 +548,12 @@
{
name: '투자 비용',
type: 'bar',
- data: [1234567, 18203, 23489, 29034, 104970]
+ data: versionCosts
},
{
name: '소모 비용',
type: 'bar',
- data: [234567, 19325, 23438, 31000, 121594]
+ data: consumptionCosts
}
]
};
@@ -738,6 +776,7 @@
console.log(" [ analysisCost :: reqCostAnalysisChart :: 버전별요구사항별 data -> ");
console.log(버전별요구사항별);
+ console.log(selectedVersionId);
let requirementPriceList = {
요구사항1: 10000000,