|
|
|
@ -7,7 +7,7 @@ |
|
|
|
|
<ul class="filter"> |
|
|
|
|
<li> |
|
|
|
|
<label>考核时间</label> |
|
|
|
|
<el-radio-group size="small" v-model="form.month" @change="initData"> |
|
|
|
|
<el-radio-group size="small" v-model="form.month"> |
|
|
|
|
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border> |
|
|
|
|
{{ item.name }} |
|
|
|
|
</el-radio> |
|
|
|
@ -62,7 +62,7 @@ |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-table :data="listData" class="table" stripe header-align="center"> |
|
|
|
|
<el-table v-loading="listLoading" :data="listData" class="table" stripe header-align="center"> |
|
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.$index + (page - 1) * pageSize + 1 }} |
|
|
|
@ -87,12 +87,12 @@ |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="实验状态" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<template slot-scope="scope" v-if="scope.row.show"> |
|
|
|
|
<span class="ellipsis">{{ stuState[scope.row.stuState] }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<template slot-scope="scope" v-if="scope.row.show"> |
|
|
|
|
<!--status:考核状态(0、待开始 1、进行中 2、已结束); stuState:学生考试状态(0、未考 1、在考 2、已考)--> |
|
|
|
|
<el-button v-if="scope.row.status === 2 && scope.row.stuState === 0" type="text" disabled>未参加</el-button> |
|
|
|
|
<el-button v-if="scope.row.status !== 2 && (scope.row.stuState === 0 || scope.row.stuState === 1)" type="text" |
|
|
|
@ -185,6 +185,7 @@ export default { |
|
|
|
|
page: 1, |
|
|
|
|
pageSize: 10, |
|
|
|
|
totals: 0, |
|
|
|
|
listLoading:false,// 列表加载 |
|
|
|
|
icVisible: false, |
|
|
|
|
invitationCode: "", |
|
|
|
|
searchTimer: null, |
|
|
|
@ -214,7 +215,7 @@ export default { |
|
|
|
|
this.form.startTime = ""; |
|
|
|
|
this.form.endTime = ""; |
|
|
|
|
} |
|
|
|
|
this.getData(); |
|
|
|
|
this.initData(); |
|
|
|
|
}, |
|
|
|
|
keyword: function(val) { |
|
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
@ -260,11 +261,14 @@ export default { |
|
|
|
|
item.status = 2; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
item.show = true; |
|
|
|
|
this.$set(this.listData, i, item); |
|
|
|
|
} |
|
|
|
|
}, 1000); |
|
|
|
|
}, |
|
|
|
|
getData() { |
|
|
|
|
this.listLoading = true; |
|
|
|
|
this.listData.splice(0); |
|
|
|
|
if (this.ticker) { |
|
|
|
|
clearInterval(this.ticker); |
|
|
|
|
} |
|
|
|
@ -277,6 +281,7 @@ export default { |
|
|
|
|
this.listData = res.list; |
|
|
|
|
this.totals = res.total; |
|
|
|
|
this.listData.forEach(i => { |
|
|
|
|
i.show = false; |
|
|
|
|
if (i.status === 2) { // 已结束 |
|
|
|
|
i.countDown = 0; |
|
|
|
|
} else { |
|
|
|
@ -300,7 +305,10 @@ export default { |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.beginTimer(); |
|
|
|
|
}).catch(err => {}); |
|
|
|
|
this.listLoading = false; |
|
|
|
|
}).catch(err => { |
|
|
|
|
this.listLoading = false; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
initData() { |
|
|
|
|
this.page = 1; |
|
|
|
|