diff --git a/src/api/APIindex.js b/src/api/APIindex.js index f06727d..36ac680 100644 --- a/src/api/APIindex.js +++ b/src/api/APIindex.js @@ -13,8 +13,12 @@ // 添加headers到post请求中 // config.headers.post['Content-Type'] = 'application/json;charset=utf-8'; // let USERNO = JSON.parse(locasto.getItem('USERNO')); + config.headers.post['Content-Type'] = 'application/json;charset=utf-8'; + if (config.url == "http://www.yunplc.com:7080/exlog" || config.url.indexOf("120.27.155.137:7080") != -1) { + return config; + } let USERNO = locasto.getItem('USERNO'); - console.log(USERNO) + // console.log(USERNO) if (USERNO) { config.headers.USERNO = USERNO; } diff --git a/src/api/APIindex.js b/src/api/APIindex.js index f06727d..36ac680 100644 --- a/src/api/APIindex.js +++ b/src/api/APIindex.js @@ -13,8 +13,12 @@ // 添加headers到post请求中 // config.headers.post['Content-Type'] = 'application/json;charset=utf-8'; // let USERNO = JSON.parse(locasto.getItem('USERNO')); + config.headers.post['Content-Type'] = 'application/json;charset=utf-8'; + if (config.url == "http://www.yunplc.com:7080/exlog" || config.url.indexOf("120.27.155.137:7080") != -1) { + return config; + } let USERNO = locasto.getItem('USERNO'); - console.log(USERNO) + // console.log(USERNO) if (USERNO) { config.headers.USERNO = USERNO; } diff --git a/src/components/NFCloudPlatform/Attic.vue b/src/components/NFCloudPlatform/Attic.vue index b632b05..c259fa3 100644 --- a/src/components/NFCloudPlatform/Attic.vue +++ b/src/components/NFCloudPlatform/Attic.vue @@ -136,9 +136,9 @@ message: Ary[2], type: "warning" }); - this.$router.push({ - path: "/login" - }); + // this.$router.push({ + // path: "/login" + // }); } }); }, @@ -199,7 +199,8 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(4); + // this.record(4); + this.$http.post(this.nozzle.engineeringWorkOpenPump).then(res => {});//开水泵 this.flag = true; this.readStatue(); this.$message({ @@ -254,7 +255,8 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(5); + // this.record(5); + this.$http.post(this.nozzle.engineeringWorkClosePump).then(res => {});//关水泵 this.flag = false; this.readStatue(); this.$message({ @@ -280,7 +282,8 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(6); + // this.record(6); + this.$http.post(this.nozzle.engineeringWorkopenValve).then(res => {});//开阀门 this.flag1 = true; this.readStatue(); this.$message({ @@ -301,7 +304,8 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(7); + // this.record(7); + this.$http.post(this.nozzle.engineeringWorkcloseValve).then(res => {});//关阀门 this.flag1 = false; this.readStatue(); this.$message({ @@ -361,12 +365,12 @@ return Ary; }, record(type) { - let url = "/dataApi/LogCloudPlatformsController/addPlatformsLog"; - let params = { - log_user_name: this.userName, - log_type: type - }; - this.$http.post(url, params).then(res => {}); + // let url = "/dataApi/LogCloudPlatformsController/addPlatformsLog"; + // let params = { + // log_user_name: this.userName, + // log_type: type + // }; + // this.$http.post(url, params).then(res => {}); } }, mounted: function() { diff --git a/src/api/APIindex.js b/src/api/APIindex.js index f06727d..36ac680 100644 --- a/src/api/APIindex.js +++ b/src/api/APIindex.js @@ -13,8 +13,12 @@ // 添加headers到post请求中 // config.headers.post['Content-Type'] = 'application/json;charset=utf-8'; // let USERNO = JSON.parse(locasto.getItem('USERNO')); + config.headers.post['Content-Type'] = 'application/json;charset=utf-8'; + if (config.url == "http://www.yunplc.com:7080/exlog" || config.url.indexOf("120.27.155.137:7080") != -1) { + return config; + } let USERNO = locasto.getItem('USERNO'); - console.log(USERNO) + // console.log(USERNO) if (USERNO) { config.headers.USERNO = USERNO; } diff --git a/src/components/NFCloudPlatform/Attic.vue b/src/components/NFCloudPlatform/Attic.vue index b632b05..c259fa3 100644 --- a/src/components/NFCloudPlatform/Attic.vue +++ b/src/components/NFCloudPlatform/Attic.vue @@ -136,9 +136,9 @@ message: Ary[2], type: "warning" }); - this.$router.push({ - path: "/login" - }); + // this.$router.push({ + // path: "/login" + // }); } }); }, @@ -199,7 +199,8 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(4); + // this.record(4); + this.$http.post(this.nozzle.engineeringWorkOpenPump).then(res => {});//开水泵 this.flag = true; this.readStatue(); this.$message({ @@ -254,7 +255,8 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(5); + // this.record(5); + this.$http.post(this.nozzle.engineeringWorkClosePump).then(res => {});//关水泵 this.flag = false; this.readStatue(); this.$message({ @@ -280,7 +282,8 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(6); + // this.record(6); + this.$http.post(this.nozzle.engineeringWorkopenValve).then(res => {});//开阀门 this.flag1 = true; this.readStatue(); this.$message({ @@ -301,7 +304,8 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(7); + // this.record(7); + this.$http.post(this.nozzle.engineeringWorkcloseValve).then(res => {});//关阀门 this.flag1 = false; this.readStatue(); this.$message({ @@ -361,12 +365,12 @@ return Ary; }, record(type) { - let url = "/dataApi/LogCloudPlatformsController/addPlatformsLog"; - let params = { - log_user_name: this.userName, - log_type: type - }; - this.$http.post(url, params).then(res => {}); + // let url = "/dataApi/LogCloudPlatformsController/addPlatformsLog"; + // let params = { + // log_user_name: this.userName, + // log_type: type + // }; + // this.$http.post(url, params).then(res => {}); } }, mounted: function() { diff --git a/src/components/NFCloudPlatform/GroundFloor.vue b/src/components/NFCloudPlatform/GroundFloor.vue index 519ad92..8c9e773 100644 --- a/src/components/NFCloudPlatform/GroundFloor.vue +++ b/src/components/NFCloudPlatform/GroundFloor.vue @@ -129,7 +129,11 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(2); + // this.record(2); + + this.$http + .post(this.nozzle.engineeringWorkOpenPump) + .then(res => {}); //开水泵 this.flag = true; this.$message({ message: "水泵开启成功", @@ -171,7 +175,11 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(3); + // this.record(3); + + this.$http + .post(this.nozzle.engineeringWorkClosePump) + .then(res => {}); //关水泵 this.flag = false; this.$message({ message: "水泵已关闭", @@ -231,12 +239,12 @@ return Ary; }, record(type) { - let url = "/dataApi/LogCloudPlatformsController/addPlatformsLog"; - let params = { - log_user_name: this.userName, - log_type: type - }; - this.$http.post(url, params).then(res => {}); + // let url = "/dataApi/LogCloudPlatformsController/addPlatformsLog"; + // let params = { + // log_user_name: this.userName, + // log_type: type + // }; + // this.$http.post(url, params).then(res => {}); } }, mounted: function() { diff --git a/src/api/APIindex.js b/src/api/APIindex.js index f06727d..36ac680 100644 --- a/src/api/APIindex.js +++ b/src/api/APIindex.js @@ -13,8 +13,12 @@ // 添加headers到post请求中 // config.headers.post['Content-Type'] = 'application/json;charset=utf-8'; // let USERNO = JSON.parse(locasto.getItem('USERNO')); + config.headers.post['Content-Type'] = 'application/json;charset=utf-8'; + if (config.url == "http://www.yunplc.com:7080/exlog" || config.url.indexOf("120.27.155.137:7080") != -1) { + return config; + } let USERNO = locasto.getItem('USERNO'); - console.log(USERNO) + // console.log(USERNO) if (USERNO) { config.headers.USERNO = USERNO; } diff --git a/src/components/NFCloudPlatform/Attic.vue b/src/components/NFCloudPlatform/Attic.vue index b632b05..c259fa3 100644 --- a/src/components/NFCloudPlatform/Attic.vue +++ b/src/components/NFCloudPlatform/Attic.vue @@ -136,9 +136,9 @@ message: Ary[2], type: "warning" }); - this.$router.push({ - path: "/login" - }); + // this.$router.push({ + // path: "/login" + // }); } }); }, @@ -199,7 +199,8 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(4); + // this.record(4); + this.$http.post(this.nozzle.engineeringWorkOpenPump).then(res => {});//开水泵 this.flag = true; this.readStatue(); this.$message({ @@ -254,7 +255,8 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(5); + // this.record(5); + this.$http.post(this.nozzle.engineeringWorkClosePump).then(res => {});//关水泵 this.flag = false; this.readStatue(); this.$message({ @@ -280,7 +282,8 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(6); + // this.record(6); + this.$http.post(this.nozzle.engineeringWorkopenValve).then(res => {});//开阀门 this.flag1 = true; this.readStatue(); this.$message({ @@ -301,7 +304,8 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(7); + // this.record(7); + this.$http.post(this.nozzle.engineeringWorkcloseValve).then(res => {});//关阀门 this.flag1 = false; this.readStatue(); this.$message({ @@ -361,12 +365,12 @@ return Ary; }, record(type) { - let url = "/dataApi/LogCloudPlatformsController/addPlatformsLog"; - let params = { - log_user_name: this.userName, - log_type: type - }; - this.$http.post(url, params).then(res => {}); + // let url = "/dataApi/LogCloudPlatformsController/addPlatformsLog"; + // let params = { + // log_user_name: this.userName, + // log_type: type + // }; + // this.$http.post(url, params).then(res => {}); } }, mounted: function() { diff --git a/src/components/NFCloudPlatform/GroundFloor.vue b/src/components/NFCloudPlatform/GroundFloor.vue index 519ad92..8c9e773 100644 --- a/src/components/NFCloudPlatform/GroundFloor.vue +++ b/src/components/NFCloudPlatform/GroundFloor.vue @@ -129,7 +129,11 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(2); + // this.record(2); + + this.$http + .post(this.nozzle.engineeringWorkOpenPump) + .then(res => {}); //开水泵 this.flag = true; this.$message({ message: "水泵开启成功", @@ -171,7 +175,11 @@ .then(res => { var Ary = this.formatterData(res.data); if (Ary[0] == "OK" && Ary[2] == 0) { - this.record(3); + // this.record(3); + + this.$http + .post(this.nozzle.engineeringWorkClosePump) + .then(res => {}); //关水泵 this.flag = false; this.$message({ message: "水泵已关闭", @@ -231,12 +239,12 @@ return Ary; }, record(type) { - let url = "/dataApi/LogCloudPlatformsController/addPlatformsLog"; - let params = { - log_user_name: this.userName, - log_type: type - }; - this.$http.post(url, params).then(res => {}); + // let url = "/dataApi/LogCloudPlatformsController/addPlatformsLog"; + // let params = { + // log_user_name: this.userName, + // log_type: type + // }; + // this.$http.post(url, params).then(res => {}); } }, mounted: function() { diff --git a/src/components/NFCloudPlatform/RealTime.vue b/src/components/NFCloudPlatform/RealTime.vue index 4b84a51..481b3b7 100644 --- a/src/components/NFCloudPlatform/RealTime.vue +++ b/src/components/NFCloudPlatform/RealTime.vue @@ -1,7 +1,15 @@