diff --git a/.history/src/components/CloneView_20231109211759.vue b/.history/src/components/CloneView_20231109211759.vue new file mode 100644 index 0000000..6f5a4e1 --- /dev/null +++ b/.history/src/components/CloneView_20231109211759.vue @@ -0,0 +1,905 @@ + + + + + + diff --git a/.history/src/components/CloneView_20231109211800.vue b/.history/src/components/CloneView_20231109211800.vue new file mode 100644 index 0000000..6f5a4e1 --- /dev/null +++ b/.history/src/components/CloneView_20231109211800.vue @@ -0,0 +1,905 @@ + + + + + + diff --git a/.history/src/components/SerialPort_20231109211723.vue b/.history/src/components/SerialPort_20231109211723.vue new file mode 100644 index 0000000..5a77fa5 --- /dev/null +++ b/.history/src/components/SerialPort_20231109211723.vue @@ -0,0 +1,834 @@ + + + + + + diff --git a/src/components/AddPolicy.vue b/src/components/AddPolicy.vue index b209435..7f16d3c 100644 --- a/src/components/AddPolicy.vue +++ b/src/components/AddPolicy.vue @@ -935,8 +935,8 @@ export default { //拿缓存数据 var json = JSON.parse(sessionStorage.getItem("GYWZ_yx")); let { data } = await SaveUserAnswer({ - mark: "GYWZ_yx", - user_id: "USER202307301114011710", + mark: `${this.$store.state.type}`, + user_id: `${this.$route.query.id}`, mark_value: JSON.stringify({ ...json, ...obj }), }); if (data.state) { @@ -951,48 +951,50 @@ export default { //获取缓存数据 async GetUserAnswer() { let { data } = await GetUserAnswer({ - mark: "GYWZ_yx", - user_id: "USER202307301114011710", + mark: `${this.$store.state.type}`, + user_id: `${this.$route.query.id}`, }); - let res = JSON.parse(data.data.mark_value); - if (res.clgl_ckip) { - this.ruleForm1.clgl_ckip1 = res.clgl_ckip.split(".")[0]; - this.ruleForm1.clgl_ckip2 = res.clgl_ckip.split(".")[1]; - this.ruleForm1.clgl_ckip3 = res.clgl_ckip.split(".")[2]; - this.ruleForm1.clgl_ckip4 = res.clgl_rkip.split(".")[3]; - this.ruleForm1.clgl_rkip1 = res.clgl_rkip.split(".")[0]; - this.ruleForm1.clgl_rkip2 = res.clgl_rkip.split(".")[1]; - this.ruleForm1.clgl_rkip3 = res.clgl_rkip.split(".")[2]; - this.ruleForm1.clgl_rkip4 = res.clgl_rkip.split(".")[3]; - this.ruleForm1.clgl_rkwg1 = res.clgl_rkwg.split(".")[0]; - this.ruleForm1.clgl_rkwg2 = res.clgl_rkwg.split(".")[1]; - this.ruleForm1.clgl_rkwg3 = res.clgl_rkwg.split(".")[2]; - this.ruleForm1.clgl_rkwg4 = res.clgl_rkwg.split(".")[3]; - this.ruleForm1.clgl_ckwg1 = res.clgl_ckwg.split(".")[0]; - this.ruleForm1.clgl_ckwg2 = res.clgl_ckwg.split(".")[1]; - this.ruleForm1.clgl_ckwg3 = res.clgl_ckwg.split(".")[2]; - this.ruleForm1.clgl_ckwg4 = res.clgl_ckwg.split(".")[3]; - this.ruleForm1.clgl_name = res.clgl_name; - this.ruleForm1.clgl_xy = res.clgl_xy; - this.ruleForm1.clgl_gzms = res.clgl_gzms; - this.ruleForm1.clgl_mddk = res.clgl_mddk; - this.ruleForm1.clgl_ydx = res.clgl_ydx; - this.ruleForm1.clgl_ydk = res.clgl_ydk; - this.ruleForm1.clgl_mddk = res.clgl_mddk; - this.ruleForm1.clgl_dldk = res.clgl_dldk; - this.ruleForm1.clgl_rkwk = res.clgl_rkwk; - this.ruleForm1.clgl_wdyml = res.clgl_wdyml; - this.ruleForm1.clgl_ckwk = res.clgl_ckwk; - this.tableData1 = [ - { - cmdlist_ml: res.cmdlist_ml, - cmdlist_sbid: res.cmdlist_sbid, - cmdlist_qsdz: res.cmdlist_qsdz, - cmdlist_dzcd: res.cmdlist_dzcd, - cmdlist_ms: res.cmdlist_ms, - cmdlist_dz: res.cmdlist_dz, - }, - ]; + if (data.data && data.state) { + let res = JSON.parse(data.data.mark_value); + if (res.clgl_ckip) { + this.ruleForm1.clgl_ckip1 = res.clgl_ckip.split(".")[0]; + this.ruleForm1.clgl_ckip2 = res.clgl_ckip.split(".")[1]; + this.ruleForm1.clgl_ckip3 = res.clgl_ckip.split(".")[2]; + this.ruleForm1.clgl_ckip4 = res.clgl_rkip.split(".")[3]; + this.ruleForm1.clgl_rkip1 = res.clgl_rkip.split(".")[0]; + this.ruleForm1.clgl_rkip2 = res.clgl_rkip.split(".")[1]; + this.ruleForm1.clgl_rkip3 = res.clgl_rkip.split(".")[2]; + this.ruleForm1.clgl_rkip4 = res.clgl_rkip.split(".")[3]; + this.ruleForm1.clgl_rkwg1 = res.clgl_rkwg.split(".")[0]; + this.ruleForm1.clgl_rkwg2 = res.clgl_rkwg.split(".")[1]; + this.ruleForm1.clgl_rkwg3 = res.clgl_rkwg.split(".")[2]; + this.ruleForm1.clgl_rkwg4 = res.clgl_rkwg.split(".")[3]; + this.ruleForm1.clgl_ckwg1 = res.clgl_ckwg.split(".")[0]; + this.ruleForm1.clgl_ckwg2 = res.clgl_ckwg.split(".")[1]; + this.ruleForm1.clgl_ckwg3 = res.clgl_ckwg.split(".")[2]; + this.ruleForm1.clgl_ckwg4 = res.clgl_ckwg.split(".")[3]; + this.ruleForm1.clgl_name = res.clgl_name; + this.ruleForm1.clgl_xy = res.clgl_xy; + this.ruleForm1.clgl_gzms = res.clgl_gzms; + this.ruleForm1.clgl_mddk = res.clgl_mddk; + this.ruleForm1.clgl_ydx = res.clgl_ydx; + this.ruleForm1.clgl_ydk = res.clgl_ydk; + this.ruleForm1.clgl_mddk = res.clgl_mddk; + this.ruleForm1.clgl_dldk = res.clgl_dldk; + this.ruleForm1.clgl_rkwk = res.clgl_rkwk; + this.ruleForm1.clgl_wdyml = res.clgl_wdyml; + this.ruleForm1.clgl_ckwk = res.clgl_ckwk; + this.tableData1 = [ + { + cmdlist_ml: res.cmdlist_ml, + cmdlist_sbid: res.cmdlist_sbid, + cmdlist_qsdz: res.cmdlist_qsdz, + cmdlist_dzcd: res.cmdlist_dzcd, + cmdlist_ms: res.cmdlist_ms, + cmdlist_dz: res.cmdlist_dz, + }, + ]; + } } }, //新增命令-保存 @@ -1018,8 +1020,8 @@ export default { //拿缓存数据 var json = JSON.parse(sessionStorage.getItem("GYWZ_yx")); let { data } = await SaveUserAnswer({ - mark: "GYWZ_yx", - user_id: "USER202307301114011710", + mark: `${this.$store.state.type}`, + user_id: `${this.$route.query.id}`, mark_value: JSON.stringify({ ...json, ...obj }), }); if (data.state) { @@ -1044,8 +1046,8 @@ export default { obj.cmdlist_dz = ""; localStorage.setItem("GYWZ_yx", JSON.stringify(obj)); let { data } = await SaveUserAnswer({ - mark: "GYWZ_yx", - user_id: "USER202307301114011710", + mark: `${this.$store.state.type}`, + user_id: `${this.$route.query.id}`, mark_value: JSON.stringify(obj), }); if (data.state) { diff --git a/src/components/ChiWireld.vue b/src/components/ChiWireld.vue index 0e98c02..f2e1fc0 100644 --- a/src/components/ChiWireld.vue +++ b/src/components/ChiWireld.vue @@ -11,11 +11,25 @@
- + - - + + @@ -23,7 +37,11 @@ - + @@ -69,7 +87,11 @@ - + @@ -185,7 +207,7 @@ export default { let that = this; window.getParameter = that.getParameter; }, - mounted() { }, + mounted() {}, methods: { getParameter(data) { @@ -262,8 +284,9 @@ export default { }); this.loading = false; console.log(data); - if (data.data && data.state) { + if (data.data !== null && data.state) { var obj = JSON.parse(data.data.mark_value); + console.log(obj); this.formData.ippz_wllx = obj.ippz_wllx; if (obj.ippz_ip) { this.ippz_ip1 = obj.ippz_ip.split(".")[0]; diff --git a/src/components/CloneView.vue b/src/components/CloneView.vue index e60687a..6f5a4e1 100644 --- a/src/components/CloneView.vue +++ b/src/components/CloneView.vue @@ -4,15 +4,30 @@
- + @@ -28,7 +43,12 @@ MQTT Client - + @@ -38,30 +58,50 @@ - + - + . - + . - + . - + @@ -70,29 +110,63 @@ - - + + - - + + - + - + - - + + @@ -107,19 +181,39 @@ - - + + - - + + - + @@ -148,16 +242,24 @@ @@ -168,8 +270,14 @@
- + 保 存 @@ -488,7 +596,6 @@ export default { }, }; }, - methods: { //编辑 edit(event) { @@ -619,16 +726,16 @@ export default { user_id: "USER202307301114011710", data: JSON.stringify(this.trees), type: "1", - }) + }); console.log(result); }, async getTree() { - console.log("12341") - let res = await GetTree({ user_id: "USER202307301114011710", type: "1", }) + console.log("12341"); + let res = await GetTree({ user_id: "USER202307301114011710", type: "1" }); console.log(res); console.log(JSON.parse(res.data.data.data)); this.trees = JSON.parse(res.data.data.data); - } + }, }, directives: { "click-outside": { diff --git a/src/components/GatewayConfiguration.vue b/src/components/GatewayConfiguration.vue index 5b13f3e..c360aef 100644 --- a/src/components/GatewayConfiguration.vue +++ b/src/components/GatewayConfiguration.vue @@ -252,7 +252,7 @@ export default { async GetUserAnswer() { let { data } = await GetUserAnswer({ mark: "YDPZYM_wgpz", - user_id: "USER202307301114011710", + user_id: `${this.user_id}`, }); console.log(data.data); if (data.data && data.state) { @@ -263,7 +263,7 @@ export default { async SaveUserAnswer() { let { data } = await SaveUserAnswer({ mark: "YDPZYM_wgpz", - user_id: "USER202307301114011710", + user_id: `${this.user_id}`, mark_value: JSON.stringify(this.wgpz), }); if (data.state) { diff --git a/src/components/GatewayMaintenance.vue b/src/components/GatewayMaintenance.vue index 8958efb..0437f03 100644 --- a/src/components/GatewayMaintenance.vue +++ b/src/components/GatewayMaintenance.vue @@ -266,7 +266,7 @@ export default { async GetUserAnswer() { let { data } = await GetUserAnswer({ mark: "YDPZYM_wgwh", - user_id: "USER202307301114011710", + user_id: `${this.user_id}`, }); console.log(data); if (data.data && data.state) { @@ -329,7 +329,7 @@ export default { async SaveUserAnswer() { let { data } = await SaveUserAnswer({ mark: "YDPZYM_wgwh", - user_id: "USER202307301114011710", + user_id: `${this.user_id}`, mark_value: JSON.stringify(this.tableData), }); if (data.state) { diff --git a/src/components/IpConfiguration.vue b/src/components/IpConfiguration.vue index e9768f2..833c173 100644 --- a/src/components/IpConfiguration.vue +++ b/src/components/IpConfiguration.vue @@ -1,11 +1,22 @@