xiangpei
2024-07-02 5762d55c0dd73ef692ae85253472756555a4d911
loading加载:导入题目
1个文件已修改
6 ■■■■■ 已修改文件
src/views/exam/question/list.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/question/list.vue
@@ -54,7 +54,7 @@
          :show-file-list="false"
          :file-list="fileList"
          :before-upload="beforeAvatarUpload">
          <el-button type="primary">导入</el-button>
          <el-button v-loading="importLoading" type="primary">导入</el-button>
          <!--          <div slot="tip" class="el-upload__tip">只能上传Excel文件</div>-->
        </el-upload>
      </div>
@@ -96,6 +96,7 @@
  components: { Pagination, QuestionShow },
  data () {
    return {
      importLoading: false,
      exportLoading: false,
      subjectIdList: [],
      timeRange: [],
@@ -148,7 +149,7 @@
      })
    },
    handlePreview (e) {
      console.log(e)
      this.importLoading = false
      if (e.code === 1) {
        this.search()
        this.$message.success(e.message)
@@ -157,6 +158,7 @@
      }
    },
    beforeAvatarUpload (file) {
      this.importLoading = true
      let legalName = ['xlsx', 'xls']
      // 拿到后缀名
      let name = file.name.substring(file.name.lastIndexOf('.') + 1, file.name.length)