| 4c4f7640  梁保满
 
路由表,路由前端文件 | 1 |   <template>
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 2
3
4
5
6
7 |     <div>
      <back-box>
        <template slot="title">
          <span>发卡记录</span>
        </template>
      </back-box>
 | 
| addb60e3  梁保满
 
长水集团管理员屏蔽账号管理页面各种增删改 | 8
9 |   
      <div class="page-content">
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 10
11 |         <div class="answer-header">
          <div class="sel-box">
 | 
| dc015b2d  梁保满
 
发卡记录描述增加换班类型 | 12
13
14
15
16 |             <el-cascader @change="_QueryData(1)" size="small" class="sel" clearable placeholder="选择班级"
              v-model="query.classId" :options="gradeList" :props="props" :show-all-levels="false"></el-cascader>
            <el-input placeholder="请输入学生姓名" v-model="query.studentName" class="input-with-select"
              @keyup.enter.native="_QueryData(2)">
              <el-button slot="append" icon="el-icon-search" @click="_QueryData(2)"></el-button>
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 17 |             </el-input>
 | 
| dc015b2d  梁保满
 
发卡记录描述增加换班类型 | 18
19
20 |             <el-input placeholder="请输入学生学号" v-model="query.studentCode" class="input-with-select"
              @keyup.enter.native="_QueryData(3)">
              <el-button slot="append" icon="el-icon-search" @click="_QueryData(3)"></el-button>
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 21 |             </el-input>
 | 
| dc015b2d  梁保满
 
发卡记录描述增加换班类型 | 22 |             <el-button type="primary" round @click="_QueryData(4)">筛选</el-button>
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 23
24 |           </div>
        </div>
 | 
| dc015b2d  梁保满
 
发卡记录描述增加换班类型 | 25 |         <el-empty :image-size="100" v-if="!tableData.length && !loading" description="暂无数据"></el-empty>
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 26 |         <div v-else class="table-box" v-loading="loading">
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 27 |           <el-table :data="tableData" border style="width: 100%">
 | 
| dc015b2d  梁保满
 
发卡记录描述增加换班类型 | 28 |             <el-table-column align="center" label="答题器编码" prop="clickerSn"></el-table-column>
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 29
30
31
32
33
34
35 |             <el-table-column align="center" label="班级">
              <template slot-scope="scope">
                <span v-for="item in scope.row.classList" :key="item.classCode">{{
                  item.className
                }}</span>
              </template>
            </el-table-column>
 | 
| dc015b2d  梁保满
 
发卡记录描述增加换班类型 | 36
37 |             <el-table-column align="center" label="学生姓名" prop="studentName"></el-table-column>
            <el-table-column align="center" label="学号" prop="studentCode"></el-table-column>
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 38
39
40 |             <el-table-column align="center" label="类型">
              <template slot-scope="scope">
                {{ scope.row.operationType == 0 ? "发卡" : "补卡" }}
 | 
| dc015b2d  梁保满
 
发卡记录描述增加换班类型 | 41 |               </template></el-table-column>
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 42
43
44
45 |             <el-table-column align="center" label="描述">
              <template slot-scope="scope">
                {{
                  scope.row.operationType == 0
 | 
| dc015b2d  梁保满
 
发卡记录描述增加换班类型 | 46
47 |                   ? "--"
                  : scope.row.reason == 0
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 48 |                     ? "丢失"
 | 
| dc015b2d  梁保满
 
发卡记录描述增加换班类型 | 49 |                     : scope.row.reason == 1 ? "损坏" : "换班"
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 50 |                 }}
 | 
| dc015b2d  梁保满
 
发卡记录描述增加换班类型 | 51
52 |               </template></el-table-column>
            <el-table-column align="center" label="操作时间" prop="modifiedTime"></el-table-column>
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 53 |           </el-table>
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 54 |           <div class="pagination-box">
 | 
| dc015b2d  梁保满
 
发卡记录描述增加换班类型 | 55
56 |             <el-pagination small="" layout="total,prev, pager, next" :hide-on-single-page="true" :total="total"
              @current-change="changePage" :current-page="page" :page-size="size">
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 57
58 |             </el-pagination>
          </div>
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 59 |         </div>
 | 
| addb60e3  梁保满
 
长水集团管理员屏蔽账号管理页面各种增删改 | 60 |       </div>
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 61 |     </div>
 | 
| 4c4f7640  梁保满
 
路由表,路由前端文件 | 62
63
64
65 |   </template>
  
  <script>
  export default {
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 66
67 |     data() {
      return {
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 68
69 |         loading: false,
        props: { multiple: false },
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 70 |         query: {
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 71 |           classId: "",
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 72
73
74
75 |           studentName: "",
          studentCode: "",
        },
        gradeList: [],
 | 
| 6d7bd862  梁保满
 
飞书bug | 76 |         tableData: [],
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 77
78
79 |         page: 1,
        size: 20,
        total: 0,
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 80
81
82 |       };
    },
    created() {
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 83
84 |       this._QueryGradeList();
      this._QueryData();
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 85
86
87
88
89
90 |     },
    methods: {
      // 查找班级
      async _QueryGradeList() {
        this.loading = true;
        const { data, status, info } = await this.$request.gradeList();
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 91
92
93
94
95
96
97
98
99
100
101 |         if (status === 0) {
          if (!!data.list) {
            this.gradeList =
              data.list?.map((item) => {
                let gradeList = {
                  value: item.grade,
                  label: item.gradeName,
                };
                gradeList.children =
                  item.classList?.map((items) => {
                    return {
 | 
| 1365ef5e  梁保满
 
优化 | 102 |                       value: items.id,
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 103
104
105
106
107
108
109
110
111
112 |                       label: items.className,
                    };
                  }) || [];
                return gradeList;
              }) || [];
          }
        } else {
          this.$message.error(info);
        }
      },
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 113
114
115
116 |       changePage(page) {
        this.page = page;
        this._QueryData(4);
      },
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 117
118
119 |       async _QueryData(type) {
        let query = {};
        query.gradeName = this.query.gradeName;
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 120 |         if (type == 1) {
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 121 |           query.classId = this.query.classId[1] ? this.query.classId[1] : "";
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 122
123
124
125
126
127
128
129
130
131 |           this.query.studentCode = "";
          this.query.studentName = "";
        } else if (type == 2) {
          query.studentName = this.query.studentName;
          this.query.classId = "";
          this.query.studentCode = "";
        } else if (type == 3) {
          query.studentCode = this.query.studentCode;
          this.query.classId = "";
          this.query.studentName = "";
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 132
133 |         } else {
          query = { ...this.query };
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 134
135
136
137 |         }
        this.loading = true;
        const { data, status, info } = await this.$request.cardList({
          ...query,
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 138
139 |           page: this.page,
          size: 20,
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 140
141 |         });
        this.loading = false;
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 142
143 |         if (status === 0) {
          this.tableData = data.list || [];
 | 
| 3ba60a63  梁保满
 
发卡补卡,设备状态上传下载接口联调 | 144 |           this.total = data.count;
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 145
146
147
148
149
150 |         } else {
          this.$message.error(info);
        }
      },
    },
  };
 | 
| 4c4f7640  梁保满
 
路由表,路由前端文件 | 151
152 |   </script>
  
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 153 |   <style lang="scss" scoped>
 | 
| 533a17d8  梁保满
 
备题组卷添加批量设置答案 | 154
155 |   .table-box {
    padding: 0 20px;
 | 
| a37317f4  阿宝
 
使用分析,发卡记录 | 156 |   }
 | 
| 4c4f7640  梁保满
 
路由表,路由前端文件 | 157 |   </style>
 |