绘制图

master
fanluyan 2 years ago
parent 3ddf02e002
commit 3f9b4e2d3e

@ -99,22 +99,22 @@ export default {
this.$refs.loginForm.validate((valid) => { this.$refs.loginForm.validate((valid) => {
if (valid) { if (valid) {
// this.userInfo.password = this.$md5(this.userInfo.password); // // this.userInfo.password = this.$md5(this.userInfo.password); //
this.$store.commit("SET_TOKEN", "asdadadadadsadas"); //tokenvuex // this.$store.commit("SET_TOKEN", "asdadadadadsadas"); //tokenvuex
this.$store.commit("SET_USERINFO", "xytest"); //vuex // this.$store.commit("SET_USERINFO", "xytest"); //vuex
this.$router.push("/realTimeMonitor"); // this.$router.push("/realTimeMonitor");
this.$message.success("登录成功"); // this.$message.success("");
// loginJoggle(this.userInfo) loginJoggle(this.userInfo)
// .then((res) => { .then((res) => {
// if (res.code == 200) { if (res.code == 200) {
// this.$store.commit("SET_TOKEN", res.data.sessionId); //tokenvuex this.$store.commit("SET_TOKEN", res.data.sessionId); //tokenvuex
// this.$store.commit("SET_USERINFO", res.data); //vuex this.$store.commit("SET_USERINFO", res.data); //vuex
// this.$router.push("/realTimeMonitor"); this.$router.push("/realTimeMonitor");
// this.$message.success(""); this.$message.success("登录成功");
// } else { } else {
// this.$message.error(res.msg); this.$message.error(res.msg);
// } }
// }) })
// .catch((err) => {}); .catch((err) => {});
} else { } else {
this.$message.error("请输入账号和密码"); this.$message.error("请输入账号和密码");
console.log("error submit!!"); console.log("error submit!!");

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

Loading…
Cancel
Save