From c4d0466cec9c334d9f0e74fe44576364a019aed3 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期二, 16 七月 2024 09:20:46 +0800 Subject: [PATCH] 教师端隐藏管理员列表和教师列表 --- src/views/train/data-list/index.vue | 152 ++++++++++++++++++++++++++++---------------------- 1 files changed, 84 insertions(+), 68 deletions(-) diff --git a/src/views/train/data-list/index.vue b/src/views/train/data-list/index.vue index 965749d..389ca5d 100644 --- a/src/views/train/data-list/index.vue +++ b/src/views/train/data-list/index.vue @@ -1,82 +1,67 @@ <template> <div class="list-container w-full h-full"> - <div class="list-content w-full overflow-x-hidden"> - <el-row :gutter="20"> - <el-col :span="6" v-for="item in dataList" class="mb-5"> - <el-card shadow="hover" class="list-card cursor-pointer" :body-style="{ padding: 0 }"> - <div class="img-container w-full"> - <img src="@/assets/list-card-bg.jpg" class="w-full"> + <div class="list-content w-full overflow-x-hidden"> + <el-row :gutter="20"> + <el-col :span="6" v-for="item in tableData" class="margin-col"> + <el-card shadow="hover" class="list-card cursor-pointer" :body-style="{ padding: 0 }"> + <div class="img-container w-full"> + <img src="@/assets/list-card-bg.jpg" class="width-img"> + </div> + <div class="item-info p-3"> + <div class="info-title">{{ item.meetName }}</div> + <div class="info-teacherName"> + <div class="info-label">涓昏:</div> + <div class="info-text">{{ item.teacherName }}</div> </div> - <div class="item-info p-3"> - <div class="info-title font-bold">{{ item.title }}</div> - <div class="info-teacher flex text-sm text-gray-500"> - <div class="info-label">涓昏:</div> - <div class="info-text">{{ item.teacher }}</div> - </div> - <div class="info-time flex text-sm text-gray-500"> - <div class="info-label">寮�濮嬫椂闂�:</div> - <div class="info-text">{{ item.startTime }}</div> - </div> - <div class="info-time flex text-sm text-gray-500"> - <div class="info-label">缁撴潫鏃堕棿:</div> - <div class="info-text">{{ item.endTime }}</div> - </div> + <div class="info-time"> + <div class="info-label">鐘舵��:</div> + <div class="info-text">{{ translateStatus(item.status) }}</div> </div> - <el-button size="mini" @click="start" >寮�濮嬩笂璇�</el-button> - </el-card> - </el-col> - </el-row> - </div> + <div class="info-time"> + <div class="info-label">寮�濮嬫椂闂�:</div> + <div class="info-text">{{ item.startTime }}</div> + </div> + <div class="info-time"> + <div class="info-label">缁撴潫鏃堕棿:</div> + <div class="info-text">{{ item.endTime }}</div> + </div> + <div class="button-container"> + <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-button @click="remove(item)" type="danger" size="small">鍒犻櫎</el-button> + </div> + </div> + </el-card> + </el-col> + </el-row> + </div> </div> </template> <script> + export default { - data () { - return { - dataList: [ - { - title: '娴嬭瘯1', - startTime: '2024-6-13 8:00', - endTime: '2024-6-13 8:00', - teacher: '娴嬭瘯娴嬭瘯', - roomName: 'test' - }, - { - title: '娴嬭瘯1', - startTime: '2024-6-13 8:00', - endTime: '2024-6-13 8:00', - teacher: '娴嬭瘯娴嬭瘯', - roomName: 'test' - }, - { - title: '娴嬭瘯1', - startTime: '2024-6-13 8:00', - endTime: '2024-6-13 8:00', - teacher: '娴嬭瘯娴嬭瘯', - roomName: 'test' - }, - { - title: '娴嬭瘯1', - startTime: '2024-6-13 8:00', - endTime: '2024-6-13 8:00', - teacher: '娴嬭瘯娴嬭瘯', - roomName: 'test' - }, - { - title: '娴嬭瘯1', - startTime: '2024-6-13 8:00', - endTime: '2024-6-13 8:00', - teacher: '娴嬭瘯娴嬭瘯', - roomName: 'test' - } - ] - } + props: { + tableData: [] }, methods: { - start(){ - // this.$router.push({path:'/train/meet/index'}) - window.open('https://ycl.easyblog.vip:8443/test'); + handleUpdate (item) { + this.$emit('handleUpdate', item) + }, + remove (item) { + this.$emit('remove', item) + }, + start (item) { + this.$emit('start', item) + }, + translateStatus (status) { + if (status === 0) { + return '寰呭紑濮�' + } else if (status === 1) { + return '杩涜涓�' + } else { + return '宸茬粨鏉�' + } } } } @@ -103,4 +88,35 @@ .list-card { border-radius: 10px; } + +.item-info { + padding: 12px; + color: #8a8a8a; +} + +.info-title { + font-weight: bold; +} + +.info-teacherName { + display: flex; + font-size: 14px; +} + +.info-time { + display: flex; +} + +.margin-col { + margin-bottom: 20px; +} + +.width-img { + width: 100%; +} + +.button-container { + display: flex; + margin-top: 10px; +} </style> -- Gitblit v1.8.0