|
@@ -212,7 +212,11 @@ export default {
|
|
|
},
|
|
|
Submits() {
|
|
|
// console.log(typeof(this.tiwen));
|
|
|
- if (Number (this.tiwen )>45||Number(this.tiwen<30)|| this.tiwen=="") {
|
|
|
+ if (
|
|
|
+ Number(this.tiwen) > 45 ||
|
|
|
+ Number(this.tiwen < 30) ||
|
|
|
+ this.tiwen == ""
|
|
|
+ ) {
|
|
|
this.$toast("体温请填写30~45");
|
|
|
} else {
|
|
|
// console.log(this.name);
|
|
@@ -271,7 +275,7 @@ export default {
|
|
|
// console.log(this.textareas);
|
|
|
}
|
|
|
console.log(this.times);
|
|
|
- console.log(typeof(this.tiwen) );
|
|
|
+ console.log(typeof this.tiwen);
|
|
|
this.$http
|
|
|
.post(
|
|
|
"http://zaoquan.nxjiewei.com:8011/api/workbench/epidemic_situation/clock_in",
|
|
@@ -290,8 +294,14 @@ export default {
|
|
|
)
|
|
|
.then((res) => {
|
|
|
// console.log(res);
|
|
|
- this.$router.push("/zaoquan/yiqing/yiqing");
|
|
|
- }).catch(res=>{
|
|
|
+ this.$dialog.alert({
|
|
|
+ message: "提交成功",
|
|
|
+ });
|
|
|
+ var myinfo=setInterval(window.history.back(),2000)
|
|
|
+ clearInterval(myinfo);
|
|
|
+ // this.$router.push(`/zaoquan/yiqing/yiqing?toen=${this.token}`);
|
|
|
+ })
|
|
|
+ .catch((res) => {
|
|
|
console.log(res);
|
|
|
});
|
|
|
}
|
|
@@ -335,6 +345,10 @@ export default {
|
|
|
// console.log(this.token);
|
|
|
// sessionStorage.setItem("mytoken", this.token); //存入token值
|
|
|
this.getxinxi();
|
|
|
+ // this.myinfo=setInterval(this.Submits,this.$router.push(`/zaoquan/yiqing/yiqing?toen=${this.token}`), 2000);
|
|
|
+ },
|
|
|
+ beforeDestroy() {
|
|
|
+ clearInterval(this.myinfo); //销毁阶段清除定时器
|
|
|
},
|
|
|
};
|
|
|
</script>
|