更新
This commit is contained in:
parent
ca09addd0b
commit
c29ddaf254
@ -160,4 +160,12 @@
|
||||
align-items: center; /* 垂直居中 */
|
||||
height: 100vh; /* 或者你需要撑满的高度 */
|
||||
}
|
||||
.text-group_1 {
|
||||
display: inline-block;
|
||||
max-width: 4em; /* 一个汉字大概占1em,3em就是三个字 */
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -111,8 +111,13 @@
|
||||
} else if (options.type === 'kaoshi') {
|
||||
this.title = '考试'
|
||||
//评价类型为考试
|
||||
this.info.evaluateType = 0
|
||||
this.info.evaluateType = 1
|
||||
this.info.busiId = data.batchItemId
|
||||
}
|
||||
this.info.createTime = undefined
|
||||
this.info.updataTime = undefined
|
||||
this.info.creator = undefined
|
||||
this.info.updater = undefined
|
||||
} else {
|
||||
Object.assign(this.info, data);
|
||||
}
|
||||
@ -171,4 +176,11 @@
|
||||
justify-content: center;
|
||||
/* 新增:水平居中 */
|
||||
}
|
||||
.text-group_2 {
|
||||
display: inline-block;
|
||||
max-width: 4em; /* 一个汉字大概占1em,3em就是三个字 */
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
|
@ -25,11 +25,14 @@
|
||||
<view
|
||||
class="box_5 flex-col" v-for="(item, index) in examList"
|
||||
:key="index"
|
||||
:style="{ height: (item.subject != 2 && item.subject != 3) ? '210rpx' : 'auto' }">
|
||||
:style="{ height: ((item.subject != 2 && item.subject != 3) || getButtonInfo(item).text === '1') ? '230rpx' : 'auto' }">
|
||||
<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>
|
||||
<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>
|
||||
@ -42,7 +45,7 @@
|
||||
</view>
|
||||
<view class="block_4 flex-row justify-between">
|
||||
<view class="text-wrapper_1 flex-col">
|
||||
<text class="text_6">{{getCourseTypeText(item.subject)}}</text>
|
||||
<text class="text_6">{{ getCourseTypeText(item.subject) }}</text>
|
||||
</view>
|
||||
<view class="text-wrapper_2 flex-col">
|
||||
<text class="text_7">{{ item.courseType }}</text>
|
||||
@ -52,8 +55,8 @@
|
||||
<text class="text_8">考试地址:</text>
|
||||
<text class="text_9">{{ item.addr }}</text>
|
||||
</view>
|
||||
<view class="block_5 flex-row" v-if="item.subject == 2 || item.subject == 3">
|
||||
<view class="text-wrapper_4 flex-col" @click="handleButtonClick(item)">
|
||||
<view class="block_5 flex-row" v-if="(item.subject == 2 || item.subject == 3) && getButtonInfo(item).text !== '1'">
|
||||
<view class="text-wrapper_4 flex-col" @click="handleButtonClick(item)" >
|
||||
<!-- <text class="text_10" v-if="item.fraction != null && item.ifPass">开始评价</text>
|
||||
<text class="text_10" v-else-if="item.fraction == null && (item.ifPass == null || item.ifPass == 0)">成绩录入</text>
|
||||
<text class="text_10" v-else-if="!item.ifEvaluate">查看评价</text> -->
|
||||
@ -113,8 +116,9 @@
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import { getLocalUserInfo } from '../../utils/auth';
|
||||
import {getLocalUserInfo} from '../../utils/auth';
|
||||
import request from '@/utils/request.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -156,7 +160,7 @@ export default {
|
||||
isTriggered: false,
|
||||
};
|
||||
},
|
||||
onLoad(){
|
||||
onLoad() {
|
||||
this.userInfo = getLocalUserInfo()
|
||||
this.getExamList()
|
||||
this.getCourseList()
|
||||
@ -267,10 +271,10 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
getExamList(){
|
||||
getExamList() {
|
||||
request({
|
||||
url: '/app-api/process/getExamListByUserId',
|
||||
method:'GET',
|
||||
method: 'GET',
|
||||
params: {
|
||||
userId: this.userInfo.id,
|
||||
}
|
||||
@ -278,11 +282,11 @@ export default {
|
||||
this.examList = res.data
|
||||
this.getExamTwoList()
|
||||
console.log('examList', this.examList)
|
||||
console.log('res',res)
|
||||
console.log('res', res)
|
||||
this.isTriggered = false
|
||||
})
|
||||
},
|
||||
getExamTwoList(){
|
||||
getExamTwoList() {
|
||||
request({
|
||||
url: '/app-api/examBatch/selectExamByUserIdAndCoachId',
|
||||
method: 'GET',
|
||||
@ -292,16 +296,16 @@ export default {
|
||||
}).then(res => {
|
||||
this.examTwoList = res.data
|
||||
console.log('examTwoList', this.examTwoList)
|
||||
console.log('resTwo',res)
|
||||
console.log('resTwo', res)
|
||||
})
|
||||
},
|
||||
getCourseList(){
|
||||
getCourseList() {
|
||||
request({
|
||||
url:'/app-api/small/drive/school-course-order/getCourseByLoginUser',
|
||||
url: '/app-api/small/drive/school-course-order/getCourseByLoginUser',
|
||||
method: 'GET'
|
||||
}).then(res => {
|
||||
this.courseList = res.data
|
||||
console.log('res111',res)
|
||||
console.log('res111', res)
|
||||
})
|
||||
},
|
||||
getStatusText(status) {
|
||||
@ -345,21 +349,24 @@ export default {
|
||||
|
||||
getButtonInfo(item) {
|
||||
console.log('item', item)
|
||||
if (item.fraction == null ) {
|
||||
return { text: '成绩录入', type: 'input' }
|
||||
if (item.fraction == null) {
|
||||
return {text: '成绩录入', type: 'input'}
|
||||
} else if (!item.ifPass) {
|
||||
return { text: '考试未通过', type: 'failed' }
|
||||
} else if (item.ifEvaluate) {
|
||||
return { text: '查看评价', type: 'view' }
|
||||
} else {
|
||||
return { text: '开始评价', type: 'evaluate' }
|
||||
return {text: '考试未通过', type: 'failed'}
|
||||
} else if (!item.ifEvaluate) {
|
||||
return {text: '开始评价', type: 'evaluate'}
|
||||
}else {
|
||||
return {text: '1', type: 'evaluate'}
|
||||
}
|
||||
// else if (item.ifEvaluate) {
|
||||
// return { text: '查看评价', type: 'view' }
|
||||
// }
|
||||
},
|
||||
|
||||
handleButtonClick(item) {
|
||||
const buttonInfo = this.getButtonInfo(item)
|
||||
|
||||
switch(buttonInfo.type) {
|
||||
switch (buttonInfo.type) {
|
||||
case 'input':
|
||||
this.goScoreInput(item)
|
||||
break
|
||||
@ -382,8 +389,9 @@ export default {
|
||||
},
|
||||
// 跳转到开始评价页面
|
||||
goEvaluate(item) {
|
||||
item = JSON.stringify(item)
|
||||
uni.navigateTo({
|
||||
url: `/newPages/evaluation/index?batchId=${item.batchId}&evaluateId=${item.evaluateId || ''}`
|
||||
url: `/newPages/evaluateAdd/index?data=${item}&type=kaoshi&controls=add`
|
||||
})
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user