This commit is contained in:
Lx 2025-04-01 17:57:14 +08:00
parent 2441d6d805
commit 843da06d8f
7 changed files with 364 additions and 96 deletions

View File

@ -90,7 +90,7 @@
.group_4 { .group_4 {
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
border-radius: 8px; border-radius: 8px;
height: 724rpx; height: 524rpx;
width: 686rpx; width: 686rpx;
justify-content: flex-center; justify-content: flex-center;
margin: 20rpx 0 0 32rpx; margin: 20rpx 0 0 32rpx;
@ -161,6 +161,20 @@
white-space: nowrap; white-space: nowrap;
line-height: 28rpx; line-height: 28rpx;
} }
.text_5_1 {
width: 162rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(44, 120, 245, 1);
font-size: 28rpx;
letter-spacing: -0.30px;
font-family: PingFang SC-Semibold;
font-weight: 600;
white-space: nowrap;
line-height: 28rpx;
display: flex;
justify-content: end;
}
} }
.text-wrapper_8 { .text-wrapper_8 {
width: 648rpx; width: 648rpx;

View File

@ -1,18 +1,8 @@
<template> <template>
<view class="page flex-col"> <view class="page flex-col">
<view class="group_1 flex-row"> <view class="group_1 flex-row">
<image
class="image_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kaoshijieguo/FigmaDDSSlicePNG5472ef46deab947fe098747eb1b07bd2.png"
/>
<view class="box_1 flex-col"></view>
<view class="box_2 flex-col"></view>
<image
class="image_2"
referrerpolicy="no-referrer"
src="/static/lanhu_kaoshijieguo/FigmaDDSSlicePNGb239db97c719ec7467ee7c9615d3d24a.png"
/>
</view> </view>
<view class="group_2 flex-row"> <view class="group_2 flex-row">
<image <image
@ -21,60 +11,91 @@
src="/static/lanhu_kaoshijieguo/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png" src="/static/lanhu_kaoshijieguo/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png"
/> />
<text class="text_1">考试结果</text> <text class="text_1">考试结果</text>
<view class="section_1 flex-col">
<view class="image-wrapper_3 flex-row">
<image
class="thumbnail_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kaoshijieguo/FigmaDDSSlicePNGdc9929c2b5fd86c1689cc5990a0b4397.png"
/>
</view>
<view class="box_5 flex-row justify-between">
<view class="box_3 flex-col"></view>
<view class="box_4 flex-col"></view>
</view>
</view>
</view> </view>
<view class="group_4 flex-col"> <view class="group_4 flex-col">
<view class="block_1 flex-row justify-between"> <view class="block_1 flex-row justify-between" @click="show = true">
<text class="text_19">是否通过</text> <text class="text_19">是否通过</text>
<view class="image-text_1 flex-row justify-between"> <view class="image-text_1 flex-row justify-between">
<text class="text-group_2">已通过</text> <!-- <text class="text-group_2">已通过</text> -->
<image
<view>
<u-picker v-model="process.examStatus" :show="show" :columns="ifPassColumns" title="是否通过" @confirm="ifPassOnConfirm" @cancel="show = false">
</u-picker>
<text class="text-group_2">{{ selectedValue || '请选择' }}</text>
<!-- <u-button @click="show = true"><text class="text-group_2">{{ selectedValue || '请选择' }}</text></u-button> -->
</view>
<!-- <image
class="thumbnail_2" class="thumbnail_2"
referrerpolicy="no-referrer" referrerpolicy="no-referrer"
src="/static/lanhu_kaoshijieguo/FigmaDDSSlicePNGe9aade9ef56a9cabc28f2f1b0555105b.png" src="/static/lanhu_kaoshijieguo/FigmaDDSSlicePNGe9aade9ef56a9cabc28f2f1b0555105b.png"
/> /> -->
</view> </view>
</view> </view>
<view class="text-wrapper_7 flex-row justify-between"> <view class="text-wrapper_7 flex-row justify-between">
<text class="text_4">分数</text> <text class="text_4">分数</text>
<text class="text_5">99</text> <view class="text_5_1 ">
<u--input
placeholder="请输入分数"
border="none"
v-model="process.examScore"
maxlength="3"
inputAlign="right"
></u--input>
</view>
</view> </view>
<view class="text-wrapper_8 flex-row justify-between"> <view class="text-wrapper_8 flex-row justify-between">
<text class="text_20">时间</text> <text class="text_20">时间</text>
<text class="text_3">2025-02-20&nbsp;12:00</text> <view>
<u-datetime-picker
:show="showTimePicker"
v-model="process.examTime"
mode="datetime"
@confirm="onConfirmExamTime"
@cancel="showTimePicker = false"
></u-datetime-picker>
<text class="text_3" @click="showTimePicker = true">{{ process.examTime ? formatDate(process.examTime) : '选择时间' }}</text>
<!-- <u-button @click="showTimePicker = true">打开</u-button> -->
</view>
</view> </view>
<view class="text-wrapper_9 flex-row justify-between"> <view class="text-wrapper_9 flex-row justify-between">
<text class="text_6">姓名</text> <text class="text_6">姓名</text>
<text class="text_7">张三</text> <view class="text_5_1 ">
<u--input
placeholder="请输入姓名"
border="none"
v-model="process.name"
maxlength="3"
inputAlign="right"
></u--input>
</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">C1</text> <text class="text_9">C1</text>
</view> </view>
<view class="text-wrapper_11 flex-row justify-between"> <view class="text-wrapper_11 flex-row justify-between" @click="subjectShow = true">
<text class="text_10">考试科目</text> <text class="text_10">考试科目</text>
<text class="text_11">科目二</text> <view>
<u-picker v-model="process.subject" :show="subjectShow" :columns="subjectColumns" title="科目" @confirm="subjectOnConfirm" @cancel="subjectShow = false">
</u-picker>
<text class="text-group_2">{{ subjectValue || '请选择科目' }}</text>
<!-- <u-button @click="show = true"><text class="text-group_2">{{ selectedValue || '请选择' }}</text></u-button> -->
</view> </view>
<view class="text-wrapper_12 flex-row justify-between"> <!-- <text class="text_11">科目二</text> -->
</view>
<!-- <view class="text-wrapper_12 flex-row justify-between">
<text class="text_12">考试地址</text> <text class="text_12">考试地址</text>
<text class="text_13">山东省济南市历下区</text> <text class="text_13">山东省济南市历下区</text>
</view> </view>
<view class="text-wrapper_13 flex-row justify-between"> <view class="text-wrapper_13 flex-row justify-between">
<text class="text_14">交通方式</text> <text class="text_14">交通方式</text>
<text class="text_15">公交车</text> <text class="text_15">公交车</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>
@ -101,13 +122,88 @@
export default { export default {
data() { data() {
return { return {
show: false,
showTimePicker: false,
subjectShow: false,
ifPassColumns: [['已通过', '未通过']],
subjectColumns: [['科目一', '科目四' ]],
selectedValue: '',
subjectValue: '',
process: {
name: null,
userId: null,
subject:null,
courseType: null,
examNum: null,
examStatus: null,
examScore: null,
remark: null,
examTime: null,
images: null,
},
constants: {} constants: {}
}; };
}, },
methods: {} methods: {
ifPassOnConfirm(value) {
console.log('选中的值:', value);
const statusMap = {
'已通过': 1,
'未通过': 0
};
//
this.process.examStatus = statusMap[value.value[0]]; // \
console.log('value[0]', value.value[0])
this.selectedValue = value.value[0]; //
this.show = false; //
console.log('examStatus:', this.process.examStatus);
console.log('process', this.process)
},
subjectOnConfirm(value) {
console.log('选中的值:', value);
const statusMap = {
'科目一': 1,
'科目四': 4
};
//
this.process.subject = statusMap[value.value[0]]; // \
console.log('value[0]', value.value[0])
this.subjectValue = value.value[0]; //
this.subjectShow = false; //
console.log('subject:', this.process.subject);
console.log('process', this.process)
},
onConfirmExamTime(value) {
console.log("选中的时间:", value);
this.process.examTime = value; // process.examTime
this.showTimePicker = false; //
},
//
formatDate(timestamp) {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}`;
},
}
}; };
</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>

View File

@ -1,18 +1,8 @@
<template> <template>
<view class="page flex-col"> <view class="page flex-col">
<view class="block_1 flex-row"> <view class="block_1 flex-row">
<image
class="image_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kaoshijieguoluru/FigmaDDSSlicePNG5472ef46deab947fe098747eb1b07bd2.png"
/>
<view class="box_1 flex-col"></view>
<view class="box_2 flex-col"></view>
<image
class="image_2"
referrerpolicy="no-referrer"
src="/static/lanhu_kaoshijieguoluru/FigmaDDSSlicePNGb239db97c719ec7467ee7c9615d3d24a.png"
/>
</view> </view>
<view class="block_2 flex-col"> <view class="block_2 flex-col">
<view class="box_3 flex-row"> <view class="box_3 flex-row">
@ -20,21 +10,10 @@
class="label_1" class="label_1"
referrerpolicy="no-referrer" referrerpolicy="no-referrer"
src="/static/lanhu_kaoshijieguoluru/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png" src="/static/lanhu_kaoshijieguoluru/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png"
@click="handleBack()"
/> />
<text class="text_1">考试结果录入</text> <text class="text_1">考试结果录入</text>
<view class="section_1 flex-col">
<view class="image-wrapper_1 flex-row">
<image
class="thumbnail_1"
referrerpolicy="no-referrer"
src="/static/lanhu_kaoshijieguoluru/FigmaDDSSlicePNGdc9929c2b5fd86c1689cc5990a0b4397.png"
/>
</view>
<view class="box_4 flex-row justify-between">
<view class="group_1 flex-col"></view>
<view class="group_2 flex-col"></view>
</view>
</view>
</view> </view>
<view class="box_5 flex-col"> <view class="box_5 flex-col">
<view class="block_3 flex-row justify-between"> <view class="block_3 flex-row justify-between">
@ -105,7 +84,7 @@
</view> </view>
</view> </view>
<view class="block_8 flex-col"> <view class="block_8 flex-col">
<view class="text-wrapper_8 flex-col"> <view class="text-wrapper_8 flex-col" @click="goScorerecord()">
<text class="text_19">笔试成绩录入</text> <text class="text_19">笔试成绩录入</text>
</view> </view>
</view> </view>
@ -144,7 +123,19 @@ export default {
constants: {} constants: {}
}; };
}, },
methods: {} methods: {
handleBack() {
uni.navigateBack({
delta: 1
});
},
goScorerecord(){
uni.navigateTo({
url: '/newPages/examinationAdd/index'
});
}
}
}; };
</script> </script>
<style lang='scss'> <style lang='scss'>

View File

@ -19,11 +19,34 @@
<view class="box_6 flex-col"> <view class="box_6 flex-col">
<view class="box_7 flex-row justify-between"> <view class="box_7 flex-row justify-between">
<text class="text_2">头像</text> <text class="text_2">头像</text>
<u-upload
:fileList="fileList1"
@afterRead="afterRead"
@delete="deletePic"
name="1"
:maxCount="1"
width="80"
height="80"
:previewFullImage="true"
>
<image <image
v-if="userDetails.avatar"
class="label_2"
:src="userDetails.avatar"
mode="aspectFill"
/>
<image
v-else
class="label_2"
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGcc6ee579083c2c921f6c93c250df5d44.png"
/>
</u-upload>
<!-- <image
class="label_2" class="label_2"
referrerpolicy="no-referrer" referrerpolicy="no-referrer"
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGcc6ee579083c2c921f6c93c250df5d44.png" src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGcc6ee579083c2c921f6c93c250df5d44.png"
/> /> -->
</view> </view>
<view class="text-wrapper_1 flex-row justify-between"> <view class="text-wrapper_1 flex-row justify-between">
<text class="text_3">昵称</text> <text class="text_3">昵称</text>
@ -79,12 +102,22 @@
</view> </view>
</template> </template>
<script> <script>
import request from '@/utils/request.js'
export default { export default {
data() { data() {
return { return {
constants: {} userDetails: [],
userId: null,
constants: {},
fileList1: [] //
}; };
}, },
onLoad(option) {
this.userId = option.userId;
console.log('option', option)
console.log('userId', this.userId)
this.getUserInfo()
},
methods: { methods: {
handleBack() { handleBack() {
uni.navigateBack({ uni.navigateBack({
@ -92,6 +125,88 @@ export default {
}); });
}, },
getUserInfo(){
request({
url: '/app-api/small/dl-drive-school-student/getByUserId',
method: 'GET',
params: {
userId: this.userId,
},
}).then(res => {
this.userDetails = res.data
if (res.data.avatar) {
this.fileList1 = [{
url: res.data.avatar,
status: 'success'
}]
}
console.log('res.data',res.data);
console.log('userDetails', this.userDetails);
})
},
//
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
this.userDetails.avatar = '' //
},
//
afterRead(event) {
// mutiple true , file
let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
})
})
//
lists.map((item, index) => {
this.uploadFilePromise(item.url).then(res => {
let item = this[`fileList${event.name}`][fileListLen + index]
this[`fileList${event.name}`].splice(fileListLen + index, 1, {
...item,
status: 'success',
message: '',
url: res.data.url
})
//
this.userDetails.avatar = this.baseUrl + '/' + res.data.url
}).catch(err => {
let item = this[`fileList${event.name}`][fileListLen + index]
this[`fileList${event.name}`].splice(fileListLen + index, 1, {
...item,
status: 'failed',
message: '上传失败'
})
})
})
},
// -
uploadFilePromise(e) {
return new Promise((resolve, reject) => {
uni.uploadFile({
url: '/app-api/small-upload/common/upload',
filePath: e,
name: 'file',
success: (res) => {
if (res.statusCode === 200) {
resolve(JSON.parse(res.data))
} else {
reject(new Error('上传失败'))
}
},
fail: (err) => {
reject(err)
}
})
})
}
} }
}; };
</script> </script>

View File

@ -489,4 +489,17 @@
} }
} }
} }
.text_111 {
width: 84rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(21, 52, 102, 1);
font-size: 28rpx;
font-family: PingFang SC-Semibold;
font-weight: 600;
text-align: center;
white-space: nowrap;
line-height: 28rpx;
margin: 10rpx 0 40rpx 30rpx;
}
} }

View File

@ -10,7 +10,7 @@
<image <image
class="image_2" class="image_2"
referrerpolicy="no-referrer" referrerpolicy="no-referrer"
:src="imageUrl + '/' + selfInfo.avatar || '/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG185e54e3ffd47170ac4e6e5108c9a54f.png'" :src="selfInfo && selfInfo.avatar ? imageUrl + '/' + selfInfo.avatar : '/static/lanhu_gerenzhongxin/FigmaDDSSlicePNG185e54e3ffd47170ac4e6e5108c9a54f.png'"
/> />
</view> </view>
</view> </view>
@ -35,21 +35,26 @@
<image <image
class="label_2" class="label_2"
referrerpolicy="no-referrer" referrerpolicy="no-referrer"
src="/static/lanhu_gerenzhongxin/FigmaDDSSlicePNGa95a4d1d98d08b238a3082514eefafd0.png" :src="coachDetails && coachDetails.image ? imageUrl + '/' + coachDetails.image : '/static/lanhu_gerenzhongxin/FigmaDDSSlicePNGa95a4d1d98d08b238a3082514eefafd0.png'"
/> />
</view> </view>
<view class="text-group_3 flex-col justify-between"> <view class="text-group_3 flex-col justify-between">
<text class="text_4">马文峰</text> <text class="text_4" v-if="coachDetails.name != null">{{ coachDetails.name }}</text>
<view class="text-wrapper_1"> <text class="text_111" v-else> 暂无教练信息 </text>
<view class="text-wrapper_1" v-if="coachDetails.seniority != null">
<text class="text_5">教龄</text> <text class="text_5">教龄</text>
<text class="text_6">6</text> <text class="text_6">{{ coachDetails.seniority }}</text>
<text class="text_7"></text> <text class="text_7"></text>
</view> </view>
</view> </view>
<view class="text-wrapper_2"> <!-- <view class="text-wrapper_2" v-if="coachDetails">
<text class="text_8">学员数</text> <text class="text_8">学员数</text>
<text class="text_9">85</text> <text class="text_9">{{}}</text>
</view> </view>
<view class="text-wrapper_2" v-else>
<text class="text_8">暂无数据</text>
</view> -->
</view> </view>
</view> </view>
<view class="box_9 flex-col"> <view class="box_9 flex-col">
@ -71,7 +76,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="block_2 flex-row" @click="goMyInfo()"> <view class="block_2 flex-row" @click="goMyInDetails()">
<view class="image-wrapper_4 flex-col"> <view class="image-wrapper_4 flex-col">
<image <image
class="thumbnail_2" class="thumbnail_2"
@ -134,6 +139,8 @@ export default {
return { return {
msg: "3", msg: "3",
selfInfo: {}, selfInfo: {},
coachDetails:{},
userDetails: {},
loopData: [ loopData: [
{ {
url: '/static/myImgs/alreadyPaid.png', url: '/static/myImgs/alreadyPaid.png',
@ -167,6 +174,7 @@ export default {
onLoad() { onLoad() {
this.selfInfo = getLocalUserInfo() this.selfInfo = getLocalUserInfo()
console.log("用户信息", this.selfInfo) console.log("用户信息", this.selfInfo)
this.getUserInfo()
}, },
onShow() { onShow() {
if (getToken()) { if (getToken()) {
@ -211,9 +219,38 @@ export default {
url: `/newPages/orderList/index?orderType=${orderType}&type=${type}&userId=${this.selfInfo.id}` url: `/newPages/orderList/index?orderType=${orderType}&type=${type}&userId=${this.selfInfo.id}`
}) })
}, },
goMyInfo(){ goMyInDetails(){
uni.navigateTo({ uni.navigateTo({
url: '/newPages/informationAdd/index' url: `/newPages/informationAdd/index?userId=${this.selfInfo.id}`
})
},
getUserInfo(){
request({
url: '/app-api/small/dl-drive-school-student/getByUserId',
method: 'GET',
params: {
userId: this.selfInfo.id,
},
}).then(res => {
this.userDetails = res.data
console.log('userDetails', this.userDetails)
if(this.userDetails.sourceUserId !== null){
this.getCoachDetails(this.userDetails.sourceUserId)
}
})
},
getCoachDetails(userId){
request({
url: '/app-api/dl-drive-school-coach-small/getCoachByUserId',
method: 'GET',
params: {
userId: userId
}
}).then(res => {
this.coachDetails = res.data
console.log('coachDetails', this.coachDetails);
}) })
} }

View File

@ -151,6 +151,7 @@
import request from '@/utils/request.js' import request from '@/utils/request.js'
import tabbar from '../../components/tabbar/tabbar.vue' import tabbar from '../../components/tabbar/tabbar.vue'
import upload from '@/utils/upload.js' import upload from '@/utils/upload.js'
import { getLocalUserInfo } from '../../utils/auth'
export default { export default {
data() { data() {
return { return {
@ -226,7 +227,7 @@
this.userinfo = getLocalUserInfo() this.userinfo = getLocalUserInfo()
console.log("驾校id", this.jxId, "课程id", this.courseId) console.log("驾校id", this.jxId, "课程id", this.courseId)
console.log("userId", this.userId, "tenantId", this.tenantId) console.log("userId", this.userId, "tenantId", this.tenantId)
console.log("userinfo",this.userinfo)
console.log('当前存储的所有键:', uni.getStorageInfoSync().keys) console.log('当前存储的所有键:', uni.getStorageInfoSync().keys)
console.log('token值:', uni.getStorageSync('App-Token')) console.log('token值:', uni.getStorageSync('App-Token'))
}, },
@ -267,7 +268,7 @@
methods: { methods: {
updateDisplayPrice() { updateDisplayPrice() {
//
this.currentPrice = this.selectedPayType === 1 this.currentPrice = this.selectedPayType === 1
? this.rightInfoList.reserveMoney ? this.rightInfoList.reserveMoney
: this.rightInfoList.price; : this.rightInfoList.price;
@ -685,6 +686,7 @@
registAddress:this.Address, registAddress:this.Address,
userId:this.userinfo.id, userId:this.userinfo.id,
tenantId:this.tenantId, tenantId:this.tenantId,
idPhoto: this.sfzimg,
} }
}) })
@ -702,15 +704,15 @@
getCurrentDateTime() { getCurrentDateTime() {
const now = new Date(); const now = new Date();
/* const year = now.getFullYear(); const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0'); // 0 const month = String(now.getMonth() + 1).padStart(2, '0');
const day = String(now.getDate()).padStart(2, '0'); const day = String(now.getDate()).padStart(2, '0');
const hours = String(now.getHours()).padStart(2, '0'); const hours = String(now.getHours()).padStart(2, '0');
const minutes = String(now.getMinutes()).padStart(2, '0'); const minutes = String(now.getMinutes()).padStart(2, '0');
const seconds = String(now.getSeconds()).padStart(2, '0'); const seconds = String(now.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; */ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
return now; // return now;
} }
} }