考试结果修改

This commit is contained in:
binbin_pan 2025-01-14 13:34:58 +08:00
parent c1372e3200
commit 29fe649877
2 changed files with 71 additions and 53 deletions

View File

@ -212,7 +212,7 @@
<text style="font-size: 24rpx;color: red;">非必填</text> <text style="font-size: 24rpx;color: red;">非必填</text>
</view> </view>
<u--form class="addForm" :model="entryTrainBean" ref="tForm"> <u--form class="addForm" :model="entryTrainBean" ref="tForm">
<view class="form-input-box"> <!-- <view class="form-input-box">
<view style="width:25%;height: 100%;"> <view style="width:25%;height: 100%;">
<text>安规培训</text> <text>安规培训</text>
</view> </view>
@ -258,39 +258,39 @@
</view> </view>
<view class="tip-view"> <view class="tip-view">
<text style="font-size: 24rpx;color: #5193FE;">培训成绩结果</text> <text style="font-size: 24rpx;color: #5193FE;">培训成绩结果</text>
</view> </view> -->
<view class="form-input-box"> <view class="form-input-box">
<view style="width:25%;height: 100%;"> <view style="width:28%;height: 100%;">
<text>安规培训</text> <text>公司级考试成绩</text>
</view> </view>
<u-form-item prop='safetyScore' style="width:70%;height: 100%;" > <u-form-item prop='companyExamScore' style="width:70%;height: 100%;" >
<u--input v-model="entryTrainBean.safetyScore" type="number" placeholder="90分以上及格" maxlength="3" border="surround" clearable @input="matchScore1"></u--input> <u--input v-model="entryTrainBean.companyExamScore" type="number" placeholder="80分以上及格" maxlength="3" border="surround" clearable @input="matchScore1"></u--input>
</u-form-item> </u-form-item>
</view> </view>
<view class="form-input-box"> <view class="form-input-box">
<view style="width:25%;height: 100%;"> <view style="width:28%;height: 100%;">
<text>保命教育实操</text> <text>部门级考试成绩</text>
</view> </view>
<u-form-item prop='practicalScore' style="width:70%;height: 100%;" > <u-form-item prop='deptExamScore' style="width:70%;height: 100%;" >
<u--input v-model="entryTrainBean.practicalScore" type="number" placeholder="80分以上及格" maxlength="3" border="surround" clearable @input="matchScore2"></u--input> <u--input v-model="entryTrainBean.deptExamScore" type="number" placeholder="80分以上及格" maxlength="3" border="surround" clearable @input="matchScore2"></u--input>
</u-form-item> </u-form-item>
</view> </view>
<view class="form-input-box"> <view class="form-input-box">
<view style="width:25%;height: 100%;"> <view style="width:28%;height: 100%;">
<text>保命教育理论</text> <text>班组级考试成绩</text>
</view> </view>
<u-form-item prop='theoryScore' style="width:70%;height: 100%;" > <u-form-item prop='teamExamScore' style="width:70%;height: 100%;" >
<u--input v-model="entryTrainBean.theoryScore" type="number" placeholder="80分以上及格" maxlength="3" border="surround" clearable @input="matchScore3"></u--input> <u--input v-model="entryTrainBean.teamExamScore" type="number" placeholder="80分以上及格" maxlength="3" border="surround" clearable @input="matchScore3"></u--input>
</u-form-item> </u-form-item>
</view> </view>
<view class="form-input-box"> <!-- <view class="form-input-box">
<view style="width:25%;height: 100%;"> <view style="width:28%;height: 100%;">
<text>准军事化培训</text> <text>准军事化培训</text>
</view> </view>
<u-form-item prop='militarizeScore' style="width:70%;height: 100%;" > <u-form-item prop='militarizeScore' style="width:70%;height: 100%;" >
<u--input v-model="entryTrainBean.militarizeScore" type="number" placeholder="80分以上及格" maxlength="3" border="surround" clearable @input="matchScore4"></u--input> <u--input v-model="entryTrainBean.militarizeScore" type="number" placeholder="80分以上及格" maxlength="3" border="surround" clearable @input="matchScore4"></u--input>
</u-form-item> </u-form-item>
</view> </view> -->
<view style="display: flex;flex-direction: column;padding: 20rpx;"> <view style="display: flex;flex-direction: column;padding: 20rpx;">
<text style="font-size: 24rpx;color: red;">提醒事项</text> <text style="font-size: 24rpx;color: red;">提醒事项</text>
<text style="font-size: 24rpx;color: red;"> <text style="font-size: 24rpx;color: red;">
@ -779,10 +779,10 @@ export default {
"practical": "",// "practical": "",//
"theory": "",// "theory": "",//
"militarize": "",// "militarize": "",//
"safetyScore": "",// "companyExamScore": "",//
"practicalScore": "",// "deptExamScore": "",//
"theoryScore": "",// "teamExamScore": "",//
"militarizeScore": "",// // "militarizeScore": "",//
"isPass": ""// "isPass": ""//
}, },
entrySubTeamBean:{ entrySubTeamBean:{
@ -1308,23 +1308,23 @@ export default {
}, },
matchScore1(e){ matchScore1(e){
if(Number(e)>100){ if(Number(e)>100){
this.entryTrainBean.safetyScore=100; this.entryTrainBean.companyExamScore=100;
}else if(Number(e)<0){ }else if(Number(e)<0){
this.entryTrainBean.safetyScore=0; this.entryTrainBean.companyExamScore=0;
} }
}, },
matchScore2(e){ matchScore2(e){
if(Number(e)>100){ if(Number(e)>100){
this.entryTrainBean.practicalScore=100; this.entryTrainBean.deptExamScore=100;
}else if(Number(e)<0){ }else if(Number(e)<0){
this.entryTrainBean.practicalScore=0; this.entryTrainBean.deptExamScore=0;
} }
}, },
matchScore3(e){ matchScore3(e){
if(Number(e)>100){ if(Number(e)>100){
this.entryTrainBean.theoryScore=100; this.entryTrainBean.teamExamScore=100;
}else if(Number(e)<0){ }else if(Number(e)<0){
this.entryTrainBean.theoryScore=0; this.entryTrainBean.teamExamScore=0;
} }
}, },
matchScore4(e){ matchScore4(e){
@ -1425,6 +1425,15 @@ export default {
}, },
addEntryPerson(){ addEntryPerson(){
console.log('add') console.log('add')
if (
Number(this.entryTrainBean.safetyTraining) >= 90
&& Number(this.entryTrainBean.deptExamScore) >= 80
&& Number(this.entryTrainBean.teamExamScore) >= 80
&& Number(this.entryTrainBean.militarizeScore) >= 80) {
this.entryTrainBean.isPass = '1';
} else {
this.entryTrainBean.isPass = '0';
}
let param={ let param={
entryIdNumberBean:this.entryIdNumberBean, entryIdNumberBean:this.entryIdNumberBean,
entryCruxBean:this.entryCruxBean, entryCruxBean:this.entryCruxBean,

View File

@ -227,7 +227,7 @@
<text style="font-size: 24rpx;color: red;">非必填</text> <text style="font-size: 24rpx;color: red;">非必填</text>
</view> </view>
<u--form class="addForm" :model="entryTrainBean" ref="tForm"> <u--form class="addForm" :model="entryTrainBean" ref="tForm">
<view class="form-input-box"> <!-- <view class="form-input-box">
<view style="width:25%;height: 100%;"> <view style="width:25%;height: 100%;">
<text>安规培训</text> <text>安规培训</text>
</view> </view>
@ -277,35 +277,35 @@
</view> </view>
<view class="tip-view"> <view class="tip-view">
<text style="font-size: 24rpx;color: #5193FE;">培训成绩结果</text> <text style="font-size: 24rpx;color: #5193FE;">培训成绩结果</text>
</view> </view> -->
<view class="form-input-box"> <view class="form-input-box">
<view style="width:25%;height: 100%;"> <view style="width:28%;height: 100%;">
<text>安规培训</text> <text>公司级考试成绩</text>
</view> </view>
<u-form-item prop='safetyScore' style="width:70%;height: 100%;"> <u-form-item prop='companyExamScore' style="width:70%;height: 100%;">
<u--input v-model="entryTrainBean.safetyScore" type="number" placeholder="90分以上及格" <u--input v-model="entryTrainBean.companyExamScore" type="number" placeholder="80分以上及格"
maxlength="3" border="surround" clearable @input="matchScore1"></u--input> maxlength="3" border="surround" clearable @input="matchScore1"></u--input>
</u-form-item> </u-form-item>
</view> </view>
<view class="form-input-box"> <view class="form-input-box">
<view style="width:25%;height: 100%;"> <view style="width:28%;height: 100%;">
<text>保命教育实操</text> <text>部门级考试成绩</text>
</view> </view>
<u-form-item prop='practicalScore' style="width:70%;height: 100%;"> <u-form-item prop='deptExamScore' style="width:70%;height: 100%;">
<u--input v-model="entryTrainBean.practicalScore" type="number" placeholder="80分以上及格" <u--input v-model="entryTrainBean.deptExamScore" type="number" placeholder="80分以上及格"
maxlength="3" border="surround" clearable @input="matchScore2"></u--input> maxlength="3" border="surround" clearable @input="matchScore2"></u--input>
</u-form-item> </u-form-item>
</view> </view>
<view class="form-input-box"> <view class="form-input-box">
<view style="width:25%;height: 100%;"> <view style="width:28%;height: 100%;">
<text>保命教育理论</text> <text>班组级考试成绩</text>
</view> </view>
<u-form-item prop='theoryScore' style="width:70%;height: 100%;"> <u-form-item prop='teamExamScore' style="width:70%;height: 100%;">
<u--input v-model="entryTrainBean.theoryScore" type="number" placeholder="80分以上及格" <u--input v-model="entryTrainBean.teamExamScore" type="number" placeholder="80分以上及格"
maxlength="3" border="surround" clearable @input="matchScore3"></u--input> maxlength="3" border="surround" clearable @input="matchScore3"></u--input>
</u-form-item> </u-form-item>
</view> </view>
<view class="form-input-box"> <!-- <view class="form-input-box">
<view style="width:25%;height: 100%;"> <view style="width:25%;height: 100%;">
<text>准军事化培训</text> <text>准军事化培训</text>
</view> </view>
@ -313,7 +313,7 @@
<u--input v-model="entryTrainBean.militarizeScore" type="number" placeholder="80分以上及格" <u--input v-model="entryTrainBean.militarizeScore" type="number" placeholder="80分以上及格"
maxlength="3" border="surround" clearable @input="matchScore4"></u--input> maxlength="3" border="surround" clearable @input="matchScore4"></u--input>
</u-form-item> </u-form-item>
</view> </view> -->
<view style="display: flex;flex-direction: column;padding: 20rpx;"> <view style="display: flex;flex-direction: column;padding: 20rpx;">
<text style="font-size: 24rpx;color: red;">提醒事项</text> <text style="font-size: 24rpx;color: red;">提醒事项</text>
<text style="font-size: 24rpx;color: red;"> <text style="font-size: 24rpx;color: red;">
@ -827,10 +827,10 @@
"practical": "", // "practical": "", //
"theory": "", // "theory": "", //
"militarize": "", // "militarize": "", //
"safetyScore": "", // "companyExamScore": "", //
"practicalScore": "", // "deptExamScore": "", //
"theoryScore": "", // "teamExamScore": "", //
"militarizeScore": "", // // "militarizeScore": "", //
"isPass": "" // "isPass": "" //
}, },
entrySubTeamBean: { entrySubTeamBean: {
@ -1407,23 +1407,23 @@
}, },
matchScore1(e) { matchScore1(e) {
if (Number(e) > 100) { if (Number(e) > 100) {
this.entryTrainBean.safetyScore = 100; this.entryTrainBean.companyExamScore = 100;
} else if (Number(e) < 0) { } else if (Number(e) < 0) {
this.entryTrainBean.safetyScore = 0; this.entryTrainBean.companyExamScore = 0;
} }
}, },
matchScore2(e) { matchScore2(e) {
if (Number(e) > 100) { if (Number(e) > 100) {
this.entryTrainBean.practicalScore = 100; this.entryTrainBean.deptExamScore = 100;
} else if (Number(e) < 0) { } else if (Number(e) < 0) {
this.entryTrainBean.practicalScore = 0; this.entryTrainBean.deptExamScore = 0;
} }
}, },
matchScore3(e) { matchScore3(e) {
if (Number(e) > 100) { if (Number(e) > 100) {
this.entryTrainBean.theoryScore = 100; this.entryTrainBean.teamExamScore = 100;
} else if (Number(e) < 0) { } else if (Number(e) < 0) {
this.entryTrainBean.theoryScore = 0; this.entryTrainBean.teamExamScore = 0;
} }
}, },
matchScore4(e) { matchScore4(e) {
@ -1527,6 +1527,15 @@
updateEntryPerson() { updateEntryPerson() {
this.isLoading = true this.isLoading = true
console.log('add') console.log('add')
if (
Number(this.entryTrainBean.companyExamScore) >= 80
&& Number(this.entryTrainBean.deptExamScore) >= 80
&& Number(this.entryTrainBean.teamExamScore) >= 80
) {
this.entryTrainBean.isPass = '1';
} else {
this.entryTrainBean.isPass = '0';
}
let param = { let param = {
entryIdNumberBean: this.entryIdNumberBean, entryIdNumberBean: this.entryIdNumberBean,
entryCruxBean: this.entryCruxBean, entryCruxBean: this.entryCruxBean,