| | |
| | | <div class="info-text">{{ item.teacherName }}</div> |
| | | </div> |
| | | <div class="info-time"> |
| | | <div class="info-label">状态:</div> |
| | | <div class="info-text">{{ translateStatus(item.status) }}</div> |
| | | </div> |
| | | <div class="info-time"> |
| | | <div class="info-label">开始时间:</div> |
| | | <div class="info-text">{{ item.startTime }}</div> |
| | | </div> |
| | |
| | | <div class="info-text">{{ item.endTime }}</div> |
| | | </div> |
| | | <div class="button-container"> |
| | | <el-button @click="start(item)">开始上课</el-button> |
| | | <el-button @click="handleUpdate(item)">编辑</el-button> |
| | | <el-button @click="remove(item)">删除</el-button> |
| | | <el-button v-if="item.status!==2" @click="start(item)" type="primary" size="small">开始上课</el-button> |
| | | <el-button @click="handleUpdate(item)" type="warning" size="small">编辑</el-button> |
| | | <el-popconfirm |
| | | style="margin: 0 5px" |
| | | title="确定要删除该培训吗?" |
| | | @confirm="remove(item)" |
| | | > |
| | | <el-button slot="reference" type="danger" size="small" >删除</el-button> |
| | | </el-popconfirm> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | |
| | | |
| | | <script> |
| | | |
| | | import examPaperApi from "@/api/examPaper"; |
| | | |
| | | export default { |
| | | props: { |
| | | tableData: [] |
| | | }, |
| | | methods: { |
| | | handleUpdate (item) { |
| | | this.$emit('handleUpdate',item) |
| | | this.$emit('handleUpdate', item) |
| | | }, |
| | | remove (item) { |
| | | this.$emit('remove',item) |
| | | this.$confirm('此操作将永久删除该成员, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$emit('remove', item) |
| | | }) |
| | | }, |
| | | start (item) { |
| | | this.$emit('start',item) |
| | | this.$emit('start', item) |
| | | }, |
| | | translateStatus (status) { |
| | | if (status === 0) { |
| | | return '待开始' |
| | | } else if (status === 1) { |
| | | return '进行中' |
| | | } else { |
| | | return '已结束' |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |