Переглянути джерело

更新主页的预警功能

sunyanqiang 3 роки тому
батько
коміт
307540df84
3 змінених файлів з 27 додано та 0 видалено
  1. 8 0
      src/api/pt.js
  2. BIN
      src/images/感叹号圆.gif
  3. 19 0
      src/views/pt.vue

+ 8 - 0
src/api/pt.js

@@ -62,4 +62,12 @@ export function getNone(query) {
     method: 'get',
     params: query
   })
+}
+// 获取预警功能
+export function noReminder(query) {
+  return request({
+    url: '/system/menu/noReminder',
+    method: 'get',
+    params: query
+  })
 }

BIN
src/images/感叹号圆.gif


+ 19 - 0
src/views/pt.vue

@@ -47,6 +47,7 @@
               <div class="demo-box">
                 <div class="demo active" v-on:click="doThis">
                   <img src="../images/dj.png" alt />
+                  <span class="tanhao" v-show="yuJing[0] != '0'"></span>
                 </div>
               </div>
               <div class="demo-a">
@@ -77,6 +78,7 @@
                 >
                   <img src="../images/gz.png" alt />
                 </div>
+                <span class="tanhao" v-show="yuJing[1] != '0'"></span>
               </div>
               <div class="demo-a">
                 <a href="#" class="a">工 作 安 排</a>
@@ -177,6 +179,7 @@
                 >
                   <img src="../images/jc.png" alt />
                 </div>
+                <span class="tanhao" v-show="yuJing[2] != '0'"></span>
               </div>
               <div class="demo-a">
                 <a href="#" class="a">检查督导</a>
@@ -723,6 +726,7 @@ import {
   updateNotice,
   getWorkTask,
   getNone,
+  noReminder,
 } from "@/api/pt";
 import { getUserProfile } from "@/api/system/user";
 import Cookies from "js-cookie";
@@ -764,6 +768,8 @@ export default {
       danWie: "",
       yongHu: "",
       str: "",
+      // 获取预警列表
+      yuJing: [],
     };
   },
   created() {
@@ -776,6 +782,10 @@ export default {
     getNone().then((res) => {
       this.str = res.msg;
     });
+    noReminder().then((res) => {
+      console.log(res);
+      this.yuJing = res.data;
+    });
   },
   mounted() {
     if (this.$route.params.name) {
@@ -1236,6 +1246,7 @@ li {
   display: flex;
   justify-content: center;
   align-items: center;
+  position: relative;
 }
 .demo-a {
   width: 100%;
@@ -1796,4 +1807,12 @@ hr {
 #xitong img {
   margin-top: 44px !important;
 }
+.tanhao {
+  position: absolute;
+  right: 22%;
+  background: url(/static/img/感叹号圆.a6dba5cb.gif) no-repeat;
+  width: 30px;
+  height: 30px;
+  top: 16%;
+}
 </style>