|
@@ -22,12 +22,12 @@
|
|
|
v-for="(item, index) in pjblscData"
|
|
|
:key="item + index"
|
|
|
>
|
|
|
- <div class="value">{{ item.value }}</div>
|
|
|
+ <div class="value">{{ item.avgTime }}</div>
|
|
|
<div class="key">
|
|
|
{{
|
|
|
- item.key.length > 5
|
|
|
- ? item.key.substring(0, 5) + "..."
|
|
|
- : item.key
|
|
|
+ item.cpywlxmc.length > 5
|
|
|
+ ? item.cpywlxmc.substring(0, 5) + "..."
|
|
|
+ : item.cpywlxmc
|
|
|
}}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -39,11 +39,13 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { dtggsdll, pdjhpjblsc } from "@/api/dataScreen";
|
|
|
export default {
|
|
|
name: "Ds1bc3",
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
+ timer: null,
|
|
|
option: {
|
|
|
title: {
|
|
|
show: false,
|
|
@@ -213,64 +215,37 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
+ timer1: null,
|
|
|
pjblscData: [],
|
|
|
};
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
- setTimeout(() => {
|
|
|
- this.getYwpjblsc();
|
|
|
- this.getJrdtgsdrllfx();
|
|
|
- }, 1000);
|
|
|
+ this.getYwpjblsc();
|
|
|
+ this.getJrdtgsdrllfx();
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
getJrdtgsdrllfx() {
|
|
|
- let a = [
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- ];
|
|
|
- let b = [
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- ];
|
|
|
- let c = [
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- ];
|
|
|
- let d = [
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- Math.round(Math.random() * 1000),
|
|
|
- ];
|
|
|
- this.updeteJrdtgsdrllfx(a, b, c, d);
|
|
|
+ dtggsdll().then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ let arr1 = res.data.bgSelfServiceMin;
|
|
|
+ let arr2 = res.data.bgQueueMin;
|
|
|
+ let arr3 = res.data.bgDevicesMin;
|
|
|
+ let arr4 = res.data.bgTaxMin;
|
|
|
+ this.updeteJrdtgsdrllfx(arr1, arr2, arr3, arr4);
|
|
|
+ clearTimeout(this.timer);
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
+ this.getJrdtgsdrllfx();
|
|
|
+ }, 5 * 60 * 1000);
|
|
|
+ } else {
|
|
|
+ this.$tip("今日大厅各时段人流量分析数据异常", "error");
|
|
|
+ clearTimeout(this.timer);
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
+ this.getJrdtgsdrllfx();
|
|
|
+ }, 5 * 1000);
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
updeteJrdtgsdrllfx(zzj, ph, znsb, dzswj) {
|
|
|
let data = this.option;
|
|
@@ -281,20 +256,29 @@ export default {
|
|
|
this.option = { ...data };
|
|
|
},
|
|
|
getYwpjblsc() {
|
|
|
- let data = [
|
|
|
- { key: "办理业务一", value: "4分20秒" },
|
|
|
- { key: "办理业务二", value: "3分12秒" },
|
|
|
- { key: "办理业务三", value: "4分25秒" },
|
|
|
- { key: "办理业务四办理业务四", value: "5分33秒" },
|
|
|
- { key: "办理业务五", value: "4分44秒" },
|
|
|
- { key: "办理业务六", value: "5分21秒" },
|
|
|
- { key: "办理业务七", value: "4分20秒" },
|
|
|
- { key: "办理业务八", value: "4分20秒" },
|
|
|
- { key: "办理业务九", value: "4分20秒" },
|
|
|
- ];
|
|
|
- this.pjblscData = data;
|
|
|
+ pdjhpjblsc().then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.pjblscData = res.data;
|
|
|
+ clearTimeout(this.timer1);
|
|
|
+ this.timer1 = setTimeout(() => {
|
|
|
+ this.getYwpjblsc();
|
|
|
+ }, 5 * 60 * 1000);
|
|
|
+ } else {
|
|
|
+ this.$tip("业务平均办理时长(窗口办理)", "error");
|
|
|
+ clearTimeout(this.timer1);
|
|
|
+ this.timer1 = setTimeout(() => {
|
|
|
+ this.getYwpjblsc();
|
|
|
+ }, 5 * 1000);
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
+ beforeDestroy() {
|
|
|
+ clearTimeout(this.timer);
|
|
|
+ this.timer = null;
|
|
|
+ clearTimeout(this.timer1);
|
|
|
+ this.timer1 = null;
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|