Compare commits

..

No commits in common. "b9fb9bf81ca5ae4dd9bbf6486f5df14b80ada17a" and "639fa294126ac81f793f307be95fd972fc91ccc6" have entirely different histories.

3 changed files with 461 additions and 480 deletions

View File

@ -42,10 +42,11 @@
<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"
v-if="item.tittle">{{ item.tittle }}
style="background-color: rgba(223, 235, 255, 1);padding: 5rpx 15rpx">{{
item.tittle
}}
</text>
<text class="text-wrapper_3 text_13" v-if="item.type"
<text class="text-wrapper_3 text_13"
style="color: black;padding: 5rpx 10rpx">{{ item.type }}</text>
</view>
</view>
@ -77,7 +78,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" v-if="item.seniority">教龄&nbsp;{{ item.seniority }}</text>
<text class="text_27">教龄&nbsp;{{ item.seniority }}</text>
</view>
</view>
</view>

View File

@ -20,7 +20,10 @@
</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>
@ -34,17 +37,28 @@
<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>
@ -97,8 +111,14 @@
<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>
@ -113,9 +133,7 @@
<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 {
@ -127,12 +145,8 @@
show: false,
showTimePicker: false,
subjectShow: false,
ifPassColumns: [
['已通过', '未通过']
],
subjectColumns: [
['科目一']
],
ifPassColumns: [['已通过', '未通过']],
subjectColumns: [['科目一']],
selectedValue: '',
subjectValue: '',
fileList: [],
@ -172,7 +186,6 @@
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
@ -203,9 +216,9 @@
}
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,
@ -271,12 +284,9 @@
formatSubject(subject) {
switch (Number(subject)) {
case 2:
return '科目二';
case 3:
return '科目三';
default:
return '未知科目';
case 2: return '科目二';
case 3: return '科目三';
default: return '未知科目';
}
},
@ -362,16 +372,13 @@
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 = [['科目一', '科目四']]
}
}
})
@ -387,12 +394,8 @@
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) {
@ -404,35 +407,24 @@
},
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)
@ -454,10 +446,7 @@
});
}, 1500);
} else {
uni.showToast({
title: res.data?.message || '保存失败',
icon: 'none'
});
uni.showToast({title: res.data?.message || '保存失败', icon: 'none'});
}
})
},
@ -466,24 +455,18 @@
...this.process, // process
tenantId: this.opTenantId,
fraction: this.process.examScore,
ifPass: this.process.examStatus === 1,
ifPass: this.process.examStatus,
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({
@ -504,10 +487,7 @@
});
}, 1500);
} else {
uni.showToast({
title: res.data?.message || '保存失败',
icon: 'none'
});
uni.showToast({title: res.data?.message || '保存失败', icon: 'none'});
}
})
}
@ -518,4 +498,5 @@
<style lang='scss'>
@import '../common/common.scss';
@import './assets/style/index.rpx.scss';
</style>

View File

@ -13,8 +13,9 @@
<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>
@ -22,9 +23,7 @@
<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"
v-if="item.ifPassStatus === '9'">{{ getStatusText(item.ifPassStatus) }}</text>
<text class="text_5" v-else>{{ getStatusText(item.examStatus) }}</text>
<text class="text_5">{{ getStatusText(item.examStatus) }}</text>
</view>
</view>
<view class="block_4 flex-row justify-between">