|
|
@@ -0,0 +1,209 @@
|
|
|
+<template>
|
|
|
+ <el-card class="cQuestion-card" shadow="hover">
|
|
|
+ <template #header>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3">
|
|
|
+ <div>
|
|
|
+ <strong>申请人: </strong>{{savedUserName}}
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <div>
|
|
|
+ <strong>申请日期: </strong>2021-9-19 09:36:00
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="14"></el-col>
|
|
|
+ <el-col :span="2">
|
|
|
+ <el-button type="text" circle @click="expand" v-if="!isAll"><strong>查看全部</strong></el-button>
|
|
|
+ <el-button type="text" circle @click="withdraw" v-if="isAll"><strong>收起</strong></el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ <div class="question-body">
|
|
|
+ <div class="bQuestion-card-body">
|
|
|
+ <div class="bQuestion-card-body-stem">
|
|
|
+ <div>
|
|
|
+ <MarkdownText :raw="'<strong>题目: </strong>'+questionvo.stem"></MarkdownText>
|
|
|
+ </div>
|
|
|
+ <div class="stem-extension" v-if="isAll">
|
|
|
+ <div class="bQuestion-card-body-options" v-if="questionvo.type === 'choice'">
|
|
|
+ <div v-for="(item,index) in questionvo.options" >
|
|
|
+ <div v-if="questionvo.answer.split('').indexOf(index) !== -1" class="underline-correct-answer">
|
|
|
+ <MarkdownText :raw="index+': '+item"></MarkdownText>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <MarkdownText :raw="index+': '+item"></MarkdownText>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="bQuestion-card-body-options" v-if="questionvo.type === 'multiple_choice'">
|
|
|
+ <div v-for="(item,index) in questionvo.options" >
|
|
|
+ <div v-if="questionvo.answer.split(';').indexOf(index) !== -1" class="underline-correct-answer">
|
|
|
+ <MarkdownText :raw="index+': '+item"></MarkdownText>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <MarkdownText :raw="index+': '+item"></MarkdownText>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="bQuestion-card-body-blanks" v-if="questionvo.type === 'blank'">
|
|
|
+ <div v-for="index in Object.keys(questionvo.blanks).length">
|
|
|
+ <div class="correct_answer">
|
|
|
+ __{{index}}__: {{questionvo.blanks['__'+index+'__']}}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="bQuestion-card-body-true_false" v-if="questionvo.type === 'true_false'">
|
|
|
+ <div class="correct_answer"> {{questionvo.answer}}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-divider v-if="isAll"></el-divider>
|
|
|
+
|
|
|
+ <div class="bQuestion-card-body-info" v-if="isAll">
|
|
|
+ <div class="info-block">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="10">
|
|
|
+ <strong>KeyPoints: </strong>{{questionvo.keyPoints}}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <strong>题目难度: </strong>{{questionvo.weight}}/5
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <span><strong>Tags: </strong></span>
|
|
|
+ <span v-if="questionvo.tags && questionvo.tags.length !== 0">
|
|
|
+ <el-tag v-for="(item, index) in questionvo.tags" effect="dark">{{item}}</el-tag>
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ <span>no tags</span>
|
|
|
+ </span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div class="info-block"
|
|
|
+ v-if="questionvo.type === 'choice' ||
|
|
|
+ questionvo.type === 'multiple_choice' ||
|
|
|
+ questionvo.type === 'true_false' ||
|
|
|
+ questionvo.type === 'short_answer'">
|
|
|
+ <MarkdownText :raw="'<strong>正确答案: </strong>'+questionvo.answer"></MarkdownText>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div class="info-block"
|
|
|
+ v-if="questionvo.type === 'choice' ||
|
|
|
+ questionvo.type === 'multiple_choice' ||
|
|
|
+ questionvo.type === 'true_false'">
|
|
|
+ <MarkdownText :raw="'<strong>解析: </strong>'+questionvo.analysis"></MarkdownText>
|
|
|
+ </div>
|
|
|
+ <div class="info-block" v-if="questionvo.type === 'blank' && questionvo.analysis.length > 5">
|
|
|
+ <MarkdownText :raw="'<strong>解析: </strong>'+questionvo.analysis"></MarkdownText>
|
|
|
+ </div>
|
|
|
+ <div class="info-block" v-if="questionvo.type === 'short_answer' && questionvo.analysis.length > 5">
|
|
|
+ <MarkdownText :raw="'<strong>解析: </strong>'+questionvo.analysis"></MarkdownText>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-divider v-if="isAll"></el-divider>
|
|
|
+
|
|
|
+ <div class="bQuestion-card-footer" v-if="isAll">
|
|
|
+ <div>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-button type="primary" @click="">通过</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-button type="primary" @click="">待定</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-button type="primary" @click="">拒绝</el-button>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import {getUserById} from "../../api/user";
|
|
|
+ import MarkdownText from "../MarkdownText";
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: "checkCard",
|
|
|
+ components:{
|
|
|
+ MarkdownText,
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ questionvo: Object,
|
|
|
+ },
|
|
|
+ data(){
|
|
|
+ return{
|
|
|
+ questionvo1: {
|
|
|
+ id: '',
|
|
|
+ type: '',
|
|
|
+ state: '',
|
|
|
+ checkedUserId: 0,
|
|
|
+ savedUserId: 0,
|
|
|
+ stem: '',
|
|
|
+ weight: 0,
|
|
|
+ analysis: '',
|
|
|
+ keyPoints: '',
|
|
|
+ tags: [],
|
|
|
+ knowledgeId: [],
|
|
|
+ options: {},
|
|
|
+ blanks: {},
|
|
|
+ answer: '',
|
|
|
+ inputOutputMapping: {},
|
|
|
+ millisecondLimit: 0,
|
|
|
+ memoryLimit: 0,
|
|
|
+ createdTime: Date,
|
|
|
+ lastModifiedTime: Date,
|
|
|
+ },
|
|
|
+ isAll: false,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ savedUserName: function () {
|
|
|
+ // let user;
|
|
|
+ // getUserById(this.questionvo.savedUserId).then(res => {
|
|
|
+ // user = res.result.content;
|
|
|
+ // return user.name;
|
|
|
+ // }).catch(err => {
|
|
|
+ // console.log(err);
|
|
|
+ // })
|
|
|
+ return "xiaosu";
|
|
|
+ },
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ expand(){
|
|
|
+ if(!this.isAll){
|
|
|
+ this.isAll = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ withdraw(){
|
|
|
+ if(this.isAll){
|
|
|
+ this.isAll = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style>
|
|
|
+ .cQuestion-card{
|
|
|
+ margin: 20px;
|
|
|
+ font-size: 18px;
|
|
|
+ background-color: #eef7f2;
|
|
|
+ }
|
|
|
+
|
|
|
+</style>
|