This commit is contained in:
lll 2023-11-07 19:06:58 +08:00
parent e07f62d0eb
commit 3fc4a042ff
3 changed files with 14 additions and 35 deletions

View File

@ -6,10 +6,10 @@
<el-button @click="flag = true">新建网关</el-button>
<el-button @click="deleteSelectedRows">删除</el-button>
</div>
<div class="right">
<!-- <div class="right">
<el-input type="search" v-model="search"></el-input>
<el-button @click="select">筛选</el-button>
</div>
</div> -->
</div>
<el-table
ref="multipleTable"

View File

@ -10,10 +10,10 @@
<el-button @click="flag = true">新增参数</el-button>
<el-button @click="deleteSelectedRows">删除</el-button>
</div>
<div class="right">
<!-- <div class="right">
<el-input type="search" style="margin-right: 10px"></el-input>
<el-button>筛选</el-button>
</div>
</div> -->
</div>
<el-table
ref="multipleTable"

View File

@ -1,17 +1,12 @@
<template>
<div>
<!-- <el-button @click="dialogVisible = true">对象管理</el-button> -->
<el-dialog
title="对象管理"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose"
>
<el-dialog title="对象管理" :visible.sync="dialogVisible" width="50%">
<div class="title">
<el-button style="margin-bottom: 10px" @click="addObj"
>新增对象</el-button
>
<p v-if="dxgl.length >= 2">只能添加两条数据</p>
<p>只能添加两条数据</p>
</div>
<el-table :data="dxgl" style="width: 100%" border>
@ -38,12 +33,7 @@
</el-table>
</el-dialog>
<el-dialog
title="新增对象"
:visible.sync="dialogVisible1"
width="30%"
:before-close="handleClose"
>
<el-dialog title="新增对象" :visible.sync="dialogVisible1" width="30%">
<div class="ip_address">
<el-form
:model="ruleForm"
@ -100,7 +90,7 @@
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="save">保存</el-button>
<el-button type="primary" @click="SaveUserAnswer">保存</el-button>
<el-button @click="dialogVisible1 = false"> </el-button>
</span>
</el-dialog>
@ -114,16 +104,7 @@ export default {
dialogVisible: true,
dialogVisible1: false,
labelPosition: "left",
dxgl: [
// {
// dx_name: "",
// ip: "",
// },
// {
// dx_name: "",
// ip: "",
// },
],
dxgl: [],
ip1: "",
ip2: "",
ip3: "",
@ -149,15 +130,10 @@ export default {
this.GetUserAnswer();
},
methods: {
handleClick() {},
save() {
this.SaveUserAnswer();
},
async SaveUserAnswer() {
//
console.log(this.dxgl);
var json = JSON.parse(sessionStorage.getItem("GYWZ_yx"));
this.dxgl.push({
dx_name: this.ruleForm.dxmc,
iplx: this.ruleForm.iplx,
@ -174,6 +150,7 @@ export default {
message: "保存成功",
type: "success",
});
this.dialogVisible1 = false;
} else {
this.$message.error("保存失败");
@ -186,7 +163,9 @@ export default {
});
if (data.state) {
console.log(JSON.parse(data.data.mark_value).dxgl);
this.dxgl = JSON.parse(data.data.mark_value).dxgl;
if (JSON.parse(data.data.mark_value).dxgl) {
this.dxgl = JSON.parse(data.data.mark_value).dxgl;
}
}
},
//