Browse Source

中间页排版及对接

ming 3 years ago
parent
commit
4671f93fbb

+ 7 - 0
public/static/svgIcons/alarmManage.svg

@@ -0,0 +1,7 @@
+<svg 
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ width="14px" height="14px">
+<path fill-rule="evenodd"  fill="rgb(255,255,255)"
+ d="M13.533,6.759 L12.133,6.759 C11.875,6.759 11.666,6.543 11.666,6.276 C11.666,6.009 11.875,5.793 12.133,5.793 L13.533,5.793 C13.791,5.793 14.000,6.009 14.000,6.276 C14.000,6.543 13.791,6.759 13.533,6.759 ZM11.433,3.379 C11.047,3.379 10.733,3.055 10.733,2.655 C10.733,2.255 11.047,1.931 11.433,1.931 C11.820,1.931 12.133,2.255 12.133,2.655 C12.133,3.055 11.820,3.379 11.433,3.379 ZM11.440,11.104 L11.666,11.104 C12.440,11.104 13.066,11.752 13.066,12.552 C13.066,13.352 12.440,14.000 11.666,14.000 L2.333,14.000 C1.560,14.000 0.933,13.352 0.933,12.552 C0.933,11.752 1.560,11.104 2.333,11.104 L2.573,11.104 L2.573,7.241 C2.573,4.708 4.558,2.655 7.006,2.655 C9.455,2.655 11.440,4.708 11.440,7.241 L11.440,11.104 ZM1.867,12.552 C1.867,12.818 2.076,13.035 2.333,13.035 L11.666,13.035 C11.924,13.035 12.133,12.818 12.133,12.552 C12.133,12.285 11.924,12.069 11.666,12.069 L2.333,12.069 C2.076,12.069 1.867,12.285 1.867,12.552 ZM7.006,3.621 C5.074,3.621 3.506,5.242 3.506,7.241 L3.506,11.104 L6.533,11.104 L6.533,9.075 C5.863,8.864 5.367,8.245 5.367,7.483 C5.367,6.550 6.098,5.793 7.000,5.793 C7.902,5.793 8.633,6.550 8.633,7.483 C8.633,8.245 8.136,8.864 7.466,9.075 L7.466,11.104 L10.506,11.104 L10.506,7.241 C10.506,5.242 8.939,3.621 7.006,3.621 ZM7.000,8.207 C7.386,8.207 7.700,7.883 7.700,7.483 C7.700,7.083 7.386,6.759 7.000,6.759 C6.613,6.759 6.300,7.083 6.300,7.483 C6.300,7.883 6.613,8.207 7.000,8.207 ZM7.000,2.414 C6.742,2.414 6.533,2.198 6.533,1.931 L6.533,0.483 C6.533,0.216 6.742,-0.000 7.000,-0.000 C7.258,-0.000 7.466,0.216 7.466,0.483 L7.466,1.931 C7.466,2.198 7.258,2.414 7.000,2.414 ZM2.567,3.379 C2.180,3.379 1.867,3.055 1.867,2.655 C1.867,2.255 2.180,1.931 2.567,1.931 C2.953,1.931 3.267,2.255 3.267,2.655 C3.267,3.055 2.953,3.379 2.567,3.379 ZM2.333,6.276 C2.333,6.543 2.124,6.759 1.867,6.759 L0.467,6.759 C0.209,6.759 0.000,6.543 0.000,6.276 C0.000,6.009 0.209,5.793 0.467,5.793 L1.867,5.793 C2.124,5.793 2.333,6.009 2.333,6.276 Z"/>
+</svg>

File diff suppressed because it is too large
+ 5 - 0
public/static/svgIcons/dataManage.svg


+ 7 - 0
public/static/svgIcons/deviceManage.svg

@@ -0,0 +1,7 @@
+<svg 
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ width="14px" height="13px">
+<path fill-rule="evenodd"  fill="rgb(255, 255, 255)"
+ d="M13.066,13.000 L0.933,13.000 C0.418,13.000 0.000,12.569 0.000,12.037 L0.000,8.241 C0.000,8.167 0.008,8.092 0.025,8.019 L1.692,0.742 C1.792,0.307 2.168,0.000 2.601,0.000 L11.389,0.000 C11.822,0.000 12.197,0.307 12.297,0.741 L13.975,8.019 C13.991,8.092 14.000,8.166 14.000,8.241 L14.000,12.037 C14.000,12.569 13.582,13.000 13.066,13.000 ZM6.533,0.963 L2.601,0.963 L0.946,8.185 L6.560,8.185 C6.547,8.141 6.533,8.096 6.533,8.047 L6.533,6.741 C6.535,6.685 6.545,6.630 6.565,6.578 C4.990,6.431 3.733,5.498 3.733,4.263 C3.733,3.037 4.974,2.109 6.533,1.952 L6.533,0.963 ZM4.667,4.263 C4.667,4.966 5.679,5.637 7.000,5.637 C8.321,5.637 9.333,4.966 9.333,4.263 C9.333,3.560 8.321,2.889 7.000,2.889 C5.679,2.889 4.667,3.560 4.667,4.263 ZM11.389,0.963 L7.467,0.963 L7.467,1.952 C9.026,2.109 10.267,3.037 10.267,4.263 C10.267,5.498 9.009,6.430 7.435,6.578 C7.453,6.629 7.467,6.683 7.467,6.741 L7.467,8.047 C7.467,8.096 7.453,8.141 7.439,8.185 L13.053,8.185 L11.389,0.963 ZM13.066,9.148 L0.933,9.148 L0.933,12.037 L13.066,12.037 L13.066,9.148 ZM2.333,10.111 L11.666,10.111 C11.924,10.111 12.133,10.327 12.133,10.592 C12.133,10.858 11.924,11.074 11.666,11.074 L2.333,11.074 C2.076,11.074 1.867,10.858 1.867,10.592 C1.867,10.327 2.076,10.111 2.333,10.111 Z"/>
+</svg>

+ 7 - 0
public/static/svgIcons/home.svg

@@ -0,0 +1,7 @@
+<svg 
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ width="14px" height="14px">
+<path fill-rule="evenodd"  fill="rgb(255,255,255)"
+ d="M13.987,1.482 C13.926,1.213 13.663,1.046 13.400,1.108 L10.850,1.712 C10.587,1.774 10.423,2.043 10.484,2.312 C10.504,2.400 10.547,2.481 10.608,2.546 L11.165,3.135 L8.192,5.847 L6.648,4.352 C6.452,4.163 6.144,4.171 5.958,4.370 L2.645,7.921 C2.116,7.808 1.598,8.155 1.488,8.695 C1.377,9.236 1.716,9.766 2.245,9.879 C2.774,9.992 3.292,9.645 3.403,9.104 C3.416,9.037 3.423,8.969 3.423,8.900 C3.423,8.792 3.402,8.689 3.371,8.592 L6.329,5.421 L7.845,6.889 C8.030,7.068 8.317,7.072 8.507,6.899 L11.845,3.855 L12.479,4.527 C12.667,4.725 12.976,4.731 13.171,4.539 C13.234,4.476 13.280,4.396 13.303,4.309 L13.982,1.725 C14.003,1.645 14.005,1.562 13.987,1.482 L13.987,1.482 ZM13.204,6.038 C12.934,6.038 12.715,6.262 12.715,6.538 L12.715,10.500 C12.715,10.776 12.496,11.000 12.226,11.000 L1.467,11.000 C1.197,11.000 0.978,10.776 0.978,10.500 L0.978,1.500 C0.978,1.224 1.197,1.000 1.467,1.000 L9.577,1.000 C9.847,1.000 10.066,0.776 10.066,0.500 C10.066,0.224 9.847,-0.000 9.577,-0.000 L1.467,-0.000 C0.657,-0.000 0.000,0.672 0.000,1.500 L0.000,10.500 C0.000,11.328 0.657,12.000 1.467,12.000 L12.226,12.000 C13.036,12.000 13.693,11.328 13.693,10.500 L13.693,6.538 C13.693,6.262 13.474,6.038 13.204,6.038 ZM12.960,13.000 L0.734,13.000 C0.463,13.000 0.245,13.224 0.245,13.500 C0.245,13.776 0.463,14.000 0.734,14.000 L12.960,14.000 C13.230,14.000 13.449,13.776 13.449,13.500 C13.449,13.224 13.230,13.000 12.960,13.000 Z"/>
+</svg>

+ 7 - 0
public/static/svgIcons/monthReport.svg

@@ -0,0 +1,7 @@
+<svg 
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ width="14px" height="16px">
+<path fill-rule="evenodd"
+ d="M12.727,15.998 L1.272,15.998 C0.570,15.998 -0.001,15.446 -0.001,14.767 L-0.001,2.460 C-0.001,1.782 0.570,1.230 1.272,1.230 L2.980,1.230 C3.243,0.515 3.943,-0.001 4.772,-0.001 L9.227,-0.001 C10.056,-0.001 10.755,0.515 11.019,1.230 L12.727,1.230 C13.429,1.230 14.000,1.782 14.000,2.460 L14.000,14.767 C14.000,15.446 13.429,15.998 12.727,15.998 ZM9.227,1.230 L4.772,1.230 C4.421,1.230 4.136,1.506 4.136,1.845 C4.136,2.184 4.421,2.460 4.772,2.460 L9.227,2.460 C9.578,2.460 9.863,2.184 9.863,1.845 C9.863,1.506 9.578,1.230 9.227,1.230 ZM12.727,2.460 L11.019,2.460 C10.755,3.175 10.056,3.691 9.227,3.691 L4.772,3.691 C3.943,3.691 3.243,3.175 2.980,2.460 L1.272,2.460 L1.272,14.767 L12.727,14.767 L12.727,2.460 ZM10.130,7.855 L3.869,7.855 L3.869,6.530 L10.130,6.530 L10.130,7.855 ZM10.130,11.311 L3.869,11.311 L3.869,9.986 L10.130,9.986 L10.130,11.311 Z"/>
+</svg>

+ 7 - 0
public/static/svgIcons/patrolManage.svg

@@ -0,0 +1,7 @@
+<svg 
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ width="14px" height="16px">
+<path fill-rule="evenodd" 
+ d="M13.869,8.244 L10.196,12.610 C10.086,12.742 9.927,12.810 9.767,12.810 C9.640,12.810 9.512,12.767 9.408,12.680 C9.170,12.482 9.139,12.130 9.338,11.894 L13.010,7.527 C13.209,7.291 13.562,7.260 13.799,7.458 C14.036,7.656 14.067,8.008 13.869,8.244 ZM3.928,10.255 L7.272,10.255 C7.582,10.255 7.832,10.505 7.832,10.813 C7.832,11.121 7.582,11.371 7.272,11.371 L3.928,11.371 C3.619,11.371 3.368,11.121 3.368,10.813 C3.368,10.505 3.619,10.255 3.928,10.255 ZM3.928,6.262 L8.766,6.262 C9.075,6.262 9.326,6.512 9.326,6.820 C9.326,7.128 9.075,7.378 8.766,7.378 L3.928,7.378 C3.619,7.378 3.368,7.128 3.368,6.820 C3.368,6.512 3.619,6.262 3.928,6.262 ZM12.134,5.890 C11.824,5.890 11.574,5.640 11.574,5.332 L11.574,2.238 L9.982,2.238 C9.749,2.884 9.128,3.347 8.400,3.347 L4.293,3.347 C3.565,3.347 2.944,2.884 2.711,2.238 L1.120,2.238 L1.120,14.884 L11.574,14.884 L11.574,13.968 C11.574,13.660 11.824,13.410 12.134,13.410 C12.443,13.410 12.694,13.660 12.694,13.968 L12.694,15.442 C12.694,15.750 12.443,16.000 12.134,16.000 L0.560,16.000 C0.250,16.000 -0.000,15.750 -0.000,15.442 L-0.000,1.680 C-0.000,1.372 0.250,1.122 0.560,1.122 L2.707,1.122 C2.936,0.469 3.561,-0.000 4.293,-0.000 L8.400,-0.000 C9.133,-0.000 9.757,0.469 9.986,1.122 L12.134,1.122 C12.443,1.122 12.694,1.372 12.694,1.680 L12.694,5.332 C12.694,5.640 12.443,5.890 12.134,5.890 ZM8.400,1.116 L4.293,1.116 C3.985,1.116 3.733,1.366 3.733,1.674 C3.733,1.981 3.985,2.232 4.293,2.232 L8.400,2.232 C8.709,2.232 8.960,1.981 8.960,1.674 C8.960,1.366 8.709,1.116 8.400,1.116 Z"/>
+</svg>

+ 7 - 0
public/static/svgIcons/planOutage.svg

@@ -0,0 +1,7 @@
+<svg 
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ width="14px" height="13px">
+<path fill-rule="evenodd"  fill="rgb(255, 255, 255)"
+ d="M11.999,0.001 L10.499,0.001 L9.499,0.001 L4.500,0.001 L3.500,0.001 L1.999,0.001 C0.900,0.001 -0.000,0.902 -0.000,2.001 L-0.000,11.001 C-0.000,12.100 0.900,13.000 1.999,13.000 L12.001,13.000 C13.100,13.000 14.000,12.100 14.000,11.001 L14.000,2.001 C14.000,0.902 13.100,0.001 12.001,0.001 L11.999,0.001 ZM12.999,11.001 C12.994,11.555 12.547,12.002 11.999,12.000 L1.998,12.000 C1.450,12.002 1.004,11.555 0.999,11.001 L0.999,2.001 C0.999,1.450 1.447,1.001 1.998,1.001 L12.001,1.001 C12.552,1.001 13.000,1.450 13.000,2.001 L13.000,11.001 L12.999,11.001 ZM9.430,6.091 L5.717,6.091 L7.129,4.075 L8.042,2.773 C8.420,2.235 7.665,1.705 7.287,2.245 L7.129,2.469 L4.452,6.287 C4.243,6.584 4.466,7.014 4.828,7.014 L8.542,7.014 L7.129,9.030 L6.217,10.331 C5.839,10.871 6.593,11.400 6.970,10.860 L7.129,10.635 L9.807,6.817 C10.016,6.520 9.794,6.091 9.429,6.091 L9.430,6.091 Z"/>
+</svg>

+ 7 - 0
public/static/svgIcons/powerQuality.svg

@@ -0,0 +1,7 @@
+<svg 
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ width="14px" height="12px">
+<path fill-rule="evenodd"  fill="rgb(255, 255, 255)"
+ d="M11.900,12.000 L7.233,12.000 L6.533,12.000 L-0.000,12.000 L-0.000,0.001 L4.200,0.001 L4.900,0.001 L9.100,0.001 L9.800,0.001 L14.000,0.001 L14.000,12.000 L11.900,12.000 ZM2.100,0.924 L0.700,0.924 L0.700,11.077 L2.100,11.077 L2.100,0.924 ZM11.200,0.924 L2.800,0.924 L2.800,11.077 L11.200,11.077 L11.200,0.924 ZM13.300,0.924 L11.900,0.924 L11.900,11.077 L13.300,11.077 L13.300,0.924 ZM7.469,5.846 L8.867,5.846 L6.767,8.924 L6.764,5.848 L5.365,5.848 L7.466,2.772 L7.469,5.846 L7.469,5.846 Z"/>
+</svg>

File diff suppressed because it is too large
+ 5 - 0
public/static/svgIcons/siteManage.svg


+ 7 - 0
public/static/svgIcons/stationManage.svg

@@ -0,0 +1,7 @@
+<svg 
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ width="14px" height="14px">
+<path fill-rule="evenodd"  fill="rgb(255, 255, 255)"
+ d="M11.667,9.333 L9.333,9.333 L9.333,11.667 C9.333,12.955 8.289,14.000 7.000,14.000 L2.333,14.000 C1.045,14.000 0.000,12.955 0.000,11.667 L0.000,7.000 C0.000,5.711 1.045,4.667 2.333,4.667 L4.667,4.667 L4.667,2.333 C4.667,1.045 5.711,0.000 7.000,0.000 L11.667,0.000 C12.955,0.000 14.000,1.045 14.000,2.333 L14.000,7.000 C14.000,8.289 12.955,9.333 11.667,9.333 ZM2.333,5.833 C1.689,5.833 1.167,6.356 1.167,7.000 L1.167,11.667 C1.167,12.311 1.689,12.833 2.333,12.833 L7.000,12.833 C7.644,12.833 8.167,12.311 8.167,11.667 L8.167,9.333 L7.000,9.333 C5.711,9.333 4.667,8.289 4.667,7.000 L4.667,5.833 L2.333,5.833 ZM8.167,8.167 L8.167,7.000 C8.167,6.356 7.644,5.833 7.000,5.833 L5.833,5.833 L5.833,7.000 C5.833,7.644 6.356,8.167 7.000,8.167 L8.167,8.167 ZM12.833,2.333 C12.833,1.689 12.311,1.167 11.667,1.167 L7.000,1.167 C6.356,1.167 5.833,1.689 5.833,2.333 L5.833,4.667 L7.000,4.667 C8.289,4.667 9.333,5.711 9.333,7.000 L9.333,8.167 L11.667,8.167 C12.311,8.167 12.833,7.644 12.833,7.000 L12.833,2.333 Z"/>
+</svg>

File diff suppressed because it is too large
+ 5 - 0
public/static/svgIcons/systemManage.svg


+ 35 - 26
src/api/user.js

@@ -2,42 +2,51 @@ import request from '@/utils/request'
 import { tokenName } from '@/config'
 
 export async function login(data) {
-  return request({
-    url: '/login',
-    method: 'POST',
-    data,
-  })
+    return request({
+        url: '/login',
+        method: 'POST',
+        data,
+    })
 }
 
 export async function socialLogin(data) {
-  return request({
-    url: '/socialLogin',
-    method: 'post',
-    data,
-  })
+    return request({
+        url: '/socialLogin',
+        method: 'post',
+        data,
+    })
 }
 
 export function getUserInfo(accessToken) {
-  //此处为了兼容mock.js使用data传递accessToken,如果使用mock可以走headers
-  return request({
-    url: '/getInfo',
-    method: 'get',
-    data: {
-      [tokenName]: accessToken,
-    },
-  })
+    //此处为了兼容mock.js使用data传递accessToken,如果使用mock可以走headers
+    return request({
+        url: '/getInfo',
+        method: 'get',
+        data: {
+            [tokenName]: accessToken,
+        },
+    })
 }
 
 export function logout() {
-  return request({
-    url: '/logout',
-    method: 'post',
-  })
+    return request({
+        url: '/logout',
+        method: 'post',
+    })
 }
 
 export function register() {
-  return request({
-    url: '/register',
-    method: 'post',
-  })
+    return request({
+        url: '/register',
+        method: 'post',
+    })
 }
+
+// 登录页面的背景图 公司名称获取 logo
+export function getLoginStyle(params) {
+    return request({
+        url: '/getLoginStyle',
+        method: 'get',
+        params
+    })
+}

+ 7 - 0
src/assets/images/home.svg

@@ -0,0 +1,7 @@
+<svg 
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ width="14px" height="14px">
+<path fill-rule="evenodd"  fill="rgb(255,2455,255)"
+ d="M13.987,1.482 C13.926,1.213 13.663,1.046 13.400,1.108 L10.850,1.712 C10.587,1.774 10.423,2.043 10.484,2.312 C10.504,2.400 10.547,2.481 10.608,2.546 L11.165,3.135 L8.192,5.847 L6.648,4.352 C6.452,4.163 6.144,4.171 5.958,4.370 L2.645,7.921 C2.116,7.808 1.598,8.155 1.488,8.695 C1.377,9.236 1.716,9.766 2.245,9.879 C2.774,9.992 3.292,9.645 3.403,9.104 C3.416,9.037 3.423,8.969 3.423,8.900 C3.423,8.792 3.402,8.689 3.371,8.592 L6.329,5.421 L7.845,6.889 C8.030,7.068 8.317,7.072 8.507,6.899 L11.845,3.855 L12.479,4.527 C12.667,4.725 12.976,4.731 13.171,4.539 C13.234,4.476 13.280,4.396 13.303,4.309 L13.982,1.725 C14.003,1.645 14.005,1.562 13.987,1.482 L13.987,1.482 ZM13.204,6.038 C12.934,6.038 12.715,6.262 12.715,6.538 L12.715,10.500 C12.715,10.776 12.496,11.000 12.226,11.000 L1.467,11.000 C1.197,11.000 0.978,10.776 0.978,10.500 L0.978,1.500 C0.978,1.224 1.197,1.000 1.467,1.000 L9.577,1.000 C9.847,1.000 10.066,0.776 10.066,0.500 C10.066,0.224 9.847,-0.000 9.577,-0.000 L1.467,-0.000 C0.657,-0.000 0.000,0.672 0.000,1.500 L0.000,10.500 C0.000,11.328 0.657,12.000 1.467,12.000 L12.226,12.000 C13.036,12.000 13.693,11.328 13.693,10.500 L13.693,6.538 C13.693,6.262 13.474,6.038 13.204,6.038 ZM12.960,13.000 L0.734,13.000 C0.463,13.000 0.245,13.224 0.245,13.500 C0.245,13.776 0.463,14.000 0.734,14.000 L12.960,14.000 C13.230,14.000 13.449,13.776 13.449,13.500 C13.449,13.224 13.230,13.000 12.960,13.000 Z"/>
+</svg>

BIN
src/assets/images/middle_background.png


+ 32 - 17
src/layout/vab-tabs/index.vue

@@ -16,27 +16,37 @@
         ></a-tab-pane>
       </a-tabs> -->
 
-      <div style="display: inline-block;
-    float: left;
-    margin-top: 8px;
-    margin-right: 6px;">   
-
-         <menu-unfold-outlined
-        v-if="collapse"
-        class="trigger"
-        @click="toggleCollapse"
-      />
-      <menu-fold-outlined v-else class="trigger" @click="toggleCollapse" />
-
 
-        
+      <!-- 缩进按钮 start -->
+      <div
+        style="
+          display: inline-block;
+          float: left;
+          margin-top: 8px;
+          margin-right: 6px;
+        "
+      >
+        <menu-unfold-outlined
+          v-if="collapse"
+          class="trigger"
+          @click="toggleCollapse"
+        />
+        <menu-fold-outlined v-else class="trigger" @click="toggleCollapse" />
       </div>
+      <!-- 缩进按钮 start -->
 
-     
-
-      
+      <!-- 面包屑start -->
+      <!-- <el-breadcrumb separator="/" style="display: inline-block">
+        <el-breadcrumb-item
+          v-for="(item, ind) in breadListLast"
+          :key="ind"
+          :to="item.path"
+        >
+          {{ item.title }}
+        </el-breadcrumb-item>
+      </el-breadcrumb> -->
 
-      <el-breadcrumb separator="/" style="display: inline-block">
+       <el-breadcrumb separator="/">
         <el-breadcrumb-item
           v-for="(item, ind) in breadListLast"
           :key="ind"
@@ -45,7 +55,12 @@
           {{ item.title }}
         </el-breadcrumb-item>
       </el-breadcrumb>
+      
     </div>
+    <!-- 面包屑end -->
+
+
+
     <!-- <div class="vab-tabs-right-panel">
       <a-dropdown>
         <template v-slot:overlay>

+ 7 - 0
src/router/index.js

@@ -7,6 +7,13 @@ export const constantRoutes = [{
             import ('@/views/login'),
         hidden: true,
     },
+    {
+
+        path: '/middle',
+        component: () =>
+            import ('@/views/middle'),
+        hidden: true,
+    },
     {
         path: '/403',
         name: '403',

+ 1 - 0
src/store/index.js

@@ -19,6 +19,7 @@ export default createStore({
     modules,
     state: {
         query: null,
+        middleList: [],
         auth: 0,
         siteId: 1, //公共api请求参数->siteId
         siteList: [], //公共api站点下拉列表存储->siteId

+ 12 - 8
src/store/modules/routes.js

@@ -46,6 +46,8 @@ const actions = {
     async setAllRoutes({ commit }) {
         let { data } = await getRouterList();
 
+
+
         if (data.length == 0) {
             store.state.auth = 0
             ElMessage.warning('此角色暂无分配权限,请先联系超级管理员分配权限 ! ')
@@ -64,14 +66,16 @@ const actions = {
             }]
         }, )
         data.forEach(function(item) {
-                if (item.children.length > 1) {
-                    item.children.forEach(function(i) {
-                        i.meta.icon = ''
-                    })
-                }
-            })
-            // console.log('data')
-            // console.log(data)
+            if (item.children.length > 1) {
+                item.children.forEach(function(i) {
+                    i.meta.icon = ''
+                })
+            }
+        })
+        console.log('data')
+        console.log(data)
+
+        store.state.middleList = data
 
 
         // if (data[data.length - 1].path !== '*')

+ 12 - 1
src/vab/plugins/permissions.js

@@ -21,6 +21,8 @@ router.beforeEach(async(to, from, next) => {
     console.log(localStorage.getItem('accessToken'))
     if (hasToken) {
         if (to.path === '/login') {
+
+
             next({ path: '/' })
         } else {
 
@@ -37,6 +39,9 @@ router.beforeEach(async(to, from, next) => {
                 }
                 next()
             } else {
+
+
+
                 try {
                     if (loginInterception) {
                         await store.dispatch('user/getUserInfo')
@@ -61,9 +66,13 @@ router.beforeEach(async(to, from, next) => {
                         next(accessRoutes[1].path)
 
                     } else {
+                        router.push({
+                            path: '/middle'
+                        })
 
+                        // next('/middle')
 
-                        next({...to, replace: true })
+                        // next({...to, replace: true })
 
                     }
 
@@ -84,6 +93,8 @@ router.beforeEach(async(to, from, next) => {
         routesWhiteList
         // next({ path: '/login', replace: true })
         if (routesWhiteList.indexOf(to.path) !== -1) {
+
+
             next()
         } else {
             if (recordRoute)

+ 26 - 15
src/views/login/index.vue

@@ -70,6 +70,8 @@ import { UserOutlined, LockOutlined } from '@ant-design/icons-vue'
 
 import JcRange from './JcRange.vue'
 
+import * as api from '@/api/user.js'
+
 export default {
   name: 'Login',
   components: {
@@ -88,8 +90,8 @@ export default {
       dependencies: dependencies,
       devDependencies: devDependencies,
 
-      companyName: '永天智慧电力平台',
-      backdropUrl: require('@/assets/login_images/login_background.png'),
+      companyName: '',
+      backdropUrl: '',
     }
   },
   computed: {
@@ -107,19 +109,6 @@ export default {
     },
   },
   mounted() {
-    
-    //根据不同的域名,显示不同的title和背景图
-    this.companyName='永天智慧电力平台'
-    this.backdropUrl=require('@/assets/login_images/login_background.png')
-
-    // if (window.location.host.indexOf('localhost') != -1) {
-    //   this.companyName='永天电力后台管理系统1'
-    //   this.backdropUrl=require('@/assets/images/bg-smooth.jpg')
-    // } else {
-    //    this.companyName='永天电力后台管理系统'
-    //    this.backdropUrl=require('@/assets/login_images/login_background.png')
-    // }
-
 
     this.form.username = '' //admin
     this.form.password = '' //admin123
@@ -129,8 +118,30 @@ export default {
     if (router.currentRoute.value.query.userName === 'admin') {
       this.handleSubmit()
     }
+
+    this.getLoginStyle()
+    // this.companyName='永天智慧电力'
+    // this.backdropUrl=require('@/assets/login_images/login_background.png')
   },
   methods: {
+
+  //根据不同的域名,显示不同的title和背景图
+    getLoginStyle() {
+      api
+        .getLoginStyle({
+          url:window.location.host
+        })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            this.backdropUrl = requset.data.backdropUrl
+            this.companyName = requset.data.companyName
+          } else {
+            alert(requset.msg)
+          }
+        })
+    },
+
+
     ...mapActions({
       login: 'user/login',
     }),

+ 222 - 0
src/views/middle.vue

@@ -0,0 +1,222 @@
+<template>
+  <div class="middle-container">
+    <div class="middle-container-title">
+      <img
+        src="@/assets/logo2.png"
+        height="46"
+        style="position: relative; top: -2px"
+      />
+      永天智慧电力平台
+    </div>
+    <div class="middle-container-lists">
+      <el-row>
+        <el-col :xs="5" :md="3" :sm="4" :lg="3" :xl="3" class="list-one"  v-for="item in middleList"
+          :key="item"
+         >
+          <router-link :to="item.children[0].path">
+            <div class="list-one-img">
+              <!-- <img src="@/assets/images/home.svg" /> -->
+              <!-- <img src="../assets/images/home.svg" /> -->
+              <img :src="`static/svgIcons/${item.children.length>1?item.meta.icon:item.children[0].meta.icon}.svg`" alt="" />
+               <!-- <img :src="`static/svgIcons/home.svg`" alt="" /> -->
+            </div>
+            <p>{{item.children.length>1?item.meta.title:item.children[0].meta.title}}</p>
+          </router-link>
+        </el-col>
+
+        <!-- <el-col :xs="5" :md="3" :sm="4" :lg="3" :xl="3" class="list-one">
+          <router-link to="/alarmManage/index">
+            <div class="list-one-img">
+              <img src="@/assets/images/home.svg" />
+            </div>
+            <p>数据看版</p>
+          </router-link>
+        </el-col>
+        <el-col :xs="5" :md="3" :sm="4" :lg="3" :xl="3" class="list-one">
+          <div class="list-one-img" style="background: #e36f6b">
+            <img src="@/assets/images/home.svg" />
+          </div>
+          <p>告警管理</p>
+        </el-col>
+        <el-col :xs="5" :md="3" :sm="4" :lg="3" :xl="3" class="list-one">
+          <div class="list-one-img">
+            <img src="@/assets/images/home.svg" />
+          </div>
+          <p>站点管理</p>
+        </el-col>
+        <el-col :xs="5" :md="3" :sm="4" :lg="3" :xl="3" class="list-one">
+          <div class="list-one-img">
+            <img src="@/assets/images/home.svg" />
+          </div>
+          <p>台区管理</p>
+        </el-col>
+        <el-col :xs="5" :md="3" :sm="4" :lg="3" :xl="3" class="list-one">
+          <div class="list-one-img">
+            <img src="@/assets/images/home.svg" />
+          </div>
+          <p>设备管理</p>
+        </el-col>
+        <el-col :xs="5" :md="3" :sm="4" :lg="3" :xl="3" class="list-one">
+          <div class="list-one-img">
+            <img src="@/assets/images/home.svg" />
+          </div>
+          <p>数据管理</p>
+        </el-col>
+        <el-col :xs="5" :md="3" :sm="4" :lg="3" :xl="3" class="list-one">
+          <div class="list-one-img">
+            <img src="@/assets/images/home.svg" />
+          </div>
+          <p>电能质量</p>
+        </el-col>
+        <el-col :xs="5" :md="3" :sm="4" :lg="3" :xl="3" class="list-one">
+          <div class="list-one-img">
+            <img src="@/assets/images/home.svg" />
+          </div>
+          <p>计划停电</p>
+        </el-col>
+        <el-col :xs="5" :md="3" :sm="4" :lg="3" :xl="3" class="list-one">
+          <div class="list-one-img">
+            <img src="@/assets/images/home.svg" />
+          </div>
+          <p>系统管理</p>
+        </el-col> -->
+      </el-row>
+    </div>
+
+    <div class="middle-container-tips">上海永天科技股份有限公司</div>
+  </div>
+</template>
+<script>
+// import * as api from '@/api/user.js'
+
+import { useStore } from 'vuex'
+import { defineComponent, onMounted } from 'vue'
+
+export default defineComponent({
+  name: 'Middle',
+  props: {
+    // show_Dialog: Boolean,
+    // dialogTitle: {
+    //   type: String,
+    //   default: '告警详情',
+    // },
+    // itemInfo: {
+    //   type: Object,
+    //   default: function () {
+    //     return {}
+    //   },
+    // },
+  },
+  setup() {
+    const store = useStore()
+
+    const middleList=store.state.middleList
+
+    onMounted(() => {
+      console.log('middleList')
+      console.log(middleList)
+    })
+    return {
+      middleList
+    }
+  },
+})
+</script>
+<style lang="less">
+.middle-container {
+  width: 100%;
+
+  background: url('~@/assets/images/middle_background.png');
+  background-size: cover;
+  background-color: #000000b3;
+  margin: 0 auto;
+  padding-top: 100px;
+  color: #fff;
+  text-align: center;
+  background-position: center center;
+  min-height: 100vh;
+
+  &-title {
+    font-size: 46px;
+
+    font-weight: bold;
+    letter-spacing: 3px;
+
+    width: 100%;
+    text-align: center;
+  }
+  &-lists {
+    width: 80%;
+    margin: 0 auto;
+    margin-top: 80px;
+    .list-one {
+      margin-bottom: 60px;
+      p{
+          color:#fff;
+      }
+      .list-one-img {
+        cursor: pointer;
+        width: 92px;
+        height: 92px;
+        // background: #5c88fa;
+        background-image: linear-gradient(135deg, #64c3f5 , #5590e9);
+        line-height: 92px;
+        border-radius: 22px;
+        margin: 0 auto;
+        margin-bottom: 14px;
+        img {
+          width: 60%;
+          transition: all 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) 0s;
+          -webkit-transition: all 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) 0s;
+        }
+        img:hover {
+          transform: scale(1.15);
+        }
+      }
+    }
+  }
+  //   &-form {
+  //     width: calc(100% - 40px);
+  //     min-width: 360px;
+  //     height: 440px;
+  //     padding: 4vh;
+  //     margin-top: calc((100vh - 380px) / 2);
+  //     margin-right: 20px;
+  //     margin-left: 20px;
+  //     background: url('~@/assets/login_images/login_form.png');
+  //     background-size: 100% 100%;
+  //     border-radius: 10px;
+  //     box-shadow: 0 2px 8px 0 rgba(7, 17, 27, 0.06);
+  //   }
+  //   &-hello {
+  //     font-size: 32px;
+  //     color: #fff;
+  //   }
+  //   &-title {
+  //     margin-bottom: 30px;
+  //     font-size: 20px;
+  //     color: #fff;
+  //   }
+  &-tips {
+    position: fixed;
+    bottom: @vab-margin;
+    width: 100%;
+    height: 40px;
+    color: rgba(255, 255, 255, 0.856);
+    text-align: center;
+  }
+  .ant-col {
+    width: 100%;
+    padding: 0 10px 0 10px;
+  }
+  .ant-input {
+    height: 35px;
+  }
+  .ant-btn {
+    width: 100%;
+    height: 45px;
+    border-radius: 99px;
+  }
+}
+</style>
+l

Some files were not shown because too many files changed in this diff