修改登录
parent
f3f55d2c88
commit
dad69ea7f7
|
@ -4,18 +4,18 @@ import {
|
|||
const infoApi = {
|
||||
// 获取设备信息
|
||||
getSys() {
|
||||
return postPBRequest("/info", null, 51000);
|
||||
return postPBRequest("/system", null, 57000);
|
||||
},
|
||||
// 获取网络信息
|
||||
getNet(params) {
|
||||
return postPBRequest("/net", params, 52000);
|
||||
return postPBRequest("/system", params, 57001);
|
||||
},
|
||||
saveNet(params) {
|
||||
return postPBRequest("/net", params, 52200);
|
||||
return postPBRequest("/system", params, 57201);
|
||||
},
|
||||
// 重启设备
|
||||
reboot() {
|
||||
return postPBRequest("/user", null, 50003);
|
||||
return postPBRequest("/system", null, 57202);
|
||||
},
|
||||
// // 透传列表
|
||||
// getTc(params) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
const myApi = {
|
||||
// 登录状态查询
|
||||
loginStatus() {
|
||||
return postPBRequest('/user', null, 50000);
|
||||
return postPBRequest('/system', null, 50000);
|
||||
},
|
||||
// 登录
|
||||
login(params = {}) {
|
||||
|
@ -12,11 +12,11 @@ const myApi = {
|
|||
},
|
||||
// 退出登陆
|
||||
logout() {
|
||||
return postPBRequest('/user', null, 50002);
|
||||
return postPBRequest('/system', null, 50002);
|
||||
},
|
||||
// 修改密码
|
||||
editPass(params = {}) {
|
||||
return postPBRequest('/user', params, 90201);
|
||||
return postPBRequest('/system', params, 90201);
|
||||
}
|
||||
}
|
||||
export default myApi;
|
|
@ -53,17 +53,17 @@ export default {
|
|||
rules: {
|
||||
oldPass: [
|
||||
{ required: true, message: "请输入密码", trigger: "blur" },
|
||||
{ min: 6, max: 18, message: "长度在6到18个字符", trigger: "blur" },
|
||||
{ min: 2, max: 18, message: "长度在2到18个字符", trigger: "blur" },
|
||||
{ required: true, validator: checkPass, trigger: "blur" },
|
||||
],
|
||||
newPass: [
|
||||
{ required: true, message: "请输入密码", trigger: "blur" },
|
||||
{ min: 6, max: 18, message: "长度在6到18个字符", trigger: "blur" },
|
||||
{ min: 5, max: 20, message: "长度在5到20个字符", trigger: "blur" },
|
||||
{ required: true, validator: checkPass, trigger: "blur" },
|
||||
],
|
||||
confirmPass: [
|
||||
{ required: true, message: "请输入密码", trigger: "blur" },
|
||||
{ min: 6, max: 18, message: "长度在6到18个字符", trigger: "blur" },
|
||||
{ min: 5, max: 20, message: "长度在5到20个字符", trigger: "blur" },
|
||||
{ required: true, validator: validatePassCheck, trigger: "blur" },
|
||||
],
|
||||
},
|
||||
|
@ -96,11 +96,11 @@ export default {
|
|||
}
|
||||
const res = await myApi.editPass(param);
|
||||
if (res.code == 0) {
|
||||
ElMessage.success(res.message|| "请求成功");
|
||||
ElMessage.success(res.data|| "请求成功");
|
||||
// 关闭弹框
|
||||
ctx.emit("dialogSuccess");
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
ElMessage.error(res.data);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<el-card class="content-div">
|
||||
<div class="all-content">
|
||||
<div class="time-div">
|
||||
<span>2023年08月23日 星期三 09:57:11</span>
|
||||
<el-button type="primary" size="large" @click="getTime">时间校对</el-button>
|
||||
<!-- <span>2023年08月23日 星期三 09:57:11</span>
|
||||
<el-button type="primary" size="large" @click="getTime">时间校对</el-button>
|
||||
<el-button type="primary" size="large" @click="getTime">时间校对</el-button> -->
|
||||
|
||||
</div>
|
||||
<div class="top-div">
|
||||
|
@ -12,19 +12,21 @@
|
|||
<legend class="box-ht">设备信息</legend>
|
||||
<div>
|
||||
<span class="name">型号</span>
|
||||
<span class="value">{{ deviceData.basicinfo.model }}</span>
|
||||
<span class="value">{{ deviceData.device_information && deviceData.device_information.model }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">序列号</span>
|
||||
<span class="value">{{ deviceData.basicinfo.sn }}</span>
|
||||
<span class="value">{{ deviceData.device_information && deviceData.device_information.sn }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">开机时间</span>
|
||||
<span class="value">{{ deviceData.hostinfo.boottime }}</span>
|
||||
<span class="value">{{ deviceData.running_information && deviceData.running_information.hostinfo &&
|
||||
deviceData.running_information.hostinfo.boottime }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">运行时长</span>
|
||||
<span class="value">{{ deviceData.hostinfo.uptime }}</span>
|
||||
<span class="value">{{ deviceData.running_information && deviceData.running_information.hostinfo &&
|
||||
deviceData.running_information.hostinfo.uptime }}</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="right-div box2">
|
||||
|
@ -36,7 +38,7 @@
|
|||
<fieldset class="left-div1 box2">
|
||||
<legend class="box-ht">磁盘信息</legend>
|
||||
<div class="process-div">
|
||||
<div v-for="(item, index) in deviceData.diskinfo" :key="index">
|
||||
<div v-for="(item, index) in deviceData.running_information && deviceData.running_information.diskinfo" :key="index">
|
||||
<div :id="'echartDiv' + index" class="echartDiv"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -44,7 +46,7 @@
|
|||
|
||||
<fieldset class="right-div1 box2">
|
||||
<legend class="box-ht">网卡信息</legend>
|
||||
<div v-for="(item, index) of deviceData.netinfo" :key="index" class="all-con">
|
||||
<div v-for="(item, index) of deviceData.running_information && deviceData.running_information.netinfo" :key="index" class="all-con">
|
||||
<p class="title">网卡{{ item.name }}的使用情况</p>
|
||||
<div class="data">
|
||||
<span>
|
||||
|
@ -106,15 +108,15 @@ export default {
|
|||
let dom = document.getElementById("echartDiv");
|
||||
let data = {
|
||||
name: "内存使用比",
|
||||
usedPercent: state.deviceData.meminfo.used_percent.toFixed(2),
|
||||
used: state.deviceData.meminfo.used_percent.toFixed(2),
|
||||
usedPercent: state.deviceData.running_information.meminfo.used_percent.toFixed(2),
|
||||
used: state.deviceData.running_information.meminfo.used_percent.toFixed(2),
|
||||
total: 100,
|
||||
};
|
||||
getEchart(dom, data);
|
||||
state.deviceData.diskinfo.forEach((ele, index) => {
|
||||
state.deviceData.running_information.diskinfo.forEach((ele, index) => {
|
||||
let domItem = document.getElementById("echartDiv" + index);
|
||||
let dataItem = {
|
||||
name: ele.name.split("/")[2],
|
||||
name: ele.path,
|
||||
usedPercent: ele.used_percent.toFixed(2),
|
||||
used: ele.used_percent.toFixed(2),
|
||||
total: 100,
|
||||
|
@ -199,6 +201,7 @@ export default {
|
|||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.time-div {
|
||||
height: 8%;
|
||||
width: 100%;
|
||||
|
@ -208,24 +211,29 @@ export default {
|
|||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding: 0 15px;
|
||||
|
||||
>span {
|
||||
padding: 0 15px;
|
||||
font-size: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
.top-div {
|
||||
height: 39%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.bottom-div {
|
||||
height: 49%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.left-div, .left-div1 {
|
||||
|
||||
.left-div,
|
||||
.left-div1 {
|
||||
height: 100%;
|
||||
width: 65%;
|
||||
border: 1px solid #006b3b;
|
||||
|
@ -234,6 +242,7 @@ export default {
|
|||
justify-content: space-around;
|
||||
display: flex;
|
||||
padding: 20px;
|
||||
|
||||
>div {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
|
@ -241,25 +250,30 @@ export default {
|
|||
justify-content: space-between;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 25%;
|
||||
border: 1px solid #c3c3c3;
|
||||
height: 100%;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.value {
|
||||
width: 73%;
|
||||
border: 1px solid #c3c3c3;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.process {
|
||||
width: 73%;
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.process-div {
|
||||
height: 100%;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
|
||||
>div {
|
||||
width: 48%;
|
||||
height: 100%;
|
||||
|
@ -267,7 +281,8 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
.right-div, .right-div1 {
|
||||
.right-div,
|
||||
.right-div1 {
|
||||
height: 100%;
|
||||
width: 34%;
|
||||
border: 1px solid #006b3b;
|
||||
|
@ -276,6 +291,7 @@ export default {
|
|||
border-radius: 10px;
|
||||
display: flex;
|
||||
padding: 10px;
|
||||
|
||||
>div {
|
||||
height: 49%;
|
||||
flex-direction: column;
|
||||
|
@ -283,11 +299,13 @@ export default {
|
|||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.all-con {
|
||||
width: 100%;
|
||||
height: 50%;
|
||||
// border: 1px solid red;
|
||||
}
|
||||
|
||||
.data {
|
||||
padding: 5px 0;
|
||||
width: 70%;
|
||||
|
@ -295,21 +313,25 @@ export default {
|
|||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-direction: column;
|
||||
|
||||
// border: 1px solid greenyellow;
|
||||
>span {
|
||||
height: 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
// border: 1px solid red;
|
||||
.name {
|
||||
width: 20%;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.dataValue {
|
||||
width: 80%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
width: 40%;
|
||||
border: 1px solid #c3c3c3;
|
||||
|
@ -319,15 +341,18 @@ export default {
|
|||
color: #098658;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.recv {
|
||||
background: #f8cecc;
|
||||
}
|
||||
|
||||
.sent {
|
||||
background: #dae8fc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
// border: 1px solid red;
|
||||
width: 100%;
|
||||
|
@ -339,12 +364,14 @@ export default {
|
|||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
.left-div1, .right-div1 {
|
||||
|
||||
.left-div1,
|
||||
.right-div1 {
|
||||
width: 49.5%;
|
||||
}
|
||||
|
||||
.echartDiv {
|
||||
width: 70% !important;
|
||||
height: 100% !important;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
}</style>
|
||||
|
|
|
@ -187,7 +187,7 @@ export default {
|
|||
if (valid) {
|
||||
const res = await infoApi.saveNet(state.formData);
|
||||
if (res.code == 0) {
|
||||
ElMessage.success(res.message || "请求成功");
|
||||
ElMessage.success(res.data + ',保存网络后会重启' || "请求成功,保存网络后会重启");
|
||||
getNet();
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
|
|
|
@ -93,7 +93,7 @@ export default {
|
|||
store.commit("setUserInfo", userInfo);
|
||||
getLoginStatus();
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
ElMessage.error(res.data);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
|
|
@ -266,13 +266,13 @@ export default {
|
|||
}
|
||||
|
||||
const tableRowClassName = ({ row, rowIndex }) => {
|
||||
if(row.status == 1) {
|
||||
if(row.driver_status == 1) {
|
||||
return ''
|
||||
}
|
||||
if(row.status == 2) {
|
||||
if(row.driver_status == 2) {
|
||||
return 'green'
|
||||
}
|
||||
if(row.status == 3) {
|
||||
if(row.driver_status == 3) {
|
||||
return 'red'
|
||||
}
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ export default ({ mode }) => defineConfig({
|
|||
'/api': {
|
||||
// target: 'http://cdcm_test_api.shikicc.com:58909',
|
||||
// target: 'http://frp.shikicc.com:58951',
|
||||
target: 'https://cdcm_api2.shikicc.com',
|
||||
// target: 'https://cdcm_api.shikicc.com',
|
||||
// target: 'https://cdcm_api2.shikicc.com',
|
||||
target: 'https://cdcm_api.shikicc.com',
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/api/, '/api')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue