|
@@ -282,17 +282,19 @@
|
|
|
size="mini"
|
|
|
>
|
|
|
<el-table-column
|
|
|
- prop="handleDurationPercent"
|
|
|
label="线上问题处理完成率"
|
|
|
style="width:25%;"
|
|
|
align="center"
|
|
|
- />
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">{{ scope.row.handleDurationPercent | toPercent }}</template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="avgHandleDuration"
|
|
|
label="线上问题平均处理时长(H)"
|
|
|
style="width:25%;"
|
|
|
align="center"
|
|
|
- />
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">{{ scope.row.avgHandleDuration | toFix }}</template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<!-- 线下缺陷 -->
|
|
|
<h4>3. 线下缺陷</h4>
|
|
@@ -460,6 +462,7 @@
|
|
|
import axios from 'axios'
|
|
|
import { getBusiness, getDepartment, getOnlineProblem, getOnlineAllCount, getOnlineVitium, getHandlerCount, getClientInfo, getHotpatch, getCompareCount, getCompareCountOnline, getComparatorCount, getComparatorCountOnline } from '@/api/qualityCenter'
|
|
|
import echarts from 'echarts'
|
|
|
+import dayjs from 'dayjs'
|
|
|
|
|
|
export default {
|
|
|
filters: {
|
|
@@ -471,6 +474,15 @@ export default {
|
|
|
} else {
|
|
|
return '-'
|
|
|
}
|
|
|
+ },
|
|
|
+ toFix(value) {
|
|
|
+ if (value) {
|
|
|
+ return value.toFixed(2)
|
|
|
+ } else if (value === 0) {
|
|
|
+ return 0
|
|
|
+ } else {
|
|
|
+ return '-'
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
@@ -515,7 +527,8 @@ export default {
|
|
|
totalOneEchartsRate: '',
|
|
|
totalOneEchartsOnline: '',
|
|
|
dealWithBusinessDate: [],
|
|
|
- timeInterval: [new Date().getTime() - 7 * 24 * 60 * 60 * 1000, new Date().getTime()]
|
|
|
+ // timeInterval: [new Date().getTime() - 7 * 24 * 60 * 60 * 1000, new Date().getTime()],
|
|
|
+ timeInterval: [dayjs(dayjs(new Date()).subtract(7, 'days').format('YYYY-MM-DD')).valueOf(), dayjs(dayjs(new Date()).add(1, 'days').format('YYYY-MM-DD')).valueOf() - 1]
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -671,6 +684,7 @@ export default {
|
|
|
this.totalOneEchartsRate = echarts.init(document.getElementById('comparatorRateBetween'))
|
|
|
// const totalOneEchartsOnline = echarts.init(document.getElementById('comparatorOnlineBetween'))
|
|
|
this.totalOneEcharts.setOption({
|
|
|
+ color: ['#8dcaea'],
|
|
|
legend: {},
|
|
|
tooltip: {},
|
|
|
grid: { containLabel: true },
|
|
@@ -683,7 +697,7 @@ export default {
|
|
|
// Declare several bar series, each will be mapped
|
|
|
// to a column of dataset.source by default.
|
|
|
series: [
|
|
|
- { type: 'bar' }
|
|
|
+ { type: 'bar', barMaxWidth: '70' }
|
|
|
]
|
|
|
})
|
|
|
this.totalOneEchartsMount.setOption({
|
|
@@ -748,6 +762,7 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
this.totalOneEchartsOnline = echarts.init(document.getElementById('comparatorOnlineBetween'))
|
|
|
this.totalOneEchartsOnline.setOption({
|
|
|
+ color: ['#8dcaea'],
|
|
|
legend: {},
|
|
|
tooltip: {},
|
|
|
grid: { containLabel: true },
|
|
@@ -760,7 +775,7 @@ export default {
|
|
|
// Declare several bar series, each will be mapped
|
|
|
// to a column of dataset.source by default.
|
|
|
series: [
|
|
|
- { type: 'bar' }
|
|
|
+ { type: 'bar', barMaxWidth: '70' }
|
|
|
]
|
|
|
})
|
|
|
window.addEventListener('resize', () => {
|
|
@@ -921,6 +936,7 @@ export default {
|
|
|
},
|
|
|
// 时间变化刷新页面
|
|
|
dataSearch() {
|
|
|
+ this.timeInterval[1] = dayjs(dayjs(new Date()).add(1, 'days').format('YYYY-MM-DD')).valueOf() - 1
|
|
|
if (this.pauseKey === 0) {
|
|
|
this._initBusinessTreeAndBeginInfo()
|
|
|
} else if (this.pauseKey === 3) {
|