Commit dc015b2da417f869298e3893085308487e4450e0
1 parent
03334002
发卡记录描述增加换班类型
Showing
2 changed files
with
59 additions
and
196 deletions
src/views/personal/card/index.vue
@@ -9,58 +9,23 @@ | @@ -9,58 +9,23 @@ | ||
9 | <div class="page-content"> | 9 | <div class="page-content"> |
10 | <div class="answer-header"> | 10 | <div class="answer-header"> |
11 | <div class="sel-box"> | 11 | <div class="sel-box"> |
12 | - <el-cascader | ||
13 | - @change="_QueryData(1)" | ||
14 | - size="small" | ||
15 | - class="sel" | ||
16 | - clearable | ||
17 | - placeholder="选择班级" | ||
18 | - v-model="query.classId" | ||
19 | - :options="gradeList" | ||
20 | - :props="props" | ||
21 | - :show-all-levels="false" | ||
22 | - ></el-cascader> | ||
23 | - <el-input | ||
24 | - placeholder="请输入学生姓名" | ||
25 | - v-model="query.studentName" | ||
26 | - class="input-with-select" | ||
27 | - @keyup.enter.native="_QueryData(2)" | ||
28 | - > | ||
29 | - <el-button | ||
30 | - slot="append" | ||
31 | - icon="el-icon-search" | ||
32 | - @click="_QueryData(2)" | ||
33 | - ></el-button> | 12 | + <el-cascader @change="_QueryData(1)" size="small" class="sel" clearable placeholder="选择班级" |
13 | + v-model="query.classId" :options="gradeList" :props="props" :show-all-levels="false"></el-cascader> | ||
14 | + <el-input placeholder="请输入学生姓名" v-model="query.studentName" class="input-with-select" | ||
15 | + @keyup.enter.native="_QueryData(2)"> | ||
16 | + <el-button slot="append" icon="el-icon-search" @click="_QueryData(2)"></el-button> | ||
34 | </el-input> | 17 | </el-input> |
35 | - <el-input | ||
36 | - placeholder="请输入学生学号" | ||
37 | - v-model="query.studentCode" | ||
38 | - class="input-with-select" | ||
39 | - @keyup.enter.native="_QueryData(3)" | ||
40 | - > | ||
41 | - <el-button | ||
42 | - slot="append" | ||
43 | - icon="el-icon-search" | ||
44 | - @click="_QueryData(3)" | ||
45 | - ></el-button> | 18 | + <el-input placeholder="请输入学生学号" v-model="query.studentCode" class="input-with-select" |
19 | + @keyup.enter.native="_QueryData(3)"> | ||
20 | + <el-button slot="append" icon="el-icon-search" @click="_QueryData(3)"></el-button> | ||
46 | </el-input> | 21 | </el-input> |
47 | - <el-button type="primary" round @click="_QueryData(4)" | ||
48 | - >筛选</el-button | ||
49 | - > | 22 | + <el-button type="primary" round @click="_QueryData(4)">筛选</el-button> |
50 | </div> | 23 | </div> |
51 | </div> | 24 | </div> |
52 | - <el-empty | ||
53 | - :image-size="100" | ||
54 | - v-if="!tableData.length && !loading" | ||
55 | - description="暂无数据" | ||
56 | - ></el-empty> | 25 | + <el-empty :image-size="100" v-if="!tableData.length && !loading" description="暂无数据"></el-empty> |
57 | <div v-else class="table-box" v-loading="loading"> | 26 | <div v-else class="table-box" v-loading="loading"> |
58 | <el-table :data="tableData" border style="width: 100%"> | 27 | <el-table :data="tableData" border style="width: 100%"> |
59 | - <el-table-column | ||
60 | - align="center" | ||
61 | - label="答题器编码" | ||
62 | - prop="clickerSn" | ||
63 | - ></el-table-column> | 28 | + <el-table-column align="center" label="答题器编码" prop="clickerSn"></el-table-column> |
64 | <el-table-column align="center" label="班级"> | 29 | <el-table-column align="center" label="班级"> |
65 | <template slot-scope="scope"> | 30 | <template slot-scope="scope"> |
66 | <span v-for="item in scope.row.classList" :key="item.classCode">{{ | 31 | <span v-for="item in scope.row.classList" :key="item.classCode">{{ |
@@ -68,48 +33,27 @@ | @@ -68,48 +33,27 @@ | ||
68 | }}</span> | 33 | }}</span> |
69 | </template> | 34 | </template> |
70 | </el-table-column> | 35 | </el-table-column> |
71 | - <el-table-column | ||
72 | - align="center" | ||
73 | - label="学生姓名" | ||
74 | - prop="studentName" | ||
75 | - ></el-table-column> | ||
76 | - <el-table-column | ||
77 | - align="center" | ||
78 | - label="学号" | ||
79 | - prop="studentCode" | ||
80 | - ></el-table-column> | 36 | + <el-table-column align="center" label="学生姓名" prop="studentName"></el-table-column> |
37 | + <el-table-column align="center" label="学号" prop="studentCode"></el-table-column> | ||
81 | <el-table-column align="center" label="类型"> | 38 | <el-table-column align="center" label="类型"> |
82 | <template slot-scope="scope"> | 39 | <template slot-scope="scope"> |
83 | {{ scope.row.operationType == 0 ? "发卡" : "补卡" }} | 40 | {{ scope.row.operationType == 0 ? "发卡" : "补卡" }} |
84 | - </template></el-table-column | ||
85 | - > | 41 | + </template></el-table-column> |
86 | <el-table-column align="center" label="描述"> | 42 | <el-table-column align="center" label="描述"> |
87 | <template slot-scope="scope"> | 43 | <template slot-scope="scope"> |
88 | {{ | 44 | {{ |
89 | scope.row.operationType == 0 | 45 | scope.row.operationType == 0 |
90 | - ? "--" | ||
91 | - : scope.row.reason == 0 | 46 | + ? "--" |
47 | + : scope.row.reason == 0 | ||
92 | ? "丢失" | 48 | ? "丢失" |
93 | - : "损坏" | 49 | + : scope.row.reason == 1 ? "损坏" : "换班" |
94 | }} | 50 | }} |
95 | - </template></el-table-column | ||
96 | - > | ||
97 | - <el-table-column | ||
98 | - align="center" | ||
99 | - label="操作时间" | ||
100 | - prop="modifiedTime" | ||
101 | - ></el-table-column> | 51 | + </template></el-table-column> |
52 | + <el-table-column align="center" label="操作时间" prop="modifiedTime"></el-table-column> | ||
102 | </el-table> | 53 | </el-table> |
103 | <div class="pagination-box"> | 54 | <div class="pagination-box"> |
104 | - <el-pagination | ||
105 | - small="" | ||
106 | - layout="total,prev, pager, next" | ||
107 | - :hide-on-single-page="true" | ||
108 | - :total="total" | ||
109 | - @current-change="changePage" | ||
110 | - :current-page="page" | ||
111 | - :page-size="size" | ||
112 | - > | 55 | + <el-pagination small="" layout="total,prev, pager, next" :hide-on-single-page="true" :total="total" |
56 | + @current-change="changePage" :current-page="page" :page-size="size"> | ||
113 | </el-pagination> | 57 | </el-pagination> |
114 | </div> | 58 | </div> |
115 | </div> | 59 | </div> |
src/views/standard/card/index.vue
@@ -23,94 +23,44 @@ | @@ -23,94 +23,44 @@ | ||
23 | ></el-cascader> | 23 | ></el-cascader> |
24 | </template> --> | 24 | </template> --> |
25 | <template v-if="role == 'ROLE_JITUAN'"> | 25 | <template v-if="role == 'ROLE_JITUAN'"> |
26 | - <el-select | ||
27 | - class="sel2" | ||
28 | - v-model="query.schoolId" | ||
29 | - placeholder="选择学校" | ||
30 | - @change="(page = 1), _QueryData(1)" | ||
31 | - > | ||
32 | - <el-option | ||
33 | - v-for="item in schoolList" | ||
34 | - :key="item.value" | ||
35 | - :label="item.label" | ||
36 | - :value="item.value" | ||
37 | - > | 26 | + <el-select class="sel2" v-model="query.schoolId" placeholder="选择学校" @change="(page = 1), _QueryData(1)"> |
27 | + <el-option v-for="item in schoolList" :key="item.value" :label="item.label" :value="item.value"> | ||
38 | </el-option> | 28 | </el-option> |
39 | </el-select> | 29 | </el-select> |
40 | </template> | 30 | </template> |
41 | - <el-select | ||
42 | - class="sel sel3" | ||
43 | - v-model="query.operationType" | ||
44 | - placeholder="选择类型" | ||
45 | - @change="(page = 1), _QueryData(1)" | ||
46 | - > | 31 | + <el-select class="sel sel3" v-model="query.operationType" placeholder="选择类型" |
32 | + @change="(page = 1), _QueryData(1)"> | ||
47 | <el-option label="全部" value=""></el-option> | 33 | <el-option label="全部" value=""></el-option> |
48 | <el-option label="发卡" :value="0"></el-option> | 34 | <el-option label="发卡" :value="0"></el-option> |
49 | <el-option label="补卡" :value="1"></el-option> | 35 | <el-option label="补卡" :value="1"></el-option> |
50 | <el-option label="换班" :value="2"></el-option> | 36 | <el-option label="换班" :value="2"></el-option> |
51 | </el-select> | 37 | </el-select> |
52 | <div class="d1"> | 38 | <div class="d1"> |
53 | - <el-date-picker | ||
54 | - v-model="query.startDay" | ||
55 | - type="date" | ||
56 | - @change="handleChangeTimeStart" | ||
57 | - placeholder="选择日期时间" | ||
58 | - value-format="yyyy-MM-dd" | ||
59 | - > | 39 | + <el-date-picker v-model="query.startDay" type="date" @change="handleChangeTimeStart" placeholder="选择日期时间" |
40 | + value-format="yyyy-MM-dd"> | ||
60 | </el-date-picker> | 41 | </el-date-picker> |
61 | ~ | 42 | ~ |
62 | - <el-date-picker | ||
63 | - v-model="query.endDay" | ||
64 | - type="date" | ||
65 | - placeholder="选择日期时间" | ||
66 | - @change="handleChangeTimeEnd" | ||
67 | - value-format="yyyy-MM-dd" | ||
68 | - > | 43 | + <el-date-picker v-model="query.endDay" type="date" placeholder="选择日期时间" @change="handleChangeTimeEnd" |
44 | + value-format="yyyy-MM-dd"> | ||
69 | </el-date-picker> | 45 | </el-date-picker> |
70 | </div> | 46 | </div> |
71 | <template v-if="role == 'ROLE_XUEXIAO'"> | 47 | <template v-if="role == 'ROLE_XUEXIAO'"> |
72 | - <el-input | ||
73 | - placeholder="请输入学生姓名" | ||
74 | - v-model="query.studentName" | ||
75 | - class="input-with-select sel" | ||
76 | - @keyup.enter.native="(page = 1), _QueryData(2)" | ||
77 | - > | ||
78 | - <el-button | ||
79 | - slot="append" | ||
80 | - icon="el-icon-search" | ||
81 | - @click="(page = 1), _QueryData(2)" | ||
82 | - ></el-button> | 48 | + <el-input placeholder="请输入学生姓名" v-model="query.studentName" class="input-with-select sel" |
49 | + @keyup.enter.native="(page = 1), _QueryData(2)"> | ||
50 | + <el-button slot="append" icon="el-icon-search" @click="(page = 1), _QueryData(2)"></el-button> | ||
83 | </el-input> | 51 | </el-input> |
84 | - <el-input | ||
85 | - placeholder="请输入学生学号" | ||
86 | - v-model="query.studentCode" | ||
87 | - class="input-with-select sel" | ||
88 | - @keyup.enter.native="(page = 1), _QueryData(3)" | ||
89 | - > | ||
90 | - <el-button | ||
91 | - slot="append" | ||
92 | - icon="el-icon-search" | ||
93 | - @click="(page = 1), _QueryData(3)" | ||
94 | - ></el-button> | 52 | + <el-input placeholder="请输入学生学号" v-model="query.studentCode" class="input-with-select sel" |
53 | + @keyup.enter.native="(page = 1), _QueryData(3)"> | ||
54 | + <el-button slot="append" icon="el-icon-search" @click="(page = 1), _QueryData(3)"></el-button> | ||
95 | </el-input> | 55 | </el-input> |
96 | </template> | 56 | </template> |
97 | - <el-button type="primary" round @click="(page = 1), _QueryData(4)" | ||
98 | - >筛选</el-button | ||
99 | - > | 57 | + <el-button type="primary" round @click="(page = 1), _QueryData(4)">筛选</el-button> |
100 | </div> | 58 | </div> |
101 | </div> | 59 | </div> |
102 | - <el-empty | ||
103 | - :image-size="100" | ||
104 | - v-if="!tableData.length && !loading" | ||
105 | - description="暂无数据" | ||
106 | - ></el-empty> | 60 | + <el-empty :image-size="100" v-if="!tableData.length && !loading" description="暂无数据"></el-empty> |
107 | <div v-else class="table-box" v-loading="loading"> | 61 | <div v-else class="table-box" v-loading="loading"> |
108 | <el-table :data="tableData" border style="width: 100%"> | 62 | <el-table :data="tableData" border style="width: 100%"> |
109 | - <el-table-column | ||
110 | - align="center" | ||
111 | - label="答题器编码" | ||
112 | - prop="clickerSn" | ||
113 | - ></el-table-column> | 63 | + <el-table-column align="center" label="答题器编码" prop="clickerSn"></el-table-column> |
114 | <el-table-column align="center" label="年级"> | 64 | <el-table-column align="center" label="年级"> |
115 | <template slot-scope="scope"> | 65 | <template slot-scope="scope"> |
116 | <span>{{ scope.row.classList[0]?.gradeName }}</span> | 66 | <span>{{ scope.row.classList[0]?.gradeName }}</span> |
@@ -118,79 +68,43 @@ | @@ -118,79 +68,43 @@ | ||
118 | </el-table-column> | 68 | </el-table-column> |
119 | <el-table-column align="center" label="班级"> | 69 | <el-table-column align="center" label="班级"> |
120 | <template slot-scope="scope"> | 70 | <template slot-scope="scope"> |
121 | - <span | ||
122 | - v-for="(item, index) in scope.row.classList" | ||
123 | - :key="item.classCode" | ||
124 | - >{{ (index == 0 ? "" : "、") + item.className }}</span | ||
125 | - > | 71 | + <span v-for="(item, index) in scope.row.classList" :key="item.classCode">{{ (index == 0 ? "" : "、") + |
72 | + item.className }}</span> | ||
126 | </template> | 73 | </template> |
127 | </el-table-column> | 74 | </el-table-column> |
128 | - <el-table-column | ||
129 | - align="center" | ||
130 | - label="学生姓名" | ||
131 | - prop="studentName" | ||
132 | - ></el-table-column> | ||
133 | - <el-table-column | ||
134 | - align="center" | ||
135 | - label="学号" | ||
136 | - prop="studentCode" | ||
137 | - ></el-table-column> | 75 | + <el-table-column align="center" label="学生姓名" prop="studentName"></el-table-column> |
76 | + <el-table-column align="center" label="学号" prop="studentCode"></el-table-column> | ||
138 | <el-table-column align="center" label="类型"> | 77 | <el-table-column align="center" label="类型"> |
139 | <template slot-scope="scope"> | 78 | <template slot-scope="scope"> |
140 | {{ | 79 | {{ |
141 | scope.row.operationType == 0 | 80 | scope.row.operationType == 0 |
142 | - ? "发卡" | ||
143 | - : scope.row.operationType == 1 | 81 | + ? "发卡" |
82 | + : scope.row.operationType == 1 | ||
144 | ? "补卡" | 83 | ? "补卡" |
145 | : "换班" | 84 | : "换班" |
146 | }} | 85 | }} |
147 | - </template></el-table-column | ||
148 | - > | ||
149 | - <el-table-column | ||
150 | - align="center" | ||
151 | - label="操作次数" | ||
152 | - prop="operations" | ||
153 | - ></el-table-column> | 86 | + </template></el-table-column> |
87 | + <el-table-column align="center" label="操作次数" prop="operations"></el-table-column> | ||
154 | <el-table-column align="center" label="描述"> | 88 | <el-table-column align="center" label="描述"> |
155 | <template slot-scope="scope"> | 89 | <template slot-scope="scope"> |
156 | {{ | 90 | {{ |
157 | scope.row.operationType == 0 | 91 | scope.row.operationType == 0 |
158 | - ? "--" | ||
159 | - : scope.row.reason == 0 | 92 | + ? "--" |
93 | + : scope.row.reason == 0 | ||
160 | ? "丢失" | 94 | ? "丢失" |
161 | - : "损坏" | 95 | + : scope.row.reason == 1 ? "损坏" : "换班" |
162 | }} | 96 | }} |
163 | - </template></el-table-column | ||
164 | - > | ||
165 | - <el-table-column | ||
166 | - align="center" | ||
167 | - label="操作时间" | ||
168 | - prop="modifiedTime" | ||
169 | - width="160" | ||
170 | - ></el-table-column> | 97 | + </template></el-table-column> |
98 | + <el-table-column align="center" label="操作时间" prop="modifiedTime" width="160"></el-table-column> | ||
171 | </el-table> | 99 | </el-table> |
172 | <div class="pagination-box"> | 100 | <div class="pagination-box"> |
173 | - <el-pagination | ||
174 | - small="" | ||
175 | - layout="total,prev, pager, next" | ||
176 | - :hide-on-single-page="true" | ||
177 | - :total="total" | ||
178 | - @current-change="changePage" | ||
179 | - :current-page="page" | ||
180 | - :page-size="size" | ||
181 | - > | 101 | + <el-pagination small="" layout="total,prev, pager, next" :hide-on-single-page="true" :total="total" |
102 | + @current-change="changePage" :current-page="page" :page-size="size"> | ||
182 | </el-pagination> | 103 | </el-pagination> |
183 | </div> | 104 | </div> |
184 | </div> | 105 | </div> |
185 | <p class="down" v-if="tableData.length"> | 106 | <p class="down" v-if="tableData.length"> |
186 | - <el-button | ||
187 | - type="primary" | ||
188 | - plain | ||
189 | - round | ||
190 | - icon="fa fa-cloud-download" | ||
191 | - @click="downExl" | ||
192 | - >导出报表</el-button | ||
193 | - > | 107 | + <el-button type="primary" plain round icon="fa fa-cloud-download" @click="downExl">导出报表</el-button> |
194 | </p> | 108 | </p> |
195 | </div> | 109 | </div> |
196 | </div> | 110 | </div> |
@@ -402,22 +316,27 @@ export default { | @@ -402,22 +316,27 @@ export default { | ||
402 | .table-box { | 316 | .table-box { |
403 | padding: 0 20px; | 317 | padding: 0 20px; |
404 | } | 318 | } |
319 | + | ||
405 | .down { | 320 | .down { |
406 | padding: 16px 20px; | 321 | padding: 16px 20px; |
407 | } | 322 | } |
323 | + | ||
408 | .answer-header { | 324 | .answer-header { |
409 | .sel-box { | 325 | .sel-box { |
410 | .sel { | 326 | .sel { |
411 | margin-right: 20px; | 327 | margin-right: 20px; |
412 | min-width: 120px; | 328 | min-width: 120px; |
413 | } | 329 | } |
330 | + | ||
414 | .sel2 { | 331 | .sel2 { |
415 | width: 200px; | 332 | width: 200px; |
416 | margin-right: 20px; | 333 | margin-right: 20px; |
417 | } | 334 | } |
335 | + | ||
418 | .sel3 { | 336 | .sel3 { |
419 | min-width: 80px; | 337 | min-width: 80px; |
420 | } | 338 | } |
339 | + | ||
421 | .d1 { | 340 | .d1 { |
422 | margin-right: 20px; | 341 | margin-right: 20px; |
423 | } | 342 | } |