<template>
|
<div class="all">
|
<div class="net-content">
|
<div class="net-center" ref="left">
|
<div
|
class="menu-item"
|
:class="activePage == i ? 'menu-item-active' : ''"
|
v-for="(item, i) in tabList"
|
:key="i"
|
@click="openRight(i)"
|
ref="leftbar"
|
>
|
<div class="item-left">
|
<span class="icon iconfont">{{ item.icon }}</span>
|
<span class="text">{{ item.name }}</span>
|
</div>
|
<!-- <span v-if="showStatus && i == 2" class="status">已连接</span> -->
|
</div>
|
</div>
|
<div class="net-right" v-loading="configLoading">
|
<div class="net-set" v-if="activePage == 0">
|
<div class="title">网络设置</div>
|
<el-form :model="ruleForm" :rules="rules" ref="joinForm" class="join-form">
|
<el-form-item prop="deviceName">
|
<div class="p-title">设备名称</div>
|
<el-input v-model="ruleForm.deviceName" size="small" placeholder="必填"></el-input>
|
</el-form-item>
|
|
<el-form-item prop="port">
|
<div class="p-title">端口</div>
|
<el-input v-model="ruleForm.port" placeholder="选填,外部访问的端口" size="small"></el-input>
|
</el-form-item>
|
</el-form>
|
<!-- <div class="save-btn" @click="saveServerName">保存</div> -->
|
<div class="btns">
|
<div class="ok" @click="saveServerName">保存</div>
|
</div>
|
</div>
|
|
<div class="wifi-set" v-if="activePage == 1 && !inWifiDetail">
|
<div class="title">无线网络</div>
|
|
<switchBar :barName="`无线网卡`" @switchChange="wifiControl" :value="true"></switchBar>
|
|
<div class="wifi-option" v-for="(item, i) in wifiList" :key="i" @click="checkWifi(item)">
|
<div class="name">
|
<span class="icon iconfont" v-if="item.connected"></span>
|
<span :style="!item.connected ? { 'margin-left': '24px' } : {}">{{ item.essid | escape }}</span>
|
</div>
|
|
<div class="more-detail">
|
<span class="icon iconfont lock" v-if="item.encryption_key"></span>
|
<span class="icon iconfont signal"></span>
|
<span class="icon iconfont more-icon"></span>
|
</div>
|
</div>
|
|
<el-button type="text" @click="wirelessScan" :loading="wifiScanning">扫描无线网络</el-button>
|
</div>
|
<div class="wifi-detail" v-if="activePage == 1 && inWifiDetail" ref="ipvHolder">
|
<div class="title">无线网络</div>
|
<div class="general-box">
|
<!-- <div class="in-title">通用</div> -->
|
|
<el-form :model="selectedWifi" ref="wifiForm" class="join-form">
|
<el-form-item prop="name">
|
<div class="p-title">名称</div>
|
<!-- <div class="wifi-name">{{ 12123 }}</div> -->
|
<el-input v-model="selectedWifi.essid" placeholder="" size="small"></el-input>
|
</el-form-item>
|
|
<el-form-item prop="password">
|
<div class="p-title">密码</div>
|
<el-input value="******" v-if="selectedWifi.connected"></el-input>
|
<el-input
|
v-model="selectedWifi.password"
|
placeholder="请输入密码"
|
size="small"
|
show-password
|
v-else
|
></el-input>
|
</el-form-item>
|
</el-form>
|
</div>
|
|
<!-- <switchBar :barName="`高级设置`" :value="isHighClass"></switchBar> -->
|
|
<!-- wifi已连接的情况下显示ip信息 -->
|
<div class="general-box fold" :class="{ hidden: IPV4_hid }" v-show="selectedWifi.connected">
|
<div class="in-title">
|
IPV4
|
<span class="icon iconfont icon-fold" @click="toggleFold('IPV4_hid')"></span>
|
</div>
|
|
<el-form :model="wirelessForm" ref="wirelessForm">
|
<el-form-item>
|
<div class="p-title">方法</div>
|
<el-select
|
v-model="wifiProto"
|
placeholder="请选择"
|
size="small"
|
:popper-append-to-body="false"
|
:disabled="wifiProto == 'dhcp'"
|
>
|
<el-option
|
v-for="item in options"
|
:key="item.value"
|
:label="item.label"
|
:value="item.value"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item prop="ip">
|
<div class="p-title">IP</div>
|
<ip-input
|
:ip="wirelessForm.ip"
|
@on-blur="wirelessForm.ip = arguments[0]"
|
:disabled="wifiProto == 'dhcp'"
|
></ip-input>
|
</el-form-item>
|
<el-form-item prop="subMask">
|
<div class="p-title">子网掩码</div>
|
<ip-input
|
:ip="wirelessForm.subMask"
|
@on-blur="wirelessForm.subMask = arguments[0]"
|
:disabled="wifiProto == 'dhcp'"
|
></ip-input>
|
</el-form-item>
|
|
<el-form-item prop="gateway">
|
<div class="p-title">网关</div>
|
<ip-input
|
:ip="wirelessForm.gateway"
|
@on-blur="wirelessForm.gateway = arguments[0]"
|
:disabled="wifiProto == 'dhcp'"
|
></ip-input>
|
</el-form-item>
|
<el-form-item prop="dns">
|
<div class="p-title">首选DNS</div>
|
<ip-input
|
:ip="wirelessForm.dns1"
|
@on-blur="wirelessForm.dns1 = arguments[0]"
|
:disabled="wifiProto == 'dhcp'"
|
></ip-input>
|
</el-form-item>
|
<el-form-item prop="dns">
|
<div class="p-title">备用DNS</div>
|
<ip-input
|
:ip="wirelessForm.dns2"
|
@on-blur="wirelessForm.dns2 = arguments[0]"
|
:disabled="wifiProto == 'dhcp'"
|
></ip-input>
|
</el-form-item>
|
</el-form>
|
</div>
|
|
<div class="btns">
|
<div class="cancel" @click="inWifiDetail = false">取消</div>
|
<div class="ok" v-if="selectedWifi.connected" @click="disconectedWifi">断开连接</div>
|
<div class="ok" v-else @click="saveWifi">保存</div>
|
</div>
|
</div>
|
|
<div class="wire" v-if="activePage == 2 && !inWireDetail">
|
<div class="title">有线网络</div>
|
<div class="wire-bar" v-for="(item, i) in wireArr" :key="i" @click.self="checkWire(item)">
|
<div class="name">{{ "网络" + item.index }}</div>
|
|
<div class="right">
|
<span class="icon iconfont good" v-if="item.lower_up && item.active"></span>
|
<span class="icon iconfont bad" v-if="!item.lower_up && item.active"></span>
|
<el-switch
|
v-model="item.active"
|
active-color="#4E94FF"
|
@change="switchNetCard(item)"
|
:width="30"
|
></el-switch>
|
</div>
|
</div>
|
</div>
|
<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>
|
<div class="wifi-name">{{ "网络" + activeWireItem.index }}</div>
|
</el-form-item>
|
<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>
|
<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>
|
<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>
|
<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>
|
<ip-input :ip="wireForm.dns" @on-blur="wireForm.dns = arguments[0]"></ip-input>
|
</el-form-item>
|
</el-form>
|
|
<div class="btns">
|
<div class="cancel" @click="cancelSaveWire">取消</div>
|
<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>
|
</template>
|
|
<script>
|
import {
|
setServerName,
|
getWireList,
|
setNetWorkCard,
|
getNetWorkCardInfo,
|
getDevInfo,
|
downNetCard,
|
upNetCard,
|
getWifiList,
|
connectWifi
|
} from "@/api/system"
|
|
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"
|
|
import { isIPv4 } from "@/scripts/validate"
|
|
export default {
|
components: {
|
ipInput,
|
switchBar,
|
WifiGateway,
|
LoraGateway,
|
MqttGateway
|
},
|
filters: {
|
escape(val) {
|
return unescape(val)
|
}
|
},
|
data() {
|
const checkPwd = (rule, value, callback) => {
|
if (!value) {
|
return callback(new Error("密码不能为空"))
|
}
|
setTimeout(() => {
|
if (value.length != 6) {
|
callback(new Error("密码应为6位!"))
|
} else {
|
callback()
|
}
|
}, 1000)
|
}
|
return {
|
isHighClass: false,
|
ruleForm: {
|
deviceName: "",
|
port: ""
|
},
|
wireArr: [],
|
inWifiDetail: false,
|
selectedWifi: {},
|
wifiList: [],
|
wifiScanning: false,
|
isOpenWifi: false,
|
wifiIfname: "",
|
inWireDetail: false,
|
wireForm: {
|
dns: "",
|
subMask: "",
|
gateway: "",
|
ip: ""
|
},
|
originalConfig: {},
|
wireFormRules: {
|
ip: [
|
{
|
required: true,
|
message: "请输入IP地址",
|
trigger: "change"
|
},
|
{ validator: isIPv4, trigger: "change" }
|
],
|
|
gateway: [
|
{
|
required: true,
|
message: "请输入网关",
|
trigger: "change"
|
},
|
{ validator: isIPv4, trigger: "change" }
|
],
|
dns: [
|
{
|
required: true,
|
message: "请输入dns地址",
|
trigger: "change"
|
},
|
{ validator: isIPv4, trigger: "change" }
|
],
|
|
subMask: [
|
{
|
required: true,
|
message: "请输入子网掩码",
|
trigger: "change"
|
},
|
{ validator: isIPv4, trigger: "change" }
|
]
|
},
|
activePage: 0,
|
activeWireItem: {},
|
rules: {
|
deviceName: [{ required: true, message: "请输入设备名称", trigger: "change" }]
|
},
|
wirelessForm: {},
|
ipv6Form: {},
|
ipv4FormRules: {},
|
tabList: [
|
{ name: "网络设置", icon: "\ue6dd" },
|
{ name: "无线网络", icon: "\uea13" },
|
{ name: "有线网络", icon: "\ue73b" },
|
{ name: "WiFi网关", icon: "\ue73b" },
|
{ name: "LORA网关", icon: "\ue73b" },
|
{ name: "MQTT网关", icon: "\ue73b" }
|
],
|
ipv6FormRules: {},
|
options: [
|
{
|
value: "dhcp",
|
label: "自动"
|
},
|
{
|
value: "static",
|
label: "手动"
|
}
|
],
|
wifiProto: "dhcp",
|
IPV4_hid: true,
|
IPV6_hid: false,
|
configLoading: false
|
}
|
},
|
mounted() {
|
this.getCurServer()
|
this.fetchWireList()
|
},
|
methods: {
|
wirelessScan() {
|
this.wifiList = []
|
this.wifiScanning = true
|
getWifiList({ ifname: this.wifiIfname })
|
.then((rsp) => {
|
if (rsp && rsp.success) {
|
this.wifiList = rsp.data.filter((e) => {
|
return e.essid != ""
|
})
|
}
|
|
this.wifiScanning = false
|
})
|
.catch(() => {
|
this.wifiScanning = false
|
})
|
},
|
minusPrefix() {
|
this.ipv6Form.prefix
|
},
|
switchNetCard(item) {
|
if (item.active) {
|
upNetCard({ ifname: item.name }).then(
|
(res) => {
|
if (res.success) {
|
this.$message.success(res.data)
|
this.fetchWireList()
|
}
|
},
|
(err) => {
|
item.active = false
|
this.$message.error(err.msg)
|
}
|
)
|
} else {
|
downNetCard({ ifname: item.name }).then(
|
(res) => {
|
if (res.success) {
|
this.$message.success(res.data)
|
this.fetchWireList()
|
}
|
},
|
(err) => {
|
item.active = true
|
this.$message.error(err.msg)
|
}
|
)
|
}
|
},
|
getCurServer() {
|
getDevInfo().then((res) => {
|
this.ruleForm.deviceName = res.data.server_name
|
this.ruleForm.port = res.data.server_port
|
})
|
},
|
fetchWireList() {
|
getWireList().then((res) => {
|
if (res && res.success) {
|
this.wireArr = res.data
|
|
// 过滤网络接口状态
|
this.wireArr.forEach((x) => {
|
let t = x.flags.split("|")[0] == "up"
|
this.$set(x, "active", t)
|
|
if (x.wireless) {
|
this.wifiIfname = x.name
|
}
|
})
|
|
// 过滤掉wifi接口
|
this.wireArr = res.data.filter((e) => {
|
return !e.wireless
|
})
|
}
|
})
|
},
|
cancelSaveWire() {
|
this.inWireDetail = false
|
this.wireForm.ip = ""
|
this.wireForm.gateway = ""
|
this.wireForm.dns = ""
|
this.wireForm.subMask = ""
|
this.originalConfig = this.wireForm
|
},
|
saveServerName() {
|
setServerName({
|
server_name: this.ruleForm.deviceName,
|
server_port: this.ruleForm.port
|
}).then((res) => {
|
if (res && res.success) {
|
this.$message.success(res.data)
|
}
|
})
|
},
|
openRight(i) {
|
if (i == 0) {
|
this.ruleForm.deviceName = ""
|
this.ruleForm.port = ""
|
this.getCurServer()
|
}
|
if (i == 1) {
|
this.inWifiDetail = false
|
this.wirelessScan()
|
}
|
this.activePage = i
|
},
|
saveWire(ifname) {
|
this.$refs["wireForm"].validate((valid) => {
|
if (valid) {
|
let data = {
|
ip: this.wireForm.ip,
|
gateway: this.wireForm.gateway,
|
dns: this.wireForm.dns,
|
subMask: this.wireForm.subMask,
|
ifname: this.activeWireItem.name
|
}
|
|
let newUri = location.protocol + "//" + data.ip + (location.port == 80 ? "" : ":" + location.port)
|
|
this.$confirm("确认需要修改服务器配置吗?", {
|
center: true,
|
cancelButtonClass: "comfirm-class-cancle",
|
confirmButtonClass: "comfirm-class-sure"
|
})
|
.then(() => {
|
this.configLoading = true
|
if (this.wireForm.ip !== this.originalConfig.ip) {
|
this.configLoading = false
|
console.log("set time out")
|
var changeIPTimer = setTimeout(() => {
|
this.$alert(
|
'<strong>您已修改了服务器ip, 请重新登录</strong><a target="_parent" href="' +
|
newUri +
|
'"> ' +
|
newUri +
|
"<a/>",
|
"提示",
|
{
|
dangerouslyUseHTMLString: true,
|
customClass: "noticeBox"
|
}
|
)
|
}, 10000)
|
}
|
|
setNetWorkCard(data)
|
.then((rsp) => {
|
this.configLoading = false
|
if (rsp && rsp.success) {
|
this.$notify({
|
type: "success",
|
message: "服务器配置成功"
|
})
|
}
|
})
|
.catch((err) => {})
|
this.$message({
|
message: "操作完成,请稍后",
|
type: "success"
|
})
|
})
|
.catch((err) => {})
|
} else {
|
return false
|
}
|
})
|
},
|
wifiControl(val) {},
|
checkWifi(item) {
|
this.inWifiDetail = true
|
this.selectedWifi = item
|
getNetWorkCardInfo({
|
ifname: this.wifiIfname
|
}).then((res) => {
|
if (res && res.success) {
|
this.wirelessForm.ip = res.data.ip
|
this.wirelessForm.gateway = res.data.gateway
|
this.wirelessForm.dns = res.data.dns
|
this.wirelessForm.subMask = res.data.subMask
|
}
|
})
|
},
|
openWireDetail(item) {
|
this.inWireDetail = true
|
this.activeWireItem = item
|
getNetWorkCardInfo({
|
ifname: item.name
|
}).then(
|
(res) => {
|
if (res && res.success) {
|
this.wireForm.ip = res.data.ip
|
this.wireForm.gateway = res.data.gateway
|
this.wireForm.dns = res.data.dns
|
this.wireForm.subMask = res.data.subMask
|
this.originalConfig = JSON.parse(JSON.stringify(this.wireForm))
|
}
|
},
|
(err) => {
|
this.$message.error("查找不到数据: " + err.msg)
|
}
|
)
|
},
|
checkWire(item) {
|
if (item.addrs) {
|
this.openWireDetail(item)
|
return
|
}
|
this.$confirm("您还未配置网络信息,是否现在配置?", "提示", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning",
|
customClass: "confirmBox"
|
}).then(() => {
|
this.openWireDetail(item)
|
})
|
},
|
toggleFold(tog) {
|
const demo = this.$refs.ipvHolder
|
if (!(this.IPV4_hid && !this.IPV6_hid)) {
|
setTimeout(() => {
|
demo.scrollIntoView({
|
block: "end",
|
inline: "nearest",
|
behavior: "smooth"
|
})
|
}, 300)
|
}
|
this[tog] = !this[tog]
|
},
|
disconectedWifi() {
|
let param = {
|
ifname: this.wifiIfname,
|
ssid: "del",
|
passwd: ""
|
}
|
|
this.configLoading = true
|
connectWifi(param)
|
.then((rsp) => {
|
if (rsp && rsp.success) {
|
this.$message.success("配置成功")
|
} else {
|
this.$message.error("配置失败")
|
}
|
|
this.configLoading = false
|
this.wirelessScan()
|
})
|
.catch(() => {
|
this.configLoading = false
|
})
|
},
|
saveWifi() {
|
let param = {
|
ifname: this.wifiIfname,
|
ssid: this.selectedWifi.essid,
|
passwd: this.selectedWifi.password
|
}
|
|
if (this.selectedWifi.password.length < 8) {
|
this.$message.warning("密码不能少于8位")
|
return
|
}
|
|
this.configLoading = true
|
connectWifi(param)
|
.then((rsp) => {
|
if (rsp && rsp.success) {
|
this.$message.success("配置成功")
|
} else {
|
this.$message.error("配置失败")
|
}
|
|
this.configLoading = false
|
this.wirelessScan()
|
})
|
.catch(() => {
|
this.configLoading = false
|
})
|
}
|
},
|
computed: {
|
showStatus() {
|
return this.wireArr.some((item) => item.lower_up == true)
|
}
|
}
|
}
|
</script>
|
<style lang="scss">
|
.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;
|
}
|
.btns {
|
display: flex;
|
justify-content: space-between;
|
.cancel {
|
background-color: rgba(240, 240, 240, 1);
|
height: 40px;
|
line-height: 40px;
|
width: 48%;
|
border-radius: 10px;
|
}
|
.ok {
|
background-color: rgba(61, 104, 225, 1);
|
height: 40px;
|
line-height: 40px;
|
width: 48%;
|
color: #fff;
|
border-radius: 10px;
|
}
|
}
|
}
|
.net-set {
|
// max-width: 456px;
|
margin: 0 auto;
|
.title {
|
font-size: 16px;
|
margin-bottom: 10px;
|
height: 30px;
|
line-height: 30px;
|
}
|
.el-input--small .el-input__inner {
|
height: 35px;
|
line-height: 35px;
|
background-color: rgba(240, 240, 240, 1);
|
border: none;
|
}
|
.el-input__inner::placeholder {
|
color: rgba(134, 134, 134, 1);
|
}
|
}
|
.net-content {
|
height: 100%;
|
display: flex;
|
flex-direction: row;
|
flex: 1;
|
flex-basis: auto;
|
box-sizing: border-box;
|
background-color: #fbfaff;
|
.net-center {
|
height: 100%;
|
width: 300px;
|
overflow: auto;
|
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 {
|
height: 56px;
|
margin-bottom: 4px;
|
border-radius: 8px;
|
line-height: 56px;
|
box-sizing: border-box;
|
font-size: 14px;
|
cursor: pointer;
|
padding: 0 20px;
|
display: flex;
|
justify-content: space-between;
|
|
&:hover {
|
background: #f2f2f7;
|
}
|
|
.item-left {
|
display: flex;
|
align-items: center;
|
}
|
.icon {
|
margin-right: 8px;
|
font-size: 23px;
|
}
|
.text {
|
font-weight: bold;
|
font-size: 16px;
|
}
|
}
|
.menu-item-active {
|
background-color: var(--colorCard) !important;
|
color: #ffffff;
|
}
|
}
|
.net-right {
|
flex: 1;
|
flex-basis: auto;
|
overflow: auto;
|
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: #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,
|
.el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label:before {
|
display: none;
|
}
|
.el-select {
|
width: 100%;
|
}
|
.el-form-item {
|
margin-bottom: 14px;
|
}
|
.el-form-item__content {
|
line-height: 48px;
|
display: flex;
|
align-items: center;
|
background: #f2f2f7;
|
border-radius: 8px;
|
padding: 0 15px 0 20px;
|
.el-input.is-active .el-input__inner,
|
.el-input__inner:focus {
|
border: 2px solid #409eff !important;
|
}
|
.el-select-dropdown__item {
|
color: #4f4f4f;
|
height: 32px;
|
font-size: 12px;
|
line-height: 32px;
|
text-align: center;
|
}
|
.el-popper {
|
margin-top: 0;
|
background: #fbfaff;
|
box-shadow: 0px 2px 6px rgb(0 0 0 / 18%);
|
border-radius: 2px;
|
.el-select-dropdown__item.hover,
|
.el-select-dropdown__item:hover {
|
background-color: #f2f2f7;
|
color: #4e94ff;
|
}
|
}
|
}
|
.el-form-item__error {
|
line-height: 0.7;
|
left: 20px;
|
}
|
.p-title {
|
height: 48px;
|
text-align: left;
|
line-height: 48px;
|
width: 90px;
|
font-weight: 600;
|
}
|
.el-form-item {
|
.el-input__inner {
|
background-color: #ffffff;
|
border: 2px solid transparent;
|
border-radius: 20px;
|
height: 32px !important;
|
padding: 0 15px;
|
font-size: 14px;
|
line-height: 32px;
|
font-weight: bold;
|
}
|
.el-input__inner::placeholder {
|
color: #c0c4cc;
|
font-size: 12px;
|
font-weight: normal;
|
}
|
.el-select {
|
width: 100%;
|
}
|
.el-select .el-input .el-select__caret {
|
color: #4f4f4f;
|
font-size: 14px;
|
font-weight: 600;
|
}
|
}
|
.ip-input-container {
|
max-width: none !important;
|
}
|
.wifi-set {
|
// max-width: 456px;
|
margin: 0 auto;
|
.switch-bar {
|
background: #f2f2f7;
|
padding: 0 20px;
|
}
|
.switch-bar .name {
|
font-size: 14px;
|
color: #4f4f4f;
|
font-weight: bold;
|
}
|
.wifi-option {
|
height: 48px;
|
line-height: 48px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
box-sizing: border-box;
|
padding: 0 20px;
|
margin-bottom: 4px;
|
background: #f2f2f7;
|
border-radius: 8px;
|
cursor: pointer;
|
.name {
|
font-size: 14px;
|
color: #4f4f4f;
|
font-weight: bold;
|
.icon {
|
color: #4e94ff;
|
margin-right: 8px;
|
font-size: 16px;
|
}
|
}
|
.more-detail {
|
display: flex;
|
align-items: center;
|
.signal {
|
margin-right: 10px;
|
font-size: 20px;
|
}
|
.lock {
|
font-size: 20px;
|
margin-right: 10px;
|
}
|
.more-icon {
|
font-weight: bold;
|
cursor: pointer;
|
}
|
}
|
}
|
}
|
.wifi-detail {
|
// max-width: 454px;
|
margin: 0 auto;
|
transition: all 0.3s linear 0s;
|
.general-box {
|
overflow: hidden;
|
transition: all 0.3s linear 0s;
|
background: #f2f2f7;
|
border-radius: 8px;
|
padding-bottom: 10px;
|
margin-bottom: 20px;
|
&.fold {
|
height: 342px;
|
|
.in-title {
|
display: flex;
|
justify-content: space-between;
|
}
|
|
.icon-fold {
|
display: inline-block;
|
font-size: 14px;
|
transition: all 0.3s linear 0s;
|
cursor: pointer;
|
}
|
}
|
&.hidden {
|
height: 34px;
|
.icon-fold {
|
transform: rotate(180deg);
|
}
|
}
|
.el-form-item {
|
margin-bottom: 0px;
|
}
|
.in-title {
|
text-align: left;
|
padding: 14px 20px;
|
font-weight: bold;
|
font-size: 14px;
|
color: #4f4f4f;
|
}
|
.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;
|
}
|
}
|
.switch-bar {
|
margin-bottom: 0;
|
}
|
.switch-bar .name {
|
font-size: 14px;
|
color: #4f4f4f;
|
font-weight: bold;
|
}
|
.btns {
|
margin-top: 0;
|
display: flex;
|
justify-content: space-between;
|
margin-bottom: 4px;
|
.cancel {
|
width: 218px;
|
}
|
.ok {
|
width: 218px;
|
}
|
}
|
.wifi-name {
|
height: 48px;
|
background-color: #f0f0f0;
|
text-align: left;
|
box-sizing: border-box;
|
padding: 0 10px;
|
|
line-height: 48px;
|
}
|
.ad {
|
height: 32px;
|
text-align: center;
|
font-size: 17px;
|
margin-left: 10px;
|
cursor: pointer;
|
}
|
}
|
.wire {
|
.wire-bar {
|
height: 48px;
|
background-color: #f2f2f7;
|
cursor: pointer;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
box-sizing: border-box;
|
padding: 0 20px;
|
margin-bottom: 4px;
|
border-radius: 8px;
|
.name {
|
font-size: 15px;
|
font-weight: bold;
|
font-size: 14px;
|
color: #4f4f4f;
|
}
|
.right {
|
display: flex;
|
align-items: center;
|
.el-switch__core {
|
height: 14px;
|
}
|
.el-switch.is-checked .el-switch__core::after {
|
left: 100%;
|
margin-left: -12px;
|
}
|
|
.el-switch.is-checked .el-switch__core {
|
background-color: var(--colorCard) !important;
|
border-color: var(--colorCard) !important;
|
}
|
|
.el-switch__core:after {
|
content: "";
|
position: absolute;
|
top: 0px;
|
left: 1px;
|
border-radius: 100%;
|
-webkit-transition: all 0.3s;
|
transition: all 0.3s;
|
width: 12px;
|
height: 12px;
|
background-color: #fff;
|
}
|
.icon {
|
margin-right: 15px;
|
}
|
.good {
|
color: var(--colorCard);
|
font-size: 16px;
|
}
|
.bad {
|
color: #f44620;
|
font-size: 16px;
|
}
|
}
|
}
|
.wifi-name {
|
height: 40px;
|
background-color: #f0f0f0;
|
text-align: left;
|
box-sizing: border-box;
|
padding: 0 20px;
|
}
|
}
|
}
|
}
|
.noticeBox p {
|
text-align: center;
|
}
|
|
.confirmBox {
|
text-align: center;
|
|
p {
|
text-align: center;
|
}
|
|
.el-message-box__status.el-icon-warning {
|
margin-left: 75px;
|
}
|
}
|
</style>
|