| | |
| | |
|
| | | <div class="more-detail">
|
| | | <span class="icon iconfont"></span>
|
| | | <span |
| | | <span
|
| | | class="icon iconfont"
|
| | | style="margin-left:10px;cursor:pointer;"
|
| | | style="margin-left: 10px; cursor: pointer"
|
| | | @click="checkWifi(item)"
|
| | | ></span
|
| | | >
|
| | |
| | | <span class="icon iconfont"></span>
|
| | |
|
| | | <el-switch
|
| | | v-model="value"
|
| | | v-model="item.active"
|
| | | active-color="rgba(61, 104, 225, 1)"
|
| | | @change="switchChange"
|
| | | @change="switchNetCard"
|
| | | >
|
| | | </el-switch>
|
| | | </div>
|
| | |
|
| | |
|
| | | |
| | | </div>
|
| | | </div>
|
| | | <div
|
| | |
| | | getDevInfo,
|
| | | } from "@/api/system";
|
| | |
|
| | | import cloudNode from "../components/CloudNode";
|
| | | // import cloudNode from "../components/CloudNode";
|
| | | import ipInput from "@/components/subComponents/IPInput";
|
| | | import { isIPv4 } from "@/scripts/validate";
|
| | | import switchBar from "../components/switchBar";
|
| | |
| | | },
|
| | | ],
|
| | | value: "",
|
| | | netCardValue: "",
|
| | | };
|
| | | },
|
| | | components: {
|
| | | cloudNode,
|
| | | // cloudNode,
|
| | | ipInput,
|
| | | switchBar,
|
| | | },
|
| | |
| | | beforeDestroy() {},
|
| | | props: ["barName"],
|
| | | methods: {
|
| | | // parseFlags(flags) {
|
| | | // let arr = flags.split("|");
|
| | | // if (arr.length) {
|
| | | // return arr[0] == "up";
|
| | | // }
|
| | | // return false;
|
| | | // },
|
| | | getCurServer() {
|
| | | getDevInfo().then((res) => {
|
| | | this.ruleForm.deviceName = res.data.server_name;
|
| | |
| | | fetchWireList() {
|
| | | getWireList().then((res) => {
|
| | | if (res && res.success) {
|
| | | this.wireArr = res.data;
|
| | | this.wireArr = res.data
|
| | | .filter((x) => x.wireless == false)
|
| | | .map((itm) => {
|
| | | let arr = itm.flags.split("|");
|
| | | let f = false;
|
| | | if (arr.length) {
|
| | | f = arr[0] == "up";
|
| | | }
|
| | | return {
|
| | | flags: itm.flags,
|
| | | index: itm.index,
|
| | | mtu:itm.mtu,
|
| | | name: itm.name,
|
| | | wireless: itm.wireless,
|
| | | active:f
|
| | | }
|
| | | });
|
| | | }
|
| | | });
|
| | | },
|
| | | cancelSaveWire() {
|
| | | this.inWireDetail = false;
|
| | | this.wireForm.ip = '';
|
| | | this.wireForm.gateway = '';
|
| | | this.wireForm.dns = '';
|
| | | this.wireForm.subMask = '';
|
| | | this.wireForm.ip = "";
|
| | | this.wireForm.gateway = "";
|
| | | this.wireForm.dns = "";
|
| | | this.wireForm.subMask = "";
|
| | | },
|
| | | saveServerName() {
|
| | | setServerName({
|
| | |
| | | this.$refs["leftbar"][i].style.color = "white";
|
| | | },
|
| | | saveWire(ifname) {
|
| | | debugger;
|
| | | let data = {
|
| | | ip: this.wireForm.ip,
|
| | | gateway: this.wireForm.gateway,
|
| | |
| | | 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;
|
| | | }).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;
|
| | | }
|
| | | },
|
| | | (err) => {
|
| | | this.$message.error("查找不到数据: " + err.msg);
|
| | | }
|
| | | },(err) => {
|
| | | this.$message.error("查找不到数据: "+err.msg)
|
| | | });
|
| | | );
|
| | | },
|
| | | },
|
| | | };
|