master
徐科 4 years ago
parent cf3ee01acb
commit e17b0d2ff2

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1649991844204" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1964" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M544 352m-160 0a160 160 0 1 0 320 0 160 160 0 1 0-320 0Z" fill="#1296db" p-id="1965"></path></svg>

After

Width:  |  Height:  |  Size: 475 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1631253564182" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5041" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 0C229.239467 0 0 229.239467 0 512 0 794.760533 229.239467 1024 512 1024c282.760533 0 512-229.239467 512-512C1024 229.239467 794.760533 0 512 0zM678.980267 691.6096l-14.9504 14.882133c-12.424533 12.424533-33.3824 12.970667-46.421333 1.2288l-171.554133-147.456C432.9472 548.590933 422.980267 524.561067 423.867733 507.016533L441.7536 223.914667c0.887467-17.544533 15.9744-31.9488 33.5872-31.9488l21.026133 0c17.6128 0 32.699733 14.336 33.5872 31.9488l14.609067 231.8336c0.887467 17.6128 11.195733 42.734933 22.869333 55.842133L680.277333 645.12C691.950933 658.2272 691.4048 679.185067 678.980267 691.6096z" p-id="5042"></path></svg>

After

Width:  |  Height:  |  Size: 1012 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1631253036832" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2248" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M734.608696 624.788406c-26.713043 0-46.005797-17.808696-46.005797-46.005797s17.808696-46.005797 46.005797-46.005797c26.713043 0 46.005797 17.808696 46.005797 46.005797s-19.292754 46.005797-46.005797 46.005797z" p-id="2249"></path><path d="M838.492754 0h-652.985508c-25.228986 0-44.521739 19.292754-44.521739 44.521739v934.956522c0 25.228986 19.292754 44.521739 44.521739 44.521739h652.985508c25.228986 0 44.521739-19.292754 44.521739-44.521739v-934.956522c0-25.228986-19.292754-44.521739-44.521739-44.521739z m-289.391305 608.463768c-20.776812 0-37.101449-16.324638-37.101449-37.101449s16.324638-37.101449 37.101449-37.101449 37.101449 16.324638 37.10145 37.101449-16.324638 37.101449-37.10145 37.101449z m185.507247 44.521739c-40.069565 0-74.202899-32.649275-74.202899-74.202898s32.649275-74.202899 74.202899-74.202899c40.069565 0 74.202899 32.649275 74.202898 74.202899s-34.133333 74.202899-74.202898 74.202898z m74.202898-207.768116h-593.623188v-148.405797h593.623188v148.405797z m0-222.608695h-593.623188v-148.405797h593.623188v148.405797z" p-id="2250"></path></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1631253482826" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3122" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 576V170.666667c0-93.866667-76.8-170.666667-170.666667-170.666667S170.666667 76.8 170.666667 170.666667v405.333333c-55.466667 46.933333-85.333333 115.2-85.333334 192 0 140.8 115.2 256 256 256s256-115.2 256-256c0-72.533333-29.866667-140.8-85.333333-192zM341.333333 938.666667c-93.866667 0-170.666667-76.8-170.666666-170.666667 0-55.466667 25.6-102.4 68.266666-136.533333 12.8-8.533333 17.066667-21.333333 17.066667-34.133334V170.666667c0-46.933333 38.4-85.333333 85.333333-85.333334s85.333333 38.4 85.333334 85.333334v426.666666c0 12.8 4.266667 25.6 17.066666 34.133334 42.666667 34.133333 68.266667 81.066667 68.266667 136.533333 0 93.866667-76.8 170.666667-170.666667 170.666667z" p-id="3123"></path><path d="M375.466667 657.066667V320c0-17.066667-12.8-34.133333-34.133334-34.133333s-34.133333 17.066667-34.133333 34.133333v337.066667c-51.2 12.8-85.333333 59.733333-85.333333 110.933333 0 64 51.2 119.466667 119.466666 119.466667s119.466667-51.2 119.466667-119.466667c0-55.466667-38.4-98.133333-85.333333-110.933333zM341.333333 819.2c-29.866667 0-51.2-25.6-51.2-51.2s25.6-51.2 51.2-51.2 51.2 25.6 51.2 51.2-21.333333 51.2-51.2 51.2zM896 102.4h-256c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666666h256c25.6 0 42.666667-17.066667 42.666667-42.666666s-17.066667-42.666667-42.666667-42.666667zM810.666667 273.066667h-170.666667c-25.6 0-42.666667 17.066667-42.666667 42.666666s17.066667 42.666667 42.666667 42.666667h170.666667c25.6 0 42.666667-17.066667 42.666666-42.666667s-17.066667-42.666667-42.666666-42.666666zM725.333333 443.733333h-85.333333c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666667h85.333333c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667z" p-id="3124"></path></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1631253524628" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4088" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M438.4 544H448c22.4 3.2 70.4 12.8 86.4 76.8 19.2 80 12.8 156.8-73.6 198.4-67.2 35.2-163.2-3.2-211.2-73.6-51.2-73.6-28.8-121.6 60.8-128 25.6-3.2 51.2-9.6 73.6-16 32-6.4 64-28.8 54.4-57.6z m380.8 16c35.2 67.2-3.2 163.2-73.6 211.2-73.6 51.2-121.6 28.8-128-60.8-3.2-25.6-9.6-51.2-16-73.6-6.4-32-28.8-60.8-57.6-54.4V572.8c3.2-22.4 12.8-70.4 76.8-86.4 80-16 153.6-9.6 198.4 73.6z m-348.8 67.2c-19.2 16-38.4 25.6-60.8 32l-12.8 3.2-25.6 9.6c-19.2 3.2-35.2 6.4-48 9.6h-6.4c-9.6 0-19.2 3.2-25.6 3.2 3.2 3.2 6.4 9.6 9.6 16l3.2 6.4c35.2 48 96 70.4 131.2 54.4 44.8-22.4 54.4-54.4 41.6-121.6l-3.2-6.4s0-3.2-3.2-6.4z m172.8-76.8l-9.6 3.2h-3.2l3.2 3.2c16 16 25.6 38.4 32 64l3.2 9.6 6.4 25.6c3.2 19.2 6.4 35.2 9.6 48v6.4c0 9.6 3.2 16 3.2 22.4v6.4c3.2-3.2 9.6-6.4 16-9.6l6.4-3.2c48-35.2 70.4-96 54.4-131.2-25.6-48-57.6-60.8-121.6-44.8z m-236.8-240c3.2 25.6 9.6 51.2 16 73.6 6.4 32 28.8 60.8 57.6 54.4V448c-3.2 22.4-12.8 70.4-76.8 86.4-80 19.2-156.8 12.8-198.4-73.6-35.2-67.2 3.2-163.2 73.6-211.2 73.6-48 121.6-25.6 128 60.8z m-67.2-19.2c-6.4 3.2-16 6.4-22.4 12.8-48 35.2-70.4 96-54.4 131.2 22.4 44.8 54.4 54.4 121.6 41.6l6.4-3.2h3.2l-3.2-3.2c-16-16-25.6-38.4-32-64l-3.2-9.6-3.2-25.6c-3.2-19.2-6.4-35.2-9.6-48v-6.4c0-9.6 0-19.2-3.2-25.6z m435.2-12.8c51.2 73.6 28.8 121.6-60.8 128-25.6 3.2-51.2 9.6-73.6 16-32 6.4-60.8 28.8-54.4 57.6H576c-22.4-3.2-70.4-12.8-86.4-76.8-19.2-80-12.8-156.8 73.6-198.4 64-35.2 160 3.2 211.2 73.6z m-185.6-16c-44.8 22.4-54.4 54.4-41.6 121.6l3.2 9.6v3.2l3.2-3.2c16-16 38.4-25.6 64-32l9.6-3.2 25.6-6.4c19.2-3.2 35.2-6.4 48-9.6h6.4c9.6 0 19.2-3.2 25.6-3.2-3.2-3.2-6.4-9.6-9.6-16l-3.2-6.4c-32-51.2-96-73.6-131.2-54.4z" fill="#221814" p-id="4089"></path><path d="M512 416c-54.4 0-96 41.6-96 96s41.6 96 96 96 96-41.6 96-96-41.6-96-96-96z m0 64c19.2 0 32 12.8 32 32s-12.8 32-32 32-32-12.8-32-32 12.8-32 32-32z" fill="#C70019" p-id="4090"></path></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -0,0 +1 @@
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>fwq-2</title><link href="css/app.de623f0f.css" rel="preload" as="style"><link href="css/chunk-vendors.9181e156.css" rel="preload" as="style"><link href="js/app.8a80ad6a.js" rel="preload" as="script"><link href="js/chunk-vendors.eab96ded.js" rel="preload" as="script"><link href="css/chunk-vendors.9181e156.css" rel="stylesheet"><link href="css/app.de623f0f.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but fwq-2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.eab96ded.js"></script><script src="js/app.8a80ad6a.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

@ -0,0 +1,9 @@
<template>
<div id="app">
<router-view></router-view>
</div>
</template>
<style>
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 KiB

@ -0,0 +1,21 @@
html,
body,
#app {
height: 100%;
margin: 0;
padding: 0;
}
.el-breadcrumb {
margin-bottom: 15px;
font-size: 15px;
}
.el-card {
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15) !important;
}
.el-table {
margin-top: 15px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1649991844204" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1964" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M544 352m-160 0a160 160 0 1 0 320 0 160 160 0 1 0-320 0Z" fill="#d81e06" p-id="1965"></path></svg>

After

Width:  |  Height:  |  Size: 475 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1649991844204" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1964" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M544 352m-160 0a160 160 0 1 0 320 0 160 160 0 1 0-320 0Z" fill="#1296db" p-id="1965"></path></svg>

After

Width:  |  Height:  |  Size: 475 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1631253564182" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5041" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 0C229.239467 0 0 229.239467 0 512 0 794.760533 229.239467 1024 512 1024c282.760533 0 512-229.239467 512-512C1024 229.239467 794.760533 0 512 0zM678.980267 691.6096l-14.9504 14.882133c-12.424533 12.424533-33.3824 12.970667-46.421333 1.2288l-171.554133-147.456C432.9472 548.590933 422.980267 524.561067 423.867733 507.016533L441.7536 223.914667c0.887467-17.544533 15.9744-31.9488 33.5872-31.9488l21.026133 0c17.6128 0 32.699733 14.336 33.5872 31.9488l14.609067 231.8336c0.887467 17.6128 11.195733 42.734933 22.869333 55.842133L680.277333 645.12C691.950933 658.2272 691.4048 679.185067 678.980267 691.6096z" p-id="5042"></path></svg>

After

Width:  |  Height:  |  Size: 1012 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1631253036832" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2248" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M734.608696 624.788406c-26.713043 0-46.005797-17.808696-46.005797-46.005797s17.808696-46.005797 46.005797-46.005797c26.713043 0 46.005797 17.808696 46.005797 46.005797s-19.292754 46.005797-46.005797 46.005797z" p-id="2249"></path><path d="M838.492754 0h-652.985508c-25.228986 0-44.521739 19.292754-44.521739 44.521739v934.956522c0 25.228986 19.292754 44.521739 44.521739 44.521739h652.985508c25.228986 0 44.521739-19.292754 44.521739-44.521739v-934.956522c0-25.228986-19.292754-44.521739-44.521739-44.521739z m-289.391305 608.463768c-20.776812 0-37.101449-16.324638-37.101449-37.101449s16.324638-37.101449 37.101449-37.101449 37.101449 16.324638 37.10145 37.101449-16.324638 37.101449-37.10145 37.101449z m185.507247 44.521739c-40.069565 0-74.202899-32.649275-74.202899-74.202898s32.649275-74.202899 74.202899-74.202899c40.069565 0 74.202899 32.649275 74.202898 74.202899s-34.133333 74.202899-74.202898 74.202898z m74.202898-207.768116h-593.623188v-148.405797h593.623188v148.405797z m0-222.608695h-593.623188v-148.405797h593.623188v148.405797z" p-id="2250"></path></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1631253482826" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3122" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 576V170.666667c0-93.866667-76.8-170.666667-170.666667-170.666667S170.666667 76.8 170.666667 170.666667v405.333333c-55.466667 46.933333-85.333333 115.2-85.333334 192 0 140.8 115.2 256 256 256s256-115.2 256-256c0-72.533333-29.866667-140.8-85.333333-192zM341.333333 938.666667c-93.866667 0-170.666667-76.8-170.666666-170.666667 0-55.466667 25.6-102.4 68.266666-136.533333 12.8-8.533333 17.066667-21.333333 17.066667-34.133334V170.666667c0-46.933333 38.4-85.333333 85.333333-85.333334s85.333333 38.4 85.333334 85.333334v426.666666c0 12.8 4.266667 25.6 17.066666 34.133334 42.666667 34.133333 68.266667 81.066667 68.266667 136.533333 0 93.866667-76.8 170.666667-170.666667 170.666667z" p-id="3123"></path><path d="M375.466667 657.066667V320c0-17.066667-12.8-34.133333-34.133334-34.133333s-34.133333 17.066667-34.133333 34.133333v337.066667c-51.2 12.8-85.333333 59.733333-85.333333 110.933333 0 64 51.2 119.466667 119.466666 119.466667s119.466667-51.2 119.466667-119.466667c0-55.466667-38.4-98.133333-85.333333-110.933333zM341.333333 819.2c-29.866667 0-51.2-25.6-51.2-51.2s25.6-51.2 51.2-51.2 51.2 25.6 51.2 51.2-21.333333 51.2-51.2 51.2zM896 102.4h-256c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666666h256c25.6 0 42.666667-17.066667 42.666667-42.666666s-17.066667-42.666667-42.666667-42.666667zM810.666667 273.066667h-170.666667c-25.6 0-42.666667 17.066667-42.666667 42.666666s17.066667 42.666667 42.666667 42.666667h170.666667c25.6 0 42.666667-17.066667 42.666666-42.666667s-17.066667-42.666667-42.666666-42.666666zM725.333333 443.733333h-85.333333c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666667h85.333333c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667z" p-id="3124"></path></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1631253524628" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4088" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M438.4 544H448c22.4 3.2 70.4 12.8 86.4 76.8 19.2 80 12.8 156.8-73.6 198.4-67.2 35.2-163.2-3.2-211.2-73.6-51.2-73.6-28.8-121.6 60.8-128 25.6-3.2 51.2-9.6 73.6-16 32-6.4 64-28.8 54.4-57.6z m380.8 16c35.2 67.2-3.2 163.2-73.6 211.2-73.6 51.2-121.6 28.8-128-60.8-3.2-25.6-9.6-51.2-16-73.6-6.4-32-28.8-60.8-57.6-54.4V572.8c3.2-22.4 12.8-70.4 76.8-86.4 80-16 153.6-9.6 198.4 73.6z m-348.8 67.2c-19.2 16-38.4 25.6-60.8 32l-12.8 3.2-25.6 9.6c-19.2 3.2-35.2 6.4-48 9.6h-6.4c-9.6 0-19.2 3.2-25.6 3.2 3.2 3.2 6.4 9.6 9.6 16l3.2 6.4c35.2 48 96 70.4 131.2 54.4 44.8-22.4 54.4-54.4 41.6-121.6l-3.2-6.4s0-3.2-3.2-6.4z m172.8-76.8l-9.6 3.2h-3.2l3.2 3.2c16 16 25.6 38.4 32 64l3.2 9.6 6.4 25.6c3.2 19.2 6.4 35.2 9.6 48v6.4c0 9.6 3.2 16 3.2 22.4v6.4c3.2-3.2 9.6-6.4 16-9.6l6.4-3.2c48-35.2 70.4-96 54.4-131.2-25.6-48-57.6-60.8-121.6-44.8z m-236.8-240c3.2 25.6 9.6 51.2 16 73.6 6.4 32 28.8 60.8 57.6 54.4V448c-3.2 22.4-12.8 70.4-76.8 86.4-80 19.2-156.8 12.8-198.4-73.6-35.2-67.2 3.2-163.2 73.6-211.2 73.6-48 121.6-25.6 128 60.8z m-67.2-19.2c-6.4 3.2-16 6.4-22.4 12.8-48 35.2-70.4 96-54.4 131.2 22.4 44.8 54.4 54.4 121.6 41.6l6.4-3.2h3.2l-3.2-3.2c-16-16-25.6-38.4-32-64l-3.2-9.6-3.2-25.6c-3.2-19.2-6.4-35.2-9.6-48v-6.4c0-9.6 0-19.2-3.2-25.6z m435.2-12.8c51.2 73.6 28.8 121.6-60.8 128-25.6 3.2-51.2 9.6-73.6 16-32 6.4-60.8 28.8-54.4 57.6H576c-22.4-3.2-70.4-12.8-86.4-76.8-19.2-80-12.8-156.8 73.6-198.4 64-35.2 160 3.2 211.2 73.6z m-185.6-16c-44.8 22.4-54.4 54.4-41.6 121.6l3.2 9.6v3.2l3.2-3.2c16-16 38.4-25.6 64-32l9.6-3.2 25.6-6.4c19.2-3.2 35.2-6.4 48-9.6h6.4c9.6 0 19.2-3.2 25.6-3.2-3.2-3.2-6.4-9.6-9.6-16l-3.2-6.4c-32-51.2-96-73.6-131.2-54.4z" fill="#221814" p-id="4089"></path><path d="M512 416c-54.4 0-96 41.6-96 96s41.6 96 96 96 96-41.6 96-96-41.6-96-96-96z m0 64c19.2 0 32 12.8 32 32s-12.8 32-32 32-32-12.8-32-32 12.8-32 32-32z" fill="#C70019" p-id="4090"></path></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -0,0 +1,101 @@
<template>
<div :id="ip"
style="width: 100%;height: 300px;background:white;">
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'TempCharts',
props: ['ip'],
data () {
return {
tempList: [['2000-06-05', 116], ['2000-06-06', 129], ['2000-06-07', 135], ['2000-06-08', 86], ['2000-06-09', 73], ['2000-06-10', 85], ['2000-06-11', 73], ['2000-06-12', 68], ['2000-06-13', 92], ['2000-06-14', 130], ['2000-06-15', 245], ['2000-06-16', 139], ['2000-06-17', 115], ['2000-06-18', 111], ['2000-06-19', 309], ['2000-06-20', 206], ['2000-06-21', 137], ['2000-06-22', 128], ['2000-06-23', 85], ['2000-06-24', 94], ['2000-06-25', 71], ['2000-06-26', 106], ['2000-06-27', 84], ['2000-06-28', 93], ['2000-06-29', 85], ['2000-06-30', 73], ['2000-07-01', 83], ['2000-07-02', 125], ['2000-07-03', 107], ['2000-07-04', 82], ['2000-07-05', 44], ['2000-07-06', 72], ['2000-07-07', 106], ['2000-07-08', 107], ['2000-07-09', 66], ['2000-07-10', 91], ['2000-07-11', 92], ['2000-07-12', 113], ['2000-07-13', 107], ['2000-07-14', 131], ['2000-07-15', 111], ['2000-07-16', 64], ['2000-07-17', 69], ['2000-07-18', 88], ['2000-07-19', 77], ['2000-07-20', 83], ['2000-07-21', 111], ['2000-07-22', 57], ['2000-07-23', 55], ['2000-07-24', 60]],
create_time: [],
temp: [],
myChart: {},
option: {
visualMap: {
show: false,
type: 'continuous',
seriesIndex: 0,
min: 20,
max: 120
},
title: {
left: 'center',
text: '温度监测 '
},
tooltip: {
trigger: 'axis'
},
xAxis: {
// data: this.create_time
data: []
},
yAxis: {},
series: {
type: 'line',
showSymbol: false,
// data: this.temp
data: []
}
}
}
},
methods: {
initCharts () {
this.myChart = echarts.init(document.getElementById(this.ip))
// var data = this.tempList
// var dateList = data.map(function (item) {
// return item[0]
// })
// var valueList = data.map(function (item) {
// return item[1]
// })
this.option.xAxis.data = this.create_time
this.option.series.data = this.temp
this.myChart.setOption(this.option)
},
async getTempList () {
// const { data: res } = await this.$http.post('UserFan', { userIp: 'ip101311923' })
const { data: res } = await this.$http.post('userFan', `userIp=${this.ip}`)
this.tempList = res
this.create_time = []
this.temp = []
for (const i in this.tempList) {
this.create_time.push(this.tempList[i].create_time)
this.temp.push(this.tempList[i].temp)
// this.option.xAxis.data.push(this.tempList[i].create_time)
// this.option.series.data.push(this.tempList[i].temp)
// console.log(this.option.series.data)
}
// console.log(this.create_time)
// console.log(typeof (this.tempList))
this.option.xAxis.data = this.create_time
this.option.series.data = this.temp
this.myChart.setOption(this.option)
},
changeTemp () {
}
},
mounted () {
this.initCharts()
},
created () {
this.getTempList()
setInterval(this.getTempList, 2000)
}
}
</script>
<style scoped>
</style>

@ -0,0 +1,108 @@
<template>
<div id="charts2" style="width: 100%;height: 300px;background:white;">
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'TempCharts2',
data () {
return {
x: 0
}
},
methods: {
initCharts () {
var x = this.x
var myChart = echarts.init(document.getElementById('charts2'))
var data = [['12:06:05', 40], ['12:06:06', 43], ['12:06:07', 45], ['12:06:08', 47], ['12:06:09', 50], ['12:06:10', 54], ['12:06:11', 60], ['12:06:12', 66], ['12:06:13', 70], ['12:06:14', 66], ['12:06:15', 65], ['12:06:16', 64], ['12:06:17', 60], ['12:06:18', 58], ['12:06:19', 57], ['12:06:20', 55], ['12:06:21', 54], ['12:06:22', 50], ['12:06:23', 49], ['12:06:24', 48], ['12:06:25', 47], ['12:06:26', 44], ['12:06:27', 50], ['12:06:28', 56], ['12:06:29', 60], ['12:06:30', 68], ['12:07:01', 70], ['12:07:02', 66], ['12:07:03', 65], ['12:07:04', 63], ['12:07:05', 60], ['12:07:06', 58], ['12:07:07', 56], ['12:07:08', 54], ['12:07:09', 53], ['12:07:10', 50], ['12:07:11', 47], ['12:07:12', 46], ['12:07:13', 48], ['12:07:14', 50], ['12:07:15', 54], ['12:07:16', 60], ['12:07:17', 66], ['12:07:18', 64], ['12:07:19', 60], ['12:07:20', 58], ['12:07:21', 57], ['12:07:22', 55], ['12:07:23', 53], ['12:07:24', 50]]
var dateList = data.map(function (item) {
return item[0]
})
var valueList = data.map(function (item) {
return item[1]
})
var option = {
visualMap: {
show: false,
type: 'continuous',
seriesIndex: 0,
min: 30,
max: 120
},
title: {
left: 'center',
text: '温度监测'
},
tooltip: {
trigger: 'axis'
},
xAxis: {
data: dateList
},
yAxis: {},
series: {
type: 'line',
showSymbol: false,
data: valueList
}
}
myChart.setOption(option)
setInterval(function () {
x = parseInt(Math.random() * (5 - (-5) + 1) + (-5), 10)
data.shift()
data.push(['12:07:24', 40 + x])
dateList = data.map(function (item) {
return item[0]
})
valueList = data.map(function (item) {
return item[1]
})
option = {
visualMap: {
show: false,
type: 'continuous',
seriesIndex: 0,
min: 30,
max: 120
},
title: {
left: 'center',
text: '温度监测'
},
tooltip: {
trigger: 'axis'
},
xAxis: {
data: dateList
},
yAxis: {},
series: {
type: 'line',
showSymbol: false,
data: valueList
}
}
myChart.setOption(option)
}, 2000)
}
},
mounted () {
this.initCharts()
}
}
</script>
<style scoped>
</style>

@ -0,0 +1,215 @@
<template>
<el-container class="home-container" id="topAnchor" direction="vertical">
<div style="height:45px; width:100%; background-color:#f7f8fa ">
<div style="position:absolute;top:10px;left:12%;line-height:2.5em;">预约热线 000-000-000</div>
<div style="position:absolute;top:10px;right:5%">
<router-link to="login"><el-button style="width:100px;">登陆</el-button></router-link>
</div>
</div>
<!-- // -->
<el-header style="height: 100px; width:100% display: flex ; justify-content: space-between; background-color: #fff;">
<div style="position: relative;">
<h3 class="top_title1">控温者 - 数据中心节能平台</h3>
</div>
<!-- <p >高路交通理解云</p> -->
</el-header>
<!-- // start-->
<div class="carousel">
<template>
<el-carousel :interval="4000" type="card" height="450px">
<el-carousel-item v-for="(item, index) in list" :key="index">
<img :src="item.src" alt="" style="width: 100%; height: 100%; " />
</el-carousel-item>
</el-carousel>
</template>
</div>
<!-- // end-->
<el-footer style=" color: #ddd; height:350px; background-color: rgb(37, 37, 37); margin-top: 55px">
<div class="mod_copyright">
<div class="copyright">
<el-row :gutter="20">
<el-col :span="8">
<h4>@版权所有</h4>
<div class="footer_text">内蒙古工业大学</div>
<div class="footer_text">内蒙古工业大学人工智能研究小组</div>
</el-col>
<el-col :span="8">
<div>
<h3>联系方式</h3>
<div class="footer_text">联系QQ: xxxxxxx</div>
<div class="footer_text">联系邮箱: xxxxx@.com</div>
<div class="footer_text">手机号码:157xxxxxxxx</div>
</div>
</el-col>
</el-row>
</div>
<div style="color: #7e7e7e;font-size:12px; text-align:center;">
<p>地址内蒙古工业大学金川校区 邮编xxxxx 电话xxx-xxx-xxxx 传真xxx-xxxxxxxx 蒙公网安备 15082202000131<br />Copyright &copy; 2018.Company name All rights reserved.</p>
</div>
</div>
</el-footer>
<!-- 返回顶部按钮 -->
<template>
<el-backtop>
<div
style="{
height: 100%;
width: 100%;
border-radius: 50px;
background-color: #f2f5f6;
box-shadow: 0 0 6px rgba(0,0,0, .12);
text-align: center;
line-height: 40px;
color: #1989fa;
}"
>
<i class="el-icon-caret-top"></i>
</div>
</el-backtop>
</template>
</el-container>
</template>
<script>
export default {
name: 'Home',
data () {
return {
list: [
{
src: 'https://img2.baidu.com/it/u=903467524,2920385702&fm=26&fmt=auto'
},
{
src: 'https://img2.baidu.com/it/u=1514194555,1408855411&fm=26&fmt=auto'
},
{
src: 'https://img1.baidu.com/it/u=4264221152,3602489092&fm=26&fmt=auto'
},
{
src: 'https://img2.baidu.com/it/u=2673658967,4041565795&fm=26&fmt=auto'
},
{
src: 'https://img1.baidu.com/it/u=135466862,2358213243&fm=26&fmt=auto'
}
],
activeIndex: '1'
}
}
}
</script>
<style lang="less" scoped>
.top_title1 {
position: absolute;
color: #409eff;
font-size: 35px;
top: -12px;
left: 36%;
}
.top_title2 {
position: absolute;
color: #cccccc;
font-size: 35px;
top: -12px;
left: 50%;
}
.el-menu-demo {
margin-top: 8px;
margin-left: 40%;
display: inline-flex;
}
.el-menu-item {
font-size: 18px;
height: 30px;
background-color: #fff;
}
.el-menu-item.is-active,
.el-menu-item:hover i {
color: #409eff !important;
}
.LOGO {
width: 350px;
height: 75px;
}
.w {
width: 1600px;
margin: 20px auto;
}
.bottom {
margin-top: 13px;
line-height: 12px;
}
.image {
width: 100%;
height: 230px;
object-fit: fill;
display: block;
}
.el-card {
height: 350px;
}
.clearfix:before,
.clearfix:after {
display: table;
content: '';
}
.clearfix:after {
clear: both;
}
.footer_text {
margin-bottom: 18px;
font-size: 10px;
cursor: pointer;
color: #7e7e7e;
}
.footer_text:hover {
font-weight: 800;
}
.el-menu-item:before {
content: '';
}
.news_title {
font-weight: normal;
cursor: pointer;
margin-top: 0;
}
.news_title a {
text-decoration: none;
color: #000;
}
.news:hover,
.news:hover .news_title a {
color: #409eff;
}
.mod_copyright .links ul li {
float: left;
padding-left: 120px;
list-style: none;
margin-top: 10px;
margin-left: 18px;
}
.mod_copyright .links ul li a {
color: #7e7e7e;
font-size: 14 px;
}
.links {
width: 1347px;
height: 80px;
margin: 0 auto;
border-bottom: 1px #7e7e7e solid;
}
.copyright {
margin-left: 35%;
}
</style>

@ -0,0 +1,153 @@
<template>
<div class="main-container">
<el-card>
<div class="imgbox"><img src="../assets/logo.jpeg"></div>
<el-form
label-width="0px"
class="login-form"
:model="loginForm"
:rules="loginFormRules"
ref="loginFormRef"
>
<!-- 用户名-->
<el-form-item
label=""
prop="username"
>
<el-input
prefix-icon="iconfont icon-user"
v-model="loginForm.username"
></el-input>
</el-form-item>
<!-- 密码-->
<el-form-item
label=""
prop="password"
>
<el-input
prefix-icon="iconfont icon-3702mima"
v-model="loginForm.password"
type="password"
></el-input>
</el-form-item>
<el-form-item
label=""
class="btns"
>
<el-button
type="primary"
@click="login"
>登陆</el-button>
<el-button
type="info"
@click="resetLoginForm"
>重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</template>
<script>
export default {
name: 'Login',
data () {
return {
//
loginForm: {
username: 'admin',
password: '123456'
},
//
loginFormRules: {
username: [
{ required: true, message: '请输入用户名', trigger: 'blur' },
{ min: 3, max: 10, message: '长度在3-10个字符之间', trigger: 'blur' }
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' },
{ min: 6, max: 15, message: '长度在6-15个字符之间', trigger: 'blur' }
]
}
}
},
methods: {
//
resetLoginForm () {
this.$refs.loginFormRef.resetFields()
},
//
login () {
this.$refs.loginFormRef.validate(async valid => {
if (!valid) {
return
}
const { data: res } = await this.$http.post('/login', this.loginForm)
console.log(res)
if (res.code !== 200) return this.$message.error('登陆失败!')
else {
this.$message.success('登陆成功!')
window.sessionStorage.setItem('token', res.state)
window.sessionStorage.setItem('loginTime', res.loginTime)
window.sessionStorage.setItem('username', res.name)
this.$router.push('/main')
}
})
}
}
}
</script>
<style scoped>
body {
margin: 0;
padding: 0;
}
.main-container {
width: 100vm;
height: 100vh;
background: #40739e;
position: relative;
}
.el-card {
width: 50%;
height: 60%;
position: fixed;
left: 25%;
top: 22.5%;
overflow: inherit;
}
img {
width: 100%;
height: 100%;
border-radius: 50%;
background: #eee;
}
.imgbox {
height: 130px;
width: 130px;
border: 1px solid #eee;
border-radius: 50%;
padding: 10px;
box-shadow: 0 0 10px #ddd;
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
background: #fff;
}
.el-form {
position: absolute;
width: 70%;
padding: 0 20px;
box-sizing: border-box;
top: 30%;
left: 14%;
}
.btns {
display: flex;
justify-content: flex-end;
}
</style>

@ -0,0 +1,181 @@
<template>
<el-container class="home-container">
<!-- 头部区域-->
<el-header>
<div> 温控中心</div>
</el-header>
<el-container class="home-container">
<!-- 侧边栏-->
<el-aside
:width="isCollapse ? '64px' : '200px'"
style="background:#40407a;"
>
<div
class="toggle-button"
@click="toggleCollapse"
>|||</div>
<el-menu
class="el-menu-vertical-demo"
background-color="#40407a"
text-color="#aaa69d"
active-text-color="#fff"
:default-active="activePath"
:unique-opened="true"
:collapse="isCollapse"
:collapse-transition="false"
router
>
<el-submenu index="1">
<template slot="title">
<i class="el-icon-location"></i>
<span>服务器管理</span>
</template>
<el-menu-item
index="mainmenu"
@click="saveNavState(item.frame_id.toString())"
v-for="item in frameList"
:key="item.frame_id"
><i class="el-icon-menu"></i>
<span>{{item.frame_name}}</span>
</el-menu-item>
</el-submenu>
<!-- <el-menu-item
index="mainmenu"
@click="saveNavState('mainmenu')"
> <i class="el-icon-video-camera-solid"></i><span>数据库中心</span></el-menu-item> -->
<el-menu-item
index="groups"
@click="saveNavState('groups')"
> <i class="el-icon-video-camera-solid"></i><span>机组管理</span></el-menu-item>
<el-menu-item
index="users"
@click="saveNavState('users')"
> <i class="el-icon-video-camera-solid"></i><span>用户管理</span></el-menu-item>
<el-menu-item
index="list"
@click="saveNavState('list')"
> <i class="el-icon-video-camera-solid"></i><span>联系我们</span></el-menu-item>
<!-- <el-menu-item index="/" ><i class="el-icon-video-camera-solid"></i><sapn>返回主页</sapn></el-menu-item> -->
</el-menu>
</el-aside>
<!-- 主界面-->
<el-main>
<router-view :key="activePath"></router-view>
</el-main>
</el-container>
</el-container>
</template>
<script>
export default {
data () {
return {
//
isCollapse: false,
activePath: 'default',
username: '',
loginTime: '',
frameList: ''
}
},
methods: {
logout () {
window.sessionStorage.clear()
this.$router.push('/login')
},
//
toggleCollapse () {
this.isCollapse = !this.isCollapse
},
//
saveNavState (activePath) {
window.sessionStorage.setItem('activePath', activePath)
this.activePath = activePath
},
async getFrameList () {
const { data: res } = await this.$http.get('/frame/list')
this.frameList = res.data
console.log(res.data)
}
},
created () {
this.getFrameList()
// console.log(this.roleList)
}
}
</script>
<style lang="less" scoped>
.home-container {
height: 100%;
}
header {
display: flex;
color: white;
font-size: 20px;
background: #2b5876; /* fallback for old browsers */
background: -webkit-linear-gradient(
to right,
#4e4376,
#2b5876
); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(
to right,
#4e4376,
#2b5876
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
justify-content: center;
}
.el-header {
> div {
display: flex;
align-items: center;
span {
margin-left: 15px;
}
}
}
.el-aside {
background: #fff;
transition: 1s;
.el-menu {
border-right: none;
}
}
.el-main {
background: #eaedf1;
}
.iconfont {
margin-right: 10px;
}
.toggle-button {
background: #4a5064;
font-size: 10px;
line-height: 24px;
color: #fff;
text-align: center;
letter-spacing: 0.3em;
cursor: pointer;
}
.menu-title {
font-size: 18px;
}
.home-container {
height: 100%;
}
el-aside {
transition: 1s;
}
.el-submenu__title {
transition: 1s;
}
</style>

@ -0,0 +1,147 @@
<template>
<div>
<el-container>
<el-header>
<span class="title" style="width: 250px;height: 50px; margin-left: 5px;margin-top:5px;background-color:pink">温控中心</span>
</el-header>
<el-container>
<el-aside width="200px">
<el-menu
:default-active="activeIndex"
class="el-menu-demo"
mode="horizontal"
@select="handleSelect"
background-color="#40407a"
text-color="#aaa69d"
active-text-color="#fff"
:router="true"
>
<!-- <el-menu-item index="mainmenu"></el-menu-item>
<el-menu-item index="list">联系我们</el-menu-item> -->
<el-menu-item index="mainmenu">数据库中心</el-menu-item>
<el-menu-item index="groups">机组管理</el-menu-item>
<el-menu-item index="users">用户管理</el-menu-item>
<el-menu-item index="list">联系我们</el-menu-item>
<el-menu-item index="/">返回主页</el-menu-item>
<el-submenu
index="logout"
style="width:200px;"
>
<template slot="title">
<div class="userInfo"><span>用户名{{username}}</span></div>
<div class="timeInfo">登陆日期{{loginTime}}</div>
</template>
<el-menu-item
@click="logout"
style="width:20px;"
>退出登录</el-menu-item>
</el-submenu>
</el-menu>
</el-aside>
<el-main>
<router-view></router-view>
</el-main>
</el-container>
<el-footer>Footer</el-footer>
<!-- </el-container> -->
</el-container>
<!-- <div class="filter"></div> -->
<!-- <div
class="receive"
style="height: 3em;width: 100%"
></div> -->
</div>
</template>
<script>
export default {
name: 'Menu.vue',
data () {
return {
username: '',
loginTime: '',
activeIndex: '1',
activeIndex2: '1'
}
},
methods: {
handleSelect (key, keyPath) {
console.log(key, keyPath)
},
logout () {
window.sessionStorage.clear()
this.$router.push('/login')
}
},
created () {
this.username = window.sessionStorage.getItem('username')
this.loginTime = window.sessionStorage.getItem('loginTime')
}
}
</script>
<style scoped>
.header {
background: #2b5876; /* fallback for old browsers */
background: -webkit-linear-gradient(
to right,
#4e4376,
#2b5876
); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(
to right,
#4e4376,
#2b5876
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
position: fixed;
top: 0;
/* border-radius: 15px; */
width: 100%;
z-index: 6;
}
.title {
font-size: 2em;
display: block;
margin: 0 auto;
line-height: 2em;
color: white;
}
.menu {
height: 1000px;
background-size: 100%;
}
a {
text-decoration: none;
}
.filter {
position: fixed;
width: 100%;
height: 1000px;
background: rgba(255, 255, 255, 0.5);
backdrop-filter: blur(4px);
top: 3em;
}
.containe::-webkit-scrollbar::-webkit-scrollbar {
display: none; /* Chrome Safari */
}
.userInfo,
.timeInfo {
width: 100%;
height: 50%;
box-sizing: border-box;
border-bottom: 1px solid gray;
font-size: 8px;
color: #d2cfca;
line-height: 3.5em;
}
.el-menu--horizontal > .el-menu-item {
width: 100%;
}
</style>

@ -0,0 +1,792 @@
<template>
<div class="container">
<!-- <div class="header">
<span>服务器机组1</span>
</div> -->
<!-- 改变风扇dialog -->
<el-dialog
title="调节风扇转速"
:visible.sync="fansDialogVisible"
width="40%"
>
<h1>档位调节</h1>
<el-row>
<el-button
type="info"
plain
style="width: 80px"
@click="changeFanSpeedByNum(0)"
>0</el-button>
<el-button
plain
style="width: 80px"
@click="changeFanSpeedByNum(1)"
>1</el-button>
<el-button
type="primary"
style="width: 80px"
plain
@click="changeFanSpeedByNum(2)"
>2</el-button>
<el-button
type="success"
style="width: 80px"
plain
@click="changeFanSpeedByNum(3)"
>3</el-button>
<el-button
type="warning"
style="width: 80px"
plain
@click="changeFanSpeedByNum(4)"
>4</el-button>
<el-button
type="danger"
style="width: 80px"
plain
@click="changeFanSpeedByNum(5)"
>5</el-button>
</el-row>
<h1>指定转速</h1>
<el-row>
<el-input
placeholder="请输入0-255之间的风扇转速 "
style="width: 80%"
v-model="chosedSpeed"
>
</el-input>
<el-button
type="primary"
@click="changeFanSpeedByChosedSpeed()"
>提交</el-button>
</el-row>
</el-dialog>
<!-- 结束风扇dialog -->
<div class="topcards">
<div class="topcard">
<div class="topcard-title">
服务器数量
</div>
<div class="topcard-content">
<div class="card-icon"><img
src="@/assets/服务器.svg"
class="card-icon-img"
></div>
<div class="card-icon-font">{{ipList.length }}</div>
</div>
</div>
<div class="topcard">
<div class="topcard-title">
服务器温度
</div>
<div class="topcard-content">
<div class="card-icon"><img
src="@/assets/温度.svg"
class="card-icon-img"
></div>
<div class="card-icon-font">{{cardList.temp}}</div>
</div>
</div>
<div class="topcard">
<div class="topcard-title">
风扇转速
</div>
<div class="topcard-content">
<div class="card-icon"><img
src="@/assets/风扇.svg"
class="card-icon-img"
></div>
<div class="card-icon-font">{{ cardList.speed }}</div>
</div>
</div>
<div class="topcard">
<div class="topcard-title">
运行时长
</div>
<div class="topcard-content">
<div class="card-icon"><img
src="@/assets/时钟.svg"
class="card-icon-img"
></div>
<div class="card-icon-font">{{ cardList.min}}h</div>
</div>
</div>
</div>
<div class="charts-container">
<div
class="chart"
v-for="(item,index) in ipList"
:key="index"
>
<div class="topcard-title">
<div class="header-1"><img
src="@/assets/online.svg"
width="40px"
/>
服务器{{item.ip}}</div>
<div class="buttons">
<el-button
type="success"
size="small"
icon="el-icon-data-line"
class="detail"
@click="showDetail(item.ip)"
>显示详细信息</el-button>
<el-button
size="small"
type="warning"
icon="el-icon-magic-stick"
class="auto"
@click="autoChange(item.ip,index)"
>{{ipList[index].status || '更改模式'}}</el-button>
<!-- <el-input
v-model="fanspeed[index]"
class="put-input"
></el-input> -->
<el-button
size="small"
type="primary"
class="put-button"
@click="changeFanSpeed(item.ip,index)"
>改变风扇转速</el-button>
</div>
</div>
<div class="chart-item">
<TempCharts :ip="item.ip"></TempCharts>
</div>
</div>
<div
class="chart"
style="display:none;"
>
<div class="topcard-title">
<div class="header-1"><img
src="@/assets/online.svg"
width="40px"
/>
服务器1</div>
<div class="buttons">
<el-button
type="success"
size="small"
icon="el-icon-data-line"
class="detail"
@click="$message.success('此服务器仅供展示,无法显示!')"
>显示详细信息</el-button>
<el-button
size="small"
type="warning"
icon="el-icon-magic-stick"
class="auto"
@click="$message.success('此服务器仅供展示,无法显示!')"
> 更改模式</el-button>
<!-- <el-input
v-model="fanspeed[index]"
class="put-input"
></el-input> -->
<el-button
size="small"
type="primary"
class="put-button"
@click="$message.success('此服务器仅供展示,无法更改!')"
>改变风扇转速</el-button>
</div>
</div>
<div class="chart-item">
<TempCharts2></TempCharts2>
</div>
</div>
</div>
<el-dialog
:title="`服务器${dialog.ip}`"
:visible.sync="dialogVisible"
width="80%"
class="dialog1"
>
<div
class="dialog-container"
slot='footer'
>
<div class="dialog-chart">
<el-card
class="dialog-card"
id="card1"
slot='footer'
>
<div
id="card-1"
class="card-"
></div>
</el-card>
</div>
<div class="dialog-chart">
<el-card
class="dialog-card"
id="card2"
slot='footer'
>
<div
id="card-2"
class="card-"
></div>
</el-card>
</div>
<div class="dialog-chart">
<el-card
class="dialog-card"
id="card3"
slot='footer'
>
<div
id="card-3"
class="card-"
></div>
</el-card>
</div>
<div class="dialog-chart">
<el-card
class="dialog-card"
id="card4"
slot='footer'
>
<div
id="card-4"
class="card-"
></div>
</el-card>
</div>
<div class="dialog-chart">
<el-card
class="dialog-card"
id="card5"
slot='footer'
>
<div
id="card-5"
class="card-"
></div>
</el-card>
</div>
<div class="dialog-chart">
<el-card
class="dialog-card"
id="card6"
slot='footer'
>
<div
id="card-6"
class="card-"
></div>
</el-card>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import TempCharts from '@/components/Charts/TempCharts'
import $ from 'jquery'
import TempCharts2 from '@/components/Charts/TempCharts2'
import * as echarts from 'echarts'
export default {
name: 'MyMenu',
data () {
return {
chosedSpeed: '',
fansDialogVisible: false,
activeIP: '',
frameId: '',
dialog: {
ip: [],
percent: [],
temp: [],
power: [],
date: [],
fanspeed: [],
Mfree: [],
MPercent: [],
Mtotal: [],
Mused: []
},
cardList: {
total: 0,
temp: 0,
speed: 0,
min: 0
},
tempList: [],
dialogVisible: false,
fanspeed: [],
autoColor: [],
fanspeedshow: '1800',
ipList: [],
fanspeed1: '',
checkSpeed: { type: 'number', min: 0, max: 266, message: '大小要在0到255', trigger: 'blur' },
optionFanSpeed: {
visualMap: {
show: false,
type: 'continuous',
seriesIndex: 0,
min: 0,
max: 1800
},
title: {
left: 'center',
text: '风扇转速监测 '
},
tooltip: {
trigger: 'axis'
},
xAxis: {
// data: this.create_time
data: []
},
yAxis: {},
series: {
type: 'line',
showSymbol: false,
// data: this.temp
data: []
}
},
optionPercent: {
visualMap: {
show: false,
type: 'continuous',
seriesIndex: 0,
min: 0,
max: 100
},
title: {
left: 'center',
text: 'CPU占用率监测 '
},
tooltip: {
trigger: 'axis'
},
xAxis: {
// data: this.create_time
data: []
},
yAxis: {},
series: {
type: 'line',
showSymbol: false,
// data: this.temp
data: []
}
},
optionPower: {
visualMap: {
show: false,
type: 'continuous',
seriesIndex: 0,
min: 20,
max: 50
},
title: {
left: 'center',
text: 'CPU功率监测 '
},
tooltip: {
trigger: 'axis'
},
xAxis: {
// data: this.create_time
data: []
},
yAxis: {},
series: {
type: 'line',
showSymbol: false,
// data: this.temp
data: []
}
},
optionMfree: {
visualMap: {
show: false,
type: 'continuous',
seriesIndex: 0,
min: 0,
max: 100
},
title: {
left: 'center',
text: '内存可用'
},
tooltip: {
trigger: 'axis'
},
xAxis: {
// data: this.create_time
data: []
},
yAxis: {},
series: {
type: 'line',
showSymbol: false,
// data: this.temp
data: []
}
},
optionMPercent: {
visualMap: {
show: false,
type: 'continuous',
seriesIndex: 0,
min: 20,
max: 120
},
title: {
left: 'center',
text: '内存占用百分比 '
},
tooltip: {
trigger: 'axis'
},
xAxis: {
// data: this.create_time
data: []
},
yAxis: {},
series: {
type: 'line',
showSymbol: false,
// data: this.temp
data: []
}
},
optionMused: {
visualMap: {
show: false,
type: 'continuous',
seriesIndex: 0,
min: 20,
max: 120
},
title: {
left: 'center',
text: '内存已使用量 '
},
tooltip: {
trigger: 'axis'
},
xAxis: {
// data: this.create_time
data: []
},
yAxis: {},
series: {
type: 'line',
showSymbol: false,
// data: this.temp
data: []
}
}
}
},
methods: {
async changeFanSpeed (item, index) {
// var that = this
// if (this.fanspeed[index] < 0 || this.fanspeed[index] > 255 || !this.fanspeed[index]) {
// this.$message.error('0-255')
// } else {
// $.ajax({
// type: 'post', //
// url: 'http://110.40.152.26:9016/speed', //
// data: { speed: this.fanspeed[index], userIp: item }, //
// success: function (data) {
// //
// that.$message.success('')//
// },
// error: function (data) {
// that.$message.error('')//
// }
// })
// }
console.log(item)
this.fansDialogVisible = true
this.activeIP = item
},
async getCard () {
const { data: res } = await this.$http.get('card')
this.cardList = res
// console.log(res)
// this.fanspeedshow = res
},
async getIpList () {
const { data: res } = await this.$http.post(`/frame/exitIps/${this.frameId}`)
// console.log(res)
// for (const item in res) {
// this.ipList.push({ ip: res[item] })
// }
res.data.forEach(item => {
this.ipList.push({ ip: item.ip })
})
},
autoChange (ip, index) {
var that = this
this.$prompt('此操作可能不适配于你的机型,可能导致不可逆的硬件损伤,你可以联系我们适配或者继续使用,继续使用请输入‘我已知悉’', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
if (value !== '我已知悉') {
this.$message({
type: 'error',
message: '请输入我已知悉!'
})
} else {
$.ajax({
type: 'post', //
url: 'http://110.40.152.26:9016/AI', //
data: { userIp: ip }, //
success: function (data) {
//
data = JSON.stringify(data)
if (data === '"0"') {
that.$message.success('更改成功,当前模式:手动模式')//
that.ipList[index].status = '手动模式'
that.$forceUpdate()
} else if (data === '"1"') {
that.$message.success('更改成功,当前模式:智能模式')//
that.ipList[index].status = '智能模式'
that.$forceUpdate()
}
},
error: function (data) {
that.$message.error('更改失败,接口错误')//
}
})
}
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
this.$forceUpdate()
},
async showDetail (ip) {
this.dialogVisible = true
this.dialog.ip = ip
this.initCharts()
setInterval(this.postChart, 2000)
},
async postChart () {
const { data: res } = await this.$http.post('realCpuAndMem', `ip=${this.dialog.ip}`)
this.tempList = res
this.dialog.date = []
this.dialog.fanspeed = []
this.dialog.percent = []
this.dialog.power = []
this.dialog.Mfree = []
this.dialog.MPercent = []
this.dialog.Mtotal = []
this.dialog.Mused = []
for (const i in this.tempList.cpu) {
this.dialog.date.push(this.tempList.cpu[i].create_time)
this.dialog.fanspeed.push(this.tempList.cpu[i].fanSpeed)
this.dialog.percent.push(this.tempList.cpu[i].percent)
this.dialog.power.push(this.tempList.cpu[i].power)
this.dialog.Mfree.push(this.tempList.mem[i].free)
this.dialog.MPercent.push(this.tempList.mem[i].percent)
this.dialog.Mtotal.push(this.tempList.mem[i].total)
this.dialog.Mused.push(this.tempList.mem[i].used)
}
this.optionPercent.xAxis.data = this.dialog.date
this.optionPower.xAxis.data = this.dialog.date
this.optionFanSpeed.xAxis.data = this.dialog.date
this.optionPercent.series.data = this.dialog.percent
this.optionPower.series.data = this.dialog.power
this.optionFanSpeed.series.data = this.dialog.fanspeed
this.optionMfree.xAxis.data = this.dialog.date
this.optionMPercent.xAxis.data = this.dialog.date
this.optionMused.xAxis.data = this.dialog.date
this.optionMfree.series.data = this.dialog.Mfree
this.optionMPercent.series.data = this.dialog.MPercent
this.optionMused.series.data = this.dialog.Mused
// console.log(this.optionFanSpeed.series.data)
this.myChartFanSpeed.setOption(this.optionFanSpeed)
this.myChartPercent.setOption(this.optionPercent)
this.myChartPower.setOption(this.optionPower)
this.myChartMfree.setOption(this.optionMfree)
this.myChartMPercent.setOption(this.optionMPercent)
this.myChartMused.setOption(this.optionMused)
},
initCharts () {
this.myChartFanSpeed = echarts.init(document.getElementById('card-1'))
// this.myChartFanSpeed.setOption(this.optionFanSpeed)
this.myChartPercent = echarts.init(document.getElementById('card-2'))
// this.myChartPercent.setOption(this.optionPercent)
this.myChartPower = echarts.init(document.getElementById('card-3'))
// this.myChartPower.setOption(this.optionPower)
this.myChartMfree = echarts.init(document.getElementById('card-4'))
this.myChartMPercent = echarts.init(document.getElementById('card-5'))
this.myChartMused = echarts.init(document.getElementById('card-6'))
this.postChart()
},
async changeFanSpeedByNum (num) {
console.log({ userIp: this.activeIP, speed: num })
const { data: res } = await this.$http.post('changeSpeed', { userIp: this.activeIP, speed: num })
console.log(res)
if (res.code === 200) this.$message.success('更改成功')
else this.$message.error('更改失败')
},
async changeFanSpeedByChosedSpeed () {
console.log(`speed?userIp=${this.activeIP}&speed=${this.chosedSpeed}`)
if (this.chosedSpeed < 0 || this.chosedSpeed > 255 || !this.chosedSpeed) {
this.$message.error('更改失败转速要在0-255之内')
} else {
const { data: res } = await this.$http.post(`speed?userIp=${this.activeIP}&speed=${this.chosedSpeed}`)
console.log(res)
if (res === '') this.$message.success('更改成功')
else this.$message.error('更改失败')
}
}
},
mounted () {
},
created () {
this.frameId = window.sessionStorage.getItem('activePath')
this.getCard()
setInterval(this.getCard, 2000)
this.getIpList()
},
components: { TempCharts2, TempCharts }
}
</script>
<style scoped>
.container {
min-width: 1200px;
width: 100%;
/* background-color: gray; */
}
.header {
font-size: 25px;
padding: 25px;
text-align: center;
}
.topcards {
display: flex;
justify-content: space-around;
align-items: center;
flex-wrap: nowrap;
padding: 25px;
}
.topcard {
width: 300px;
height: 150px;
background-color: #fff;
border-radius: 10px;
margin: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
/* display: flex;
justify-content: center;
align-items: center; */
padding: 20px;
}
.topcard-title {
width: 100%;
border-bottom: 1px solid gray;
}
.topcard-content {
height: 100%;
width: 100%;
display: flex;
justify-content: left;
align-items: center;
font-size: 20px;
}
.topcard-content .card-icon img {
width: 50%;
}
.card-icon-font {
font-size: 50px;
color: #1890ff;
}
.charts-container {
display: flex;
/* justify-content: space-around; */
flex-wrap: wrap;
padding: 20px;
width: 100%;
}
.charts-container .chart {
width: 46%;
height: 400px;
/* background-color: lightblue; */
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 20px;
box-sizing: border-box;
margin-bottom: 20px;
margin-left: 45px;
}
.charts-container .chart .topcard-title {
display: flex;
justify-content: space-between;
}
.charts-container .chart .topcard-title .buttons {
display: flex;
justify-content: space-between;
align-items: center;
}
.header-1 {
display: flex;
/* align-items: start; */
}
.chart-item {
width: 100%;
height: 400px;
}
.dialog-container {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.dialog-chart {
margin: 20px;
width: 460px;
height: 400px;
}
.dialog-card {
height: 400px;
}
.card- {
width: 460px;
height: 400px;
}
.dialog1 /deep/.el-dialog__body {
padding: 0 !important;
background-color: red;
}
.el-button {
margin-left: 20px;
margin-bottom: 20px;
}
</style>

@ -0,0 +1,54 @@
<template>
<el-table :data="tableData"
stripe
style="width: 100%">
<el-table-column align="center"
prop="name"
label="姓名">
</el-table-column>
<el-table-column align="center"
prop="mobile"
label="电话">
</el-table-column>
<el-table-column align="center"
prop="email"
label="电子邮箱">
</el-table-column>
</el-table>
</template>
<script>
export default {
data () {
return {
tableData: [{
name: '徐科',
mobile: '13789489016',
email: '1037148022@qq.com'
}, {
name: '张旭',
mobile: '16604731667',
email: '1311233155@qq.com'
}, {
name: '崔浩',
mobile: '15164880142',
email: '1837453473@qq.com'
}, {
name: '郭佳怡',
mobile: '13224803150',
email: 'gjy459gy@163.com'
}, {
name: '王文宇',
mobile: '15540189913',
email: '1037148022@qq.com'
}
]
}
}
}
</script>
<style scoped>
.el-table {
border-radius: 15px;
}
</style>

@ -0,0 +1,289 @@
<template>
<div>
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>机组管理</el-breadcrumb-item>
</el-breadcrumb>
<!-- 视图区 -->
<el-card class="box-card">
<el-row :gutter="20">
<el-col :span="8">
<el-input placeholder="请输入内容" v-model="queryInfo.query" clearable @clear="getGroupList">
<el-button slot="append" icon="el-icon-search" @click="getGroupList"></el-button>
</el-input>
</el-col>
<el-col :span="4">
<el-button type="primary" @click="AddDialogVisible = true">添加</el-button>
</el-col>
</el-row>
<!-- 用户列表 -->
<el-table :data="GroupList" border stripe>
<el-table-column label="#" type="index"></el-table-column>
<el-table-column label="机架ID" prop="frame_id"></el-table-column>
<el-table-column label="机架名称" prop="frame_name"></el-table-column>
<el-table-column label="所在位置" prop="frame_local"></el-table-column>
<el-table-column label="平均温度" prop="temp"></el-table-column>
<el-table-column label="操作" width="380px">
<template slot-scope="scope">
<!-- 修改按钮 -->
<el-button type="primary" icon="el-icon-edit" size="mini" @click="showEidtDialog(scope.row.frame_id)"></el-button>
<!-- 未分配机组 -->
<el-button type="warning" icon="el-icon-setting" size="mini" @click="showDistributionDialog(scope.row.frame_id)"></el-button>
<!-- 已经分配机组 -->
<el-button type="warning" icon="el-icon-setting" size="mini" @click="setipDialog(scope.row.frame_id)" style="background-color:#c471ed">已分配</el-button>
<!-- 删除按钮 -->
<el-button type="danger" icon="el-icon-delete" size="mini" @click="removeCompanyById(scope.row.frame_id)"></el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<!-- 添加用户 -->
<el-dialog title="添加机组" :visible.sync="AddDialogVisible" width="50%" @close="addDialogClosed">
<!-- 内容主体 -->
<el-form ref="addFormRef" :model="addForm" label-width="70px">
<el-form-item label="机组名称" prop="frame_name">
<el-input v-model="addForm.frame_name"></el-input>
</el-form-item>
<el-form-item label="所在位置" prop="frame_local">
<el-input v-model="addForm.frame_local" style="width: 35%;"></el-input>
</el-form-item>
</el-form>
<!-- 底部区域 -->
<span slot="footer" class="dialog-footer">
<el-button @click="AddDialogVisible = false"> </el-button>
<el-button type="primary" @click="addframe"> </el-button>
</span>
</el-dialog>
<!-- 修改内容对话框 -->
<el-dialog title="修改信息" :visible.sync="editDialogVisible" width="50%" @click="editDialogClosed">
<el-form ref="editFormRef" :model="editForm" label-width="120px">
<el-form-item label="机组ID" prop="frame_id" >
<el-input v-model="editForm.frame_id" disabled></el-input>
</el-form-item>
<el-form-item label="机组名称" prop="frame_name">
<el-input v-model="editForm.frame_name"></el-input>
</el-form-item>
<el-form-item label="机组位置" prop="frame_local">
<el-input v-model="editForm.frame_local"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="editDialogVisible = false"> </el-button>
<el-button type="primary" @click="editframe"> </el-button>
</span>
</el-dialog>
<!-- 分配机组 -->
<el-dialog title="未分配主机" :visible.sync="DistributionDialogVisible" width="50%" >
<el-table
ref="multipleTable"
:data="emptyIpsList"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
stripe
border
>
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
prop="ip"
label="主机"
style="width:100%">
</el-table-column>
</el-table>
<!-- 底部区域 -->
<span slot="footer" class="dialog-footer">
<el-button @click="DistributionDialogVisible = false"> </el-button>
<el-button type="primary" @click="addIP" >确认分配</el-button>
</span>
</el-dialog>
<!-- 已分配机组 -->
<el-dialog title="已分配主机(点击取消分配)" :visible.sync="setipDialogVisible" width="50%" >
<el-table
ref="multipleTable1"
:data="existList"
tooltip-effect="dark"
style="width: 100%"
@select="handleSelection"
stripe
border
>
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
prop="ip"
label="主机"
style="width:100%"
>
</el-table-column>
</el-table>
<!-- 底部区域 -->
<span slot="footer" class="dialog-footer">
<el-button @click="setipDialogVisible = false"> </el-button>
<el-button type="primary" @click="Unassign"></el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data () {
return {
//
queryInfo: {
query: ''
},
//
AddDialogVisible: false,
//
editDialogVisible: false,
//
DistributionDialogVisible: false,
//
setipDialogVisible: false,
editForm: {
frame_id: '',
frame_name: '',
frame_local: ''
},
//
addForm: {
frame_name: '',
frame_local: ''
// temp: ''
},
roleId: '',
frameId: '',
existList: [],
emptyIpsList: [],
GroupList: [],
rightlist: [],
selectList: [],
UnassignList: []
}
},
methods: {
async getGroupList () {
const { data: res } = await this.$http.get('frame/list')
this.GroupList = res.data
console.log(res)
},
// ~
addDialogClosed () {
this.$refs.addFormRef.resetFields()
},
// ~
async addframe () {
const { data: res } = await this.$http.post('frame/add', this.addForm)
if (res.code === 200) {
this.$message.success('添加成功!')
} else this.$message.error('添加失败!')
this.getGroupList()
this.AddDialogVisible = false
},
// ~
async showDistributionDialog (id) {
const { data: res } = await this.$http.get('frame/emptyIps')
this.emptyIpsList = res.data
// console.log(id)
this.frameId = id
this.DistributionDialogVisible = true
console.log(res.data)
},
async setipDialog (id) {
const { data: res } = await this.$http.post(`frame/exitIps/${id}`)
this.existList = res.data
this.$nextTick(() => {
this.existList.forEach(row => {
this.$refs.multipleTable1.toggleRowSelection(row, true)
})
})
this.setipDialogVisible = true
console.log(res.data)
},
showEidtDialog (id) {
this.editDialogVisible = true
this.editForm.frame_id = id
},
// ~
async editframe () {
const { data: res } = await this.$http.post('frame/update', {
frame_id: this.editForm.frame_id,
frame_name: this.editForm.frame_name,
frame_local: this.editForm.frame_local
})
if (res.code === 200) this.$message.success('修改成功')
else this.$message.error('修改失败')
this.getGroupList()
this.editDialogVisible = false
},
// ~
editDialogClosed () {
this.$refs.editFormRef.resetFields()
},
// ~
async removeCompanyById (id) {
const removeconfirm = await this.$confirm('此操作将永久删除该用户, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).catch(err => err)
if (removeconfirm !== 'confirm') {
return this.$message.info('已取消删除')
}
const { data: res } = await this.$http.post(`frame/del/${id}`)
if (res.code === 200) {
this.$message.success('删除成功!')
} else this.$message.error('删除失败!')
this.getGroupList()
},
//
async addIP () {
const { data: res } = await this.$http.post('frame/addIp', { userIpList: this.selectList, frameId: this.frameId })
if (res.code === 200) {
this.$message.success('分配成功!')
} else this.$message.error('分配失败!')
this.DistributionDialogVisible = false
},
//
async Unassign () {
const { data: res } = await this.$http.post('frame/remove', { userIpList: this.UnassignList })
if (res.code === 200) {
this.$message.success('取消成功!')
} else this.$message.error('取消失败!')
},
//
handleSelectionChange (val) {
this.multipleSelection = val
this.selectList = []
for (const i in val) {
this.selectList.push(val[i].ip)
}
// console.log('@@@@@', this.selectList)
},
handleSelection (list, item) {
if (!list.includes(item)) {
// arguments[1]
const args = Array.from(arguments)
this.UnassignList.push(args[1].ip)
console.log(this.UnassignList)
}
}
},
created () {
this.getGroupList()
}
}
</script>
<style lang="less" scoped></style>

@ -0,0 +1,456 @@
<template>
<div>
<!-- 卡片视图区域 -->
<el-card>
<!-- 搜索与添加区 -->
<el-row :gutter="20">
<el-col :span="8">
<el-input
placeholder="请输入内容"
v-model="queryInfo.query"
clearable
@clear="getUserList"
>
<el-button
slot="append"
icon="el-icon-search"
@click="getUserList"
>
</el-button>
</el-input>
</el-col>
<el-col :span="4">
<el-button
type="primary"
@click="addDialogVisible = true"
>添加用户</el-button>
</el-col>
</el-row>
<!-- 用户列表区 -->
<el-table
:data="userlist"
border
stripe
>
<!-- <el-table :data="tableData" border stripe> -->
<el-table-column
type="index"
label="#"
></el-table-column>
<el-table-column
label="姓名"
prop="username"
></el-table-column>
<el-table-column
label="邮箱"
prop="email"
></el-table-column>
<el-table-column
label="电话"
prop="phone"
></el-table-column>
<el-table-column label="状态">
<!-- 作用域插槽 -->
<template slot-scope="scope">
<!-- {{scope.row.state}} -->
<el-switch
v-model="scope.row.state"
@change="userStateChanged(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<!-- 修改按钮 -->
<el-button
type="primary"
icon="el-icon-edit"
size="mini"
@click="showEditDialog(scope.row.id)"
></el-button>
<!-- 删除按钮 -->
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
@click="removeUserById(scope.row.id)"
></el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryInfo.pagenum"
:page-sizes="[6, 12, 18, 24]"
:page-size="queryInfo.pagesize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
</el-card>
<!-- 添加用户的对话框 -->
<el-dialog
title="添加用户"
:visible.sync="addDialogVisible"
width="50%"
@close="addDialogClosed"
>
<!-- 内容主体区域 -->
<el-form
:model="addForm"
:rules="addFormRules"
ref="addFormRef"
label-width="70px"
>
<el-form-item
label="用户名"
prop="username"
>
<el-input v-model="addForm.username"></el-input>
</el-form-item>
<el-form-item
label="密码"
prop="password"
>
<el-input v-model="addForm.password"></el-input>
</el-form-item>
<el-form-item
label="邮箱"
prop="email"
>
<el-input v-model="addForm.email"></el-input>
</el-form-item>
<el-form-item
label="手机"
prop="phone"
>
<el-input v-model="addForm.phone"></el-input>
</el-form-item>
</el-form>
<!-- 底部区域 -->
<span
slot="footer"
class="dialog-footer"
>
<el-button @click="addDialogVisible = false"> </el-button>
<el-button
type="primary"
@click="addUser"
> </el-button>
</span>
</el-dialog>
<!-- 修改用户的对话框 -->
<el-dialog
title="修改用户"
:visible.sync="editDialogVisible"
width="50%"
@close="editDialogClosed"
>
<span>这是一段信息</span>
<el-form
:model="editForm"
:rules="editFormRules"
ref="editFormRef"
label-width="70px"
>
<el-form-item label="用户名">
<el-input
v-model="editForm.username"
disabled
></el-input>
</el-form-item>
<el-form-item
label="邮箱"
prop="email"
>
<el-input v-model="editForm.email"></el-input>
</el-form-item>
<el-form-item
label="手机"
prop="phone"
>
<el-input v-model="editForm.phone"></el-input>
</el-form-item>
</el-form>
<span
slot="footer"
class="dialog-footer"
>
<el-button @click="editDialogVisible = false"> </el-button>
<el-button
type="primary"
@click="editUserInfo"
> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data () {
//
var checkEmail = (rule, value, cb) => {
//
const regEmail = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/
if (regEmail.test(value)) {
//
return cb()
}
cb(new Error('请输入合法的邮箱'))
}
//
var checkMobile = (rule, value, cb) => {
//
const regMobile = /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/
if (regMobile.test(value)) {
return cb()
}
cb(new Error('请输入合法的手机号'))
}
return {
//
queryInfo: {
query: '',
//
pagenum: 1,
//
pagesize: 6
},
userlist: [],
total: 0,
tableData: [{
username: '郭佳怡',
email: '2561314021@qq.com',
phone: '13224803150',
state: true
}],
//
addDialogVisible: false,
//
addForm: {
username: '',
password: '',
email: '',
phone: ''
},
//
addFormRules: {
username: [
{ required: true, message: '请输入用户名', trigger: 'blur' },
{
min: 3,
max: 10,
message: '用户名的长度在3~10个字符之间',
trigger: 'blur'
}
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' },
{
min: 6,
max: 15,
message: '密码的长度在6~15个字符之间',
trigger: 'blur'
}
],
email: [
{ required: true, message: '请输入邮箱', trigger: 'blur' },
{ validator: checkEmail, trigger: 'blur' }
],
phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' },
{ validator: checkMobile, trigger: 'blur' }
]
},
//
editDialogVisible: false,
//
editForm: {},
//
editFormRules: {
email: [
{ required: true, message: '请输入用户邮箱', trigger: 'blur' },
{ validator: checkEmail, trigger: 'blur' }
],
phone: [
{ required: true, message: '请输入用户手机', trigger: 'blur' },
{ validator: checkMobile, trigger: 'blur' }
]
}
}
},
created () {
this.getUserList()
},
methods: {
// async getUserList1 () {
// const { data: res } = await this.$http.get('user/all', {
// params: this.queryInfo
// })
// if (res.code !== 200) {
// return this.$message.error('')
// }
// this.userlist = res.data.userList
// this.total = res.data.total
// console.log(res)
// },
async getUserList () {
const { data: res } = await this.$http.post('user/query', {
pageNum: this.queryInfo.pagenum,
pageSize: this.queryInfo.pagesize,
query: this.queryInfo.query
})
console.log(res)
if (res.code !== 200) {
return this.$message.error('获取用户列表失败!')
}
this.userlist = res.data.userList
this.total = res.data.total
},
// pagesize
handleSizeChange (newSize) {
console.log(newSize)
this.queryInfo.pagesize = newSize
this.getUserList()
},
//
handleCurrentChange (newPage) {
console.log(newPage)
this.queryInfo.pagenum = newPage
this.getUserList()
},
// switch
async userStateChanged (userinfo) {
// console.log(userinfo.state)
const { data: res } = await this.$http.post(
'user/update', {
id: userinfo.id,
username: userinfo.username,
password: userinfo.password,
state: userinfo.state,
email: userinfo.email,
phone: userinfo.phone
}
)
if (res.code !== 200) {
userinfo.state = !userinfo.state
return this.$message.error('更新用户状态失败!')
}
this.$message.success('更新用户状态成功!')
},
//
addDialogClosed () {
this.$refs.addFormRef.resetFields()
},
//
addUser () {
this.$refs.addFormRef.validate(async valid => {
if (!valid) return
//
const { data: res } = await this.$http.post('user/add', this.addForm)
if (res.code !== 200) {
this.$message.error('添加用户失败!')
}
this.$message.success('添加用户成功!')
//
this.addDialogVisible = false
//
this.getUserList()
})
},
//
async showEditDialog (id) {
const { data: res } = await this.$http.post('user/get/' + id)
if (res.code !== 200) {
return this.$message.error('查询用户信息失败!')
}
this.editForm = res.data
this.editDialogVisible = true
},
//
editDialogClosed () {
this.$refs.editFormRef.resetFields()
},
//
editUserInfo () {
this.$refs.editFormRef.validate(async valid => {
console.log(valid)
if (!valid) return
//
const { data: res } = await this.$http.post(
'user/update',
{
id: this.editForm.id,
username: this.editForm.username,
password: this.editForm.password,
state: this.editForm.state,
email: this.editForm.email,
phone: this.editForm.phone
}
)
console.log(res)
if (res.code !== 200) {
return this.$message.error('更新用户信息失败!')
}
//
this.editDialogVisible = false
//
this.getUserList()
//
this.$message.success('更新用户信息成功!')
})
},
// Id
async removeUserById (id) {
//
const confirmResult = await this.$confirm(
'此操作将永久删除该用户, 是否继续?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
).catch(err => err)
// confirm
// cancel
// console.log(confirmResult)
if (confirmResult !== 'confirm') {
return this.$message.info('已取消删除')
}
const { data: res } = await this.$http.post('user/del/' + id)
if (res.code !== 200) {
return this.$message.error('删除用户失败!')
}
this.$message.success('删除用户成功!')
this.getUserList()
}
}
}
</script>
<style>
.el-card {
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15) !important;
border-radius: 15px !important;
}
.el-table {
margin-top: 15px;
}
.el-pagination {
margin-top: 15px;
}
</style>

@ -0,0 +1,19 @@
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import './assets/css/global.css'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import * as echarts from 'echarts'
axios.defaults.baseURL = 'http://110.40.152.26:9016' // 请求跟路径
Vue.use(ElementUI)
Vue.prototype.$http = axios // axios的全局调用配置
new Vue({
router,
el: '#app',
render: h => h(App)
}).$mount('#app')
Vue.config.productionTip = false
Vue.prototype.$echarts = echarts

@ -0,0 +1,59 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../components/Home.vue'
import Login from '../components/Login.vue'
// import Menu from '../components/main/Menu.vue'
import MyUserList from '../components/main/MyUserList.vue'
import MyMenu from '../components/main/MyMenu.vue'
import Users from '../components/main/users/Users.vue'
import Groups from '../components/main/groups/Groups.vue'
import Main from '../components/main/Main.vue'
Vue.use(VueRouter)
const routes = [
{
path: '/',
redirect: '/home'
},
{
path: '/home',
component: Home
},
{
path: '/login',
component: Login
},
{
path: '/Main',
component: Main,
children: [
{
path: '/list',
component: MyUserList
},
{
path: '/mainmenu',
component: MyMenu
},
{
path: '/users',
component: Users
},
{
path: '/groups',
component: Groups
},
{
path: '/',
redirect: '/groups'
}
]
}
]
const router = new VueRouter({
routes
})
export default router
Loading…
Cancel
Save