InternetCompetition/src/components/ChiGatewifi.vue

229 lines
5.3 KiB
Vue

<!-- 斥候无线数据采集网关配置 -->
<template>
<div>
<!-- <el-button type="info" plain @click="getShow">斥候数据采集网关配置</el-button> -->
<div class="gateway" v-show="isShow">
<div class="title">
<p class="title_l">新建网关</p>
<i class="el-icon-close title_r" @click="isShow = false"></i>
</div>
<el-divider></el-divider>
<div class="content">
<el-form :label-position="labelPosition" :rules="rules" ref="ruleForm">
<el-row>
<el-col :span="24">
<el-form-item
label="网关名称:"
:label-width="formLabelWidth"
prop="wgpz_wgmc"
>
<el-select
v-model="wgpz_wgmc"
placeholder="请选择"
style="width: 200px"
>
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item
label="网关ID:"
:label-width="formLabelWidth"
prop="wgpz_wgid"
>
<el-select
v-model="wgpz_wgid"
placeholder="请选择"
style="width: 200px"
>
<el-option
v-for="item in options2"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<div class="footer">
<el-button type="primary" @click="innerVisible = true"
>保 存</el-button
>
<el-button @click="isShow = false">取 消</el-button>
</div>
</el-form>
</div>
</div>
<div>
<el-dialog
title="系统提示"
:visible.sync="innerVisible"
append-to-body
width="382px"
>
<p class="inner_content" style="color: #fff">
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
</p>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="innerVisible = false"
>确定</el-button
>
<el-button @click="innerVisible = false"> </el-button>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
export default {
name: "TestChiGate",
data() {
return {
options1: [
{
value: "有线区网关2",
label: "有线区网关2",
},
{
value: "无线区网关2",
label: "无线区网关2",
},
],
options2: [
{
value: "LAN-BOX2",
label: "LAN-BOX2",
},
{
value: "WLAN-BOX2",
label: "WLAN-BOX2",
},
],
wgpz_wgmc: "有线区网关2",
wgpz_wgid: "LAN-BOX2",
innerVisible: false,
labelPosition: "left",
formLabelWidth: "96px",
count: 0,
isShow: true,
options: [
{
value: "选项1",
label: "测试1",
},
{
value: "选项2",
label: "测试2",
},
{
value: "选项3",
label: "测试3",
},
{
value: "选项4",
label: "测试4",
},
{
value: "选项5",
label: "测试5",
},
],
rules: {
gateway_id: [
{ required: true, message: "请输入网关ID", trigger: "blur" },
],
gateway_name: [
{ required: true, message: "请输入网关名称", trigger: "blur" },
],
},
};
},
mounted() {},
methods: {
// getShow() {
// this.count++;
// if (this.count % 2 == 0) {
// this.isShow = false;
// } else {
// this.isShow = true;
// }
// }
},
};
</script>
<style lang="less" scoped>
/deep/ .gateway {
position: absolute;
left: 694px;
top: 188px;
width: 382px;
height: 309px;
line-height: 20px;
// background-color: rgba(255, 255, 255, 1);
background: url(../assets/image/bg.png);
background-size: 100% 100%;
text-align: center;
border: 1px solid rgba(187, 187, 187, 1);
.el-divider--horizontal {
margin: 8px 0;
}
.title {
margin: 13px 11px 0px 21px;
display: flex;
justify-content: space-between;
.title_l {
width: 72px;
height: 26px;
color: rgba(16, 16, 16, 1);
font-size: 18px;
text-align: left;
}
.title_r {
width: 24px;
height: 24px;
cursor: pointer;
color: rgba(111, 103, 103, 1);
}
}
.content {
margin-left: 50px;
margin-right: 50px;
.el-input__inner {
width: 200px;
height: 30px;
}
}
/deep/ .footer {
.el-button {
width: 80px;
height: 30px;
line-height: 0.5;
}
}
}
</style>