From 43f86a16dc1db9501dc9dbd74a1ca01829022423 Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Tue, 23 May 2023 20:36:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=98=E5=88=B6=E5=9B=BE=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/api/index.js | 11 +++ src/views/Login.vue | 32 ++++---- src/views/components/carouselChart.vue | 6 +- .../components/pictureTags.vue | 79 +++++++++++++++---- src/views/realTimeMonitor/index.vue | 26 ++++++ 5 files changed, 124 insertions(+), 30 deletions(-) diff --git a/src/utils/api/index.js b/src/utils/api/index.js index 58c2089..4627699 100644 --- a/src/utils/api/index.js +++ b/src/utils/api/index.js @@ -505,3 +505,14 @@ export function delUserApi(data) { }, }); } +//绘制坐标保存 +export function updateCoordinate(data) { + return request({ + url: "/api/updateCoordinate", + method: "post", + data, + // headers: { + // "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", + // }, + }); +} diff --git a/src/views/Login.vue b/src/views/Login.vue index 77d38d8..a8408bb 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -70,8 +70,8 @@ export default { data: function () { return { userInfo: { - userName: "", - password: "", + userName: "xytest", + password: "123456", //verificationCode: "", }, rules: { @@ -99,18 +99,22 @@ export default { this.$refs.loginForm.validate((valid) => { if (valid) { // this.userInfo.password = this.$md5(this.userInfo.password); //密码加密 - loginJoggle(this.userInfo) - .then((res) => { - if (res.code == 200) { - this.$store.commit("SET_TOKEN", res.data.sessionId); //将token保存在vuex中 - this.$store.commit("SET_USERINFO", res.data); //将用户信息保存在vuex中 - this.$router.push("/realTimeMonitor"); - this.$message.success("登录成功"); - } else { - this.$message.error(res.msg); - } - }) - .catch((err) => {}); + this.$store.commit("SET_TOKEN", "asdadadadadsadas"); //将token保存在vuex中 + this.$store.commit("SET_USERINFO", "xytest"); //将用户信息保存在vuex中 + this.$router.push("/realTimeMonitor"); + this.$message.success("登录成功"); + // loginJoggle(this.userInfo) + // .then((res) => { + // if (res.code == 200) { + // this.$store.commit("SET_TOKEN", res.data.sessionId); //将token保存在vuex中 + // this.$store.commit("SET_USERINFO", res.data); //将用户信息保存在vuex中 + // this.$router.push("/realTimeMonitor"); + // this.$message.success("登录成功"); + // } else { + // this.$message.error(res.msg); + // } + // }) + // .catch((err) => {}); } else { this.$message.error("请输入账号和密码"); console.log("error submit!!"); diff --git a/src/views/components/carouselChart.vue b/src/views/components/carouselChart.vue index 863a64a..66a1dab 100644 --- a/src/views/components/carouselChart.vue +++ b/src/views/components/carouselChart.vue @@ -205,7 +205,7 @@ export default { console.log(localStorage.getItem("piclinePoints")); }); - this.localPoints = JSON.parse(localStorage.getItem("piclinePoints")); + this.localPoints = this.terminalPhoto[0].list; console.log(this.localPoints); if (this.localPoints !== "") { this.drawline(); @@ -255,6 +255,10 @@ export default { this.ctx.closePath(); this.ctx.stroke(); }, + //不显示绘制线 + handelClear() { + this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); + }, getphotoList() { this.fiveList = this.terminalPhoto.slice( (this.page - 1) * this.pagesize, diff --git a/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue b/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue index 8c84a2e..84f4bc8 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue @@ -7,11 +7,8 @@ width="1262px" >
-
- +
+
+
+ +
@@ -36,12 +36,16 @@

- + @@ -64,7 +68,7 @@

重新绘制 - 保存绘制 +

@@ -76,6 +80,7 @@