projects/mes-zjl #388

Merged
juzi merged 4 commits from projects/mes-zjl into projects/mes-test 2024-08-05 15:36:00 +08:00
29 changed files with 2339 additions and 458 deletions
Showing only changes of commit 69aaacb1c7 - Show all commits

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title></title>
<g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="3-设备管理-设备保养-保养项目设置" transform="translate(-1713.000000, -32.000000)">
<g id="icon/banner/消息" transform="translate(1713.000000, 32.000000)">
<g id="编组">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<path d="M13.875,20.6585751 L13.9796526,20.6647179 C14.3523487,20.7094224 14.6,20.9943408 14.6,21.3949387 C14.6,21.793137 14.3546839,22.079785 13.9805499,22.1250542 L13.8720425,22.1313899 L10.125,22.1313023 L10.0203474,22.1251595 C9.64765132,22.080455 9.4,21.7955365 9.4,21.3949387 C9.4,20.9967404 9.64531608,20.7100924 10.0194501,20.6648232 L10.1279575,20.6584875 L13.875,20.6585751 Z M12,0.930991914 L12.114202,0.938656892 C12.4461465,0.982430206 12.6786924,1.21840343 12.7188472,1.56053658 L12.7250824,1.6705356 L12.724,2.83025932 L12.975759,2.90430031 L13.2244725,2.9413468 C16.687784,3.51732717 19.3536312,6.48703662 19.5838508,10.0724929 L19.5959741,10.3244915 L19.6000064,10.5775585 L19.6,18.0623023 L20.7499628,18.1131205 L20.8641749,18.1204751 C21.1961465,18.1642484 21.4286924,18.4002216 21.4688472,18.7423548 L21.4750824,18.8523538 L21.4678171,18.9675593 C21.4246486,19.3025982 21.1922705,19.5388574 20.8555499,19.5795997 L20.7470425,19.5859353 L3.25,19.5859353 L3.14534744,19.5797049 C2.77265132,19.5350005 2.525,19.250082 2.525,18.8494841 C2.525,18.4512975 2.77030543,18.1646386 3.1443756,18.1193685 L3.25285992,18.113033 L4.35003719,18.1123023 L4.4,10.5767569 L4.40403631,10.3246942 C4.524824,6.55675169 7.34298069,3.38911146 11.0266305,2.90405757 L11.229889,2.87995432 L11.275,1.66770897 L11.2823355,1.55103724 C11.3211556,1.24947788 11.5116242,1.02739927 11.7956288,0.955808301 L11.897531,0.937079811 L12,0.930991914 Z M12,4.31312051 C8.70150639,4.31312051 5.97362451,6.99932148 5.85407645,10.3480678 L5.85000794,10.5758657 L5.849,18.0622956 L18.099,18.1123023 L18.099,18.0619919 L18.1,17.9609919 L18.15,10.5767635 L18.1459233,10.3480647 C18.0266869,7.00812062 15.3071214,4.31312051 12,4.31312051 Z" id="形状结合" fill="#000000" fill-rule="nonzero"></path>
</g>
<circle id="Oval-1-Copy-2" fill="#F5222D" cx="18" cy="6" r="3"></circle>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title></title>
<g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="主页" transform="translate(-1713.000000, -32.000000)">
<g id="icon/banner/消息" transform="translate(1713.000000, 32.000000)">
<g id="编组">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<path d="M13.875,20.6585751 L13.9796526,20.6647179 C14.3523487,20.7094224 14.6,20.9943408 14.6,21.3949387 C14.6,21.793137 14.3546839,22.079785 13.9805499,22.1250542 L13.8720425,22.1313899 L10.125,22.1313023 L10.0203474,22.1251595 C9.64765132,22.080455 9.4,21.7955365 9.4,21.3949387 C9.4,20.9967404 9.64531608,20.7100924 10.0194501,20.6648232 L10.1279575,20.6584875 L13.875,20.6585751 Z M12,0.930991914 L12.114202,0.938656892 C12.4461465,0.982430206 12.6786924,1.21840343 12.7188472,1.56053658 L12.7250824,1.6705356 L12.724,2.83025932 L12.975759,2.90430031 L13.2244725,2.9413468 C16.687784,3.51732717 19.3536312,6.48703662 19.5838508,10.0724929 L19.5959741,10.3244915 L19.6000064,10.5775585 L19.6,18.0623023 L20.7499628,18.1131205 L20.8641749,18.1204751 C21.1961465,18.1642484 21.4286924,18.4002216 21.4688472,18.7423548 L21.4750824,18.8523538 L21.4678171,18.9675593 C21.4246486,19.3025982 21.1922705,19.5388574 20.8555499,19.5795997 L20.7470425,19.5859353 L3.25,19.5859353 L3.14534744,19.5797049 C2.77265132,19.5350005 2.525,19.250082 2.525,18.8494841 C2.525,18.4512975 2.77030543,18.1646386 3.1443756,18.1193685 L3.25285992,18.113033 L4.35003719,18.1123023 L4.4,10.5767569 L4.40403631,10.3246942 C4.524824,6.55675169 7.34298069,3.38911146 11.0266305,2.90405757 L11.229889,2.87995432 L11.275,1.66770897 L11.2823355,1.55103724 C11.3211556,1.24947788 11.5116242,1.02739927 11.7956288,0.955808301 L11.897531,0.937079811 L12,0.930991914 Z M12,4.31312051 C8.70150639,4.31312051 5.97362451,6.99932148 5.85407645,10.3480678 L5.85000794,10.5758657 L5.849,18.0622956 L18.099,18.1123023 L18.15,10.5767635 L18.1459233,10.3480647 C18.0266869,7.00812062 15.3071214,4.31312051 12,4.31312051 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
<circle id="Oval-1-Copy-2" fill="#F5222D" cx="18" cy="6" r="3"></circle>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title></title>
<g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="主页" transform="translate(-992.000000, -521.000000)">
<g id="设备告警" transform="translate(992.000000, 521.000000)">
<rect id="矩形" fill="#0B58FF" x="0" y="0" width="32" height="32" rx="16"></rect>
<g id="告警视图" transform="translate(8.196906, 8.196906)" fill-rule="nonzero">
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="15.6061876" height="15.6061876"></rect>
<path d="M0,11.6800274 L0,1 C-1.78657678e-16,0.44771525 0.44771525,5.45542273e-16 1,0 L14.6061876,0 C15.1584723,-1.01453063e-16 15.6061876,0.44771525 15.6061876,1 L15.6061876,11.6800274 C15.6061876,12.2323122 15.1584723,12.6800274 14.6061876,12.6800274 L1,12.6800274 C0.44771525,12.6800274 -3.76453835e-16,12.2323122 0,11.6800274 Z M13.6554141,1.95077345 L1.95077345,1.95077345 L1.95077345,10.729254 L13.6554141,10.729254 L13.6554141,1.95077345 Z M7.80309379,6.82770706 C7.26440257,6.82770706 6.82770706,6.39101155 6.82770706,5.85232034 L6.82770706,3.90154689 C6.82770706,3.36285568 7.26440257,2.92616017 7.80309379,2.92616017 C8.341785,2.92616017 8.77848051,3.36285568 8.77848051,3.90154689 L8.77848051,5.85232034 C8.77848051,6.39101155 8.341785,6.82770706 7.80309379,6.82770706 Z M7.80309379,9.75386723 C7.26440257,9.75386723 6.82770706,9.31717172 6.82770706,8.77848051 C6.82770706,8.2397893 7.26440257,7.80309379 7.80309379,7.80309379 C8.341785,7.80309379 8.77848051,8.2397893 8.77848051,8.77848051 C8.77848051,9.31717172 8.341785,9.75386723 7.80309379,9.75386723 Z M11.7046407,15.6061876 L3.90154689,15.6061876 C3.36285568,15.6061876 2.92616017,15.1694921 2.92616017,14.6308009 C2.92616017,14.0921096 3.36285568,13.6554141 3.90154689,13.6554141 L11.7046407,13.6554141 C12.2433319,13.6554141 12.6800274,14.0921096 12.6800274,14.6308009 C12.6800274,15.1694921 12.2433319,15.6061876 11.7046407,15.6061876 Z" id="形状" fill="#FFFFFF"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title></title>
<g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="主页" transform="translate(-873.000000, -386.000000)">
<g id="设备管理" transform="translate(873.000000, 386.000000)">
<rect id="矩形备份-7" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="55" height="55"></rect>
<g id="编组-13" transform="translate(3.180289, 2.923263)">
<g id="编组-10" fill-rule="nonzero">
<g id="设备" fill="#0B58FF">
<rect id="矩形" opacity="0" x="2.00676053" y="1.65338444" width="46.1399529" height="46.1399529"></rect>
<g id="烧瓶,实验,化学,科学">
<rect id="矩形" opacity="0" x="4.42964393" y="4.42964393" width="41.294186" height="41.294186"></rect>
<g id="还原画布">
<rect id="矩形" opacity="0" x="0" y="0" width="50.1534739" height="50.1534739"></rect>
<path d="M1.72467326,45.9476439 C1.72467326,47.1152471 2.60037565,47.9909495 3.76797884,47.9909495 L46.3854951,47.9909495 C47.5530983,47.9909495 48.4288007,47.1152471 48.4288007,45.9476439 L48.4288007,13.8385563 L1.72467326,13.8385563 L1.72467326,45.9476439 Z M18.1370611,29.0173977 L38.650124,29.0173977 C39.6980043,29.0173977 40.5474792,29.8668726 40.5474792,30.9147529 C40.5474792,31.9626332 39.6980043,32.8121081 38.650124,32.8121081 L18.1370611,32.8121081 C17.0891807,32.8121081 16.2397059,31.9626332 16.2397059,30.9147529 C16.2397059,29.8668726 17.0891807,29.0173977 18.1370611,29.0173977 Z M10.2370348,36.6068184 L38.650124,36.6068184 C39.6980043,36.6068184 40.5474792,37.4562933 40.5474792,38.5041736 C40.5474792,39.5520539 39.6980043,40.4015288 38.650124,40.4015288 L10.2370348,40.4015288 C9.18915443,40.4015288 8.33967958,39.5520539 8.33967958,38.5041736 C8.33967958,37.4562933 9.18915443,36.6068184 10.2370348,36.6068184 Z M24.2010346,11.7952507 L1.72467326,11.7952507 L6.395086,3.62202844 C6.9788876,2.74632605 8.14649078,2.16252446 9.31409396,2.16252446 L23.9091338,2.16252446 L23.9091338,11.7952507 L24.2010346,11.7952507 Z M48.4288007,11.7952507 L26.2443401,11.7952507 L26.2443401,2.45442526 L40.8393799,2.45442526 C42.0069831,2.45442526 43.1745863,3.03822685 43.7583879,3.91392924 L48.4288007,11.7952507 Z" id="形状"></path>
</g>
</g>
</g>
<g id="还原画布" transform="translate(1.723618, 2.162524)" fill="#18104D">
<path d="M22.4763613,9.63272627 L0,9.63272627 L4.67041274,1.45950398 C5.25421433,0.583801592 6.42181752,0 7.5894207,0 L22.1844605,0 L22.1844605,9.63272627 L22.4763613,9.63272627 Z" id="形状"></path>
</g>
<g id="还原画布" transform="translate(26.191259, 2.454425)" fill="#18104D">
<path d="M22.1844605,9.34082548 L0,9.34082548 L0,0 L14.5950398,0 C15.762643,0 16.9302462,0.583801592 17.5140478,1.45950398 L22.1844605,9.34082548 Z" id="形状"></path>
</g>
</g>
<path d="M12.3066146,-5.29775726 L15.1753655,-3.62876956 C15.5740069,-3.25849694 15.8853072,-2.83209012 16.1092662,-2.34954908 C16.3332252,-1.86700804 16.4452047,-1.36084209 16.4452047,-0.831051217 L16.4452047,13.7613962 L12.3066146,13.7613962 L12.3066146,-5.29775726 Z" id="矩形" fill="#69F8AF" transform="translate(14.375910, 4.231819) rotate(-90.000000) translate(-14.375910, -4.231819) "></path>
<path d="M33.62186,-5.29775726 L36.4906108,-3.62876956 C36.8892523,-3.25849694 37.2005525,-2.83209012 37.4245115,-2.34954908 C37.6484705,-1.86700804 37.76045,-1.36084209 37.76045,-0.831051217 L37.76045,13.7613962 L33.62186,13.7613962 L33.62186,-5.29775726 Z" id="矩形备份-5" fill="#69F8AF" transform="translate(35.691155, 4.231819) scale(-1, 1) rotate(-90.000000) translate(-35.691155, -4.231819) "></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title></title>
<g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="主页" transform="translate(-992.000000, -164.000000)">
<g id="编组-8备份" transform="translate(968.000000, 140.000000)">
<g id="设备总览" transform="translate(24.000000, 24.000000)">
<rect id="矩形" fill="#0B58FF" x="0" y="0" width="32" height="32" rx="16"></rect>
<g id="烧瓶,实验,化学,科学" transform="translate(7.000000, 7.000000)" fill="#FFFFFF" fill-rule="nonzero">
<rect id="矩形" opacity="0" x="0.723623255" y="0.596198408" width="16.6377315" height="16.6377315"></rect>
<g>
<rect id="矩形" opacity="0" x="1.59729739" y="1.59729739" width="14.8903832" height="14.8903832"></rect>
<g id="还原画布">
<rect id="矩形" opacity="0" x="0" y="0" width="18.084978" height="18.084978"></rect>
<g id="玻璃" transform="translate(0.634017, 0.634017)">
<path d="M13.2593143,16.8169433 L0.5,16.8169433 C0.223857625,16.8169433 2.55862292e-16,16.5930857 0,16.3169433 L0,0.5 C-3.38176876e-17,0.223857625 0.223857625,1.61748834e-16 0.5,0 L13.2593143,0 C13.5354566,-5.07265313e-17 13.7593143,0.223857625 13.7593143,0.5 L13.7593143,16.3169433 C13.7593143,16.5930857 13.5354566,16.8169433 13.2593143,16.8169433 Z M1.37593143,15.2881288 L12.3833828,15.2881288 L12.3833828,1.52881452 L1.37593143,1.52881452 L1.37593143,15.2881288 Z M16.3169433,15.2881288 L13.4949152,15.2881288 C13.2187728,15.2881288 12.9949152,15.0642712 12.9949152,14.7881288 L12.9949152,2.02881452 C12.9949152,1.75267215 13.2187728,1.52881452 13.4949152,1.52881452 L16.3169433,1.52881452 C16.5930857,1.52881452 16.8169433,1.75267215 16.8169433,2.02881452 L16.8169433,14.7881288 C16.8169433,15.0642712 16.5930857,15.2881288 16.3169433,15.2881288 Z M3.2320096,9.37531556 C2.97585886,9.13419414 2.9636752,8.7310754 3.20479662,8.47492467 C3.20919378,8.47025343 3.21366127,8.46564888 3.21819754,8.46111261 L9.1694159,2.50989424 C9.42803493,2.25127521 9.84535293,2.24497024 10.1116667,2.49565843 C10.3678175,2.73677985 10.3800011,3.13989859 10.1388797,3.39604932 C10.1344826,3.40072056 10.1300151,3.40532511 10.1254788,3.40986138 L4.17426043,9.36107975 C3.9156414,9.61969878 3.4983234,9.62600375 3.2320096,9.37531556 Z M4.03073192,13.7322196 C3.77458118,13.4910982 3.76239752,13.0879795 4.00351894,12.8318287 C4.00791611,12.8271575 4.01238359,12.8225529 4.01691986,12.8180167 L9.96813823,6.86679831 C10.2267573,6.60817928 10.6440753,6.60187431 10.9103891,6.85256249 C11.1665398,7.09368392 11.1787235,7.49680265 10.937602,7.75295339 C10.9332049,7.75762463 10.9287374,7.76222918 10.9242011,7.76676545 L4.97298275,13.7179838 C4.71436372,13.9766028 4.29704572,13.9829078 4.03073192,13.7322196 Z" id="形状"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title></title>
<g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="主页" transform="translate(-506.000000, -386.000000)">
<g id="订单管理" transform="translate(506.000000, 386.000000)">
<rect id="矩形" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="55" height="55"></rect>
<g id="订单" transform="translate(0.499522, 1.000000)" fill-rule="nonzero">
<path d="M29.5269045,4.05189545 C43.5955288,4.05189545 55.0009567,15.4573234 55.0009567,29.5259477 C55.0009567,43.594572 43.5955288,55 29.5269045,55 C15.4582801,55 4.05285219,43.594572 4.05285219,29.5259477 C4.05285219,15.4573234 15.4582801,4.05189545 29.5269045,4.05189545 L29.5269045,4.05189545 Z M29.5269045,9.84145279 C18.6552737,9.84145279 9.84240952,18.654317 9.84240952,29.5259477 C9.84240952,40.3975785 18.6552737,49.2104427 29.5269045,49.2104427 C40.3985352,49.2104427 49.2113994,40.3975785 49.2113994,29.5259477 C49.2113994,18.654317 40.3985352,9.84145279 29.5269045,9.84145279 Z M29.5269045,13.3151872 C38.4798759,13.3151872 45.737665,20.5729763 45.737665,29.5259477 C45.737665,38.4789192 38.4798759,45.7367083 29.5269045,45.7367083 C20.573933,45.7367083 13.3161439,38.4789192 13.3161439,29.5259477 C13.3161439,20.5729763 20.573933,13.3151872 29.5269045,13.3151872 Z" id="形状" fill="#0B58FF"></path>
<path d="M29.5269045,17.9468331 C35.9220495,17.9468331 41.1060191,23.1308027 41.1060191,29.5259477 C41.1060191,35.9210928 35.9220495,41.1050624 29.5269045,41.1050624 C23.1317594,41.1050624 17.9477898,35.9210928 17.9477898,29.5259477 C17.9477898,23.1308027 23.1317594,17.9468331 29.5269045,17.9468331 Z M29.5269045,21.4205675 C25.0504265,21.4205675 21.4215242,25.0494698 21.4215242,29.5259477 C21.4215242,34.0024256 25.0504265,37.631328 29.5269045,37.631328 C34.0033824,37.631328 37.6322847,34.0024256 37.6322847,29.5259477 C37.6322847,25.0494698 34.0033824,21.4205675 29.5269045,21.4205675 Z" id="形状" fill="#69F8AF"></path>
<path d="M26.0531701,29.5259477 C26.0531701,30.7669935 26.7152601,31.9137671 27.7900372,32.53429 C28.8648144,33.154813 30.1889945,33.154813 31.2637717,32.53429 C32.3385489,31.9137671 33.0006389,30.7669935 33.0006389,29.5259477 C33.0006389,27.6074572 31.445395,26.0522133 29.5269045,26.0522133 C27.6084139,26.0522133 26.0531701,27.6074572 26.0531701,29.5259477 L26.0531701,29.5259477 Z" id="路径" fill="#69F8AF"></path>
<path d="M5.16097346,0.068680005 L11.4032742,6.31213864 C11.5452724,6.45390019 11.6069803,6.65727562 11.5676976,6.8540412 L10.9864261,9.75692525 L30.1405975,28.9122546 C30.4594387,29.2544288 30.4500307,29.787647 30.1193172,30.1183605 C29.7886037,30.449074 29.2553855,30.458482 28.9132114,30.1396408 L9.75788199,10.9854693 L6.85499794,11.5667409 C6.65823235,11.6060236 6.45485693,11.5443156 6.31309537,11.4023174 L0.070794654,5.16001673 C0.00785917816,5.09751387 -0.0154139259,5.00536463 0.010295925,4.92047361 C0.036005776,4.8355826 0.10649489,4.77182992 0.19353327,4.75474771 L3.60358254,4.07273786 C3.84074434,4.02516282 4.02611955,3.8397876 4.0736946,3.6026258 L4.75686236,0.192576532 C4.77415833,0.106307273 4.83733049,0.0364492466 4.92143088,0.0105907928 C5.00553127,-0.015267661 5.0970389,0.00703077709 5.15981555,0.068680005 L5.16097346,0.068680005 Z" id="路径" fill="#18104D"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title></title>
<g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="主页" transform="translate(-64.000000, -521.000000)">
<g id="工单监控" transform="translate(64.000000, 521.000000)">
<g id="监控" transform="translate(0.000000, 0.000000)" fill="#000000" fill-rule="nonzero" opacity="0">
<rect id="矩形" x="0" y="0" width="32" height="32"></rect>
</g>
<rect id="矩形" fill="#0B58FF" x="0" y="0" width="32" height="32" rx="16"></rect>
<path d="M7.95196014,15.04804 C7.95196014,17.9233277 9.4859078,20.5802032 11.97598,22.0178471 C14.4660522,23.455491 17.5339478,23.455491 20.02402,22.0178471 C22.5140922,20.5802032 24.0480399,17.9233277 24.0480399,15.04804 C24.0480399,12.1727522 22.5140922,9.51587679 20.02402,8.07823291 C17.5339477,6.64058903 14.4660523,6.64058903 11.97598,8.07823291 C9.48590782,9.51587679 7.95196014,12.1727522 7.95196014,15.04804 L7.95196014,15.04804 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M10.5399801,15.04804 C10.5399801,18.0635257 12.9845143,20.5080599 16,20.5080599 C19.0154857,20.5080599 21.4600199,18.0635257 21.4600199,15.04804 C21.4600199,12.0325543 19.0154857,9.58802008 16,9.58802008 C12.9845143,9.58802008 10.5399801,12.0325543 10.5399801,15.04804 L10.5399801,15.04804 Z" id="路径" fill="#0B58FF" fill-rule="nonzero"></path>
<path d="M13.12154,13.60882 C13.12154,14.4036848 13.7659053,15.04805 14.56077,15.04805 C15.3556348,15.04805 16,14.4036848 16,13.60882 C16,12.8139552 15.3556348,12.16959 14.56077,12.16959 C13.7659053,12.16959 13.12154,12.8139552 13.12154,13.60882 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M11.4822601,22.9347398 L10.8368601,22.9347398 L10.1914601,24.9999998 L21.8085399,24.9999998 L21.1631399,22.9347398 L20.5177399,22.9347398 C17.7631022,24.6949766 14.2368978,24.6949766 11.4822601,22.9347398 L11.4822601,22.9347398 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title></title>
<g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="主页" transform="translate(-64.000000, -164.000000)">
<g id="编组-8" transform="translate(40.000000, 140.000000)">
<g id="生产总览" transform="translate(24.000000, 24.000000)">
<rect id="矩形" fill="#0B58FF" x="0" y="0" width="32" height="32" rx="16"></rect>
<path d="M8.37437968,12.8114326 L15.7504058,17.0898781 C15.8242411,17.1328167 15.9080324,17.1555207 15.9933456,17.1555207 C16.0810002,17.1555207 16.1670458,17.131811 16.2414377,17.0872002 L23.5609995,12.8417393 C23.7926594,12.7069596 23.8719923,12.4078775 23.7377553,12.1750584 C23.6941637,12.0993735 23.6311005,12.036866 23.5563023,11.9947862 L16.2647451,7.74687591 C16.1909326,7.70388503 16.1071411,7.68113461 16.0218216,7.68113461 C15.9265067,7.68101965 15.8332679,7.70910321 15.7537378,7.76188227 L8.44005972,12.0039794 C8.20831857,12.137714 8.12809173,12.4360124 8.26123967,12.6689293 C8.29129448,12.7215224 8.33087471,12.7680046 8.37793917,12.8059787 L8.37437968,12.8114326 Z M21.6810442,15.0685273 L21.2137792,15.3395552 L21.2137792,15.3395552 L16.4927009,18.0091478 C16.1870188,18.1819995 15.8130711,18.1818429 15.5075339,18.0087351 L10.3178102,15.0684002 C10.0088558,14.8933563 9.63024672,14.895282 9.32308895,15.0734597 L8.44007598,15.5856824 L8.44007598,15.5856824 C8.20833482,15.719417 8.12807547,16.017699 8.26125592,16.2505344 C8.29182536,16.3040667 8.33225083,16.351269 8.38037719,16.3896249 L8.37728903,16.3948175 L15.7504708,20.6715484 C15.9025556,20.7600033 16.0903428,20.7590041 16.2414864,20.6689358 L23.5609995,16.4234259 C23.7926756,16.2885809 23.8720085,15.9895315 23.7377716,15.7567777 C23.6940662,15.6810601 23.6310842,15.61852 23.556286,15.5764238 L22.6861859,15.0694958 C22.3756549,14.8885777 21.9919233,14.8882079 21.6810442,15.0685273 Z M21.6866857,18.6534468 L21.2195166,18.924426 L21.2195166,18.924426 L16.4950848,21.6207262 C16.1882146,21.7958614 15.8117014,21.7960578 15.5046487,21.6212428 L10.7829566,18.9330314 L10.7829566,18.9330314 L10.3151216,18.661704 C10.0048329,18.4817477 9.6219281,18.4817646 9.31165532,18.6617485 L8.44007598,19.1673364 L8.44007598,19.1673364 C8.20833482,19.3010546 8.12810798,19.5993693 8.26125592,19.8322047 C8.29148444,19.8851411 8.33137304,19.9318794 8.37883311,19.9699725 L8.37546865,19.9753448 L15.7504221,24.2531371 C15.8242543,24.2960928 15.9080429,24.3187608 15.9933618,24.3188656 C16.0806614,24.3189335 16.1663657,24.2953601 16.2414539,24.2506225 L23.5610157,20.0050799 C23.7926756,19.8702023 23.8720085,19.5710875 23.7377716,19.3384318 C23.6941799,19.2627141 23.6311817,19.2001577 23.5563023,19.1580778 L22.6918543,18.6544197 C22.3813173,18.4734898 21.9975724,18.4731184 21.6866857,18.6534468 Z" id="形状" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title></title>
<g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="主页" transform="translate(-1240.000000, -386.000000)">
<g id="质量管理" transform="translate(1240.000000, 386.000000)">
<rect id="矩形备份-10" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="55" height="55"></rect>
<g id="08质量" transform="translate(3.882568, 2.468968)">
<g id="编组-14" transform="translate(0.000000, 0.000000)">
<path d="M48.2348648,9.32705134 L48.2348648,23.3176283 C48.2348648,36.256626 39.5936261,48.3269278 28.0262536,51.2987824 C16.4131602,48.3726486 7.7719215,36.256626 7.7719215,23.3176283 L7.7719215,9.32705134 L28.0262536,0 L48.2348648,9.32705134 Z" id="路径" fill="#18104D" fill-rule="nonzero"></path>
<path d="M40.4629433,9.32705134 L40.4629433,23.3176283 C40.4629433,36.256626 31.8217046,48.3269278 20.2543321,51.2987824 C8.64123874,48.3726486 0,36.256626 0,23.3176283 L0,9.32705134 L20.2543321,0 L40.4629433,9.32705134 Z" id="形状" fill="#0B58FF" fill-rule="nonzero"></path>
<path d="M16.4804726,44.8381311 L23.9367499,44.8381311 C23.7967766,45.6009048 23.3406372,46.4633989 22.5683316,47.4256133 C21.4098731,48.8689349 20.2086112,49.4830135 20.2086112,49.4830135 C20.2086112,49.4830135 18.8612116,48.5451406 17.9626413,47.4256133 C17.3635945,46.6792617 16.8695382,45.8167676 16.4804726,44.8381311 Z" id="路径-2" fill="#69F8AF"></path>
<path d="M20.2086112,14.5392271 C26.2894829,14.5392271 31.1816128,19.431357 31.1816128,25.5122287 C31.1816128,28.84985 29.6728251,31.8217046 27.3410623,33.8334215 L28.7355479,35.2279071 C29.4551992,35.9475584 29.4551992,37.1143437 28.7355479,37.833995 C28.0158966,38.5536463 26.8491113,38.5536463 26.12946,37.833995 L24.0948826,35.7994176 C22.8604199,36.2109052 21.5802364,36.4852302 20.2086112,36.4852302 C14.1277395,36.4852302 9.23560966,31.5473795 9.23560966,25.5122287 C9.23560966,19.4770778 14.1277395,14.5392271 20.2086112,14.5392271 Z M20.2086112,18.1968943 C16.1851773,18.1968943 12.8932768,21.4887947 12.8932768,25.5122287 C12.8932768,29.5356626 16.1851773,32.827563 20.2086112,32.827563 C20.4829363,32.827563 20.8029821,32.827563 21.0773072,32.7818422 L20.9630051,32.6675401 C20.2433538,31.9478888 20.2433538,30.7811035 20.9630051,30.0614522 C21.6826564,29.3418009 22.8494417,29.3418009 23.569093,30.0614522 L24.7349744,31.2273336 C26.4266455,29.9014293 27.5239456,27.8439915 27.5239456,25.5122287 C27.5239456,21.4887947 24.2320451,18.1968943 20.2086112,18.1968943 Z" id="形状结合" fill="#FFFFFF"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title></title>
<g id="主界面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="主页" transform="translate(-1607.000000, -386.000000)">
<g id="仓库管理" transform="translate(1607.000000, 386.000000)">
<rect id="矩形备份-11" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="55" height="55"></rect>
<g id="编组" transform="translate(4.828118, 3.724695)" fill-rule="nonzero">
<path d="M46.3437634,22.1260999 C46.3437634,20.5189711 45.6536539,18.9916368 44.4577566,17.9509367 L24.3260872,0.434356738 C23.6604711,-0.144785579 22.6832923,-0.144785579 22.0176762,0.434356738 L1.88600685,17.9509367 C0.689748793,18.9917824 0,20.5183296 0,22.1260999 L0,31.9992652 L23.1718817,30.7180576 L46.3437634,31.9992652 L46.3437634,22.1260999 Z" id="路径" fill="#18104D"></path>
<path d="M24.3260873,10.3527476 L46.3437634,28.9647616 L46.3437634,46.7765289 C46.3437634,47.7558213 45.5461328,48.5506093 44.560889,48.5506093 L29.4914859,48.5506093 L29.4914859,38.0698881 C29.4914859,34.5968826 26.6621028,31.7814554 23.1718819,31.7814554 C19.6816609,31.7814554 16.8522778,34.5968826 16.8522778,38.0698881 L16.8522778,48.5506093 L1.78287475,48.5506093 C1.3098369,48.5506093 0.856189467,48.363548 0.521804101,48.0306072 C0.187418735,47.6976665 0,47.2461416 0,46.7754371 L0,28.9636698 L22.0176764,10.3527476 C22.6832925,9.7901594 23.6604713,9.7901594 24.3260873,10.3527476 Z" id="路径" fill="#0B58FF"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
src/assets/img/alarm-bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
src/assets/img/home-bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 B

View File

@ -2,26 +2,39 @@
<el-menu <el-menu
:default-active="activeMenu" :default-active="activeMenu"
mode="horizontal" mode="horizontal"
@select="handleSelect" @select="handleSelect">
>
<template v-for="(item, index) in topMenus"> <template v-for="(item, index) in topMenus">
<el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber"> <el-menu-item
<svg-icon :icon-class="item.meta.icon"/> :style="{ '--theme': theme }"
:index="item.path"
:key="index"
v-if="index < visibleNumber">
<!-- <svg-icon :icon-class="item.meta.icon" /> -->
<span class="menu-box" :class="{ active: item.path === currentIndex }">
<span class="menu-dot"></span>
{{ item.meta.title }} {{ item.meta.title }}
</span>
</el-menu-item> </el-menu-item>
</template> </template>
<!-- 顶部菜单超出数量折叠 --> <!-- 顶部菜单超出数量折叠 -->
<el-submenu :style="{'--theme': theme}" index="more" v-if="topMenus.length > visibleNumber"> <el-submenu
:style="{ '--theme': theme }"
index="more"
v-if="topMenus.length > visibleNumber">
<template slot="title">更多菜单</template> <template slot="title">更多菜单</template>
<template v-for="(item, index) in topMenus"> <template v-for="(item, index) in topMenus">
<el-menu-item <el-menu-item
:index="item.path" :index="item.path"
:key="index" :key="index"
v-if="index >= visibleNumber" v-if="index >= visibleNumber">
> <!-- <svg-icon :icon-class="item.meta.icon" /> -->
<svg-icon :icon-class="item.meta.icon"/> <span
class="menu-box"
:class="{ active: item.path === currentIndex }">
<span class="menu-dot"></span>
{{ item.meta.title }} {{ item.meta.title }}
</span>
</el-menu-item> </el-menu-item>
</template> </template>
</el-submenu> </el-submenu>
@ -29,7 +42,8 @@
</template> </template>
<script> <script>
import { constantRoutes } from "@/router"; import { mapGetters } from 'vuex';
import { constantRoutes } from '@/router';
// //
const hideList = ['/index', '/user/profile']; const hideList = ['/index', '/user/profile'];
@ -40,10 +54,14 @@ export default {
// //
visibleNumber: 5, visibleNumber: 5,
// index // index
currentIndex: undefined // currentIndex: undefined,
}; };
}, },
computed: { computed: {
...mapGetters(['choicepart']),
currentIndex() {
return this.choicepart;
},
theme() { theme() {
return this.$store.state.settings.theme; return this.$store.state.settings.theme;
}, },
@ -53,13 +71,14 @@ export default {
this.routers.map((menu) => { this.routers.map((menu) => {
if (menu.hidden !== true) { if (menu.hidden !== true) {
// //
if (menu.path === "/") { if (menu.path === '/') {
topMenus.push(menu.children[0]); topMenus.push(menu.children[0]);
} else { } else {
topMenus.push(menu); topMenus.push(menu);
} }
} }
}); });
console.log('topMenus:', topMenus);
return topMenus; return topMenus;
}, },
// //
@ -72,11 +91,12 @@ export default {
this.routers.map((router) => { this.routers.map((router) => {
for (let item in router.children) { for (let item in router.children) {
if (router.children[item].parentPath === undefined) { if (router.children[item].parentPath === undefined) {
if(router.path === "/") { if (router.path === '/') {
router.children[item].path = "/" + router.children[item].path; router.children[item].path = '/' + router.children[item].path;
} else { } else {
if(!this.ishttp(router.children[item].path)) { if (!this.ishttp(router.children[item].path)) {
router.children[item].path = router.path + "/" + router.children[item].path; router.children[item].path =
router.path + '/' + router.children[item].path;
} }
} }
router.children[item].parentPath = router.path; router.children[item].parentPath = router.path;
@ -90,13 +110,17 @@ export default {
activeMenu() { activeMenu() {
const path = this.$route.path; const path = this.$route.path;
let activePath = path; let activePath = path;
if (path !== undefined && path.lastIndexOf("/") > 0 && hideList.indexOf(path) === -1) { if (
path !== undefined &&
path.lastIndexOf('/') > 0 &&
hideList.indexOf(path) === -1
) {
const tmpPath = path.substring(1, path.length); const tmpPath = path.substring(1, path.length);
activePath = "/" + tmpPath.substring(0, tmpPath.indexOf("/")); activePath = '/' + tmpPath.substring(0, tmpPath.indexOf('/'));
if (!this.$route.meta.link) { if (!this.$route.meta.link) {
this.$store.dispatch('app/toggleSideBarHide', false) this.$store.dispatch('app/toggleSideBarHide', false);
} }
} else if(!this.$route.children) { } else if (!this.$route.children) {
activePath = path; activePath = path;
this.$store.dispatch('app/toggleSideBarHide', true); this.$store.dispatch('app/toggleSideBarHide', true);
} }
@ -105,10 +129,10 @@ export default {
}, },
}, },
beforeMount() { beforeMount() {
window.addEventListener('resize', this.setVisibleNumber) window.addEventListener('resize', this.setVisibleNumber);
}, },
beforeDestroy() { beforeDestroy() {
window.removeEventListener('resize', this.setVisibleNumber) window.removeEventListener('resize', this.setVisibleNumber);
}, },
mounted() { mounted() {
this.setVisibleNumber(); this.setVisibleNumber();
@ -116,47 +140,67 @@ export default {
methods: { methods: {
// //
setVisibleNumber() { setVisibleNumber() {
const width = document.body.getBoundingClientRect().width / 3; const width = window.innerWidth - 800;
this.visibleNumber = parseInt(width / 85); console.log(width);
console.log('window.innerWidth:', window.innerWidth);
this.visibleNumber = parseInt(width / 100);
console.log('this.visibleNumber:', this.visibleNumber);
}, },
// //
handleSelect(key, keyPath) { handleSelect(key, keyPath) {
this.currentIndex = key; // this.currentIndex = key;
const route = this.routers.find(item => item.path === key); const route = this.routers.find((item) => item.path === key);
if (this.ishttp(key)) { console.log('route:', route);
// http(s):// this.$store.dispatch('app/setChoicepart', key);
window.open(key, "_blank"); this.toRouter(route);
} else if (!route || !route.children) { // if (this.ishttp(key)) {
// // // http(s)://
this.$router.push({ path: key }); // window.open(key, '_blank');
this.$store.dispatch('app/toggleSideBarHide', true); // console.log('aaaaaaaaaaaaaa');
// } else if (!route || !route.children) {
// //
// this.$router.push({ path: key });
// this.$store.dispatch('app/toggleSideBarHide', true);
// console.log('bbbbbbbbbbbbbbb');
// } else {
// //
// this.activeRoutes(key);
// if (!this.$route.meta.link) {
// this.$store.dispatch('app/toggleSideBarHide', false);
// }
// console.log('cccccccccccccccc');
// }
},
toRouter(item) {
console.log(item);
if (item.children) {
this.toRouter(item.children[0]);
} else { } else {
// this.$router.push({ name: item.name });
this.activeRoutes(key);
if (!this.$route.meta.link) {
this.$store.dispatch('app/toggleSideBarHide', false);
}
} }
}, },
// //
activeRoutes(key) { activeRoutes(key) {
const routes = [] const routes = [];
if (this.childrenMenus && this.childrenMenus.length > 0) { if (this.childrenMenus && this.childrenMenus.length > 0) {
this.childrenMenus.map((item) => { this.childrenMenus.map((item) => {
if (key === item.parentPath || (key === "index" && "" === item.path)) { if (
key === item.parentPath ||
(key === 'index' && '' === item.path)
) {
routes.push(item); routes.push(item);
} }
}); });
} }
if(routes.length > 0) { if (routes.length > 0) {
this.$store.commit("SET_SIDEBAR_ROUTERS", routes); this.$store.commit('SET_SIDEBAR_ROUTERS', routes);
} else { } else {
this.$store.dispatch('app/toggleSideBarHide', true); this.$store.dispatch('app/toggleSideBarHide', true);
} }
}, },
ishttp(url) { ishttp(url) {
return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1 return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1;
} },
}, },
}; };
</script> </script>
@ -165,13 +209,14 @@ export default {
.topmenu-container.el-menu--horizontal > .el-menu-item { .topmenu-container.el-menu--horizontal > .el-menu-item {
float: left; float: left;
height: 50px !important; height: 50px !important;
line-height: 50px !important; line-height: 45px !important;
color: #999093 !important; color: #999093 !important;
padding: 0 5px !important; padding: 0 5px !important;
margin: 0 10px !important; // margin: 0 10px !important;
} }
.topmenu-container.el-menu--horizontal > .el-menu-item.is-active, .el-menu--horizontal > .el-submenu.is-active .el-submenu__title { .topmenu-container.el-menu--horizontal > .el-menu-item.is-active,
.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
border-bottom: 2px solid #{'var(--theme)'} !important; border-bottom: 2px solid #{'var(--theme)'} !important;
color: #303133; color: #303133;
} }
@ -181,8 +226,31 @@ export default {
float: left; float: left;
height: 50px !important; height: 50px !important;
line-height: 50px !important; line-height: 50px !important;
color: #999093 !important; color: #000 !important;
padding: 0 5px !important; padding: 0 5px !important;
margin: 0 10px !important; margin: 0 10px !important;
} }
</style> </style>
<style lang="scss" scoped>
.menu-box {
padding: 3px 10px 5px 10px;
border-radius: 30px;
color: #000;
}
.active {
background: #dce7ff;
.menu-dot {
opacity: 1;
}
}
.menu-dot {
display: inline-block;
width: 5px;
height: 5px;
border-radius: 50%;
background: #0b58ff;
margin-right: 3px;
margin-bottom: 2px;
opacity: 0;
}
</style>

View File

@ -1,62 +1,34 @@
<template> <template>
<div class="navbar"> <div class="navbar">
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> <hamburger
id="hamburger-container"
:is-active="sidebar.opened"
class="hamburger-container"
@toggleClick="toggleSideBar" />
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/> <breadcrumb
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/> id="breadcrumb-container"
class="breadcrumb-container"
v-if="!topNav" />
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
<div style="padding-top: 5px; padding-right: 38px;"> <div style="padding-top: 5px; padding-right: 38px">
<navbar-right :blackTitle='true'/> <navbar-right :blackTitle="true" />
</div> </div>
<!-- <div class="right-menu"> -->
<!-- <template v-if="device!=='mobile'"> -->
<!-- <search id="header-search" class="right-menu-item" /> -->
<!-- 站内信 -->
<!-- <notify-message class="right-menu-item hover-effect" /> -->
<!-- <screenfull id="screenfull" class="right-menu-item hover-effect" /> -->
<!-- <el-tooltip content="布局大小" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip> -->
<!-- </template> -->
<!-- <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper"> -->
<!-- <img :src="avatar" class="user-avatar"> -->
<!-- <span v-if="nickname" class="user-nickname">{{ nickname }}</span>
<i class="el-icon-caret-bottom" />
</div>
<el-dropdown-menu slot="dropdown">
<router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item>
</router-link> -->
<!-- <el-dropdown-item @click.native="setting = true">
<span>布局设置</span>
</el-dropdown-item> -->
<!-- <el-dropdown-item divided @click.native="logout">
<span>退出登录</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown> -->
<!-- </div> -->
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex';
import Breadcrumb from '@/components/Breadcrumb' import Breadcrumb from '@/components/Breadcrumb';
import TopNav from '@/components/TopNav' import TopNav from '@/components/TopNav';
import Hamburger from '@/components/Hamburger' import Hamburger from '@/components/Hamburger';
import Screenfull from '@/components/Screenfull' import Screenfull from '@/components/Screenfull';
import SizeSelect from '@/components/SizeSelect' import SizeSelect from '@/components/SizeSelect';
import Search from '@/components/HeaderSearch' import Search from '@/components/HeaderSearch';
import NotifyMessage from '@/layout/components/Message' import NotifyMessage from '@/layout/components/Message';
// import {getPath} from "@/utils/ruoyi"; // import {getPath} from "@/utils/ruoyi";
import NavbarRight from './NavbarRight.vue' import NavbarRight from './NavbarRight.vue';
export default { export default {
components: { components: {
@ -67,45 +39,43 @@ export default {
SizeSelect, SizeSelect,
Search, Search,
NotifyMessage, NotifyMessage,
NavbarRight NavbarRight,
}, },
computed: { computed: {
...mapGetters([ ...mapGetters(['sidebar', 'avatar', 'nickname', 'device']),
'sidebar',
'avatar',
'nickname',
'device'
]),
setting: { setting: {
get() { get() {
return this.$store.state.settings.showSettings return this.$store.state.settings.showSettings;
}, },
set(val) { set(val) {
this.$store.dispatch('settings/changeSetting', { this.$store.dispatch('settings/changeSetting', {
key: 'showSettings', key: 'showSettings',
value: val value: val,
}) });
} },
}, },
topNav: { topNav: {
get() { get() {
return this.$store.state.settings.topNav return this.$store.state.settings.topNav;
} },
} },
}, },
methods: { methods: {
toggleSideBar() { toggleSideBar() {
this.$store.dispatch('app/toggleSideBar') this.$store.dispatch('app/toggleSideBar');
}, },
async logout() { async logout() {
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => { this.$modal
.confirm('确定注销并退出系统吗?', '提示')
.then(() => {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
location.href = getPath('/'); location.href = getPath('/');
});
}) })
}).catch(() => {}); .catch(() => {});
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -114,18 +84,18 @@ export default {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
background: #fff; background: #fff;
box-shadow: 0 1px 4px rgba(0,21,41,.08); box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
.hamburger-container { .hamburger-container {
line-height: 52px; line-height: 48px;
height: 100%; height: 100%;
float: left; float: left;
cursor: pointer; cursor: pointer;
transition: background .3s; transition: background 0.3s;
-webkit-tap-highlight-color:transparent; -webkit-tap-highlight-color: transparent;
&:hover { &:hover {
background: rgba(0, 0, 0, .025) background: rgba(0, 0, 0, 0.025);
} }
} }
@ -162,10 +132,10 @@ export default {
&.hover-effect { &.hover-effect {
cursor: pointer; cursor: pointer;
transition: background .3s; transition: background 0.3s;
&:hover { &:hover {
background: rgba(0, 0, 0, .025) background: rgba(0, 0, 0, 0.025);
} }
} }
} }
@ -185,7 +155,7 @@ export default {
height: 35px; height: 35px;
border-radius: 50%; border-radius: 50%;
} }
.user-nickname{ .user-nickname {
margin-left: 5px; margin-left: 5px;
font-size: 14px; font-size: 14px;
} }

View File

@ -1,90 +1,110 @@
<template> <template>
<div class="right-msg" :style="blackTitle ? 'color: #000' : 'color: #fff'"> <div class="right-msg" :style="blackTitle ? 'color: #000' : 'color: #fff'">
<div class="home-icon" v-if='blackTitle'> <div class="home-icon" v-if="blackTitle">
<svg-icon icon-class="home" style="font-size: 24px; cursor: pointer;" @click="toHome"/> <!-- <svg-icon
icon-class="home"
style="font-size: 24px; cursor: pointer"
@click="toHome" /> -->
<svg-icon
icon-class="alarm"
style="font-size: 24px; cursor: pointer"
@click="toHome" />
</div> </div>
<div class="time-msg"> <!-- <div class="time-msg">
<div class="line1">{{timeZone}}&nbsp;&nbsp;&nbsp;&nbsp;{{topTime}}</div> <div class="line1">{{timeZone}}&nbsp;&nbsp;&nbsp;&nbsp;{{topTime}}</div>
<div class="line2">{{topDate}}</div> <div class="line2">{{topDate}}</div>
</div> </div> -->
<div class="base-msg"> <div class="base-msg">
<div class="avatar"> <div class="avatar">
<el-dropdown> <el-dropdown>
<img :src="require(`../../assets/images/choicepart/avatar.png`)" alt="" width="32" height="32" /> <img
:src="require(`../../assets/images/choicepart/avatar.png`)"
alt=""
width="32"
height="32" />
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item><svg-icon icon-class="helpbtn"/>帮助文档</el-dropdown-item> <el-dropdown-item>
<el-dropdown-item @click.native="logout"><svg-icon icon-class="exitbtn"/>退出登录</el-dropdown-item> <svg-icon icon-class="helpbtn" />
帮助文档
</el-dropdown-item>
<el-dropdown-item @click.native="logout">
<svg-icon icon-class="exitbtn" />
退出登录
</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
<div class="use-msg"> <div class="use-msg">
<div class="line1">{{nickname}}</div> <div class="line1">{{ nickname }}</div>
<div class="line2">{{dept}}</div> <div class="line2">{{ dept }}</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import moment from 'moment' import moment from 'moment';
import { getUser } from "@/api/system/user.js"; import { getUser } from '@/api/system/user.js';
import {getPath} from "@/utils/ruoyi"; import { getPath } from '@/utils/ruoyi';
export default { export default {
name: 'navRight', name: 'navRight',
data() { data() {
return { return {
topDate: '', // topDate: '',
topTime: '', // topTime: '',
timeZone: '', // timeZone: '',
timer: '', timer: '',
dept:' ', dept: ' ',
nickname: this.$store.getters.nickname nickname: this.$store.getters.nickname,
} };
}, },
props: { props: {
blackTitle: { blackTitle: {
type: Boolean, type: Boolean,
default: () => { default: () => {
return false return false;
} },
} },
}, },
created() { created() {
this.getUserMsg() this.getUserMsg();
this.getTime() // this.getTime();
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.timer) clearInterval(this.timer);
}, },
methods: { methods: {
getTime() { // getTime() {
let _this = this // let _this = this;
this.timer = setInterval(function () { // this.timer = setInterval(function () {
_this.topDate = moment().format('YYYY/MM/DD') // _this.topDate = moment().format('YYYY/MM/DD');
let temp = moment().format('A-hh:mm').split('-') // let temp = moment().format('A-hh:mm').split('-');
_this.timeZone = temp[0] // _this.timeZone = temp[0];
_this.topTime = temp[1] // _this.topTime = temp[1];
}, 1000) // }, 1000);
}, // },
getUserMsg() { getUserMsg() {
let id = this.$store.getters.userId let id = this.$store.getters.userId;
getUser(id).then(res => { getUser(id).then((res) => {
this.dept = res.data.dept ? res.data.dept.name : '' this.dept = res.data.dept ? res.data.dept.name : '';
}) });
}, },
async logout() { async logout() {
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => { this.$modal
.confirm('确定注销并退出系统吗?', '提示')
.then(() => {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
location.href = getPath('/'); location.href = getPath('/');
});
}) })
}).catch(() => {}) .catch(() => {});
}, },
toHome() { toHome() {
this.$router.push({ path: "/" }) this.$router.push({ path: '/' });
} },
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.right-msg { .right-msg {
float: right; float: right;
height: 100%; height: 100%;
@ -95,7 +115,7 @@ export default {
} }
.home-icon { .home-icon {
display: inline-block; display: inline-block;
margin-right: 30px; margin-right: 20px;
vertical-align: top; vertical-align: top;
padding-top: 7px; padding-top: 7px;
} }

View File

@ -49,9 +49,7 @@ export default {
...mapState(['settings']), ...mapState(['settings']),
...mapGetters(['sidebarRouters', 'sidebar', 'choicepart']), ...mapGetters(['sidebarRouters', 'sidebar', 'choicepart']),
routeList() { routeList() {
// return [this.partList[this.choicepart]] return this.sidebarRouters;
// return [this.sidebarRouters[29]]
return [this.sidebarRouters[this.choicepart]]
}, },
activeMenu() { activeMenu() {
const route = this.$route; const route = this.$route;

View File

@ -71,7 +71,8 @@ export const constantRoutes = [
}, },
{ {
path: '/', path: '/',
component: () => import('@/views/choicePart'), // component: () => import('@/views/choicePart'),
component: () => import('@/views/home'),
hidden: true, hidden: true,
meta: { requireToken: true } meta: { requireToken: true }
}, },

View File

@ -13,7 +13,7 @@ module.exports = {
/** /**
* 是否显示顶部导航 * 是否显示顶部导航
*/ */
topNav: false, topNav: true,
/** /**
* 是否显示 tagsView * 是否显示 tagsView

View File

@ -23,6 +23,7 @@ const permission = {
state.topbarRouters = routes state.topbarRouters = routes
}, },
SET_SIDEBAR_ROUTERS: (state, routes) => { SET_SIDEBAR_ROUTERS: (state, routes) => {
console.log('=========:',routes)
state.sidebarRouters = routes state.sidebarRouters = routes
}, },
}, },

View File

@ -0,0 +1,168 @@
<template>
<div class="navbar">
<div class="logo-container">
<img
src="../../../assets/images/cnbm.png"
style="
width: 34px;
height: 34px;
position: relative;
top: 9px;
margin-right: 8px;
"
alt="" />
MES产品化重构
</div>
<top-nav id="warnmenu-container" class="warnmenu-container" v-if="topNav" />
<div style="padding-top: 5px; padding-right: 38px">
<navbar-right :blackTitle="true" />
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import TopNav from './TopNav';
import Hamburger from '@/components/Hamburger';
import Screenfull from '@/components/Screenfull';
import SizeSelect from '@/components/SizeSelect';
import Search from '@/components/HeaderSearch';
import NotifyMessage from '@/layout/components/Message';
// import {getPath} from "@/utils/ruoyi";
import NavbarRight from './NavbarRight.vue';
export default {
components: {
TopNav,
Hamburger,
Screenfull,
SizeSelect,
Search,
NotifyMessage,
NavbarRight,
},
computed: {
...mapGetters(['sidebar', 'avatar', 'nickname', 'device']),
setting: {
get() {
return this.$store.state.settings.showSettings;
},
set(val) {
this.$store.dispatch('settings/changeSetting', {
key: 'showSettings',
value: val,
});
},
},
topNav: {
get() {
return this.$store.state.settings.topNav;
},
},
},
methods: {
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar');
},
async logout() {
this.$modal
.confirm('确定注销并退出系统吗?', '提示')
.then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = getPath('/');
});
})
.catch(() => {});
},
},
};
</script>
<style lang="scss" scoped>
.navbar {
height: 84px; // 56/48
overflow: hidden;
position: relative;
background-color: #fff;
.logo-container {
line-height: 84px;
height: 100%;
float: left;
cursor: pointer;
font-size: 26px;
padding-left: 40px;
font-weight: 500;
color: #0c0030;
}
.warnmenu-container {
position: absolute;
left: 290px;
}
.errLog-container {
display: inline-block;
vertical-align: top;
}
.right-menu {
float: right;
height: 100%;
line-height: 56px;
&:focus {
outline: none;
}
.right-menu-item {
display: inline-block;
padding: 0 8px;
height: 100%;
font-size: 18px;
color: #5a5e66;
vertical-align: text-bottom;
&.hover-effect {
cursor: pointer;
transition: background 0.3s;
&:hover {
background: rgba(0, 0, 0, 0.025);
}
}
}
.avatar-container {
margin-right: 30px;
.avatar-wrapper {
display: flex;
justify-content: center;
align-items: center;
position: relative;
.user-avatar {
cursor: pointer;
width: 35px;
height: 35px;
border-radius: 50%;
}
.user-nickname {
margin-left: 5px;
font-size: 14px;
}
.el-icon-caret-bottom {
cursor: pointer;
position: absolute;
right: -20px;
top: 25px;
font-size: 12px;
}
}
}
}
}
</style>

View File

@ -0,0 +1,142 @@
<template>
<div class="right-msg" :style="blackTitle ? 'color: #000' : 'color: #fff'">
<div class="home-icon" v-if="blackTitle">
<!-- <svg-icon
icon-class="home"
style="font-size: 24px; cursor: pointer"
@click="toHome" /> -->
<svg-icon
icon-class="alarm"
style="font-size: 24px; cursor: pointer"
@click="toHome" />
</div>
<!-- <div class="time-msg">
<div class="line1">{{timeZone}}&nbsp;&nbsp;&nbsp;&nbsp;{{topTime}}</div>
<div class="line2">{{topDate}}</div>
</div> -->
<div class="base-msg">
<div class="avatar">
<el-dropdown>
<img
:src="require(`../../../assets/images/choicepart/avatar.png`)"
alt=""
width="42"
height="42"
style="position: relative; top: 4px" />
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item>
<svg-icon icon-class="helpbtn" />
帮助文档
</el-dropdown-item> -->
<el-dropdown-item @click.native="logout">
<svg-icon icon-class="exitbtn" />
退出登录
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<div class="use-msg">
<div class="line1">{{ nickname }}</div>
<div class="line2">{{ dept }}</div>
</div>
</div>
</div>
</template>
<script>
import moment from 'moment';
import { getUser } from '@/api/system/user.js';
import { getPath } from '@/utils/ruoyi';
export default {
name: 'navRight',
data() {
return {
// topDate: '',
// topTime: '',
// timeZone: '',
timer: '',
dept: ' ',
nickname: this.$store.getters.nickname,
};
},
props: {
blackTitle: {
type: Boolean,
default: () => {
return false;
},
},
},
created() {
this.getUserMsg();
// this.getTime();
},
beforeDestroy() {
clearInterval(this.timer);
},
methods: {
// getTime() {
// let _this = this;
// this.timer = setInterval(function () {
// _this.topDate = moment().format('YYYY/MM/DD');
// let temp = moment().format('A-hh:mm').split('-');
// _this.timeZone = temp[0];
// _this.topTime = temp[1];
// }, 1000);
// },
getUserMsg() {
let id = this.$store.getters.userId;
getUser(id).then((res) => {
this.dept = res.data.dept ? res.data.dept.name : '';
});
},
async logout() {
this.$modal
.confirm('确定注销并退出系统吗?', '提示')
.then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = getPath('/');
});
})
.catch(() => {});
},
toHome() {
this.$router.push({ path: '/' });
},
},
};
</script>
<style lang="scss" scoped>
.right-msg {
float: right;
height: 84px;
font-size: 14px;
.time-msg {
display: inline-block;
margin-right: 30px;
}
.home-icon {
display: inline-block;
margin-right: 20px;
vertical-align: top;
line-height: 84px;
}
.base-msg {
display: inline-block;
padding-top: 10px;
.avatar {
display: inline-block;
margin-right: 10px;
}
.use-msg {
display: inline-block;
}
}
.line1 {
height: 19px;
}
.line2 {
height: 19px;
opacity: 0.65;
}
}
</style>

View File

@ -0,0 +1,267 @@
<template>
<el-menu
:default-active="activeMenu"
mode="horizontal"
@select="handleSelect">
<template v-for="(item, index) in topMenus">
<el-menu-item
:style="{ '--theme': theme }"
:index="item.path"
:key="index"
v-if="index < visibleNumber">
<!-- <svg-icon :icon-class="item.meta.icon" /> -->
<span class="menu-box">
<span class="menu-dot"></span>
{{ item.meta.title }}
</span>
</el-menu-item>
</template>
<!-- 顶部菜单超出数量折叠 -->
<el-submenu
:style="{ '--theme': theme }"
index="more"
v-if="topMenus.length > visibleNumber">
<template slot="title">更多菜单</template>
<template v-for="(item, index) in topMenus">
<el-menu-item
:index="item.path"
:key="index"
v-if="index >= visibleNumber">
<!-- <svg-icon :icon-class="item.meta.icon" /> -->
<span class="menu-box">
<span class="menu-dot"></span>
{{ item.meta.title }}
</span>
</el-menu-item>
</template>
</el-submenu>
</el-menu>
</template>
<script>
import { mapGetters } from 'vuex';
import { constantRoutes } from '@/router';
//
const hideList = ['/index', '/user/profile'];
export default {
data() {
return {
//
visibleNumber: 5,
// index
// currentIndex: undefined,
};
},
computed: {
...mapGetters(['choicepart']),
currentIndex() {
return this.choicepart;
},
theme() {
return this.$store.state.settings.theme;
},
//
topMenus() {
let topMenus = [];
this.routers.map((menu) => {
if (menu.hidden !== true) {
//
if (menu.path === '/') {
topMenus.push(menu.children[0]);
} else {
topMenus.push(menu);
}
}
});
console.log('topMenus:', topMenus);
return topMenus;
},
//
routers() {
return this.$store.state.permission.topbarRouters;
},
//
childrenMenus() {
const childrenMenus = [];
this.routers.map((router) => {
for (let item in router.children) {
if (router.children[item].parentPath === undefined) {
if (router.path === '/') {
router.children[item].path = '/' + router.children[item].path;
} else {
if (!this.ishttp(router.children[item].path)) {
router.children[item].path =
router.path + '/' + router.children[item].path;
}
}
router.children[item].parentPath = router.path;
}
childrenMenus.push(router.children[item]);
}
});
return constantRoutes.concat(childrenMenus);
},
//
activeMenu() {
const path = this.$route.path;
let activePath = path;
if (
path !== undefined &&
path.lastIndexOf('/') > 0 &&
hideList.indexOf(path) === -1
) {
const tmpPath = path.substring(1, path.length);
activePath = '/' + tmpPath.substring(0, tmpPath.indexOf('/'));
if (!this.$route.meta.link) {
this.$store.dispatch('app/toggleSideBarHide', false);
}
} else if (!this.$route.children) {
activePath = path;
this.$store.dispatch('app/toggleSideBarHide', true);
}
this.activeRoutes(activePath);
return activePath;
},
},
beforeMount() {
window.addEventListener('resize', this.setVisibleNumber);
},
beforeDestroy() {
window.removeEventListener('resize', this.setVisibleNumber);
},
mounted() {
this.setVisibleNumber();
},
methods: {
//
setVisibleNumber() {
const width = window.innerWidth - 700;
console.log(width);
console.log('window.innerWidth:', window.innerWidth);
this.visibleNumber = parseInt(width / 120);
console.log('this.visibleNumber:', this.visibleNumber);
},
//
handleSelect(key, keyPath) {
// this.currentIndex = key;
const route = this.routers.find((item) => item.path === key);
console.log('route:', route);
this.$store.dispatch('app/setChoicepart', key);
this.toRouter(route);
// if (this.ishttp(key)) {
// // http(s)://
// window.open(key, '_blank');
// console.log('aaaaaaaaaaaaaa');
// } else if (!route || !route.children) {
// //
// this.$router.push({ path: key });
// this.$store.dispatch('app/toggleSideBarHide', true);
// console.log('bbbbbbbbbbbbbbb');
// } else {
// //
// this.activeRoutes(key);
// if (!this.$route.meta.link) {
// this.$store.dispatch('app/toggleSideBarHide', false);
// }
// console.log('cccccccccccccccc');
// }
},
toRouter(item) {
console.log(item);
if (item.children) {
this.toRouter(item.children[0]);
} else {
this.$router.push({ name: item.name });
}
},
//
activeRoutes(key) {
const routes = [];
if (this.childrenMenus && this.childrenMenus.length > 0) {
this.childrenMenus.map((item) => {
if (
key === item.parentPath ||
(key === 'index' && '' === item.path)
) {
routes.push(item);
}
});
}
if (routes.length > 0) {
this.$store.commit('SET_SIDEBAR_ROUTERS', routes);
} else {
this.$store.dispatch('app/toggleSideBarHide', true);
}
},
ishttp(url) {
return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1;
},
},
};
</script>
<style lang="scss">
.warnmenu-container.el-menu--horizontal > .el-menu-item {
float: left;
height: 84px !important;
line-height: 84px !important;
color: #000 !important;
padding: 0 5px !important;
font-size: 18px;
.menu-box {
// color: #fff;
}
}
.warnmenu-container.el-menu--horizontal
> .el-menu-item:not(.is-disabled):hover {
background-color: transparent;
}
.warnmenu-container.el-menu {
background-color: transparent;
}
.warnmenu-container.el-menu.el-menu--horizontal {
border: none;
}
.warnmenu-container.el-menu--horizontal > .el-menu-item.is-active,
.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
border-bottom: 2px solid #{'var(--theme)'} !important;
color: #303133;
}
/* submenu item */
.warnmenu-container.el-menu--horizontal > .el-submenu .el-submenu__title {
float: left;
height: 84px !important;
line-height: 91px !important;
color: #000 !important;
padding: 0 5px !important;
margin: 0 10px !important;
font-size: 18px;
}
.warnmenu-container.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
background-color: transparent;
}
.warnmenu-container.el-menu--horizontal > .el-submenu .el-submenu__title i {
// color: #fff;
}
</style>
<style lang="scss" scoped>
.menu-box {
padding: 3px 10px 5px 10px;
border-radius: 30px;
color: #000;
}
.menu-dot {
display: inline-block;
width: 5px;
height: 5px;
border-radius: 50%;
background: #0b58ff;
margin-right: 3px;
margin-bottom: 2px;
opacity: 0;
}
</style>

View File

@ -0,0 +1,49 @@
<template>
<div class="warning-page">
<navbar />
<div class="main-box">
<div>异常警告</div>
</div>
<div class="footer">
<img src="../../assets/img/alarm-bg.png" alt="" />
</div>
</div>
</template>
<script>
import Navbar from './components/Navbar';
export default {
name: 'AbnormalWarning',
components: { Navbar },
data() {
return {};
},
created() {},
methods: {},
};
</script>
<style lang="scss" scoped>
.warning-page {
width: 100%;
height: 100vh;
.main-box {
position: relative;
width: 64.58%;
height: calc(100vh - 160px);
background-color: #fff;
border-radius: 24px;
margin: 16px auto 0;
z-index: 10;
padding: 24px 32px;
}
.footer {
position: fixed;
width: 100%;
bottom: -3px;
z-index: 8;
img {
width: 100%;
height: 220px;
}
}
}
</style>

View File

@ -0,0 +1,167 @@
<template>
<div class="navbar">
<div class="logo-container">
<img
src="../../../assets/images/cnbm.png"
style="
width: 34px;
height: 34px;
position: relative;
top: 9px;
margin-right: 8px;
"
alt="" />
MES产品化重构
</div>
<top-nav id="homemenu-container" class="homemenu-container" v-if="topNav" />
<div style="padding-top: 5px; padding-right: 38px">
<navbar-right :blackTitle="true" />
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import TopNav from './TopNav';
import Hamburger from '@/components/Hamburger';
import Screenfull from '@/components/Screenfull';
import SizeSelect from '@/components/SizeSelect';
import Search from '@/components/HeaderSearch';
import NotifyMessage from '@/layout/components/Message';
// import {getPath} from "@/utils/ruoyi";
import NavbarRight from './NavbarRight.vue';
export default {
components: {
TopNav,
Hamburger,
Screenfull,
SizeSelect,
Search,
NotifyMessage,
NavbarRight,
},
computed: {
...mapGetters(['sidebar', 'avatar', 'nickname', 'device']),
setting: {
get() {
return this.$store.state.settings.showSettings;
},
set(val) {
this.$store.dispatch('settings/changeSetting', {
key: 'showSettings',
value: val,
});
},
},
topNav: {
get() {
return this.$store.state.settings.topNav;
},
},
},
methods: {
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar');
},
async logout() {
this.$modal
.confirm('确定注销并退出系统吗?', '提示')
.then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = getPath('/');
});
})
.catch(() => {});
},
},
};
</script>
<style lang="scss" scoped>
.navbar {
height: 84px; // 56/48
overflow: hidden;
position: relative;
.logo-container {
color: #fff;
line-height: 84px;
height: 100%;
float: left;
cursor: pointer;
font-size: 26px;
padding-left: 40px;
font-weight: 500;
}
.homemenu-container {
position: absolute;
left: 290px;
}
.errLog-container {
display: inline-block;
vertical-align: top;
}
.right-menu {
float: right;
height: 100%;
line-height: 56px;
&:focus {
outline: none;
}
.right-menu-item {
display: inline-block;
padding: 0 8px;
height: 100%;
font-size: 18px;
color: #5a5e66;
vertical-align: text-bottom;
&.hover-effect {
cursor: pointer;
transition: background 0.3s;
&:hover {
background: rgba(0, 0, 0, 0.025);
}
}
}
.avatar-container {
margin-right: 30px;
.avatar-wrapper {
display: flex;
justify-content: center;
align-items: center;
position: relative;
.user-avatar {
cursor: pointer;
width: 35px;
height: 35px;
border-radius: 50%;
}
.user-nickname {
margin-left: 5px;
font-size: 14px;
}
.el-icon-caret-bottom {
cursor: pointer;
position: absolute;
right: -20px;
top: 25px;
font-size: 12px;
}
}
}
}
}
</style>

View File

@ -0,0 +1,143 @@
<template>
<div class="right-msg" :style="blackTitle ? 'color: #000' : 'color: #fff'">
<div class="home-icon" v-if="blackTitle">
<!-- <svg-icon
icon-class="home"
style="font-size: 24px; cursor: pointer"
@click="toHome" /> -->
<svg-icon
icon-class="home-alarm-white"
style="font-size: 24px; cursor: pointer"
@click="toHome" />
</div>
<!-- <div class="time-msg">
<div class="line1">{{timeZone}}&nbsp;&nbsp;&nbsp;&nbsp;{{topTime}}</div>
<div class="line2">{{topDate}}</div>
</div> -->
<div class="base-msg">
<div class="avatar">
<el-dropdown>
<img
:src="require(`../../../assets/images/choicepart/avatar.png`)"
alt=""
width="42"
height="42"
style="position: relative; top: 4px" />
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item>
<svg-icon icon-class="helpbtn" />
帮助文档
</el-dropdown-item> -->
<el-dropdown-item @click.native="logout">
<svg-icon icon-class="exitbtn" />
退出登录
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<div class="use-msg">
<div class="line1">{{ nickname }}</div>
<div class="line2">{{ dept }}</div>
</div>
</div>
</div>
</template>
<script>
import moment from 'moment';
import { getUser } from '@/api/system/user.js';
import { getPath } from '@/utils/ruoyi';
export default {
name: 'navRight',
data() {
return {
// topDate: '',
// topTime: '',
// timeZone: '',
timer: '',
dept: ' ',
nickname: this.$store.getters.nickname,
};
},
props: {
blackTitle: {
type: Boolean,
default: () => {
return false;
},
},
},
created() {
this.getUserMsg();
// this.getTime();
},
beforeDestroy() {
clearInterval(this.timer);
},
methods: {
// getTime() {
// let _this = this;
// this.timer = setInterval(function () {
// _this.topDate = moment().format('YYYY/MM/DD');
// let temp = moment().format('A-hh:mm').split('-');
// _this.timeZone = temp[0];
// _this.topTime = temp[1];
// }, 1000);
// },
getUserMsg() {
let id = this.$store.getters.userId;
getUser(id).then((res) => {
this.dept = res.data.dept ? res.data.dept.name : '';
});
},
async logout() {
this.$modal
.confirm('确定注销并退出系统吗?', '提示')
.then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = getPath('/');
});
})
.catch(() => {});
},
toHome() {
this.$router.push({ path: '/' });
},
},
};
</script>
<style lang="scss" scoped>
.right-msg {
float: right;
height: 84px;
font-size: 14px;
.time-msg {
display: inline-block;
margin-right: 30px;
}
.home-icon {
display: inline-block;
margin-right: 20px;
vertical-align: top;
line-height: 84px;
}
.base-msg {
display: inline-block;
padding-top: 10px;
.avatar {
display: inline-block;
margin-right: 10px;
}
.use-msg {
display: inline-block;
color: #fff;
}
}
.line1 {
height: 19px;
}
.line2 {
height: 19px;
opacity: 0.65;
}
}
</style>

View File

@ -0,0 +1,267 @@
<template>
<el-menu
:default-active="activeMenu"
mode="horizontal"
@select="handleSelect">
<template v-for="(item, index) in topMenus">
<el-menu-item
:style="{ '--theme': theme }"
:index="item.path"
:key="index"
v-if="index < visibleNumber">
<!-- <svg-icon :icon-class="item.meta.icon" /> -->
<span class="menu-box">
<span class="menu-dot"></span>
{{ item.meta.title }}
</span>
</el-menu-item>
</template>
<!-- 顶部菜单超出数量折叠 -->
<el-submenu
:style="{ '--theme': theme }"
index="more"
v-if="topMenus.length > visibleNumber">
<template slot="title">更多菜单</template>
<template v-for="(item, index) in topMenus">
<el-menu-item
:index="item.path"
:key="index"
v-if="index >= visibleNumber">
<!-- <svg-icon :icon-class="item.meta.icon" /> -->
<span class="menu-box">
<span class="menu-dot"></span>
{{ item.meta.title }}
</span>
</el-menu-item>
</template>
</el-submenu>
</el-menu>
</template>
<script>
import { mapGetters } from 'vuex';
import { constantRoutes } from '@/router';
//
const hideList = ['/index', '/user/profile'];
export default {
data() {
return {
//
visibleNumber: 5,
// index
// currentIndex: undefined,
};
},
computed: {
...mapGetters(['choicepart']),
currentIndex() {
return this.choicepart;
},
theme() {
return this.$store.state.settings.theme;
},
//
topMenus() {
let topMenus = [];
this.routers.map((menu) => {
if (menu.hidden !== true) {
//
if (menu.path === '/') {
topMenus.push(menu.children[0]);
} else {
topMenus.push(menu);
}
}
});
console.log('topMenus:', topMenus);
return topMenus;
},
//
routers() {
return this.$store.state.permission.topbarRouters;
},
//
childrenMenus() {
const childrenMenus = [];
this.routers.map((router) => {
for (let item in router.children) {
if (router.children[item].parentPath === undefined) {
if (router.path === '/') {
router.children[item].path = '/' + router.children[item].path;
} else {
if (!this.ishttp(router.children[item].path)) {
router.children[item].path =
router.path + '/' + router.children[item].path;
}
}
router.children[item].parentPath = router.path;
}
childrenMenus.push(router.children[item]);
}
});
return constantRoutes.concat(childrenMenus);
},
//
activeMenu() {
const path = this.$route.path;
let activePath = path;
if (
path !== undefined &&
path.lastIndexOf('/') > 0 &&
hideList.indexOf(path) === -1
) {
const tmpPath = path.substring(1, path.length);
activePath = '/' + tmpPath.substring(0, tmpPath.indexOf('/'));
if (!this.$route.meta.link) {
this.$store.dispatch('app/toggleSideBarHide', false);
}
} else if (!this.$route.children) {
activePath = path;
this.$store.dispatch('app/toggleSideBarHide', true);
}
this.activeRoutes(activePath);
return activePath;
},
},
beforeMount() {
window.addEventListener('resize', this.setVisibleNumber);
},
beforeDestroy() {
window.removeEventListener('resize', this.setVisibleNumber);
},
mounted() {
this.setVisibleNumber();
},
methods: {
//
setVisibleNumber() {
const width = window.innerWidth - 700;
console.log(width);
console.log('window.innerWidth:', window.innerWidth);
this.visibleNumber = parseInt(width / 120);
console.log('this.visibleNumber:', this.visibleNumber);
},
//
handleSelect(key, keyPath) {
// this.currentIndex = key;
const route = this.routers.find((item) => item.path === key);
console.log('route:', route);
this.$store.dispatch('app/setChoicepart', key);
this.toRouter(route);
// if (this.ishttp(key)) {
// // http(s)://
// window.open(key, '_blank');
// console.log('aaaaaaaaaaaaaa');
// } else if (!route || !route.children) {
// //
// this.$router.push({ path: key });
// this.$store.dispatch('app/toggleSideBarHide', true);
// console.log('bbbbbbbbbbbbbbb');
// } else {
// //
// this.activeRoutes(key);
// if (!this.$route.meta.link) {
// this.$store.dispatch('app/toggleSideBarHide', false);
// }
// console.log('cccccccccccccccc');
// }
},
toRouter(item) {
console.log(item);
if (item.children) {
this.toRouter(item.children[0]);
} else {
this.$router.push({ name: item.name });
}
},
//
activeRoutes(key) {
const routes = [];
if (this.childrenMenus && this.childrenMenus.length > 0) {
this.childrenMenus.map((item) => {
if (
key === item.parentPath ||
(key === 'index' && '' === item.path)
) {
routes.push(item);
}
});
}
if (routes.length > 0) {
this.$store.commit('SET_SIDEBAR_ROUTERS', routes);
} else {
this.$store.dispatch('app/toggleSideBarHide', true);
}
},
ishttp(url) {
return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1;
},
},
};
</script>
<style lang="scss">
.homemenu-container.el-menu--horizontal > .el-menu-item {
float: left;
height: 84px !important;
line-height: 84px !important;
color: #999093 !important;
padding: 0 5px !important;
font-size: 18px;
.menu-box {
color: #fff;
}
}
.homemenu-container.el-menu--horizontal
> .el-menu-item:not(.is-disabled):hover {
background-color: transparent;
}
.homemenu-container.el-menu {
background-color: transparent;
}
.homemenu-container.el-menu.el-menu--horizontal {
border: none;
}
.homemenu-container.el-menu--horizontal > .el-menu-item.is-active,
.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
border-bottom: 2px solid #{'var(--theme)'} !important;
color: #303133;
}
/* submenu item */
.homemenu-container.el-menu--horizontal > .el-submenu .el-submenu__title {
float: left;
height: 84px !important;
line-height: 91px !important;
color: #fff !important;
padding: 0 5px !important;
margin: 0 10px !important;
font-size: 18px;
}
.homemenu-container.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
background-color: transparent;
}
.homemenu-container.el-menu--horizontal > .el-submenu .el-submenu__title i {
color: #fff;
}
</style>
<style lang="scss" scoped>
.menu-box {
padding: 3px 10px 5px 10px;
border-radius: 30px;
color: #000;
}
.menu-dot {
display: inline-block;
width: 5px;
height: 5px;
border-radius: 50%;
background: #0b58ff;
margin-right: 3px;
margin-bottom: 2px;
opacity: 0;
}
</style>

416
src/views/home/index.vue Normal file
View File

@ -0,0 +1,416 @@
<template>
<div class="home-page">
<div>
<navbar />
</div>
<div class="date-tabs">
<el-tabs v-model="activeName" :stretch="true">
<el-tab-pane
:label="'\u2002\u2002日\u2002\u2002'"
name="日"></el-tab-pane>
<el-tab-pane
:label="'\u2002\u2002周\u2002\u2002'"
name="周"></el-tab-pane>
<el-tab-pane
:label="'\u2002\u2002月\u2002\u2002'"
name="月"></el-tab-pane>
<el-tab-pane
:label="'\u2002\u2002年\u2002\u2002'"
name="年"></el-tab-pane>
</el-tabs>
<div class="current-date">(6.13-6.20)</div>
<div class="current-time">
<span style="display: inline-block; margin-right: 16px">03:12AM</span>
<span>2020.12.24</span>
</div>
</div>
<el-row class="main-top" :gutter="16">
<el-col :span="12" style="position: relative">
<div class="title">
<svg-icon icon-class="home-produce" />
<span class="title-inner">生产总览</span>
</div>
<el-row class="box">
<el-col :span="6" class="num-box shadow">
<div class="num-style">9,301.01</div>
<div class="unit-style">产量/千片</div>
</el-col>
<el-col :span="4" class="num-box shadow">
<div class="num-style">94.34</div>
<div class="unit-style">良品率/%</div>
</el-col>
<el-col :span="8" class="num-box shadow">
<div class="num-style">29,301.01</div>
<div class="unit-style">完成工单数量/千片</div>
</el-col>
<el-col :span="6" class="num-box">
<div class="num-style">1,340</div>
<div class="unit-style">完成订单数量/</div>
</el-col>
</el-row>
</el-col>
<el-col :span="12" style="position: relative">
<div class="title">
<svg-icon icon-class="home-device" />
<span class="title-inner">设备总览</span>
</div>
<el-row class="box">
<el-col :span="6" class="num-box shadow">
<div class="num-style">2,931</div>
<div class="unit-style">设备总数/</div>
</el-col>
<el-col :span="6" class="num-box shadow">
<div class="num-style">931</div>
<div class="unit-style">在线设备总数/</div>
</el-col>
<el-col :span="6" class="num-box shadow">
<div class="num-style">7</div>
<div class="unit-style">故障设备总数/</div>
</el-col>
<el-col :span="6" class="num-box">
<div class="num-style">0</div>
<div class="unit-style">停机设备总数/</div>
</el-col>
</el-row>
</el-col>
</el-row>
<div class="main-middle">
<div
class="item"
:class="{ shadow: index !== middleMenu.length - 1 }"
v-for="(item, index) in middleMenu"
:key="index">
<div style="width: 160px; margin: 0 auto; padding-top: 20px">
<svg-icon :icon-class="item.icon" style="font-size: 56px" />
<div class="title-box">
<div class="title">{{ item.name }}</div>
<div class="triangle">
<span class="c1"></span>
<span class="c2"></span>
<span class="c3"></span>
</div>
</div>
</div>
</div>
</div>
<el-row class="main-bottom" :gutter="16">
<el-col :span="12">
<div class="box">
<div class="title-box">
<svg-icon icon-class="home-order-monitor" />
<span class="title">工单监控</span>
</div>
<div class="order-box">
<div
class="order-item"
v-for="(item, index) in orderList"
:key="index">
<div>
<span class="order-name">{{ item.name }}</span>
<span class="order-value">{{ item.value }}%</span>
</div>
<el-progress
:percentage="item.value"
:text-inside="false"
:stroke-width="15"
:show-text="false"></el-progress>
</div>
</div>
</div>
</el-col>
<el-col :span="12">
<div class="box">
<div class="title-box">
<svg-icon icon-class="home-device-alarm" />
<span class="title">设备告警</span>
</div>
<base-table
:page="1"
:limit="100000"
:table-props="tableProps"
:table-data="list"
:max-height="tableH" />
</div>
</el-col>
</el-row>
<div
class="main-footer"
style="
color: #c7c7c7;
user-select: none;
font-size: 14px;
letter-spacing: 1px;
height: 30px;
display: grid;
place-content: center;
">
&copy; 中建材智能自动化研究院有限公司
</div>
</div>
</template>
<script>
import Navbar from './components/Navbar';
import moment from 'moment';
import tableHeightMixin from '@/mixins/tableHeightMixin';
export default {
name: 'Home',
mixins: [tableHeightMixin],
components: { Navbar },
computed: {
gradientBackground() {
return {
'background-image':
'linear-gradient(90deg, #f0f0f0 25%, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, 0) 50%, #f0f0f0 50%, #f0f0f0 75%, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, 0))',
'background-size': '100px 100px', //
};
},
},
data() {
return {
activeName: '日',
middleMenu: [
{ name: '工单管理', url: '', icon: 'home-work-menu' },
{ name: '订单管理', url: '', icon: 'home-order-menu' },
{ name: '设备管理', url: '', icon: 'home-device-menu' },
{ name: '质量管理', url: '', icon: 'home-quality-menu' },
{ name: '仓库管理', url: '', icon: 'home-store-menu' },
],
orderList: [
{ name: '工单1', value: 50 },
{ name: '工单2', value: 60 },
{ name: '工单3', value: 30 },
{ name: '工单4', value: 60 },
{ name: '工单5', value: 10 },
{ name: '工单6', value: 60 },
{ name: '工单7', value: 40 },
{ name: '工单8', value: 70 },
{ name: '工单9', value: 90 },
],
heightNum: 640,
tableProps: [
{
prop: 'productionLineName',
label: '设备名称',
showOverflowtooltip: true,
},
{
prop: 'sectionName',
label: '告警内容',
showOverflowtooltip: true,
},
{
prop: 'createTime',
label: '告警时间',
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
],
list: [
{ productionLineName: 1 },
{ productionLineName: 1 },
{ productionLineName: 1 },
{ productionLineName: 1 },
{ productionLineName: 1 },
{ productionLineName: 1 },
{ productionLineName: 1 },
{ productionLineName: 1 },
{ productionLineName: 1 },
{ productionLineName: 1 },
{ productionLineName: 1 },
{ productionLineName: 1 },
{ productionLineName: 1 },
{ productionLineName: 1 },
{ productionLineName: 1 },
{ productionLineName: 1 },
],
};
},
created() {},
methods: {},
};
</script>
<style lang="scss" scoped>
.home-page {
background-image: url('~@/assets/img/home-bg.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
height: 300px;
width: 100%;
}
.date-tabs {
padding-left: 24px;
padding-top: 20px;
position: relative;
}
:deep(.date-tabs) {
.el-tabs__header {
margin-bottom: 8px;
display: inline-block;
transform: translateY(-12px);
}
.el-tabs__content {
overflow: visible;
}
.el-tabs__item {
font-size: 18px;
color: #fff;
padding-left: 0 !important;
padding-right: 0 !important;
line-height: 36px !important;
height: 36px;
}
.el-tabs__item.is-active {
color: #0b58ff;
}
}
.current-date {
color: #fff;
font-size: 18px;
position: absolute;
left: 260px;
top: 14px;
}
.current-time {
color: #fff;
font-size: 18px;
position: absolute;
right: 24px;
top: 14px;
}
.main-top {
width: 100%;
padding: 0 8px 0 24px;
.title {
position: absolute;
left: 34px;
top: 20px;
width: 180px;
font-size: 32px;
z-index: 10;
.title-inner {
position: absolute;
left: 42px;
top: 5px;
font-size: 24px;
}
}
.box {
background-color: #fff;
border-radius: 24px;
height: 192px;
padding: 40px 24px 32px 24px;
.num-box {
height: 120px;
padding-top: 26px;
text-align: center;
.num-style {
color: #000;
font-size: 40px;
}
.unit-style {
color: rgba(0, 0, 0, 0.7);
font-size: 18px;
}
}
.shadow {
background: linear-gradient(90deg, #ffffff 80%, #f2f4f9 100%);
}
}
}
.main-middle {
display: flex;
flex-flow: row nowrap;
background-color: #fff;
border-radius: 24px;
height: 133px;
margin: 16px 24px;
padding-top: 15px;
.item {
width: 20%;
height: 100px;
cursor: pointer;
.title-box {
display: inline-block;
padding-left: 20px;
vertical-align: bottom;
.title {
height: 35px;
font-size: 18px;
color: #000;
padding-top: 6px;
letter-spacing: 2px;
}
.triangle {
height: 15px;
span {
display: inline-block;
width: 0;
height: 0;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
}
.c1 {
border-left: 12px solid rgba(11, 88, 255, 1);
margin-right: 5px;
}
.c2 {
border-left: 12px solid rgba(11, 88, 255, 0.5);
margin-right: 5px;
}
.c3 {
border-left: 12px solid rgba(11, 88, 255, 0.2);
}
}
}
}
.shadow {
background: linear-gradient(90deg, #ffffff 90%, #f2f4f9 100%);
}
}
.main-bottom {
width: 100%;
padding: 0 8px 0 24px;
.box {
background-color: #fff;
border-radius: 24px;
height: calc(100vh - 534px);
padding: 24px;
.title-box {
position: relative;
font-size: 32px;
margin-bottom: 16px;
.title {
position: absolute;
left: 44px;
top: 6px;
font-size: 24px;
}
}
.order-box {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
font-size: 18px;
padding: 0 30px;
.order-item {
width: 48%;
margin-bottom: 16px;
position: relative;
.order-name {
color: #000000;
}
.order-value {
position: absolute;
right: 0;
color: #0b58ff;
}
}
}
}
}
</style>