|
@@ -307,9 +307,9 @@ export default {
|
|
|
|
|
|
// 先将数据置空,防止数据残留
|
|
// 先将数据置空,防止数据残留
|
|
this.echartsEcharData = [{ data: [] }]
|
|
this.echartsEcharData = [{ data: [] }]
|
|
-
|
|
|
|
|
|
+
|
|
// 分页数据
|
|
// 分页数据
|
|
- if (this.singleChoiceType != '人员') {
|
|
|
|
|
|
+ if (this.singleChoiceType != '人员' && this.departmentPersonnel != 2) {
|
|
this.pageTotal = this.allListData.costList ? this.allListData.costList.length : 0
|
|
this.pageTotal = this.allListData.costList ? this.allListData.costList.length : 0
|
|
list = this.allListData.costList && this.allListData.costList.slice(0 + 10 * (this.pageIndex - 1), 49 + 50 * (this.pageIndex - 1))
|
|
list = this.allListData.costList && this.allListData.costList.slice(0 + 10 * (this.pageIndex - 1), 49 + 50 * (this.pageIndex - 1))
|
|
|
|
|
|
@@ -327,9 +327,9 @@ export default {
|
|
newBarChartOptions = this.projectClassificationChartData(list, totalMoneyCost, newBarChartOptions)
|
|
newBarChartOptions = this.projectClassificationChartData(list, totalMoneyCost, newBarChartOptions)
|
|
} else if (this.singleChoiceType == '设备') {
|
|
} else if (this.singleChoiceType == '设备') {
|
|
newBarChartOptions = this.equipmentChartData(list, totalMoneyCost, newBarChartOptions)
|
|
newBarChartOptions = this.equipmentChartData(list, totalMoneyCost, newBarChartOptions)
|
|
- } else if (this.singleChoiceType == '部门') {
|
|
|
|
|
|
+ } else if (this.singleChoiceType == '部门' && this.departmentPersonnel != 2) {
|
|
newBarChartOptions = this.processDepartmentalChartData(list, totalMoneyCost, newBarChartOptions)
|
|
newBarChartOptions = this.processDepartmentalChartData(list, totalMoneyCost, newBarChartOptions)
|
|
- } else if (this.singleChoiceType == '人员') {
|
|
|
|
|
|
+ } else if (this.singleChoiceType == '人员' || this.departmentPersonnel == 2) {
|
|
newBarChartOptions = this.personnelChartData(totalMoneyCost)
|
|
newBarChartOptions = this.personnelChartData(totalMoneyCost)
|
|
} else if (this.theCustomListFlg) {
|
|
} else if (this.theCustomListFlg) {
|
|
this.pageTotal = this.allListData.list ? this.allListData.list.length : 0
|
|
this.pageTotal = this.allListData.list ? this.allListData.list.length : 0
|
|
@@ -440,7 +440,7 @@ export default {
|
|
const paginatedList = list.slice(startIndex, endIndex);
|
|
const paginatedList = list.slice(startIndex, endIndex);
|
|
|
|
|
|
let totalHours = this.totalHours.toFixed(1);
|
|
let totalHours = this.totalHours.toFixed(1);
|
|
- const totalMoneyCost = totalCostMoney;
|
|
|
|
|
|
+ let totalMoneyCost = totalCostMoney;
|
|
|
|
|
|
this.hasReportUserList = userList;
|
|
this.hasReportUserList = userList;
|
|
this.pageTotal = list ? list.length : 0;
|
|
this.pageTotal = list ? list.length : 0;
|
|
@@ -550,6 +550,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
let chartData = { ...barChartOptions }
|
|
let chartData = { ...barChartOptions }
|
|
|
|
+ totalMoneyCost = totalMoneyCost.toFixed(2)
|
|
chartData.title = {
|
|
chartData.title = {
|
|
...chartData.title,
|
|
...chartData.title,
|
|
text: `工时成本总计:${countCost ? `成本 ${totalMoneyCost},` : ''} ${countHours ? `时长 ${totalHours} 小时` : ''}`
|
|
text: `工时成本总计:${countCost ? `成本 ${totalMoneyCost},` : ''} ${countHours ? `时长 ${totalHours} 小时` : ''}`
|
|
@@ -652,7 +653,7 @@ export default {
|
|
|
|
|
|
totalHours = this.totalHours.toFixed(1);
|
|
totalHours = this.totalHours.toFixed(1);
|
|
totalMoneyCost = totalMoneyCost.toFixed(2)
|
|
totalMoneyCost = totalMoneyCost.toFixed(2)
|
|
-
|
|
|
|
|
|
+ console.log(xList, yList, list, '<==== xList, yList,')
|
|
return { ...this.sameChartProcessing(xList, yList, totalHours, totalMoneyCost, chartData) }
|
|
return { ...this.sameChartProcessing(xList, yList, totalHours, totalMoneyCost, chartData) }
|
|
},
|
|
},
|
|
projectClassificationChartData(list, totalMoneyCost = 0, chartData) { // 处理项目分类图表数据
|
|
projectClassificationChartData(list, totalMoneyCost = 0, chartData) { // 处理项目分类图表数据
|
|
@@ -929,7 +930,7 @@ export default {
|
|
this.getEchart()
|
|
this.getEchart()
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if (this.departmentadio == '2') {
|
|
|
|
|
|
+ if (this.departmentPersonnel == '2') {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (this.chartDate != null) {
|
|
if (this.chartDate != null) {
|