Compare commits
No commits in common. "b9fb9bf81ca5ae4dd9bbf6486f5df14b80ada17a" and "639fa294126ac81f793f307be95fd972fc91ccc6" have entirely different histories.
b9fb9bf81c
...
639fa29412
@ -42,10 +42,11 @@
|
|||||||
<view class="text-wrapper_4 flex-col">
|
<view class="text-wrapper_4 flex-col">
|
||||||
<view style="display: flex">
|
<view style="display: flex">
|
||||||
<text class="text_13"
|
<text class="text_13"
|
||||||
style="background-color: rgba(223, 235, 255, 1);padding: 5rpx 15rpx"
|
style="background-color: rgba(223, 235, 255, 1);padding: 5rpx 15rpx">{{
|
||||||
v-if="item.tittle">{{ item.tittle }}
|
item.tittle
|
||||||
|
}}
|
||||||
</text>
|
</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>
|
style="color: black;padding: 5rpx 10rpx">{{ item.type }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -77,7 +78,7 @@
|
|||||||
<image class="label_3" referrerpolicy="no-referrer" :src="imagesUrl + '/' + item.image" />
|
<image class="label_3" referrerpolicy="no-referrer" :src="imagesUrl + '/' + item.image" />
|
||||||
<view class="text-group_4 flex-col justify-between">
|
<view class="text-group_4 flex-col justify-between">
|
||||||
<text class="text_25">{{ item.name }}</text>
|
<text class="text_25">{{ item.name }}</text>
|
||||||
<text class="text_27" v-if="item.seniority">教龄 {{ item.seniority }}年</text>
|
<text class="text_27">教龄 {{ item.seniority }}年</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page flex-col">
|
<view class="page flex-col">
|
||||||
<!-- <view class="group_1 flex-row">
|
<!-- <view class="group_1 flex-row">
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@ -14,43 +14,57 @@
|
|||||||
<text class="text_1">考试结果</text>
|
<text class="text_1">考试结果</text>
|
||||||
|
|
||||||
</view> -->
|
</view> -->
|
||||||
<view style="width: 100%;background: #f4f5f6;box-sizing: border-box;padding-top: 88px;">
|
<view style="width: 100%;background: #f4f5f6;box-sizing: border-box;padding-top: 88px;">
|
||||||
<headers titles="考试结果">
|
<headers titles="考试结果">
|
||||||
<uni-icons type="left" color="#000000" size="22px"></uni-icons>
|
<uni-icons type="left" color="#000000" size="22px"></uni-icons>
|
||||||
</headers>
|
</headers>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view >
|
||||||
<scroll-view :style="{ height: scrollHeight + 'px' }" scroll-y="true" class="scroll-view">
|
<scroll-view
|
||||||
<view class="group_4 flex-col">
|
:style="{ height: scrollHeight + 'px' }"
|
||||||
<view class="block_1 flex-row justify-between" @click="show = true">
|
scroll-y="true" class="scroll-view"
|
||||||
<text class="text_19">是否通过</text>
|
>
|
||||||
<view>
|
<view class="group_4 flex-col">
|
||||||
<u-picker v-model="process.examStatus" :show="show" :columns="ifPassColumns" title="是否通过"
|
<view class="block_1 flex-row justify-between" @click="show = true">
|
||||||
@confirm="ifPassOnConfirm" @cancel="show = false">
|
<text class="text_19">是否通过</text>
|
||||||
</u-picker>
|
<view>
|
||||||
<text class="text_191">{{ selectedValue || '请选择' }}</text>
|
<u-picker v-model="process.examStatus" :show="show" :columns="ifPassColumns" title="是否通过"
|
||||||
</view>
|
@confirm="ifPassOnConfirm" @cancel="show = false">
|
||||||
</view>
|
</u-picker>
|
||||||
<view class="text-wrapper_7 flex-row justify-between">
|
<text class="text_191">{{ selectedValue || '请选择' }}</text>
|
||||||
<text class="text_4">分数</text>
|
</view>
|
||||||
<view class="text_5_1 ">
|
</view>
|
||||||
<u--input placeholder="请输入分数" border="none" v-model="process.examScore" maxlength="3"
|
<view class="text-wrapper_7 flex-row justify-between">
|
||||||
inputAlign="right">分
|
<text class="text_4">分数</text>
|
||||||
</u--input>
|
<view class="text_5_1 ">
|
||||||
</view>
|
<u--input
|
||||||
</view>
|
placeholder="请输入分数"
|
||||||
<view class="text-wrapper_8 flex-row justify-between">
|
border="none"
|
||||||
<text class="text_20">时间</text>
|
v-model="process.examScore"
|
||||||
<view>
|
maxlength="3"
|
||||||
<u-datetime-picker :show="showTimePicker" v-model="process.examTime" mode="datetime"
|
inputAlign="right"
|
||||||
:minDate="minTime" :maxDate="maxTime" @confirm="onConfirmExamTime"
|
>分
|
||||||
@cancel="showTimePicker = false"></u-datetime-picker>
|
</u--input>
|
||||||
<text class="text_3" @click="showTimePicker = true">
|
</view>
|
||||||
{{ process.examTime ? formatDate(process.examTime) : '选择时间' }}
|
</view>
|
||||||
</text>
|
<view class="text-wrapper_8 flex-row justify-between">
|
||||||
</view>
|
<text class="text_20">时间</text>
|
||||||
</view>
|
<view>
|
||||||
<!-- <view class="text-wrapper_9 flex-row justify-between">
|
<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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="text-wrapper_9 flex-row justify-between">
|
||||||
<text class="text_6">姓名</text>
|
<text class="text_6">姓名</text>
|
||||||
<view class="text_5_1 ">
|
<view class="text_5_1 ">
|
||||||
<u--input
|
<u--input
|
||||||
@ -62,460 +76,427 @@
|
|||||||
></u--input>
|
></u--input>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="text-wrapper_10 flex-row justify-between">
|
<view class="text-wrapper_10 flex-row justify-between">
|
||||||
<text class="text_8">考试类型</text>
|
<text class="text_8">考试类型</text>
|
||||||
<text class="text_9" v-if="process.subject != 2 && process.subject != 3">{{ courseType }}</text>
|
<text class="text_9" v-if="process.subject != 2 && process.subject != 3">{{ courseType }}</text>
|
||||||
<text class="text_9" v-else>{{ opCourseType }}</text>
|
<text class="text_9" v-else>{{ opCourseType }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-wrapper_11 flex-row justify-between" @click="subjectShow = true"
|
<view class="text-wrapper_11 flex-row justify-between" @click="subjectShow = true"
|
||||||
v-if="process.subject != 2 && process.subject != 3">
|
v-if="process.subject != 2 && process.subject != 3">
|
||||||
<text class="text_10">考试科目</text>
|
<text class="text_10">考试科目</text>
|
||||||
<view>
|
<view>
|
||||||
<u-picker v-model="process.subject" :show="subjectShow" :columns="subjectColumns" title="科目"
|
<u-picker v-model="process.subject" :show="subjectShow" :columns="subjectColumns" title="科目"
|
||||||
@confirm="subjectOnConfirm" @cancel="subjectShow = false">
|
@confirm="subjectOnConfirm" @cancel="subjectShow = false">
|
||||||
</u-picker>
|
</u-picker>
|
||||||
<text class="text_11">{{ subjectValue || '请选择科目' }}</text>
|
<text class="text_11">{{ subjectValue || '请选择科目' }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="text-wrapper_11 flex-row justify-between"
|
<view class="text-wrapper_11 flex-row justify-between"
|
||||||
v-else-if="process.subject == 2 || process.subject == 3">
|
v-else-if="process.subject == 2 || process.subject == 3">
|
||||||
<text class="text_10">考试科目</text>
|
<text class="text_10">考试科目</text>
|
||||||
|
|
||||||
<text class="text_11">{{ formatSubject(process.subject) }}</text>
|
<text class="text_11">{{ formatSubject(process.subject) }}</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="text-wrapper_3 flex-row justify-between" v-if="item.subject == 2 || item.subject == 3">
|
<!-- <view class="text-wrapper_3 flex-row justify-between" v-if="item.subject == 2 || item.subject == 3">
|
||||||
<text class="text_8">考试地址:</text>
|
<text class="text_8">考试地址:</text>
|
||||||
<text class="text_9">{{ item.addr }}</text>
|
<text class="text_9">{{ item.addr }}</text>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="group_5 flex-col">
|
<view class="group_5 flex-col">
|
||||||
<text class="text_16">备注</text>
|
<text class="text_16">备注</text>
|
||||||
<u--textarea class="text_17" v-model="process.remark" placeholder="请输入内容" count></u--textarea>
|
<u--textarea class="text_17" v-model="process.remark" placeholder="请输入内容" count></u--textarea>
|
||||||
<text class="text_18">图片</text>
|
<text class="text_18">图片</text>
|
||||||
<view class="image-wrapper_4 flex-row justify-between">
|
<view class="image-wrapper_4 flex-row justify-between">
|
||||||
<u-upload :fileList="displayFileList" @afterRead="afterRead" @delete="deletePic" multiple
|
<u-upload
|
||||||
:maxCount="2"></u-upload>
|
|
||||||
</view>
|
:fileList="displayFileList"
|
||||||
</view>
|
@afterRead="afterRead"
|
||||||
</scroll-view>
|
@delete="deletePic"
|
||||||
</view>
|
multiple
|
||||||
<view class="block_8 flex-col">
|
:maxCount="2"
|
||||||
<view class="text-wrapper_8 flex-col" @click="saveData()">
|
></u-upload>
|
||||||
<text class="text_19">确定</text>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="block_8 flex-col">
|
||||||
|
<view class="text-wrapper_8 flex-col" @click="saveData()">
|
||||||
|
<text class="text_19">确定</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import upload from '@/utils/upload.js'
|
import upload from '@/utils/upload.js'
|
||||||
import request from '@/utils/request.js'
|
import request from '@/utils/request.js'
|
||||||
import {
|
import {getLocalUserInfo} from '../../utils/auth';
|
||||||
getLocalUserInfo
|
import headers from "@/components/header/headers.vue";
|
||||||
} from '../../utils/auth';
|
|
||||||
import headers from "@/components/header/headers.vue";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
headers
|
headers
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
showTimePicker: false,
|
showTimePicker: false,
|
||||||
subjectShow: false,
|
subjectShow: false,
|
||||||
ifPassColumns: [
|
ifPassColumns: [['已通过', '未通过']],
|
||||||
['已通过', '未通过']
|
subjectColumns: [['科目一']],
|
||||||
],
|
selectedValue: '',
|
||||||
subjectColumns: [
|
subjectValue: '',
|
||||||
['科目一']
|
fileList: [],
|
||||||
],
|
imageUrl: this.$imagesUrl,
|
||||||
selectedValue: '',
|
userInfo: [],
|
||||||
subjectValue: '',
|
courseType: null,
|
||||||
fileList: [],
|
courseCompleteStatusList: {},
|
||||||
imageUrl: this.$imagesUrl,
|
opTenantId: null,
|
||||||
userInfo: [],
|
opCourseType: null,
|
||||||
courseType: null,
|
examId: null,
|
||||||
courseCompleteStatusList: {},
|
batchId: null,
|
||||||
opTenantId: null,
|
batchItemId: null,
|
||||||
opCourseType: null,
|
process: {
|
||||||
examId: null,
|
id: null,
|
||||||
batchId: null,
|
userName: null,
|
||||||
batchItemId: null,
|
userId: null,
|
||||||
process: {
|
subject: null,
|
||||||
id: null,
|
fraction: null,
|
||||||
userName: null,
|
examNum: null,
|
||||||
userId: null,
|
examStatus: null,
|
||||||
subject: null,
|
examScore: null,
|
||||||
fraction: null,
|
remark: '',
|
||||||
examNum: null,
|
examTime: Date.now(),
|
||||||
examStatus: null,
|
images: null,
|
||||||
examScore: null,
|
tenantId: null,
|
||||||
remark: '',
|
courseId: null,
|
||||||
examTime: Date.now(),
|
ifPass: null,
|
||||||
images: null,
|
batchId: null,
|
||||||
tenantId: null,
|
coachId: null,
|
||||||
courseId: null,
|
},
|
||||||
ifPass: null,
|
minTime: 0,
|
||||||
batchId: null,
|
maxTime: 0,
|
||||||
coachId: null,
|
scrollHeight: 0,
|
||||||
},
|
constants: {}
|
||||||
minTime: 0,
|
};
|
||||||
maxTime: 0,
|
},
|
||||||
scrollHeight: 0,
|
onLoad(options) {
|
||||||
constants: {}
|
console.log('options', options)
|
||||||
};
|
this.userInfo = getLocalUserInfo()
|
||||||
},
|
// this.getUserOrderDetails()
|
||||||
onLoad(options) {
|
this.process.subject = options.subject
|
||||||
console.log('options', options)
|
this.opTenantId = options.tenantId
|
||||||
this.userInfo = getLocalUserInfo()
|
this.opCourseType = options.courseType
|
||||||
console.log('userInfo', this.userInfo)
|
this.process.subject = options.subject
|
||||||
// this.getUserOrderDetails()
|
this.process.courseId = options.courseId
|
||||||
this.process.subject = options.subject
|
this.process.batchId = options.batchId
|
||||||
this.opTenantId = options.tenantId
|
this.examId = options.id
|
||||||
this.opCourseType = options.courseType
|
this.batchId = options.batchId
|
||||||
this.process.subject = options.subject
|
this.batchItemId = options.id
|
||||||
this.process.courseId = options.courseId
|
this.process.id = options.id
|
||||||
this.process.batchId = options.batchId
|
this.process.coachId = options.coachId
|
||||||
this.examId = options.id
|
this.process.userId = this.userInfo.id
|
||||||
this.batchId = options.batchId
|
this.process.coachId = options.coachId
|
||||||
this.batchItemId = options.id
|
this.process.userName = options.nickname
|
||||||
this.process.id = options.id
|
this.process.tenantId = options.tenantId
|
||||||
this.process.coachId = options.coachId
|
this.getCourseCompleteStatus();
|
||||||
this.process.userId = this.userInfo.id
|
},
|
||||||
this.process.coachId = options.coachId
|
onReady() {
|
||||||
this.process.userName = options.nickname
|
// 动态计算滚动区域高度
|
||||||
this.process.tenantId = options.tenantId
|
this.calculateScrollHeight();
|
||||||
this.getCourseCompleteStatus();
|
},
|
||||||
},
|
computed: {
|
||||||
onReady() {
|
displayFileList() {
|
||||||
// 动态计算滚动区域高度
|
return this.fileList.map(item => {
|
||||||
this.calculateScrollHeight();
|
if (item.url.startsWith('http')) {
|
||||||
},
|
return item;
|
||||||
computed: {
|
}
|
||||||
displayFileList() {
|
|
||||||
return this.fileList.map(item => {
|
|
||||||
if (item.url.startsWith('http')) {
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
|
|
||||||
const prefix = this.$imagesUrl.endsWith('/') ? this.$imagesUrl : `${this.$imagesUrl}/`;
|
const prefix = this.$imagesUrl.endsWith('/') ? this.$imagesUrl : `${this.$imagesUrl}/`;
|
||||||
const fullUrl = item.url.startsWith('/') ?
|
const fullUrl = item.url.startsWith('/')
|
||||||
`${prefix}${item.url.slice(1)}` :
|
? `${prefix}${item.url.slice(1)}`
|
||||||
`${prefix}${item.url}`;
|
: `${prefix}${item.url}`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
url: fullUrl,
|
url: fullUrl,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
this.maxTime = now.getTime()
|
this.maxTime = now.getTime()
|
||||||
|
|
||||||
const min = new Date()
|
const min = new Date()
|
||||||
min.setFullYear(min.getFullYear() - 5)
|
min.setFullYear(min.getFullYear() - 5)
|
||||||
this.minTime = min.getTime()
|
this.minTime = min.getTime()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleBack() {
|
handleBack() {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1
|
delta: 1
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
ifPassOnConfirm(value) {
|
ifPassOnConfirm(value) {
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
'已通过': 1,
|
'已通过': 1,
|
||||||
'未通过': 0
|
'未通过': 0
|
||||||
};
|
};
|
||||||
|
|
||||||
// 更新数据
|
// 更新数据
|
||||||
this.process.examStatus = statusMap[value.value[0]];
|
this.process.examStatus = statusMap[value.value[0]];
|
||||||
this.selectedValue = value.value[0];
|
this.selectedValue = value.value[0];
|
||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
subjectOnConfirm(value) {
|
subjectOnConfirm(value) {
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
'科目一': 1,
|
'科目一': 1,
|
||||||
'科目四': 4
|
'科目四': 4
|
||||||
};
|
};
|
||||||
|
|
||||||
// 更新数据
|
// 更新数据
|
||||||
this.process.subject = statusMap[value.value[0]];
|
this.process.subject = statusMap[value.value[0]];
|
||||||
this.subjectValue = value.value[0];
|
this.subjectValue = value.value[0];
|
||||||
this.subjectShow = false;
|
this.subjectShow = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
onConfirmExamTime(value) {
|
onConfirmExamTime(value) {
|
||||||
this.process.examTime = value;
|
this.process.examTime = value;
|
||||||
this.showTimePicker = false;
|
this.showTimePicker = false;
|
||||||
console.log('process', this.process)
|
console.log('process', this.process)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 格式化时间
|
// 格式化时间
|
||||||
formatDate(timestamp) {
|
formatDate(timestamp) {
|
||||||
const date = new Date(timestamp);
|
const date = new Date(timestamp);
|
||||||
const year = date.getFullYear();
|
const year = date.getFullYear();
|
||||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||||
const day = String(date.getDate()).padStart(2, '0');
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
const hours = String(date.getHours()).padStart(2, '0');
|
const hours = String(date.getHours()).padStart(2, '0');
|
||||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||||
return `${year}-${month}-${day} ${hours}:${minutes}`;
|
return `${year}-${month}-${day} ${hours}:${minutes}`;
|
||||||
},
|
},
|
||||||
|
|
||||||
formatSubject(subject) {
|
formatSubject(subject) {
|
||||||
switch (Number(subject)) {
|
switch (Number(subject)) {
|
||||||
case 2:
|
case 2: return '科目二';
|
||||||
return '科目二';
|
case 3: return '科目三';
|
||||||
case 3:
|
default: return '未知科目';
|
||||||
return '科目三';
|
}
|
||||||
default:
|
},
|
||||||
return '未知科目';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
deletePic(event) {
|
deletePic(event) {
|
||||||
this.fileList.splice(event.index, 1);
|
this.fileList.splice(event.index, 1);
|
||||||
},
|
},
|
||||||
// 新增图片
|
// 新增图片
|
||||||
async afterRead(event) {
|
async afterRead(event) {
|
||||||
let lists = [].concat(event.file);
|
let lists = [].concat(event.file);
|
||||||
let fileListLen = this.fileList.length;
|
let fileListLen = this.fileList.length;
|
||||||
|
|
||||||
for (let i = 0; i < lists.length; i++) {
|
for (let i = 0; i < lists.length; i++) {
|
||||||
try {
|
try {
|
||||||
const resultUrl = await this.uploadFilePromise(lists[i].url);
|
const resultUrl = await this.uploadFilePromise(lists[i].url);
|
||||||
let item = {
|
let item = {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
url: resultUrl,
|
url: resultUrl,
|
||||||
};
|
};
|
||||||
this.fileList.splice(fileListLen, 0, item);
|
this.fileList.splice(fileListLen, 0, item);
|
||||||
fileListLen++;
|
fileListLen++;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('图片上传失败', error);
|
console.error('图片上传失败', error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
uploadFilePromise(filePath) {
|
uploadFilePromise(filePath) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
upload({
|
upload({
|
||||||
url: '/app-api/small-upload/common/upload',
|
url: '/app-api/small-upload/common/upload',
|
||||||
filePath: filePath,
|
filePath: filePath,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.data && res.data.url) {
|
if (res.data && res.data.url) {
|
||||||
resolve(res.data.url);
|
resolve(res.data.url);
|
||||||
} else {
|
} else {
|
||||||
reject(new Error('上传失败'));
|
reject(new Error('上传失败'));
|
||||||
}
|
}
|
||||||
}).catch(err => reject(err));
|
}).catch(err => reject(err));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// getUserOrderDetails() {
|
// getUserOrderDetails() {
|
||||||
// request({
|
// request({
|
||||||
// url: '/app-api/small/drive/school-course-order/page',
|
// url: '/app-api/small/drive/school-course-order/page',
|
||||||
// method: 'GET',
|
// method: 'GET',
|
||||||
// params: {
|
// params: {
|
||||||
// userId: this.userInfo.id,
|
// userId: this.userInfo.id,
|
||||||
// paymentStatus: '2',
|
// paymentStatus: '2',
|
||||||
// ifEnd: false,
|
// ifEnd: false,
|
||||||
// tenantId: 180,
|
// tenantId: 180,
|
||||||
// },
|
// },
|
||||||
// tenantIdFlag: false
|
// tenantIdFlag: false
|
||||||
// }).then(res => {
|
// }).then(res => {
|
||||||
// console.log('123123', res)
|
// console.log('123123', res)
|
||||||
// this.orderList = res.data.records;
|
// this.orderList = res.data.records;
|
||||||
// if (res.data.records.length > 0) {
|
// if (res.data.records.length > 0) {
|
||||||
// const tempData = res.data.records[0]
|
// const tempData = res.data.records[0]
|
||||||
// if (this.process.subject != 2 && this.process.subject != 3) {
|
// if (this.process.subject != 2 && this.process.subject != 3) {
|
||||||
// this.process.courseId = tempData.courseId
|
// this.process.courseId = tempData.courseId
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// if (this.process.subject != 2 && this.process.subject != 3) {
|
// if (this.process.subject != 2 && this.process.subject != 3) {
|
||||||
// this.courseType = tempData.courseType
|
// this.courseType = tempData.courseType
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// this.process.tenantId = tempData.tenantId
|
// this.process.tenantId = tempData.tenantId
|
||||||
// this.getCourseCompleteStatus()
|
// this.getCourseCompleteStatus()
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
// },
|
// },
|
||||||
|
|
||||||
getCourseCompleteStatus() {
|
getCourseCompleteStatus() {
|
||||||
request({
|
request({
|
||||||
url: '/app-api/process/page',
|
url: '/app-api/process/page',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: {
|
params: {
|
||||||
userId: this.userInfo.id,
|
userId: this.userInfo.id,
|
||||||
courseId: this.process.courseId,
|
courseId: this.process.courseId,
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log('res123', res)
|
console.log('res123',res)
|
||||||
this.courseCompleteStatusList = res.data.records
|
this.courseCompleteStatusList = res.data.records
|
||||||
if (this.courseCompleteStatusList.length > 0) {
|
if (this.courseCompleteStatusList.length > 0) {
|
||||||
const subject2 = this.courseCompleteStatusList.find(item => item.subject === 2)
|
const subject2 = this.courseCompleteStatusList.find(item => item.subject === 2)
|
||||||
const subject3 = this.courseCompleteStatusList.find(item => item.subject === 3)
|
const subject3 = this.courseCompleteStatusList.find(item => item.subject === 3)
|
||||||
const subject1Or4 = this.courseCompleteStatusList.find(item => item.subject === 1 || item
|
const subject1Or4 = this.courseCompleteStatusList.find(item => item.subject === 1 || item.subject === 4)
|
||||||
.subject === 4)
|
if (subject1Or4) {
|
||||||
if (subject1Or4) {
|
this.courseType = subject1Or4.courseType
|
||||||
this.courseType = subject1Or4.courseType
|
|
||||||
}
|
|
||||||
|
|
||||||
if (subject2?.status === '2' && subject3?.status === '2') {
|
|
||||||
this.subjectColumns = [
|
|
||||||
['科目一', '科目四']
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
calculateScrollHeight() {
|
|
||||||
// 获取屏幕高度
|
|
||||||
const screenHeight = uni.getSystemInfoSync().windowHeight;
|
|
||||||
// 获取顶部区域高度
|
|
||||||
const topHeight = 145;
|
|
||||||
// 计算滚动区域高度
|
|
||||||
this.scrollHeight = screenHeight - topHeight;
|
|
||||||
},
|
|
||||||
|
|
||||||
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'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.process.subject == 1 || this.process.subject == 4) {
|
|
||||||
this.saveDataOne()
|
|
||||||
}
|
|
||||||
if (this.process.subject == 2 || this.process.subject == 3) {
|
|
||||||
this.saveDataTwo()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
saveDataOne() {
|
|
||||||
if (this.process.subject === 1 && this.courseCompleteStatusList.length <= 0) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请联系驾校人员!',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
|
|
||||||
}
|
|
||||||
if (this.process.subject === 4 && this.courseCompleteStatusList.length <= 0) {
|
|
||||||
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'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
console.log('postData', postData)
|
|
||||||
request({
|
|
||||||
url: '/app-api/process/updateProcess',
|
|
||||||
method: 'PUT',
|
|
||||||
data: postData,
|
|
||||||
// data: this.process,
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '保存成功',
|
|
||||||
icon: 'success',
|
|
||||||
duration: 1000
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.navigateBack({
|
|
||||||
delta: 1
|
|
||||||
});
|
|
||||||
}, 1500);
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.data?.message || '保存失败',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
saveDataTwo() {
|
|
||||||
const postData = {
|
|
||||||
...this.process, // 先拷贝 process 原有数据
|
|
||||||
tenantId: this.opTenantId,
|
|
||||||
fraction: this.process.examScore,
|
|
||||||
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'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
request({
|
|
||||||
url: '/app-api/examBatch/update',
|
|
||||||
method: 'PUT',
|
|
||||||
data: postData,
|
|
||||||
// data: this.process,
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '保存成功',
|
|
||||||
icon: 'success',
|
|
||||||
duration: 1000
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.navigateBack({
|
|
||||||
delta: 1
|
|
||||||
});
|
|
||||||
}, 1500);
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.data?.message || '保存失败',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
if (subject2?.status === '2' && subject3?.status === '2') {
|
||||||
};
|
this.subjectColumns = [['科目一', '科目四']]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
calculateScrollHeight() {
|
||||||
|
// 获取屏幕高度
|
||||||
|
const screenHeight = uni.getSystemInfoSync().windowHeight;
|
||||||
|
// 获取顶部区域高度
|
||||||
|
const topHeight = 145;
|
||||||
|
// 计算滚动区域高度
|
||||||
|
this.scrollHeight = screenHeight - topHeight;
|
||||||
|
},
|
||||||
|
|
||||||
|
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'});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.process.subject == 1 || this.process.subject == 4) {
|
||||||
|
this.saveDataOne()
|
||||||
|
}
|
||||||
|
if (this.process.subject == 2 || this.process.subject == 3) {
|
||||||
|
this.saveDataTwo()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
saveDataOne() {
|
||||||
|
if (this.process.subject === 1 && this.courseCompleteStatusList.length <= 0) {
|
||||||
|
uni.showToast({title: '请联系驾校人员!', icon: 'none'});
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
if (this.process.subject === 4 && this.courseCompleteStatusList.length <= 0) {
|
||||||
|
uni.showToast({title: '请联系驾校人员!', icon: 'none'});
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
const postData = {
|
||||||
|
...this.process, // 先拷贝 process 原有数据
|
||||||
|
remark: this.process.remark,
|
||||||
|
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'});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log('postData', postData)
|
||||||
|
request({
|
||||||
|
url: '/app-api/process/updateProcess',
|
||||||
|
method: 'PUT',
|
||||||
|
data: postData,
|
||||||
|
// data: this.process,
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '保存成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 1000
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
}, 1500);
|
||||||
|
} else {
|
||||||
|
uni.showToast({title: res.data?.message || '保存失败', icon: 'none'});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
saveDataTwo() {
|
||||||
|
const postData = {
|
||||||
|
...this.process, // 先拷贝 process 原有数据
|
||||||
|
tenantId: this.opTenantId,
|
||||||
|
fraction: this.process.examScore,
|
||||||
|
ifPass: this.process.examStatus,
|
||||||
|
id: this.batchItemId,
|
||||||
|
remark: this.process.remark,
|
||||||
|
images: this.fileList?.map(item => item.url).join(',') || '',
|
||||||
|
}
|
||||||
|
/* 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'});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
request({
|
||||||
|
url: '/app-api/examBatch/update',
|
||||||
|
method: 'PUT',
|
||||||
|
data: postData,
|
||||||
|
// data: this.process,
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '保存成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 1000
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
}, 1500);
|
||||||
|
} else {
|
||||||
|
uni.showToast({title: res.data?.message || '保存失败', icon: 'none'});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang='scss'>
|
<style lang='scss'>
|
||||||
@import '../common/common.scss';
|
@import '../common/common.scss';
|
||||||
@import './assets/style/index.rpx.scss';
|
@import './assets/style/index.rpx.scss';
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@ -13,8 +13,9 @@
|
|||||||
<view class="block_3 flex-row justify-between">
|
<view class="block_3 flex-row justify-between">
|
||||||
<view class="text-group_1 flex-col justify-between">
|
<view class="text-group_1 flex-col justify-between">
|
||||||
|
|
||||||
<text class="text_2"
|
<text class="text_2" v-if="item.subject == 1 || item.subject == 4">{{
|
||||||
v-if="item.subject == 1 || item.subject == 4">{{ formatDate(item.examTime) }}
|
formatDate(item.examTime)
|
||||||
|
}}
|
||||||
</text>
|
</text>
|
||||||
<text class="text_2" v-else>{{ formatDate(item.startTime) }}</text>
|
<text class="text_2" v-else>{{ formatDate(item.startTime) }}</text>
|
||||||
<text class="text_3">{{ item.courseName }}</text>
|
<text class="text_3">{{ item.courseName }}</text>
|
||||||
@ -22,9 +23,7 @@
|
|||||||
<view class="text-group_2 flex-col justify-between">
|
<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-if="item.examScore">{{ item.examScore }}</text>
|
||||||
<text class="text_4" v-else>{{ '--' }}</text>
|
<text class="text_4" v-else>{{ '--' }}</text>
|
||||||
<text class="text_5"
|
<text class="text_5">{{ getStatusText(item.examStatus) }}</text>
|
||||||
v-if="item.ifPassStatus === '9'">{{ getStatusText(item.ifPassStatus) }}</text>
|
|
||||||
<text class="text_5" v-else>{{ getStatusText(item.examStatus) }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="block_4 flex-row justify-between">
|
<view class="block_4 flex-row justify-between">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user