累计服务量 :{{ value }}累计服务量 :{{ value }}
import CountTo from "vue-count-to";
-import {parseTime} from '@/utils'
+import { parseTime } from "@/utils";
import { statisticalData } from "@/api/statisticalData";
export default {
@@ -85,38 +93,61 @@ export default {
// }
getStatisticalData() {
statisticalData(this.listQuery).then(res => {
- this.statisticalData = res.d;
+ this.statisticalData = {
+ all: 318,
+ 平均办结时间: 61722,
+ 平均受理时间: 22349,
+ 未受理量: 0,
+ 未受理率: 0,
+ 按时受理量: 318,
+ 按时受理率: 1.0,
+ 超时受理量: 0,
+ 超时受理率: 0.0,
+ 按时办结量: 307,
+ 按时办结率: 1.0,
+ 超时办结量: 0,
+ 超时办结率: 0.0,
+ 未办结量: 11,
+ 未办结率: 0.0346,
+ 非常满意量: 274,
+ 非常满意率: 0.8925,
+ 满意量: 33,
+ 满意率: 0.1075,
+ 不满意量: 0,
+ 不满意率: 0.0
+ };
+ // this.statisticalData = res.d;
});
},
formatUnit(key, value) {
// console.log(key,value);
- let str = '';
- if (key.indexOf("率")!= -1) {
+ let str = "";
+ if (key.indexOf("率") != -1) {
str = `${(value * 100).toFixed(2)}%`;
- } else if (key.indexOf("时间")!= -1) {
+ } else if (key.indexOf("时间") != -1) {
str = this.timeFormat(value);
} else {
str = value;
}
// console.log(str);
- return str
+ return str;
},
timeFormat(timeStamp) {
const timeStr = `${
Math.floor(timeStamp / 3600) < 9
- ? '0' + Math.floor(timeStamp / 3600)
+ ? "0" + Math.floor(timeStamp / 3600)
: Math.floor(timeStamp / 3600)
}:${
Math.floor(((timeStamp % 86400) % 3600) / 60) < 9
- ? '0' + Math.floor(((timeStamp % 86400) % 3600) / 60)
+ ? "0" + Math.floor(((timeStamp % 86400) % 3600) / 60)
: Math.floor(((timeStamp % 86400) % 3600) / 60)
}:${
Math.floor(((timeStamp % 86400) % 3600) % 60) < 9
- ? '0' + Math.floor(((timeStamp % 86400) % 3600) % 60)
+ ? "0" + Math.floor(((timeStamp % 86400) % 3600) % 60)
: Math.floor(((timeStamp % 86400) % 3600) % 60)
- }`
- return timeStr
- },
+ }`;
+ return timeStr;
+ }
}
};