Browse Source

fix issue

master
zmt 3 years ago
parent
commit
29db0b554a
  1. 2
      nxTemp/config/requestConfig.js
  2. 58
      pages/event/event_grade.vue

2
nxTemp/config/requestConfig.js

@ -222,7 +222,7 @@ $http.dataFactory = async function(res) {
// 返回错误的结果(catch接受数据)
return Promise.reject({
statusCode: res.response.statusCode,
errMsg: "【request】数据工厂验证不通过",
errMsg: "请求失败:"+res.response.statusCode,
data: res.data
});
}

58
pages/event/event_grade.vue

@ -8,14 +8,21 @@
</view>
</view>
<!--schedule item -->
<block v-if="headIndex==0">
<view class="item flex_col flex_start_y bg-white " v-for="(i,k) in pageList" :key="k">
<view class="item flex_col flex_start_y bg-white item_head_name">
<view class="title flex_row flex_start">
<view class="text-m text-left">{{match_name}}</view>
<!-- <view class="bandage"></view> -->
</view>
</view>
<!--schedule item -->
<block v-if="headIndex==0">
<view class="item flex_col flex_start_y bg-white " v-for="(i,k) in pageList" :key="k">
<!-- <view class="title flex_row flex_start">
<view class="text-m text-left">{{match_name}}</view>
</view> -->
<view class="info flex_row flex_between">
<view class="time">{{i.schedule_start_date}}</view>
@ -40,10 +47,10 @@
<block v-if="headIndex==1">
<view class="item flex_col flex_start_y bg-white ">
<view class="title flex_row flex_start">
<!-- <view class="title flex_row flex_start">
<view class="text-m text-left">{{match_name}}</view>
<!-- <view class="bandage"></view> -->
</view>
<view class="bandage"></view>
</view> -->
<!-- <view class="info flex_row flex_between">
<view class="time">{{i.schedule_start_date}}</view>
@ -57,9 +64,9 @@
</view>
<view class="btn-box flex_row">
<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 class="btn state-0 flex_row" v-if="u.is_set_score" @click="openGrade(u,u)">已打分</view>
<view class="btn state-1 flex_row" v-else @click="openGrade(u,u)">打分</view>
<view class="btn state-2 flex_row" @click="openGradeRank(u,u)">数据</view>
</view>
</view>
</view>
@ -99,7 +106,7 @@
<text class="g-txt">{{gradeDataRank.user.member_name}}分数录入</text>
<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">
<view class="b-item flex_row flex_between" 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>
@ -249,19 +256,21 @@
openGrade(item,user) {
this.showGrade = true
this.gradeData.user = user
this.gradeData.score = user.score //
this.gradeData.score = user.score?user.score:"" //
if(this.gradeData.score==0||this.gradeData.score=="0") this.gradeData.score="" //0
this.gradeData.item = item
console.log('open',item,JSON.stringify(user));
},
closeGrade() {
this.showGrade = false
this.resetPostData()
this.resetPostData()
this.updatePage()
console.log('closeGrade');
},
async openGradeRank(item,user) {
this.gradeDataRank.user = user
this.gradeDataRank.score = user.score //
// this.gradeDataRank.score = user.score //
this.gradeDataRank.score = ""
this.gradeDataRank.item = item
let res = await this.updateRankList()
this.showGradeRank = true
@ -269,8 +278,8 @@
},
closeGradeRank() {
this.showGradeRank = false
this.resetPostData()
this.updatePage()
// this.resetPostData()
// this.updatePage()
console.log('closeGradeRank');
},
saveRank(){
@ -295,7 +304,7 @@
})
}
function checkData(list){
return list.every((e)=>{
return list.some((e)=>{ //,,
return parseFloat(e.val)>0
})
}
@ -307,7 +316,11 @@
order_no,brand_id
}).then(res => {
console.log("updateRankList:",res);
this.gradeDataRank.list = res.list
// this.gradeDataRank.list = res.list
this.gradeDataRank.list = res.list.map(e=>{
e.val = ""
return e
})
}).catch(e=>{
this.$tools.showNone(e.errMsg)
})
@ -352,10 +365,11 @@
}
}
.item{
color: #333333;
position: relative;
margin-top: 24rpx;
margin-bottom: 24rpx;
// border-radius: 10rpx;
width: 750rpx;
// height: 124rpx;
@ -431,6 +445,10 @@
margin-left: 10rpx;
}
}
.item_head_name{
margin-top: 24rpx;
margin-bottom: 0rpx;
}
}
.overlay{
position: fixed;
@ -496,6 +514,8 @@
height: 300rpx;
}
.b-item{
// width: 100%;
width: 450rpx;
margin-top: 20rpx;
> text{
font-size: 28rpx;
@ -503,7 +523,7 @@
padding-right: 20rpx;
}
input {
width: 384rpx;
width: 184rpx;
}
}
}

Loading…
Cancel
Save