Compare commits
3 Commits
projects/l
...
f8baaa8955
| Author | SHA1 | Date | |
|---|---|---|---|
| f8baaa8955 | |||
| 416d4bb390 | |||
| fe7821cbd8 |
5
.env.dev
5
.env.dev
@@ -12,10 +12,7 @@ ENV = 'development'
|
|||||||
VUE_APP_TITLE = 产线监控系统
|
VUE_APP_TITLE = 产线监控系统
|
||||||
|
|
||||||
# 芋道管理系统/开发环境
|
# 芋道管理系统/开发环境
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.49:48080'
|
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.8:48080'
|
|
||||||
VUE_APP_BASE_API = 'http://192.168.0.33:48080'
|
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.188:48080'
|
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|||||||
Binary file not shown.
@@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||||||
// 创建设备
|
// 创建设备
|
||||||
export function createEquipment(data) {
|
export function createEquipment(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment/create',
|
url: '/base/core-equipment/create',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@@ -12,7 +12,7 @@ export function createEquipment(data) {
|
|||||||
// 更新设备
|
// 更新设备
|
||||||
export function updateEquipment(data) {
|
export function updateEquipment(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment/update',
|
url: '/base/core-equipment/update',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@@ -21,7 +21,7 @@ export function updateEquipment(data) {
|
|||||||
// 删除设备
|
// 删除设备
|
||||||
export function deleteEquipment(id) {
|
export function deleteEquipment(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment/delete?id=' + id,
|
url: '/base/core-equipment/delete?id=' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ export function deleteEquipment(id) {
|
|||||||
// 获得设备
|
// 获得设备
|
||||||
export function getEquipment(id) {
|
export function getEquipment(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment/get?id=' + id,
|
url: '/base/core-equipment/get?id=' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -37,7 +37,7 @@ export function getEquipment(id) {
|
|||||||
// 获得设备分页
|
// 获得设备分页
|
||||||
export function getEquipmentPage(query) {
|
export function getEquipmentPage(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment/page',
|
url: '/base/core-equipment/page',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
@@ -46,7 +46,7 @@ export function getEquipmentPage(query) {
|
|||||||
// 导出设备 Excel
|
// 导出设备 Excel
|
||||||
export function exportEquipmentExcel(query) {
|
export function exportEquipmentExcel(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment/export-excel',
|
url: '/base/core-equipment/export-excel',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query,
|
params: query,
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
@@ -55,7 +55,7 @@ export function exportEquipmentExcel(query) {
|
|||||||
// 获得所有设备列表
|
// 获得所有设备列表
|
||||||
export function getEquipmentAll() {
|
export function getEquipmentAll() {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment/listAll',
|
url: '/base/core-equipment/listAll',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||||||
// 创建设备类型
|
// 创建设备类型
|
||||||
export function createEquipmentType(data) {
|
export function createEquipmentType(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment-type/create',
|
url: '/base/core-equipment-type/create',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@@ -12,7 +12,7 @@ export function createEquipmentType(data) {
|
|||||||
// 更新设备类型
|
// 更新设备类型
|
||||||
export function updateEquipmentType(data) {
|
export function updateEquipmentType(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment-type/update',
|
url: '/base/core-equipment-type/update',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@@ -21,7 +21,7 @@ export function updateEquipmentType(data) {
|
|||||||
// 删除设备类型
|
// 删除设备类型
|
||||||
export function deleteEquipmentType(id) {
|
export function deleteEquipmentType(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment-type/delete?id=' + id,
|
url: '/base/core-equipment-type/delete?id=' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ export function deleteEquipmentType(id) {
|
|||||||
// 获得设备类型
|
// 获得设备类型
|
||||||
export function getEquipmentType(id) {
|
export function getEquipmentType(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment-type/get?id=' + id,
|
url: '/base/core-equipment-type/get?id=' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -37,7 +37,7 @@ export function getEquipmentType(id) {
|
|||||||
// 获得设备类型分页
|
// 获得设备类型分页
|
||||||
export function getEquipmentTypePage(query) {
|
export function getEquipmentTypePage(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment-type/page',
|
url: '/base/core-equipment-type/page',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
@@ -46,7 +46,7 @@ export function getEquipmentTypePage(query) {
|
|||||||
// 导出设备类型 Excel
|
// 导出设备类型 Excel
|
||||||
export function exportEquipmentTypeExcel(query) {
|
export function exportEquipmentTypeExcel(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment-type/export-excel',
|
url: '/base/core-equipment-type/export-excel',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query,
|
params: query,
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 137 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1,13 +1,10 @@
|
|||||||
/* ===== PC DESIGN ===== */
|
/* ===== PC DESIGN ===== */
|
||||||
$W: 1080;
|
$W: 1000;
|
||||||
$H: 1920;
|
$H: 1920;
|
||||||
// $picW: 438;
|
$picW: 438;
|
||||||
// $picH: 560;
|
$picH: 560;
|
||||||
$picW: 1080;
|
$formW: 320;
|
||||||
$picH: 1118;
|
|
||||||
$formW: 420;
|
|
||||||
$tabW: $formW / 2;
|
$tabW: $formW / 2;
|
||||||
// $rowH: 56;
|
|
||||||
$rowH: 56;
|
$rowH: 56;
|
||||||
$buttonH: 50;
|
$buttonH: 50;
|
||||||
|
|
||||||
@@ -18,7 +15,6 @@ $containerBgImage: '../assets/images/bg.png';
|
|||||||
$logoWidth: 417px;
|
$logoWidth: 417px;
|
||||||
$logoHeight: 64px;
|
$logoHeight: 64px;
|
||||||
$logoImage: '../assets/logo/login-logo.png';
|
$logoImage: '../assets/logo/login-logo.png';
|
||||||
$cnbmLogo: '../assets/logo/cnbm.png';
|
|
||||||
// container-content
|
// container-content
|
||||||
$contentWidth: round($W / $H * 100) * 1vw;
|
$contentWidth: round($W / $H * 100) * 1vw;
|
||||||
$contentHeight: round($picH / $W * 100) / 100 * $contentWidth;
|
$contentHeight: round($picH / $W * 100) / 100 * $contentWidth;
|
||||||
@@ -26,8 +22,7 @@ $contentBgColor: #ffffff;
|
|||||||
// container-content-pic
|
// container-content-pic
|
||||||
$picWidth: round($picW / $H * 100) * 1vw;
|
$picWidth: round($picW / $H * 100) * 1vw;
|
||||||
$picHeight: inherit;
|
$picHeight: inherit;
|
||||||
// $picImage: '../assets/images/pic.png';
|
$picImage: '../assets/images/pic.png';
|
||||||
$picImage: '../assets/images/login-bg.png';
|
|
||||||
// container-content-field
|
// container-content-field
|
||||||
$fieldWidth: $contentWidth - $picWidth;
|
$fieldWidth: $contentWidth - $picWidth;
|
||||||
$fieldHeight: inherit;
|
$fieldHeight: inherit;
|
||||||
@@ -39,311 +34,232 @@ $buttonHeight: $buttonH * 1px;
|
|||||||
|
|
||||||
// - - - - - 页面基础设置
|
// - - - - - 页面基础设置
|
||||||
.container {
|
.container {
|
||||||
.login-code {
|
.login-code {
|
||||||
width: 33%;
|
width: 33%;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
float: right;
|
float: right;
|
||||||
img {
|
img {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 100%;
|
width:100%;max-width:100px; height:auto;
|
||||||
max-width: 100px;
|
vertical-align: middle;
|
||||||
height: auto;
|
}
|
||||||
vertical-align: middle;
|
}
|
||||||
}
|
// 元素
|
||||||
}
|
width: inherit;
|
||||||
// 元素
|
height: inherit;
|
||||||
width: inherit;
|
min-width: 1080px;
|
||||||
height: inherit;
|
min-height: 620px;
|
||||||
min-width: 1080px;
|
background-color: $containerBgColor;
|
||||||
min-height: 620px;
|
background-image: url($containerBgImage);
|
||||||
background-color: $containerBgColor;
|
background-size: cover;
|
||||||
// background-image: url($containerBgImage);
|
// 定位
|
||||||
background-size: cover;
|
position: relative;
|
||||||
// 定位
|
display: flex;
|
||||||
position: relative;
|
justify-content: center;
|
||||||
display: flex;
|
align-items: center;
|
||||||
justify-content: center;
|
// 文字
|
||||||
align-items: center;
|
font-size: 14px;
|
||||||
// 文字
|
font-family: Microsoft YaHei;
|
||||||
font-size: 14px;
|
font-weight: 400;
|
||||||
font-family: Microsoft YaHei;
|
.logo {
|
||||||
font-weight: 400;
|
// 元素
|
||||||
.logo {
|
width: $logoWidth;
|
||||||
// 元素
|
height: $logoHeight;
|
||||||
width: $logoWidth;
|
// background-image: url($logoImage);
|
||||||
height: $logoHeight;
|
// background-size: contain;
|
||||||
// background-image: url($logoImage);
|
// 定位
|
||||||
// background-size: contain;
|
position: absolute;
|
||||||
// 定位
|
top: 50px;
|
||||||
position: absolute;
|
left: 50%;
|
||||||
top: 50px;
|
margin-left: -$logoWidth/2;
|
||||||
left: 50%;
|
}
|
||||||
margin-left: -$logoWidth/2;
|
.content {
|
||||||
}
|
// 元素
|
||||||
.content {
|
width: $contentWidth;
|
||||||
// 元素
|
height: $contentHeight;
|
||||||
// width: $contentWidth;
|
background-color: #ffffff;
|
||||||
// height: $contentHeight;
|
box-shadow: 0px 16px 40px rgba(0, 0, 0, 0.07);
|
||||||
width: 100%;
|
border-radius: 20px;
|
||||||
height: 100%;
|
// 定位
|
||||||
background-color: #ffffff;
|
position: relative;
|
||||||
// box-shadow: 0px 16px 40px rgba(0, 0, 0, 0.07);
|
.pic {
|
||||||
// border-radius: 20px;
|
// 元素
|
||||||
// 定位
|
width: $picWidth;
|
||||||
position: relative;
|
height: $picHeight;
|
||||||
display: flex;
|
background-image: url($picImage);
|
||||||
|
background-repeat: no-repeat;
|
||||||
.pic {
|
background-size: cover;
|
||||||
// 元素
|
border-radius: 20px 0 0 20px;
|
||||||
width: $picWidth;
|
// 定位
|
||||||
height: $picHeight;
|
position: absolute;
|
||||||
background-image: url($picImage);
|
top: 0;
|
||||||
background-repeat: no-repeat;
|
left: 0;
|
||||||
background-size: 100% 100%;
|
}
|
||||||
background-position: 0 0;
|
.field {
|
||||||
position: relative;
|
width: $fieldWidth;
|
||||||
|
height: $fieldHeight;
|
||||||
&::after {
|
// 定位
|
||||||
content: '';
|
position: absolute;
|
||||||
position: absolute;
|
top: 0;
|
||||||
top: 0;
|
left: $picWidth;
|
||||||
left: 0;
|
display:flex;
|
||||||
width: 100%;
|
justify-content: center;
|
||||||
height: 100%;
|
align-items: center;
|
||||||
// background: #f003;
|
.pc-title{ width: 100%; clear: both;}
|
||||||
display: inline-block;
|
.mobile-title,
|
||||||
}
|
.mobile-switch {
|
||||||
}
|
display: none;
|
||||||
.field {
|
}
|
||||||
// background: #ccc3;
|
.form {
|
||||||
position: relative;
|
box-sizing: border-box;
|
||||||
padding-top: 196px;
|
width: $formWidth;
|
||||||
flex: 1;
|
// - - - tab
|
||||||
display: flex;
|
:deep(.el-tabs__content) {
|
||||||
flex-direction: column;
|
padding: 20px 0 0;
|
||||||
// justify-content: center;
|
}
|
||||||
align-items: center;
|
:deep(.el-tabs__item) {
|
||||||
.pc-title {
|
// 元素
|
||||||
width: 100%;
|
width: $tabWidth;
|
||||||
text-align: center;
|
height: $rowHeight;
|
||||||
clear: both;
|
padding: 0;
|
||||||
position: relative;
|
// 文字
|
||||||
top: -36px;
|
line-height: $rowHeight;
|
||||||
|
color: #666666;
|
||||||
// h3.title {
|
}
|
||||||
// position: relative;
|
:deep(.el-tabs__item.is-active) {
|
||||||
|
font-weight: bold;
|
||||||
// &::before {
|
color: #2F53EB;
|
||||||
// content: '';
|
}
|
||||||
// background: url($cnbmLogo) 100% / 100% no-repeat;
|
:deep(.el-tabs__active-bar) {
|
||||||
// height: 48px;
|
height: 3px;
|
||||||
// width: 48px;
|
border-radius: 2px;
|
||||||
// position: absolute;
|
}
|
||||||
// left: 0px;
|
// - - - input
|
||||||
// top: 4px;
|
:deep(.el-input__inner) {
|
||||||
// display: inline-block;
|
// 元素
|
||||||
// }
|
width: 100%;
|
||||||
// }
|
height: $rowHeight;
|
||||||
}
|
background: #f5f5f5;
|
||||||
.mobile-title,
|
border: 0;
|
||||||
.mobile-switch {
|
border-radius: 28px;
|
||||||
display: none;
|
// 文字
|
||||||
}
|
text-align: center;
|
||||||
.form {
|
line-height: 19px;
|
||||||
margin-top: 32px;
|
color: #262626;
|
||||||
box-sizing: border-box;
|
}
|
||||||
// width: $formWidth;
|
.code:deep(.el-input__inner) {
|
||||||
width: 100%;
|
padding: 0 24px;
|
||||||
// - - - tab
|
// 文字
|
||||||
:deep(.el-tabs__nav) {
|
text-align: left;
|
||||||
// background: #f0f3;
|
}
|
||||||
}
|
:deep(.el-input__inner::-webkit-input-placeholder) { /* WebKit browsers */
|
||||||
:deep(.el-tabs__content) {
|
font-weight: 400;
|
||||||
padding: 20px 0 0;
|
color: #8C8C8C;
|
||||||
}
|
}
|
||||||
:deep(.el-tabs__item) {
|
:deep(.el-input__inner:-moz-placeholder) { /* Mozilla Firefox 4 to 18 */
|
||||||
user-select: none;
|
font-weight: 400;
|
||||||
// 元素
|
color: #8C8C8C;
|
||||||
width: $tabWidth;
|
}
|
||||||
height: $rowHeight;
|
:deep(.el-input__inner::-moz-placeholder) { /* Mozilla Firefox 19+ */
|
||||||
padding: 0;
|
font-weight: 400;
|
||||||
// 文字
|
color: #8C8C8C;
|
||||||
line-height: $rowHeight;
|
opacity:1;
|
||||||
color: #666666;
|
}
|
||||||
font-size: 18px;
|
:deep(.el-input__inner:-ms-input-placeholder) { /* Internet Explorer 10+ */
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
text-align: center;
|
color: #8C8C8C !important;
|
||||||
}
|
}
|
||||||
:deep(.el-tabs__item.is-active) {
|
:deep(.el-form-item) {
|
||||||
font-weight: 500;
|
position: relative;
|
||||||
color: #2f53eb;
|
.button-code {
|
||||||
}
|
// 元素
|
||||||
:deep(.el-tabs__active-bar) {
|
height: $rowHeight;
|
||||||
height: 3px;
|
box-sizing: border-box;
|
||||||
border-radius: 2px;
|
// 定位
|
||||||
}
|
position: absolute;
|
||||||
// - - - input
|
top: 0;
|
||||||
:deep(.el-input__inner) {
|
right: 20px;
|
||||||
// 元素
|
z-index: 1;
|
||||||
width: 100%;
|
// 文字
|
||||||
height: $rowHeight;
|
line-height: 20px;
|
||||||
background: #f5f5f5;
|
font-size: 14px;
|
||||||
border: 0;
|
font-family: PingFang SC;
|
||||||
border-radius: 28px;
|
font-weight: 400;
|
||||||
// 文字
|
color: #2F53EB;
|
||||||
text-align: center;
|
span {
|
||||||
line-height: 19px;
|
padding-left: 15px;
|
||||||
color: #262626;
|
border-left: 2px solid #D9D9D9;
|
||||||
}
|
}
|
||||||
.code:deep(.el-input__inner) {
|
}
|
||||||
padding: 0 24px;
|
}
|
||||||
// 文字
|
:deep(.el-form-item__error) {
|
||||||
text-align: left;
|
padding-left: 24px;
|
||||||
}
|
}
|
||||||
:deep(.el-input__inner::-webkit-input-placeholder) {
|
.button {
|
||||||
/* WebKit browsers */
|
width: 100%;
|
||||||
font-weight: 400;
|
height: $buttonHeight;
|
||||||
color: #8c8c8c;
|
background: rgba(24, 144, 255, 0.2);
|
||||||
}
|
border: 0;
|
||||||
:deep(.el-input__inner:-moz-placeholder) {
|
border-radius: 24px;
|
||||||
/* Mozilla Firefox 4 to 18 */
|
margin-bottom: 20px;
|
||||||
font-weight: 400;
|
// 文字
|
||||||
color: #8c8c8c;
|
line-height: 26px;
|
||||||
}
|
font-size: 20px;
|
||||||
:deep(.el-input__inner::-moz-placeholder) {
|
color: #FFFFFF;
|
||||||
/* Mozilla Firefox 19+ */
|
}
|
||||||
font-weight: 400;
|
.button-active {
|
||||||
color: #8c8c8c;
|
background: #2F53EB;
|
||||||
opacity: 1;
|
box-shadow: 0px 2px 8px rgba(0, 80, 184, 0.2);
|
||||||
}
|
}
|
||||||
:deep(.el-input__inner:-ms-input-placeholder) {
|
}
|
||||||
/* Internet Explorer 10+ */
|
}
|
||||||
font-weight: 400;
|
}
|
||||||
color: #8c8c8c !important;
|
.footer {
|
||||||
}
|
// 元素
|
||||||
:deep(.el-form-item) {
|
height: 16px;
|
||||||
position: relative;
|
line-height: 16px;
|
||||||
.button-code {
|
font-size: 12px;
|
||||||
// 元素
|
color: #8c8c8c;
|
||||||
height: $rowHeight;
|
// 定位
|
||||||
box-sizing: border-box;
|
position: absolute;
|
||||||
// 定位
|
bottom: 30px;
|
||||||
position: absolute;
|
a,
|
||||||
top: 0;
|
a:hover,
|
||||||
right: 20px;
|
a:active {
|
||||||
z-index: 1;
|
color: inherit;
|
||||||
// 文字
|
text-decoration: none;
|
||||||
line-height: 20px;
|
}
|
||||||
font-size: 14px;
|
}
|
||||||
font-family: PingFang SC;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #2f53eb;
|
|
||||||
span {
|
|
||||||
padding-left: 15px;
|
|
||||||
border-left: 2px solid #d9d9d9;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
:deep(.el-form-item__error) {
|
|
||||||
padding-left: 24px;
|
|
||||||
}
|
|
||||||
.button {
|
|
||||||
width: 100%;
|
|
||||||
height: $buttonHeight;
|
|
||||||
background: rgba(24, 144, 255, 0.2);
|
|
||||||
border: 0;
|
|
||||||
border-radius: 24px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
// 文字
|
|
||||||
line-height: 26px;
|
|
||||||
font-size: 20px;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
.button-active {
|
|
||||||
background: #2f53eb;
|
|
||||||
box-shadow: 0px 2px 8px rgba(0, 80, 184, 0.2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-form {
|
|
||||||
* {
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
// - - - input
|
|
||||||
:deep(.el-input__inner) {
|
|
||||||
// 元素
|
|
||||||
width: 420px;
|
|
||||||
height: 66px;
|
|
||||||
color: #262626;
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
:deep(.el-checkbox__label) {
|
|
||||||
font-size: 18px;
|
|
||||||
line-height: 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
user-select: none;
|
|
||||||
// 元素
|
|
||||||
height: 16px;
|
|
||||||
line-height: 16px;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #8c8c8c;
|
|
||||||
// 定位
|
|
||||||
position: absolute;
|
|
||||||
bottom: 30px;
|
|
||||||
a,
|
|
||||||
a:hover,
|
|
||||||
a:active {
|
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - PC 最小尺寸设置
|
// - - - - - PC 最小尺寸设置
|
||||||
@media screen and (min-width: 599px) and (max-width: 1366px) {
|
@media screen and (min-width: 599px) and (max-width: 1366px) {
|
||||||
.container {
|
.container {
|
||||||
min-width: 599px;
|
.content {
|
||||||
.content {
|
width: 710px;
|
||||||
// width: 710px;
|
height: 397px;
|
||||||
// height: 397px;
|
.pic {
|
||||||
width: 100%;
|
width: 314px;
|
||||||
height: 100%;
|
}
|
||||||
.pic {
|
.field {
|
||||||
// width: 314px;
|
width: calc(710px - 314px);
|
||||||
display: none;
|
left: 314px;
|
||||||
}
|
.form {
|
||||||
.field {
|
width: 320px;
|
||||||
// width: calc(710px - 314px);
|
:deep(.el-input__inner) {
|
||||||
// left: 314px;
|
width: 320px;
|
||||||
// justify-content: center;
|
height: 56px;
|
||||||
width: 100%;
|
}
|
||||||
|
.button {
|
||||||
.pc-title {
|
height: 50px;
|
||||||
h3 {
|
}
|
||||||
font-size: 2.4rem !important;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.form {
|
|
||||||
// width: 320px;
|
|
||||||
:deep(.el-input__inner) {
|
|
||||||
width: 320px;
|
|
||||||
height: 56px;
|
|
||||||
}
|
|
||||||
.button {
|
|
||||||
height: 50px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ===== MOBILE DESIGN ===== */
|
/* ===== MOBILE DESIGN ===== */
|
||||||
$mobileW: 375;
|
$mobileW: 375;
|
||||||
$mobileH: 812;
|
$mobileH: 812;
|
||||||
@@ -357,142 +273,115 @@ $mobileButtonH: 48;
|
|||||||
$mobileContainerBgImage: '../assets/images/bg-mobile.png';
|
$mobileContainerBgImage: '../assets/images/bg-mobile.png';
|
||||||
// container-content
|
// container-content
|
||||||
$mobileContentWidth: round($mobileContentW / $mobileW * 100) * 1vw;
|
$mobileContentWidth: round($mobileContentW / $mobileW * 100) * 1vw;
|
||||||
$mobileContentHeight: round($mobileContentH / $mobileW * 100) / 100 *
|
$mobileContentHeight: round($mobileContentH / $mobileW * 100) / 100 * $mobileContentWidth;
|
||||||
$mobileContentWidth;
|
|
||||||
// container-content-field-form
|
// container-content-field-form
|
||||||
$mobileFormWidth: round($mobileFormW / $mobileW * 100) * 1vw;
|
$mobileFormWidth: round($mobileFormW / $mobileW *100) * 1vw;
|
||||||
$mobileRowHeight: $mobileRowH * 1px;
|
$mobileRowHeight: $mobileRowH * 1px;
|
||||||
$mobileButtonHeight: $mobileButtonH * 1px;
|
$mobileButtonHeight: $mobileButtonH * 1px;
|
||||||
$iconBgImage: '../assets/images/icon.png';
|
$iconBgImage: '../assets/images/icon.png';
|
||||||
|
|
||||||
// - - - - - 移动端设置
|
// - - - - - 移动端设置
|
||||||
@media screen and (max-width: 599px) {
|
@media screen and (max-width: 599px) {
|
||||||
.container {
|
.container {
|
||||||
// 元素
|
// 元素
|
||||||
background-image: url($mobileContainerBgImage);
|
background-image: url($mobileContainerBgImage);
|
||||||
min-width: 280px;
|
min-width: 280px;
|
||||||
min-height: 568px;
|
min-height: 568px;
|
||||||
// 文字
|
// 文字
|
||||||
font-size: 14px;
|
font-size: 17px;
|
||||||
font-family: PingFang SC;
|
font-family: PingFang SC;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
.logo {
|
.logo {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pc-title {
|
.content {
|
||||||
display: none;
|
// 元素
|
||||||
}
|
width: $mobileContentWidth;
|
||||||
|
height: $mobileContentHeight;
|
||||||
.content {
|
min-width: 250px;
|
||||||
// 元素
|
min-height: 340px;
|
||||||
width: $mobileContentWidth;
|
// 定位
|
||||||
height: $mobileContentHeight;
|
display: flex;
|
||||||
min-width: 250px;
|
justify-content: center;
|
||||||
min-height: 340px;
|
align-items: center;
|
||||||
// 定位
|
.pic {
|
||||||
display: flex;
|
display: none;
|
||||||
justify-content: center;
|
}
|
||||||
align-items: center;
|
.field {
|
||||||
.pic {
|
// 元素
|
||||||
display: none;
|
width: inherit;
|
||||||
}
|
min-height: inherit;
|
||||||
.field {
|
// 定位
|
||||||
padding: 0;
|
left: 0;
|
||||||
// 元素
|
display: flex;
|
||||||
width: inherit;
|
flex-direction: column;
|
||||||
min-height: inherit;
|
.mobile-title {
|
||||||
// 定位
|
// 元素
|
||||||
left: 0;
|
margin: 0 0 20px;
|
||||||
display: flex;
|
display: block;
|
||||||
flex-direction: column;
|
}
|
||||||
|
.form {
|
||||||
.mobile-title {
|
width: $mobileFormWidth;
|
||||||
// 元素
|
// - - - tab
|
||||||
margin: 0;
|
:deep(.el-tabs__header) {
|
||||||
display: block;
|
display: none;
|
||||||
}
|
}
|
||||||
|
:deep(.el-tabs__content) {
|
||||||
.form {
|
padding: 0;
|
||||||
|
}
|
||||||
|
// - - - input
|
||||||
|
:deep(.el-input__inner) {
|
||||||
|
height: $mobileRowHeight;
|
||||||
|
line-height: 24px;
|
||||||
|
// 文字
|
||||||
|
text-align: center;
|
||||||
|
color: #262626;
|
||||||
|
}
|
||||||
|
:deep(.el-form-item) {
|
||||||
|
.button-code {
|
||||||
|
// 元素
|
||||||
|
height: $mobileRowHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.button {
|
||||||
|
height: $mobileButtonHeight;
|
||||||
|
line-height: 24px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.mobile-switch {
|
||||||
|
display: block;
|
||||||
|
line-height: 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #595959;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: $mobileFormWidth;
|
.icon {
|
||||||
// - - - tab
|
width: 14px;
|
||||||
:deep(.el-tabs__header) {
|
height: 14px;
|
||||||
display: none;
|
display: inline-block;
|
||||||
}
|
background-image: url($iconBgImage);
|
||||||
:deep(.el-tabs__content) {
|
background-size: cover;
|
||||||
padding: 0;
|
}
|
||||||
}
|
}
|
||||||
// - - - input
|
.mobile-switch:hover {
|
||||||
:deep(.el-input__inner) {
|
cursor: pointer;
|
||||||
height: $mobileRowHeight;
|
}
|
||||||
line-height: 24px;
|
}
|
||||||
// 文字
|
}
|
||||||
text-align: center;
|
.footer {
|
||||||
color: #262626;
|
// 元素
|
||||||
}
|
font-size: 12px;
|
||||||
:deep(.el-form-item) {
|
font-family: PingFang SC;
|
||||||
.button-code {
|
font-weight: 400;
|
||||||
// 元素
|
line-height: 17px;
|
||||||
height: $mobileRowHeight;
|
color: #333333;
|
||||||
}
|
opacity: 0.6;
|
||||||
}
|
// 定位
|
||||||
.button {
|
position: absolute;
|
||||||
height: $mobileButtonHeight;
|
bottom: 20px;
|
||||||
line-height: 24px;
|
}
|
||||||
color: #ffffff;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-form {
|
|
||||||
:deep(.el-input__inner) {
|
|
||||||
height: $mobileRowHeight;
|
|
||||||
line-height: 24px;
|
|
||||||
// 文字
|
|
||||||
text-align: center;
|
|
||||||
color: #262626;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(#button-form-item) {
|
|
||||||
margin: 0 !important;
|
|
||||||
button {
|
|
||||||
// 元素
|
|
||||||
height: $mobileRowHeight;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.mobile-switch {
|
|
||||||
display: block;
|
|
||||||
line-height: 20px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #595959;
|
|
||||||
margin: 0;
|
|
||||||
.icon {
|
|
||||||
width: 14px;
|
|
||||||
height: 14px;
|
|
||||||
display: inline-block;
|
|
||||||
background-image: url($iconBgImage);
|
|
||||||
background-size: cover;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.mobile-switch:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
// 元素
|
|
||||||
font-size: 12px;
|
|
||||||
font-family: PingFang SC;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 17px;
|
|
||||||
color: #333333;
|
|
||||||
opacity: 0.6;
|
|
||||||
// 定位
|
|
||||||
// position: absolute;
|
|
||||||
bottom: -32px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,10 +190,6 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
hasFile: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
labelPosition: {
|
labelPosition: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'right',
|
default: 'right',
|
||||||
@@ -236,9 +232,7 @@ export default {
|
|||||||
dataForm: {
|
dataForm: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
this.form = JSON.parse(JSON.stringify(val));
|
this.form = JSON.parse(JSON.stringify(val));
|
||||||
if (this.hasFile) {
|
this.form.files = this.form.files ?? [];
|
||||||
this.form.files = this.form.files ?? [];
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true,
|
immediate: true,
|
||||||
|
|||||||
@@ -72,15 +72,15 @@ export const constantRoutes = [
|
|||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: 'core/base/factory',
|
// redirect: 'core/base/factory',
|
||||||
// children: [{
|
children: [{
|
||||||
// path: 'index',
|
path: 'index',
|
||||||
// redirect: 'core/base/factory',
|
// redirect: 'core/base/factory',
|
||||||
// component: (resolve) => require(['@/views/index'], resolve),
|
component: (resolve) => require(['@/views/index'], resolve),
|
||||||
// name: '首页',
|
name: '首页',
|
||||||
// meta: { title: '首页', icon: 'dashboard', affix: true }
|
meta: { title: '首页', icon: 'dashboard', affix: true }
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/user',
|
path: '/user',
|
||||||
|
|||||||
@@ -6,9 +6,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div ref="dataBoard" class="data-board">
|
<div ref="dataBoard" class=""></div>
|
||||||
<el-button type="text" @click="goback" class="go-back--btn">返回</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -26,42 +24,39 @@ export default {
|
|||||||
mainFooter: null, // dom
|
mainFooter: null, // dom
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// mounted() {
|
mounted() {
|
||||||
// this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// this.modify();
|
this.modify();
|
||||||
// });
|
});
|
||||||
// },
|
},
|
||||||
// activated() {
|
activated() {
|
||||||
// this.modify();
|
this.modify();
|
||||||
// },
|
},
|
||||||
// deactivated() {
|
deactivated() {
|
||||||
// this.recover();
|
this.recover();
|
||||||
// },
|
},
|
||||||
// beforeDestroy() {
|
beforeDestroy() {
|
||||||
// this.recover();
|
this.recover();
|
||||||
// },
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// modify() {
|
modify() {
|
||||||
// // 在这个页面临时修改下父类的margin,结束时需还原
|
// 在这个页面临时修改下父类的margin,结束时需还原
|
||||||
// this.appMain = document.querySelector('.app-main');
|
this.appMain = document.querySelector('.app-main');
|
||||||
// // this.appMain.style.minHeight = 'calc(100vh - 90px)';
|
// this.appMain.style.minHeight = 'calc(100vh - 90px)';
|
||||||
// this.appMain.style.margin = 0;
|
this.appMain.style.margin = 0;
|
||||||
// // 在这个页面临时删除 main-footer 元素,结束时需还原
|
// 在这个页面临时删除 main-footer 元素,结束时需还原
|
||||||
// // this.mainFooter = document.querySelector('.main-footer').cloneNode(true);
|
// this.mainFooter = document.querySelector('.main-footer').cloneNode(true);
|
||||||
// // document.querySelector('.main-footer').remove();
|
// document.querySelector('.main-footer').remove();
|
||||||
// this.$refs.dataBoard.classList.add('data-board');
|
this.$refs.dataBoard.classList.add('data-board');
|
||||||
// },
|
},
|
||||||
// recover() {
|
recover() {
|
||||||
// this.$refs.dataBoard.classList.remove('data-board');
|
this.$refs.dataBoard.classList.remove('data-board');
|
||||||
// this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// this.appMain.style.margin = this.parentStyle.margin;
|
this.appMain.style.margin = this.parentStyle.margin;
|
||||||
// // this.appMain.style.minHeight = this.parentStyle.minHeight;
|
// this.appMain.style.minHeight = this.parentStyle.minHeight;
|
||||||
// // this.appMain.insertAdjacentElement('afterend', this.mainFooter);
|
// this.appMain.insertAdjacentElement('afterend', this.mainFooter);
|
||||||
// });
|
});
|
||||||
// },
|
},
|
||||||
goback() {
|
|
||||||
this.$router.go(-1);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -76,25 +71,4 @@ export default {
|
|||||||
background: url('../../../assets/images/DataBoard.png') 100% 100% / contain
|
background: url('../../../assets/images/DataBoard.png') 100% 100% / contain
|
||||||
no-repeat;
|
no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.go-back--btn {
|
|
||||||
position: fixed;
|
|
||||||
top: 28px;
|
|
||||||
left: 24px;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 18px;
|
|
||||||
letter-spacing: 6px;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
content: "\2BAA";
|
|
||||||
position: absolute;
|
|
||||||
top: 6px;
|
|
||||||
right: -26px;
|
|
||||||
font-size: 24px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
|
|
||||||
<!-- 抽屉 详情 -->
|
<!-- 抽屉 详情 -->
|
||||||
@@ -219,7 +219,7 @@ export default {
|
|||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
label: '设备',
|
label: '设备',
|
||||||
url: '/base/equipment/page?pageNo=1&pageSize=100',
|
url: '/base/core-equipment/page?pageNo=1&pageSize=100',
|
||||||
prop: 'equipmentId',
|
prop: 'equipmentId',
|
||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
@@ -278,7 +278,7 @@ export default {
|
|||||||
input: true,
|
input: true,
|
||||||
label: '设备分组编码',
|
label: '设备分组编码',
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
// url: '/base/equipment/getCode',
|
// url: '/base/core-equipment/getCode',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ export default {
|
|||||||
// 获取设备列表
|
// 获取设备列表
|
||||||
async getEquipmentList() {
|
async getEquipmentList() {
|
||||||
const response = await this.$axios(
|
const response = await this.$axios(
|
||||||
'/base/equipment/page?pageNo=1&pageSize=100'
|
'/base/core-equipment/page?pageNo=1&pageSize=100'
|
||||||
);
|
);
|
||||||
this.equipmentList = response.data.list.map((item) => ({
|
this.equipmentList = response.data.list.map((item) => ({
|
||||||
label: item.name,
|
label: item.name,
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ export default {
|
|||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
label: '设备',
|
label: '设备',
|
||||||
url: '/base/equipment/page?pageNo=1&pageSize=100',
|
url: '/base/core-equipment/page?pageNo=1&pageSize=100',
|
||||||
prop: 'equipmentId',
|
prop: 'equipmentId',
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
v-if="showForm"
|
v-if="showForm"
|
||||||
ref="form"
|
ref="form"
|
||||||
:disabled="mode.includes('detail')"
|
:disabled="mode.includes('detail')"
|
||||||
v-model="form"
|
:dataForm="form"
|
||||||
:rows="formRows" />
|
:rows="formRows" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows"/>
|
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
|
|
||||||
<!-- 抽屉 详情 -->
|
<!-- 抽屉 详情 -->
|
||||||
@@ -192,7 +192,7 @@ export default {
|
|||||||
input: true,
|
input: true,
|
||||||
label: '设备分组编码',
|
label: '设备分组编码',
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
// url: '/base/equipment/getCode',
|
// url: '/base/core-equipment/getCode',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
v-if="showForm"
|
v-if="showForm"
|
||||||
ref="form"
|
ref="form"
|
||||||
:disabled="mode.includes('detail')"
|
:disabled="mode.includes('detail')"
|
||||||
v-model="form"
|
:dataForm="form"
|
||||||
:rows="formRows" />
|
:rows="formRows" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
|
|
||||||
<!-- 抽屉 详情 -->
|
<!-- 抽屉 详情 -->
|
||||||
@@ -247,7 +247,7 @@ export default {
|
|||||||
select: true,
|
select: true,
|
||||||
label: '设备',
|
label: '设备',
|
||||||
prop: 'equipmentId',
|
prop: 'equipmentId',
|
||||||
url: '/base/equipment/page?pageNo=1&pageSize=99',
|
url: '/base/core-equipment/page?pageNo=1&pageSize=99',
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
@@ -283,7 +283,7 @@ export default {
|
|||||||
input: true,
|
input: true,
|
||||||
label: '关联表名',
|
label: '关联表名',
|
||||||
prop: 'plcTableName',
|
prop: 'plcTableName',
|
||||||
// url: '/base/equipment/getCode',
|
// url: '/base/core-equipment/getCode',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@@ -320,7 +320,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async getEquipmentOptions() {
|
async getEquipmentOptions() {
|
||||||
const res = await this.$axios({
|
const res = await this.$axios({
|
||||||
url: '/base/equipment/listAll',
|
url: '/base/core-equipment/listAll',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
});
|
});
|
||||||
return res.data;
|
return res.data;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
}">
|
}">
|
||||||
<el-upload
|
<el-upload
|
||||||
class="equipment-upload"
|
class="equipment-upload"
|
||||||
:style="{ marginBottom: isPicMode ? '48px' : '24px' }"
|
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
drag
|
drag
|
||||||
:action="uploadUrl"
|
:action="uploadUrl"
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ export default {
|
|||||||
async getEqTypeList() {
|
async getEqTypeList() {
|
||||||
this.formLoading = true;
|
this.formLoading = true;
|
||||||
const { code, data } = await this.$axios(
|
const { code, data } = await this.$axios(
|
||||||
'/base/equipment-type/page?pageNo=1&pageSize=100'
|
'/base/core-equipment-type/page?pageNo=1&pageSize=100'
|
||||||
);
|
);
|
||||||
// debugger;
|
// debugger;
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
|
|||||||
@@ -44,9 +44,8 @@
|
|||||||
ref="form"
|
ref="form"
|
||||||
label-position="top"
|
label-position="top"
|
||||||
size="small"
|
size="small"
|
||||||
v-model="form"
|
:dataForm="form"
|
||||||
:rows="computedRows"
|
:rows="computedRows" />
|
||||||
:has-file="true" />
|
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
|
|
||||||
<!-- 设备 详情 - 编辑 -->
|
<!-- 设备 详情 - 编辑 -->
|
||||||
@@ -61,9 +60,9 @@
|
|||||||
name: '基本信息',
|
name: '基本信息',
|
||||||
key: 'base',
|
key: 'base',
|
||||||
rows: computedRows,
|
rows: computedRows,
|
||||||
url: '/base/equipment/get',
|
url: '/base/core-equipment/get',
|
||||||
urlUpdate: '/base/equipment/update',
|
urlUpdate: '/base/core-equipment/update',
|
||||||
urlCreate: '/base/equipment/create',
|
urlCreate: '/base/core-equipment/create',
|
||||||
queryParams: { id: form.id },
|
queryParams: { id: form.id },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -241,7 +240,7 @@ export default {
|
|||||||
input: true,
|
input: true,
|
||||||
label: '设备编码',
|
label: '设备编码',
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
url: '/base/equipment/getCode',
|
url: '/base/core-equipment/getCode',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: true,
|
input: true,
|
||||||
@@ -268,7 +267,7 @@ export default {
|
|||||||
select: true,
|
select: true,
|
||||||
label: '设备类型',
|
label: '设备类型',
|
||||||
prop: 'equipmentTypeId',
|
prop: 'equipmentTypeId',
|
||||||
url: '/base/equipment-type/page?pageNo=1&pageSize=100',
|
url: '/base/core-equipment-type/page?pageNo=1&pageSize=100',
|
||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -37,12 +37,7 @@
|
|||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm
|
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
||||||
v-if="open"
|
|
||||||
ref="form"
|
|
||||||
v-model="form"
|
|
||||||
:rows="rows"
|
|
||||||
:has-file="true" />
|
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -144,7 +139,7 @@ export default {
|
|||||||
input: true,
|
input: true,
|
||||||
label: '设备类型编码',
|
label: '设备类型编码',
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
url: '/base/equipment-type/getCode',
|
url: '/base/core-equipment-type/getCode',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -152,7 +147,7 @@ export default {
|
|||||||
select: true,
|
select: true,
|
||||||
label: '父类',
|
label: '父类',
|
||||||
prop: 'parentId',
|
prop: 'parentId',
|
||||||
url: '/base/equipment-type/page?pageNo=1&pageSize=100',
|
url: '/base/core-equipment-type/page?pageNo=1&pageSize=100',
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -416,7 +416,7 @@ export default {
|
|||||||
/** 准备设备数据 */
|
/** 准备设备数据 */
|
||||||
async initEquipment() {
|
async initEquipment() {
|
||||||
const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
url: '/base/equipment/listAll',
|
url: '/base/core-equipment/listAll',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
});
|
});
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ export default {
|
|||||||
/** 准备设备数据 */
|
/** 准备设备数据 */
|
||||||
async initEquipment() {
|
async initEquipment() {
|
||||||
const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
url: '/base/equipment/listAll',
|
url: '/base/core-equipment/listAll',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
});
|
});
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
|
|||||||
@@ -1,238 +1,81 @@
|
|||||||
<template xmlns="">
|
<template xmlns="">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="logo"></div>
|
<div class="logo"></div>
|
||||||
<!-- 登录区域 -->
|
<!-- 登录区域 -->
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<!-- 配图 -->
|
<!-- 配图 -->
|
||||||
<div class="pic">
|
<div class="pic"></div>
|
||||||
<div
|
<!-- 表单 -->
|
||||||
class="welcome"
|
<div class="field">
|
||||||
style="
|
<!-- [移动端]标题 -->
|
||||||
position: absolute;
|
<h2 class="mobile-title">
|
||||||
top: 15%;
|
<h3 class="title">芋道后台管理系统</h3>
|
||||||
left: 20%;
|
</h2>
|
||||||
user-select: none;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: flex-start;
|
|
||||||
">
|
|
||||||
<strong
|
|
||||||
style="
|
|
||||||
letter-spacing: 1px;
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 88px;
|
|
||||||
">
|
|
||||||
<span style="color: #26b9de">Wel</span>
|
|
||||||
<span style="color: #fff">come</span>
|
|
||||||
</strong>
|
|
||||||
<p
|
|
||||||
style="
|
|
||||||
margin: 0;
|
|
||||||
font-size: 26px;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
color: #26b9de;
|
|
||||||
opacity: 75%;
|
|
||||||
">
|
|
||||||
<span
|
|
||||||
style="
|
|
||||||
display: inline-block;
|
|
||||||
height: 20px;
|
|
||||||
width: 20px;
|
|
||||||
margin-left: 8px;
|
|
||||||
margin-right: 12px;
|
|
||||||
border-radius: 100%;
|
|
||||||
background: #26b9de;
|
|
||||||
"></span>
|
|
||||||
产线生产监控系统
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<video
|
|
||||||
src="/static/videos/login.webm"
|
|
||||||
muted
|
|
||||||
autoplay
|
|
||||||
loop
|
|
||||||
style="
|
|
||||||
user-select: none;
|
|
||||||
position: absolute;
|
|
||||||
top: 28%;
|
|
||||||
width: 100%;
|
|
||||||
height: 70%;
|
|
||||||
"></video>
|
|
||||||
</div>
|
|
||||||
<!-- 表单 -->
|
|
||||||
<div class="field">
|
|
||||||
<!-- [移动端]标题 -->
|
|
||||||
<h2 class="mobile-title">
|
|
||||||
<h3 class="title">中建材智能自动化研究院有限公司</h3>
|
|
||||||
</h2>
|
|
||||||
<h2 class="pc-title" style="">
|
|
||||||
<h3
|
|
||||||
class="title"
|
|
||||||
style="
|
|
||||||
margin: 0;
|
|
||||||
margin-left: 32px;
|
|
||||||
font-weight: 400;
|
|
||||||
user-select: none;
|
|
||||||
color: #000;
|
|
||||||
font-size: 36px;
|
|
||||||
line-height: 54px;
|
|
||||||
letter-spacing: 2px;
|
|
||||||
">
|
|
||||||
<img
|
|
||||||
src="../assets/logo/cnbm.png"
|
|
||||||
alt="cnbm_logo"
|
|
||||||
style="
|
|
||||||
height: 48px;
|
|
||||||
width: 48px;
|
|
||||||
position: relative;
|
|
||||||
top: 12px;
|
|
||||||
right: 8px;
|
|
||||||
" />
|
|
||||||
<span>中建材智能自动化研究院有限公司</span>
|
|
||||||
</h3>
|
|
||||||
<h3
|
|
||||||
class="sub-title"
|
|
||||||
style="
|
|
||||||
margin: 0;
|
|
||||||
margin-left: 32px;
|
|
||||||
font-weight: 400;
|
|
||||||
user-select: none;
|
|
||||||
color: #000;
|
|
||||||
font-size: 36px;
|
|
||||||
line-height: 54px;
|
|
||||||
letter-spacing: 2px;
|
|
||||||
">
|
|
||||||
产线生产监控系统
|
|
||||||
</h3>
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<!-- 表单 -->
|
<!-- 表单 -->
|
||||||
<div class="form-cont">
|
<div class="form-cont">
|
||||||
<el-tabs
|
<el-tabs class="form" v-model="loginForm.loginType" style=" float:none;">
|
||||||
class="form"
|
<el-tab-pane label="账号密码登录" name="uname">
|
||||||
v-model="loginForm.loginType"
|
</el-tab-pane>
|
||||||
style="float: none">
|
<el-tab-pane label="短信验证码登录" name="sms">
|
||||||
<el-tab-pane label="账号密码登录" name="uname"></el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="短信验证码登录" name="sms"></el-tab-pane>
|
</el-tabs>
|
||||||
</el-tabs>
|
<div>
|
||||||
<div style="">
|
<el-form ref="loginForm" :model="loginForm" :rules="LoginRules" class="login-form">
|
||||||
<el-form
|
<el-form-item prop="tenantName" v-if="tenantEnable">
|
||||||
ref="loginForm"
|
<el-input v-model="loginForm.tenantName" type="text" auto-complete="off" placeholder='租户'>
|
||||||
:model="loginForm"
|
<svg-icon slot="prefix" icon-class="tree" class="el-input__icon input-icon" />
|
||||||
:rules="LoginRules"
|
</el-input>
|
||||||
class="login-form">
|
</el-form-item>
|
||||||
<el-form-item prop="tenantName" v-if="tenantEnable">
|
<!-- 账号密码登录 -->
|
||||||
<el-input
|
<div v-if="loginForm.loginType === 'uname'">
|
||||||
v-model="loginForm.tenantName"
|
<el-form-item prop="username">
|
||||||
type="text"
|
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||||
auto-complete="off"
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||||
placeholder="租户">
|
</el-input>
|
||||||
<!-- <svg-icon
|
</el-form-item>
|
||||||
slot="prefix"
|
<el-form-item prop="password">
|
||||||
icon-class="tree"
|
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
|
||||||
class="el-input__icon input-icon" /> -->
|
@keyup.enter.native="getCode">
|
||||||
</el-input>
|
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||||
</el-form-item>
|
</el-input>
|
||||||
<!-- 账号密码登录 -->
|
</el-form-item>
|
||||||
<div v-if="loginForm.loginType === 'uname'">
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0 0 25px 0;">记住密码</el-checkbox>
|
||||||
<el-form-item prop="username">
|
</div>
|
||||||
<el-input
|
|
||||||
v-model="loginForm.username"
|
|
||||||
type="text"
|
|
||||||
auto-complete="off"
|
|
||||||
placeholder="账号">
|
|
||||||
<!-- <svg-icon
|
|
||||||
slot="prefix"
|
|
||||||
icon-class="user"
|
|
||||||
class="el-input__icon input-icon" /> -->
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item prop="password">
|
|
||||||
<el-input
|
|
||||||
v-model="loginForm.password"
|
|
||||||
type="password"
|
|
||||||
auto-complete="off"
|
|
||||||
placeholder="密码"
|
|
||||||
@keyup.enter.native="getCode">
|
|
||||||
<!-- <svg-icon
|
|
||||||
slot="prefix"
|
|
||||||
icon-class="password"
|
|
||||||
class="el-input__icon input-icon" /> -->
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-checkbox
|
|
||||||
v-model="loginForm.rememberMe"
|
|
||||||
style="margin: 0 0 25px 0">
|
|
||||||
记住密码
|
|
||||||
</el-checkbox>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 短信验证码登录 -->
|
<!-- 短信验证码登录 -->
|
||||||
<div v-if="loginForm.loginType === 'sms'">
|
<div v-if="loginForm.loginType === 'sms'">
|
||||||
<el-form-item prop="mobile">
|
<el-form-item prop="mobile">
|
||||||
<el-input
|
<el-input v-model="loginForm.mobile" type="text" auto-complete="off" placeholder="请输入手机号">
|
||||||
v-model="loginForm.mobile"
|
<svg-icon slot="prefix" icon-class="phone" class="el-input__icon input-icon" />
|
||||||
type="text"
|
</el-input>
|
||||||
auto-complete="off"
|
</el-form-item>
|
||||||
placeholder="请输入手机号">
|
<el-form-item prop="mobileCode">
|
||||||
<!-- <svg-icon
|
<el-input v-model="loginForm.mobileCode" type="text" auto-complete="off" placeholder="短信验证码"
|
||||||
slot="prefix"
|
class="sms-login-mobile-code-prefix" @keyup.enter.native="handleLogin">
|
||||||
icon-class="phone"
|
<template>
|
||||||
class="el-input__icon input-icon" /> -->
|
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</template>
|
||||||
</el-form-item>
|
<template slot="append">
|
||||||
<el-form-item prop="mobileCode">
|
<span v-if="mobileCodeTimer <= 0" class="getMobileCode" @click="getSmsCode"
|
||||||
<el-input
|
style="cursor: pointer;">获取验证码</span>
|
||||||
v-model="loginForm.mobileCode"
|
<span v-if="mobileCodeTimer > 0" class="getMobileCode">{{ mobileCodeTimer }}秒后可重新获取</span>
|
||||||
type="text"
|
</template>
|
||||||
auto-complete="off"
|
</el-input>
|
||||||
placeholder="短信验证码"
|
</el-form-item>
|
||||||
class="sms-login-mobile-code-prefix"
|
</div>
|
||||||
@keyup.enter.native="handleLogin">
|
|
||||||
<!-- <template>
|
|
||||||
<svg-icon
|
|
||||||
slot="prefix"
|
|
||||||
icon-class="password"
|
|
||||||
class="el-input__icon input-icon" />
|
|
||||||
</template> -->
|
|
||||||
<template slot="suffix">
|
|
||||||
<span
|
|
||||||
v-if="mobileCodeTimer <= 0"
|
|
||||||
class="getMobileCode"
|
|
||||||
@click="getSmsCode"
|
|
||||||
style="
|
|
||||||
cursor: pointer;
|
|
||||||
color: #0b58ff;
|
|
||||||
font-size: 18px;
|
|
||||||
line-height: 66px;
|
|
||||||
padding-right: 12px;
|
|
||||||
">
|
|
||||||
获取验证码
|
|
||||||
</span>
|
|
||||||
<span v-if="mobileCodeTimer > 0" class="getMobileCode">
|
|
||||||
{{ mobileCodeTimer }}秒后可重新获取
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 下方的登录按钮 -->
|
<!-- 下方的登录按钮 -->
|
||||||
<el-form-item id="button-form-item" style="width: 100%; margin-top: 32px">
|
<el-form-item style="width:100%;">
|
||||||
<el-button
|
<el-button :loading="loading" size="medium" type="primary" style="width:100%;"
|
||||||
:loading="loading"
|
@click.native.prevent="getCode">
|
||||||
size="medium"
|
<span v-if="!loading">登 录</span>
|
||||||
type="primary"
|
<span v-else>登 录 中...</span>
|
||||||
style="width: 100%; height: 66px; font-size: 18px;"
|
</el-button>
|
||||||
@click.native.prevent="getCode">
|
</el-form-item>
|
||||||
<span v-if="!loading">登 录</span>
|
|
||||||
<span v-else>登 录 中...</span>
|
|
||||||
</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!-- 社交登录 -->
|
<!-- 社交登录 -->
|
||||||
<!-- <el-form-item style="width:100%;">
|
<!-- <el-form-item style="width:100%;">
|
||||||
<div class="oauth-login" style="display:flex">
|
<div class="oauth-login" style="display:flex">
|
||||||
<div class="oauth-login-item" v-for="item in SysUserSocialTypeEnum" :key="item.type" @click="doSocialLogin(item)">
|
<div class="oauth-login-item" v-for="item in SysUserSocialTypeEnum" :key="item.type" @click="doSocialLogin(item)">
|
||||||
<img :src="item.img" height="25px" width="25px" alt="登录" >
|
<img :src="item.img" height="25px" width="25px" alt="登录" >
|
||||||
@@ -240,305 +83,265 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- footer -->
|
<!-- 图形验证码 -->
|
||||||
<div class="footer">
|
<Verify ref="verify" :captcha-type="'blockPuzzle'" :img-size="{ width: '400px', height: '200px' }"
|
||||||
Copyright © 2023 中建材智能自动化院 All Rights Reserved.
|
@success="handleLogin" />
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 图形验证码 -->
|
<!-- footer -->
|
||||||
<Verify
|
<div class="footer">
|
||||||
ref="verify"
|
Copyright © 2023 中建材智能自动化院 All Rights Reserved.
|
||||||
:captcha-type="'blockPuzzle'"
|
</div>
|
||||||
:img-size="{ width: '400px', height: '200px' }"
|
</div>
|
||||||
@success="handleLogin" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { sendSmsCode, socialAuthRedirect } from '@/api/login';
|
import { sendSmsCode, socialAuthRedirect } from "@/api/login";
|
||||||
import { getTenantIdByName } from '@/api/system/tenant';
|
import { getTenantIdByName } from "@/api/system/tenant";
|
||||||
import { SystemUserSocialTypeEnum } from '@/utils/constants';
|
import { SystemUserSocialTypeEnum } from "@/utils/constants";
|
||||||
import { getCaptchaEnable, getTenantEnable } from '@/utils/ruoyi';
|
import { getCaptchaEnable, getTenantEnable } from "@/utils/ruoyi";
|
||||||
import {
|
import {
|
||||||
getPassword,
|
getPassword,
|
||||||
getRememberMe,
|
getRememberMe, getTenantName,
|
||||||
getTenantName,
|
getUsername,
|
||||||
getUsername,
|
removePassword, removeRememberMe, removeTenantName,
|
||||||
removePassword,
|
removeUsername,
|
||||||
removeRememberMe,
|
setPassword, setRememberMe, setTenantId, setTenantName,
|
||||||
removeTenantName,
|
setUsername
|
||||||
removeUsername,
|
} from "@/utils/auth";
|
||||||
setPassword,
|
|
||||||
setRememberMe,
|
|
||||||
setTenantId,
|
|
||||||
setTenantName,
|
|
||||||
setUsername,
|
|
||||||
} from '@/utils/auth';
|
|
||||||
|
|
||||||
import Verify from '@/components/Verifition/Verify';
|
import Verify from '@/components/Verifition/Verify';
|
||||||
import { resetUserPwd } from '@/api/system/user';
|
import { resetUserPwd } from "@/api/system/user";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Login',
|
name: "Login",
|
||||||
components: {
|
components: {
|
||||||
Verify,
|
Verify
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
codeUrl: '',
|
codeUrl: "",
|
||||||
captchaEnable: true,
|
captchaEnable: true,
|
||||||
tenantEnable: true,
|
tenantEnable: true,
|
||||||
mobileCodeTimer: 0,
|
mobileCodeTimer: 0,
|
||||||
loginForm: {
|
loginForm: {
|
||||||
loginType: 'uname',
|
loginType: "uname",
|
||||||
username: 'admin',
|
username: "admin",
|
||||||
password: 'admin123',
|
password: "admin123",
|
||||||
captchaVerification: '',
|
captchaVerification: "",
|
||||||
mobile: '',
|
mobile: "",
|
||||||
mobileCode: '',
|
mobileCode: "",
|
||||||
rememberMe: false,
|
rememberMe: false,
|
||||||
tenantName: '技术中心',
|
tenantName: "技术中心",
|
||||||
},
|
},
|
||||||
scene: 21,
|
scene: 21,
|
||||||
|
|
||||||
LoginRules: {
|
LoginRules: {
|
||||||
username: [
|
username: [
|
||||||
{ required: true, trigger: 'blur', message: '用户名不能为空' },
|
{ required: true, trigger: "blur", message: "用户名不能为空" }
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
{ required: true, trigger: 'blur', message: '密码不能为空' },
|
{ required: true, trigger: "blur", message: "密码不能为空" }
|
||||||
],
|
],
|
||||||
mobile: [
|
mobile: [
|
||||||
{ required: true, trigger: 'blur', message: '手机号不能为空' },
|
{ required: true, trigger: "blur", message: "手机号不能为空" },
|
||||||
{
|
{
|
||||||
validator: function (rule, value, callback) {
|
validator: function (rule, value, callback) {
|
||||||
if (
|
if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) {
|
||||||
/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(
|
callback(new Error("手机号格式错误"));
|
||||||
value
|
} else {
|
||||||
) === false
|
callback();
|
||||||
) {
|
}
|
||||||
callback(new Error('手机号格式错误'));
|
}, trigger: "blur"
|
||||||
} else {
|
}
|
||||||
callback();
|
],
|
||||||
}
|
tenantName: [
|
||||||
},
|
{ required: true, trigger: "blur", message: "租户不能为空" },
|
||||||
trigger: 'blur',
|
{
|
||||||
},
|
validator: (rule, value, callback) => {
|
||||||
],
|
// debugger
|
||||||
tenantName: [
|
getTenantIdByName(value).then(res => {
|
||||||
{ required: true, trigger: 'blur', message: '租户不能为空' },
|
const tenantId = res.data;
|
||||||
{
|
if (tenantId && tenantId >= 0) {
|
||||||
validator: (rule, value, callback) => {
|
// 设置租户
|
||||||
// debugger
|
setTenantId(tenantId)
|
||||||
getTenantIdByName(value).then((res) => {
|
callback();
|
||||||
const tenantId = res.data;
|
} else {
|
||||||
if (tenantId && tenantId >= 0) {
|
callback('租户不存在');
|
||||||
// 设置租户
|
}
|
||||||
setTenantId(tenantId);
|
});
|
||||||
callback();
|
},
|
||||||
} else {
|
trigger: 'blur'
|
||||||
callback('租户不存在');
|
}
|
||||||
}
|
]
|
||||||
});
|
},
|
||||||
},
|
loading: false,
|
||||||
trigger: 'blur',
|
redirect: undefined,
|
||||||
},
|
// 枚举
|
||||||
],
|
SysUserSocialTypeEnum: SystemUserSocialTypeEnum,
|
||||||
},
|
};
|
||||||
loading: false,
|
},
|
||||||
redirect: undefined,
|
created() {
|
||||||
// 枚举
|
// 租户开关
|
||||||
SysUserSocialTypeEnum: SystemUserSocialTypeEnum,
|
this.tenantEnable = getTenantEnable();
|
||||||
};
|
if (this.tenantEnable) {
|
||||||
},
|
getTenantIdByName(this.loginForm.tenantName).then(res => { // 设置租户
|
||||||
created() {
|
const tenantId = res.data;
|
||||||
// 租户开关
|
if (tenantId && tenantId >= 0) {
|
||||||
this.tenantEnable = getTenantEnable();
|
setTenantId(tenantId)
|
||||||
if (this.tenantEnable) {
|
}
|
||||||
getTenantIdByName(this.loginForm.tenantName).then((res) => {
|
});
|
||||||
// 设置租户
|
}
|
||||||
const tenantId = res.data;
|
// 验证码开关
|
||||||
if (tenantId && tenantId >= 0) {
|
this.captchaEnable = getCaptchaEnable();
|
||||||
setTenantId(tenantId);
|
// 重定向地址
|
||||||
}
|
this.redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : undefined;
|
||||||
});
|
this.getCookie();
|
||||||
}
|
},
|
||||||
// 验证码开关
|
methods: {
|
||||||
this.captchaEnable = getCaptchaEnable();
|
getCode() {
|
||||||
// 重定向地址
|
// 情况一,未开启:则直接登录
|
||||||
this.redirect = this.$route.query.redirect
|
if (!this.captchaEnable) {
|
||||||
? decodeURIComponent(this.$route.query.redirect)
|
this.handleLogin({})
|
||||||
: undefined;
|
return;
|
||||||
this.getCookie();
|
}
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getCode() {
|
|
||||||
// 情况一,未开启:则直接登录
|
|
||||||
if (!this.captchaEnable) {
|
|
||||||
this.handleLogin({});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 情况二,已开启:则展示验证码;只有完成验证码的情况,才进行登录
|
// 情况二,已开启:则展示验证码;只有完成验证码的情况,才进行登录
|
||||||
// 弹出验证码
|
// 弹出验证码
|
||||||
this.$refs.verify.show();
|
this.$refs.verify.show()
|
||||||
},
|
},
|
||||||
getCookie() {
|
getCookie() {
|
||||||
const username = getUsername();
|
const username = getUsername();
|
||||||
const password = getPassword();
|
const password = getPassword();
|
||||||
const rememberMe = getRememberMe();
|
const rememberMe = getRememberMe();
|
||||||
const tenantName = getTenantName();
|
const tenantName = getTenantName();
|
||||||
this.loginForm = {
|
this.loginForm = {
|
||||||
...this.loginForm,
|
...this.loginForm,
|
||||||
username: username ? username : this.loginForm.username,
|
username: username ? username : this.loginForm.username,
|
||||||
password: password ? password : this.loginForm.password,
|
password: password ? password : this.loginForm.password,
|
||||||
rememberMe: rememberMe ? getRememberMe() : false,
|
rememberMe: rememberMe ? getRememberMe() : false,
|
||||||
tenantName: tenantName ? tenantName : this.loginForm.tenantName,
|
tenantName: tenantName ? tenantName : this.loginForm.tenantName,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
handleLogin(captchaParams) {
|
handleLogin(captchaParams) {
|
||||||
this.$refs.loginForm.validate((valid) => {
|
this.$refs.loginForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
// 设置 Cookie
|
// 设置 Cookie
|
||||||
if (this.loginForm.rememberMe) {
|
if (this.loginForm.rememberMe) {
|
||||||
setUsername(this.loginForm.username);
|
setUsername(this.loginForm.username)
|
||||||
setPassword(this.loginForm.password);
|
setPassword(this.loginForm.password)
|
||||||
setRememberMe(this.loginForm.rememberMe);
|
setRememberMe(this.loginForm.rememberMe)
|
||||||
setTenantName(this.loginForm.tenantName);
|
setTenantName(this.loginForm.tenantName)
|
||||||
} else {
|
} else {
|
||||||
removeUsername();
|
removeUsername()
|
||||||
removePassword();
|
removePassword()
|
||||||
removeRememberMe();
|
removeRememberMe()
|
||||||
removeTenantName();
|
removeTenantName()
|
||||||
}
|
}
|
||||||
this.loginForm.captchaVerification =
|
this.loginForm.captchaVerification = captchaParams.captchaVerification
|
||||||
captchaParams.captchaVerification;
|
// 发起登陆
|
||||||
// 发起登陆
|
// console.log("发起登录", this.loginForm);
|
||||||
// console.log("发起登录", this.loginForm);
|
this.$store.dispatch(this.loginForm.loginType === "sms" ? "SmsLogin" : "Login", this.loginForm).then(() => {
|
||||||
this.$store
|
this.$router.push({ path: this.redirect || "/" }).catch(() => {
|
||||||
.dispatch(
|
});
|
||||||
this.loginForm.loginType === 'sms' ? 'SmsLogin' : 'Login',
|
}).catch(() => {
|
||||||
this.loginForm
|
this.loading = false;
|
||||||
)
|
});
|
||||||
.then(() => {
|
}
|
||||||
this.$router.push({ path: this.redirect || '/' }).catch(() => {});
|
});
|
||||||
})
|
},
|
||||||
.catch(() => {
|
async doSocialLogin(socialTypeEnum) {
|
||||||
this.loading = false;
|
// 设置登录中
|
||||||
});
|
this.loading = true;
|
||||||
}
|
let tenant = false;
|
||||||
});
|
if (this.tenantEnable) {
|
||||||
},
|
await this.$prompt('请输入租户名称', "提示", {
|
||||||
async doSocialLogin(socialTypeEnum) {
|
confirmButtonText: "确定",
|
||||||
// 设置登录中
|
cancelButtonText: "取消"
|
||||||
this.loading = true;
|
}).then(async ({ value }) => {
|
||||||
let tenant = false;
|
await getTenantIdByName(value).then(res => {
|
||||||
if (this.tenantEnable) {
|
const tenantId = res.data;
|
||||||
await this.$prompt('请输入租户名称', '提示', {
|
tenant = true
|
||||||
confirmButtonText: '确定',
|
if (tenantId && tenantId >= 0) {
|
||||||
cancelButtonText: '取消',
|
setTenantId(tenantId)
|
||||||
})
|
}
|
||||||
.then(async ({ value }) => {
|
});
|
||||||
await getTenantIdByName(value).then((res) => {
|
}).catch(() => {
|
||||||
const tenantId = res.data;
|
// 取消登录按钮 loading状态
|
||||||
tenant = true;
|
this.loading = false;
|
||||||
if (tenantId && tenantId >= 0) {
|
|
||||||
setTenantId(tenantId);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
// 取消登录按钮 loading状态
|
|
||||||
this.loading = false;
|
|
||||||
|
|
||||||
return false;
|
return false
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
tenant = true;
|
tenant = true
|
||||||
}
|
}
|
||||||
if (tenant) {
|
if (tenant) {
|
||||||
// 计算 redirectUri
|
// 计算 redirectUri
|
||||||
const redirectUri =
|
const redirectUri = location.origin + '/social-login?'
|
||||||
location.origin +
|
+ encodeURIComponent('type=' + socialTypeEnum.type + '&redirect=' + (this.redirect || "/")); // 重定向不能丢
|
||||||
'/social-login?' +
|
// const redirectUri = 'http://127.0.0.1:48080/api/gitee/callback';
|
||||||
encodeURIComponent(
|
// const redirectUri = 'http://127.0.0.1:48080/api/dingtalk/callback';
|
||||||
'type=' +
|
// 进行跳转
|
||||||
socialTypeEnum.type +
|
socialAuthRedirect(socialTypeEnum.type, encodeURIComponent(redirectUri)).then((res) => {
|
||||||
'&redirect=' +
|
// console.log(res.url);
|
||||||
(this.redirect || '/')
|
window.location.href = res.data;
|
||||||
); // 重定向不能丢
|
});
|
||||||
// const redirectUri = 'http://127.0.0.1:48080/api/gitee/callback';
|
}
|
||||||
// const redirectUri = 'http://127.0.0.1:48080/api/dingtalk/callback';
|
},
|
||||||
// 进行跳转
|
/** ========== 以下为升级短信登录 ========== */
|
||||||
socialAuthRedirect(
|
getSmsCode() {
|
||||||
socialTypeEnum.type,
|
if (this.mobileCodeTimer > 0) return;
|
||||||
encodeURIComponent(redirectUri)
|
this.$refs.loginForm.validate(valid => {
|
||||||
).then((res) => {
|
if (!valid) return;
|
||||||
// console.log(res.url);
|
sendSmsCode(this.loginForm.mobile, this.scene, this.loginForm.uuid, this.loginForm.code).then(res => {
|
||||||
window.location.href = res.data;
|
this.$modal.msgSuccess("获取验证码成功")
|
||||||
});
|
this.mobileCodeTimer = 60;
|
||||||
}
|
let msgTimer = setInterval(() => {
|
||||||
},
|
this.mobileCodeTimer = this.mobileCodeTimer - 1;
|
||||||
/** ========== 以下为升级短信登录 ========== */
|
if (this.mobileCodeTimer <= 0) {
|
||||||
getSmsCode() {
|
clearInterval(msgTimer);
|
||||||
if (this.mobileCodeTimer > 0) return;
|
}
|
||||||
this.$refs.loginForm.validate((valid) => {
|
}, 1000);
|
||||||
if (!valid) return;
|
});
|
||||||
sendSmsCode(
|
});
|
||||||
this.loginForm.mobile,
|
}
|
||||||
this.scene,
|
}
|
||||||
this.loginForm.uuid,
|
|
||||||
this.loginForm.code
|
|
||||||
).then((res) => {
|
|
||||||
this.$modal.msgSuccess('获取验证码成功');
|
|
||||||
this.mobileCodeTimer = 60;
|
|
||||||
let msgTimer = setInterval(() => {
|
|
||||||
this.mobileCodeTimer = this.mobileCodeTimer - 1;
|
|
||||||
if (this.mobileCodeTimer <= 0) {
|
|
||||||
clearInterval(msgTimer);
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import '~@/assets/styles/login.scss';
|
@import "~@/assets/styles/login.scss";
|
||||||
|
|
||||||
|
|
||||||
.oauth-login {
|
.oauth-login {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.oauth-login-item {
|
.oauth-login-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.oauth-login-item img {
|
.oauth-login-item img {
|
||||||
height: 25px;
|
height: 25px;
|
||||||
width: 25px;
|
width: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.oauth-login-item span:hover {
|
.oauth-login-item span:hover {
|
||||||
text-decoration: underline red;
|
text-decoration: underline red;
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sms-login-mobile-code-prefix {
|
.sms-login-mobile-code-prefix {
|
||||||
:deep(.el-input__prefix) {
|
:deep(.el-input__prefix) {
|
||||||
top: 22%;
|
top: 22%;
|
||||||
}
|
}
|
||||||
}
|
}</style>
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ export default {
|
|||||||
label: '设备名称',
|
label: '设备名称',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
width: 128,
|
||||||
prop: 'equipmentCode',
|
prop: 'equipmentCode',
|
||||||
label: '设备编码',
|
label: '设备编码',
|
||||||
},
|
},
|
||||||
@@ -215,7 +216,7 @@ export default {
|
|||||||
/** 根据产线获取设备 */
|
/** 根据产线获取设备 */
|
||||||
async getEquipmentList(id) {
|
async getEquipmentList(id) {
|
||||||
const { data } = await this.$axios({
|
const { data } = await this.$axios({
|
||||||
url: '/base/equipment/listByLine',
|
url: '/base/core-equipment/listByLine',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { id },
|
params: { id },
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<DialogForm
|
<DialogForm
|
||||||
v-if="open"
|
v-if="open"
|
||||||
ref="form"
|
ref="form"
|
||||||
v-model="form"
|
:dataForm="form"
|
||||||
:rows="[
|
:rows="[
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
<DialogForm
|
<DialogForm
|
||||||
v-if="open"
|
v-if="open"
|
||||||
ref="form"
|
ref="form"
|
||||||
v-model="form"
|
:dataForm="form"
|
||||||
:rows="[
|
:rows="[
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user