1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

登录加功能开发

This commit is contained in:
dengfuchuan 2021-03-06 21:46:08 +08:00
parent 33a93a12b4
commit b9853082e5
23 changed files with 756 additions and 179 deletions

View File

@ -2,4 +2,4 @@
ENV = 'development'
# base api
VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = 'http://localhost:9527/bwhse'

View File

@ -56,7 +56,8 @@
"chalk": "2.4.2",
"chokidar": "2.1.5",
"connect": "3.6.6",
"eslint": "6.7.2",
"eslint": "^6.7.2",
"eslint-config-elemefe": "^0.3.0",
"eslint-plugin-vue": "6.2.2",
"html-webpack-plugin": "3.2.0",
"husky": "1.3.1",

11
src/api/public.js Normal file
View File

@ -0,0 +1,11 @@
import request from '@/utils/request'
export default {
getButtons(funid) {
return request({
url: `/commonAction.do`,
method: 'post',
data: `funid=queryevent&eventcode=query_loadtb&selpfunid=&selfunid=${funid}&selpagetype=editgrid&user_id=administrator&dataType=json&query_type=0&has_page=0`
}).then(response => response.data)
}
}

View File

@ -2,7 +2,7 @@ import request from '@/utils/request'
export function login(data) {
return request({
url: '/vue-element-admin/user/login',
url: '/commonAction.do',
method: 'post',
data
})

BIN
src/assets/login/2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 MiB

BIN
src/assets/login/left.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 MiB

350
src/assets/login/left.svg Normal file
View File

@ -0,0 +1,350 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="画布_1_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 2000 2000" style="enable-background:new 0 0 2000 2000;" xml:space="preserve">
<style type="text/css">
.st0{fill:#E6E6E6;}
.st1{opacity:0.24;fill:#99DDFF;enable-background:new ;}
.st2{opacity:0.72;fill:#FFFFFF;enable-background:new ;}
.st3{opacity:0.72;}
.st4{fill:#FFFFFF;}
.st5{opacity:0.12;enable-background:new ;}
.st6{opacity:0.84;fill:#FFFFFF;enable-background:new ;}
.st7{fill:#99DDFF;}
.st8{opacity:0.36;enable-background:new ;}
.st9{opacity:0.36;fill:#FFFFFF;enable-background:new ;}
.st10{opacity:0.12;fill:#FFFFFF;enable-background:new ;}
.st11{opacity:0.24;enable-background:new ;}
.st12{opacity:0.6;enable-background:new ;}
.st13{opacity:0.84;}
.st14{opacity:0.72;enable-background:new ;}
.st15{opacity:0.12;fill:#070707;enable-background:new ;}
.st16{opacity:0.12;}
.st17{fill:#070707;}
.st18{opacity:0.84;enable-background:new ;}
.st19{fill:#FFC9BD;}
.st20{clip-path:url(#SVGID_2_);}
.st21{clip-path:url(#SVGID_4_);}
.st22{opacity:0.48;enable-background:new ;}
.st23{fill-rule:evenodd;clip-rule:evenodd;fill:#99DDFF;}
</style>
<g id="元素-阴影">
<ellipse class="st0" cx="1000" cy="1653.1" rx="877.5" ry="49.1"/>
</g>
<g id="背景-详细">
<path class="st1" d="M1220.9,660.9c-127.3-109.7-398.5-110-408.3,64.6s-151.8,132.1-293.3-36.8s-416.3,207,35.5,669.1
c424.7,434.4,1140.7-129.9,1164.7-362.9C1738.3,811.8,1348.2,770.6,1220.9,660.9z"/>
<rect x="861.7" y="182.4" class="st0" width="11.8" height="359.5"/>
<path class="st0" d="M867.6,480.2c-11.1,0-20.1,9.9-20.1,22.2h40.2C887.7,490.1,878.7,480.2,867.6,480.2L867.6,480.2z"/>
<path class="st0" d="M887.7,502.3h-40.2l-19.7,66.9c-2.8,6.1-0.8,16.5,3.2,16.5h73.8c4,0,6-10.4,3.2-16.5L887.7,502.3z"/>
<path class="st2" d="M867.6,480.2c-11.1,0-20.1,9.9-20.1,22.2h40.2C887.7,490.1,878.7,480.2,867.6,480.2L867.6,480.2z"/>
<rect x="645.6" y="182.4" class="st0" width="11.8" height="359.5"/>
<path class="st0" d="M651.5,480.2c-11.1,0-20.1,9.9-20.1,22.2h40.2C671.6,490.1,662.6,480.2,651.5,480.2z"/>
<path class="st0" d="M671.6,502.3h-40.2l-19.7,66.9c-2.8,6.1-0.8,16.5,3.2,16.5h73.8c4,0,6-10.4,3.2-16.5L671.6,502.3z"/>
<path class="st2" d="M651.5,480.2c-11.1,0-20.1,9.9-20.1,22.2h40.2C671.6,490.1,662.6,480.2,651.5,480.2z"/>
<rect x="429.6" y="182.4" class="st0" width="11.8" height="359.5"/>
<path class="st0" d="M435.5,480.2c-11.1,0-20.1,9.9-20.1,22.2h40.2C455.5,490.1,446.5,480.2,435.5,480.2z"/>
<path class="st0" d="M455.5,502.3h-40.2l-19.7,66.9c-2.8,6.1-0.8,16.5,3.1,16.5h73.9c4,0,6-10.4,3.1-16.5L455.5,502.3z"/>
<path class="st2" d="M435.5,480.2c-11.1,0-20.1,9.9-20.1,22.2h40.2C455.5,490.1,446.5,480.2,435.5,480.2z"/>
<g id="Facebook">
<path id="Shape-214" class="st0" d="M275.6,927h375l47.8,0.1L665.6,876c-2.9-2.4-4.6-5.9-4.7-9.6V737.3
c0-12.3-12.1-22.3-26.9-22.3H275.6c-14.8,0-26.9,10-26.9,22.3v167.5C248.7,917,260.8,927,275.6,927z"/>
<path id="Shape-216" class="st2" d="M461.1,789.9h-92.9c-6.7-0.2-11.9-5.7-11.7-12.4c0.2-6.4,5.3-11.5,11.7-11.7h92.9
c6.7,0.2,11.9,5.7,11.7,12.4C472.6,784.6,467.5,789.7,461.1,789.9L461.1,789.9z"/>
<path id="Shape-217" class="st2" d="M461.1,829H294.3c-6.7-0.2-11.9-5.7-11.7-12.4c0.2-6.4,5.3-11.5,11.7-11.7h166.8
c6.7,0.2,11.9,5.7,11.7,12.4C472.6,823.7,467.5,828.8,461.1,829z"/>
<path id="Shape-218" class="st2" d="M460.4,867.8H293.6c-6.7,0-12.1-5.4-12.1-12c0-6.7,5.4-12.1,12-12.1l0,0h166.8
c6.7,0,12,5.4,12,12S467.1,867.8,460.4,867.8L460.4,867.8z"/>
</g>
<g id="Shape-19" class="st3">
<path id="Path_831" class="st4" d="M563.8,761.9c-30.1,0-54.5,24.4-54.5,54.4c0,9.8,2.6,19.4,7.6,27.8l-6.9,27.7l27.3-7.9
c26.3,14.6,59.5,5.1,74-21.2c14.6-26.3,5.1-59.5-21.2-74C582.2,764.3,573.1,761.9,563.8,761.9L563.8,761.9z M564.5,861.8
c-9.2,0-18.1-2.8-25.6-8l-15.5,4.5l4-16c-14.2-20.5-9-48.7,11.5-62.9s48.7-9,62.9,11.5s9,48.7-11.5,62.9
C582.6,859,573.7,861.8,564.5,861.8L564.5,861.8z"/>
<path id="Path_832" class="st4" d="M550.1,812.1l1.9-2.2c1.1-1.2,2.7-2.4,2.7-4.2c0-1.7-0.4-3.4-1.1-4.9l-1.2-3
c-0.6-1.9-1.5-3.8-2.6-5.4c-1.5-1.4-3.7-1.8-5.5-0.9c0,0-10.7,5.1-7.4,15.4c4.9,18.1,19.9,31.7,38.4,34.9c0,0,11.5,1.7,14.6-5.3
c0.7-1.7,1.1-3.5,1-5.3c-0.2-1.5-1.2-2.8-2.5-3.4c-1.7-1-3.2-1.9-5.1-2.8c-1.7-0.8-3.6-2-5.5-1.5c-1.3,0.6-2.5,1.5-3.4,2.7
c-1.3,1.3-2.5,2.6-3.8,3.9C570.6,830.2,554.4,824.2,550.1,812.1z"/>
</g>
<g id="_编组_">
<rect x="1536.7" y="1281.5" class="st0" width="264.6" height="358.5"/>
<rect x="1536.7" y="1281.5" class="st5" width="264.6" height="358.5"/>
<rect x="1565.7" y="1304.5" class="st6" width="206.7" height="70.5"/>
<path class="st0" d="M1691.4,1339.7c0,2.2-1,4-2.3,4H1649c-1.3,0-2.3-1.8-2.3-4l0,0c0-2.2,1-4,2.3-4h40.2
C1690.4,1335.7,1691.4,1337.5,1691.4,1339.7L1691.4,1339.7z"/>
<rect x="1565.7" y="1385.7" class="st6" width="206.7" height="70.5"/>
<path class="st0" d="M1691.4,1423.6c0,2.2-1,4-2.3,4H1649c-1.3,0-2.3-1.8-2.3-4l0,0c0-2.2,1-4,2.3-4h40.2
C1690.4,1419.6,1691.4,1421.4,1691.4,1423.6L1691.4,1423.6z"/>
<rect x="1565.7" y="1466.9" class="st6" width="206.7" height="70.5"/>
<path class="st0" d="M1691.4,1504.2c0,2.2-1,4-2.3,4H1649c-1.3,0-2.3-1.8-2.3-4l0,0c0-2.2,1-4,2.3-4h40.2
C1690.4,1500.2,1691.4,1502,1691.4,1504.2L1691.4,1504.2z"/>
<rect x="1565.7" y="1548.2" class="st6" width="206.7" height="70.5"/>
<path class="st0" d="M1691.4,1585.4c0,2.2-1,4-2.3,4H1649c-1.3,0-2.3-1.8-2.3-4l0,0c0-2.2,1-4,2.3-4h40.2
C1690.4,1581.4,1691.4,1583.2,1691.4,1585.4L1691.4,1585.4z"/>
</g>
<rect x="1157.8" y="440.8" class="st7" width="433.8" height="596.7"/>
<rect x="1157.8" y="440.8" class="st8" width="433.8" height="596.7"/>
<polygon class="st0" points="1265,851.3 1265,722 1244.4,722 1212.5,722 1212.5,851.3 "/>
<polygon class="st0" points="1158.4,922.4 1178.4,922.4 1178.4,975.2 1211.9,975.2 1211.9,925.4 1195.5,925.4 1195.5,722
1158.4,722 1157.8,720.9 1157.8,842.6 1158.4,842.6 "/>
<polygon class="st0" points="1212.5,851.3 1211.9,851.3 1211.9,925.4 1211.9,975.2 1215.8,975.2 1215.8,940.4 1275.3,940.4
1275.3,916.5 1304.4,916.5 1304.4,851.3 1275.7,851.3 1265,851.3 "/>
<polygon class="st0" points="1334.8,1014.6 1384.4,1014.6 1384.4,869.2 1416.7,869.2 1416.7,825.9 1324.2,825.9 1324.2,916.5
1334.8,916.5 "/>
<polygon class="st0" points="1556.1,951.2 1566.5,951.2 1566.5,1013.5 1590.8,1013.5 1590.8,990.7 1591.6,990.7 1591.6,870
1556.1,870 "/>
<polygon class="st0" points="1477.1,1013.5 1489.4,1013.5 1489.4,951.2 1524.6,951.2 1524.6,813.8 1507.9,813.8 1499.5,813.8
1499.5,758.4 1440.5,758.4 1440.5,777 1440.5,951.2 1477.1,951.2 "/>
<polygon class="st0" points="1590.8,1013.5 1566.5,1013.5 1566.5,951.2 1556.1,951.2 1524.6,951.2 1489.4,951.2 1489.4,1013.5
1477.1,1013.5 1477.1,951.2 1440.5,951.2 1435.4,951.2 1435.4,1008.5 1435.4,1013.5 1426.1,1013.5 1426.1,1008.5 1426.1,869.2
1416.7,869.2 1384.4,869.2 1384.4,1014.6 1334.8,1014.6 1334.8,916.5 1324.2,916.5 1304.4,916.5 1275.3,916.5 1275.3,940.4
1215.8,940.4 1215.8,975.2 1211.9,975.2 1178.4,975.2 1178.4,922.4 1158.4,922.4 1157.8,922.4 1157.8,1036.5 1591.6,1036.5
1591.6,990.7 1590.8,990.7 "/>
<polygon class="st2" points="1265,851.3 1265,722 1244.4,722 1212.5,722 1212.5,851.3 "/>
<polygon class="st2" points="1158.4,922.4 1178.4,922.4 1178.4,975.2 1211.9,975.2 1211.9,925.4 1195.5,925.4 1195.5,722
1158.4,722 1157.8,720.9 1157.8,842.6 1158.4,842.6 "/>
<polygon class="st9" points="1212.5,851.3 1211.9,851.3 1211.9,925.4 1211.9,975.2 1215.8,975.2 1215.8,940.4 1275.3,940.4
1275.3,916.5 1304.4,916.5 1304.4,851.3 1275.7,851.3 1265,851.3 "/>
<polygon class="st9" points="1334.8,1014.6 1384.4,1014.6 1384.4,869.2 1416.7,869.2 1416.7,825.9 1324.2,825.9 1324.2,916.5
1334.8,916.5 "/>
<polygon class="st9" points="1556.1,951.2 1566.5,951.2 1566.5,1013.5 1590.8,1013.5 1590.8,990.7 1591.6,990.7 1591.6,870
1556.1,870 "/>
<polygon class="st2" points="1477.1,1013.5 1489.4,1013.5 1489.4,951.2 1524.6,951.2 1524.6,813.8 1507.9,813.8 1499.5,813.8
1499.5,758.4 1440.5,758.4 1440.5,777 1440.5,951.2 1477.1,951.2 "/>
<polygon class="st10" points="1590.8,1013.5 1566.5,1013.5 1566.5,951.2 1556.1,951.2 1524.6,951.2 1489.4,951.2 1489.4,1013.5
1477.1,1013.5 1477.1,951.2 1440.5,951.2 1435.4,951.2 1435.4,1008.5 1435.4,1013.5 1426.1,1013.5 1426.1,1008.5 1426.1,869.2
1416.7,869.2 1384.4,869.2 1384.4,1014.6 1334.8,1014.6 1334.8,916.5 1324.2,916.5 1304.4,916.5 1275.3,916.5 1275.3,940.4
1215.8,940.4 1215.8,975.2 1211.9,975.2 1178.4,975.2 1178.4,922.4 1158.4,922.4 1157.8,922.4 1157.8,1036.5 1591.6,1036.5
1591.6,990.7 1590.8,990.7 "/>
<path class="st0" d="M1135.2,421.5v635.4h479V421.5H1135.2z M1386,598.5h205.6v439H1386V598.5z M1386,440.8h205.6v141H1386V440.8z
M1157.8,598.5h205.6v439.1h-205.6V598.5z M1157.8,440.8h205.6v141h-205.6V440.8z"/>
<path class="st0" d="M1487.4,469.4c15.1,13.5,16.4,36.7,2.9,51.8s-36.7,16.4-51.8,2.9c-2.1-1.9-4-4.1-5.7-6.4
c4,23.3,26.1,39,49.4,35s39-26.1,35-49.4C1514.5,487.2,1502.9,474.1,1487.4,469.4z"/>
</g>
<g id="元素-摆件">
<path class="st7" d="M1513.4,1177.9c0,0,24.5-6.1,24-41C1537.4,1136.9,1517.3,1142.7,1513.4,1177.9z"/>
<path class="st11" d="M1513.4,1177.9c0,0,24.5-6.1,24-41C1537.4,1136.9,1517.3,1142.7,1513.4,1177.9z"/>
<path class="st7" d="M1517.3,1184.1c0,0,10.5-34.9-18.3-66C1499,1118,1491.2,1147.3,1517.3,1184.1z"/>
<path class="st12" d="M1517.3,1184.1c0,0,10.5-34.9-18.3-66C1499,1118,1491.2,1147.3,1517.3,1184.1z"/>
<path class="st7" d="M1500.5,1168h35c0,0,19.5,19.5,4,43.6h-43.1C1481,1187.5,1500.5,1168,1500.5,1168z"/>
<polygon class="st7" points="1420.8,1211.7 1463,1211.7 1470.8,1127.4 1413,1127.4 "/>
<polygon class="st8" points="1420.8,1211.7 1463,1211.7 1470.8,1127.4 1413,1127.4 "/>
<polygon class="st7" points="1413.1,1122.3 1470.3,1122.3 1473.2,1131.3 1410.5,1131.3 "/>
</g>
<g id="元素-电脑">
<polygon class="st7" points="1186.4,1052.8 1250.2,1211.7 1186.2,1211.7 1152.8,1073.3 "/>
<g class="st13">
<polygon points="1186.4,1052.8 1250.2,1211.7 1186.2,1211.7 1152.8,1073.3 "/>
</g>
<polygon class="st7" points="1351.7,923.8 1362,937.1 1324.4,1162.7 996.7,1162.7 984,1148.4 "/>
<polygon class="st14" points="1351.7,923.8 1362,937.1 1324.4,1162.7 996.7,1162.7 984,1148.4 "/>
<polygon class="st7" points="984,1148.4 1312.1,1148.4 1351.7,923.8 1028.2,936.6 "/>
<polygon class="st8" points="984,1148.4 1312.1,1148.4 1351.7,923.8 1028.2,936.6 "/>
<rect x="865.7" y="1196.7" class="st7" width="278.7" height="15"/>
<polygon class="st0" points="993,1140.9 1303.7,1142.5 1344.6,928.9 1034.7,944.7 "/>
<polygon class="st15" points="1062.2,1079.5 1142.3,1078.6 1143.6,1072.5 1063.4,1073.5 "/>
<polygon class="st15" points="1059.4,1092.8 1139.5,1092.1 1140.8,1086.1 1060.7,1086.8 "/>
<polygon class="st15" points="1056.7,1106.1 1136.7,1105.7 1138,1099.6 1057.9,1100.1 "/>
<polygon class="st15" points="1093.5,1119.3 1133.9,1119.3 1135.2,1113.2 1094.8,1113.3 "/>
<g class="st16">
<path class="st17" d="M1261.4,1051.4l35.5-0.7c2.3-0.1,4.3-1.7,4.9-3.9l8.9-42.1c0.4-2.1-1.1-3.8-3.3-3.7l-35.6,1.1
c-2.3,0.1-4.2,1.7-4.8,3.9l-8.7,41.6c-0.4,1.6,0.6,3.2,2.2,3.6C1260.7,1051.4,1261.1,1051.4,1261.4,1051.4z"/>
<polygon class="st17" points="1171.6,1011.4 1256.5,1008.9 1257.8,1002.7 1172.8,1005.3 "/>
<polygon class="st17" points="1168.7,1025.1 1253.6,1022.9 1254.9,1016.7 1170,1019 "/>
<polygon class="st17" points="1165.9,1038.8 1250.7,1036.9 1252,1030.7 1167.2,1032.7 "/>
<polygon class="st17" points="1204.9,1051.7 1247.7,1050.9 1249,1044.6 1206.2,1045.5 "/>
</g>
<g class="st16">
<path class="st17" d="M1026.3,1055.7l114.4-2.1c3.9-0.2,7.2-2.9,8.2-6.7l7.2-34.6c0.8-3.6-1.7-6.5-5.5-6.4l-114.8,3.6
c-3.7,0.3-6.9,2.9-7.7,6.5l-6.8,33.4c-0.7,2.7,1,5.4,3.6,6.1C1025.3,1055.7,1025.8,1055.7,1026.3,1055.7z"/>
</g>
<path class="st15" d="M1034.3,999.7l275.9-9.3c2-0.1,3.7-1.4,4.2-3.3l6.2-29.5c0.3-1.4-0.5-2.7-1.9-3c-0.3-0.1-0.6-0.1-0.9,0
l-276.7,11.8c-1.8,0.2-3.2,1.4-3.7,3.1l-5.6,27.4c-0.3,1.2,0.4,2.5,1.6,2.8C1033.8,999.7,1034.1,999.7,1034.3,999.7z"/>
<path class="st15" d="M1153.2,1125l124.8,0.1c4,0,7.9-3,8.7-6.7l10.9-51.4c0.6-2.8-1.4-5.1-4.5-5l-127.2,2c-2.9,0.1-5.5,2.1-6.2,5
l-10.6,51.1c-0.5,2.2,0.8,4.3,3,4.8C1152.4,1125,1152.8,1125,1153.2,1125z"/>
<path class="st0" d="M1209.6,1092.9c-1.4,6.7,3.1,12.1,10,12.1s13.8-5.5,15.2-12.3s-3.1-12.2-10.1-12.1S1211,1086.2,1209.6,1092.9z
"/>
<path class="st15" d="M1217.9,1095.3l1.2-5c0.3-1.1,1.4-1.7,2.4-1.4c0.1,0,0.2,0.1,0.3,0.1l3.6,2.6c0.9,0.6,0.6,2-0.6,2.7l-4.8,2.4
C1218.8,1097.2,1217.6,1096.5,1217.9,1095.3z"/>
<rect x="865.7" y="1196.7" class="st8" width="278.7" height="15"/>
</g>
<g id="元素-桌子">
<polygon class="st7" points="536.4,1639.7 522.8,1639.7 524.7,1245.3 546.7,1245.3 "/>
<polygon class="st7" points="1577.9,1639.7 1591.6,1639.7 1589.6,1245.3 1567.6,1245.3 "/>
<polygon class="st7" points="663.7,1639.7 650,1639.7 652,1245.3 674,1245.3 "/>
<polygon class="st7" points="1450.7,1639.7 1464.3,1639.7 1462.4,1245.3 1440.4,1245.3 "/>
<rect x="445.3" y="1211.7" class="st7" width="1223.7" height="33.7"/>
<g class="st13">
<polygon points="536.4,1639.7 522.8,1639.7 524.7,1245.3 546.7,1245.3 "/>
<g>
<polygon points="1577.9,1639.7 1591.6,1639.7 1589.6,1245.3 1567.6,1245.3 "/>
</g>
</g>
<g class="st13">
<polygon points="663.7,1639.7 650,1639.7 652,1245.3 674,1245.3 "/>
<g>
<polygon points="1450.7,1639.7 1464.3,1639.7 1462.4,1245.3 1440.4,1245.3 "/>
</g>
</g>
<rect x="445.3" y="1211.7" class="st14" width="1223.7" height="33.7"/>
</g>
<g id="人物-大卫">
<path class="st7" d="M912.7,1378.1l56.2,211.1l-32.2,9.6c0,0-106.8-172.9-108.4-214.7S912.7,1378.1,912.7,1378.1z"/>
<path class="st7" d="M936.7,1598.8l-2,40.8h104.7c0,0,0.6-7.7-7.3-14.1s-52-13.1-52-13.1l-11.2-23.3L936.7,1598.8z"/>
<path class="st18" d="M912.7,1378.1l56.2,211.1l-32.2,9.6c0,0-106.8-172.9-108.4-214.7S912.7,1378.1,912.7,1378.1z"/>
<path class="st8" d="M936.7,1598.8l-2,40.8h104.7c0,0,0.6-7.7-7.3-14.1s-52-13.1-52-13.1l-11.2-23.3L936.7,1598.8z"/>
<path class="st7" d="M799.6,1253.2l107,10.4c0,0,103.6,8.9,141.5,27.4s49.8,222.1,63.1,298.1l-32.2,9.6c0,0-86-174.7-81-235.9
c0,0-270.8,70.3-319.6,10.7s-35.2-79.1-35.2-79.1"/>
<path class="st7" d="M1079,1598.8l-2,40.8h104.7c0,0,0.6-7.7-7.3-14.1s-52-13.1-52-13.1l-11.2-23.3L1079,1598.8z"/>
<path class="st14" d="M799.6,1253.2l107,10.4c0,0,103.6,8.9,141.5,27.4s49.8,222.1,63.1,298.1l-32.2,9.6c0,0-86-174.7-81-235.9
c0,0-270.8,70.3-319.6,10.7s-35.2-79.1-35.2-79.1"/>
<path class="st8" d="M1079,1598.8l-2,40.8h104.7c0,0,0.6-7.7-7.3-14.1s-52-13.1-52-13.1l-11.2-23.3L1079,1598.8z"/>
<polygon class="st19" points="1003.3,1196.7 947.5,1196.7 787.9,1088.8 800.2,1026 "/>
<g class="st16">
<polygon points="1003.3,1196.7 947.5,1196.7 787.9,1088.8 800.2,1026 "/>
</g>
<path class="st7" d="M892.5,968.2c-22.7-5.7-34.2-26.1-34.2-26.1s-48.4,0.8-90.2,33.9s-128.8,107.9-128.8,328
c0,0,106.8-2.2,211.3-23.1s39.5-13.9,16.3-32.5s26.7,4.6,15.1-22.1s-7.4-117.1-1.5-128.7C880.5,1097.5,915.2,973.8,892.5,968.2z"/>
<g>
<g>
<g>
<defs>
<path id="SVGID_1_" d="M892.5,968.2c-22.7-5.7-34.2-26.1-34.2-26.1s-48.4,0.8-90.2,33.9s-128.8,107.9-128.8,328
c0,0,106.8-2.2,211.3-23.1s39.5-13.9,16.3-32.5s26.7,4.6,15.1-22.1s-7.4-117.1-1.5-128.7C880.5,1097.5,915.2,973.8,892.5,968.2
z"/>
</defs>
<clipPath id="SVGID_2_">
<use xlink:href="#SVGID_1_" style="overflow:visible;"/>
</clipPath>
<g class="st20">
<path class="st8" d="M795.5,958.7c0,0-52,54.8-57.8,126.4s16.3,75.6,60.4,91.6s17.1,8.7,1.2,31.7s-19.4,42.7,4.4,42.7
s0.9,32.1,33.1,32.2l0,0v22.1H643.2V973.6L795.5,958.7"/>
</g>
</g>
</g>
</g>
<path class="st8" d="M892.5,968.2c-22.7-5.7-34.2-26.1-34.2-26.1s-48.4,0.8-90.2,33.9s-128.8,107.9-128.8,328
c0,0,106.8-2.2,211.3-23.1s39.5-13.9,16.3-32.5s26.7,4.6,15.1-22.1s-7.4-117.1-1.5-128.7C880.5,1097.5,915.2,973.8,892.5,968.2z"/>
<path class="st19" d="M905.6,1025.5c1.2-2.4,4.1-3.3,6.5-2.2c0.5,0.3,1,0.6,1.4,1.1c23.5,26.2,127.9,141.4,157.1,150.1
c33,9.8,27.3-2.8,48,7c12,5.7,24,14.9,32,21.6c2,1.7,2.3,4.7,0.6,6.8c-0.9,1.1-2.3,1.7-3.7,1.7l-36.3-8.8l-27.9,8.8
c-17.5,0-34.5-5.6-48.6-15.9l-153.3-112.6c-1.9-1.4-2.5-3.9-1.5-6L905.6,1025.5z"/>
<path class="st19" d="M965.7,862.2c0,0-4.3,37,6.8,43.3c0,0-3.1,10.5-12.5,10.8c0,0-18.8,39.9-27.3,44.1s-27.6-12.3-27.6-12.3
l-15.1,36c0,0-33.3-8.5-40.7-22.8l13.1-26.8L888.6,816l67.2,6L965.7,862.2z"/>
<g>
<g>
<g>
<defs>
<path id="SVGID_3_" d="M965.7,862.2c0,0-4.3,37,6.8,43.3c0,0-3.1,10.5-12.5,10.8c0,0-18.8,39.9-27.3,44.1s-27.6-12.3-27.6-12.3
l-15.1,36c0,0-33.3-8.5-40.7-22.8l13.1-26.8L888.6,816l67.2,6L965.7,862.2z"/>
</defs>
<clipPath id="SVGID_4_">
<use xlink:href="#SVGID_3_" style="overflow:visible;"/>
</clipPath>
<g class="st21">
<path class="st5" d="M918.2,1016.7L905,948.2c0,0-29-24.7-33.3-39.2s-22.5,37.5-22.5,37.5L918.2,1016.7z"/>
<path class="st5" d="M963.1,943.8c0-1.4-1-2.5-2.4-2.6c-9.4,0.9-18.3-4.4-22-13c-0.6-1.2-2.1-1.7-3.3-1.1
c-1.2,0.7-1.6,2.2-1,3.3c4.5,10.2,15,16.5,26.2,15.7C961.9,946.2,963,945.1,963.1,943.8z"/>
</g>
</g>
</g>
</g>
<path class="st7" d="M866,792.5c0,0,10.6-32.3,55-23.2c35.7,7.3,28.6,38.9,55.3,34.1c19.1-3.5,24.7,21.7,14.8,28.4
c-11.7,8-33.4,16.9-52.3-0.2c0,0,0,31.9-21.6,44.4c0,0,4.5-28.8-8.4-31.1s-27.7,17.1-20.1,36.5s11.4,1.9,11.4,1.9
s2.7,43.7-37.8,51.3c0,0-50.9-93.6-31.2-124.9C846.2,785.7,866,792.5,866,792.5z"/>
<ellipse transform="matrix(0.1336 -0.991 0.991 0.1336 -44.5474 1706.592)" class="st7" cx="953.8" cy="878.8" rx="7.1" ry="2.9"/>
<path class="st7" d="M944.8,864.7c-1,0-1.8-0.8-1.8-1.8c0-0.7,0.4-1.3,0.9-1.6c0.4-0.2,9-4.7,16.7-0.5c0.8,0.6,0.9,1.7,0.3,2.5
c-0.5,0.6-1.3,0.8-2,0.6c-6-3.3-13.3,0.5-13.3,0.5C945.4,864.6,945.1,864.7,944.8,864.7z"/>
<path class="st7" d="M819.3,955.9c12-6.4,20.5-23.6,51.6,10c33.7,36.4,70.2,48,70.2,48s-41.4,70.6-57.7,83.2
c0,0-49.4-39.6-64.1-71.7S806.4,962.8,819.3,955.9z"/>
<path class="st18" d="M866,792.5c0,0,10.6-32.3,55-23.2c35.7,7.3,28.6,38.9,55.3,34.1c19.1-3.5,24.7,21.7,14.8,28.4
c-11.7,8-33.4,16.9-52.3-0.2c0,0,0,31.9-21.6,44.4c0,0,4.5-28.8-8.4-31.1s-27.7,17.1-20.1,36.5s11.4,1.9,11.4,1.9
s2.7,43.7-37.8,51.3c0,0-50.9-93.6-31.2-124.9C846.2,785.7,866,792.5,866,792.5z"/>
<ellipse transform="matrix(0.1336 -0.991 0.991 0.1336 -44.5474 1706.592)" class="st18" cx="953.8" cy="878.8" rx="7.1" ry="2.9"/>
<path class="st18" d="M944.8,864.7c-1,0-1.8-0.8-1.8-1.8c0-0.7,0.4-1.3,0.9-1.6c0.4-0.2,9-4.7,16.7-0.5c0.8,0.6,0.9,1.7,0.3,2.5
c-0.5,0.6-1.3,0.8-2,0.6c-6-3.3-13.3,0.5-13.3,0.5C945.4,864.6,945.1,864.7,944.8,864.7z"/>
</g>
<g id="元素-花盆">
<path class="st7" d="M306.7,1431.7c-1-24.1-2.1-48.2-0.9-72.3c0.8-14.9,3-31.1,13.9-41.2c10.1-9.5,25.4-11.4,36.5-19.6
c12.3-9.2,17.8-24.5,24.4-38.4s16.5-28.3,31.5-31s29.3,7.2,32,22.1c1.3,7.2-0.3,14.7-4.5,20.7c-7.5,10.7-22.7,16.6-24.7,29.5
c-2.5,15.4,16.1,29.5,10.9,44.1c-5.7,15.9-33.4,14.7-37.8,31c-4.3,16,19.5,29.1,16.2,45.4c-2.6,13.1-20.5,16.9-27,28.6
c-4.8,8.7-2.2,19.4-1.5,29.4c1.5,24-8.5,47.3-27,62.6c-8.2,6.7-19,11.7-29.1,8.7c-11.7-3.4-18.3-16.7-18.1-28.9
c0.3-13.4,7.6-24.6,7.7-37.9C309.4,1467,307.4,1449.1,306.7,1431.7z"/>
<path class="st8" d="M306.7,1431.7c-1-24.1-2.1-48.2-0.9-72.3c0.8-14.9,3-31.1,13.9-41.2c10.1-9.5,25.4-11.4,36.5-19.6
c12.3-9.2,17.8-24.5,24.4-38.4s16.5-28.3,31.5-31s29.3,7.2,32,22.1c1.3,7.2-0.3,14.7-4.5,20.7c-7.5,10.7-22.7,16.6-24.7,29.5
c-2.5,15.4,16.1,29.5,10.9,44.1c-5.7,15.9-33.4,14.7-37.8,31c-4.3,16,19.5,29.1,16.2,45.4c-2.6,13.1-20.5,16.9-27,28.6
c-4.8,8.7-2.2,19.4-1.5,29.4c1.5,24-8.5,47.3-27,62.6c-8.2,6.7-19,11.7-29.1,8.7c-11.7-3.4-18.3-16.7-18.1-28.9
c0.3-13.4,7.6-24.6,7.7-37.9C309.4,1467,307.4,1449.1,306.7,1431.7z"/>
<path class="st12" d="M379,1322.5c-9.3,17.4-18,35.1-24.7,53.6c-6.6,18.3-13.3,37.8-15.6,57.2c-0.4,3.6,5.1,4,6.1,0.8
c2.7-9,4.5-18.4,6.9-27.6c2.5-9.4,5.2-18.8,8.3-28c6.2-18.5,13-37,21.5-54.6C382.4,1322.3,379.9,1320.8,379,1322.5z"/>
<path class="st7" d="M295.6,1433.8c-34.4-6.4-62.4-37.9-64.8-72.8c-1.4-21.1,5.4-43.1-1.8-63c-4.6-12.6-14.3-22.6-22.6-33.2
s-15.7-23.2-14.4-36.6s27-24.7,39.4-19.6c-6.1-18.6-26.6-37.1-32-55.9s-7-39.7,1.7-57.2s29.9-29.6,48.3-23.1s25.9,35,10.2,46.8
c22,4.7,44.8,9.6,62.9,23s30.1,37.8,22.2,58.9c-7.1,19.1-29.1,36.2-20.9,54.8c6.6,15.1,29.6,18,35.2,33.6
c5.3,14.7-8.2,28.5-15.2,42.5c-10,19.9-6.6,43.7-3,65.7l11,67.2c4.5,27.4-2.4,91.7-45.5,66.8
C274.9,1513.7,274.3,1458.3,295.6,1433.8z"/>
<path class="st22" d="M295.6,1433.8c-34.4-6.4-62.4-37.9-64.8-72.8c-1.4-21.1,5.4-43.1-1.8-63c-4.6-12.6-14.3-22.6-22.6-33.2
s-15.7-23.2-14.4-36.6s27-24.7,39.4-19.6c-6.1-18.6-26.6-37.1-32-55.9s-7-39.7,1.7-57.2s29.9-29.6,48.3-23.1s25.9,35,10.2,46.8
c22,4.7,44.8,9.6,62.9,23s30.1,37.8,22.2,58.9c-7.1,19.1-29.1,36.2-20.9,54.8c6.6,15.1,29.6,18,35.2,33.6
c5.3,14.7-8.2,28.5-15.2,42.5c-10,19.9-6.6,43.7-3,65.7l11,67.2c4.5,27.4-2.4,91.7-45.5,66.8
C274.9,1513.7,274.3,1458.3,295.6,1433.8z"/>
<path class="st12" d="M324.8,1452.3c-2.8-24.1-8.5-47.6-15-71c-13.5-48.7-28.1-97-39.2-146.3c-6.1-27-9.3-55-20.8-80.4
c-0.5-1.2-2.2-0.2-1.7,1c10.4,23.7,11.7,49.5,15.9,74.7c4,24.1,10.7,47.6,18,70.9s15.2,46.6,21.7,70.3c6.7,23.9,11.4,48.4,14,73.1
c1.4,13.3,1.9,26.7,1.5,40c-0.2,6.4-0.7,12.9-1.5,19.3c-0.8,6.7-2.6,13.4-1.4,20.1c0.5,2.5,4.1,2.7,5.3,0.7
c3.1-5.1,3.5-11,4.1-16.9c0.6-6.2,1-12.3,1-18.5C326.9,1476.9,326.3,1464.6,324.8,1452.3z"/>
<path class="st12" d="M303.6,1197.6c0-0.6-0.5-1-1-1s-1,0.5-1,1c0.3,17.1-0.4,34.2-2,51.2c-1.3,14.2-0.5,31.8-10.5,43.2
c-3,3.4,2.2,7.6,5,3.9c9.1-12,9.3-28.4,10-42.8C304.9,1234.7,304.3,1216,303.6,1197.6z"/>
<path class="st12" d="M301,1344.9c-3.2-3.5-7.4-6.3-11.1-9.4s-6.9-6-10.3-9.2c-6.9-6.5-13.4-13.3-19.5-20.5
c-12.4-14.6-23.4-30.4-32.8-47.2c-0.9-1.5-3-0.2-2.3,1.3c8.3,17.5,18.8,33.8,31.3,48.6c6.2,7.4,12.9,14.5,19.9,21.1
c3.5,3.3,7.1,6.6,10.9,9.7c3.6,3,7.3,6.5,11.5,8.6c1,0.5,2.2,0,2.6-1C301.6,1346.3,301.5,1345.4,301,1344.9z"/>
<path class="st12" d="M311.3,1396.5c-7.7-3.8-15.5-6.8-22.8-11.4c-7.5-4.7-14.4-10.4-20.4-16.9c-1-1.1-2.6,0.5-1.7,1.7
c11,13.2,25.8,26.8,42.6,31.9C312.1,1402.7,314.2,1397.9,311.3,1396.5z"/>
<path class="st12" d="M326.9,1300.8c-0.1-3.6-5.4-3.6-5.6,0c-0.4,10.9-2.2,21.8-5.4,32.2c-1.6,5.2-3.5,10.2-5.7,15.1
c-2,4.4-5.6,9-5.9,14c-0.2,2.6,3.2,4.6,5.4,3.1c4.1-2.9,5.9-8.6,7.8-13.2c2.3-5.5,4.1-11.2,5.6-17
C325.8,1323.9,327.1,1312.4,326.9,1300.8z"/>
<polygon class="st23" points="364.6,1639.7 292.5,1639.7 278.6,1524.8 378.5,1524.8 "/>
<rect x="273.1" y="1515.7" class="st7" width="110.8" height="14.4"/>
<rect x="273.1" y="1515.7" class="st8" width="110.8" height="14.4"/>
</g>
<g id="元素-椅子">
<rect x="731.7" y="1404.5" class="st7" width="17.5" height="168.7"/>
<rect x="731.7" y="1404.5" class="st14" width="17.5" height="168.7"/>
<path class="st7" d="M555.9,1291.7l43.4,88.2h15.9l-36.2-71.7c-1.7-3.4-0.4-7.6,3.1-9.3c1-0.5,2-0.8,3.1-0.8h52.9
c7.6,0,13.7-6.1,13.7-13.7l0,0c0-7.6-6.1-13.7-13.7-13.7H569c-8,0-14.6,6.5-14.6,14.5C554.4,1287.4,554.9,1289.6,555.9,1291.7z"/>
<path class="st18" d="M555.9,1291.7l43.4,88.2h15.9l-36.2-71.7c-1.7-3.4-0.4-7.6,3.1-9.3c1-0.5,2-0.8,3.1-0.8h52.9
c7.6,0,13.7-6.1,13.7-13.7l0,0c0-7.6-6.1-13.7-13.7-13.7H569c-8,0-14.6,6.5-14.6,14.5C554.4,1287.4,554.9,1289.6,555.9,1291.7z"/>
<path class="st7" d="M810.4,1291.7l43.4,88.2h15.9l-36.2-71.7c-1.7-3.4-0.4-7.6,3.1-9.3c1-0.5,2-0.8,3.1-0.8h52.9
c7.6,0,13.7-6.1,13.7-13.7l0,0l0,0c0-7.6-6.1-13.7-13.7-13.7l0,0h-69.1c-8,0-14.5,6.5-14.5,14.5
C809,1287.4,809.5,1289.7,810.4,1291.7z"/>
<path class="st18" d="M810.4,1291.7l43.4,88.2h15.9l-36.2-71.7c-1.7-3.4-0.4-7.6,3.1-9.3c1-0.5,2-0.8,3.1-0.8h52.9
c7.6,0,13.7-6.1,13.7-13.7l0,0l0,0c0-7.6-6.1-13.7-13.7-13.7l0,0h-69.1c-8,0-14.5,6.5-14.5,14.5
C809,1287.4,809.5,1289.7,810.4,1291.7z"/>
<path class="st7" d="M879.1,1612.3L783,1597c-12.7-2-23-11.4-26.3-23.8h-31l-0.1,0.2v-0.1c-3.3,12.4-13.6,21.6-26.2,23.6
l-96.1,15.3c-6.1,1-10.5,6.2-10.5,12.3v4.4h296.9v-4.4C889.6,1618.4,885.2,1613.2,879.1,1612.3z"/>
<path class="st7" d="M900,1383.3l-3.3-13.3c-1.2-4.7-5.8-7.8-10.6-7l-26.3,4.1c0,0-150.1,19.6-262.2-2c-5.9-1.1-11.6,2.6-13,8.5
l-2.2,9.2c-1.4,6,2.3,12.1,8.3,13.6c0.2,0,0.3,0.1,0.5,0.1c13.5,2.7,81.8,26.9,149.9,25.9c75.6-1,150.9-27.4,150.9-27.4
c5.2-0.7,8.8-5.4,8.1-10.6C900.2,1384.1,900.1,1383.7,900,1383.3z"/>
<rect x="722.3" y="1465.1" class="st7" width="36.3" height="108.1"/>
<path class="st8" d="M879.1,1612.3L783,1597c-12.7-2-23-11.4-26.3-23.8h-31l-0.1,0.2v-0.1c-3.3,12.4-13.6,21.6-26.2,23.6
l-96.1,15.3c-6.1,1-10.5,6.2-10.5,12.3v4.4h296.9v-4.4C889.6,1618.4,885.2,1613.2,879.1,1612.3z"/>
<path class="st8" d="M900,1383.3l-3.3-13.3c-1.2-4.7-5.8-7.8-10.6-7l-26.3,4.1c0,0-150.1,19.6-262.2-2c-5.9-1.1-11.6,2.6-13,8.5
l-2.2,9.2c-1.4,6,2.3,12.1,8.3,13.6c0.2,0,0.3,0.1,0.5,0.1c13.5,2.7,81.8,26.9,149.9,25.9c75.6-1,150.9-27.4,150.9-27.4
c5.2-0.7,8.8-5.4,8.1-10.6C900.2,1384.1,900.1,1383.7,900,1383.3z"/>
<rect x="722.3" y="1465.1" class="st12" width="36.3" height="108.1"/>
<ellipse transform="matrix(0.6575 -0.7534 0.7534 0.6575 -1019.0623 1001.9923)" class="st7" cx="592.6" cy="1622" rx="17.7" ry="17.7"/>
<ellipse transform="matrix(0.7071 -0.7071 0.7071 0.7071 -886.3618 1104.1304)" class="st7" cx="889.6" cy="1622" rx="17.7" ry="17.7"/>
<g class="st3">
<ellipse transform="matrix(0.6575 -0.7534 0.7534 0.6575 -1019.0623 1001.9923)" cx="592.6" cy="1622" rx="17.7" ry="17.7"/>
<ellipse transform="matrix(0.7071 -0.7071 0.7071 0.7071 -886.3618 1104.1304)" cx="889.6" cy="1622" rx="17.7" ry="17.7"/>
</g>
<path class="st7" d="M683.7,1441.6H656c-2.4,0-4.3-1.9-4.3-4.3v-190.1c0-2.4,1.9-4.3,4.3-4.3h27.7c2.4,0,4.3,1.9,4.3,4.3v190.1
C688,1439.7,686.1,1441.6,683.7,1441.6z"/>
<path class="st14" d="M683.7,1441.6H656c-2.4,0-4.3-1.9-4.3-4.3v-190.1c0-2.4,1.9-4.3,4.3-4.3h27.7c2.4,0,4.3,1.9,4.3,4.3v190.1
C688,1439.7,686.1,1441.6,683.7,1441.6z"/>
<path class="st7" d="M714.7,1331.9h-78.6c-30,0-54.4-24.3-54.4-54.3v-0.1v-148.2c0-33.3,27-60.3,60.3-60.3l0,0h66.8
c33.3,0,60.3,27,60.3,60.3l0,0v148.2C769,1307.6,744.7,1331.9,714.7,1331.9z"/>
<path class="st8" d="M714.7,1331.9h-78.6c-30,0-54.4-24.3-54.4-54.3v-0.1v-148.2c0-33.3,27-60.3,60.3-60.3l0,0h66.8
c33.3,0,60.3,27,60.3,60.3l0,0v148.2C769,1307.6,744.7,1331.9,714.7,1331.9z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 26 KiB

BIN
src/assets/login/left1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 KiB

BIN
src/assets/login/left5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 KiB

View File

@ -0,0 +1,60 @@
<template>
<div>
<el-button v-for="d in data" :key="d.method" type="primary" @click="Fn(d.method)">{{ d.text }}</el-button>
</div>
</template>
<script>
import api from '@/api/public'
export default {
props: {
funid: {
type: String,
default: '' || 'sys_dept'
}
},
data() {
return {
data: []
}
},
created() {
this.getButtons()
},
methods: {
getButtons() {
api.getButtons(this.funid).then(data => {
if (data.success) {
this.data = data.data.buttons
} else {
this.$message.error(data.message)
}
})
},
Fn(method) {
this[method]()
},
editCreate() {
this.$emit('editCreate')
},
editDelete() {
this.$emit('editDelete')
},
editSave() {
this.$emit('editSave')
},
upload() {
this.$emit('upload')
}
}
}
</script>
<style lang="scss" scoped>
// .el-card {
// margin-top: 10px;
// }
</style>

View File

@ -28,7 +28,20 @@ router.beforeEach(async(to, from, next) => {
} else {
// determine whether the user has obtained his permission roles through getInfo
const hasRoles = store.getters.roles && store.getters.roles.length > 0
const sessionRoles = sessionStorage.getItem('ROLES')
if (hasRoles) {
// generate accessible routes map based on roles
const accessRoutes = await store.dispatch('permission/generateRoutes', store.getters.roles)
// dynamically add accessible routes
router.addRoutes(accessRoutes)
next()
} else if (sessionRoles) {
// generate accessible routes map based on roles
const accessRoutes = await store.dispatch('permission/generateRoutes', store.getters.roles)
// dynamically add accessible routes
router.addRoutes(accessRoutes)
next()
} else {
try {

View File

@ -83,18 +83,6 @@ export const constantRoutes = [
}
]
},
{
path: '/documentation',
component: Layout,
children: [
{
path: 'index',
component: () => import('@/views/documentation/index'),
name: 'Documentation',
meta: { title: 'Documentation', icon: 'documentation', affix: true }
}
]
},
{
path: '/guide',
component: Layout,

View File

@ -1,4 +1,4 @@
import { login, logout, getInfo } from '@/api/user'
import { login, getInfo } from '@/api/user'
import { getToken, setToken, removeToken } from '@/utils/auth'
import router, { resetRouter } from '@/router'
@ -33,13 +33,16 @@ const actions = {
login({ commit }, userInfo) {
const { username, password } = userInfo
return new Promise((resolve, reject) => {
login({ username: username.trim(), password: password }).then(response => {
const { data } = response
commit('SET_TOKEN', data.token)
setToken(data.token)
login(`funid=login&eventcode=login&pagetype=login&user_code=${username.trim()}&user_pass=${password}`).then(res => {
console.log(res.data.data, 'res')
commit('SET_ROLES', res.data.data.role_id)
// const { data } = res.data
commit('SET_TOKEN', '123')
setToken('123')
sessionStorage.setItem('ROLES', res.data.data.role_id)
resolve()
}).catch(error => {
reject(error)
}).catch(err => {
reject(err)
})
})
},
@ -75,20 +78,21 @@ const actions = {
// user logout
logout({ commit, state, dispatch }) {
return new Promise((resolve, reject) => {
logout(state.token).then(() => {
commit('SET_TOKEN', '')
commit('SET_ROLES', [])
removeToken()
resetRouter()
// logout(state.token).then(() => {
commit('SET_TOKEN', '')
commit('SET_ROLES', [])
sessionStorage.clear
removeToken()
resetRouter()
// reset visited views and cached views
// to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2485
dispatch('tagsView/delAllViews', null, { root: true })
// reset visited views and cached views
// to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2485
dispatch('tagsView/delAllViews', null, { root: true })
resolve()
}).catch(error => {
reject(error)
})
resolve()
// }).catch(error => {
// reject(error)
// })
})
},

View File

@ -5,7 +5,7 @@ import { getToken } from '@/utils/auth'
// create an axios instance
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
baseURL: '/bwhse', // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
timeout: 5000 // request timeout
})
@ -43,10 +43,9 @@ service.interceptors.response.use(
* You can also judge the status by HTTP Status Code
*/
response => {
const res = response.data
const res = response
// if the custom code is not 20000, it is judged as an error.
if (res.code !== 20000) {
if (res.status !== 200) {
Message({
message: res.message || 'Error',
type: 'error',

View File

@ -0,0 +1,11 @@
import request from '@/utils/request'
export default {
getDept() {
return request({
url: `/commonAction.do?eventcode=query_data&funid=queryevent&pagetype=editgrid&query_funid=sys_dept&user_id=administrator`,
method: 'post',
data: `start=0&limit=50&where_sql=&where_value=&where_type=&is_query=1&query_type=0`
}).then(response => response.data)
}
}

View File

@ -1,36 +1,115 @@
<template>
<div class="app-container">
<aside>
The guide page is useful for some people who entered the project for the first time. You can briefly introduce the
features of the project. Demo is based on
<a href="https://github.com/kamranahmedse/driver.js" target="_blank">driver.js.</a>
</aside>
<el-button icon="el-icon-question" type="primary" @click.prevent.stop="guide">
Show Guide
</el-button>
<buttons funid="sys_dept" @editCreate="editCreate" @editDelete="editDelete" @editSave="editSave" @upload="upload" />
<el-card>
<el-table
ref="deptTable"
v-loading="loading"
:data="data"
style="width: 100%"
@cell-dblclick="cellDblclick"
>
<template v-for="(d,i) in tableHeader">
<el-table-column
:key="i"
:prop="d.prop"
:label="d.label"
>
<template slot-scope="scope">
<div v-if="d.label==='是否注销'">
{{
scope.row.sys_dept__is_novalid == 0 ? '否' : '是'
}}
</div>
<div v-else>{{ scope.row[d.prop] }}</div>
</template>
</el-table-column>
</template>
</el-table>
<el-pagination
:current-page="pager.pageNo"
:page-sizes="[10, 30, 50, 100, 500]"
:page-size="pager.pageSize"
:total="pager.total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="sizeChange"
@current-change="pageChange"
/>
</el-card>
</div>
</template>
<script>
import Driver from 'driver.js' // import driver.js
import 'driver.js/dist/driver.min.css' // import driver.js css
import steps from './steps'
import api from './api'
import buttons from '@/components/Buttons'
export default {
name: 'Guide',
components: {
buttons
},
data() {
return {
driver: null
loading: false,
data: [],
pager: {
pageNo: 1,
pageSize: 10,
total: 0
},
tableHeader: [{
prop: 'sys_dept__dept_code',
label: '组织编码'
}, {
prop: 'sys_dept__dept_name',
label: '组织名称'
}, {
prop: 'sys_dept__memo',
label: '备注'
}, {
prop: 'sys_dept__is_novalid',
label: '是否注销'
}]
}
},
created() {
this.getDate()
},
mounted() {
this.driver = new Driver()
},
methods: {
guide() {
this.driver.defineSteps(steps)
this.driver.start()
}
getDate() {
this.loading = true
api.getDept().then(data => {
if (data.success) {
console.log(data)
this.data = data.data.root
setTimeout(() => {
this.loading = false
}, 200)
} else {
this.$message.error(data.message)
}
})
},
editCreate() {
console.log('editCreate')
},
editDelete() {
console.log('editDelete')
},
editSave() {
console.log('editSave')
},
upload() {
console.log('upload')
},
cellDblclick() {}
}
}
</script>
<style lang="scss" scoped>
.el-card {
margin-top: 10px;
}
</style>

View File

@ -1,85 +1,88 @@
<template>
<div class="login-container">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" autocomplete="on" label-position="left">
<div class="title-container">
<h3 class="title">Login Form</h3>
<div class="login-main">
<div class="login-left">
<!-- <img src="../../assets/login/left.jpg" class="img1"> -->
</div>
<div class="login-right">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
<div class="title-container">
<p>欢迎登录</p>
<span>Welcome to login</span>
</div>
<el-form-item prop="username">
<span class="svg-container">
<svg-icon icon-class="user" />
</span>
<el-input
ref="username"
v-model="loginForm.username"
placeholder="Username"
name="username"
type="text"
tabindex="1"
autocomplete="on"
/>
</el-form-item>
<el-form-item prop="username">
<span class="svg-container">
<svg-icon icon-class="user" />
</span>
<el-input
ref="username"
v-model="loginForm.username"
placeholder="请输入用户名"
name="username"
type="text"
tabindex="1"
auto-complete="on"
/>
</el-form-item>
<el-tooltip v-model="capsTooltip" content="Caps lock is On" placement="right" manual>
<el-form-item prop="password">
<span class="svg-container">
<svg-icon icon-class="password" />
</span>
<el-input
:key="passwordType"
ref="password"
v-model="loginForm.password"
:type="passwordType"
placeholder="Password"
name="password"
tabindex="2"
autocomplete="on"
@keyup.native="checkCapslock"
@blur="capsTooltip = false"
@keyup.enter.native="handleLogin"
/>
<span class="show-pwd" @click="showPwd">
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
</span>
</el-form-item>
</el-tooltip>
<el-form-item prop="password">
<span class="svg-container">
<svg-icon icon-class="password" />
</span>
<el-input
:key="passwordType"
ref="password"
v-model="loginForm.password"
:type="passwordType"
placeholder="请输入用户密码"
name="password"
tabindex="2"
auto-complete="on"
@keyup.enter.native="handleLogin"
/>
<span class="show-pwd" @click="showPwd">
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
</span>
</el-form-item>
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">Login</el-button>
<el-form-item prop="verification">
<span class="svg-container">
<svg-icon icon-class="guide" />
</span>
<el-input
ref="verification"
v-model="loginForm.verification"
placeholder="请输入验证码"
name="verification"
type="text"
tabindex="1"
auto-complete="on"
/>
</el-form-item>
<div style="position:relative">
<div class="tips">
<span>Username : admin</span>
<span>Password : any</span>
</div>
<div class="tips">
<span style="margin-right:18px;">Username : editor</span>
<span>Password : any</span>
</div>
<div class="password-manage">
<el-checkbox v-model="checked">记住密码</el-checkbox>
</div>
<el-button class="thirdparty-button" type="primary" @click="showDialog=true">
Or connect with
</el-button>
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin"> </el-button>
<!-- <div class="tips">
<span style="margin-right:20px;">username: admin</span>
<span> password: any</span>
</div> -->
</el-form>
</div>
</el-form>
<el-dialog title="Or connect with" :visible.sync="showDialog">
Can not be simulated on local, so please combine you own business simulation! ! !
<br>
<br>
<br>
<social-sign />
</el-dialog>
</div>
</div>
</template>
<script>
import { validUsername } from '@/utils/validate'
import SocialSign from './components/SocialSignin'
export default {
name: 'Login',
components: { SocialSign },
data() {
const validateUsername = (rule, value, callback) => {
if (!validUsername(value)) {
@ -89,7 +92,7 @@ export default {
}
}
const validatePassword = (rule, value, callback) => {
if (value.length < 6) {
if (value.length < 3) {
callback(new Error('The password can not be less than 6 digits'))
} else {
callback()
@ -98,7 +101,7 @@ export default {
return {
loginForm: {
username: 'admin',
password: '111111'
password: '888'
},
loginRules: {
username: [{ required: true, trigger: 'blur', validator: validateUsername }],
@ -107,9 +110,9 @@ export default {
passwordType: 'password',
capsTooltip: false,
loading: false,
showDialog: false,
redirect: undefined,
otherQuery: {}
otherQuery: {},
checked: false
}
},
watch: {
@ -158,7 +161,7 @@ export default {
this.loading = true
this.$store.dispatch('user/login', this.loginForm)
.then(() => {
this.$router.push({ path: this.redirect || '/', query: this.otherQuery })
this.$router.push({ path: '/', query: this.otherQuery })
this.loading = false
})
.catch(() => {
@ -178,24 +181,6 @@ export default {
return acc
}, {})
}
// afterQRScan() {
// if (e.key === 'x-admin-oauth-code') {
// const code = getQueryObject(e.newValue)
// const codeMap = {
// wechat: 'code',
// tencent: 'code'
// }
// const type = codeMap[this.auth_type]
// const codeName = code[type]
// if (codeName) {
// this.$store.dispatch('LoginByThirdparty', codeName).then(() => {
// this.$router.push({ path: this.redirect || '/' })
// })
// } else {
// alert('')
// }
// }
// }
}
}
</script>
@ -204,18 +189,23 @@ export default {
/* 修复input 背景不协调 和光标变色 */
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
$bg:#283443;
$bg:#F6F6F6;
$light_gray:#fff;
$cursor: #fff;
$cursor: #000;
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
.login-container .el-input input {
height: 31px !important;
color: $cursor;
}
}
/* reset element-ui css */
.login-container {
background-color: #F1F7FC !important;
width:100%;
height:100%;
background-size:100% 100%;
.el-input {
display: inline-block;
height: 47px;
@ -227,10 +217,8 @@ $cursor: #fff;
-webkit-appearance: none;
border-radius: 0px;
padding: 12px 5px 12px 15px;
color: $light_gray;
color: #000;
height: 47px;
caret-color: $cursor;
&:-webkit-autofill {
box-shadow: 0 0 0px 1000px $bg inset !important;
-webkit-text-fill-color: $cursor !important;
@ -239,8 +227,8 @@ $cursor: #fff;
}
.el-form-item {
border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(0, 0, 0, 0.1);
border: 1px solid #c1c1c1;
background:#F6F6F6;
border-radius: 5px;
color: #454545;
}
@ -248,23 +236,53 @@ $cursor: #fff;
</style>
<style lang="scss" scoped>
$bg:#2d3a4b;
$bg:#fff;
$dark_gray:#889aa4;
$light_gray:#eee;
.login-container .login-form {
background-color: #ffffff !important;
}
.login-container {
min-height: 100%;
width: 100%;
background-color: $bg;
overflow: hidden;
.login-form {
position: relative;
width: 520px;
max-width: 100%;
padding: 160px 35px 0;
// background-image: url('../../assets/login/background.jpg');
// background-image: url('../../assets/login/wangge.jpg');
.login-main {
width: 800px;
height: 450px;
display: flex;
margin: 0 auto;
overflow: hidden;
transform: translate(-50%,-50%);
position: absolute;
top: 50%;
left: 50%;
.login-left {
width: 400px;
height: 450px;
border-radius: 10px 0 0 10px;
background-color: #1890ff;
background-image: url('../../assets/login/left.svg');
background-size: 100%;
background-repeat: no-repeat;
background-position: 100% 80%;
.img1 {
width: 400px;
height: 450px;
// margin-left: 59px;
// margin-top: 54px;
}
}
.login-right {
width: 400px;
height: 450px;
border-radius:0 10px 10px 0;
padding: 20px 35px 20px;
margin: 0 auto;
background-color: #ffffff;
}
}
.tips {
@ -280,7 +298,7 @@ $light_gray:#eee;
}
.svg-container {
padding: 6px 5px 6px 15px;
padding: 0px 5px 6px 15px;
color: $dark_gray;
vertical-align: middle;
width: 30px;
@ -288,37 +306,60 @@ $light_gray:#eee;
}
.title-container {
position: relative;
.title {
font-size: 26px;
color: $light_gray;
margin: 0px auto 40px auto;
text-align: center;
font-weight: bold;
display: flex;
flex-direction: column;
margin-bottom: 20px;
p {
margin-bottom: 10px;
font-size: 22px;
color: #000;
}
span{
font-size: 16px;
color: #bdc2c7;
}
}
.show-pwd {
position: absolute;
right: 10px;
top: 7px;
font-size: 16px;
color: $dark_gray;
cursor: pointer;
user-select: none;
}
.thirdparty-button {
position: absolute;
right: 0;
bottom: 6px;
}
@media only screen and (max-width: 470px) {
.thirdparty-button {
display: none;
.header {
background: $bg;
padding: 8px 0;
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.16);
img {
width: 125px;
height: 52px;
margin-left: 230px;
}
}
.password-manage {
margin-bottom: 20px;
transform: translate(0, -2px);
}
.el-input--mini {
font-size: 16px
}
.el-button--primary {
font-size: 18px;
font-weight: bold;
}
.el-form-item {
margin-bottom: 28px !important;
}
::v-deep .el-form-item__error {
margin-top: 6px;
}
::v-deep .el-form-item__content {
height: 38px;
}
.el-button--medium {
border-radius: 10px;
}
}
</style>

View File

@ -30,13 +30,33 @@ module.exports = {
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,
devServer: {
hot: true,
port: port,
open: true,
overlay: {
warnings: false,
errors: true
},
before: require('./mock/mock-server.js')
proxy: {
'/bwhse': {
target: 'http://localhost:8088',
ws: false,
changeOrigin: true,
pathRewrite: { '^/bwhse': '/bwhse' }
}
}
// proxy: {
// // change xxx-api/login => mock/login
// // detail: https://cli.vuejs.org/config/#devserver-proxy
// [process.env.VUE_APP_BASE_API]: {
// target: `http://127.0.0.1:${port}/mock`,
// changeOrigin: true,
// pathRewrite: {
// ['^' + process.env.VUE_APP_BASE_API]: ''
// }
// }
// },
// before: require('./mock/mock-server.js')
},
configureWebpack: {
// provide the app's title in webpack's name field, so that