master
fanluyan 2 years ago
parent b84abc4256
commit 176a3d89c1

@ -91,19 +91,26 @@ export default {
// identifyCodes: "1234567890abcdefjhijklinopqrsduvwxyz", // identifyCodes: "1234567890abcdefjhijklinopqrsduvwxyz",
}; };
}, },
computed: {}, computed: {
...mapMutations(["SET_TOKEN", "SET_USERINFO"]),
},
methods: { methods: {
submitForm() { submitForm() {
this.$refs.loginForm.validate((valid) => { this.$refs.loginForm.validate((valid) => {
if (valid) { if (valid) {
console.log(valid); // this.userInfo.password = this.$md5(this.userInfo.password); //
//console.log(this.userInfo.verificationCode); loginJoggle(this.userInfo)
//this.userInfo.password = this.$md5(this.userInfo.password); // .then((res) => {
this.token = this.$md5(this.userInfo.password); //token if (res.code == 200) {
this.$store.commit("SET_TOKEN", this.token); //tokenvuex this.$store.commit("SET_TOKEN", res.data.sessionId); //tokenvuex
this.$store.commit("SET_USERINFO", this.userInfo.username); //vuex this.$store.commit("SET_USERINFO", res.data); //vuex
this.$router.push("/realTimeMonitor"); this.$router.push("/realTimeMonitor");
this.$message.success("登录成功"); this.$message.success("登录成功");
} else {
this.$message.error(res.msg);
}
})
.catch((err) => {});
} else { } else {
this.$message.error("请输入账号和密码"); this.$message.error("请输入账号和密码");
console.log("error submit!!"); console.log("error submit!!");

@ -434,8 +434,8 @@ export default {
}, },
handleWarn() { handleWarn() {
console.log("声光报警"); console.log("声光报警");
console.log(this.newTermId); console.log(this.cmdid);
alarmMarkJoggle({ termid: this.newTermId }) alarmMarkJoggle({ cmdId: this.cmdid, ctrl: 1 })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 200) {

Loading…
Cancel
Save