From 7bc79fac493ee54b0ba8650f3a40632378d81070 Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期三, 08 十二月 2021 09:44:42 +0800
Subject: [PATCH] 登录页
---
src/pages/settings/views/NetSettings.vue | 155 ++++++++++++++++++++++++++++-----------------------
1 files changed, 86 insertions(+), 69 deletions(-)
diff --git a/src/pages/settings/views/NetSettings.vue b/src/pages/settings/views/NetSettings.vue
index 5d283e1..3080795 100644
--- a/src/pages/settings/views/NetSettings.vue
+++ b/src/pages/settings/views/NetSettings.vue
@@ -130,7 +130,8 @@
<el-form :model="ipv4Form" :rules="ipv4FormRules" ref="ipv4Form">
<el-form-item>
<div class="p-title">鏂规硶</div>
- <el-select v-model="value" placeholder="璇烽�夋嫨" size="small">
+ <el-select v-model="value" placeholder="璇烽�夋嫨" size="small"
+ :popper-append-to-body="false">
<el-option
v-for="item in options"
:key="item.value"
@@ -187,7 +188,7 @@
<el-form :model="ipv6Form" :rules="ipv6FormRules" ref="ipv6Form">
<el-form-item>
<div class="p-title">鏂规硶</div>
- <el-select v-model="value" placeholder="璇烽�夋嫨" size="small">
+ <el-select v-model="value" placeholder="璇烽�夋嫨" size="small" :popper-append-to-body="false">
<el-option
v-for="item in options"
:key="item.value"
@@ -207,18 +208,18 @@
<div class="p-title">鍓嶇紑</div>
<div style="display: flex; width: 100%">
<el-input
- v-model="wifiForm.password"
+ v-model="ipv6Form.prefix"
placeholder
size="small"
></el-input>
<div class="ad">
- <i class="el-icon-remove-outline"></i>
+ <i class="el-icon-remove-outline" @click="minusPrefix"></i>
</div>
<div class="ad">
- <i class="el-icon-circle-plus-outline"></i>
+ <i class="el-icon-circle-plus-outline" @click="+(ipv6Form.prefix)++"></i>
</div>
- <div class="ad"><i class="el-icon-refresh-left"></i></div>
+ <div class="ad"><i class="el-icon-refresh-left" @click="ipv6Form.prefix=''"></i></div>
</div>
</el-form-item>
@@ -285,38 +286,38 @@
<div class="wire-detail" v-if="activePage == 2 && inWireDetail">
<div class="title">缃戠粶璁剧疆</div>
<el-form :model="wireForm" :rules="wireFormRules" ref="wireForm">
- <el-form-item prop="name">
- <div class="p-title">缃戠粶鍚嶇О</div>
+ <el-form-item prop="name">
+ <div class="p-title">缃戠粶鍚嶇О</div>
<div class="wifi-name">{{ "缃戠粶" + activeWireItem.index }}</div>
</el-form-item>
- <el-form-item prop="ifname">
- <div class="p-title">缃戝崱</div>
+ <el-form-item prop="ifname">
+ <div class="p-title">缃戝崱</div>
<div class="wifi-name">{{ activeWireItem.name }}</div>
</el-form-item>
- <el-form-item prop="ip">
- <div class="p-title">IP</div>
+ <el-form-item prop="ip">
+ <div class="p-title">IP</div>
<ip-input
:ip="wireForm.ip"
@on-blur="wireForm.ip = arguments[0]"
></ip-input>
</el-form-item>
<el-form-item prop="subMask">
- <div class="p-title">瀛愮綉鎺╃爜</div>
+ <div class="p-title">瀛愮綉鎺╃爜</div>
<ip-input
:ip="wireForm.subMask"
@on-blur="wireForm.subMask = arguments[0]"
></ip-input>
</el-form-item>
- <el-form-item prop="gateway">
- <div class="p-title">缃戝叧</div>
+ <el-form-item prop="gateway">
+ <div class="p-title">缃戝叧</div>
<ip-input
:ip="wireForm.gateway"
@on-blur="wireForm.gateway = arguments[0]"
></ip-input>
</el-form-item>
- <el-form-item prop="dns">
- <div class="p-title">DNS</div>
+ <el-form-item prop="dns">
+ <div class="p-title">DNS</div>
<ip-input
:ip="wireForm.dns"
@on-blur="wireForm.dns = arguments[0]"
@@ -329,6 +330,9 @@
<div class="ok" @click="saveWire">淇濆瓨</div>
</div>
</div>
+ <WifiGateway v-if="activePage == 3"></WifiGateway>
+ <LoraGateway v-if="activePage == 4"></LoraGateway>
+ <MqttGateway v-if="activePage == 5"></MqttGateway>
</div>
</div>
</div>
@@ -348,10 +352,17 @@
import ipInput from "../components/IPInput";
import switchBar from "../components/switchBar";
+import WifiGateway from '../components/WifiGateway'
+import LoraGateway from '../components/LoraGateway'
+import MqttGateway from '../components/MqttGateway'
+
export default {
components: {
ipInput,
switchBar,
+ WifiGateway,
+ LoraGateway,
+ MqttGateway
},
data() {
const checkPwd = (rule, value, callback) => {
@@ -405,6 +416,9 @@
{ name: "缃戠粶璁剧疆", icon: "\ue6dd" },
{ name: "鏃犵嚎缃戠粶", icon: "\uea13" },
{ name: "鏈夌嚎缃戠粶", icon: "\ue73b" },
+ { name: "WiFi缃戝叧", icon: "\ue73b" },
+ { name: "LORA缃戝叧", icon: "\ue73b" },
+ { name: "MQTT缃戝叧", icon: "\ue73b" },
],
ipv6FormRules: {},
options: [
@@ -422,15 +436,15 @@
IPV6_hid: false
};
},
- components: {
- ipInput,
- switchBar,
- },
mounted() {
this.getCurServer();
this.fetchWireList();
},
methods: {
+ minusPrefix(){
+ debugger
+ this.ipv6Form.prefix
+ },
switchNetCard(item) {
if (item.active) {
upNetCard({ ifname: item.name }).then(
@@ -583,22 +597,28 @@
.all {
width: 100%;
}
+.wire{
+ width: 456px;
+ margin: 0 auto;
+}
.wire-detail {
+ width: 456px;
+ margin: 0 auto;
.title {
font-size: 16px;
margin-bottom: 10px;
}
.ip-input-container {
- max-width: none !important;
- height: 32px;
- line-height: normal;
- box-sizing: border-box;
- // background-color: #f2f2f7;
- text-align: left;
- border-radius: 20px;
- border: 2px solid transparent; display: flex;
-
- }
+ max-width: none !important;
+ height: 32px;
+ line-height: normal;
+ box-sizing: border-box;
+ // background-color: #f2f2f7;
+ text-align: left;
+ border-radius: 20px;
+ border: 2px solid transparent;
+ display: flex;
+ }
.btns {
display: flex;
justify-content: space-between;
@@ -620,7 +640,7 @@
}
}
.net-set {
- max-width: 600px;
+ max-width: 456px;
margin: 0 auto;
.title {
font-size: 16px;
@@ -653,10 +673,11 @@
box-sizing: border-box;
flex-shrink: 0;
padding: 10px;
+ padding-top: 6px;
border-right: 4px solid #f2f2f7;
border-left: 4px solid #f2f2f7;
+ border-top: 4px solid #f2f2f7;
.menu-item {
- background: #f2f2f7;
height: 56px;
margin-bottom: 4px;
border-radius: 8px;
@@ -667,6 +688,11 @@
padding: 0 20px;
display: flex;
justify-content: space-between;
+
+ &:hover {
+ background: #f2f2f7;
+ }
+
.item-left {
display: flex;
align-items: center;
@@ -681,7 +707,7 @@
}
}
.menu-item-active {
- background-color: var(--colorCard);
+ background-color: var(--colorCard) !important;
color: #ffffff;
}
}
@@ -692,12 +718,19 @@
box-sizing: border-box;
position: relative;
padding: 10px;
+ padding-top: 6px;
+ border-top: 4px solid #f2f2f7;
+ overflow-y: overlay;
+ overflow-x: hidden;
+
.title {
height: 48px;
font-size: 16px;
line-height: 48px;
- color: #333333;
- font-weight: bold;
+ color: #4F4F4F;
+ font-weight: bold; background: #F2F2F7;
+ border-radius: 8px;
+ margin-bottom: 4px;
}
.el-form-item.is-required:not(.is-no-asterisk)
> .el-form-item__label:before,
@@ -710,7 +743,7 @@
width: 100%;
}
.el-form-item {
- margin-bottom: 16px;
+ margin-bottom: 4px;
}
.el-form-item__content {
line-height: 48px;
@@ -724,7 +757,7 @@
border: 2px solid #409eff !important;
}
.el-select-dropdown__item {
- color: #333333;
+ color: #4F4F4F;
height: 32px;
font-size: 12px;
line-height: 32px;
@@ -758,11 +791,10 @@
background-color: #ffffff;
border: 2px solid transparent;
border-radius: 20px;
- height: 32px;
+ height: 32px !important;
padding: 0 15px;
font-size: 14px;
line-height: 32px;
-
font-weight: bold;
}
.el-input__inner::placeholder {
@@ -774,7 +806,7 @@
width: 100%;
}
.el-select .el-input .el-select__caret {
- color: #333333;
+ color: #4F4F4F;
font-size: 14px;
font-weight: 600;
}
@@ -783,7 +815,7 @@
max-width: none !important;
}
.wifi-set {
- max-width: 600px;
+ max-width: 456px;
margin: 0 auto;
.switch-bar {
background: #f2f2f7;
@@ -791,7 +823,7 @@
}
.switch-bar .name {
font-size: 14px;
- color: #333;
+ color: #4F4F4F;
font-weight: bold;
}
.wifi-option {
@@ -802,12 +834,12 @@
align-items: center;
box-sizing: border-box;
padding: 0 20px;
- margin-bottom: 10px;
+ margin-bottom: 4px;
background: #f2f2f7;
border-radius: 8px;
.name {
font-size: 14px;
- color: #333;
+ color: #4F4F4F;
font-weight: bold;
.icon {
color: #4e94ff;
@@ -834,7 +866,7 @@
}
}
.wifi-detail {
- max-width: 600px;
+ max-width: 454px;
margin: 0 auto;
transition: all 0.3s linear 0s;
.general-box {
@@ -868,7 +900,7 @@
padding: 14px 20px;
font-weight: bold;
font-size: 14px;
- color: #333333;
+ color: #4F4F4F;
}
.ip-input-container {
max-width: none !important;
@@ -893,21 +925,12 @@
margin-top: 0;
display: flex;
justify-content: space-between;
- margin-bottom: 20px;
- .left {
- background-color: rgba(240, 240, 240, 1);
- height: 40px;
- line-height: 40px;
- width: 48%;
- border-radius: 10px;
+ margin-bottom: 4px;
+ .cancel {
+ width: 218px;
}
- .right {
- background-color: rgba(61, 104, 225, 1);
- height: 40px;
- line-height: 40px;
- width: 48%;
- color: #fff;
- border-radius: 10px;
+ .ok {
+ width: 218px;
}
}
.wifi-name {
@@ -920,15 +943,9 @@
line-height: 48px;
}
.ad {
- margin-top: 10px;
height: 32px;
- /* margin: 4px 0px 4px 5px; */
- /* border-radius: 5px; */
- line-height: 31px;
- /* width: 27px; */
text-align: center;
font-size: 17px;
- /* font-weight: bold; */
margin-left: 10px;
cursor: pointer;
}
@@ -943,13 +960,13 @@
align-items: center;
box-sizing: border-box;
padding: 0 20px;
- margin-bottom: 10px;
+ margin-bottom: 4px;
border-radius: 8px;
.name {
font-size: 15px;
font-weight: bold;
font-size: 14px;
- color: #333333;
+ color: #4F4F4F;
}
.right {
display: flex;
--
Gitblit v1.8.0