90 lines
2.9 KiB
Vue
90 lines
2.9 KiB
Vue
<template>
|
||
<a-card :bordered="false" title="答题记录">
|
||
<template slot="extra">
|
||
<a-button size="small" @click="close">返回</a-button>
|
||
</template>
|
||
|
||
<s-table ref="table" size="small" rowKey="id" :columns="columns" :data="loadData">
|
||
<template slot="action" slot-scope="text, record">
|
||
<a href="javascript:;" @click="archivesProjectUserAnswerDateil(record)">答题记录</a>
|
||
</template>
|
||
</s-table>
|
||
</a-card>
|
||
</template>
|
||
|
||
<script>
|
||
import { STable, SearchCom } from '@/components'
|
||
import { getArchivesProjectUserAnswerList } from '@/api/archives/project'
|
||
|
||
export default {
|
||
// import引入的组件需要注入到对象中才能使用
|
||
components: { STable, SearchCom },
|
||
props: {},
|
||
data() {
|
||
// 这里存放数据
|
||
return {
|
||
queryParam: {},
|
||
columns: [
|
||
{ title: '交卷时间', width: 'auto', align: 'center', dataIndex: 'handDate', key: 'handDate' },
|
||
{ title: '考试时长', width: 'auto', align: 'center', dataIndex: 'testTime', key: 'testTime' },
|
||
{ title: '考试成绩', width: 'auto', align: 'center', dataIndex: 'testResult', key: 'testResult' },
|
||
{ title: '操作', width: '100px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } }
|
||
],
|
||
loadData: parameter => {
|
||
this.queryParam.projectId = this.$route.query.projectId;
|
||
this.queryParam.userId = this.$route.query.userId;
|
||
return getArchivesProjectUserAnswerList(Object.assign(parameter, this.queryParam)).then(res => { return res });
|
||
},
|
||
};
|
||
},
|
||
// 计算属性 类似于data概念
|
||
computed: {},
|
||
// 监控data中的数据变化
|
||
watch: {},
|
||
// 方法集合
|
||
methods: {
|
||
// 返回 按钮
|
||
close() {
|
||
this.$router.push({
|
||
path: '/archives/project/ProjectUser', query: {
|
||
queryParamState: this.$route.query.queryParamState,
|
||
queryParamUserName: this.$route.query.queryParamUserName,
|
||
pageNum1: this.$route.query.pageNum1,
|
||
|
||
queryParamTrainClass: this.$route.query.queryParamTrainClass,
|
||
queryParamTrainWay: this.$route.query.queryParamTrainWay,
|
||
queryParamProjectName: this.$route.query.queryParamProjectName,
|
||
pageNum: this.$route.query.pageNum
|
||
}
|
||
});
|
||
},
|
||
|
||
// 答题记录
|
||
archivesProjectUserAnswerDateil(record) {
|
||
|
||
}
|
||
|
||
},
|
||
// 生命周期 - 创建完成(可以访问当前this实例)
|
||
created() { },
|
||
// 生命周期 - 挂载完成(可以访问DOM元素)
|
||
mounted() { },
|
||
// 生命周期 - 创建之前
|
||
beforeCreate() { },
|
||
// 生命周期 - 挂载之前
|
||
beforeMount() { },
|
||
// 生命周期 - 更新之前
|
||
beforeUpdate() { },
|
||
// 生命周期 - 更新之后
|
||
updated() { },
|
||
// 生命周期 - 销毁之前
|
||
beforeDestroy() { },
|
||
// 生命周期 - 销毁完成
|
||
destroyed() { },
|
||
// 如果页面有keep-alive缓存功能,这个函数会触发
|
||
activated() { }
|
||
};
|
||
|
||
</script>
|
||
<style scoped>
|
||
</style> |