Squashed commit of the following:

commit fab0c5019d90974760c49aaa36af8361658b4b21
Author: sc <shencheng@heronshn.com>
Date:   Tue Aug 24 14:54:53 2021 +0800

    更改版本号 1.2.2

commit 8c47aad10f7c0e9b61ed87bb68cf512134afc29b
Author: sc <shencheng@heronshn.com>
Date:   Mon Aug 23 16:05:10 2021 +0800

    更改SVGMAP模板

commit 9acfb2ebd2454e864ec76640bbc301675bf9b48b
Author: sc <shencheng@heronshn.com>
Date:   Mon Aug 23 13:24:52 2021 +0800

    Update fix.scss

commit b6367361ab5e2061d6a747b7d9342202f6c75be2
Author: sakuya <81883387@qq.com>
Date:   Mon Aug 23 00:21:48 2021 +0800

    UP

commit e8bef8834f37161a80aad82d49fa02949b603f30
Author: sakuya <81883387@qq.com>
Date:   Sun Aug 22 20:24:28 2021 +0800

    UP

commit 280eb183979fc2b898ce5dd3f7ec172f72dbff5d
Author: sakuya <81883387@qq.com>
Date:   Sat Aug 21 20:44:41 2021 +0800

    Update demo.js

commit be40b82d8fd85fab60dadbab1fbe57c0076f2b71
Author: sc <shencheng@heronshn.com>
Date:   Sat Aug 21 16:17:08 2021 +0800

    UP

commit 364225c94324c95169fad52c5482003002140773
Author: sc <shencheng@heronshn.com>
Date:   Sat Aug 21 10:24:33 2021 +0800

    UP

commit bc02766d5d075771f44c4dc633b1fd5916a7c05a
Author: sakuya <81883387@qq.com>
Date:   Fri Aug 20 23:35:00 2021 +0800

    up

commit 7f8d67941b11a66f22ab5dbad469a27de0db12d8
Author: sc <shencheng@heronshn.com>
Date:   Fri Aug 20 17:08:39 2021 +0800

    UP
This commit is contained in:
sc 2021-08-25 08:42:05 +08:00
parent f1a9d076ef
commit a2d6b50975
54 changed files with 657 additions and 1267 deletions

View File

@ -1,6 +1,6 @@
{
"name": "scui",
"version": "1.2.1",
"version": "1.2.2",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
@ -14,7 +14,7 @@
"cropperjs": "1.5.12",
"crypto-js": "4.1.1",
"echarts": "5.1.2",
"element-plus": "1.0.2-beta.70",
"element-plus": "1.0.2-beta.71",
"nprogress": "0.2.0",
"sortablejs": "1.14.0",
"tinymce": "5.8.2",

View File

@ -1,634 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="299.64594mm"
height="212.72501mm"
viewBox="0 0 299.64594 212.72501"
version="1.1"
id="svg600"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
sodipodi:docname="floorplan.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview602"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="1.0179639"
inkscape:cx="536.36478"
inkscape:cy="376.24123"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="layer2" />
<defs
id="defs597" />
<g
inkscape:label="背景"
inkscape:groupmode="layer"
id="layer1"
transform="translate(18.231384,26.966463)"
sodipodi:insensitive="true">
<image
preserveAspectRatio="none"
inkscape:svg-dpi="96"
width="299.64594"
height="212.72501"
xlink:href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRw
Oi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWxuczpldj0iaHR0cDovL3d3dy53My5vcmcvMjAw
MS94bWwtZXZlbnRzIiB3aWR0aD0iMTEzMi41MTk2ODUwMzkzNzAyIiBoZWlnaHQ9IjgwNCIgdmll
d0JveD0i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IxOSI+PGRpdiB4bWxucz0i
aHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCIgc3BlbGxjaGVjaz0iZmFsc2UiIHN0eWxlPSJm
b250LWZhbWlseTogJnF1b3Q7SGVsdmV0aWNhIE5ldWUmcXVvdDssIEhlbHZldGljYSwgJnF1b3Q7
UGluZ0ZhbmcgU0MmcXVvdDssICZxdW90O0hpcmFnaW5vIFNhbnMgR0ImcXVvdDssICZxdW90O01p
Y3Jvc29mdCBZYUhlaSZxdW90OywgJnF1b3Q7XDUgRkFFOEY2Rjk2QzU5RUQxJnF1b3Q7LCBBcmlh
bCwgc2Fucy1zZXJpZjsgZm9udC1zaXplOiAxMnB0OyBtYXJnaW46IDBweDsgcGFkZGluZzogMHB4
OyB3aWR0aDogYXV0bzsgaGVpZ2h0OiBhdXRvOyBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVu
dDsgd2hpdGUtc3BhY2U6IHByZS13cmFwOyB3b3JkLWJyZWFrOiBicmVhay13b3JkOyBtaW4td2lk
dGg6IDEycHg7IGxpbmUtaGVpZ2h0OiAxMDAlOyI+PHAgc3R5bGU9InBhZGRpbmc6IDBweDsgbWFy
Z2luOiAwcHg7IHRleHQtYWxpZ246IGNlbnRlcjsgbGluZS1oZWlnaHQ6IDEuMjsiPjxzcGFuIHN0
eWxlPSJjb2xvcjogcmdiKDAsIDAsIDApOyBmb250LWZhbWlseTogQXJpYWw7IGZvbnQtc2l6ZTog
MTBwdDsiPjc0MCBtbSB4IDc0MCBtbTwvc3Bhbj48L3A+PC9kaXY+PC9mb3JlaWduT2JqZWN0Pjwv
Zz48L2c+PC9zdmc+
"
id="image928"
x="-18.231384"
y="-26.966463" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="活动">
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144"
width="19.883444"
height="9.8767414"
x="22.872456"
y="21.572886"
name="c1" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-3"
width="19.883444"
height="9.8767414"
x="43.285065"
y="21.572884"
name="c2" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-3-8"
width="19.883444"
height="9.8767414"
x="63.697678"
y="21.572884"
name="c3" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-7"
width="19.883444"
height="9.8767414"
x="230.81476"
y="46.26474"
name="c13" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-3-2"
width="19.883444"
height="9.8767414"
x="251.22736"
y="46.26474"
name="c14" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-7-1"
width="19.883444"
height="9.8767414"
x="230.81474"
y="66.724815"
name="c15" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-3-2-0"
width="19.883444"
height="9.8767414"
x="251.22736"
y="66.724815"
name="c16" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-7-1-0"
width="19.883444"
height="9.8767414"
x="230.81474"
y="87.184883"
name="c17" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-3-2-0-6"
width="19.883444"
height="9.8767414"
x="251.22736"
y="87.184883"
name="c18" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-3-7"
width="19.883444"
height="9.8767414"
x="84.110291"
y="21.572884"
name="c4" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-30"
width="19.883444"
height="9.8767414"
x="22.872452"
y="42.032963"
name="c5" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-3-85"
width="19.883444"
height="9.8767414"
x="43.285065"
y="42.032959"
name="c6" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-3-8-8"
width="19.883444"
height="9.8767414"
x="63.697678"
y="42.032959"
name="c7" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-3-7-5"
width="19.883444"
height="9.8767414"
x="84.110291"
y="42.032959"
name="c8" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-30-8"
width="19.883444"
height="9.8767414"
x="22.872452"
y="62.493038"
name="c9" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-3-85-8"
width="19.883444"
height="9.8767414"
x="43.285065"
y="62.493034"
name="c10" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-3-8-8-5"
width="19.883444"
height="9.8767414"
x="63.697678"
y="62.493034"
name="c11" />
<rect
style="fill:#c0e1ff;fill-opacity:1;stroke-width:0.264583"
id="rect4144-3-7-5-8"
width="19.883444"
height="9.8767414"
x="84.110291"
y="62.493034"
name="c12" />
<rect
style="fill:#f1c6ff;fill-opacity:1;stroke-width:0.264583"
id="rect5074"
width="27.290987"
height="31.969456"
x="188.43784"
y="44.965168"
ry="0"
name="w2" />
<rect
style="fill:#f1c6ff;fill-opacity:1;stroke-width:0.364245"
id="rect5074-9"
width="51.722927"
height="31.969456"
x="131.42323"
y="44.965168"
ry="0"
name="w1" />
<rect
style="fill:#fdffd6;fill-opacity:1;stroke-width:0.264583"
id="rect8224"
width="189.99733"
height="82.652733"
x="23.670876"
y="90.171577" />
<rect
style="fill:#fdffd6;fill-opacity:1;stroke-width:0.0951715"
id="rect8224-5"
width="40.296066"
height="50.423363"
x="230.81474"
y="105.52826" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="text"
sodipodi:insensitive="true">
<text
xml:space="preserve"
style="font-size:5.29167px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="108.38425"
y="133.0761"
id="text11193"><tspan
sodipodi:role="line"
id="tspan11191"
style="stroke-width:0.264583"
x="108.38425"
y="133.0761">自由区域</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="29.411499"
y="28.185244"
id="text11193-62"><tspan
sodipodi:role="line"
id="tspan11191-2"
style="font-size:4.23333px;stroke-width:0.264583"
x="29.411499"
y="28.185244">C1</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="50.581127"
y="28.188059"
id="text11193-62-8"><tspan
sodipodi:role="line"
id="tspan11191-2-9"
style="font-size:4.23333px;stroke-width:0.264583"
x="50.581127"
y="28.188059">C2</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="71.010658"
y="28.184269"
id="text11193-62-8-0"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4"
style="font-size:4.23333px;stroke-width:0.264583"
x="71.010658"
y="28.184269">C3</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="91.305672"
y="28.310093"
id="text11193-62-8-0-9"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6"
style="font-size:4.23333px;stroke-width:0.264583"
x="91.305672"
y="28.310093">C4</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="29.598299"
y="48.496536"
id="text11193-62-8-0-9-1"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6-4"
style="font-size:4.23333px;stroke-width:0.264583"
x="29.598299"
y="48.496536">C5</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="50.23"
y="48.584297"
id="text11193-62-8-0-9-1-1"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6-4-3"
style="font-size:4.23333px;stroke-width:0.264583"
x="50.23"
y="48.584297">C6</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="70.59523"
y="48.493435"
id="text11193-62-8-0-9-1-1-4"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6-4-3-1"
style="font-size:4.23333px;stroke-width:0.264583"
x="70.59523"
y="48.493435">C7</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="91.381783"
y="48.772217"
id="text11193-62-8-0-9-1-1-4-8"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6-4-3-1-3"
style="font-size:4.23333px;stroke-width:0.264583"
x="91.381783"
y="48.772217">C8</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="30.173429"
y="68.9888"
id="text11193-62-8-0-9-1-1-4-8-5"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6-4-3-1-3-8"
style="font-size:4.23333px;stroke-width:0.264583"
x="30.173429"
y="68.9888">C9</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="49.484516"
y="68.989838"
id="text11193-62-8-0-9-1-1-4-8-5-6"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6-4-3-1-3-8-9"
style="font-size:4.23333px;stroke-width:0.264583"
x="49.484516"
y="68.989838">C10</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="69.090591"
y="68.98777"
id="text11193-62-8-0-9-1-1-4-8-5-6-9"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6-4-3-1-3-8-9-5"
style="font-size:4.23333px;stroke-width:0.264583"
x="69.090591"
y="68.98777">C11</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="89.76458"
y="68.809151"
id="text11193-62-8-0-9-1-1-4-8-5-6-9-2"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6-4-3-1-3-8-9-5-0"
style="font-size:4.23333px;stroke-width:0.264583"
x="89.76458"
y="68.809151">C12</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="236.85486"
y="52.616207"
id="text11193-62-8-0-9-1-1-4-8-5-6-9-2-8"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6-4-3-1-3-8-9-5-0-3"
style="font-size:4.23333px;stroke-width:0.264583"
x="236.85486"
y="52.616207">C13</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="256.43509"
y="52.612076"
id="text11193-62-8-0-9-1-1-4-8-5-6-9-2-8-0"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6-4-3-1-3-8-9-5-0-3-8"
style="font-size:4.23333px;stroke-width:0.264583"
x="256.43509"
y="52.612076">C14</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="236.5598"
y="73.210281"
id="text11193-62-8-0-9-1-1-4-8-5-6-9-2-8-0-2"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6-4-3-1-3-8-9-5-0-3-8-5"
style="font-size:4.23333px;stroke-width:0.264583"
x="236.5598"
y="73.210281">C15</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="256.55576"
y="73.141167"
id="text11193-62-8-0-9-1-1-4-8-5-6-9-2-8-0-2-2"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6-4-3-1-3-8-9-5-0-3-8-5-4"
style="font-size:4.23333px;stroke-width:0.264583"
x="256.55576"
y="73.141167">C16</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="236.44225"
y="93.74041"
id="text11193-62-8-0-9-1-1-4-8-5-6-9-2-8-0-2-2-1"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6-4-3-1-3-8-9-5-0-3-8-5-4-0"
style="font-size:4.23333px;stroke-width:0.264583"
x="236.44225"
y="93.74041">C17</tspan></text>
<text
xml:space="preserve"
style="font-size:4.23333px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="256.21432"
y="93.873459"
id="text11193-62-8-0-9-1-1-4-8-5-6-9-2-8-0-2-2-1-4"><tspan
sodipodi:role="line"
id="tspan11191-2-9-4-6-4-3-1-3-8-9-5-0-3-8-5-4-0-4"
style="font-size:4.23333px;stroke-width:0.264583"
x="256.21432"
y="93.873459">C18</tspan></text>
<text
xml:space="preserve"
style="font-size:5.29167px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="241.24927"
y="132.85455"
id="text11193-6"><tspan
sodipodi:role="line"
id="tspan11191-1"
style="stroke-width:0.264583"
x="241.24927"
y="132.85455">自由区域</tspan></text>
<text
xml:space="preserve"
style="font-size:5.29167px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="152.56967"
y="62.119507"
id="text30436"><tspan
sodipodi:role="line"
id="tspan30434"
style="stroke-width:0.264583"
x="152.56967"
y="62.119507">W1</tspan></text>
<text
xml:space="preserve"
style="font-size:5.29167px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="198.48642"
y="62.629436"
id="text30436-4"><tspan
sodipodi:role="line"
id="tspan30434-0"
style="stroke-width:0.264583"
x="198.48642"
y="62.629436">W2</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 26 KiB

1
public/img/shanghai.json Normal file

File diff suppressed because one or more lines are too long

View File

@ -17,6 +17,7 @@
for (let i = 1; i <= 9; i++) {
document.documentElement.style.setProperty(`--el-color-primary-light-${i}`, colorTool.lighten(app_color,i/10));
}
document.documentElement.style.setProperty(`--el-color-primary-darken-1`, colorTool.darken(app_color,0.1));
}
}
}

View File

@ -9,29 +9,17 @@
//公共模块
import common from './model/common'
//用户模块
import user from './model/user'
//角色模块
import role from './model/role'
//字典模块
import dic from './model/dic'
//应用模块
import app from './model/app'
//菜单模块
import menu from './model/menu'
//日志模块
import log from './model/log'
//授权模块
import auth from './model/auth'
//系统模块
import system from './model/system'
//演示模块
import demo from './model/demo'
const api = {
common,
user,
role,
dic,
app,
menu,
log,
auth,
system,
demo
}

View File

@ -1,12 +0,0 @@
import config from "@/config"
import http from "@/utils/request"
export default {
list: {
url: `${config.API_URL}/app`,
name: "应用列表",
get: async function(){
return await http.get(this.url);
}
}
}

12
src/api/model/auth.js Normal file
View File

@ -0,0 +1,12 @@
import config from "@/config"
import http from "@/utils/request"
export default {
token: {
url: `${config.API_URL}/token`,
name: "登录获取TOKEN",
post: async function(data={}){
return await http.post(this.url, data);
}
}
}

View File

@ -2,34 +2,29 @@ import config from "@/config"
import http from "@/utils/request"
export default {
post: {
url: `${config.API_URL}/demo/post`,
name: "分页列表",
post: async function(data){
return await http.post(this.url, data, {
headers: {
//'response-status': 401
}
});
}
},
page: {
url: `${config.API_URL}/page`,
url: `${config.API_URL}/demo/page`,
name: "分页列表",
get: async function(params){
return await http.get(this.url, params);
}
},
upload: {
url: `${config.API_URL}/upload`,
name: "文件上传接口",
post: async function(data){
return await http.post(this.url, data);
}
},
select: {
url: `${config.API_URL}/json/select.json`,
name: "下拉菜单数据",
get: async function(data){
return await http.get(this.url, data);
}
},
demolist: {
list: {
url: `${config.API_URL}/json/list.json`,
name: "列表数据",
get: async function(data){
return await http.get(this.url, data);
}
menu: {
url: `${config.API_URL}/demo/menu`,
name: "普通用户菜单",
get: async function(){
return await http.get(this.url);
}
}
}

View File

@ -1,26 +0,0 @@
import config from "@/config"
import http from "@/utils/request"
export default {
list: {
url: `${config.API_URL}/dic_list`,
name: "字典列表",
get: async function(){
return await http.get(this.url);
}
},
info: {
url: `${config.API_URL}/dic_info`,
name: "字典明细",
get: async function(params){
return await http.get(this.url, params);
}
},
get: {
url: `${config.API_URL}/dic`,
name: "获取字典数据",
get: async function(params){
return await http.get(this.url, params);
}
}
}

View File

@ -1,12 +0,0 @@
import config from "@/config"
import http from "@/utils/request"
export default {
list: {
url: `${config.API_URL}/loglist`,
name: "日志列表",
get: async function(params){
return await http.get(this.url, params);
}
}
}

View File

@ -1,15 +0,0 @@
import config from "@/config"
import http from "@/utils/request"
export default {
list: {
url: `${config.API_URL}/login`,
name: "菜单管理",
get: async function(){
// 这里接口对象偷懒重复了登录接口
var res = await http.get(this.url);
res.data = res.data.menuList;
return res;
}
}
}

View File

@ -1,19 +0,0 @@
import config from "@/config"
import http from "@/utils/request"
export default {
select: {
url: `${config.API_URL}/role`,
name: "角色选择列表",
get: async function(){
return await http.get(this.url);
}
},
list: {
url: `${config.API_URL}/role`,
name: "角色列表",
get: async function(){
return await http.get(this.url);
}
}
}

80
src/api/model/system.js Normal file
View File

@ -0,0 +1,80 @@
import config from "@/config"
import http from "@/utils/request"
export default {
menu: {
myMenus: {
url: `${config.API_URL}/system/menu/my`,
name: "获取我的菜单",
get: async function(){
return await http.get(this.url);
}
},
list: {
url: `${config.API_URL}/system/menu/list`,
name: "获取菜单",
get: async function(){
return await http.get(this.url);
}
}
},
dic: {
tree: {
url: `${config.API_URL}/system/dic/tree`,
name: "获取字典树",
get: async function(){
return await http.get(this.url);
}
},
list: {
url: `${config.API_URL}/system/dic/list`,
name: "字典明细",
get: async function(params){
return await http.get(this.url, params);
}
},
get: {
url: `${config.API_URL}/system/dic/get`,
name: "获取字典数据",
get: async function(params){
return await http.get(this.url, params);
}
}
},
role: {
list: {
url: `${config.API_URL}/system/role/list`,
name: "获取角色列表",
get: async function(params){
return await http.get(this.url, params);
}
}
},
user: {
list: {
url: `${config.API_URL}/system/user/list`,
name: "获取用户列表",
get: async function(params){
return await http.get(this.url, params);
}
}
},
app: {
list: {
url: `${config.API_URL}/system/app/list`,
name: "应用列表",
get: async function(){
return await http.get(this.url);
}
}
},
log: {
list: {
url: `${config.API_URL}/system/log/list`,
name: "日志列表",
get: async function(params){
return await http.get(this.url, params);
}
}
}
}

View File

@ -1,40 +0,0 @@
import config from "@/config"
import http from "@/utils/request"
export default {
login: {
url: `${config.API_URL}/login`,
name: "登录获取用户菜单和权限,全部权限",
get: async function(params={}){
return await http.get(this.url, params);
}
},
login_demo: {
url: `${config.API_URL}/login_user`,
name: "登录获取用户菜单和权限,部分权限",
get: async function(params={}){
return await http.get(this.url, params);
}
},
list: {
url: `${config.API_URL}/user_list`,
name: "获取用户列表",
get: async function(params={}){
return await http.get(this.url, params);
}
},
save: {
url: `${config.API_URL}/post`,
name: "新增编辑用户",
post: async function(params={}){
return await http.post(this.url, params);
}
},
del: {
url: `${config.API_URL}/post`,
name: "删除用户",
post: async function(params={}){
return await http.post(this.url, params);
}
}
}

View File

@ -124,7 +124,12 @@
[config.request.prop]: this.prop,
[config.request.order]: this.order
}
if(this.hidePagination){
delete reqData[config.request.page]
delete reqData[config.request.pageSize]
}
Object.assign(reqData, this.tableParams)
try {
var res = await this.apiObj.get(reqData);
}catch(error){
@ -138,8 +143,12 @@
this.emptyText = response.msg;
}else{
this.emptyText = "暂无数据";
this.tableData = response.rows;
this.total = response.total;
if(this.hidePagination){
this.tableData = response.data || [];
}else{
this.tableData = response.rows || [];
}
this.total = response.total || 0;
this.loading = false;
}
this.$refs.scTable.$el.querySelector('.el-table__body-wrapper').scrollTop = 0

View File

@ -3,20 +3,26 @@ const DEFAULT_CONFIG = {
APP_NAME: "SCUI",
//版本号
APP_VER: "1.2.1",
APP_VER: "1.2.2",
//内核版本号
CORE_VER: "1.2.1",
CORE_VER: "1.2.2",
//接口地址
API_URL: "/api",
//请求超时
TIMEOUT: 1000,
//TokenName
TOKEN_NAME: "Authorization",
//Token前缀注意最后有个空格如不需要需设置空字符串
TOKEN_PREFIX: "Bearer ",
//追加其他头
HEADERS: {},
//请求是否开启缓存
REQUEST_CACHE: false,

View File

@ -3,7 +3,7 @@ import API from "@/api";
//字典选择器配置
export default {
dicApiObj: API.dic.get, //获取字典接口对象
dicApiObj: API.system.dic.get, //获取字典接口对象
parseData: function (res) {
return {
data: res.data, //分析行数据字段结构

View File

@ -5,8 +5,9 @@ export default {
pageSize: 20, //表格每一页条数
parseData: function (res) { //数据分析
return {
rows: res.data, //分析行数据字段结构
total: res.count, //分析总数字段结构
data: res.data,
rows: res.data.rows, //分析行数据字段结构
total: res.data.total, //分析总数字段结构
msg: res.message, //分析描述字段结构
code: res.code //分析状态字段结构
}

View File

@ -4,6 +4,7 @@ export default {
pageSize: 20, //表格每一页条数
parseData: function (res) {
return {
data: res.data,
rows: res.data.rows, //分析行数据字段结构
total: res.data.total, //分析总数字段结构
msg: res.message, //分析描述字段结构

View File

@ -73,6 +73,7 @@
for (let i = 1; i <= 9; i++) {
document.documentElement.style.setProperty(`--el-color-primary-light-${i}`, colorTool.lighten(val,i/10));
}
document.documentElement.style.setProperty(`--el-color-primary-darken-1`, colorTool.darken(val,0.1));
this.$TOOL.data.set("APP_COLOR", val);
}
}

View File

@ -35,7 +35,7 @@
},
created() {
var menu = this.$TOOL.data.get("user").menuList;
var menu = this.$TOOL.data.get("MENU");
var home = this.$router.options.routes[0].children[0];
menu.unshift(home);
this.menu = this.filterUrl(menu)

View File

@ -48,6 +48,7 @@
<el-dropdown-menu>
<el-dropdown-item command="uc">个人设置</el-dropdown-item>
<el-dropdown-item command="cmd">CMD</el-dropdown-item>
<el-dropdown-item command="clearCache">清除缓存</el-dropdown-item>
<el-dropdown-item divided command="outLogin">退出登录</el-dropdown-item>
</el-dropdown-menu>
</template>
@ -94,7 +95,7 @@
}
},
created() {
var userInfo = this.$TOOL.data.get("user").userInfo;
var userInfo = this.$TOOL.data.get("USER_INFO");
this.userName = userInfo.userName;
this.userNameF = this.userName.substring(0,1);
},
@ -107,6 +108,21 @@
if(command == "cmd"){
this.$router.push({path: '/cmd'});
}
if(command == "clearCache"){
this.$confirm('清除缓存会将系统初始化,包括登录状态、主题、语言设置等,是否继续?','提示', {
type: 'info',
}).then(() => {
const loading = this.$loading()
this.$TOOL.data.clear()
this.$router.replace({path: '/login'})
setTimeout(()=>{
loading.close()
location.reload()
},1000)
}).catch(() => {
//
})
}
if(command == "outLogin"){
this.$confirm('确认是否退出当前用户?','提示', {
type: 'warning',

View File

@ -202,7 +202,7 @@
created() {
this.onLayoutResize();
window.addEventListener('resize', this.onLayoutResize);
var menu = this.$TOOL.data.get("user").menuList;
var menu = this.$TOOL.data.get("MENU");
var home = this.$router.options.routes[0].children[0];
menu.unshift(home);
this.menu = this.filterUrl(menu);

View File

@ -32,9 +32,9 @@ router.beforeEach(async (to, from, next) => {
NProgress.start()
//动态标题
document.title = `${to.meta.title} - ${config.APP_NAME}`
document.title = to.meta.title ? `${to.meta.title} - ${config.APP_NAME}` : `${config.APP_NAME}`
let userInfo = tool.data.get("user");
let token = tool.data.get("TOKEN");
if(to.path === "/login"){
isGetApiRouter = false;
@ -42,7 +42,7 @@ router.beforeEach(async (to, from, next) => {
return false;
}
if(!userInfo){
if(!token){
next({
path: '/login'
});
@ -51,7 +51,8 @@ router.beforeEach(async (to, from, next) => {
//加载API路由
if(!isGetApiRouter){
var apiRouter = filterAsyncRouter(userInfo.menuList);
let menu = tool.data.get("MENU");
var apiRouter = filterAsyncRouter(menu);
apiRouter.forEach(item => {
router.addRoute("layout", item)
})

View File

@ -34,21 +34,19 @@
.el-tabs__nav-wrap::after {height: 1px;}
.el-table th.is-sortable {transition: .1s;}
.el-table th.is-sortable:hover {background: #eee;}
.el-table .el-table__body-wrapper {background: #f6f8f9;}
.el-col .el-card {margin-bottom: 15px;}
.el-button--small.is-circle {padding:9px;}
.el-button--mini.is-circle {padding:7px;}
/* 动态值 */
.el-button:active {border-color: var(--el-color-primary);color: var(--el-color-primary);}
.el-button--default:active, .el-button--default.is-plain:active {border-color: var(--el-color-primary-darken-1, #0d84ff);color: var(--el-color-primary-darken-1, #0d84ff);}
.el-button--primary {background-color: var(--el-color-primary);border-color: var(--el-color-primary);}
.el-button--primary:focus, .el-button--primary:hover {background: var(--el-color-primary-light-2);border-color: var(--el-color-primary-light-2);}
.el-button--primary:active {background-color: var(--el-color-primary);border-color: var(--el-color-primary);color: #fff;}
.el-button--primary.is-plain {background: var(--el-color-primary-light-9);border-color: var(--el-color-primary-light-1);color: var(--el-color-primary);}
.el-button--primary:active {background-color: var(--el-color-primary-darken-1, #0d84ff);border-color: var(--el-color-primary-darken-1, #0d84ff);color: #fff;}
.el-button--primary.is-plain {background: var(--el-color-primary-light-9);border-color: var(--el-color-primary-light-6);color: var(--el-color-primary);}
.el-button--primary.is-plain:focus, .el-button--primary.is-plain:hover {background-color: var(--el-color-primary);border-color: var(--el-color-primary);}
.el-button--primary.is-plain:active {background-color: var(--el-color-primary);border-color: var(--el-color-primary);}
.el-button--primary.is-plain:active {background-color: var(--el-color-primary-darken-1, #0d84ff);border-color: var(--el-color-primary-darken-1, #0d84ff);}
.el-button--primary.is-plain.is-disabled, .el-button--primary.is-plain.is-disabled:active, .el-button--primary.is-plain.is-disabled:focus, .el-button--primary.is-plain.is-disabled:hover {background: var(--el-color-primary-light-9);border-color: var(--el-color-primary-light-8);color: var(--el-color-primary-light-4);}
.el-button--text:focus, .el-button--text:hover {color: var(--el-color-primary-light-2);border-color: transparent;background-color: transparent;}
.el-tag {background-color: var(--el-color-primary-light-9);border-color: var(--el-color-primary-light-8);color: var(--el-color-primary);}
.el-menu-item.is-active {background: var(--el-color-primary-light-9);color: var(--el-color-primary)!important;}
.adminui-header {background-color: var(--el-color-primary);}

View File

@ -14,3 +14,9 @@
.static-table {border-collapse: collapse;width: 100%;font-size: 14px;margin-bottom: 45px;line-height: 1.5em;}
.static-table th {text-align: left;white-space: nowrap;color: #909399;font-weight: 400;border-bottom: 1px solid #dcdfe6;padding: 15px;max-width: 250px;}
.static-table td {border-bottom: 1px solid #dcdfe6;padding: 15px;max-width: 250px;color: #606266;}
/*header-tabs*/
.header-tabs {padding:0;display:block;border:0!important;height:auto;}
.header-tabs .el-tabs {border:0;box-shadow:none;}
.header-tabs .el-tabs__content {display: none;}
.header-tabs .el-tabs__item {font-size: 12px;}

View File

@ -142,6 +142,7 @@
.el-table th.is-sortable:hover {background: $--background-translucent}
.el-table tr {background: #2e2e2e;}
.el-table--striped .el-table__body tr.el-table__row--striped td {background: #2b2b2b;}
.el-table .el-table__body-wrapper {background: $--background;}
.el-menu {background: $--card-background;}
.el-menu-item {color: $--text-color;}
@ -150,6 +151,9 @@
.el-loading-mask {background-color: rgba(0,0,0,0.5);}
.el-tabs--border-card {background: $--card-background;}
.el-tabs--border-card>.el-tabs__header {background: $--background;}
.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active {background: $--card-background;}
.el-tabs__item {color: $--text-color;}
.el-tabs__nav-wrap::after {background: $--border-color;}
@ -177,9 +181,21 @@
.el-dropdown-menu__item--divided:before {background: $--card-background;}
.el-tag.el-tag--light {background: none;border-color: $--border-color;}
.el-button--default:hover,.el-button--default:focus {background: #383838;border-color: $--color;}
.el-button.is-plain {background: none;border-color: $--border-color;}
.el-button.is-plain.is-disabled,.el-button.is-plain.is-disabled:hover {background: #383838;border-color: $--border-color;}
.el-button.is-plain {background: none;border-color: var(--el-button-hover-color);}
.el-button.is-plain:active {background: #383838;}
.el-button.is-plain:hover,.el-button.is-plain:focus {color: var(--el-button-hover-color);border-color: var(--el-button-hover-color);}
.el-button--default:hover, .el-button--default:focus {background: #383838;border-color: var(--el-color-primary);}
.el-button--default.is-plain {border-color: var(--el-button-border-color);}
.el-button--default.is-plain:hover,.el-button--default.is-plain:focus {background: none;border-color: var(--el-border-color-hover);}
.el-button--default.is-plain:active {background: #383838;}
.el-button--primary:focus, .el-button--primary:hover {background: var(--el-color-primary-light-2);border-color: var(--el-color-primary-light-2);}
.el-button--primary:active {background-color: var(--el-color-primary-darken-1, #0d84ff);border-color: var(--el-color-primary-darken-1, #0d84ff);color: #fff;}
.el-button--primary.is-plain {border-color: var(--el-color-primary);}
.el-button--primary.is-plain:focus, .el-button--primary.is-plain:hover {background: none;border-color: var(--el-color-primary);color: var(--el-color-primary-light-2);}
.el-button--primary.is-plain:active {background: #383838;}
.el-button.is-disabled, .el-button.is-disabled:hover {background: #383838;border-color: $--border-color;color: var(--el-button-disabled-font-color);}
.el-badge__content {color: #fff;}

View File

@ -4,6 +4,11 @@
*/
export default (error, vm)=>{
//过滤HTTP请求错误
if(error.status){
return false
}
var errorMap = {
InternalError: "Javascript引擎内部错误",
ReferenceError: "未找到对象",

View File

@ -1,11 +1,7 @@
import tool from '@/utils/tool';
export function permission(data) {
let userInfo = tool.data.get("user");
if(!userInfo){
return false;
}
let permissions = userInfo.permissions;
let permissions = tool.data.get("PERMISSIONS");
if(!permissions){
return false;
}
@ -14,11 +10,11 @@ export function permission(data) {
}
export function rolePermission(data) {
let userInfo = tool.data.get("user");
let userInfo = tool.data.get("USER_INFO");
if(!userInfo){
return false;
}
let role = userInfo.userInfo.role;
let role = userInfo.role;
if(!role){
return false;
}

View File

@ -1,23 +1,25 @@
import axios from 'axios';
import { ElNotification } from 'element-plus';
import { ElNotification, ElMessageBox } from 'element-plus';
import sysConfig from "@/config";
import tool from '@/utils/tool';
import router from '@/router';
axios.defaults.baseURL = ''
axios.defaults.timeout = 10000
axios.defaults.timeout = sysConfig.TIMEOUT
// HTTP request 拦截器
axios.interceptors.request.use(
(config) => {
let userInfo = tool.data.get("user");
if(userInfo){
config.headers[sysConfig.TOKEN_NAME] = sysConfig.TOKEN_PREFIX + userInfo.token
let token = tool.data.get("TOKEN");
if(token){
config.headers[sysConfig.TOKEN_NAME] = sysConfig.TOKEN_PREFIX + token
}
if(!sysConfig.REQUEST_CACHE && config.method == 'get'){
config.params = config.params || {};
config.params['_'] = new Date().getTime();
}
Object.assign(config.headers, sysConfig.HEADERS)
return config;
},
(error) => {
@ -40,12 +42,21 @@ axios.interceptors.response.use(
} else if (error.response.status == 500) {
ElNotification.error({
title: '请求错误',
message: "Status:500服务器发生错误"
message: error.response.data.message || "Status:500服务器发生错误"
});
} else if (error.response.status == 401) {
ElMessageBox.confirm('当前用户已被登出或无权限访问当前资源,请尝试重新登录后再操作。', '无权限访问', {
type: 'error',
closeOnClickModal: false,
center: true,
confirmButtonText: '重新登录'
}).then(() => {
router.replace({path: '/login'});
}).catch(() => {})
} else {
ElNotification.error({
title: '请求错误',
message: `Status:${error.response.status},未知错误!`
message: error.response.data.message || `Status:${error.response.status},未知错误!`
});
}
} else {

View File

@ -32,6 +32,29 @@ tool.data = {
}
}
/*sessionStorage*/
tool.session = {
set(table, settings) {
var _set = JSON.stringify(settings)
return sessionStorage.setItem(table, _set);
},
get(table) {
var data = sessionStorage.getItem(table);
try {
data = JSON.parse(data)
} catch (err) {
return null
}
return data;
},
remove(table) {
return sessionStorage.removeItem(table);
},
clear() {
return sessionStorage.clear();
}
}
/* Fullscreen */
tool.screen = function (element) {
var isFull = !!(document.webkitIsFullScreen || document.mozFullScreen || document.msFullscreenElement || document.fullscreenElement);

View File

@ -31,7 +31,7 @@
}
},
created(){
this.dashboard = this.$TOOL.data.get("user").dashboard;
this.dashboard = this.$TOOL.data.get("USER_INFO").dashboard || '0';
},
mounted(){

View File

@ -80,7 +80,7 @@
getMods(){
//
this.myModsName = this.$TOOL.data.get("my-mods") || []
var menuTree = this.$TOOL.data.get("user").menuList
var menuTree = this.$TOOL.data.get("MENU")
this.filterMenu(menuTree)
this.myMods = this.mods.filter(item => {
return this.myModsName.includes(item.name)

View File

@ -49,7 +49,7 @@
dialog: {
save: false
},
apiObj: this.$API.app.list,
apiObj: this.$API.system.app.list,
selection: []
}
},

View File

@ -80,7 +80,7 @@
this.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSaveing = true;
var res = await this.$API.user.save.post(this.form);
var res = await this.$API.demo.post.post(this.form);
this.isSaveing = false;
if(res.code == 200){
this.$emit('success', this.form, this.mode)

View File

@ -48,6 +48,7 @@
dicProps: {
value: "id",
label: "name",
emitPath: false,
checkStrictly: true
}
}
@ -64,7 +65,7 @@
},
//
async getDic(){
var res = await this.$API.dic.list.get();
var res = await this.$API.system.dic.tree.get();
this.dic = res.data;
},
//
@ -72,7 +73,7 @@
this.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSaveing = true;
var res = await this.$API.user.save.post(this.form);
var res = await this.$API.demo.post.post(this.form);
this.isSaveing = false;
if(res.code == 200){
this.$emit('success', this.form, this.mode)

View File

@ -107,7 +107,7 @@
methods: {
//
async getDic(){
var res = await this.$API.dic.list.get();
var res = await this.$API.system.dic.tree.get();
this.showDicloading = false;
this.dicList = res.data;
//, &
@ -119,7 +119,7 @@
this.listApiParams = {
code: firstNode.code
}
this.listApi = this.$API.dic.info;
this.listApi = this.$API.system.dic.list;
}
},
//
@ -217,7 +217,7 @@
//
async table_del(row, index){
var reqData = {id: row.id}
var res = await this.$API.user.del.post(reqData);
var res = await this.$API.demo.post.post(reqData);
if(res.code == 200){
this.$refs.table.tableData.splice(index, 1);
this.$message.success("删除成功")
@ -248,7 +248,7 @@
saveList(){
this.$refs.listDialog.submit(async (formData) => {
this.isListSaveing = true;
var res = await this.$API.user.save.post(formData);
var res = await this.$API.demo.post.post(formData);
this.isListSaveing = false;
if(res.code == 200){
// OR /

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :title="titleMap[mode]" v-model="visible" :width="330" destroy-on-close @closed="$emit('closed')">
<el-dialog :title="titleMap[mode]" v-model="visible" :width="400" destroy-on-close @closed="$emit('closed')">
<el-form :model="form" :rules="rules" ref="dialogForm" label-width="100px" label-position="left">
<el-form-item label="所属字典" prop="dic">
<el-cascader v-model="form.dic" :options="dic" :props="dicProps" :show-all-levels="false" clearable></el-cascader>
@ -55,6 +55,7 @@
dicProps: {
value: "id",
label: "name",
emitPath: false,
checkStrictly: true
}
}
@ -74,7 +75,7 @@
},
//
async getDic(){
var res = await this.$API.dic.list.get();
var res = await this.$API.system.dic.tree.get();
this.dic = res.data;
},
//
@ -82,7 +83,7 @@
this.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSaveing = true;
var res = await this.$API.user.save.post(this.form);
var res = await this.$API.demo.post.post(this.form);
this.isSaveing = false;
if(res.code == 200){
this.$emit('success', this.form, this.mode)

View File

@ -118,7 +118,7 @@
}
],
date: [],
apiObj: this.$API.log.list,
apiObj: this.$API.system.log.list,
search: {
keyword: ""
}

View File

@ -1,16 +1,18 @@
<template>
<el-container>
<el-aside width="300px">
<el-aside width="300px" v-loading="menuloading">
<el-container>
<el-header>
<el-input placeholder="输入关键字进行过滤" v-model="menuFilterText" clearable></el-input>
</el-header>
<el-main class="nopadding">
<el-tree ref="menu" class="menu" node-key="name" :data="menuList" :props="menuProps" draggable highlight-current :expand-on-click-node="false" check-strictly show-checkbox :filter-node-method="menuFilterNode" @node-click="menuClick" @node-drop="nodeDrop">
<el-tree ref="menu" class="menu" node-key="id" :data="menuList" :props="menuProps" draggable highlight-current :expand-on-click-node="false" check-strictly show-checkbox :filter-node-method="menuFilterNode" @node-click="menuClick" @node-drop="nodeDrop">
<template #default="{node, data}">
<span class="custom-tree-node el-tree-node__label">
<span class="label">{{ node.label }}</span>
<span class="label">
{{ node.label }}
</span>
<span class="do">
<i class="el-icon-plus" @click.stop="add(node, data)"></i>
</span>
@ -26,7 +28,7 @@
</el-container>
</el-aside>
<el-container>
<el-main class="nopadding" style="padding:20px;">
<el-main class="nopadding" style="padding:20px;" ref="main">
<save ref="save" :menu="menuList"></save>
</el-main>
</el-container>
@ -44,6 +46,7 @@
},
data(){
return {
menuloading: false,
menuList: [],
menuProps: {
label: (data)=>{
@ -64,13 +67,16 @@
methods: {
//
async getMenu(){
var res = await this.$API.menu.list.get();
this.menuloading = true
var res = await this.$API.system.menu.list.get();
this.menuloading = false
this.menuList = res.data;
},
//
menuClick(data, node){
var pid = node.level==1?undefined:node.parent.data.name;
var pid = node.level==1?undefined:node.parent.data.id;
this.$refs.save.setData(data, pid)
this.$refs.main.$el.scrollTop = 0
},
//
menuFilterNode(value, data){
@ -80,12 +86,14 @@
},
//
nodeDrop(draggingNode, dropNode, dropType){
this.$refs.save.setData({})
this.$message(`拖拽对象:${draggingNode.data.meta.title}, 释放对象:${dropNode.data.meta.title}, 释放对象的位置:${dropType}`)
},
//
add(node){
async add(node, data){
var newMenuName = "未命名" + newMenuIndex++;
var newMenuData = {
parentId: data ? data.id : "",
name: newMenuName,
path: "",
component: "",
@ -94,30 +102,51 @@
type: "menu"
}
}
if(node){
this.$refs.menu.append(newMenuData, node)
var lastNode = node.childNodes[node.childNodes.length-1]
this.$refs.menu.setCurrentKey(lastNode.data.name)
var pid = node.data.name;
this.$refs.save.setData(newMenuData, pid)
}else{
this.$refs.menu.append(newMenuData)
var newNode = this.menuList[this.menuList.length-1]
this.$refs.menu.setCurrentKey(newNode.name)
this.$refs.save.setData(newMenuData)
}
this.menuloading = true
var res = await this.$API.demo.post.post(newMenuData)
this.menuloading = false
newMenuData.id = res.data
this.$refs.menu.append(newMenuData, node)
this.$refs.menu.setCurrentKey(newMenuData.id)
var pid = node ? node.data.id : ""
this.$refs.save.setData(newMenuData, pid)
},
//
delMenu(){
async delMenu(){
var CheckedNodes = this.$refs.menu.getCheckedNodes()
if(CheckedNodes.length == 0){
this.$message.warning("请选择需要删除的项")
return false;
}
var confirm = await this.$confirm('确认删除已选择的菜单吗?','提示', {
type: 'warning',
confirmButtonText: '删除',
confirmButtonClass: 'el-button--danger'
}).catch(() => {})
if(confirm != 'confirm'){
return false
}
this.menuloading = true
var reqData = {
ids: CheckedNodes.map(item => item.id)
}
var res = await this.$API.demo.post.post(reqData)
this.menuloading = false
if(res.code == 200){
CheckedNodes.forEach(item => {
var node = this.$refs.menu.getNode(item)
if(node.isCurrent){
this.$refs.save.setData({})
}
this.$refs.menu.remove(item)
})
}else{
this.$message.warning(res.message)
}
}
}
}

View File

@ -1,15 +1,17 @@
<template>
<el-row :gutter="20">
<el-col v-if="!form.id">
<el-empty description="请选择左侧菜单后操作" :image-size="100"></el-empty>
</el-col>
<template v-else>
<el-col :xl="12" :lg="16">
<h2>{{form.meta.title || "新增菜单"}}</h2>
<el-form :model="form" :rules="rules" ref="dialogForm" label-width="80px" label-position="left">
<el-form-item label="显示名称" prop="meta.title">
<el-input v-model="form.meta.title" clearable placeholder="菜单显示名字"></el-input>
</el-form-item>
<el-form-item label="上级菜单" prop="parent">
<el-cascader v-model="form.parent" :options="menu" :props="menuProps" :show-all-levels="false" clearable></el-cascader>
<div class="el-form-item-msg">这里还有点问题el-cascader的props的label 现暂只支持字符串还未支持自定义函数 </div>
<el-form-item label="上级菜单" prop="parentId">
<el-cascader v-model="form.parentId" :options="menuOptions" :props="menuProps" :show-all-levels="false" placeholder="顶级菜单" clearable disabled></el-cascader>
</el-form-item>
<el-form-item label="类型" prop="meta.type">
<el-radio-group v-model="form.meta.type">
@ -37,11 +39,13 @@
<div class="el-form-item-msg">子节点或详情页需要高亮的上级菜单路由地址</div>
</el-form-item>
<el-form-item label="视图" prop="component">
<el-autocomplete v-model="form.component" :fetch-suggestions="querySearch" :debounce="10" clearable placeholder=""></el-autocomplete>
<el-input v-model="form.component" clearable placeholder="">
<template #prepend>views/</template>
</el-input>
<div class="el-form-item-msg">如父节点链接或Iframe等没有视图的菜单不需要填写</div>
</el-form-item>
<el-form-item label="颜色" prop="color">
<el-color-picker v-model="form.color" :predefine="predefineColors"></el-color-picker>
<el-color-picker v-model="form.meta.color" :predefine="predefineColors"></el-color-picker>
</el-form-item>
<el-form-item label="是否隐藏" prop="meta.hidden">
@ -50,7 +54,7 @@
<div class="el-form-item-msg">菜单不显示在导航中但用户依然可以访问例如详情页</div>
</el-form-item>
<el-form-item>
<el-button type="primary"> </el-button>
<el-button type="primary" @click="save" :loading="loading"> </el-button>
</el-form-item>
</el-form>
@ -71,6 +75,7 @@
</p>
</el-alert>
</el-col>
</template>
</el-row>
</template>
@ -88,7 +93,8 @@
data(){
return {
form: {
parent: "",
id: "",
parentId: "",
name: "",
path: "",
component: "",
@ -101,9 +107,10 @@
type: "menu"
}
},
menuOptions: [],
menuProps: {
value: 'name',
label: 'name',
value: 'id',
label: 'title',
checkStrictly: true
},
predefineColors: [
@ -115,38 +122,51 @@
'#409EFF',
'#c71585'
],
rules: {},
views: []
rules: [],
loading: false
}
},
watch: {
menu: {
handler(){
this.menuOptions = this.treeToMap(this.menu)
},
deep: true
}
},
mounted() {
this.views = this.getViews();
},
methods: {
//
treeToMap(tree){
const map = []
tree.forEach(item => {
var obj = {
id: item.id,
parentId: item.parentId,
title: item.meta.title,
children: item.children&&item.children.length>0 ? this.treeToMap(item.children) : null
}
map.push(obj)
})
return map
},
//
async save(){
this.loading = true
var res = await this.$API.demo.post.post(this.form)
this.loading = false
if(res.code == 200){
this.$message.success("保存成功")
}else{
this.$message.warning(res.message)
}
},
//
setData(data, pid){
this.form = data
this.form.parent = pid
//
//Object.assign(this.form, data)
},
//
getViews(){
const filesUrl = []
// require.context Webpack使
// let files = require.context('@/views', true, /\.vue$/)
// files.keys().forEach(file => {
// // index? .replace(/\/index$/, "")
// filesUrl.push({
// value: file.replace(/^\.\/(.*)\.\w+$/, '$1')
// })
// })
return filesUrl;
},
querySearch(queryString, cb){
var results = this.getViews();
results = results.filter(item => item.value.indexOf(queryString) !== -1)
cb(results)
this.form.parentId = pid
}
}
}

View File

@ -14,15 +14,18 @@
</div>
</el-header>
<el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange">
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" hidePagination>
<el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="#" type="index" width="50"></el-table-column>
<el-table-column label="角色名称" prop="label" width="250"></el-table-column>
<el-table-column label="别名" prop="alias" width="150"></el-table-column>
<el-table-column label="排序" prop="progress" width="150"></el-table-column>
<el-table-column label="排序" prop="sort" width="150"></el-table-column>
<el-table-column label="操作" fixed="right" align="right" width="140">
<template #default="scope">
<el-button type="text" size="small" @click="table_show(scope.row, scope.$index)">查看</el-button>
<el-divider direction="vertical"></el-divider>
<el-button type="text" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button>
<el-divider direction="vertical"></el-divider>
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
<template #reference>
<el-button type="text" size="small">删除</el-button>
@ -57,7 +60,7 @@
save: false,
permission: false
},
apiObj: this.$API.role.list,
apiObj: this.$API.system.role.list,
selection: [],
search: {
keyword: null
@ -94,12 +97,11 @@
})
},
//
async table_del(row, index){
async table_del(row){
var reqData = {id: row.id}
var res = await this.$API.user.del.post(reqData);
var res = await this.$API.demo.post.post(reqData);
if(res.code == 200){
// OR /
this.$refs.table.tableData.splice(index, 1);
this.$refs.table.refresh()
this.$message.success("删除成功")
}else{
this.$alert(res.message, "提示", {type: 'error'})
@ -111,13 +113,7 @@
type: 'warning'
}).then(() => {
const loading = this.$loading();
this.selection.forEach(item => {
this.$refs.table.tableData.forEach((itemI, indexI) => {
if (item.id === itemI.id) {
this.$refs.table.tableData.splice(indexI, 1)
}
})
})
this.$refs.table.refresh()
loading.close();
this.$message.success("操作成功")
}).catch(() => {
@ -150,13 +146,10 @@
},
//
handleSaveSuccess(data, mode){
//
//this.$refs.table.tableData.refresh()
if(mode=='add'){
data.id = new Date().getTime()
this.$refs.table.tableData.unshift(data)
this.$refs.table.refresh()
}else if(mode=='edit'){
Object.assign(this.filterTree(data.id), data)
this.$refs.table.refresh()
}
}
}

View File

@ -98,7 +98,7 @@
},1000)
},
async getMenu(){
var res = await this.$API.menu.list.get();
var res = await this.$API.system.menu.list.get();
this.menu.list = res.data;
},
getGroup(){

View File

@ -1,30 +1,18 @@
<template>
<el-dialog :title="titleMap[mode]" v-model="visible" :width="500" destroy-on-close @closed="$emit('closed')">
<el-form :model="form" :rules="rules" :disabled="mode=='show'" ref="dialogForm" label-width="100px" label-position="top">
<el-row :gutter="20">
<el-col :span="12">
<el-form :model="form" :rules="rules" :disabled="mode=='show'" ref="dialogForm" label-width="100px" label-position="left">
<el-form-item label="上级角色" prop="parentId">
<el-cascader v-model="form.parentId" :options="groups" :props="groupsProps" :show-all-levels="false" clearable></el-cascader>
<el-cascader v-model="form.parentId" :options="groups" :props="groupsProps" :show-all-levels="false" clearable style="width: 100%;"></el-cascader>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="排序" prop="sort">
<el-input-number v-model="form.sort" controls-position="right" :min="1" style="width: 100%;"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="角色名称" prop="label">
<el-input v-model="form.label" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="角色别名" prop="alias">
<el-input v-model="form.alias" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="排序" prop="sort">
<el-input-number v-model="form.sort" controls-position="right" :min="1" style="width: 100%;"></el-input-number>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="visible=false" > </el-button>
@ -51,6 +39,7 @@
id:"",
label: "",
alias: "",
sort: 1,
parentId: ""
},
//
@ -69,6 +58,7 @@
groups: [],
groupsProps: {
value: "id",
emitPath: false,
checkStrictly: true
}
}
@ -85,7 +75,7 @@
},
//
async getGroup(){
var res = await this.$API.role.select.get();
var res = await this.$API.system.role.list.get();
this.groups = res.data;
},
//
@ -93,7 +83,7 @@
this.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSaveing = true;
var res = await this.$API.user.save.post(this.form);
var res = await this.$API.demo.post.post(this.form);
this.isSaveing = false;
if(res.code == 200){
this.$emit('success', this.form, this.mode)
@ -110,6 +100,7 @@
this.form.id = data.id
this.form.label = data.label
this.form.alias = data.alias
this.form.sort = data.sort
this.form.parentId = data.parentId
//

View File

@ -75,7 +75,7 @@
showGrouploading: false,
groupFilterText: '',
group: [],
apiObj: this.$API.user.list,
apiObj: this.$API.system.user.list,
selection: [],
search: {
name: null
@ -115,7 +115,7 @@
//
async table_del(row, index){
var reqData = {id: row.id}
var res = await this.$API.user.del.post(reqData);
var res = await this.$API.demo.post.post(reqData);
if(res.code == 200){
// OR /
this.$refs.table.tableData.splice(index, 1);
@ -149,7 +149,8 @@
},
//
async getGroup(){
var res = await this.$API.role.select.get();
this.showGrouploading = true;
var res = await this.$API.system.role.list.get();
this.showGrouploading = false;
var allNode ={id: '', label: '所有'}
res.data.unshift(allNode);
@ -169,7 +170,7 @@
},
//
upsearch(){
this.$refs.table.upData(this.search)
},
//
handleSuccess(data, mode){

View File

@ -1,44 +1,26 @@
<template>
<el-dialog :title="titleMap[mode]" v-model="visible" :width="500" destroy-on-close @closed="$emit('closed')">
<el-form :model="form" :rules="rules" :disabled="mode=='show'" ref="dialogForm" label-width="100px" label-position="top">
<el-row :gutter="20">
<el-col :span="24">
<el-form :model="form" :rules="rules" :disabled="mode=='show'" ref="dialogForm" label-width="100px" label-position="left">
<el-form-item label="头像" prop="avatar">
<sc-upload v-model="form.avatar" title="上传头像"></sc-upload>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="登录账号" prop="userName">
<el-input v-model="form.userName" placeholder="用于登录系统" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name" placeholder="请输入完整的真实姓名" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" v-if="mode=='add'">
<el-col :span="12">
<template v-if="mode=='add'">
<el-form-item label="登录密码" prop="password">
<el-input type="password" v-model="form.password" clearable show-password></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="确认密码" prop="password2">
<el-input type="password" v-model="form.password2" clearable show-password></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
</template>
<el-form-item label="所属角色" prop="group">
<el-cascader v-model="form.group" :options="groups" :props="groupsProps" :show-all-levels="false" clearable style="width: 100%;"></el-cascader>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button @click="visible=false" > </el-button>
@ -123,7 +105,7 @@
},
//
async getGroup(){
var res = await this.$API.role.select.get();
var res = await this.$API.system.role.list.get();
this.groups = res.data;
},
//
@ -131,7 +113,7 @@
this.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSaveing = true;
var res = await this.$API.user.save.post(this.form);
var res = await this.$API.demo.post.post(this.form);
this.isSaveing = false;
if(res.code == 200){
this.$emit('success', this.form, this.mode)

View File

@ -9,6 +9,30 @@
<template>
<el-container>
<el-header style="display: block;height:auto;">
<el-row :gutter="15">
<el-col :lg="6">
<sc-statistic title="数量" value="12" suffix="项"></sc-statistic>
</el-col>
<el-col :lg="6">
<sc-statistic title="总进度" value="70.0" suffix="%"></sc-statistic>
</el-col>
<el-col :lg="6">
<sc-statistic title="收入" value="0.0" prefix="¥" groupSeparator></sc-statistic>
</el-col>
<el-col :lg="6">
<sc-statistic title="支出" value="200" prefix="¥" groupSeparator></sc-statistic>
</el-col>
</el-row>
</el-header>
<el-header class="header-tabs">
<el-tabs type="border-card">
<el-tab-pane label="所有"></el-tab-pane>
<el-tab-pane label="未完成 (2)"></el-tab-pane>
<el-tab-pane label="弃坑"></el-tab-pane>
<el-tab-pane label="其他"></el-tab-pane>
</el-tabs>
</el-header>
<el-header>
<div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
@ -18,12 +42,6 @@
</div>
<div class="right-panel">
<div class="right-panel-search">
<el-radio-group v-model="group">
<el-radio-button label="0">所有</el-radio-button>
<el-radio-button label="1">未完成 (2)</el-radio-button>
<el-radio-button label="2">弃坑 (1)</el-radio-button>
<el-radio-button label="3">其他</el-radio-button>
</el-radio-group>
<scFilterBar :options="options" @change="change"></scFilterBar>
</div>
</div>
@ -80,12 +98,14 @@
</template>
<script>
import scStatistic from '@/components/scStatistic';
import scFilterBar from '@/components/scFilterBar';
import info from './info'
export default {
name: 'list',
components: {
scStatistic,
scFilterBar,
info
},

View File

@ -1,50 +1,33 @@
<!--
* @Descripttion: SVG平面布置图模板
* @version: 1.0
* @Descripttion: SVG MAP
* @version: 2.0
* @Author: sakuya
* @Date: 2021年6月16日15:05:15
* @LastEditors:
* @LastEditTime:
* @LastEditors: sakuya
* @LastEditTime: 2021年8月23日13:42:58
-->
<template>
<el-container>
<el-aside width="210px">
<el-container>
<el-header>
<el-input placeholder="输入关键字进行过滤" v-model="filterText" clearable></el-input>
</el-header>
<el-main class="nopadding">
<el-tree ref="tree" class="menu" node-key="id" :data="treeList" :highlight-current="true" :expand-on-click-node="false" :filter-node-method="treeFilterNode">
</el-tree>
</el-main>
</el-container>
</el-aside>
<el-main class="nopadding" style="background: #f6f8f9;" v-loading="svgLoading">
<el-main class="nopadding" style="background: #f6f8f9;" v-loading="mapLoading">
<scEcharts ref="map" :option="option"></scEcharts>
</el-main>
<el-aside width="340px" style="border-left: 1px solid #e6e6e6;border-right: 0;padding:15px;">
<el-descriptions title="computer-c1" :column="1" border>
<el-descriptions-item label="name">c1</el-descriptions-item>
<el-descriptions-item label="category">computer</el-descriptions-item>
<el-descriptions title="Shanghai China" :column="1" border>
<el-descriptions-item label="region">Shanghai</el-descriptions-item>
<el-descriptions-item label="area">6340.5 km2</el-descriptions-item>
<el-descriptions-item label="state"><em class="state state-1 status-processing"></em></el-descriptions-item>
</el-descriptions>
<el-collapse style="margin-top: 15px;">
<el-collapse-item title="screen" name="1">
<el-collapse-item title="video monitor" name="1">
<div class="screen" style="background: #000;height:180px;color: #999;text-align: center;">
<i class="el-icon-menu" style="font-size: 40px;margin-top: 50px;"></i>
<p>windows 10</p>
<i class="el-icon-video-camera" style="font-size: 40px;margin-top: 50px;"></i>
<p>camera</p>
</div>
</el-collapse-item>
<el-collapse-item title="user" name="2">
<div>
<el-avatar> S </el-avatar>
</div>
</el-collapse-item>
<el-collapse-item title="network log" name="3">
<el-empty description="NO DATA" :image-size="60"></el-empty>
</el-collapse-item>
</el-collapse>
<el-alert title="地图数据来自阿里项目 DATAV.GeoAtlas" type="info" style="margin-top: 15px;"></el-alert>
</el-aside>
</el-container>
</template>
@ -59,35 +42,7 @@
},
data() {
return {
svgLoading: false,
filterText: "",
treeList: [
{
label: 'computer',
children: [
{label: 'c1'},
{label: 'c2'},
{label: 'c3'},
{label: 'c4'},
{label: 'c5'},
{label: '...'}
]
},
{
label: 'network',
children: [
{label: 'W1'},
{label: 'W2'}
]
}
],
info: {},
option: {}
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
mapLoading: false
}
},
mounted() {
@ -95,24 +50,30 @@
},
methods: {
async getSvg(){
this.svgLoading = true;
var svg = await this.$HTTP.get('img/floorplan.svg')
this.svgLoading = false;
scEcharts.registerMap('floorplan', { svg: svg });
this.mapLoading = true;
var map = await this.$HTTP.get('img/shanghai.json')
this.mapLoading = false;
scEcharts.registerMap('shanghai', map);
this.option = {
title: {
text: 'Floorplan Demo',
subtext: '非常适用于室内布局/电子版布局/停车场监控等业务场景',
text: 'Map Demo',
subtext: '可用于展示GeoJson/SVG的地图或者其它图形',
left: '20',
top: '20'
},
tooltip: {
},
geo: {
map: 'floorplan',
map: 'shanghai',
zoom: 1,
roam: true,
selectedMode: 'single',
itemStyle: {
areaColor: 'rgba(128, 128, 128, 0.1)',
borderColor: 'rgba(0, 0, 0, 0.2)',
borderWidth: 1
},
select: {
itemStyle: {
color: 'rgba(0, 153, 255, 0.8)'
@ -140,8 +101,7 @@
tooltip: 2
},
data: [
[137.01938166540623, 51.93905433869099],
[192.73843670517726, 52.00025351818228]
[121.3154759073276, 30.819428360452587]
]
}
}
@ -160,12 +120,6 @@
});
},
//
treeFilterNode(value, data){
if (!value) return true;
var targetText = data.label;
return targetText.indexOf(value) !== -1;
},
}
}
</script>

View File

@ -176,6 +176,7 @@
for (let i = 1; i <= 9; i++) {
document.documentElement.style.setProperty(`--el-color-primary-light-${i}`, colorTool.lighten(val,i/10));
}
document.documentElement.style.setProperty(`--el-color-primary-darken-1`, colorTool.darken(val,0.1));
this.$TOOL.data.set("APP_COLOR", val);
}
},

View File

@ -5,12 +5,19 @@
<div class="login-form">
<div class="login-logo">
<img class="logo" :alt="appName" src="img/logo.png">
<img class="logo" :alt="$CONFIG.APP_NAME" src="img/logo.png">
<h2>用户登录</h2>
</div>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="0" size="large">
<el-form-item prop="user">
<el-input v-model="ruleForm.user" prefix-icon="el-icon-user" clearable placeholder="用户名 / 手机 / 邮箱"></el-input>
<el-input v-model="ruleForm.user" prefix-icon="el-icon-user" clearable placeholder="用户名 / 手机 / 邮箱">
<template #append>
<el-select v-model="userType" placeholder="请选择" style="width: 130px;">
<el-option label="管理员" value="admin"></el-option>
<el-option label="用户" value="user"></el-option>
</el-select>
</template>
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input v-model="ruleForm.password" prefix-icon="el-icon-lock" clearable show-password placeholder="请输入密码"></el-input>
@ -26,35 +33,7 @@
</el-row>
</el-form-item>
<el-form-item>
<el-dropdown style="width: 100%;">
<el-button type="primary" style="width: 100%;" :loading="islogin" round> <i class="el-icon-arrow-down el-icon--right"></i></el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="submitForm('ruleForm', 'admin')">
<div class="demo-user-item">
<div class="icon">
<el-avatar src="img/avatar.jpg"></el-avatar>
</div>
<div class="info">
<h2>Sakuya</h2>
<p>超级管理员(Administrator)</p>
</div>
</div>
</el-dropdown-item>
<el-dropdown-item @click="submitForm('ruleForm', 'user')">
<div class="demo-user-item">
<div class="icon">
<el-avatar src="img/avatar2.gif"></el-avatar>
</div>
<div class="info">
<h2>Lolowan</h2>
<p>普通用户(User)</p>
</div>
</div>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<el-button type="primary" style="width: 100%;" :loading="islogin" round @click="login"> </el-button>
</el-form-item>
</el-form>
@ -76,13 +55,97 @@
<img src="img/loginbg.svg"/>
</div>
</div>
<div class="login-footer">© {{appName}} {{appVar}}</div>
<div class="login-footer">© {{$CONFIG.APP_NAME}} {{$CONFIG.APP_VER}}</div>
</div>
</div>
</template>
<style scoped>
<script>
export default {
data() {
return {
userType: 'admin',
ruleForm: {
user: "admin",
password: "admin",
autologin: false
},
rules: {
user: [
{required: true, message: '请输入用户名', trigger: 'blur'}
],
password: [
{required: true, message: '请输入密码', trigger: 'blur'}
]
},
islogin: false
}
},
watch:{
userType(val){
if(val == 'admin'){
this.ruleForm.user = 'admin'
this.ruleForm.password = 'admin'
}else if(val == 'user'){
this.ruleForm.user = 'user'
this.ruleForm.password = 'user'
}
}
},
created: function() {
this.$TOOL.data.remove("TOKEN")
this.$TOOL.data.remove("USER_INFO")
this.$TOOL.data.remove("MENU")
this.$TOOL.data.remove("PERMISSIONS")
this.$store.commit("clearViewTags")
this.$store.commit("clearKeepLive")
this.$store.commit("clearIframeList")
console.log('%c SCUI %c Gitee: https://gitee.com/lolicode/scui', 'background:#666;color:#fff;border-radius:3px;', '')
},
methods: {
async login(){
this.islogin = true
var data = {
username: this.ruleForm.user,
password: this.$TOOL.crypto.MD5(this.ruleForm.password)
}
//token
var user = await this.$API.auth.token.post(data)
if(user.code == 200){
this.$TOOL.data.set("TOKEN", user.data.token)
this.$TOOL.data.set("USER_INFO", user.data.userInfo)
}else{
this.islogin = false
this.$message.warning(user.message)
return false
}
//
var menu = null
if(this.ruleForm.user == 'admin'){
menu = await this.$API.system.menu.myMenus.get()
}else{
menu = await this.$API.demo.menu.get()
}
if(menu.code == 200){
this.$TOOL.data.set("MENU", menu.data.menu)
this.$TOOL.data.set("PERMISSIONS", menu.data.permissions)
}else{
this.islogin = false
this.$message.warning(menu.message)
return false
}
this.$router.replace({
path: '/'
})
this.$message.success("Login Success 登录成功")
this.islogin = false
}
}
}
</script>
<style scoped>
.login_bg {position: absolute;top:0px;left:0px;right:0px;bottom:0px;}
.login_container {position: absolute;top:50%;left:50%;width: 1100px;margin: 0 auto;z-index: 1;transform: translate(-50%, -50%);}
.login_body {width: inherit;display: flex;box-shadow: 0px 20px 80px 0px rgba(0,0,0,0.3);}
@ -128,78 +191,3 @@
.login-footer {margin-top: 0;}
}
</style>
<script>
export default {
data() {
return {
appName: this.$CONFIG.APP_NAME,
appVar: this.$CONFIG.APP_VER,
ruleForm: {
user: "admin",
password: "admin",
autologin: false
},
rules: {
user: [
{required: true, message: '请输入用户名', trigger: 'blur'}
],
password: [
{required: true, message: '请输入密码', trigger: 'blur'}
]
},
islogin: false
}
},
created: function() {
this.$TOOL.data.remove("user")
this.$TOOL.data.remove("grid")
this.$TOOL.data.remove("my-mods")
this.$store.commit("clearViewTags")
this.$store.commit("clearKeepLive")
this.$store.commit("clearIframeList")
console.log('%c SCUI %c Gitee: https://gitee.com/lolicode/scui', 'background:#666;color:#fff;border-radius:3px;', '')
},
methods: {
submitForm(formName, type) {
this.$refs[formName].validate((valid) => {
if (valid) {
type=='admin' && this.login()
type=='user' && this.login_demo()
}else{
console.log('error submit!!');
return false;
}
})
},
login: async function() {
this.islogin = true;
var data = {
user: this.$TOOL.crypto.MD5(this.ruleForm.user),
password: this.$TOOL.crypto.MD5(this.ruleForm.password)
}
var userInfo = await this.$API.user.login.get(data);
this.$TOOL.data.set("user", userInfo.data);
this.$router.replace({
path: '/'
});
//
this.$message.success("Login Success 登录成功")
},
login_demo: async function() {
this.islogin = true;
var data = {
user: this.$TOOL.crypto.MD5(this.ruleForm.user),
password: this.$TOOL.crypto.MD5(this.ruleForm.password)
}
var userInfo = await this.$API.user.login_demo.get(data);
this.$TOOL.data.set("user", userInfo.data);
this.$router.replace({
path: '/'
});
//
this.$message.success("Login Success 登录成功")
}
}
}
</script>

View File

@ -78,11 +78,11 @@
placeholder: '请选择通知类型',
extend: {
request: async () => {
var list = await this.$API.dic.info.get()
var list = await this.$API.system.dic.get.get()
return list.data.map(item => {
return {
label: item.name,
value: item.key
label: item.label,
value: item.value
}
})
}
@ -100,11 +100,11 @@
var data = {
keyword: query,
}
var list = await this.$API.dic.info.get(data)
var list = await this.$API.system.dic.get.get(data)
return list.data.map(item => {
return {
label: item.name,
value: item.key
label: item.label,
value: item.value
}
})
}

View File

@ -14,12 +14,12 @@
<el-row :gutter="15">
<el-col :lg="12">
<el-card shadow="never" header="异步单选">
<sc-select v-model="value" :apiObj="$API.dic.get" clearable filterable></sc-select>
<sc-select v-model="value" :apiObj="$API.system.dic.get" clearable filterable></sc-select>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" header="异步多选">
<sc-select v-model="value2" :apiObj="$API.dic.get" clearable filterable multiple></sc-select>
<sc-select v-model="value2" :apiObj="$API.system.dic.get" clearable filterable multiple></sc-select>
</el-card>
</el-col>
<el-col :lg="12">

View File

@ -48,7 +48,7 @@
name: 'upload',
data() {
return {
uploadApi: this.$API.demo.upload,
uploadApi: this.$API.common.upload,
imgurl: "img/avatar.jpg",
imgurl2: "",
imgurl3: "",

View File

@ -13,7 +13,7 @@ module.exports = {
port: 2800, //挂载端口
proxy: {
'/api': {
target: 'https://www.fastmock.site/mock/44c807475f7eeba73409792255781935/api',
target: 'https://www.fastmock.site/mock/5039c4361c39a7e3252c5b55971f1bd3/api',
ws: true,
pathRewrite: {
'^/api': '/'