Bladeren bron

Merge branch 'master' of http://101.36.160.140:21044/csc/csc-szls-vue

GaoYuPeng 5 jaren geleden
bovenliggende
commit
0c08e71e55

+ 2 - 0
shanXiPlatform/src/layout/components/Sidebar/index.vue

@@ -94,10 +94,12 @@ export default {
94 94
 }
95 95
 .el-submenu__title {
96 96
   background-color: #037d41 !important;
97
+  font-size:16px !important;
97 98
 }
98 99
 
99 100
 .el-menu-item {
100 101
   background: #037d41 !important;
102
+  font-size:16px !important;
101 103
 }
102 104
 .el-submenu.is-active.is-opened .el-submenu__title {
103 105
   background: #006734 !important;

+ 45 - 25
shanXiPlatform/src/utils/request.js

@@ -2,7 +2,8 @@ import axios from 'axios'
2 2
 import { MessageBox, Message } from 'element-ui'
3 3
 import store from '@/store'
4 4
 import { getToken } from '@/utils/auth'
5
-import { closenewWebSocket,newWebSocket } from '@/api/sendMessageSocket'
5
+import { closenewWebSocket, newWebSocket } from '@/api/sendMessageSocket'
6
+
6 7
 
7 8
 // create an axios instance
8 9
 const service = axios.create({
@@ -89,7 +90,7 @@ service.interceptors.response.use(
89 90
 
90 91
     // 走框架接口,会先在这里拿到服务器返回的数据,如果出现请求超时,或者token获取,或者一些公共错误,可以在这里判断拦截,然后在返回
91 92
 
92
-  
93
+
93 94
 
94 95
     // if the custom code is not 20000, it is judged as an error.
95 96
     // if (res.code !== 20000) {
@@ -99,18 +100,18 @@ service.interceptors.response.use(
99 100
     //     duration: 5 * 1000
100 101
     //   })
101 102
 
102
-      // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
103
-      if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
104
-        // to re-login
105
-        MessageBox.confirm('You have been logged out, you can cancel to stay on this page, or log in again', 'Confirm logout', {
106
-          confirmButtonText: 'Re-Login',
107
-          cancelButtonText: 'Cancel',
108
-          type: 'warning'
109
-        }).then(() => {
110
-          store.dispatch('user/resetToken').then(() => {
111
-            location.reload()
112
-          })
103
+    // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
104
+    if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
105
+      // to re-login
106
+      MessageBox.confirm('You have been logged out, you can cancel to stay on this page, or log in again', 'Confirm logout', {
107
+        confirmButtonText: 'Re-Login',
108
+        cancelButtonText: 'Cancel',
109
+        type: 'warning'
110
+      }).then(() => {
111
+        store.dispatch('user/resetToken').then(() => {
112
+          location.reload()
113 113
         })
114
+      })
114 115
       // }
115 116
       return Promise.reject(new Error(res.message || 'Error'))
116 117
     } else {
@@ -119,7 +120,7 @@ service.interceptors.response.use(
119 120
   },
120 121
   error => {
121 122
     // console.log(JSON.stringify(error), "mmmmm")
122
-  
123
+
123 124
     // Message({
124 125
     //   message: error.message,
125 126
     //   type: 'error',
@@ -127,21 +128,40 @@ service.interceptors.response.use(
127 128
     // })
128 129
     // return Promise.reject(error)
129 130
 
130
-    if (error.response.status == 401&& store.state.isAuthority) {
131
+    // if (error.response.status == 401&& store.state.isAuthority) {
132
+    //   store.state.isAuthority = false;
133
+    //   MessageBox.confirm('身份失效,请重新登录', '确认退出', {
134
+    //     confirmButtonText: '确定',
135
+    //     cancelButtonText: '取消',
136
+    //     type: 'warning'
137
+    //   }).then(() => {
138
+    //     store.dispatch('user/resetToken').then(() => {
139
+    //       location.reload()
140
+    //     })
141
+    //     closenewWebSocket(JSON.parse(getUser()).uid)
142
+    //   })
143
+    // }
144
+
145
+    if (error.response.status == 401 && store.state.isAuthority) {
146
+     
131 147
       store.state.isAuthority = false;
132
-      MessageBox.confirm('身份失效,请重新登录', '确认退出', {
148
+    
149
+      MessageBox.alert('身份失效,请重新登录', '确认退出', {
133 150
         confirmButtonText: '确定',
134
-        cancelButtonText: '取消',
135
-        type: 'warning'
136
-      }).then(() => {
137
-        store.dispatch('user/resetToken').then(() => {
138
-          location.reload()
139
-        })
140
-        closenewWebSocket(JSON.parse(getUser()).uid)
151
+        callback:()=>{
152
+          
153
+          store.dispatch('user/resetToken')
154
+          .then(() => {
155
+            location.reload()
156
+          })
157
+          closenewWebSocket(JSON.parse(getUser()).uid)
158
+          console.log("我到这儿le.....s")
159
+        }
160
+
141 161
       })
142
-    }else if(error.response.status == 666&& store.state.isAuthority){
162
+    }else if (error.response.status == 666 && store.state.isAuthority) {
143 163
       this.$message.error('服务器神游中!');
144
-    }else if(error.response.status == 504&& store.state.isAuthority){
164
+    } else if (error.response.status == 504 && store.state.isAuthority) {
145 165
       this.$message.error('请求超时,请稍后再试');
146 166
     }
147 167
   }

+ 17 - 15
shanXiPlatform/src/views/home/staff.vue

@@ -85,7 +85,7 @@
85 85
           style="
86 86
             float: left;
87 87
             position: relative;
88
-            height: 524px;
88
+            height: 580px;
89 89
             border-radius: 5px;
90 90
             border: 1px solid #d8dce5;
91 91
           "
@@ -247,11 +247,11 @@
247 247
               <!-- <div v-if="item.coordinate && !item.storageStatus" :style="{position:'absolute',width:'20px',height:'20px',backgroundColor:'blue',borderRadius:'50%',opacity:0.4,top:item.coordinate.split(',')[1]-10+ 'px',left:item.coordinate.split(',')[0]-10+ 'px'}"></div> -->
248 248
             </span>
249 249
           </map>
250
-          <div style="height: 64px; line-height: 64px">
250
+          <div style="height: 120px; line-height: 120px">
251 251
             <img
252 252
               src="../../assets/images/zt.png"
253 253
               alt=""
254
-              style="position: absolute; left: 10px"
254
+              style="position: absolute; left: 17px; bottom: 26px;"
255 255
             />
256 256
             <div
257 257
               v-if="!housestatusshow"
@@ -260,7 +260,7 @@
260 260
                 height: 18px;
261 261
                 line-height: 18px;
262 262
                 right: 30px;
263
-                bottom: 12px;
263
+                bottom: 29px;
264 264
                 cursor: pointer;
265 265
               "
266 266
               @click="housestatusshowFn(1)"
@@ -283,7 +283,7 @@
283 283
                 height: 18px;
284 284
                 line-height: 18px;
285 285
                 right: 30px;
286
-                bottom: 12px;
286
+                bottom: 29px;
287 287
                 cursor: pointer;
288 288
               "
289 289
               @click="housestatusshowFn(2)"
@@ -334,16 +334,17 @@
334 334
               :interval="5000"
335 335
               arrow="always"
336 336
               height="200px"
337
+              
337 338
               indicator-position="none"
338 339
             >
339 340
               <el-carousel-item
340 341
                 v-for="item in bodyContentFooterOneData"
341 342
                 :key="item.imgSrc"
342
-              >
343
-                <img :src="item.imgSrc" alt="" height="200px" width="350px" />
344
-                <div class="footerText">
343
+                style="text-align:center;width:320px">
344
+                <img :src="item.imgSrc" alt="" height="100%" />
345
+                <!-- <div class="footerText">
345 346
                   <span>{{ item.title }}</span>
346
-                </div>
347
+                </div> -->
347 348
               </el-carousel-item>
348 349
             </el-carousel>
349 350
           </div>
@@ -548,7 +549,7 @@ export default {
548 549
                 name: "圆环图系列名称", // 系列名称
549 550
                 type: "pie", // 系列类型
550 551
                 center: ["50%", "50%"], // 饼图的中心(圆心)坐标,数组的第一项是横坐标,第二项是纵坐标。[ default: ['50%', '50%'] ]
551
-                radius: ["20%", "35%"], // 饼图的半径,数组的第一项是内半径,第二项是外半径。[ default: [0, '75%'] ]
552
+                radius: ["28%", "55%"], // 饼图的半径,数组的第一项是内半径,第二项是外半径。[ default: [0, '75%'] ]
552 553
                 hoverAnimation: true, // 是否开启 hover 在扇区上的放大动画效果。[ default: true ]
553 554
                 color: ["#44a64b", "#f3c800", "#ff7800"], // 圆环图的颜色
554 555
                 label: {
@@ -625,6 +626,7 @@ export default {
625 626
             {
626 627
               data: grainvalue,
627 628
               type: "bar",
629
+              barWidth:"30%",
628 630
               itemStyle: {
629 631
                 normal: {
630 632
                   label: {
@@ -802,7 +804,7 @@ export default {
802 804
   width: 100%;
803 805
   /* height: calc(100vh - 124px); */
804 806
   /* overflow-y: scroll; */
805
-  height: 1151px;
807
+  height: 1207px;
806 808
   padding: 10px 10px 41px 10px;
807 809
   background-color: #f3f3f3;
808 810
 }
@@ -828,7 +830,7 @@ export default {
828 830
   box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);
829 831
 }
830 832
 .bodyContent {
831
-  height: 844px;
833
+  height: 900px;
832 834
   margin-top: 10px;
833 835
   background-color: #ffffff;
834 836
   margin-bottom: 40px;
@@ -839,15 +841,15 @@ export default {
839 841
   padding-left: 10px;
840 842
 }
841 843
 .bodyContentMiddle {
842
-  height: 524px;
844
+  height: 580px;
843 845
   padding: 0 10px;
844 846
   /* border-bottom: 1px solid #d8dce5; */
845 847
   /* box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04); */
846 848
 }
847 849
 .bodyContentMiddleText {
848 850
   width: calc(100% - 830px);
849
-  height: 524px;
850
-  max-height: 524px;
851
+  height: 580px;
852
+  max-height: 580px;
851 853
   padding: 10px;
852 854
   overflow-y: auto;
853 855
   border: 1px solid #d8dce5;