|
|
@@ -37,11 +37,12 @@
|
|
|
</em>
|
|
|
</div>
|
|
|
</li>
|
|
|
- <li @click="goPage('lesson')">
|
|
|
+ <li @click="goPage('lesson')" v-if="userLevel != 3">
|
|
|
<img src="../assets/img/main/lesson.png" height="54" width="54"/>
|
|
|
<div class="liRight">
|
|
|
<h5>课程数量</h5>
|
|
|
- <span>{{ ClassNum }}</span>
|
|
|
+ <span>{{ ClassNum }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
<div class="btLine">
|
|
|
<em class="emlt">
|
|
|
@@ -50,6 +51,24 @@
|
|
|
</em>
|
|
|
</div>
|
|
|
</li>
|
|
|
+ <li @click="goPage('lesson')" v-if="userLevel == 3">
|
|
|
+ <img src="../assets/img/main/lesson.png" height="54" width="54"/>
|
|
|
+ <div class="liRight">
|
|
|
+ <h5>剩余课时</h5>
|
|
|
+ <span>{{ TotalRemainNormalhour + TotalRemainGifthour}}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="btLine">
|
|
|
+ <em class="emlt">
|
|
|
+ <i class="el-icon-caret-top"></i>
|
|
|
+ 正常课时 {{ TotalRemainNormalhour }}
|
|
|
+ </em>
|
|
|
+ <em class="emlt">
|
|
|
+ <i class="el-icon-caret-top"></i>
|
|
|
+ 赠送课时 {{ TotalRemainGifthour }}
|
|
|
+ </em>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
|
|
|
@@ -72,9 +91,13 @@
|
|
|
<em>
|
|
|
|
|
|
</em>
|
|
|
- <el-button type="primary" plain @click="goFinish(c)" v-if="c.FinishClass == 0">上课</el-button>
|
|
|
- <el-button type="primary" plain @click="checkClassOverPrepare(c)" v-if="c.FinishClass == 2">管理</el-button>
|
|
|
- <el-button type="primary" plain @click="goFinish(c)" v-if="c.FinishClass == 3">编辑</el-button>
|
|
|
+ <el-button type="primary" plain @click="goFinish(c)" v-if="c.FinishClass == 0">上课
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" plain @click="checkClassOverPrepare(c)" v-if="c.FinishClass == 2">
|
|
|
+ 管理
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" plain @click="goFinish(c)" v-if="c.FinishClass == 3">编辑
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</li>
|
|
|
<span class="tips" v-if="PreFinishList == 0">
|
|
|
@@ -166,6 +189,7 @@
|
|
|
ClassStatistics,
|
|
|
ClassOverPrepare,
|
|
|
VipUserOrderQuery,
|
|
|
+ ClassHourStatistics,
|
|
|
LastOrderQuery,
|
|
|
} from "../api/getApiRes";
|
|
|
|
|
|
@@ -189,15 +213,18 @@
|
|
|
TodayOrderNum: 0,
|
|
|
ClassNum: 0,
|
|
|
TodayOrderSttNum: 0,
|
|
|
+ TotalRemainNormalhour: 0,
|
|
|
+ TotalRemainGifthour: 0,
|
|
|
+ userLevel: localStorage.userLevel,
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
let that = this;
|
|
|
-
|
|
|
// 下课管理
|
|
|
this.getVipUserStatistics();
|
|
|
this.getClassStatistics();
|
|
|
this.ClassQuery();
|
|
|
+ this.getClassHourStatistics();
|
|
|
this.getVipUserOrderQuery();
|
|
|
// 预约统计
|
|
|
this.getOrderStatistics();
|
|
|
@@ -211,6 +238,21 @@
|
|
|
this.getWaitingBeginClassList();
|
|
|
}, 10000);
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ $route(to) {
|
|
|
+ if (to.name == 'Main') {
|
|
|
+ this.getVipUserStatistics();
|
|
|
+ this.getClassStatistics();
|
|
|
+ this.ClassQuery();
|
|
|
+ this.getClassHourStatistics();
|
|
|
+ this.getVipUserOrderQuery();
|
|
|
+ this.getOrderStatistics();
|
|
|
+ this.getWaitingBeginClassList();
|
|
|
+ } else {
|
|
|
+ clearInterval(this.timer);//页面销毁时清除定时器
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
destroyed() {
|
|
|
clearInterval(this.timer);//页面销毁时清除定时器
|
|
|
},
|
|
|
@@ -253,11 +295,11 @@
|
|
|
that.CountAdd = json.Rs.CountAdd;
|
|
|
} else {
|
|
|
if (json.Code == 1010) {
|
|
|
- that.$message.error(json.Memo);
|
|
|
+ that.$message.error(json.Memo + '错误码:' + json.Code);
|
|
|
that.$router.push({path: '/login', query: {status: 1}});
|
|
|
return false
|
|
|
} else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
+ that.$message.error(json.Memo + '错误码:' + json.Code);
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -275,7 +317,7 @@
|
|
|
that.ClassNum = json.Rs.ClassNum;
|
|
|
that.TodayOrderSttNum = json.Rs.TodayOrderSttNum;
|
|
|
} else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
+ that.$message.error(json.Memo + '错误码:' + json.Code);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -296,7 +338,7 @@
|
|
|
that.YestodayOrderNum = json.Rs.YestodayOrderNum;
|
|
|
}
|
|
|
} else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
+ that.$message.error(json.Memo + '错误码:' + json.Code);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -336,7 +378,7 @@
|
|
|
that.loading = false;
|
|
|
that.classList = json.Rs;
|
|
|
} else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
+ that.$message.error(json.Memo + '错误码:' + json.Code);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -355,6 +397,22 @@
|
|
|
if (json.Rs) {
|
|
|
that.PreFinishList = json.Rs;
|
|
|
}
|
|
|
+ } else {
|
|
|
+ that.$message.error(json.Memo + '错误码:' + json.Code);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getClassHourStatistics() {
|
|
|
+ let that = this;
|
|
|
+ let param = {
|
|
|
+ token: localStorage.token,
|
|
|
+ };
|
|
|
+ let postdata = qs.stringify(param);
|
|
|
+ ClassHourStatistics(postdata).then(res => {
|
|
|
+ let json = res;
|
|
|
+ if (json.Code == 0) {
|
|
|
+ that.TotalRemainNormalhour = json.Rs.TotalRemainNormalhour;
|
|
|
+ that.TotalRemainGifthour = json.Rs.TotalRemainGifthour;
|
|
|
} else {
|
|
|
that.$message.error(json.Memo);
|
|
|
}
|
|
|
@@ -380,7 +438,7 @@
|
|
|
that.appointList = json.Rs;
|
|
|
}
|
|
|
} else {
|
|
|
- that.$message.error(json.Memo);
|
|
|
+ that.$message.error(json.Memo + '错误码:' + json.Code);
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -395,20 +453,6 @@
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
- watch: {
|
|
|
- $route(to) {
|
|
|
- if (to.name == 'Main') {
|
|
|
- this.getVipUserStatistics();
|
|
|
- this.getClassStatistics();
|
|
|
- this.ClassQuery();
|
|
|
- this.getVipUserOrderQuery();
|
|
|
- this.getOrderStatistics();
|
|
|
- this.getWaitingBeginClassList();
|
|
|
- } else {
|
|
|
- clearInterval(this.timer);//页面销毁时清除定时器
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
@@ -500,6 +544,11 @@
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
|
|
|
+ .liRight em {
|
|
|
+ font-size: 14px;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+
|
|
|
.btLine {
|
|
|
width: 84%;
|
|
|
overflow: hidden;
|
|
|
@@ -601,11 +650,13 @@
|
|
|
border-top-right-radius: 7px;
|
|
|
color: #000;
|
|
|
}
|
|
|
+
|
|
|
li .finListTitle em {
|
|
|
float: left;
|
|
|
color: #fff;
|
|
|
padding-left: 5%;
|
|
|
}
|
|
|
+
|
|
|
li .finListTitle s {
|
|
|
float: right;
|
|
|
text-decoration: none;
|
|
|
@@ -635,6 +686,7 @@
|
|
|
line-height: 30px;
|
|
|
color: #BDBDBD;
|
|
|
}
|
|
|
+
|
|
|
.context button {
|
|
|
height: 30px;
|
|
|
line-height: 30px;
|
|
|
@@ -965,6 +1017,12 @@
|
|
|
margin-top: 180px;
|
|
|
}
|
|
|
|
|
|
+ .esmall {
|
|
|
+ float: right;
|
|
|
+ font-size: 14px;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+
|
|
|
/*ipad only*/
|
|
|
@media only screen and (max-width: 1366px) {
|
|
|
.container {
|