Compare commits

...

2 Commits

Author SHA1 Message Date
Lx
b9fb9bf81c Merge remote-tracking branch 'origin/master' 2025-04-17 18:45:14 +08:00
Lx
7f86461227 0417-4 2025-04-17 18:45:03 +08:00
3 changed files with 480 additions and 461 deletions

View File

@ -42,11 +42,10 @@
<view class="text-wrapper_4 flex-col">
<view style="display: flex">
<text class="text_13"
style="background-color: rgba(223, 235, 255, 1);padding: 5rpx 15rpx">{{
item.tittle
}}
style="background-color: rgba(223, 235, 255, 1);padding: 5rpx 15rpx"
v-if="item.tittle">{{ item.tittle }}
</text>
<text class="text-wrapper_3 text_13"
<text class="text-wrapper_3 text_13" v-if="item.type"
style="color: black;padding: 5rpx 10rpx">{{ item.type }}</text>
</view>
</view>
@ -78,7 +77,7 @@
<image class="label_3" referrerpolicy="no-referrer" :src="imagesUrl + '/' + item.image" />
<view class="text-group_4 flex-col justify-between">
<text class="text_25">{{ item.name }}</text>
<text class="text_27">教龄&nbsp;{{ item.seniority }}</text>
<text class="text_27" v-if="item.seniority">教龄&nbsp;{{ item.seniority }}</text>
</view>
</view>
</view>

View File

@ -20,10 +20,7 @@
</headers>
</view>
<view>
<scroll-view
:style="{ height: scrollHeight + 'px' }"
scroll-y="true" class="scroll-view"
>
<scroll-view :style="{ height: scrollHeight + 'px' }" scroll-y="true" class="scroll-view">
<view class="group_4 flex-col">
<view class="block_1 flex-row justify-between" @click="show = true">
<text class="text_19">是否通过</text>
@ -37,28 +34,17 @@
<view class="text-wrapper_7 flex-row justify-between">
<text class="text_4">分数</text>
<view class="text_5_1 ">
<u--input
placeholder="请输入分数"
border="none"
v-model="process.examScore"
maxlength="3"
inputAlign="right"
>
<u--input placeholder="请输入分数" border="none" v-model="process.examScore" maxlength="3"
inputAlign="right">
</u--input>
</view>
</view>
<view class="text-wrapper_8 flex-row justify-between">
<text class="text_20">时间</text>
<view>
<u-datetime-picker
:show="showTimePicker"
v-model="process.examTime"
mode="datetime"
:minDate="minTime"
:maxDate="maxTime"
@confirm="onConfirmExamTime"
@cancel="showTimePicker = false"
></u-datetime-picker>
<u-datetime-picker :show="showTimePicker" v-model="process.examTime" mode="datetime"
:minDate="minTime" :maxDate="maxTime" @confirm="onConfirmExamTime"
@cancel="showTimePicker = false"></u-datetime-picker>
<text class="text_3" @click="showTimePicker = true">
{{ process.examTime ? formatDate(process.examTime) : '选择时间' }}
</text>
@ -111,14 +97,8 @@
<u--textarea class="text_17" v-model="process.remark" placeholder="请输入内容" count></u--textarea>
<text class="text_18">图片</text>
<view class="image-wrapper_4 flex-row justify-between">
<u-upload
:fileList="displayFileList"
@afterRead="afterRead"
@delete="deletePic"
multiple
:maxCount="2"
></u-upload>
<u-upload :fileList="displayFileList" @afterRead="afterRead" @delete="deletePic" multiple
:maxCount="2"></u-upload>
</view>
</view>
</scroll-view>
@ -133,7 +113,9 @@
<script>
import upload from '@/utils/upload.js'
import request from '@/utils/request.js'
import {getLocalUserInfo} from '../../utils/auth';
import {
getLocalUserInfo
} from '../../utils/auth';
import headers from "@/components/header/headers.vue";
export default {
@ -145,8 +127,12 @@ export default {
show: false,
showTimePicker: false,
subjectShow: false,
ifPassColumns: [['已通过', '未通过']],
subjectColumns: [['科目一']],
ifPassColumns: [
['已通过', '未通过']
],
subjectColumns: [
['科目一']
],
selectedValue: '',
subjectValue: '',
fileList: [],
@ -186,6 +172,7 @@ export default {
onLoad(options) {
console.log('options', options)
this.userInfo = getLocalUserInfo()
console.log('userInfo', this.userInfo)
// this.getUserOrderDetails()
this.process.subject = options.subject
this.opTenantId = options.tenantId
@ -216,9 +203,9 @@ export default {
}
const prefix = this.$imagesUrl.endsWith('/') ? this.$imagesUrl : `${this.$imagesUrl}/`;
const fullUrl = item.url.startsWith('/')
? `${prefix}${item.url.slice(1)}`
: `${prefix}${item.url}`;
const fullUrl = item.url.startsWith('/') ?
`${prefix}${item.url.slice(1)}` :
`${prefix}${item.url}`;
return {
...item,
@ -284,9 +271,12 @@ export default {
formatSubject(subject) {
switch (Number(subject)) {
case 2: return '科目二';
case 3: return '科目三';
default: return '未知科目';
case 2:
return '科目二';
case 3:
return '科目三';
default:
return '未知科目';
}
},
@ -372,13 +362,16 @@ export default {
if (this.courseCompleteStatusList.length > 0) {
const subject2 = this.courseCompleteStatusList.find(item => item.subject === 2)
const subject3 = this.courseCompleteStatusList.find(item => item.subject === 3)
const subject1Or4 = this.courseCompleteStatusList.find(item => item.subject === 1 || item.subject === 4)
const subject1Or4 = this.courseCompleteStatusList.find(item => item.subject === 1 || item
.subject === 4)
if (subject1Or4) {
this.courseType = subject1Or4.courseType
}
if (subject2?.status === '2' && subject3?.status === '2') {
this.subjectColumns = [['科目一', '科目四']]
this.subjectColumns = [
['科目一', '科目四']
]
}
}
})
@ -394,8 +387,12 @@ export default {
saveData() {
console.log('process', this.process)
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process.examStatus === null || !this.process.examTime) {
uni.showToast({title: '信息填写不完整', icon: 'none'});
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process
.examStatus === null || !this.process.examTime) {
uni.showToast({
title: '信息填写不完整',
icon: 'none'
});
return;
}
if (this.process.subject == 1 || this.process.subject == 4) {
@ -407,24 +404,35 @@ export default {
},
saveDataOne() {
if (this.process.subject === 1 && this.courseCompleteStatusList.length <= 0) {
uni.showToast({title: '请联系驾校人员!', icon: 'none'});
uni.showToast({
title: '请联系驾校人员!',
icon: 'none'
});
return;
}
if (this.process.subject === 4 && this.courseCompleteStatusList.length <= 0) {
uni.showToast({title: '请联系驾校人员!', icon: 'none'});
uni.showToast({
title: '请联系驾校人员!',
icon: 'none'
});
return;
}
const postData = {
...this.process, // process
remark: this.process.remark,
userName: this.userInfo.nickname,
images: this.fileList?.map(item => item.url).join(',') || '',
}
// this.process.images = this.fileList?.map(item => item.url).join(',') || '';
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process.examStatus === null || !this.process.examTime) {
uni.showToast({title: '信息填写不完整', icon: 'none'});
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process
.examStatus === null || !this.process.examTime) {
uni.showToast({
title: '信息填写不完整',
icon: 'none'
});
return;
}
console.log('postData', postData)
@ -446,7 +454,10 @@ export default {
});
}, 1500);
} else {
uni.showToast({title: res.data?.message || '保存失败', icon: 'none'});
uni.showToast({
title: res.data?.message || '保存失败',
icon: 'none'
});
}
})
},
@ -455,18 +466,24 @@ export default {
...this.process, // process
tenantId: this.opTenantId,
fraction: this.process.examScore,
ifPass: this.process.examStatus,
ifPass: this.process.examStatus === 1,
id: this.batchItemId,
remark: this.process.remark,
userName: this.userInfo.nickname,
images: this.fileList?.map(item => item.url).join(',') || '',
}
console.log('postData', postData)
/* this.process.userId = this.userInfo.id
this.process.tenantId = this.opTenantId
this.process.fraction = this.process.examScore
this.process.ifPass = this.process.examStatus
this.process.images = this.fileList?.map(item => item.url).join(',') || ''; */
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process.examStatus === null || !this.process.examTime) {
uni.showToast({title: '信息填写不完整', icon: 'none'});
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process
.examStatus === null || !this.process.examTime) {
uni.showToast({
title: '信息填写不完整',
icon: 'none'
});
return;
}
request({
@ -487,7 +504,10 @@ export default {
});
}, 1500);
} else {
uni.showToast({title: res.data?.message || '保存失败', icon: 'none'});
uni.showToast({
title: res.data?.message || '保存失败',
icon: 'none'
});
}
})
}
@ -498,5 +518,4 @@ export default {
<style lang='scss'>
@import '../common/common.scss';
@import './assets/style/index.rpx.scss';
</style>

View File

@ -13,9 +13,8 @@
<view class="block_3 flex-row justify-between">
<view class="text-group_1 flex-col justify-between">
<text class="text_2" v-if="item.subject == 1 || item.subject == 4">{{
formatDate(item.examTime)
}}
<text class="text_2"
v-if="item.subject == 1 || item.subject == 4">{{ formatDate(item.examTime) }}
</text>
<text class="text_2" v-else>{{ formatDate(item.startTime) }}</text>
<text class="text_3">{{ item.courseName }}</text>
@ -23,7 +22,9 @@
<view class="text-group_2 flex-col justify-between">
<text class="text_4" v-if="item.examScore">{{ item.examScore }}</text>
<text class="text_4" v-else>{{ '--' }}</text>
<text class="text_5">{{ getStatusText(item.examStatus) }}</text>
<text class="text_5"
v-if="item.ifPassStatus === '9'">{{ getStatusText(item.ifPassStatus) }}</text>
<text class="text_5" v-else>{{ getStatusText(item.examStatus) }}</text>
</view>
</view>
<view class="block_4 flex-row justify-between">