|
@@ -524,7 +524,7 @@ import {
|
|
|
getLuckysheetConfig,
|
|
|
getNowFormatDate, showAlertMsgWin,
|
|
|
showAlertWin, showConfirmWin,
|
|
|
- showLoading, showPromptWin
|
|
|
+ showLoading, showPromptWin, withDateFormatLength
|
|
|
} from '@/utils/cqcy'
|
|
|
import {
|
|
|
delReportTableById,
|
|
@@ -1278,6 +1278,7 @@ export default {
|
|
|
tableItemList.forEach((tableItem, i) => {
|
|
|
if (i == 0) {
|
|
|
let valueTimeList = tableItem.valueTimeList ? tableItem.valueTimeList.split(',') : []
|
|
|
+ valueTimeList = withDateFormatLength(valueTimeList)
|
|
|
let xAxis = tableItem.xaxis
|
|
|
let yAxis = tableItem.yaxis - 1
|
|
|
if (valueTimeList.length == 0) {
|
|
@@ -1315,10 +1316,12 @@ export default {
|
|
|
let valueIndexList = tableItem.valueIndexList ? tableItem.valueIndexList.split(',') : []
|
|
|
this.deviceReportUpdateData('${index}', valueIndexList, false)
|
|
|
let valueTimeList = tableItem.valueTimeList ? tableItem.valueTimeList.split(',') : []
|
|
|
+ valueTimeList = withDateFormatLength(valueTimeList)
|
|
|
this.deviceReportUpdateData('${startTime}', valueTimeList, false)
|
|
|
}
|
|
|
if (tableItem.timeItemType == 1) { // 结束时间
|
|
|
let valueTimeList = tableItem.valueTimeList ? tableItem.valueTimeList.split(',') : []
|
|
|
+ valueTimeList = withDateFormatLength(valueTimeList)
|
|
|
this.deviceReportUpdateData('${stopTime}', valueTimeList, tableInfo.isGenCountTime == 1)
|
|
|
}
|
|
|
if (valueList.length == 0) {
|
|
@@ -1436,10 +1439,20 @@ export default {
|
|
|
for (let j in reportChartItemList) {
|
|
|
let _name = reportChartItemList[j].describe ? reportChartItemList[j].describe : reportChartItemList[j].itemName
|
|
|
if (chartType == 'pie') {
|
|
|
+ info.option.legend = null
|
|
|
+ info.option.tooltip = {
|
|
|
+ trigger: 'item',
|
|
|
+ formatter: '{b0}<br /> <b>{c0}</b>'
|
|
|
+ }
|
|
|
temp.name = _name
|
|
|
- temp.data.push({
|
|
|
- 'name': _name,
|
|
|
- 'value': reportChartItemList[j].valueList
|
|
|
+ let names = reportChartItemList[i].valueTimeList ? reportChartItemList[i].valueTimeList.split(',') : [];
|
|
|
+ names = withDateFormatLength(names)
|
|
|
+ let vals = reportChartItemList[i].valueList ? reportChartItemList[i].valueList.split(',') : [];
|
|
|
+ names.forEach((name, j) => {
|
|
|
+ temp.data.push({
|
|
|
+ 'name': name,
|
|
|
+ 'value': vals[j]
|
|
|
+ })
|
|
|
})
|
|
|
} else {
|
|
|
let _t = []
|
|
@@ -1460,8 +1473,9 @@ export default {
|
|
|
let axisLabel = {};
|
|
|
axisLabel.rotate = 20;
|
|
|
xAxis.axisLabel = axisLabel
|
|
|
+ let times = (reportChartItemList[0].valueTimeList) ? reportChartItemList[0].valueTimeList.split(",") : []
|
|
|
xAxis.data = (reportChartItemList && reportChartItemList.length > 0) ?
|
|
|
- ((reportChartItemList[0].valueTimeList) ? reportChartItemList[0].valueTimeList.split(",") : []) : []
|
|
|
+ withDateFormatLength(times) : []
|
|
|
// xAxis.data = xAxis.data.slice(0, 7)
|
|
|
for (let i in reportChartItemList) {
|
|
|
let name = reportChartItemList[i].describe ? reportChartItemList[i].describe : reportChartItemList[i].itemName
|