绘制图

master
fanluyan 2 years ago
parent 3ddf02e002
commit 3f9b4e2d3e

@ -99,22 +99,22 @@ export default {
this.$refs.loginForm.validate((valid) => {
if (valid) {
// this.userInfo.password = this.$md5(this.userInfo.password); //
this.$store.commit("SET_TOKEN", "asdadadadadsadas"); //tokenvuex
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); //tokenvuex
// 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"); //tokenvuex
// 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); //tokenvuex
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!!");

@ -172,7 +172,7 @@ export default {
},
mousedown(e) {
console.log("鼠标落下");
//console.log("");
this.saveDrawingSurface();
this.flag = true;
this.x = e.offsetX; // X
@ -181,7 +181,7 @@ export default {
console.log(this.flag);
},
mouseup(e) {
console.log("鼠标抬起");
//console.log("");
console.log(
this.x / this.imgpic.width,
this.y / this.imgpic.height,
@ -214,7 +214,7 @@ export default {
},
mousemove(e) {
console.log("鼠标移动");
//console.log("");
if (this.flag) {
this.restoreDrawingSurface();
this.drawRect(e);

Loading…
Cancel
Save