fuliqi
2024-06-25 3e2914339a54efb904e822eaa3dd65e67111eeb2
src/views/train/data-list/index.vue
@@ -2,16 +2,16 @@
  <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="margin-col">
        <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.title }}</div>
              <div class="info-teacher">
              <div class="info-title">{{ item.meetName }}</div>
              <div class="info-teacherName">
                <div class="info-label">主讲:</div>
                <div class="info-text">{{ item.teacher }}</div>
                <div class="info-text">{{ item.teacherName }}</div>
              </div>
              <div class="info-time">
                <div class="info-label">开始时间:</div>
@@ -22,7 +22,9 @@
                <div class="info-text">{{ item.endTime }}</div>
              </div>
              <div class="button-container">
                <el-button @click="start">开始上课</el-button>
                <el-button @click="start(item)">开始上课</el-button>
                <el-button @click="handleUpdate(item)">编辑</el-button>
                <el-button @click="remove(item)">删除</el-button>
              </div>
            </div>
          </el-card>
@@ -33,52 +35,63 @@
</template>
<script>
export default {
  data() {
    return {
      dataList: [
  props: {
    tableData: [
        {
          title: '测试1',
        id: 1,
        meetName: '英语',
          startTime: '2024-6-13 8:00',
          endTime: '2024-6-13 8:00',
          teacher: '测试测试',
          roomName: 'test'
        teacherName: '关老师'
        },
        {
          title: '测试1',
        id: 2,
        meetName: '语文',
          startTime: '2024-6-13 8:00',
          endTime: '2024-6-13 8:00',
          teacher: '测试测试',
          roomName: 'test'
        teacherName: '测试测试'
        },
        {
          title: '测试1',
        id: 3,
        meetName: '数学',
          startTime: '2024-6-13 8:00',
          endTime: '2024-6-13 8:00',
          teacher: '测试测试',
          roomName: 'test'
        teacherName: '测试测试'
        },
        {
          title: '测试1',
        id: 4,
        meetName: '机场航空',
          startTime: '2024-6-13 8:00',
          endTime: '2024-6-13 8:00',
          teacher: '测试测试',
          roomName: 'test'
        teacherName: '测试测试'
        },
        {
          title: '测试1',
        id: 5,
          startTime: '2024-6-13 8:00',
          endTime: '2024-6-13 8:00',
          teacher: '测试测试',
          roomName: 'test'
        teacherName: '测试测试',
        }
      ]
    };
  },
  methods: {
    start () {
    handleUpdate (item) {
      this.$emit('handleUpdate',item)
    },
    remove (item) {
      this.$emit('remove',item)
    },
    start (item) {
      let routeUrl = this.$router.resolve({
        path: "/meet",
        query: {
          domain: 'ycl.easyblog.vip:8443/' + item.id,
          roomName: item.meetName,
          userInfoStr:  JSON.stringify({
            displayName: item.teacherName
          })
        }
      })
      window.open(routeUrl.href, '_blank')
      // window.open('https://ycl.easyblog.vip:8443/test');
@@ -118,7 +131,7 @@
  font-weight: bold;
}
.info-teacher {
.info-teacherName {
  display: flex;
  font-size: 14px;
}