This commit is contained in:
jiangrui 2021-04-29 16:55:22 +08:00
parent 0da4772cef
commit 981bb9a8b0
3 changed files with 50 additions and 18 deletions

View File

@ -16,11 +16,11 @@ const mutations = {
if (state.sidebar.opened) { if (state.sidebar.opened) {
Cookies.set('sidebarStatus', 1) Cookies.set('sidebarStatus', 1)
} else { } else {
Cookies.set('sidebarStatus', 0) Cookies.set('sidebarStatus', 1)
} }
}, },
CLOSE_SIDEBAR: (state, withoutAnimation) => { CLOSE_SIDEBAR: (state, withoutAnimation) => {
Cookies.set('sidebarStatus', 0) Cookies.set('sidebarStatus', 1)
state.sidebar.opened = false state.sidebar.opened = false
state.sidebar.withoutAnimation = withoutAnimation state.sidebar.withoutAnimation = withoutAnimation
}, },

View File

@ -671,8 +671,9 @@
> >
<div class="preview-container"> <div class="preview-container">
<el-form ref="updateForm" style="width:100%" :rules="rules"> <el-form ref="updateForm" style="width:100%" :rules="rules">
<el-form-item label="选择行政区域"> <el-form-item label="选择行政区域" v-if="updateType!==6">
<el-cascader <el-cascader
class="filter-item" class="filter-item"
v-model="regionSearchVal" v-model="regionSearchVal"
style="width:100%" style="width:100%"

View File

@ -29,9 +29,14 @@
</div> </div>
</el-col> </el-col>
</el-row> --> </el-row> -->
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :xs='24' :lg='24' :sm='24' style="color:#787878;margin-bottom:20px"><span>数据统计</span><span style="float:right">更新时间{{new Date() | parseTime}}</span></el-col> <el-col :xs="24" :lg="24" :sm="24" style="color:#787878;margin-bottom:20px"
><span>数据统计</span
><span style="float:right"
>更新时间{{ new Date() | parseTime("{y}-{m}-{d} {h}:00:00") }}</span
></el-col
>
<el-col <el-col
v-for="(value, key, index) in statisticalData" v-for="(value, key, index) in statisticalData"
:key="index" :key="index"
@ -42,7 +47,10 @@
<div class="countLayout"> <div class="countLayout">
<i :class="`countIcon icon_${index}`"></i> <i :class="`countIcon icon_${index}`"></i>
<span v-if="key === 'all'" style="font-size:24px" <span v-if="key === 'all'" style="font-size:24px"
>累计服务量 <span style="color:#ff663d;font-size:49px;vertical-align: middle;">{{ value }}</span></span >累计服务量 <span
style="color:#ff663d;font-size:49px;vertical-align: middle;"
>{{ value }}</span
></span
> >
<div <div
v-else v-else
@ -60,7 +68,7 @@
<script> <script>
import CountTo from "vue-count-to"; import CountTo from "vue-count-to";
import {parseTime} from '@/utils' import { parseTime } from "@/utils";
import { statisticalData } from "@/api/statisticalData"; import { statisticalData } from "@/api/statisticalData";
export default { export default {
@ -85,38 +93,61 @@ export default {
// } // }
getStatisticalData() { getStatisticalData() {
statisticalData(this.listQuery).then(res => { 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) { formatUnit(key, value) {
// console.log(key,value); // console.log(key,value);
let str = ''; let str = "";
if (key.indexOf("率")!= -1) { if (key.indexOf("率") != -1) {
str = `${(value * 100).toFixed(2)}%`; str = `${(value * 100).toFixed(2)}%`;
} else if (key.indexOf("时间")!= -1) { } else if (key.indexOf("时间") != -1) {
str = this.timeFormat(value); str = this.timeFormat(value);
} else { } else {
str = value; str = value;
} }
// console.log(str); // console.log(str);
return str return str;
}, },
timeFormat(timeStamp) { timeFormat(timeStamp) {
const timeStr = `${ const timeStr = `${
Math.floor(timeStamp / 3600) < 9 Math.floor(timeStamp / 3600) < 9
? '0' + Math.floor(timeStamp / 3600) ? "0" + Math.floor(timeStamp / 3600)
: Math.floor(timeStamp / 3600) : Math.floor(timeStamp / 3600)
}:${ }:${
Math.floor(((timeStamp % 86400) % 3600) / 60) < 9 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)
}:${ }:${
Math.floor(((timeStamp % 86400) % 3600) % 60) < 9 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)
}` }`;
return timeStr return timeStr;
}, }
} }
}; };
</script> </script>