|
@@ -237,8 +237,6 @@
|
|
|
this.opt = options;
|
|
this.opt = options;
|
|
|
await req.silenceLogin(options.tjuid?options.tjuid:'', '');
|
|
await req.silenceLogin(options.tjuid?options.tjuid:'', '');
|
|
|
this.getTeamInfo();
|
|
this.getTeamInfo();
|
|
|
- this.getTeamRank()
|
|
|
|
|
- this.getMyRank()
|
|
|
|
|
this.getOfficeList();
|
|
this.getOfficeList();
|
|
|
this.userInfo = req.getStorage('userInfo');
|
|
this.userInfo = req.getStorage('userInfo');
|
|
|
this.isOpenWeRunData = req.getStorage('isOpenWeRunData')
|
|
this.isOpenWeRunData = req.getStorage('isOpenWeRunData')
|
|
@@ -271,49 +269,6 @@
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- getTeamRank(){
|
|
|
|
|
- let queryParams = {
|
|
|
|
|
- groupId:this.opt.id,
|
|
|
|
|
- page:1,
|
|
|
|
|
- limit:3,
|
|
|
|
|
- searchType:2
|
|
|
|
|
- }
|
|
|
|
|
- const now = new Date();
|
|
|
|
|
- const year = now.getFullYear();
|
|
|
|
|
- const month = now.getMonth();
|
|
|
|
|
- const date = now.getDate(); // 获取日期
|
|
|
|
|
- const day = now.getDay(); // 获取周几,0-6,0表示周日
|
|
|
|
|
- const _day = day==0?7:day;
|
|
|
|
|
- // 获取周一日期
|
|
|
|
|
- const snow = new Date(year,month,date - _day + 1).setHours(0, 0, 0,0);
|
|
|
|
|
- // 获取周日日期
|
|
|
|
|
- const enow = new Date(new Date(snow).getTime() + 6*24*3600*1000).setHours(23, 59, 59,0);
|
|
|
|
|
- queryParams.startTime = snow/1000
|
|
|
|
|
- queryParams.endTime = enow/1000
|
|
|
|
|
- req.getRequest('/api/v3/wxRun/timeRangeRunRanking',queryParams,data=>{
|
|
|
|
|
- this.teamRank = data.list?data.list:[];
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- getMyRank(){
|
|
|
|
|
- let queryParams = {}
|
|
|
|
|
- const now = new Date();
|
|
|
|
|
- const year = now.getFullYear();
|
|
|
|
|
- const month = now.getMonth();
|
|
|
|
|
- const date = now.getDate(); // 获取日期
|
|
|
|
|
- const day = now.getDay(); // 获取周几,0-6,0表示周日
|
|
|
|
|
- const _day = day==0?7:day;
|
|
|
|
|
- // 获取周一日期
|
|
|
|
|
- const snow = new Date(year,month,date - _day + 1).setHours(0, 0, 0,0);
|
|
|
|
|
- // 获取周日日期
|
|
|
|
|
- const enow = new Date(new Date(snow).getTime() + 6*24*3600*1000).setHours(23, 59, 59,0);
|
|
|
|
|
- queryParams.startTime = snow/1000
|
|
|
|
|
- queryParams.endTime = enow/1000
|
|
|
|
|
- queryParams.groupId = this.opt.id
|
|
|
|
|
- queryParams.searchType = 2
|
|
|
|
|
- req.getRequest('/api/v3/wxRun/timeRangeInfo',queryParams,res=>{
|
|
|
|
|
- this.myRank = res
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
getTeamInfo(){
|
|
getTeamInfo(){
|
|
|
req.getRequest(api.user_team_info+this.opt.id,{},data=>{
|
|
req.getRequest(api.user_team_info+this.opt.id,{},data=>{
|
|
|
this.teamInfo = data;
|
|
this.teamInfo = data;
|