|
@ -24,14 +24,14 @@ |
|
|
|
|
|
|
|
|
<view class="card flex_row flex_between" v-for="(u,ukey) in i.son_list"> |
|
|
<view class="card flex_row flex_between" v-for="(u,ukey) in i.son_list"> |
|
|
<view class="persion flex_row"> |
|
|
<view class="persion flex_row"> |
|
|
<image class="bg-brown" :src="u.member_img" :key="ukey" mode=""></image> |
|
|
|
|
|
|
|
|
<image class="" :src="u.member_img" :key="ukey" mode=""></image> |
|
|
<text>{{u.member_name}}</text> |
|
|
<text>{{u.member_name}}</text> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="btn-box flex_row"> |
|
|
<view class="btn-box flex_row"> |
|
|
<view class="btn state-0 flex_row" v-if="u.is_set_score" @click="openGrade(u)">已打分</view> |
|
|
|
|
|
<view class="btn state-1 flex_row" v-else @click="openGrade(u)">打分</view> |
|
|
|
|
|
<view class="btn state-2 flex_row" @click="openGradeRank(u)">数据</view> |
|
|
|
|
|
|
|
|
<view class="btn state-0 flex_row" v-if="u.is_set_score" @click="openGrade(i,u)">已打分</view> |
|
|
|
|
|
<view class="btn state-1 flex_row" v-else @click="openGrade(i,u)">打分</view> |
|
|
|
|
|
<view class="btn state-2 flex_row" @click="openGradeRank(i,u)">数据</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -52,14 +52,14 @@ |
|
|
|
|
|
|
|
|
<view class="card flex_row flex_between" v-for="(u,ukey) in pageList" :key="ukey"> |
|
|
<view class="card flex_row flex_between" v-for="(u,ukey) in pageList" :key="ukey"> |
|
|
<view class="persion flex_row"> |
|
|
<view class="persion flex_row"> |
|
|
<image class="bg-brown" :src="u.member_img" :key="ukey" mode=""></image> |
|
|
|
|
|
|
|
|
<image class="" :src="u.member_img" :key="ukey" mode=""></image> |
|
|
<text>{{u.member_name}}</text> |
|
|
<text>{{u.member_name}}</text> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="btn-box flex_row"> |
|
|
<view class="btn-box flex_row"> |
|
|
<view class="btn state-0 flex_row" v-if="u.is_set_score" @click="openGrade(u)">已打分</view> |
|
|
|
|
|
<view class="btn state-1 flex_row" v-else @click="openGrade(u)">打分</view> |
|
|
|
|
|
<view class="btn state-2 flex_row" @click="openGradeRank(u)">数据</view> |
|
|
|
|
|
|
|
|
<view class="btn state-0 flex_row" v-if="u.is_set_score" @click="openGrade(i,u)">已打分</view> |
|
|
|
|
|
<view class="btn state-1 flex_row" v-else @click="openGrade(i,u)">打分</view> |
|
|
|
|
|
<view class="btn state-2 flex_row" @click="openGradeRank(i,u)">数据</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -97,11 +97,14 @@ |
|
|
<image class="g-close" src="../../static/images/event/event_close.png" mode="" @click="closeGradeRank()"></image> |
|
|
<image class="g-close" src="../../static/images/event/event_close.png" mode="" @click="closeGradeRank()"></image> |
|
|
<text class="g-title">{{match_name}}数据</text> |
|
|
<text class="g-title">{{match_name}}数据</text> |
|
|
<text class="g-txt">{{gradeDataRank.user.member_name}}分数录入</text> |
|
|
<text class="g-txt">{{gradeDataRank.user.member_name}}分数录入</text> |
|
|
<view class="g-input-box"> |
|
|
|
|
|
<view class="b-item flex_row" v-for="(si,sk) in gradeDataRank.list" :key="sk"> |
|
|
|
|
|
<text>{{si.rank_param_name}}</text> |
|
|
|
|
|
<input type="number" value="" v-model="si.val" placeholder="请录入数据" placeholder-class="place-style"/> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="g-input-box flex_col"> |
|
|
|
|
|
<scroll-view scroll-y="true" class="scroll-Y"> |
|
|
|
|
|
<view class="b-item flex_row" v-for="(si,sk) in gradeDataRank.list" :key="sk"> |
|
|
|
|
|
<text>{{si.rank_param_name}}</text> |
|
|
|
|
|
<input type="number" value="" v-model="si.val" placeholder="请录入数据" placeholder-class="place-style"/> |
|
|
|
|
|
</view> |
|
|
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
|
<!-- <view class="b-item flex_row"> |
|
|
<!-- <view class="b-item flex_row"> |
|
|
<text>助攻</text> |
|
|
<text>助攻</text> |
|
|
<input type="number" value="" placeholder="请录入数据" placeholder-class="place-style"/> |
|
|
<input type="number" value="" placeholder="请录入数据" placeholder-class="place-style"/> |
|
@ -112,7 +115,7 @@ |
|
|
</view> --> |
|
|
</view> --> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="g-tip">请输入成员该赛程最终得分,非累计</view> |
|
|
|
|
|
|
|
|
<view class="g-tip">数据录入会累计到用户原有数据中</view> |
|
|
<view class="g-btn flex_row" @click="saveRank()">保存</view> |
|
|
<view class="g-btn flex_row" @click="saveRank()">保存</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -144,11 +147,11 @@ |
|
|
pageList:[], |
|
|
pageList:[], |
|
|
gradeData:{//打分弹窗数据 |
|
|
gradeData:{//打分弹窗数据 |
|
|
user:"", |
|
|
user:"", |
|
|
score:0 |
|
|
|
|
|
|
|
|
score:"" |
|
|
}, |
|
|
}, |
|
|
gradeDataRank:{//入围数据录入 |
|
|
gradeDataRank:{//入围数据录入 |
|
|
user:"", |
|
|
user:"", |
|
|
score:0, |
|
|
|
|
|
|
|
|
score:"", |
|
|
list:"" |
|
|
list:"" |
|
|
}, |
|
|
}, |
|
|
brand_id:"", |
|
|
brand_id:"", |
|
@ -176,7 +179,7 @@ |
|
|
methods: { |
|
|
methods: { |
|
|
//更新页面列表 |
|
|
//更新页面列表 |
|
|
updatePage() { |
|
|
updatePage() { |
|
|
if(this.listLoadFinished)return this.$tools.showNone("已加载完毕") |
|
|
|
|
|
|
|
|
if(this.listLoadFinished)return console.log("已加载完毕") |
|
|
getPostAPI(this)(this.postData).then(res => { |
|
|
getPostAPI(this)(this.postData).then(res => { |
|
|
this.pageList.push(...res.list) |
|
|
this.pageList.push(...res.list) |
|
|
this.match_name = res.match_name |
|
|
this.match_name = res.match_name |
|
@ -224,7 +227,9 @@ |
|
|
}, |
|
|
}, |
|
|
saveGrade() {//保存分数 |
|
|
saveGrade() {//保存分数 |
|
|
let {score} = this.gradeData |
|
|
let {score} = this.gradeData |
|
|
let {order_no,schedule_son_id,id:schedule_id} = this.gradeData.user |
|
|
|
|
|
|
|
|
score = parseFloat(score) |
|
|
|
|
|
let {order_no,schedule_son_id} = this.gradeData.user |
|
|
|
|
|
let {id:schedule_id} = this.gradeData.item |
|
|
if(score<=0)return this.$tools.showNone("请输入分数"); |
|
|
if(score<=0)return this.$tools.showNone("请输入分数"); |
|
|
getPostAPI(this)(getPostData(this)).then(res => { |
|
|
getPostAPI(this)(getPostData(this)).then(res => { |
|
|
this.$tools.showNone("已保存"); |
|
|
this.$tools.showNone("已保存"); |
|
@ -241,25 +246,31 @@ |
|
|
return [{order_no,schedule_son_id,schedule_id,score},{order_no,score,brand_id}][that.headIndex] |
|
|
return [{order_no,schedule_son_id,schedule_id,score},{order_no,score,brand_id}][that.headIndex] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
openGrade(user) { |
|
|
|
|
|
|
|
|
openGrade(item,user) { |
|
|
this.showGrade = true |
|
|
this.showGrade = true |
|
|
this.gradeData.user = user |
|
|
this.gradeData.user = user |
|
|
this.gradeData.score = "" |
|
|
|
|
|
console.log('open',JSON.stringify(user)); |
|
|
|
|
|
|
|
|
this.gradeData.score = user.score //测试要求回显 |
|
|
|
|
|
this.gradeData.item = item |
|
|
|
|
|
console.log('open',item,JSON.stringify(user)); |
|
|
}, |
|
|
}, |
|
|
closeGrade() { |
|
|
closeGrade() { |
|
|
this.showGrade = false |
|
|
this.showGrade = false |
|
|
|
|
|
this.resetPostData() |
|
|
|
|
|
this.updatePage() |
|
|
console.log('closeGrade'); |
|
|
console.log('closeGrade'); |
|
|
}, |
|
|
}, |
|
|
async openGradeRank(user) { |
|
|
|
|
|
|
|
|
async openGradeRank(item,user) { |
|
|
this.gradeDataRank.user = user |
|
|
this.gradeDataRank.user = user |
|
|
this.gradeDataRank.score = "" |
|
|
|
|
|
|
|
|
this.gradeDataRank.score = user.score //测试要求回显 |
|
|
|
|
|
this.gradeDataRank.item = item |
|
|
let res = await this.updateRankList() |
|
|
let res = await this.updateRankList() |
|
|
this.showGradeRank = true |
|
|
this.showGradeRank = true |
|
|
console.log('openGradeRank',res); |
|
|
console.log('openGradeRank',res); |
|
|
}, |
|
|
}, |
|
|
closeGradeRank() { |
|
|
closeGradeRank() { |
|
|
this.showGradeRank = false |
|
|
this.showGradeRank = false |
|
|
|
|
|
this.resetPostData() |
|
|
|
|
|
this.updatePage() |
|
|
console.log('closeGradeRank'); |
|
|
console.log('closeGradeRank'); |
|
|
}, |
|
|
}, |
|
|
saveRank(){ |
|
|
saveRank(){ |
|
@ -279,12 +290,13 @@ |
|
|
function getRankData(that){ |
|
|
function getRankData(that){ |
|
|
return that.gradeDataRank.list.map((item)=>{ |
|
|
return that.gradeDataRank.list.map((item)=>{ |
|
|
let {id,val} = item |
|
|
let {id,val} = item |
|
|
|
|
|
val = parseFloat(val) |
|
|
return {id,val} |
|
|
return {id,val} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
function checkData(list){ |
|
|
function checkData(list){ |
|
|
return list.every((e)=>{ |
|
|
return list.every((e)=>{ |
|
|
return parseInt(e.val)>0 |
|
|
|
|
|
|
|
|
return parseFloat(e.val)>0 |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -480,6 +492,9 @@ |
|
|
padding-left:72rpx; |
|
|
padding-left:72rpx; |
|
|
padding-right: 80rpx; |
|
|
padding-right: 80rpx; |
|
|
.g-input-box{ |
|
|
.g-input-box{ |
|
|
|
|
|
.scroll-Y{ |
|
|
|
|
|
height: 300rpx; |
|
|
|
|
|
} |
|
|
.b-item{ |
|
|
.b-item{ |
|
|
margin-top: 20rpx; |
|
|
margin-top: 20rpx; |
|
|
> text{ |
|
|
> text{ |
|
|