提交 a8e19621 authored 作者: wangjialong209's avatar wangjialong209

结果详情修改

上级 a8fe9f60
...@@ -17,14 +17,21 @@ ...@@ -17,14 +17,21 @@
<div style="margin-top: 15px;"> <div style="margin-top: 15px;">
<div class="person_attribute_box" v-for="(item, index) in data_keys" :key="index" <div class="person_attribute_box" v-for="(item, index) in data_keys" :key="index"
v-show="info_data[item.key] != undefined"> v-show="info_data[item.key] != undefined">
<span class="label">{{ item.label }}</span> <span v-if="item.key == 'duration'">
<span class="value">{{ info_data[item.key] || '暂无' }}</span> <span class="label">{{ item.label }}</span>
<span class="label">{{ seconds_to_minutes(info_data[item.key]) }}</span>
</span>
<span v-else>
<span class="label">{{ item.label }}</span>
<span class="value">{{ info_data[item.key] || '暂无' }}</span>
</span>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { secondsToMinutes } from '@/utils/tool';
export default { export default {
props: ['examination_questions'], props: ['examination_questions'],
data() { data() {
...@@ -53,7 +60,14 @@ export default { ...@@ -53,7 +60,14 @@ export default {
methods: { methods: {
back() { back() {
this.$router.go(-1); this.$router.go(-1);
} },
seconds_to_minutes(str) {
if (str) {
return secondsToMinutes(str)
} else {
return '暂无'
}
},
} }
} }
......
<!-- <!--
* @Author: czj * @Author: czj
* @Date: 2023-03-14 17:41:55 * @Date: 2023-03-14 17:41:55
* @Description: * @Description:
* @FilePath: \AdministrationHome\src\views\student\test_results\components\AnswerCard.vue * @FilePath: \AdministrationHome\src\views\student\test_results\components\AnswerCard.vue
--> -->
<!-- --> <!-- -->
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
</div> </div>
<!-- <span slot="reference"> {{ e.grades_code || '暂无' }}</span> --> <!-- <span slot="reference"> {{ e.grades_code || '暂无' }}</span> -->
<span slot="reference"> {{ test_results_list[e.id] || '暂无' }}</span> <span slot="reference"> {{ test_results_list[e.id] || '暂无' }}</span>
<!-- <span slot="reference"> {{ e.id || '暂无' }}</span> -->
</el-popover> </el-popover>
</div> </div>
</div> </div>
...@@ -106,7 +107,7 @@ export default { ...@@ -106,7 +107,7 @@ export default {
return { return {
IP: process.env.VUE_APP_BASE_API, IP: process.env.VUE_APP_BASE_API,
questions_list: [], questions_list: [],
test_results_list: [], test_results_list: {},
}; };
}, },
...@@ -115,7 +116,7 @@ export default { ...@@ -115,7 +116,7 @@ export default {
computed: {}, computed: {},
created() { created() {
this.questions_list = [...this.questions_lists]; this.questions_list = [...this.questions_lists];
this.test_results_list = [...this.test_results_lists]; this.test_results_list = { ...this.test_results_lists };
}, },
mounted() { }, mounted() { },
...@@ -245,4 +246,4 @@ export default { ...@@ -245,4 +246,4 @@ export default {
.wrong_answer { .wrong_answer {
background-color: #fdf0f0; background-color: #fdf0f0;
} }
</style> </style>
\ No newline at end of file
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论