This commit is contained in:
parent
466e58e82b
commit
131835201a
|
@ -1,5 +1,5 @@
|
|||
export let answer = {
|
||||
kqwk: "",
|
||||
wkgzfs: "",
|
||||
wkms: "",
|
||||
kqwk: "1",
|
||||
wkgzfs: "2",
|
||||
wkms: "3",
|
||||
};
|
||||
|
|
|
@ -51,96 +51,46 @@
|
|||
</el-col>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="入口网关:" prop="clgl_rkwg1">
|
||||
<el-form-item label="入口网关" prop="clgl_rkwg">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkwg1"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
<el-input v-model="ruleForm1.clgl_rkwg1"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">. </el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_rkwg2">
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkwg2"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
<el-input v-model="ruleForm1.clgl_rkwg2"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_rkwg3">
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkwg3"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
<el-input v-model="ruleForm1.clgl_rkwg3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_rkwg4">
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkwg4"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
<el-input v-model="ruleForm1.clgl_rkwg4"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="出口网关" prop="clgl_ckwg">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="出口网关:" prop="clgl_ckwg1">
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckwg1"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
<el-input v-model="ruleForm1.clgl_ckwg1"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">. </el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_ckwg2">
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckwg2"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
<el-input v-model="ruleForm1.clgl_ckwg2"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_ckwg3">
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckwg3"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
<el-input v-model="ruleForm1.clgl_ckwg3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_ckwg4">
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckwg4"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
<el-input v-model="ruleForm1.clgl_ckwg4"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
@ -214,114 +164,69 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="目的对象:" prop="clgl_mddx">
|
||||
<el-col :span="19">
|
||||
<el-input v-model="ruleForm1.clgl_mddx"></el-input>
|
||||
<el-select v-model="ruleForm1.clgl_mddx">
|
||||
<el-option
|
||||
label="数采服务器"
|
||||
value="数采服务器"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="入口IP:" prop="clgl_rkip1">
|
||||
<el-form-item label="入口IP" prop="clgl_rkip">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkip1"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
<el-input v-model="ruleForm1.clgl_rkip1"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">. </el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_rkip2">
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkip2"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
<el-input v-model="ruleForm1.clgl_rkip2"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_rkip3">
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkip3"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
<el-input v-model="ruleForm1.clgl_rkip3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_rkip4">
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_rkip4"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
<el-input v-model="ruleForm1.clgl_rkip4"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="出口IP" prop="clgl_ckip">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="出口IP:" prop="clgl_ckip1">
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckip1"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
<el-input v-model="ruleForm1.clgl_ckip1"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">. </el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_ckip2">
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckip2"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
<el-input v-model="ruleForm1.clgl_ckip2"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_ckip3">
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckip3"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
<el-input v-model="ruleForm1.clgl_ckip3"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="" prop="clgl_ckip4">
|
||||
<el-col :span="5">
|
||||
<el-input
|
||||
v-model="ruleForm1.clgl_ckip4"
|
||||
:maxlength="3"
|
||||
></el-input>
|
||||
<el-input v-model="ruleForm1.clgl_ckip4"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="1">.</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="代理端口:" prop="clgl_dldk">
|
||||
<el-col :span="19">
|
||||
<el-input v-model="ruleForm1.clgl_dldk"> </el-input>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="目的端口:" prop="clgl_mddk">
|
||||
<el-col :span="19">
|
||||
<el-input v-model="ruleForm1.clgl_mddk"> </el-input>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="代理端口:" prop="clgl_dldk">
|
||||
<el-col :span="19">
|
||||
<el-input v-model="ruleForm1.clgl_dldk"> </el-input>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="未定义命令:" prop="clgl_wdyml">
|
||||
<el-col :span="19">
|
||||
<el-select
|
||||
|
@ -491,8 +396,8 @@ export default {
|
|||
clgl_qidong: true,
|
||||
options1: [
|
||||
{
|
||||
label: "有线区策略",
|
||||
value: "有线区策略",
|
||||
label: "",
|
||||
value: "",
|
||||
},
|
||||
{
|
||||
label: "无线区策略",
|
||||
|
@ -650,19 +555,19 @@ export default {
|
|||
// },
|
||||
],
|
||||
ruleForm1: {
|
||||
clgl_name: "有线区策略",
|
||||
clgl_xy: ["Modbus(TCP)"],
|
||||
clgl_gzms: "透明模式",
|
||||
clgl_ydx: "有线区交换机",
|
||||
clgl_name: "",
|
||||
clgl_xy: [],
|
||||
clgl_gzms: "",
|
||||
clgl_ydx: "",
|
||||
clgl_ydk: "",
|
||||
clgl_mddx: "数采服务器",
|
||||
clgl_mddx: "",
|
||||
clgl_mddk: "",
|
||||
clgl_rkwg: "",
|
||||
clgl_rkwk: "有线区网闸(内网)",
|
||||
clgl_rkwk: "",
|
||||
clgl_rkip: "",
|
||||
clgl_dldk: "",
|
||||
clgl_ckwg: "",
|
||||
clgl_ckwk: "有线区网闸(外网)",
|
||||
clgl_ckwk: "",
|
||||
clgl_ckip: "",
|
||||
clgl_wdyml: "拒绝",
|
||||
dlport: "",
|
||||
|
@ -707,135 +612,26 @@ export default {
|
|||
clgl_ckwk: [
|
||||
{ required: true, trigger: "change", message: "选择一个出口网卡" },
|
||||
],
|
||||
clgl_rkip1: [
|
||||
{ required: true, trigger: "blur", message: "片段为空" },
|
||||
clgl_rkip: [
|
||||
{
|
||||
message: "片段无效",
|
||||
required: true,
|
||||
validator: this.validateIpAddress,
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[1-9][0-9]?)$/,
|
||||
},
|
||||
],
|
||||
clgl_rkip2: [
|
||||
{ required: true, trigger: "blur", message: "片段为空" },
|
||||
{
|
||||
message: "片段无效",
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
|
||||
},
|
||||
],
|
||||
clgl_rkip3: [
|
||||
{ required: true, trigger: "blur", message: "片段为空" },
|
||||
{
|
||||
message: "片段无效",
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
|
||||
},
|
||||
],
|
||||
clgl_rkip4: [
|
||||
{ required: true, trigger: "blur", message: "片段为空" },
|
||||
{
|
||||
message: "片段无效",
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
|
||||
message: "",
|
||||
},
|
||||
],
|
||||
|
||||
clgl_ckip1: [
|
||||
{ required: true, trigger: "blur", message: "片段为空" },
|
||||
clgl_ckip: [
|
||||
{
|
||||
message: "片段无效",
|
||||
required: true,
|
||||
validator: this.validateIpAddress1,
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[1-9][0-9]?)$/,
|
||||
},
|
||||
],
|
||||
clgl_ckip2: [
|
||||
{ required: true, trigger: "blur", message: "片段为空" },
|
||||
{
|
||||
message: "片段无效",
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
|
||||
},
|
||||
],
|
||||
clgl_ckip3: [
|
||||
{ required: true, trigger: "blur", message: "片段为空" },
|
||||
{
|
||||
message: "片段无效",
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
|
||||
},
|
||||
],
|
||||
clgl_ckip4: [
|
||||
{ required: true, trigger: "blur", message: "片段为空" },
|
||||
{
|
||||
message: "片段无效",
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
|
||||
},
|
||||
],
|
||||
clgl_rkwg1: [
|
||||
{ trigger: "blur", message: "片段为空" },
|
||||
{
|
||||
message: "片段无效",
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[1-9][0-9]?)$/,
|
||||
},
|
||||
],
|
||||
clgl_rkwg2: [
|
||||
{ trigger: "blur", message: "片段为空" },
|
||||
{
|
||||
message: "片段无效",
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
|
||||
},
|
||||
],
|
||||
clgl_rkwg3: [
|
||||
{ trigger: "blur", message: "片段为空" },
|
||||
{
|
||||
message: "片段无效",
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
|
||||
},
|
||||
],
|
||||
clgl_rkwg4: [
|
||||
{ trigger: "blur", message: "片段为空" },
|
||||
{
|
||||
message: "片段无效",
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
|
||||
},
|
||||
],
|
||||
clgl_ckwg1: [
|
||||
{ trigger: "blur", message: "片段为空" },
|
||||
{
|
||||
message: "片段无效",
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[1-9][0-9]?)$/,
|
||||
},
|
||||
],
|
||||
clgl_ckwg2: [
|
||||
{ trigger: "blur", message: "片段为空" },
|
||||
{
|
||||
message: "片段无效",
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
|
||||
},
|
||||
],
|
||||
clgl_ckwg3: [
|
||||
{ trigger: "blur", message: "片段为空" },
|
||||
{
|
||||
message: "片段无效",
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
|
||||
},
|
||||
],
|
||||
clgl_ckwg4: [
|
||||
{ trigger: "blur", message: "片段为空" },
|
||||
{
|
||||
message: "片段无效",
|
||||
trigger: "blur",
|
||||
pattern: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
|
||||
message: "",
|
||||
},
|
||||
],
|
||||
clgl_rkwg: [],
|
||||
clgl_ckwg: [],
|
||||
|
||||
clgl_ydx: [
|
||||
{ required: true, trigger: "change", message: "选择一个源对象" },
|
||||
],
|
||||
|
@ -881,6 +677,63 @@ export default {
|
|||
mounted() {},
|
||||
|
||||
methods: {
|
||||
//ip地址验证
|
||||
validateIpAddress(rule, value, callback) {
|
||||
if (
|
||||
this.ruleForm1.clgl_rkip1 +
|
||||
"." +
|
||||
this.ruleForm1.clgl_rkip2 +
|
||||
"." +
|
||||
this.ruleForm1.clgl_rkip3 +
|
||||
"." +
|
||||
this.ruleForm1.clgl_rkip4 ===
|
||||
""
|
||||
) {
|
||||
callback(new Error("请输入IP地址"));
|
||||
} else if (
|
||||
!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(
|
||||
this.ruleForm1.clgl_rkip1 +
|
||||
"." +
|
||||
this.ruleForm1.clgl_rkip2 +
|
||||
"." +
|
||||
this.ruleForm1.clgl_rkip3 +
|
||||
"." +
|
||||
this.ruleForm1.clgl_rkip4
|
||||
)
|
||||
) {
|
||||
callback(new Error("请输入有效的IP地址"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
validateIpAddress1(rule, value, callback) {
|
||||
if (
|
||||
this.ruleForm1.clgl_ckip1 +
|
||||
"." +
|
||||
this.ruleForm1.clgl_ckip2 +
|
||||
"." +
|
||||
this.ruleForm1.clgl_ckip3 +
|
||||
"." +
|
||||
this.ruleForm1.clgl_ckip4 ===
|
||||
""
|
||||
) {
|
||||
callback(new Error("请输入IP地址"));
|
||||
} else if (
|
||||
!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(
|
||||
this.ruleForm1.clgl_ckip1 +
|
||||
"." +
|
||||
this.ruleForm1.clgl_ckip2 +
|
||||
"." +
|
||||
this.ruleForm1.clgl_ckip3 +
|
||||
"." +
|
||||
this.ruleForm1.clgl_ckip4
|
||||
)
|
||||
) {
|
||||
callback(new Error("请输入有效的IP地址"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
//保存
|
||||
async saveAll() {
|
||||
this.$refs["ruleForm1"].validate((valid) => {
|
||||
|
@ -1119,12 +972,4 @@ export default {
|
|||
height: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-form-item__error {
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
/deep/.el-col-1 {
|
||||
height: 10px !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -23,10 +23,6 @@
|
|||
<el-button @click="flag = true">新建网关</el-button>
|
||||
<el-button @click="deleteSelectedRows">删除</el-button>
|
||||
</div>
|
||||
<!-- <div class="right">
|
||||
<el-input type="search" v-model="search"></el-input>
|
||||
<el-button @click="select">筛选</el-button>
|
||||
</div> -->
|
||||
</div>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
|
@ -41,7 +37,7 @@
|
|||
{{ scope.$index + 1 }}
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column type="selection" width="40"> </el-table-column>
|
||||
<el-table-column type="selection"> </el-table-column>
|
||||
<el-table-column prop="wgid" label="网关ID"> </el-table-column>
|
||||
<el-table-column prop="wgbh" label="网关编号"> </el-table-column>
|
||||
<el-table-column prop="wgmc" label="网关名称"> </el-table-column>
|
||||
|
@ -105,8 +101,6 @@
|
|||
<el-option label="2000808011" value="2000808011"></el-option>
|
||||
<el-option label="2000808012" value="2000808012"></el-option>
|
||||
<el-option label="2000808013" value="2000808013"></el-option>
|
||||
<!-- <el-option label="2000808014" value="2000808014"></el-option>
|
||||
<el-option label="2000808015" value="2000808015"></el-option> -->
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
|
@ -117,14 +111,6 @@
|
|||
<el-option label="lan-box2" value="lan-box2"></el-option>
|
||||
<el-option label="wlan-box1" value="wlan-box1"></el-option>
|
||||
<el-option label="wlan-box2" value="wlan-box2"></el-option>
|
||||
<!-- <el-option
|
||||
label="lan- server port"
|
||||
value="lan- server port"
|
||||
></el-option>
|
||||
<el-option
|
||||
label="wlan- server port"
|
||||
value="wlan- server port"
|
||||
></el-option> -->
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
|
@ -135,14 +121,6 @@
|
|||
<el-option label="有线区网关2" value="有线区网关2"></el-option>
|
||||
<el-option label="无线区网关1" value="无线区网关1"></el-option>
|
||||
<el-option label="无线区网关2" value="无线区网关2"></el-option>
|
||||
<!-- <el-option
|
||||
label="有线区串口服务器"
|
||||
value="有线区串口服务器"
|
||||
></el-option>
|
||||
<el-option
|
||||
label="无线区串口服务器"
|
||||
value="无线区串口服务器"
|
||||
></el-option> -->
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
|
@ -220,17 +198,31 @@ export default {
|
|||
});
|
||||
},
|
||||
//删除
|
||||
handleDelete(a, b) {
|
||||
async handleDelete(a, b) {
|
||||
this.wgpz.splice(a, 1);
|
||||
localStorage.setItem("wgpz", JSON.stringify(this.wgpz));
|
||||
this.SaveUserAnswer();
|
||||
let { data } = await SaveUserAnswer({
|
||||
mark: "YDPZYM_wgpz",
|
||||
user_id: `${this.user_id}`,
|
||||
// user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.wgpz),
|
||||
});
|
||||
if (data.state) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
});
|
||||
} else {
|
||||
this.$message.error("保存失败");
|
||||
return;
|
||||
}
|
||||
},
|
||||
//多选
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
//多选删除
|
||||
deleteSelectedRows() {
|
||||
async deleteSelectedRows() {
|
||||
if (this.multipleSelection.length == 0) {
|
||||
this.$message({
|
||||
message: "请先选择数据",
|
||||
|
@ -243,7 +235,21 @@ export default {
|
|||
);
|
||||
this.multipleSelection = [];
|
||||
localStorage.setItem("wgpz", JSON.stringify(this.wgpz));
|
||||
this.SaveUserAnswer();
|
||||
let { data } = await SaveUserAnswer({
|
||||
mark: "YDPZYM_wgpz",
|
||||
user_id: `${this.user_id}`,
|
||||
// user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.wgpz),
|
||||
});
|
||||
if (data.state) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
});
|
||||
} else {
|
||||
this.$message.error("保存失败");
|
||||
return;
|
||||
}
|
||||
},
|
||||
//查看
|
||||
chakan(a, b) {
|
||||
|
@ -255,6 +261,7 @@ export default {
|
|||
let { data } = await GetUserAnswer({
|
||||
mark: "YDPZYM_wgpz",
|
||||
user_id: `${this.user_id}`,
|
||||
// user_id: "USER202307301109254198",
|
||||
});
|
||||
console.log(data.data);
|
||||
if (data.data && data.state) {
|
||||
|
@ -263,18 +270,27 @@ export default {
|
|||
},
|
||||
//保存数据
|
||||
async SaveUserAnswer() {
|
||||
this.wgpz.push({
|
||||
wglx: this.ruleForm.wglx,
|
||||
wgid: this.ruleForm.wgid,
|
||||
wgbh: this.ruleForm.wgbh,
|
||||
wgmc: this.ruleForm.wgmc,
|
||||
});
|
||||
let { data } = await SaveUserAnswer({
|
||||
mark: "YDPZYM_wgpz",
|
||||
user_id: `${this.user_id}`,
|
||||
// user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.wgpz),
|
||||
});
|
||||
if (data.state) {
|
||||
this.wgpz.push(this.ruleForm);
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
});
|
||||
this.flag = true;
|
||||
this.flag = false;
|
||||
for (let key in this.ruleForm) {
|
||||
this.ruleForm[key] = "";
|
||||
}
|
||||
} else {
|
||||
this.$message.error("保存失败");
|
||||
return;
|
||||
|
|
|
@ -262,6 +262,7 @@ export default {
|
|||
let { data } = await GetUserAnswer({
|
||||
mark: "YDPZYM_wgwh",
|
||||
user_id: `${this.user_id}`,
|
||||
// user_id: "USER202307301109254198",
|
||||
});
|
||||
console.log(data);
|
||||
if (data.data && data.state) {
|
||||
|
@ -289,17 +290,30 @@ export default {
|
|||
});
|
||||
},
|
||||
//删除
|
||||
handleDelete(a, b) {
|
||||
async handleDelete(a, b) {
|
||||
this.tableData.splice(a, 1);
|
||||
localStorage.setItem("wgwh", JSON.stringify(this.tableData));
|
||||
this.SaveUserAnswer();
|
||||
let { data } = await SaveUserAnswer({
|
||||
mark: "YDPZYM_wgwh",
|
||||
user_id: this.user_id,
|
||||
// user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.tableData),
|
||||
});
|
||||
if (data.state) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
});
|
||||
} else {
|
||||
this.$message.error("操作失败");
|
||||
}
|
||||
},
|
||||
//多选
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
//多选删除
|
||||
deleteSelectedRows() {
|
||||
async deleteSelectedRows() {
|
||||
if (this.multipleSelection.length == 0) {
|
||||
this.$message({
|
||||
message: "请先选择要删除的数据",
|
||||
|
@ -312,7 +326,20 @@ export default {
|
|||
);
|
||||
this.multipleSelection = [];
|
||||
localStorage.setItem("wgwh", JSON.stringify(this.tableData));
|
||||
this.SaveUserAnswer();
|
||||
let { data } = await SaveUserAnswer({
|
||||
mark: "YDPZYM_wgwh",
|
||||
user_id: this.user_id,
|
||||
// user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.tableData),
|
||||
});
|
||||
if (data.state) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
});
|
||||
} else {
|
||||
this.$message.error("操作失败");
|
||||
}
|
||||
},
|
||||
chakan(a, b) {
|
||||
console.log(b);
|
||||
|
@ -327,15 +354,28 @@ export default {
|
|||
}
|
||||
let { data } = await SaveUserAnswer({
|
||||
mark: "YDPZYM_wgwh",
|
||||
user_id: `${this.user_id}`,
|
||||
user_id: this.user_id,
|
||||
// user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(this.tableData),
|
||||
});
|
||||
if (data.state) {
|
||||
this.tableData.push(this.ruleForm);
|
||||
let obj = {
|
||||
sswg: this.ruleForm.sswg,
|
||||
csname: this.ruleForm.csname,
|
||||
// sfyxbz: "",
|
||||
sdz: this.ruleForm.sdz,
|
||||
cskey: this.ruleForm.cskey,
|
||||
xsws: this.ruleForm.xsws,
|
||||
pcz: this.ruleForm.pcz,
|
||||
};
|
||||
this.tableData.push(obj);
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
});
|
||||
for (let key in this.ruleForm) {
|
||||
this.ruleForm[key] = "";
|
||||
}
|
||||
} else {
|
||||
this.$message.error(data.message);
|
||||
}
|
||||
|
|
|
@ -49,13 +49,14 @@
|
|||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">保存</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<!-- <el-button @click="change">改变</el-button> -->
|
||||
<el-button @click="change">改变</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { SaveUserAnswer, GetUserAnswer } from "@/api/user";
|
||||
import { answer } from "../answerObj";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -68,11 +69,7 @@ export default {
|
|||
wkgzfs: "LAN口",
|
||||
wkms: "n",
|
||||
},
|
||||
// $answerObj: {
|
||||
// kqwk: "",
|
||||
// wkgzfs: "",
|
||||
// wkms: "",
|
||||
// },
|
||||
|
||||
rules: {
|
||||
kqwk: [{ required: true, trigger: "change", message: "必填项" }],
|
||||
wkgzfs: [{ required: true, trigger: "change", message: "必填项" }],
|
||||
|
@ -90,7 +87,7 @@ export default {
|
|||
this.user_id = data;
|
||||
},
|
||||
change() {
|
||||
console.log(this.$answerObj);
|
||||
this.$set(answer, "kqwk", "11111111");
|
||||
},
|
||||
async saveDatas() {
|
||||
let datas = JSON.parse(sessionStorage.getItem("CKFWQ_wx"));
|
||||
|
@ -109,8 +106,6 @@ export default {
|
|||
message: "保存成功",
|
||||
type: "success",
|
||||
});
|
||||
this.dialogVisible = false;
|
||||
console.log({ ...datas, ...this.ruleForm }, "存储");
|
||||
} else {
|
||||
this.$message.error("保存失败");
|
||||
}
|
||||
|
@ -121,7 +116,7 @@ export default {
|
|||
mark: "CKFWQ_wx",
|
||||
user_id: this.user_id,
|
||||
});
|
||||
if (res.data.data && res.data.state) {
|
||||
if (JSON.parse(res.data.data.mark_value) && res.data.state) {
|
||||
var obj = JSON.parse(res.data.data.mark_value);
|
||||
this.ruleForm.kqwk = obj.kqwk;
|
||||
this.ruleForm.wkgzfs = obj.wkgzfs;
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.wlgl_ww_name" placeholder="">
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
v-for="item in options2"
|
||||
:key="item"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
|
@ -205,6 +205,7 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
this.dialogVisible = true;
|
||||
let str = window.location.href.split("?")[1];
|
||||
this.user_id = str.split("|")[0];
|
||||
let type = str.split("|")[1];
|
||||
|
@ -264,7 +265,6 @@ export default {
|
|||
message: "保存成功",
|
||||
type: "success",
|
||||
});
|
||||
this.dialogVisible = false;
|
||||
} else {
|
||||
this.$message.error("保存失败");
|
||||
}
|
||||
|
|
|
@ -132,6 +132,7 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
this.dialogVisible = true;
|
||||
let str = window.location.href.split("?")[1];
|
||||
this.user_id = str.split("|")[0];
|
||||
let type = str.split("|")[1];
|
||||
|
@ -172,17 +173,24 @@ export default {
|
|||
if (this.dxgl.length == 2) {
|
||||
return false;
|
||||
}
|
||||
this.dxgl.push({
|
||||
dx_name: this.ruleForm.dxmc,
|
||||
iplx: this.ruleForm.iplx,
|
||||
ip: this.ip1 + "." + this.ip2 + "." + this.ip3 + "." + this.ip4,
|
||||
});
|
||||
var json = JSON.parse(sessionStorage.getItem(this.$store.state.type));
|
||||
|
||||
// console.log(this.dxgl);
|
||||
let { data } = await SaveUserAnswer({
|
||||
mark: `${this.$store.state.type}`,
|
||||
// mark: "GYWZ_yx",
|
||||
user_id: this.user_id,
|
||||
// user_id: "USER202307301109254198",
|
||||
|
||||
mark_value: JSON.stringify({ ...json, ...{ dxgl: this.dxgl } }),
|
||||
});
|
||||
console.log(data.state);
|
||||
|
||||
if (data.state) {
|
||||
console.log(data.data.mark_value);
|
||||
// console.log(data.data.mark_value);
|
||||
this.dxgl.push({
|
||||
dx_name: this.ruleForm.dxmc,
|
||||
iplx: this.ruleForm.iplx,
|
||||
|
@ -207,7 +215,9 @@ export default {
|
|||
async GetUserAnswer() {
|
||||
let { data } = await GetUserAnswer({
|
||||
mark: `${this.$store.state.type}`,
|
||||
// mark: "GYWZ_yx",
|
||||
user_id: this.user_id,
|
||||
// user_id: "USER202307301109254198",
|
||||
});
|
||||
if (data.state && data.data) {
|
||||
console.log(JSON.parse(data.data.mark_value).dxgl);
|
||||
|
@ -219,10 +229,13 @@ export default {
|
|||
//删除
|
||||
async deleteRow(index, rows) {
|
||||
var json = JSON.parse(sessionStorage.getItem(this.$store.state.type));
|
||||
var json = JSON.parse(sessionStorage.getItem("GYWZ_yx"));
|
||||
this.dxgl.splice(index, 1);
|
||||
let { data } = await SaveUserAnswer({
|
||||
mark: `${this.$store.state.type}`,
|
||||
// mark: "GYWZ_yx",
|
||||
user_id: this.user_id,
|
||||
// user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify({ ...json, ...{ dxgl: this.dxgl } }),
|
||||
});
|
||||
console.log(data.data);
|
||||
|
@ -245,35 +258,6 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
// /deep/ .ip_address {
|
||||
// .el-input__inner {
|
||||
// height: 30px;
|
||||
// text-align: center;
|
||||
// padding: 0;
|
||||
// }
|
||||
|
||||
// .el-row {
|
||||
// display: flex;
|
||||
// align-items: flex-end;
|
||||
|
||||
// .el-col-1 {
|
||||
// padding: 0px 2px;
|
||||
// color: black;
|
||||
// text-align: left;
|
||||
// line-height: 32px;
|
||||
// height: 20px;
|
||||
// }
|
||||
|
||||
// .el-col-5 {
|
||||
// width: 43px;
|
||||
// height: 30px;
|
||||
// }
|
||||
|
||||
// .el-col-24 {
|
||||
// padding-right: 152px;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
.el-table--enable-row-hover .el-table__body tr:hover > td {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
@ -297,7 +281,7 @@ export default {
|
|||
}
|
||||
|
||||
.el-col-5 {
|
||||
width: 43px;
|
||||
width: 55px;
|
||||
height: 30px;
|
||||
}
|
||||
.el-table {
|
||||
|
|
|
@ -106,7 +106,6 @@
|
|||
></el-checkbox>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<!-- <el-button type="primary" @click="submitForm('ruleForm'), (dialogVisible = false)">保存</el-button> -->
|
||||
<el-button type="primary" @click="submitForm">保 存</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</span>
|
||||
|
@ -116,7 +115,6 @@
|
|||
</template>
|
||||
<script>
|
||||
import { SaveUserAnswer, GetUserAnswer } from "@/api/user";
|
||||
import { isValidPrimaryDNS } from "../validate";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -143,7 +141,6 @@ export default {
|
|||
],
|
||||
},
|
||||
],
|
||||
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "name",
|
||||
|
@ -285,7 +282,6 @@ export default {
|
|||
text-align: center;
|
||||
border: 1px solid rgba(220, 220, 220, 1);
|
||||
}
|
||||
|
||||
/deep/ .port_content {
|
||||
.el-input {
|
||||
width: 200px;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- <el-button @click="dialogVisible = true">无线设置</el-button> -->
|
||||
<el-dialog title="无线设置" :visible.sync="dialogVisible" width="30%">
|
||||
<el-form
|
||||
:model="ruleForm"
|
||||
|
@ -22,15 +21,9 @@
|
|||
<el-col :span="10">
|
||||
<el-select v-model="ruleForm.wxpz_wlmc" placeholder="无线网名称">
|
||||
<el-option label="无线区无限网" value="shanghai"></el-option>
|
||||
<!-- <el-option label="区域二" value="beijing"></el-option> -->
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="MAC地址:" prop="wxpz_mac">
|
||||
<el-col :span="10">
|
||||
<el-input v-model="ruleForm.wxpz_mac"> </el-input>
|
||||
</el-col>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="加密模式:" prop="wxpz_jmms">
|
||||
<el-col :span="10">
|
||||
<el-select v-model="ruleForm.wxpz_jmms">
|
||||
|
@ -110,7 +103,6 @@ export default {
|
|||
message: "保存成功",
|
||||
type: "success",
|
||||
});
|
||||
this.dialogVisible = false;
|
||||
} else {
|
||||
this.$message.error("保存失败");
|
||||
}
|
||||
|
@ -120,8 +112,8 @@ export default {
|
|||
mark: "CKFWQ_wx",
|
||||
user_id: `${this.user_id}`,
|
||||
});
|
||||
console.log(obj);
|
||||
if (data.data && data.state) {
|
||||
console.log(data);
|
||||
if (JSON.parse(data.data.mark_value) && data.state) {
|
||||
var obj = JSON.parse(data.data.mark_value);
|
||||
this.ruleForm.wxpz_gzms = obj.wxpz_gzms;
|
||||
this.ruleForm.wxpz_wlmc = obj.wxpz_wlmc;
|
||||
|
@ -129,7 +121,6 @@ export default {
|
|||
this.ruleForm.wxpz_jmms = obj.wxpz_jmms;
|
||||
this.ruleForm.wxpz_jmsf = obj.wxpz_jmsf;
|
||||
this.ruleForm.wxpz_mm = obj.wxpz_mm;
|
||||
console.log(this.ruleForm, "取");
|
||||
}
|
||||
},
|
||||
submitForm(formName) {
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
<el-form-item label="数据位(bit):" prop="ckcssz_sjw">
|
||||
<el-select v-model="ruleForm.ckcssz_sjw" placeholder="请选择数据位">
|
||||
<el-option label="8" value="8"></el-option>
|
||||
<el-option label="7" value="7"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="停止位:" prop="ckcssz_tzw">
|
||||
|
@ -149,19 +150,18 @@ export default {
|
|||
user_id: "",
|
||||
loading: false,
|
||||
ruleForm: {
|
||||
ckcssz_btl: "9600",
|
||||
ckcssz_jyw: "无校验(none)",
|
||||
ckcssz_lk: "关闭",
|
||||
ckcssz_zdybtl: "开启",
|
||||
ckcssz_sjw: "8",
|
||||
ckcssz_tzw: "1",
|
||||
ckcssz_485: "关闭",
|
||||
qtsz_ckzdcz: "关闭",
|
||||
qtsz_zcblx: "关闭",
|
||||
qtsz_zdyxtb: "关闭",
|
||||
qtsz_tjzffgn: "关闭",
|
||||
ckcssz_btl: "",
|
||||
ckcssz_jyw: "",
|
||||
ckcssz_lk: "",
|
||||
ckcssz_zdybtl: "",
|
||||
ckcssz_sjw: "",
|
||||
ckcssz_tzw: "",
|
||||
ckcssz_485: "",
|
||||
qtsz_ckzdcz: "",
|
||||
qtsz_zcblx: "",
|
||||
qtsz_zdyxtb: "",
|
||||
qtsz_tjzffgn: "",
|
||||
},
|
||||
|
||||
rules: {
|
||||
ckcssz_btl: [{ required: true, trigger: "change", message: "必选" }],
|
||||
ckcssz_jyw: [{ required: true, trigger: "change", message: "必选" }],
|
||||
|
@ -191,7 +191,6 @@ export default {
|
|||
console.log(res);
|
||||
if (res.data.state) {
|
||||
sessionStorage.setItem("CKFWQ_wx", JSON.stringify(datas));
|
||||
this.dialogVisible = false;
|
||||
this.$message({
|
||||
message: "保存成功",
|
||||
type: "success",
|
||||
|
@ -209,7 +208,6 @@ export default {
|
|||
console.log(answers);
|
||||
if (answers.data.data && answers.data.state) {
|
||||
let obj = JSON.parse(answers.data.data.mark_value);
|
||||
|
||||
this.ruleForm.ckcssz_btl = obj.ckcssz_btl;
|
||||
this.ruleForm.ckcssz_jyw = obj.ckcssz_jyw;
|
||||
this.ruleForm.ckcssz_lk = obj.ckcssz_lk;
|
||||
|
@ -224,7 +222,6 @@ export default {
|
|||
}
|
||||
},
|
||||
//交互方法
|
||||
|
||||
submitForm(formName) {
|
||||
this.$refs["ruleForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
|
|
|
@ -120,9 +120,9 @@ export default {
|
|||
// 有线串口 - 负载电流;
|
||||
// 无线串口 - 额定电流;
|
||||
// 这两个只要设备连线和设备配置信息对就展示数据;
|
||||
|
||||
this.user_id = window.location.href.split("?")[1].split("|")[0];
|
||||
this.toObj(window.location.href.split("?")[1].split("|")[1]);
|
||||
alert(this.user_id);
|
||||
|
||||
this.time = this.$moment().format("HH:mm:ss");
|
||||
this.productChartOption = productChart;
|
||||
|
|
Loading…
Reference in New Issue