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接受数据) // 返回错误的结果(catch接受数据)
return Promise.reject({ return Promise.reject({
statusCode: res.response.statusCode, statusCode: res.response.statusCode,
errMsg: "【request】数据工厂验证不通过",
errMsg: "请求失败:"+res.response.statusCode,
data: res.data data: res.data
}); });
} }

58
pages/event/event_grade.vue

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

Loading…
Cancel
Save