Kaynağa Gözat

数据大屏接口调试

LiuTeng 1 yıl önce
ebeveyn
işleme
27f543bbba

+ 13 - 0
src/views/dataScreen/components/top3/left1.vue

@@ -32,6 +32,7 @@ export default {
   components: {},
   data() {
     return {
+      timer: null,
       options: {
         legend: {
           data: [
@@ -179,8 +180,16 @@ export default {
           let arr3 = res.data.bgDevicesMin;
           let arr4 = res.data.bgTaxMin;
           this.updateCharts(arr1, arr2, arr3, arr4);
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getInfos();
+          }, 5 * 60 * 1000);
         } else {
           this.$tip("今日大厅各时段人流量分析数据异常", "error");
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getInfos();
+          }, 5 * 1000);
         }
       });
     },
@@ -193,6 +202,10 @@ export default {
       this.options = { ...this.options, ...options };
     },
   },
+  beforeDestroy() {
+    clearTimeout(this.timer);
+    this.timer = null;
+  },
 };
 </script>
 

+ 13 - 0
src/views/dataScreen/components/top3/left1_1.vue

@@ -32,6 +32,7 @@ export default {
   components: {},
   data() {
     return {
+      timer: null,
       //配置
       options: {
         title: {
@@ -127,8 +128,16 @@ export default {
             y.push(item.avgTime);
           });
           this.updateCharts(x, y);
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getInfos();
+          }, 5 * 60 * 1000);
         } else {
           this.$tip("业务平均办理时长(窗口办理)", "error");
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getInfos();
+          }, 5 * 1000);
         }
       });
     },
@@ -139,6 +148,10 @@ export default {
       this.options = { ...options };
     },
   },
+  beforeDestroy() {
+    clearTimeout(this.timer);
+    this.timer = null;
+  },
 };
 </script>
 

+ 22 - 14
src/views/dataScreen1/components/bottomCenter/ds1bc1.vue

@@ -2,50 +2,58 @@
   <div class="Ds1bc1">
     <div class="dates">
       <div class="key">当天自助机办理</div>
-      <div class="value">{{ datas.zzj }}<span>件</span></div>
+      <div class="value">{{ datas.bgSelfService }}<span>件</span></div>
     </div>
     <div class="dates">
       <div class="key">当天排队叫号办理</div>
-      <div class="value">{{ datas.pdjh }}<span>件</span></div>
+      <div class="value">{{ datas.bgQueue }}<span>件</span></div>
     </div>
     <div class="dates">
       <div class="key">当天电子税务局办理</div>
-      <div class="value">{{ datas.dzswj }}<span>件</span></div>
+      <div class="value">{{ datas.bgTax }}<span>件</span></div>
     </div>
     <div class="dates">
       <div class="key">当天智能设备办理</div>
-      <div class="value">{{ datas.znsb }}<span>件</span></div>
+      <div class="value">{{ datas.bgDevices }}<span>件</span></div>
     </div>
   </div>
 </template>
 
 <script>
+import { dtll } from "@/api/dataScreen";
 export default {
   name: "Ds1bc1",
 
   data() {
     return {
+      timer: null,
       datas: {},
     };
   },
 
   mounted() {
-    setTimeout(() => {
-      this.getDatas();
-    }, 1000);
+    this.getDatas();
   },
 
   methods: {
     getDatas() {
-      let data = {
-        zzj: Math.round(Math.random() * 1000),
-        pdjh: Math.round(Math.random() * 1000),
-        dzswj: Math.round(Math.random() * 1000),
-        znsb: Math.round(Math.random() * 1000),
-      };
-      this.datas = data;
+      dtll().then((res) => {
+        if (res.code == 200) {
+          this.datas = res.data;
+        } else {
+          this.$tip("各业务办理数据异常", "error");
+        }
+        clearTimeout(this.timer);
+        this.timer = setTimeout(() => {
+          this.getDatas();
+        }, 60 * 1000);
+      });
     },
   },
+  beforeDestroy() {
+    clearTimeout(this.timer);
+    this.timer = null;
+  },
 };
 </script>
 

+ 53 - 64
src/views/dataScreen1/components/bottomCenter/ds1bc2.vue

@@ -74,6 +74,7 @@
 </template>
 
 <script>
+import { zjbt } from "@/api/dataScreen";
 export default {
   name: "Ds1bc2",
 
@@ -92,80 +93,65 @@ export default {
           fontSize: 0,
         },
       },
+      timer: null,
       datas: [],
     };
   },
 
   mounted() {
-    setTimeout(() => {
-      this.getDatas();
-    }, 1000);
+    this.getDatas();
   },
 
   methods: {
     getDatas() {
-      let datas = [];
-      for (let i = 0; i < 4; i++) {
-        let title;
-        switch (i) {
-          case 0:
-            title = "自助机办理业务数据分析";
-            break;
-          case 1:
-            title = "排队叫号办理业务数据分析";
-            break;
-          case 2:
-            title = "电子税务局办理业务数据分析";
-            break;
-          case 3:
-            title = "智能设备办理业务数据分析";
-            break;
+      zjbt().then((res) => {
+        if (res.code == 200) {
+          if (res.data.businessAnalysis) {
+            this.format(res.data.businessAnalysis);
+          }
         }
-        let day = [
-          {
-            name: "发票业务",
-            value: Math.round(Math.random() * 1000),
-          },
-          {
-            name: "文书业务",
-            value: Math.round(Math.random() * 1000),
-          },
-          {
-            name: "申报业务",
-            value: Math.round(Math.random() * 1000),
-          },
-          {
-            name: "其他业务",
-            value: Math.round(Math.random() * 1000),
-          },
-        ];
-        let month = [
-          {
-            name: "发票业务",
-            value: Math.round(Math.random() * 1000),
-          },
-          {
-            name: "文书业务",
-            value: Math.round(Math.random() * 1000),
-          },
-          {
-            name: "申报业务",
-            value: Math.round(Math.random() * 1000),
-          },
-          {
-            name: "其他业务",
-            value: Math.round(Math.random() * 1000),
-          },
-        ];
-        let data = {
-          title: title,
-          dayDatas: this.updateDatas(day),
-          monthDatas: this.updateDatas(month),
-        };
-        datas.push(data);
-      }
+        clearTimeout(this.timer);
+        this.timer = setTimeout(() => {
+          this.getDatas();
+        }, 5 * 60 * 1000);
+      });
+    },
+
+    format(e) {
+      let chartData = [
+        {
+          title: "电子税务局办理业务数据分析",
+          dayDatas: this.updateDatas(this.format1(e.day.TaxSum)),
+          monthDatas: this.updateDatas(this.format1(e.month.TaxSum)),
+        },
+        {
+          title: "智能设备办理业务数据分析",
+          dayDatas: this.updateDatas(this.format1(e.day.devicesSum)),
+          monthDatas: this.updateDatas(this.format1(e.month.devicesSum)),
+        },
+        {
+          title: "自助机办理业务数据分析",
+          dayDatas: this.updateDatas(this.format1(e.day.SelfServiceSum)),
+          monthDatas: this.updateDatas(this.format1(e.month.SelfServiceSum)),
+        },
+        {
+          title: "排队叫号办理业务数据分析",
+          dayDatas: this.updateDatas(this.format1(e.day.queue)),
+          monthDatas: this.updateDatas(this.format1(e.month.queue)),
+        },
+      ];
+      this.datas = chartData;
       this.loopDatas();
-      this.datas = datas;
+    },
+
+    format1(e) {
+      let newData = e.map((item) => {
+        return {
+          name: item.name,
+          value: item.y,
+        };
+      });
+      return newData;
     },
 
     updateDatas(data) {
@@ -184,11 +170,14 @@ export default {
           this.Index = 0;
         }
         this.loopDatas();
-      }, 10 * 1000);
+      }, 15 * 1000);
     },
   },
   beforeDestroy() {
     clearTimeout(this.loopTimer);
+    this.loopTimer = null;
+    clearTimeout(this.timer);
+    this.timer = null;
   },
 };
 </script>

+ 49 - 65
src/views/dataScreen1/components/bottomCenter/ds1bc3.vue

@@ -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>
 

+ 44 - 127
src/views/dataScreen1/components/bottomLeft/ds1bl1.vue

@@ -16,13 +16,13 @@
                   :key="index"
                   @click="chage(index)"
                 >
-                  <div class="text">{{ item.name }}</div>
+                  <div class="text">{{ item.title }}</div>
                 </div>
               </div>
             </div>
             <div class="right">
               <div class="title" :key="'T' + Index">
-                {{ datas[Index].name }}
+                {{ datas[Index].title }}
               </div>
               <div class="content" :key="'C' + Index">
                 <marquee class="marquee" scrollamount="3" direction="up">
@@ -31,7 +31,7 @@
                     v-for="(item, index) in datas[Index].datas"
                     :key="index"
                   >
-                    <span>{{ item.time }}</span
+                    <span>{{ item.newTime }}</span
                     >{{ item.content }}
                   </div>
                 </marquee>
@@ -45,12 +45,14 @@
 </template>
 
 <script>
+import { getNews } from "@/api/dataScreen";
 export default {
   name: "Ds1bl1",
 
   data() {
     return {
       chageTimer: null,
+      timer: null,
       datas: [],
       Index: 0,
     };
@@ -58,9 +60,7 @@ export default {
 
   mounted() {
     this.chage(0);
-    setTimeout(() => {
-      this.getDatas();
-    }, 1000);
+    this.getDatas();
   },
 
   methods: {
@@ -73,132 +73,49 @@ export default {
       }, 15 * 1000);
     },
     getDatas() {
-      let data = [
-        {
-          name: "营商环境",
-          datas: [
-            {
-              time: "2023-06-19",
-              content: "“小”方寸里的“大”服务",
-            },
-            {
-              time: "2023-06-19",
-              content: "“小”方寸里的“大”服务",
-            },
-            {
-              time: "2023-06-19",
-              content: "“小”方寸里的“大”服务",
-            },
-            {
-              time: "2023-06-19",
-              content: "“小”方寸里的“大”服务",
-            },
-            {
-              time: "2023-06-19",
-              content: "“小”方寸里的“大”服务",
-            },
-            {
-              time: "2023-06-19",
-              content:
-                "“小”方寸里的“大”服务“小”方寸里的“大”服务“小”方寸里的“大”服务“小”方寸里的“大”服务“小”方寸里的“大”服务",
-            },
-          ],
-        },
-        {
-          name: "投资高新",
-          datas: [
-            {
-              time: "2023-06-19",
-              content: "投资高新投资高新投资高新投资高新",
-            },
-            {
-              time: "2023-06-19",
-              content: "投资高新投资高新投资高新投资高新投资高新",
-            },
-            {
-              time: "2023-06-19",
-              content: "投资高新投资高新投资高新投资高新投资高新投资高新",
-            },
-            {
-              time: "2023-06-19",
-              content: "投资高新投资高新投资高新投资高新投资高新投资高新",
-            },
-            {
-              time: "2023-06-19",
-              content: "投资高新投资高新投资高新投资高新",
-            },
-            {
-              time: "2023-06-19",
-              content: "投资高新",
-            },
-          ],
-        },
-        {
-          name: "投资指南",
-          datas: [
-            {
-              time: "2023-06-19",
-              content: "投资指南投资指南投资指南投资指南",
-            },
-            {
-              time: "2023-06-19",
-              content: "投资指南投资指南投资指南投资指南投资指南投资指南",
-            },
-            {
-              time: "2023-06-19",
-              content: "投资指南投资指南投资指南投资指南投资指南投资指南",
-            },
-            {
-              time: "2023-06-19",
-              content:
-                "投资指南投资指南投资指南投资指南投资指南投资指南投资指南",
-            },
-            {
-              time: "2023-06-19",
-              content: "投资指南投资指南投资指南",
-            },
-            {
-              time: "2023-06-19",
-              content: "投资指南投资指南投资指南投资指南投资指南",
-            },
-          ],
-        },
-        {
-          name: "优惠政策",
-          datas: [
-            {
-              time: "2023-06-19",
-              content: "优惠政策",
-            },
-            {
-              time: "2023-06-19",
-              content: "优惠政策优惠政策",
-            },
-            {
-              time: "2023-06-19",
-              content: "优惠政策优惠政策优惠政策",
-            },
-            {
-              time: "2023-06-19",
-              content: "优惠政策优惠政策优惠政策优惠政策优惠政策",
-            },
-            {
-              time: "2023-06-19",
-              content: "优惠政策优惠政策",
-            },
-            {
-              time: "2023-06-19",
-              content: "优惠政策优惠政策优惠政策优惠政策优惠政策优惠政策",
-            },
-          ],
-        },
-      ];
-      this.datas = data;
+      getNews().then((res) => {
+        if (res.code == 200) {
+          this.format(res.data);
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getInfos();
+          }, 24 * 60 * 60000);
+        } else {
+          this.$tip("营商环境数据异常", "error");
+          setTimeout(() => {
+            this.getInfos();
+          }, 10 * 1000);
+        }
+      });
+    },
+
+    format(e) {
+      let arr = [];
+      let tzhj = {
+        title: e.tzhj[0].title,
+        datas: e.tzhj,
+      };
+      let tzzc = {
+        title: e.tzzc[0].title,
+        datas: e.tzzc,
+      };
+      let zscg = {
+        title: e.zscg[0].title,
+        datas: e.zscg,
+      };
+      let zsxm = {
+        title: e.zsxm[0].title,
+        datas: e.zsxm,
+      };
+      arr = [tzhj, tzzc, zscg, zsxm];
+      this.datas = arr;
     },
   },
   beforeDestroy() {
     clearTimeout(this.chageTimer);
     this.chageTimer = null;
+    clearTimeout(this.timer);
+    this.timer = null;
   },
 };
 </script>

+ 34 - 87
src/views/dataScreen1/components/bottomLeft/ds1bl2.vue

@@ -41,24 +41,24 @@
                 v-for="(item, index) in datas[type]"
                 :key="item + index"
               >
-                <div class="time">{{ item.time }}</div>
+                <div class="time">{{ item.timing }}</div>
                 <div class="data">
                   <div class="data1">
                     <div
                       class="pro-box"
-                      :style="'width:' + setStyle(item, 'zxgh')"
+                      :style="'width:' + setStyle(item, 'logout')"
                     >
-                      <div class="value">{{ item.zxgh }}</div>
+                      <div class="value">{{ item.logout }}</div>
                       <div class="pro"></div>
                     </div>
                   </div>
                   <div class="data2">
                     <div
                       class="pro-box"
-                      :style="'width:' + setStyle(item, 'xzgh')"
+                      :style="'width:' + setStyle(item, 'additional')"
                     >
                       <div class="pro"></div>
-                      <div class="value">{{ item.xzgh }}</div>
+                      <div class="value">{{ item.additional }}</div>
                     </div>
                   </div>
                 </div>
@@ -72,6 +72,7 @@
 </template>
 
 <script>
+import { sjghqkfx } from "@/api/dataScreen";
 export default {
   name: "Ds1bl2",
 
@@ -79,6 +80,7 @@ export default {
     return {
       chageTimer: null,
       type: "week",
+      timer: null,
       datas: {
         week: [],
         year: [],
@@ -88,9 +90,7 @@ export default {
 
   mounted() {
     this.chage("week");
-    setTimeout(() => {
-      this.getDatas();
-    }, 1000);
+    this.getDatas();
   },
 
   methods: {
@@ -102,94 +102,39 @@ export default {
         this.chage(type);
       }, 10 * 1000);
     },
-    async getDatas() {
-      let week = [
-        {
-          time: "08-01",
-          zxgh: Math.round(Math.random() * 1000),
-          xzgh: Math.round(Math.random() * 1000),
-        },
-        {
-          time: "08-02",
-          zxgh: Math.round(Math.random() * 1000),
-          xzgh: Math.round(Math.random() * 1000),
-        },
-        {
-          time: "08-03",
-          zxgh: Math.round(Math.random() * 1000),
-          xzgh: Math.round(Math.random() * 1000),
-        },
-        {
-          time: "08-04",
-          zxgh: Math.round(Math.random() * 1000),
-          xzgh: Math.round(Math.random() * 1000),
-        },
-        {
-          time: "08-05",
-          zxgh: Math.round(Math.random() * 1000),
-          xzgh: Math.round(Math.random() * 1000),
-        },
-        {
-          time: "08-06",
-          zxgh: Math.round(Math.random() * 1000),
-          xzgh: Math.round(Math.random() * 1000),
-        },
-        {
-          time: "08-07",
-          zxgh: Math.round(Math.random() * 1000),
-          xzgh: Math.round(Math.random() * 1000),
-        },
-      ];
-      let year = [
-        {
-          time: "03",
-          zxgh: Math.round(Math.random() * 1000),
-          xzgh: Math.round(Math.random() * 1000),
-        },
-        {
-          time: "04",
-          zxgh: Math.round(Math.random() * 1000),
-          xzgh: Math.round(Math.random() * 1000),
-        },
-        {
-          time: "05",
-          zxgh: Math.round(Math.random() * 1000),
-          xzgh: Math.round(Math.random() * 1000),
-        },
-        {
-          time: "06",
-          zxgh: 0,
-          xzgh: Math.round(Math.random() * 1000),
-        },
-        {
-          time: "07",
-          zxgh: Math.round(Math.random() * 1000),
-          xzgh: Math.round(Math.random() * 1000),
-        },
-        {
-          time: "08",
-          zxgh: Math.round(Math.random() * 1000),
-          xzgh: Math.round(Math.random() * 1000),
-        },
-      ];
-      this.datas = {
-        week: await this.formatDatas(week),
-        year: await this.formatDatas(year),
-      };
+    getDatas() {
+      sjghqkfx().then(async (res) => {
+        if (res.code == 200) {
+          this.datas = {
+            week: await this.formatDatas(res.data.day),
+            year: await this.formatDatas(res.data.month),
+          };
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getDatas();
+          }, 60 * 60 * 1000);
+        } else {
+          this.$tip("税局管户情况分析数据异常", "error");
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getDatas();
+          }, 5 * 1000);
+        }
+      });
     },
     formatDatas(e) {
       return new Promise((resolve, reject) => {
         let zxghArr = Object.assign([], e);
         let xzghArr = Object.assign([], e);
         zxghArr.sort((a, b) => {
-          return b.zxgh - a.zxgh;
+          return b.logout - a.logout;
         });
         xzghArr.sort((a, b) => {
-          return b.xzgh - a.xzgh;
+          return b.additional - a.additional;
         });
         let pros = {
-          zxgh: zxghArr[0].zxgh / 100,
-          xzgh: xzghArr[0].xzgh / 100,
+          logout: zxghArr[0].logout / 100,
+          additional: xzghArr[0].additional / 100,
         };
         let res = e.map((item) => {
           item.pros = pros;
@@ -213,6 +158,8 @@ export default {
   beforeDestroy() {
     clearTimeout(this.chageTimer);
     this.chageTimer = null;
+    clearTimeout(this.timer);
+    this.timer = null;
   },
 };
 </script>
@@ -369,7 +316,7 @@ export default {
 
               .time {
                 margin: 0 10px;
-                width: 50px;
+                width: 80px;
                 height: 100%;
                 font-size: 12px;
                 color: #ffffff;

+ 24 - 24
src/views/dataScreen1/components/bottomLeft/ds1bl3.vue

@@ -33,11 +33,15 @@
 </template>
 
 <script>
+import { dtywTop5 } from "@/api/dataScreen";
 export default {
   name: "Ds1bl3",
 
   data() {
-    return { datas: [] };
+    return {
+      timer: null,
+      datas: [],
+    };
   },
 
   mounted() {
@@ -48,29 +52,21 @@ export default {
 
   methods: {
     getDatas() {
-      let data = [
-        {
-          name: "申报业务",
-          value: Math.round(Math.random() * 10000),
-        },
-        {
-          name: "发票代开业务",
-          value: Math.round(Math.random() * 10000),
-        },
-        {
-          name: "双屏辅导",
-          value: Math.round(Math.random() * 10000),
-        },
-        {
-          name: "车购税缴纳",
-          value: Math.round(Math.random() * 10000),
-        },
-        {
-          name: "发票领用",
-          value: Math.round(Math.random() * 10000),
-        },
-      ];
-      this.toSort(data);
+      dtywTop5().then((res) => {
+        if (res.code == 200) {
+          this.toSort(res.data);
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getDatas();
+          }, 60 * 60 * 1000);
+        } else {
+          this.$tip("大厅业务量TOP5", "error");
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getDatas();
+          }, 5 * 1000);
+        }
+      });
     },
     async toSort(data) {
       let newData = data.slice();
@@ -103,6 +99,10 @@ export default {
       }
     },
   },
+  beforeDestroy() {
+    clearTimeout(this.timer);
+    this.timer = null;
+  },
 };
 </script>
 

+ 31 - 25
src/views/dataScreen1/components/bottomLeft/ds1bl4.vue

@@ -12,18 +12,21 @@
               class="list"
               v-for="(item, index) in datas"
               :key="item + index"
+              v-show="index < 3"
             >
               <div class="icon"></div>
               <div class="content">
                 <div class="text">
-                  <span v-if="item.name.length < 23">{{ item.name }}</span>
-                  <marquee v-else>{{ item.name }}</marquee>
+                  <span v-if="item.small_items.length < 23">{{
+                    item.small_items
+                  }}</span>
+                  <marquee v-else>{{ item.small_items }}</marquee>
                 </div>
                 <div class="pro-contrain">
                   <div class="pro" :style="'--pro:' + setStyle(item.pro)"></div>
                 </div>
               </div>
-              <div class="count">{{ item.value }}<span>件</span></div>
+              <div class="count">{{ item.smItemNum }}<span>件</span></div>
             </div>
           </transition-group>
         </div>
@@ -33,11 +36,13 @@
 </template>
 
 <script>
+import { queryTaxTop5 } from "@/api/dataScreen";
 export default {
   name: "Ds1bl4",
 
   data() {
     return {
+      timer: null,
       datas: [],
     };
   },
@@ -50,37 +55,34 @@ export default {
 
   methods: {
     getDatas() {
-      let data = [
-        {
-          name: "《残疾人就业保障金缴费申报表》《残疾人就业保障金缴费申报表》",
-          value: Math.round(Math.random() * 10000),
-        },
-        {
-          name: "《通用申报表(税及附征税费)》",
-          value: Math.round(Math.random() * 10000),
-        },
-        {
-          name: "《增值税及附加税费申报表(一般纳税人适用)》",
-          value: Math.round(Math.random() * 10000),
-        },
-      ];
-      this.toSort(data);
+      queryTaxTop5().then((res) => {
+        if (res.code == 200) {
+          this.toSort(res.data);
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getDatas();
+          }, 60 * 60 * 1000);
+        } else {
+          this.$tip("税局热门事项TOP3数据异常", "error");
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getDatas();
+          }, 5 * 1000);
+        }
+      });
     },
     async toSort(data) {
       let newData = data.slice();
       newData = newData.sort((a, b) => {
-        return b.value - a.value;
+        return b.smItemNum - a.smItemNum;
       });
-      this.datas = [...newData];
-      let pro = await this.scale(newData[0].value);
+      let pro = await this.scale(newData[0].smItemNum);
       let res = newData.map((item) => {
         let obj = item;
-        obj.pro = (obj.value / pro).toFixed(0) + "%";
+        obj.pro = (obj.smItemNum / pro).toFixed(0) + "%";
         return obj;
       });
-      setTimeout(() => {
-        this.datas = [...res];
-      }, 0);
+      this.datas = [...res];
     },
     scale(e) {
       return new Promise((resolve, reject) => {
@@ -97,6 +99,10 @@ export default {
       }
     },
   },
+  beforeDestroy() {
+    clearTimeout(this.timer);
+    this.timer = null;
+  },
 };
 </script>
 

+ 30 - 6
src/views/dataScreen1/components/bottomRight/ds1br1.vue

@@ -8,10 +8,13 @@
       <div class="datas">
         <div class="left">
           <marquee class="marquee" scrollamount="3" direction="up">
-            <div class="list" v-for="(item, index) in 10" :key="index">
-              <div class="title">[01日-31日]</div>
+            <div class="list" v-for="(item, index) in TaxCalendar" :key="index">
+              <div class="title">
+                [{{ item.startTime.substring(5, 10) }}日 -
+                {{ item.endTime.substring(5, 10) }}日]
+              </div>
               <div class="content">
-                次申报缴纳防空地下室易地建设费、排污权出让收入、水土保持补偿费、国有土地使用权出让收入、国有土地收益基金收入、农业土地开发资金收入、矿产资源专项收入(矿业权出让收益、探矿权、采矿权使用费收入)、土地闲置费。申报缴纳海域使用金、无居民海岛使用金[0
+                {{ item.content }}
               </div>
             </div>
           </marquee>
@@ -81,23 +84,42 @@
 </template>
 
 <script>
+import { bsrl } from "@/api/dataScreen";
 import calendar from "@/utils/calendar";
 export default {
   name: "Ds1br1",
 
   data() {
     return {
+      timer: null,
+      TaxCalendar: [],
       calendars: {},
+      dateTimer: null,
     };
   },
 
   mounted() {
-    setTimeout(() => {
-      this.getCalendar();
-    }, 1000);
+    this.getInfos();
+    this.getCalendar();
   },
 
   methods: {
+    getInfos() {
+      bsrl().then((res) => {
+        if (res.code == 200) {
+          this.TaxCalendar = res.data;
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getInfos();
+          }, 24 * 60 * 60000);
+        } else {
+          this.$tip("办税日历数据异常", "error");
+          setTimeout(() => {
+            this.getInfos();
+          }, 10 * 1000);
+        }
+      });
+    },
     getCalendar() {
       let year = new Date().getFullYear();
       let month = new Date().getMonth() + 1;
@@ -165,6 +187,8 @@ export default {
     },
   },
   beforeDestroy() {
+    clearTimeout(this.timer);
+    this.timer = null;
     clearTimeout(this.dateTimer);
     this.dateTimer = null;
   },

+ 27 - 17
src/views/dataScreen1/components/bottomRight/ds1br2.vue

@@ -13,11 +13,13 @@
 </template>
 
 <script>
+import { zjwnssqkgb } from "@/api/dataScreen";
 export default {
   name: "Ds1br2",
 
   data() {
     return {
+      timer: null,
       option: {
         title: {
           show: false,
@@ -46,6 +48,9 @@ export default {
               fontSize: 12,
               fontFamily: "苹方简R",
             },
+            formatter: (e) => {
+              return e.value + "年";
+            },
           },
         },
         yAxis: {
@@ -97,27 +102,28 @@ export default {
   },
 
   mounted() {
-    setTimeout(() => {
-      this.getDatas();
-    }, 1000);
+    this.getDatas();
   },
 
   methods: {
     getDatas() {
-      let x = ["2018", "2019", "2020", "2021", "2022", "2023"];
-      let y = [
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-      ];
-      this.updateDatas(x, y);
-      setTimeout(() => {
-        this.getDatas();
-      }, 3000);
+      zjwnssqkgb().then((res) => {
+        if (res.code == 200) {
+          let years = res.data.year;
+          let ss = res.data.growthRate;
+          let zzl = res.data.income;
+          this.updateDatas(years, ss);
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getDatas();
+          }, 12 * 60 * 60 * 1000);
+        } else {
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getDatas();
+          }, 10 * 1000);
+        }
+      });
     },
     updateDatas(x, y) {
       let option = this.option;
@@ -126,6 +132,10 @@ export default {
       this.option = { ...option };
     },
   },
+  beforeDestroy() {
+    clearTimeout(this.timer);
+    this.timer == null;
+  },
 };
 </script>
 

+ 26 - 24
src/views/dataScreen1/components/bottomRight/ds1br3.vue

@@ -13,6 +13,7 @@
 </template>
 
 <script>
+import { sjlgycgsjn } from "@/api/dataScreen";
 import * as echarts from "echarts";
 export default {
   name: "Ds1br3",
@@ -69,6 +70,9 @@ export default {
             color: "#FFFFFF",
             fontSize: 10,
             fontFamily: "苹方简R",
+            formatter: (e) => {
+              return e + "月";
+            },
           },
         },
         yAxis: [
@@ -155,40 +159,36 @@ export default {
           return idx * 100;
         },
       },
+      timer: null,
     };
   },
 
   mounted() {
     this.myChart = echarts.init(document.getElementById("main"));
 
-    setTimeout(() => {
-      this.getDatas();
-    }, 1000);
+    this.getDatas();
   },
 
   methods: {
     getDatas() {
-      let date = ["1月", "2月", "3月", "4月", "5月", "6月"];
-      let jsje = [
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-      ];
-      let jnbs = [
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-        Math.round(Math.random() * 10000),
-      ];
-      this.updateDatas(date, jsje, jnbs);
-      setTimeout(() => {
-        this.getDatas();
-      }, 3000);
+      sjlgycgsjn().then((res) => {
+        if (res.code == 200) {
+          this.updateDatas(
+            res.data.month,
+            res.data.payMoney,
+            res.data.payNumber
+          );
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getDatas();
+          }, 12 * 60 * 60 * 1000);
+        } else {
+          this.$tip("车购税缴纳近六个月数据异常", "error");
+          setTimeout(() => {
+            this.getDatas();
+          }, 10 * 1000);
+        }
+      });
     },
     updateDatas(date, jsje, jnbs) {
       let option = this.option;
@@ -218,6 +218,8 @@ export default {
   beforeDestroy() {
     clearTimeout(this.showTipTimer);
     this.showTipTimer = null;
+    clearTimeout(this.timer);
+    this.timer = null;
   },
 };
 </script>

+ 28 - 13
src/views/dataScreen1/components/bottomRight/ds1br4.vue

@@ -13,44 +13,54 @@
 </template>
 
 <script>
+import { ajnsrxxzs } from "@/api/dataScreen";
 export default {
   name: "Ds1br4",
 
   data() {
     return {
+      timer: null,
       config: {
         header: [
           "<span style='color:#FFB956; font-size: 16px;'>纳税人名称</span>",
           "<span style='color:#FFB956; font-size: 16px;'>纳税人识别号</span>",
-          "<span style='color:#FFB956; font-size: 16px;'>评价年度</span>",
         ],
         rowNum: 3,
         headerBGC: "rgba(0,0,0,0)",
         oddRowBGC: "rgba(0,0,0,0)",
         evenRowBGC: "rgba(0,0,0,0)",
         waitTime: 3000,
-        align: ["left", "center", "left"],
-        columnWidth: [210, 160],
+        align: ["center", "center"],
         data: [],
       },
     };
   },
 
   mounted() {
-    setTimeout(() => {
-      this.getDatas();
-    }, 1000);
+    this.getDatas();
   },
 
   methods: {
     getDatas() {
-      let a = [
-        ["陕西亿杰金赋信息科技有限公司", "91610000054788016G", "2022年度"],
-        ["陕西帕尼尔生物科技有限公司", "91610000054788016G", "2022年度"],
-        ["陕西钜信达工程项目管理有限公司", "91610000054788016G", "2022年度"],
-        ["陕西博维建设工程有限公司", "91610000054788016G", "2022年度"],
-      ];
-      this.updateDatas(a);
+      ajnsrxxzs().then((res) => {
+        if (res.code == 200) {
+          let data = [];
+          res.data.map((item) => {
+            let arr = [item.nsrmc, item.nsrsbh];
+            data.push(arr);
+          });
+          this.updateDatas(data);
+          clearTimeout(this.timer);
+          this.timer = setTimeout(() => {
+            this.getDatas();
+          }, 12 * 60 * 60 * 1000);
+        } else {
+          this.$tip("获取A级纳税人信息异常", "error");
+          setTimeout(() => {
+            this.getDatas();
+          }, 10 * 1000);
+        }
+      });
     },
     updateDatas(data) {
       let datas = this.config;
@@ -58,6 +68,11 @@ export default {
       this.config = { ...datas };
     },
   },
+
+  beforeDestroy() {
+    clearTimeout(this.timer);
+    this.timer = null;
+  },
 };
 </script>
 

+ 26 - 1
src/views/dataScreen1/components/top.vue

@@ -6,7 +6,11 @@
     <div class="content">
       <div class="weather">
         <div class="icon"></div>
-        <div class="text">21-34℃ &nbsp;&nbsp;&nbsp; 空气质量:良</div>
+        <div class="text">
+          {{ weather.temperature }} &nbsp;&nbsp;&nbsp; 空气质量:{{
+            weather.weather
+          }}
+        </div>
       </div>
       <div class="title">
         <img src="@/assets/dataScreen1/top-title.png" />
@@ -25,6 +29,7 @@
 </template>
 
 <script>
+import { queryWeather } from "@/api/dataScreen";
 import mainService from "@/utils/time";
 export default {
   name: "dataScreen1Top",
@@ -33,6 +38,8 @@ export default {
     return {
       dateTimer: null,
       dateTime: {},
+      weather: {},
+      weatherTimer: null,
     };
   },
 
@@ -41,6 +48,7 @@ export default {
     this.dateTimer = setInterval(() => {
       this.getDate();
     }, 1 * 1000);
+    this.getWeather();
   },
 
   methods: {
@@ -69,10 +77,27 @@ export default {
       };
       this.dateTime = dateTime;
     },
+    getWeather() {
+      queryWeather().then((res) => {
+        if (res.code == 200) {
+          this.weather = res.data;
+          clearTimeout(this.weatherTimer);
+          this.weatherTimer = setTimeout(() => {
+            this.getWeather();
+          }, 12 * 60 * 60000);
+        } else {
+          setTimeout(() => {
+            this.getWeather();
+          }, 10 * 1000);
+        }
+      });
+    },
   },
   beforeRouteLeave() {
     clearInterval(this.dateTimer);
     this.dateTimer = null;
+    clearTimeout(this.weatherTimer);
+    this.weatherTimer = null;
   },
 };
 </script>

+ 7 - 0
src/views/dataScreen1/index.vue

@@ -36,6 +36,13 @@ export default {
     return {};
   },
 
+  created() {
+    let swjgdm = this.$route.query.swjgdm;
+    if (swjgdm) {
+      sessionStorage.setItem("SWJGDM", swjgdm);
+    }
+  },
+
   mounted() {},
 
   methods: {},