Browse Source

代码修改

liwei19941102 2 years ago
parent
commit
c4742e4857
2 changed files with 32 additions and 5 deletions
  1. 29 2
      src/components/HeaderDiv/index.vue
  2. 3 3
      src/views/new/index.vue

+ 29 - 2
src/components/HeaderDiv/index.vue

@@ -54,13 +54,21 @@
         <div class="time">
             <img src="../../assets/images/图层 9@2x.png" /><span>{{ currenttime }}</span>
         </div>
+
+        <div class="exit">
+             <i class="el-icon-switch-button" @click="logout"></i>
+        </div>
     </div>
 </template>
 
 <script>
 import moment from "moment";
+import TopNav from '@/components/TopNav'
 
 export default {
+   components: {   
+      TopNav
+    },
   name: "HeaderDiv",
    props: {
       currentindexP:Number,
@@ -96,6 +104,17 @@ export default {
         }, 1000);
     },
   methods: {
+    async logout() {
+      this.$confirm('确定注销并退出系统吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$store.dispatch('LogOut').then(() => {
+          location.href = '#/login';
+        })
+      }).catch(() => {});
+    },
     goTarget(index) {
       if(index == 1){
             this.$router.push('/big');
@@ -113,7 +132,7 @@ export default {
       }else if(index == 5){
            this.$router.push('/public')
       }else if(index == 6){
-           this.$router.push('/qdlt/area')
+           this.$router.push('/plan/statics')
       }else if(index == 7){
            this.$router.push('/introduction')
       }else if(index == 12){
@@ -182,7 +201,7 @@ export default {
     .time {
         position: absolute;
         top: 1.2rem;
-        right: 4.7rem;
+        right: 5.7rem;
         font-size: 1.6rem;
         color: #fff;
         img {
@@ -193,6 +212,14 @@ export default {
             margin-right: 1.6rem;
         }
     }
+
+    .exit{
+        position: absolute;
+        top: 0.6rem;
+        right: 2.2rem;
+        font-size: 2rem;
+        color: white;
+    }
 }
 .bottombg{
   background: url("../../assets/images/底部菜单bg@2x.png");

+ 3 - 3
src/views/new/index.vue

@@ -403,7 +403,7 @@ export default {
                             },
                             yAxis: {
                                 type: 'category',
-                                data: ['汇龙镇', '南阳镇', '海复镇', '王鲍镇', '北新镇', '吕四镇','东宇镇','近海镇'],
+                                data: ['汇龙镇', '南阳镇', '海复镇', '王鲍镇', '北新镇', '吕四镇'],
                                 axisLabel: {
                                                         show: true,
                                                         textStyle: {
@@ -415,12 +415,12 @@ export default {
                                 {
                                 name: '已处理预警',
                                 type: 'bar',
-                                data: [573, 289, 357, 405, 501, 286,471,421]
+                                data: [573, 289, 357, 405, 501, 286]
                                 },
                                 {
                                 name: '预警总数',
                                 type: 'bar',
-                                data: [582, 366, 391, 498, 577, 337, 483, 492]
+                                data: [582, 366, 391, 498, 577, 337]
                                 }
                             ]
                             };