diff --git a/src/App.vue b/src/App.vue
index bb7db27..e6cca80 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,12 +1,12 @@
-
+
+
+
diff --git a/src/components/GatewayConfiguration.vue b/src/components/GatewayConfiguration.vue
index 82c725a..020b1ff 100644
--- a/src/components/GatewayConfiguration.vue
+++ b/src/components/GatewayConfiguration.vue
@@ -173,10 +173,8 @@ export default {
created() {
this.user_id = window.location.href.split("?")[1];
this.GetUserAnswer();
- // this.wgpz = JSON.parse(localStorage.getItem("wgpz")) || [];
},
methods: {
- handleSelectionChange() {},
//新建网关保存
saveinfo() {
this.$refs["ruleForm"].validate((valid) => {
@@ -203,7 +201,7 @@ export default {
localStorage.setItem("wgpz", JSON.stringify(this.wgpz));
let { data } = await SaveUserAnswer({
mark: "YDPZYM_wgpz",
- user_id: `${this.user_id}`,
+ user_id: this.user_id,
// user_id: "USER202307301109254198",
mark_value: JSON.stringify(this.wgpz),
});
@@ -237,7 +235,7 @@ export default {
localStorage.setItem("wgpz", JSON.stringify(this.wgpz));
let { data } = await SaveUserAnswer({
mark: "YDPZYM_wgpz",
- user_id: `${this.user_id}`,
+ user_id: this.user_id,
// user_id: "USER202307301109254198",
mark_value: JSON.stringify(this.wgpz),
});
@@ -260,7 +258,7 @@ export default {
async GetUserAnswer() {
let { data } = await GetUserAnswer({
mark: "YDPZYM_wgpz",
- user_id: `${this.user_id}`,
+ user_id: this.user_id,
// user_id: "USER202307301109254198",
});
console.log(data.data);
@@ -278,7 +276,7 @@ export default {
});
let { data } = await SaveUserAnswer({
mark: "YDPZYM_wgpz",
- user_id: `${this.user_id}`,
+ user_id: this.user_id,
// user_id: "USER202307301109254198",
mark_value: JSON.stringify(this.wgpz),
});
diff --git a/src/components/GatewayMaintenance.vue b/src/components/GatewayMaintenance.vue
index dfabbce..9528b57 100644
--- a/src/components/GatewayMaintenance.vue
+++ b/src/components/GatewayMaintenance.vue
@@ -274,7 +274,6 @@ export default {
if (valid) {
if (this.tableData.length < 4) {
this.SaveUserAnswer();
- localStorage.setItem("wgwh", JSON.stringify(this.tableData));
this.flag = false;
} else {
this.$message({
@@ -292,7 +291,6 @@ export default {
//删除
async handleDelete(a, b) {
this.tableData.splice(a, 1);
- localStorage.setItem("wgwh", JSON.stringify(this.tableData));
let { data } = await SaveUserAnswer({
mark: "YDPZYM_wgwh",
user_id: this.user_id,
@@ -325,7 +323,6 @@ export default {
(row) => !this.multipleSelection.includes(row)
);
this.multipleSelection = [];
- localStorage.setItem("wgwh", JSON.stringify(this.tableData));
let { data } = await SaveUserAnswer({
mark: "YDPZYM_wgwh",
user_id: this.user_id,
@@ -348,10 +345,16 @@ export default {
},
//保存数据
async SaveUserAnswer() {
- if (!this.user_id) {
- this.$message.error("操作失败");
- return;
- }
+ 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);
let { data } = await SaveUserAnswer({
mark: "YDPZYM_wgwh",
user_id: this.user_id,
@@ -359,16 +362,6 @@ export default {
mark_value: JSON.stringify(this.tableData),
});
if (data.state) {
- 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",
diff --git a/src/components/IpConfiguration.vue b/src/components/IpConfiguration.vue
index f75884e..1014824 100644
--- a/src/components/IpConfiguration.vue
+++ b/src/components/IpConfiguration.vue
@@ -6,6 +6,7 @@
:visible.sync="dialogVisible"
width="30%"
v-loading="loading"
+ :close-on-click-modal="false"
>
本页面涉及排错,请检查修改默认值
@@ -203,6 +204,15 @@ export default {
ippz_mrwg: "",
ippz_dns_zy: "",
ippz_dns_by: "",
+ dkpz_btl: "",
+ dkpz_sjw: "",
+ dkpz_jyw: "",
+ dkpz_tzw: "",
+ dkpz_lkms: "",
+ dkpz_dbcd: "",
+ dkpz_dbsj: "",
+ dkpz_tbbtl: "",
+ dkpz_snckxtb: "",
},
rules: {
ippz_ip_hqfs: [
@@ -302,16 +312,15 @@ export default {
this.ippz_dns_by3,
this.ippz_dns_by4
);
- let datas = sessionStorage.getItem("CKFWQ_yx");
- datas = { ...JSON.parse(datas), ...this.ruleForm };
+
let res = await SaveUserAnswer({
mark: "CKFWQ_yx",
user_id: this.user_id,
// user_id: "USER202307301109254198",
- mark_value: JSON.stringify(datas),
+ mark_value: JSON.stringify(this.ruleForm),
});
+ console.log(this.ruleForm);
if (res.data.state) {
- sessionStorage.setItem("CKFWQ_yx", JSON.stringify(datas));
this.$message({
message: "保存成功",
type: "success",
@@ -327,12 +336,9 @@ export default {
user_id: this.user_id,
// user_id: "USER202307301109254198",
});
- console.log(answers.data);
if (answers.data.data && answers.data.state) {
let obj = JSON.parse(answers.data.data.mark_value);
- console.log(obj);
- this.ruleForm.ippz_ip_hqfs = obj.ippz_ip_hqfs;
- this.ruleForm.ippz_dns_hqfs = obj.ippz_dns_hqfs;
+ console.log(obj.ippz_dns_hqfs);
if (obj.ippz_ip) {
this.ippz_ip1 = obj.ippz_ip.split(".")[0];
this.ippz_ip2 = obj.ippz_ip.split(".")[1];
@@ -354,6 +360,17 @@ export default {
this.ippz_dns_by2 = obj.ippz_dns_by.split(".")[1];
this.ippz_dns_by3 = obj.ippz_dns_by.split(".")[2];
this.ippz_dns_by4 = obj.ippz_dns_by.split(".")[3];
+ this.ruleForm.ippz_ip_hqfs = obj.ippz_ip_hqfs;
+ this.ruleForm.ippz_dns_hqfs = obj.ippz_dns_hqfs;
+ this.ruleForm.dkpz_btl = obj.dkpz_btl;
+ this.ruleForm.dkpz_sjw = obj.dkpz_sjw;
+ this.ruleForm.dkpz_jyw = obj.dkpz_jyw;
+ this.ruleForm.dkpz_tzw = obj.dkpz_tzw;
+ this.ruleForm.dkpz_lkms = obj.dkpz_lkms;
+ this.ruleForm.dkpz_dbcd = obj.dkpz_dbcd;
+ this.ruleForm.dkpz_dbsj = obj.dkpz_dbsj;
+ this.ruleForm.dkpz_tbbtl = obj.dkpz_tbbtl;
+ this.ruleForm.dkpz_snckxtb = obj.dkpz_snckxtb;
}
}
this.loading = false;
diff --git a/src/components/NetworkConfiguration.vue b/src/components/NetworkConfiguration.vue
index b16f7ee..a6f04ba 100644
--- a/src/components/NetworkConfiguration.vue
+++ b/src/components/NetworkConfiguration.vue
@@ -16,14 +16,14 @@
class="demo-ruleForm"
:label-position="labelPosition"
>
-
-
+
+
-
-
+
+
@@ -39,8 +39,8 @@
class="demo-ruleForm"
:label-position="labelPosition"
>
-
-
+
+
@@ -49,7 +49,6 @@
@@ -65,15 +64,33 @@ export default {
user_id: "",
loading: false,
ruleForm: {
- kqwk: "开启",
- wkgzfs: "LAN口",
- wkms: "n",
+ ckcssz_btl: "",
+ ckcssz_jyw: "",
+ ckcssz_lk: "",
+ ckcssz_zdybtl: "",
+ ckcssz_sjw: "",
+ ckcssz_tzw: "",
+ ckcssz_485: "",
+ qtsz_ckzdcz: "",
+ qtsz_zcblx: "",
+ qtsz_zdyxtb: "",
+ qtsz_tjzffgn: "",
+ ytwgn_kqwk: "",
+ ytwgn_wkgzfs: "",
+ wkmssz_wkms: "",
+ wxpz_gzms: "",
+ wxpz_wlmc: "",
+ wxpz_mac: "",
+ wxpz_jmms: "",
+ wxpz_jmsf: "",
+ wxpz_mm: "",
},
-
rules: {
- kqwk: [{ required: true, trigger: "change", message: "必填项" }],
- wkgzfs: [{ required: true, trigger: "change", message: "必填项" }],
- wkms: [{ required: true, trigger: "change", message: "必填项" }],
+ ytwgn_kqwk: [{ required: true, trigger: "change", message: "必填项" }],
+ ytwgn_wkgzfs: [
+ { required: true, trigger: "change", message: "必填项" },
+ ],
+ wkmssz_wkms: [{ required: true, trigger: "change", message: "必填项" }],
},
};
},
@@ -82,26 +99,15 @@ export default {
this.GetUserAnswer();
},
methods: {
- getParameter(data) {
- console.log(data);
- this.user_id = data;
- },
- change() {
- this.$set(answer, "kqwk", "11111111");
- },
async saveDatas() {
- let datas = JSON.parse(sessionStorage.getItem("CKFWQ_wx"));
let res = await SaveUserAnswer({
mark: "CKFWQ_wx",
user_id: `${this.user_id}`,
- mark_value: JSON.stringify(datas),
+ // user_id: "USER202307301109254198",
+ mark_value: JSON.stringify(this.ruleForm),
});
console.log(res);
if (res.data.state) {
- sessionStorage.setItem(
- "CKFWQ_wx",
- JSON.stringify({ ...datas, ...this.ruleForm })
- );
this.$message({
message: "保存成功",
type: "success",
@@ -115,12 +121,30 @@ export default {
let res = await GetUserAnswer({
mark: "CKFWQ_wx",
user_id: this.user_id,
+ // user_id: "USER202307301109254198",
});
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;
- this.ruleForm.wkms = obj.wkms;
+ this.ruleForm.ytwgn_kqwk = obj.ytwgn_kqwk;
+ this.ruleForm.ytwgn_wkgzfs = obj.ytwgn_wkgzfs;
+ this.ruleForm.wkmssz_wkms = obj.wkmssz_wkms;
+ this.ruleForm.ckcssz_btl = obj.ckcssz_btl;
+ this.ruleForm.ckcssz_jyw = obj.ckcssz_jyw;
+ this.ruleForm.ckcssz_lk = obj.ckcssz_lk;
+ this.ruleForm.ckcssz_zdybtl = obj.ckcssz_zdybtl;
+ this.ruleForm.ckcssz_sjw = obj.ckcssz_sjw;
+ this.ruleForm.ckcssz_tzw = obj.ckcssz_tzw;
+ this.ruleForm.ckcssz_485 = obj.ckcssz_485;
+ this.ruleForm.qtsz_ckzdcz = obj.qtsz_ckzdcz;
+ this.ruleForm.qtsz_zcblx = obj.qtsz_zdyxtb;
+ this.ruleForm.qtsz_zdyxtb = obj.qtsz_zdyxtb;
+ this.ruleForm.qtsz_tjzffgn = obj.qtsz_tjzffgn;
+ this.ruleForm.wxpz_gzms = obj.wxpz_gzms;
+ this.ruleForm.wxpz_wlmc = obj.wxpz_wlmc;
+ this.ruleForm.wxpz_mac = obj.wxpz_mac;
+ this.ruleForm.wxpz_jmms = obj.wxpz_jmms;
+ this.ruleForm.wxpz_jmsf = obj.wxpz_jmsf;
+ this.ruleForm.wxpz_mm = obj.wxpz_mm;
}
},
submitForm(formName) {
diff --git a/src/components/NetworkManagement.vue b/src/components/NetworkManagement.vue
index d078c17..a240f9c 100644
--- a/src/components/NetworkManagement.vue
+++ b/src/components/NetworkManagement.vue
@@ -167,6 +167,28 @@ export default {
wlgl_ww_zwym2: "",
wlgl_ww_zwym3: "",
wlgl_ww_zwym4: "",
+ dxgl: [],
+ clgl_name: "",
+ clgl_xy: "",
+ clgl_gzms: "",
+ clgl_ydx: "",
+ clgl_ydk: "",
+ clgl_mddx: "",
+ clgl_mddk: "",
+ clgl_rkwg: "",
+ clgl_rkwk: "",
+ clgl_rkip: "",
+ clgl_dldk: "",
+ clgl_ckwg: "",
+ clgl_ckwk: "",
+ clgl_ckip: "",
+ clgl_wdyml: "",
+ cmdlist_ml: "",
+ cmdlist_sbid: "",
+ cmdlist_qsdz: "",
+ cmdlist_dzcd: "",
+ cmdlist_ms: "",
+ cmdlist_dz: "",
options1: [
{
label: "有线区网闸(内网)",
@@ -253,14 +275,37 @@ export default {
this.wlgl_ww_zwym3 +
"." +
this.wlgl_ww_zwym4,
+ dxgl: this.dxgl,
+ clgl_name: this.clgl_name,
+ clgl_xy: this.clgl_xy,
+ clgl_gzms: this.clgl_gzms,
+ clgl_ydx: this.clgl_ydx,
+ clgl_ydk: this.clgl_ydk,
+ clgl_mddx: this.clgl_mddx,
+ clgl_mddk: this.clgl_mddk,
+ clgl_rkwg: this.clgl_rkwg,
+ clgl_rkwk: this.clgl_rkwk,
+ clgl_rkip: this.clgl_ckip,
+ clgl_dldk: this.clgl_dldk,
+ clgl_ckwg: this.clgl_ckwg,
+ clgl_ckwk: this.clgl_rkwk,
+ clgl_ckip: this.clgl_ckip,
+ clgl_wdyml: this.clgl_wdyml,
+ cmdlist_ml: this.cmdlist_ml,
+ cmdlist_sbid: this.cmdlist_sbid,
+ cmdlist_qsdz: this.cmdlist_qsdz,
+ cmdlist_dzcd: this.cmdlist_dzcd,
+ cmdlist_ms: this.cmdlist_ms,
+ cmdlist_dz: this.cmdlist_dz,
};
let { data } = await SaveUserAnswer({
- mark: `${this.$store.state.type}`,
- user_id: `${this.user_id}`,
+ mark: this.$store.state.type,
+ user_id: this.user_id,
+ // mark: "GYWZ_yx",
+ // user_id: "USER202307301109254198",
mark_value: JSON.stringify(obj),
});
if (data.state) {
- sessionStorage.setItem("GYWZ_yx", JSON.stringify(obj));
this.$message({
message: "保存成功",
type: "success",
@@ -272,12 +317,15 @@ export default {
//拿缓存
async GetUserAnswer() {
var { data } = await GetUserAnswer({
- mark: `${this.$store.state.type}`,
- user_id: `${this.user_id}`,
+ mark: this.$store.state.type,
+ user_id: this.user_id,
+ // mark: "GYWZ_yx",
+ // user_id: "USER202307301109254198",
});
console.log(data);
if (data.data && data.state) {
let res = JSON.parse(data.data.mark_value);
+ console.log(res);
this.tableData[0].wlgl_nw_name = res.wlgl_nw_name;
this.wlgl_nw_ip1 = res.wlgl_nw_ip.split(".")[0];
this.wlgl_nw_ip2 = res.wlgl_nw_ip.split(".")[1];
@@ -296,6 +344,28 @@ export default {
this.wlgl_ww_zwym2 = res.wlgl_ww_zwym.split(".")[1];
this.wlgl_ww_zwym3 = res.wlgl_ww_zwym.split(".")[2];
this.wlgl_ww_zwym4 = res.wlgl_ww_zwym.split(".")[3];
+ this.dxgl = res.dxgl;
+ this.clgl_name = res.clgl_name;
+ this.clgl_xy = res.clgl_xy;
+ this.clgl_gzms = res.clgl_gzms;
+ this.clgl_ydx = res.clgl_ydx;
+ this.clgl_ydk = res.clgl_ydk;
+ this.clgl_mddx = res.clgl_mddx;
+ this.clgl_mddk = res.clgl_mddk;
+ this.clgl_rkwg = res.clgl_rkwg;
+ this.clgl_rkwk = res.clgl_rkwk;
+ this.clgl_rkip = res.clgl_rkip;
+ this.clgl_dldk = res.clgl_dldk;
+ this.clgl_ckwg = res.clgl_ckwg;
+ this.clgl_ckwk = res.clgl_ckwk;
+ this.clgl_ckip = res.clgl_ckip;
+ this.clgl_wdyml = res.clgl_wdyml;
+ this.cmdlist_ml = res.cmdlist_ml;
+ this.cmdlist_sbid = res.cmdlist_sbid;
+ this.cmdlist_qsdz = res.cmdlist_qsdz;
+ this.cmdlist_dzcd = res.cmdlist_dzcd;
+ this.cmdlist_ms = res.cmdlist_ms;
+ this.cmdlist_dz = res.cmdlist_dz;
}
},
},
diff --git a/src/components/ObjectManagement.vue b/src/components/ObjectManagement.vue
index e02f836..2702485 100644
--- a/src/components/ObjectManagement.vue
+++ b/src/components/ObjectManagement.vue
@@ -104,7 +104,6 @@ export default {
user_id: "",
dialogVisible1: false,
labelPosition: "left",
- dxgl: [],
ip1: "",
ip2: "",
ip3: "",
@@ -129,6 +128,37 @@ export default {
],
},
json: {},
+ wlgl_nw_name: "",
+ wlgl_nw_ip: "",
+ wlgl_nw_zwym: "",
+ wlgl_ww_name: "",
+ wlgl_ww_ip: "",
+ wlgl_ww_zwym: "",
+
+ dxgl: [],
+ clgl_name: "",
+ clgl_xy: "",
+ clgl_gzms: "",
+ clgl_ydx: "",
+ clgl_ydk: "",
+
+ clgl_mddx: "",
+ clgl_mddk: "",
+ clgl_rkwg: "",
+ clgl_rkwk: "",
+ clgl_rkip: "",
+ clgl_dldk: "",
+ clgl_ckwg: "",
+ clgl_ckwk: "",
+ clgl_ckip: "",
+ clgl_wdyml: "",
+
+ cmdlist_ml: "",
+ cmdlist_sbid: "",
+ cmdlist_qsdz: "",
+ cmdlist_dzcd: "",
+ cmdlist_ms: "",
+ cmdlist_dz: "",
};
},
created() {
@@ -178,15 +208,46 @@ export default {
iplx: this.ruleForm.iplx,
ip: this.ip1 + "." + this.ip2 + "." + this.ip3 + "." + this.ip4,
});
- var json = JSON.parse(sessionStorage.getItem(this.$store.state.type));
+ let obj = {
+ wlgl_nw_name: this.wlgl_nw_name,
+ wlgl_nw_ip: this.wlgl_ww_ip,
+ wlgl_nw_zwym: this.wlgl_nw_zwym,
+ wlgl_ww_name: this.wlgl_ww_name,
+ wlgl_ww_ip: this.wlgl_ww_ip,
+ wlgl_ww_zwym: this.wlgl_ww_zwym,
+
+ dxgl: this.dxgl,
+ clgl_name: this.clgl_name,
+ clgl_xy: this.clgl_xy,
+ clgl_gzms: this.clgl_gzms,
+ clgl_ydx: this.clgl_ydk,
+ clgl_ydk: this.clgl_ydk,
+
+ clgl_mddx: this.clgl_mddk,
+ clgl_mddk: this.clgl_mddk,
+ clgl_rkwg: this.clgl_rkwg,
+ clgl_rkwk: this.clgl_ckwk,
+ clgl_rkip: this.clgl_rkip,
+ clgl_dldk: this.clgl_dldk,
+ clgl_ckwg: this.clgl_ckwg,
+ clgl_ckwk: this.clgl_ckwk,
+ clgl_ckip: this.clgl_ckip,
+ clgl_wdyml: this.clgl_wdyml,
+
+ cmdlist_ml: this.cmdlist_ml,
+ cmdlist_sbid: this.cmdlist_sbid,
+ cmdlist_qsdz: this.cmdlist_qsdz,
+ cmdlist_dzcd: this.cmdlist_dzcd,
+ cmdlist_ms: this.cmdlist_ms,
+ cmdlist_dz: this.cmdlist_dz,
+ };
let { data } = await SaveUserAnswer({
- mark: `${this.$store.state.type}`,
- // mark: "GYWZ_yx",
+ mark: this.$store.state.type,
user_id: this.user_id,
+ // mark: "GYWZ_yx",
// user_id: "USER202307301109254198",
-
- mark_value: JSON.stringify({ ...json, ...{ dxgl: this.dxgl } }),
+ mark_value: JSON.stringify(obj),
});
if (data.state) {
@@ -215,28 +276,88 @@ export default {
async GetUserAnswer() {
let { data } = await GetUserAnswer({
mark: `${this.$store.state.type}`,
- // mark: "GYWZ_yx",
user_id: this.user_id,
+ // mark: "GYWZ_yx",
// user_id: "USER202307301109254198",
});
if (data.state && data.data) {
console.log(JSON.parse(data.data.mark_value).dxgl);
- if (JSON.parse(data.data.mark_value).dxgl) {
- this.dxgl = JSON.parse(data.data.mark_value).dxgl;
+ let res = JSON.parse(data.data.mark_value);
+ if (res.dxgl) {
+ this.wlgl_nw_name = res.wlgl_nw_name;
+ this.wlgl_nw_ip = res.wlgl_nw_ip;
+ this.wlgl_nw_zwym = res.wlgl_nw_zwym;
+ this.wlgl_ww_name = res.wlgl_ww_name;
+ this.wlgl_ww_ip = res.wlgl_ww_ip;
+ this.wlgl_ww_zwym = res.wlgl_ww_zwym;
+ this.dxgl = res.dxgl;
+ this.clgl_name = res.clgl_name;
+ this.clgl_xy = res.clgl_xy;
+ this.clgl_gzms = res.clgl_gzms;
+ this.clgl_ydx = res.clgl_ydx;
+ this.clgl_ydk = res.clgl_ydk;
+ this.clgl_mddx = res.clgl_mddx;
+ this.clgl_mddk = res.clgl_mddk;
+ this.clgl_rkwg = res.clgl_rkwg;
+ this.clgl_rkwk = res.clgl_rkwk;
+ this.clgl_rkip = res.clgl_rkip;
+ this.clgl_dldk = res.clgl_dldk;
+ this.clgl_ckwg = res.clgl_ckwg;
+ this.clgl_ckwk = res.clgl_ckwk;
+ this.clgl_ckip = res.clgl_ckip;
+ this.clgl_wdyml = res.clgl_wdyml;
+ this.cmdlist_ml = res.cmdlist_ml;
+ this.cmdlist_sbid = res.cmdlist_sbid;
+ this.cmdlist_qsdz = res.cmdlist_qsdz;
+ this.cmdlist_dzcd = res.cmdlist_dzcd;
+ this.cmdlist_ms = res.cmdlist_ms;
+ this.cmdlist_dz = res.cmdlist_dz;
}
}
},
//删除
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 obj = {
+ wlgl_nw_name: this.wlgl_nw_name,
+ wlgl_nw_ip: this.wlgl_ww_ip,
+ wlgl_nw_zwym: this.wlgl_nw_zwym,
+ wlgl_ww_name: this.wlgl_ww_name,
+ wlgl_ww_ip: this.wlgl_ww_ip,
+ wlgl_ww_zwym: this.wlgl_ww_zwym,
+
+ dxgl: this.dxgl,
+ clgl_name: this.clgl_name,
+ clgl_xy: this.clgl_xy,
+ clgl_gzms: this.clgl_gzms,
+ clgl_ydx: this.clgl_ydk,
+ clgl_ydk: this.clgl_ydk,
+
+ clgl_mddx: this.clgl_mddk,
+ clgl_mddk: this.clgl_mddk,
+ clgl_rkwg: this.clgl_rkwg,
+ clgl_rkwk: this.clgl_ckwk,
+ clgl_rkip: this.clgl_rkip,
+ clgl_dldk: this.clgl_dldk,
+ clgl_ckwg: this.clgl_ckwg,
+ clgl_ckwk: this.clgl_ckwk,
+ clgl_ckip: this.clgl_ckip,
+ clgl_wdyml: this.clgl_wdyml,
+
+ cmdlist_ml: this.cmdlist_ml,
+ cmdlist_sbid: this.cmdlist_sbid,
+ cmdlist_qsdz: this.cmdlist_qsdz,
+ cmdlist_dzcd: this.cmdlist_dzcd,
+ cmdlist_ms: this.cmdlist_ms,
+ cmdlist_dz: this.cmdlist_dz,
+ };
let { data } = await SaveUserAnswer({
mark: `${this.$store.state.type}`,
- // mark: "GYWZ_yx",
user_id: this.user_id,
+ // mark: "GYWZ_yx",
// user_id: "USER202307301109254198",
- mark_value: JSON.stringify({ ...json, ...{ dxgl: this.dxgl } }),
+ mark_value: JSON.stringify(obj),
});
console.log(data.data);
if (data.state) {
diff --git a/src/components/PolicyManagement.vue b/src/components/PolicyManagement.vue
index 826d0ae..0e6a175 100644
--- a/src/components/PolicyManagement.vue
+++ b/src/components/PolicyManagement.vue
@@ -220,16 +220,19 @@ export default {
// clgl_mddk: "",
// },
],
- tableData1: [
- {
- cmdlist_ml: "读线圈状态",
- // cmdlist_sbid: "有线区交换机命令",
- cmdlist_qsdz: "0",
- cmdlist_dzcd: 65535,
- cmdlist_ms: "有线区交换机命令,允许Modbus(TCP)协议通行",
- cmdlist_dz: "允许",
- },
- ],
+ cmdlist_ml: "",
+ cmdlist_sbid: "",
+ cmdlist_qsdz: "",
+ cmdlist_dzcd: "",
+ cmdlist_ms: "",
+ cmdlist_dz: "",
+ wlgl_nw_name: "",
+ wlgl_nw_ip: "",
+ wlgl_nw_zwym: "",
+ wlgl_ww_name: "",
+ wlgl_ww_ip: "",
+ wlgl_ww_zwym: "",
+ dxgl: [],
ruleForm1: {
clgl_name: "有线区策略",
clgl_xy: ["Modbus(TCP)"],
@@ -246,8 +249,7 @@ export default {
clgl_ckwk: "有线区网闸(外网)",
clgl_ckip: "",
clgl_wdyml: "拒绝",
- dlport: "",
- wdyml: "",
+ clgl_dldk: "",
},
rules1: {
clgl_name: [{ required: true, trigger: "change" }],
@@ -263,21 +265,6 @@ export default {
clgl_mddx: [{ required: true, trigger: "change" }],
clgl_wdyml: [{ required: true, trigger: "change" }],
},
- ruleForm2: {
- cmdlist_ml: "有线区交换机命令",
- cmdlist_sbid: "",
- cmdlist_qsdz: "",
- cmdlist_dzcd: "",
- cmdlist_ms: "",
- cmdlist_dz: "",
- },
- rules2: {
- cmdlist_ml: [{ required: true, trigger: "change" }],
- cmdlist_sbid: [{ required: true, trigger: "change" }],
- cmdlist_qsdz: [{ required: true, trigger: "change" }],
- cmdlist_dzcd: [{ required: true, trigger: "change" }],
- cmdlist_dz: [{ required: true, trigger: "change" }],
- },
value: "",
flag: false,
};
@@ -295,41 +282,54 @@ export default {
},
methods: {
addPolicy() {
- this.$router.push({ name: "addstrategy", query: { id: this.user_id } });
+ this.$router.push({
+ name: "addstrategy",
+ query: { id: this.user_id },
+ });
},
async del(index, a) {
+ this.tableData = [];
+ let newSessObj = {
+ clgl_name: "",
+ clgl_xy: "",
+ clgl_gzms: "",
+ clgl_ydx: "",
+ clgl_ydk: "",
+ clgl_rkwk: "",
+ clgl_rkip: "",
+ clgl_ckip: "",
+ clgl_rkwg: "",
+ clgl_ckwk: "",
+ clgl_dldk: "",
+ clgl_ckwg: "",
+ clgl_mddx: "",
+ clgl_mddk: "",
+ clgl_wdyml: "",
+ cmdlist_ml: this.cmdlist_ml,
+ cmdlist_sbid: this.cmdlist_sbid,
+ cmdlist_qsdz: this.cmdlist_qsdz,
+ cmdlist_dzcd: this.cmdlist_dzcd,
+ cmdlist_ms: this.cmdlist_ms,
+ cmdlist_dz: this.cmdlist_dz,
+ dxgl: this.dxgl,
+ wlgl_nw_name: this.wlgl_nw_name,
+ wlgl_nw_ip: this.wlgl_nw_ip,
+ wlgl_nw_zwym: this.wlgl_nw_zwym,
+ wlgl_ww_name: this.wlgl_ww_name,
+ wlgl_ww_ip: this.wlgl_ww_ip,
+ wlgl_ww_zwym: this.wlgl_ww_zwym,
+ };
let { data } = await SaveUserAnswer({
- mark: `${this.$store.state.type}`,
- user_id: `${this.user_id}`,
- mark_value: JSON.stringify(
- localStorage.getItem(this.$store.state.type)
- ),
+ mark: this.$store.state.type,
+ user_id: this.user_id,
+ // mark: "GYWZ_yx",
+ // user_id: "USER202307301109254198",
+ mark_value: JSON.stringify(newSessObj),
});
if (data.state) {
this.tableData.splice(index, 1);
- var obj = JSON.parse(sessionStorage.getItem(this.$store.state.type));
- let newSessObj = {
- clgl_name: "",
- cmdlist_qsdz: "",
- clgl_xy: "",
- clgl_gzms: "",
- clgl_ydx: "",
- clgl_ydk: "",
- clgl_rkwk: "",
- clgl_rkip: "",
- clgl_rkwg: "",
- clgl_ckwk: "",
- clgl_ckip: "",
- clgl_ckwg: "",
- clgl_mddx: "",
- clgl_mddk: "",
- };
- sessionStorage.setItem(
- this.$store.state.type,
- JSON.stringify({ ...obj, ...newSessObj })
- );
this.$message({
- message: data.message,
+ message: "删除成功",
type: "success",
});
}
@@ -338,14 +338,41 @@ export default {
async GetUserAnswer() {
this.loading = true;
let { data } = await GetUserAnswer({
- mark: `${this.$store.state.type}`,
- user_id: `${this.user_id}`,
+ mark: this.$store.state.type,
+ user_id: this.user_id,
+ // mark: "GYWZ_yx",
+ // user_id: "USER202307301109254198",
});
this.loading = false;
if (data.data && data.state) {
let obj = JSON.parse(data.data.mark_value);
+ (this.ruleForm1.clgl_xy = obj.clgl_xy),
+ (this.ruleForm1.clgl_gzms = obj.clgl_gzms),
+ (this.ruleForm1.clgl_ydx = obj.clgl_ydx),
+ (this.ruleForm1.clgl_ydk = obj.clgl_ydk),
+ (this.ruleForm1.clgl_rkwk = obj.clgl_rkwk),
+ (this.ruleForm1.clgl_rkip = obj.clgl_rkip),
+ (this.ruleForm1.clgl_rkwg = obj.clgl_rkwg),
+ (this.ruleForm1.clgl_ckwk = obj.clgl_ckwk),
+ (this.ruleForm1.clgl_ckip = obj.clgl_ckip),
+ (this.ruleForm1.clgl_ckwg = obj.clgl_ckwg),
+ (this.ruleForm1.clgl_mddx = obj.clgl_mddx),
+ (this.ruleForm1.clgl_mddk = obj.clgl_mddk),
+ (this.ruleForm1.clgl_dldk = obj.clgl_dldk),
+ (this.dxgl = obj.dxgl),
+ (this.wlgl_nw_name = obj.wlgl_nw_name),
+ (this.wlgl_nw_ip = obj.wlgl_nw_ip),
+ (this.wlgl_nw_zwym = obj.wlgl_ww_zwym),
+ (this.wlgl_ww_name = obj.wlgl_ww_name),
+ (this.wlgl_ww_ip = obj.wlgl_ww_ip),
+ (this.wlgl_ww_zwym = obj.wlgl_ww_zwym),
+ (this.cmdlist_ml = obj.cmdlist_ml),
+ (this.cmdlist_sbid = obj.cmdlist_sbid),
+ (this.cmdlist_qsdz = obj.cmdlist_qsdz),
+ (this.cmdlist_dzcd = obj.cmdlist_dzcd),
+ (this.cmdlist_ms = obj.cmdlist_ms),
+ (this.cmdlist_dz = obj.cmdlist_dz);
if (obj.hasOwnProperty("clgl_name")) {
- console.log(obj.clgl_name);
this.tableData = [
{
clgl_name: obj.clgl_name,
diff --git a/src/components/PortConfiguration.vue b/src/components/PortConfiguration.vue
index ed8daf9..ff96be2 100644
--- a/src/components/PortConfiguration.vue
+++ b/src/components/PortConfiguration.vue
@@ -1,6 +1,5 @@
-