QYF-GitLab1
2 天以前 9cad6a832c786989be620573b09badccfe7e3b51
src/views/courseManage/components/class.vue
@@ -10,7 +10,7 @@
      </div>
      <el-button type="primary" class="applyStartClasses" @click="applyClass">申请开班</el-button>
    </div>
    <div class="classListBox" v-loading="pages.loading">
    <div class="classListBox" v-if="classList.length > 0" v-loading="pages.loading">
      <div class="classItem" v-for="(item, index) in classList" :key="index">
        <div class="itemHeader">
          <div class="title">{{ item.name }}</div>
@@ -137,7 +137,7 @@
  page: 1,
  pageSize: 6,
  count: 0,
  loading: true
  loading: true,
})
const searchData = () => {
@@ -156,7 +156,7 @@
      size: pages.pageSize,
      sort: {
        type: 'Desc',
        field: 'CreateDate'
        field: 'CreateDate',
      },
      filterList: [],
      searchList: searchKey.value
@@ -164,14 +164,14 @@
            {
              keywords: searchKey.value,
              field: 'Name',
              compareType: 'Contains'
            }
              compareType: 'Contains',
            },
          ]
        : []
        : [],
    })
    .then((res: any) => {
      pages.loading = false
      pages.count = res.totalSize;
      pages.count = res.totalSize
      classList.value = res.datas.map((item: any) => {
        return {
          ...item,
@@ -179,7 +179,7 @@
          id: item.id,
          icon: item.icon ? getPublicImage(item.icon, 80) : '',
          introduction: item.description,
          reason: item.applyReturnMsg ? JSON.parse(item.applyReturnMsg).reason : ''
          reason: item.applyReturnMsg ? JSON.parse(item.applyReturnMsg).reason : '',
        }
      })
      refreshParent()
@@ -191,7 +191,7 @@
  formData.value = {
    name: '',
    num: '',
    date: ''
    date: '',
  }
  applyClassDialog.value = true
}
@@ -205,7 +205,7 @@
const formData = ref({
  name: '',
  num: '',
  date: ''
  date: '',
})
const submit = () => {
@@ -221,7 +221,7 @@
      endDate: moment(formData.value.date[1]).format('YYYY-MM-DD'),
      config: '',
      price: 0,
      maxUserCount: formData.value.num
      maxUserCount: formData.value.num,
    })
    .then((res: any) => {
      if (res) {
@@ -247,7 +247,7 @@
    await toClipboard(text)
    ElMessage({
      message: '复制成功',
      type: 'success'
      type: 'success',
    })
  } catch (e) {
    console.error(e)
@@ -257,7 +257,7 @@
// 删除班级
const delClass = (item: any) => {
  const data = {
    ids: [item.id]
    ids: [item.id],
  }
  MG.edu
    .delCourseClass(data)
@@ -265,7 +265,7 @@
      if (res) {
        ElMessage({
          message: '已删除',
          type: 'success'
          type: 'success',
        })
        getData()
      }
@@ -273,7 +273,7 @@
    .catch((err: any) => {
      ElMessage({
        message: '删除失败',
        type: 'error'
        type: 'error',
      })
      console.log(err)
    })
@@ -284,7 +284,7 @@
  page: 1,
  pageSize: 10,
  count: 0,
  loading: false
  loading: false,
})
const courseListData = ref([])
@@ -335,14 +335,14 @@
  if (item.applyState == 'WaitAudit') {
    ElMessage({
      message: '正在审核中....',
      type: 'warning'
      type: 'warning',
    })
    return false
  }
  if (item.applyState == 'Reject') {
    ElMessage({
      message: '审核未通过',
      type: 'warning'
      type: 'warning',
    })
    return false
  }
@@ -356,13 +356,13 @@
    bookId: bookData.id,
    author: bookData.author,
    isbn: bookData.isbn,
    bookRefCode: bookData.refCode
    bookRefCode: bookData.refCode,
  }
  let page = uRouter.resolve({
    path: '/classManage',
    query: {
      classInfo: JSON.stringify(classinfo)
    }
      classInfo: JSON.stringify(classinfo),
    },
  })
  window.open(page.href, '_blank')
}
@@ -423,7 +423,7 @@
          margin-top: 10px;
          font-size: 12px;
          background-color: #fff;
          color: #3b93fe;
          color: #019e58;
          padding: 0 6px;
          border-radius: 50px;
          overflow: hidden;