zhouwx
2024-10-12 9b0cdc49f16ff49e050ed161da9a8ce9207da97f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<template>
  <div class="app-container">
    <el-table v-loading="loading" :data="dataList">
      <el-table-column label="序号" align="center" type="index" width="80" />
      <el-table-column label="更新时间" align="center" prop="updateTime" />
      <el-table-column label="平台名称" align="center" prop="institutionName" />
      <el-table-column label="题库名称" align="center" prop="subjectName" />
      <el-table-column label="题目数量" align="center" prop="subjectCount" />
      <el-table-column label="类型" align="center" prop="type" >
        <template #default="scope">
          {{scope.row.type == 1 ? '单选' : scope.row.type == 2 ?'多选' :scope.row.type == 3 ? '判断':scope.row.type == 4 ? '简答':scope.row.type == 5 ? '混合' : '其他'}}
        </template>
      </el-table-column>
      <el-table-column label="模拟考核组卷" align="center" class-name="small-padding fixed-width">
        <template #default="scope">
          <el-button
            :loading="btnLoading"
            type="primary"
            @click="groupExam(scope.row)"
          >立即组卷</el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <el-dialog
      :visible.sync="showDialog"
      width="500px"
      :before-close="handleClose">
      <div style="font-size: 16px">
        <div>已向 <span class="titleText">{{chooseItem.institutionName}}</span> 发送基于题库 <span class="titleText">{{chooseItem.subjectName}}</span> 的组卷要求,学员可登录平台进行模拟考试。</div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="handleClose">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
 
<script>
 
import { delPlat } from '@/api/onlineEducation/plat'
 
export default {
  name: "nPeopleManage",
  dicts: [],
  components: {},
  data() {
    return {
      loading: false,
      single: true,
      multiple: true,
      showSearch: true,
      addForm: false,
      total: 0,
      expertTypes: [],
      dataList: [],
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
      btnLoading:false,
      showDialog:false,
      chooseItem: {}
    };
  },
  created() {
    this.getList();
  },
  methods: {
    getList(){
      this.loading = true;
      this.dataList = [
        {
          id: 1,
          updateTime: '2024-08-10 10:30:30',
          institutionName: '链工宝学习平台',
          subjectName: '高压电工作业',
          subjectCount: 50,
          type: 1
        }
      ]
      this.loading = false;
    },
    handleChange(){
 
    },
    handleQuery(){
 
    },
    resetQuery(){
 
    },
    groupExam(row){
      this.$confirm('确认立即组卷该题库?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.btnLoading = true
        setTimeout(() => {
          this.chooseItem = row
          console.log('row',row)
         this.showDialog = true
          this.btnLoading = false
        }, 2000);
      })
    },
    handleClose() {
      this.showDialog = false
    }
  }
};
</script>
<style lang="scss" scoped>
.titleText{
  font-size: 16px;
  font-weight: 600;
  color: #1890ff;
}
.dialog-footer{
  display: flex;
  justify-content: center;
}
</style>