|
@@ -63,6 +63,7 @@
|
|
<el-select v-model="selectArea2" @change="typeChangeArea2" class="selectBox">
|
|
<el-select v-model="selectArea2" @change="typeChangeArea2" class="selectBox">
|
|
<el-option label="全部" value=""></el-option>
|
|
<el-option label="全部" value=""></el-option>
|
|
<!-- <el-option label="南山区" :value="0"></el-option> -->
|
|
<!-- <el-option label="南山区" :value="0"></el-option> -->
|
|
|
|
+ <el-option :label="item.dest" :value="item.dest" v-for="(item,index) in areaArray" :key="index"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<div class="dataBox">
|
|
<div class="dataBox">
|
|
@@ -96,9 +97,10 @@
|
|
<div class="bottom">
|
|
<div class="bottom">
|
|
<div class="titleBox">
|
|
<div class="titleBox">
|
|
<div class="title">课程排行榜</div>
|
|
<div class="title">课程排行榜</div>
|
|
- <el-select v-model="selectArea3" @change="typeChangeArea2" class="selectBox">
|
|
|
|
|
|
+ <el-select v-model="selectArea3" @change="typeChangeArea3" class="selectBox">
|
|
<el-option label="全部" value=""></el-option>
|
|
<el-option label="全部" value=""></el-option>
|
|
<!-- <el-option label="南山区" :value="0"></el-option> -->
|
|
<!-- <el-option label="南山区" :value="0"></el-option> -->
|
|
|
|
+ <el-option :label="item.dest" :value="item.dest" v-for="(item,index) in areaArray" :key="index"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<div class="dataBox">
|
|
<div class="dataBox">
|
|
@@ -155,21 +157,25 @@ export default {
|
|
loginCountYearArray:{},
|
|
loginCountYearArray:{},
|
|
monthArray:[],
|
|
monthArray:[],
|
|
schoolRankData:[
|
|
schoolRankData:[
|
|
- {schoolName:"深圳市南山实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
- {schoolName:"海滨实验小学逾...",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
- {schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
- {schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
- {schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
- {schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
- {schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
- {schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
|
|
+ // {schoolName:"深圳市南山实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
+ // {schoolName:"海滨实验小学逾...",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
+ // {schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
+ // {schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
+ // {schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
+ // {schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
+ // {schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
|
|
+ // {schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
|
|
],
|
|
],
|
|
|
|
+ schoolRankData2: [],
|
|
courseRankData:[
|
|
courseRankData:[
|
|
],
|
|
],
|
|
|
|
+ courseRankData2:[
|
|
|
|
+ ],
|
|
weekCourse2:[
|
|
weekCourse2:[
|
|
],
|
|
],
|
|
selectArea2:"",
|
|
selectArea2:"",
|
|
selectArea3:"",
|
|
selectArea3:"",
|
|
|
|
+ areaArray: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -231,6 +237,16 @@ export default {
|
|
toWeek: currentMonthDates, //本月
|
|
toWeek: currentMonthDates, //本月
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ typeChangeArea2(){
|
|
|
|
+ this.schoolRankData = this.schoolRankData2.filter(el => {
|
|
|
|
+ return this.selectArea2 == '' ? el : el.dest == this.selectArea2
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ typeChangeArea3(){
|
|
|
|
+ this.courseRankData = this.courseRankData2.filter(el => {
|
|
|
|
+ return this.selectArea3 == '' ? el : el.dest == this.selectArea3
|
|
|
|
+ })
|
|
|
|
+ },
|
|
getData() {
|
|
getData() {
|
|
this.isLoading = true;
|
|
this.isLoading = true;
|
|
let params = [
|
|
let params = [
|
|
@@ -297,7 +313,7 @@ export default {
|
|
let _courseNow = []
|
|
let _courseNow = []
|
|
for (var i = 0; i < _courseRank.length; i++) {
|
|
for (var i = 0; i < _courseRank.length; i++) {
|
|
_courseLastWeek.push({courseId:_courseRank[i].courseId,title:_courseRank[i].title,total:_courseRank[i].lastweek})
|
|
_courseLastWeek.push({courseId:_courseRank[i].courseId,title:_courseRank[i].title,total:_courseRank[i].lastweek})
|
|
- _courseNow.push({courseId:_courseRank[i].courseId,title:_courseRank[i].title,total:_courseRank[i].week,compare:0})
|
|
|
|
|
|
+ _courseNow.push({courseId:_courseRank[i].courseId,title:_courseRank[i].title,total:_courseRank[i].week,compare:0, dest: _courseRank[i].dest})
|
|
}
|
|
}
|
|
_courseLastWeek = _courseLastWeek.sort((a,b)=>b.total - a.total)
|
|
_courseLastWeek = _courseLastWeek.sort((a,b)=>b.total - a.total)
|
|
|
|
|
|
@@ -309,7 +325,7 @@ export default {
|
|
})
|
|
})
|
|
return item
|
|
return item
|
|
})
|
|
})
|
|
- this.courseRankData = _courseNow
|
|
|
|
|
|
+ this.courseRankData = this.courseRankData2 = _courseNow
|
|
|
|
|
|
let _userOnlineTime = (res.data[7][0].time / 60 / 60).toFixed(0); //在线时间
|
|
let _userOnlineTime = (res.data[7][0].time / 60 / 60).toFixed(0); //在线时间
|
|
this.yearArray = this.OnlineDuration[0] = _userOnlineTime
|
|
this.yearArray = this.OnlineDuration[0] = _userOnlineTime
|
|
@@ -390,7 +406,8 @@ export default {
|
|
}
|
|
}
|
|
this.weekCourse2 = weekCourse2;
|
|
this.weekCourse2 = weekCourse2;
|
|
|
|
|
|
-
|
|
|
|
|
|
+ this.areaArray = res.data[12]
|
|
|
|
+ this.schoolRankData = this.schoolRankData2 = res.data[13]
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
})
|
|
})
|
|
.catch((err) => {
|
|
.catch((err) => {
|