huibing.xie | f40b2b9 | 2018-08-22 17:12:47 +0800 | [diff] [blame] | 1 | <template> |
| 2 | <div class="app-container"> |
| 3 | <div class="filter-container"> |
| 4 | <el-row :gutter="20"> |
| 5 | <el-col :span="4"> |
| 6 | <el-select clearable @change="initZyList" class="filter-item" v-model="listQuery.pcmc" placeholder="批次名称"> |
| 7 | </el-select> |
| 8 | </el-col> |
| 9 | <el-col :span="4"> |
| 10 | <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="学号" v-model="listQuery.xh"> |
| 11 | </el-input> |
| 12 | </el-col> |
| 13 | <el-col :span="4"> |
| 14 | <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="姓名" v-model="listQuery.xm"> |
| 15 | </el-input> |
| 16 | </el-col> |
| 17 | <el-col :span="4"> |
| 18 | <el-select clearable @change="initZyList" class="filter-item" v-model="listQuery.sfzylx" placeholder="是否准予离校"> |
| 19 | <el-option key="1" label="准予" value="1"> |
| 20 | </el-option> |
| 21 | <el-option key="0" label="不准予" value="0"> |
| 22 | </el-option> |
| 23 | </el-select> |
| 24 | </el-col> |
| 25 | <el-col :span="8"> |
| 26 | <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查询</el-button> |
| 27 | <el-button class="filter-item" style="margin-left: 10px;" @click="handleReset" type="primary" icon="el-icon-edit">重置</el-button> |
| 28 | </el-col> |
| 29 | </el-row> |
| 30 | <el-row :gutter="20"> |
| 31 | <el-col :span="4"> |
| 32 | <el-select clearable @change="initZyList" class="filter-item" v-model="listQuery.yx" placeholder="院系"> |
huibing.xie | c95b6a2 | 2018-08-29 14:15:43 +0800 | [diff] [blame] | 33 | <el-option v-for="item in yxList" :key="item.id" :label="item.name" :value="item.id"> |
huibing.xie | f40b2b9 | 2018-08-22 17:12:47 +0800 | [diff] [blame] | 34 | </el-option> |
| 35 | </el-select> |
| 36 | </el-col> |
| 37 | <el-col :span="4"> |
huibing.xie | 1718f36 | 2018-08-24 14:50:58 +0800 | [diff] [blame] | 38 | <el-select clearable @change="initBjList" class="filter-item" v-model="listQuery.zy" placeholder="专业"> |
huibing.xie | f40b2b9 | 2018-08-22 17:12:47 +0800 | [diff] [blame] | 39 | <el-option v-for="item in zyList" :key="item.id" :label="item.zymc" :value="item.id"> |
| 40 | </el-option> |
| 41 | </el-select> |
| 42 | </el-col> |
| 43 | <el-col :span="4"> |
| 44 | <el-select clearable class="filter-item" v-model="listQuery.bj" placeholder="班级"> |
| 45 | <el-option v-for="item in bjList" :key="item.id" :label="item.bjmc" :value="item.id"> |
| 46 | </el-option> |
| 47 | </el-select> |
| 48 | </el-col> |
| 49 | <el-col :span="4"> |
huibing.xie | 1718f36 | 2018-08-24 14:50:58 +0800 | [diff] [blame] | 50 | <el-select clearable @change="initZyList" class="filter-item" v-model="listQuery.xslb" placeholder="学生类别"> |
huibing.xie | f40b2b9 | 2018-08-22 17:12:47 +0800 | [diff] [blame] | 51 | <el-option v-for="item in xslbList" :key="item.id" :label="item.name" :value="item.id"> |
| 52 | </el-option> |
| 53 | </el-select> |
| 54 | </el-col> |
| 55 | <el-col :span="12"> |
| 56 | </el-col> |
| 57 | </el-row> |
| 58 | </div> |
| 59 | <el-table :height="height" :data="items" v-loading="listLoading" element-loading-text="Loading" border fit highlight-current-row> |
| 60 | <el-table-column align="center" type="index" label='序号' width="95"> |
| 61 | </el-table-column> |
| 62 | <el-table-column label="学号" align="center"> |
| 63 | <template slot-scope="scope"> |
| 64 | {{scope.row.xh}} |
| 65 | </template> |
| 66 | </el-table-column> |
| 67 | <el-table-column label="姓名" align="center"> |
| 68 | <template slot-scope="scope"> |
huibing.xie | 1718f36 | 2018-08-24 14:50:58 +0800 | [diff] [blame] | 69 | <a href="javascript:void(0);" @click="showTrace(scope.row)">{{scope.row.xm}}</a> |
huibing.xie | f40b2b9 | 2018-08-22 17:12:47 +0800 | [diff] [blame] | 70 | </template> |
| 71 | </el-table-column> |
| 72 | <el-table-column label="院系" align="center"> |
| 73 | <template slot-scope="scope"> |
| 74 | {{scope.row.yx}} |
| 75 | </template> |
| 76 | </el-table-column> |
| 77 | <el-table-column label="专业" align="center"> |
| 78 | <template slot-scope="scope"> |
| 79 | {{scope.row.zy}} |
| 80 | </template> |
| 81 | </el-table-column> |
| 82 | <el-table-column label="班级" align="center"> |
| 83 | <template slot-scope="scope"> |
| 84 | {{scope.row.bj}} |
| 85 | </template> |
| 86 | </el-table-column> |
| 87 | <el-table-column label="学生类别" align="center"> |
| 88 | <template slot-scope="scope"> |
| 89 | {{scope.row.xslb}} |
| 90 | </template> |
| 91 | </el-table-column> |
| 92 | <el-table-column v-for="blbm in colList" :label="blbm" :key="blbm" :prop="blbm" align="center"> |
| 93 | </el-table-column> |
| 94 | <el-table-column label="是否准予离校" align="center"> |
| 95 | <template slot-scope="scope"> |
| 96 | <font color="green" v-if="scope.row.sfzylx == '准予'">{{scope.row.sfzylx}}</font> |
| 97 | <font color="red" v-else>{{scope.row.sfzylx}}</font> |
| 98 | </template> |
| 99 | </el-table-column> |
| 100 | </el-table> |
| 101 | <div class="pagination-container"> |
| 102 | <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listQuery.pageIndex" |
| 103 | :page-sizes="[10,20,30, 50]" :page-size="listQuery.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="recordCount"> |
| 104 | </el-pagination> |
| 105 | </div> |
| 106 | <el-dialog title="审核意见" :visible.sync="dialogFormVisible" width="80%" top="10vh"> |
| 107 | <div class="J_conWarp g-lr-mg"> |
| 108 | <div id="dcMain"> |
| 109 | <div id="index" class="mainBox" style=" height: auto; min-height: 310px;"> |
| 110 | <table width="100%" border="0" cellspacing="0" cellpadding="0" class="indexBoxTwo"> |
| 111 | <tbody> |
| 112 | <tr> |
| 113 | <td width="85%" valign="top" class="pr"> |
| 114 | <div class="indexBox"> |
| 115 | <div class="boxTitle">基本信息</div> |
| 116 | <ul> |
| 117 | <table width="100%" border="0" cellspacing="0" cellpadding="7" class="tableBasic"> |
| 118 | <tbody> |
| 119 | <tr> |
| 120 | <td width="120">学号:</td> |
| 121 | <td><b>{{ jbxx.xh }}</b></td> |
| 122 | <td width="100">姓名:</td> |
| 123 | <td><b>{{ jbxx.xm }}</b></td> |
| 124 | </tr> |
| 125 | <tr> |
| 126 | <td>院系:</td> |
| 127 | <td><b>{{ jbxx.yx }}</b></td> |
| 128 | <td>专业:</td> |
| 129 | <td><b>{{ jbxx.zy }}</b></td> |
| 130 | </tr> |
| 131 | <tr> |
| 132 | <td>班级:</td> |
| 133 | <td><b>{{ jbxx.bj }}</b></td> |
| 134 | <td>学生类别:</td> |
| 135 | <td><b>{{ jbxx.xslb }}</b></td> |
| 136 | </tr> |
| 137 | </tbody> |
| 138 | </table> |
| 139 | </ul> |
| 140 | </div> |
| 141 | </td> |
| 142 | <td valign="top" class="pl"> |
| 143 | </td> |
| 144 | </tr> |
| 145 | </tbody> |
| 146 | </table> |
| 147 | |
| 148 | <div class="indexBox"> |
| 149 | <div class="boxTitle">审核记录</div> |
| 150 | <ul> |
| 151 | <table width="100%" border="0" cellspacing="0" cellpadding="7" class="tableBasic"> |
| 152 | <tbody> |
| 153 | <tr> |
| 154 | <th width="35%">审核环节</th> |
| 155 | <th>审核意见</th> |
| 156 | </tr> |
| 157 | <tr v-for="shjl in shjllist" :key="shjl.shhj"> |
| 158 | <td align="center"> |
| 159 | {{shjl.shhj}} |
| 160 | [<font color="green" v-if="shjl.shzt == '通过'">{{shjl.shzt}}</font> |
| 161 | <font color="red" v-else>{{shjl.shzt}}</font>] |
| 162 | </td> |
| 163 | <td align="left"> |
| 164 | <template v-for="sj in shjl.shyj"> |
| 165 | [<font color="green" v-if="sj.shzt == '通过'">{{sj.shzt}}</font> |
| 166 | <font color="red" v-else>{{sj.shzt}}</font> {{sj.shsj}}] |
| 167 | 【{{shjl.shhj}}】 |
| 168 | 审核意见:{{sj.shyj}} |
| 169 | <br> |
| 170 | </template> |
| 171 | </td> |
| 172 | </tr> |
| 173 | </tbody> |
| 174 | </table> |
| 175 | </ul> |
| 176 | </div> |
| 177 | |
| 178 | </div> |
| 179 | </div> |
| 180 | </div> |
| 181 | <div slot="footer" class="dialog-footer" style="text-align:center"> |
| 182 | <el-button @click="dialogFormVisible = false">关闭</el-button> |
| 183 | </div> |
| 184 | </el-dialog> |
| 185 | </div> |
| 186 | </template> |
| 187 | |
| 188 | <script> |
huibing.xie | 1718f36 | 2018-08-24 14:50:58 +0800 | [diff] [blame] | 189 | import { getBjListByZy } from '@/api/class-api' |
huibing.xie | f40b2b9 | 2018-08-22 17:12:47 +0800 | [diff] [blame] | 190 | import { getList } from '@/api/handling-api' |
| 191 | import { getDicList } from '@/api/dictionary-api' |
huibing.xie | bba5eb9 | 2018-08-27 11:12:36 +0800 | [diff] [blame] | 192 | import { getDeptList as getAllDeptList } from '@/api/department-api' |
huibing.xie | f40b2b9 | 2018-08-22 17:12:47 +0800 | [diff] [blame] | 193 | import { getZyListByYx } from '@/api/major-api' |
| 194 | import waves from '@/directive/waves' // 水波纹指令 |
| 195 | import { resetForm } from '@/utils' |
| 196 | import { crudPageList } from '@/utils/crud' |
| 197 | import mixindata from '@/utils/crud' |
| 198 | |
| 199 | export default { |
| 200 | name: 'class', |
| 201 | directives: { |
| 202 | waves |
| 203 | }, |
| 204 | mixins: [mixindata], |
| 205 | data() { |
| 206 | return { |
| 207 | pcmcList: [], |
| 208 | yxList: [], |
| 209 | zyList: [], |
| 210 | bjList: [], |
| 211 | colList: [], |
| 212 | xslbList: [], |
| 213 | jbxx: {}, |
| 214 | shjllist: [] |
| 215 | } |
| 216 | }, |
| 217 | filters: { |
| 218 | statusFilter(status) { |
| 219 | const statusMap = { |
| 220 | '1': 'success', |
| 221 | '0': 'danger' |
| 222 | } |
| 223 | return statusMap[status] |
| 224 | } |
| 225 | }, |
| 226 | created() { |
| 227 | this.initYxList() |
| 228 | this.initZyList() |
| 229 | this.initBjList() |
| 230 | this.initXslbList() |
| 231 | this.handlePageList() |
| 232 | this.height = window.innerHeight - 266 |
| 233 | }, |
| 234 | methods: { |
| 235 | initYxList() { |
| 236 | getAllDeptList(this.listQuery).then(response => { |
| 237 | this.yxList = response.items |
| 238 | }) |
| 239 | }, |
| 240 | initZyList() { |
| 241 | getZyListByYx({ yx: this.listQuery.yx }).then(response => { |
| 242 | this.zyList = response.items |
| 243 | // TODO 坑,this.listQuery.zy == null 直接赋值,专业下拉框选择出bug,无法选择,原因未知 |
| 244 | for (const attr in this.listQuery) { |
| 245 | if (attr === 'zy') { |
| 246 | this.listQuery['zy'] = null |
| 247 | } |
| 248 | } |
| 249 | }) |
| 250 | }, |
| 251 | initXslbList() { |
huibing.xie | 99536f5 | 2018-08-29 14:30:32 +0800 | [diff] [blame^] | 252 | getDicList({ dicType: 'xslb' }).then(response => { |
huibing.xie | f40b2b9 | 2018-08-22 17:12:47 +0800 | [diff] [blame] | 253 | this.xslbList = response.items |
| 254 | }) |
| 255 | }, |
| 256 | initBjList() { |
huibing.xie | 1718f36 | 2018-08-24 14:50:58 +0800 | [diff] [blame] | 257 | getBjListByZy({ zy: this.listQuery.zy }).then(response => { |
huibing.xie | f40b2b9 | 2018-08-22 17:12:47 +0800 | [diff] [blame] | 258 | this.bjList = response.items |
| 259 | }) |
| 260 | }, |
| 261 | handlePageList() { |
| 262 | crudPageList(this, getList, this.parseItems) |
| 263 | }, |
| 264 | parseItems() { |
| 265 | // 重新组织列表,动态生成列 |
| 266 | for (let i = 0; i < this.items.length; i++) { |
| 267 | const item = this.items[i] |
| 268 | if (i === 0) { |
| 269 | for (const blbm of item.blbmlist) { |
| 270 | if (this.colList.indexOf(blbm.bmmc) === -1) { |
| 271 | this.colList.push(blbm.bmmc) |
| 272 | } |
| 273 | } |
| 274 | } |
| 275 | for (const blbm of item.blbmlist) { |
| 276 | item[blbm.bmmc] = blbm.shjg |
| 277 | } |
| 278 | } |
| 279 | }, |
| 280 | handleReset() { |
| 281 | resetForm(this.listQuery) |
| 282 | }, |
| 283 | handleFilter() { |
| 284 | this.listQuery.pageIndex = 1 |
| 285 | this.handlePageList() |
| 286 | }, |
| 287 | handleSizeChange(val) { |
| 288 | this.listQuery.pageSize = val |
| 289 | this.handlePageList() |
| 290 | }, |
| 291 | handleCurrentChange(val) { |
| 292 | this.listQuery.pageIndex = val |
| 293 | this.handlePageList() |
| 294 | }, |
| 295 | handleAudit(rowid) { |
| 296 | this.dialogFormVisible = true |
| 297 | }, |
| 298 | showTrace(item) { |
| 299 | this.jbxx = item |
| 300 | this.shjllist = item.shjllist |
| 301 | this.dialogFormVisible = true |
| 302 | } |
| 303 | } |
| 304 | } |
| 305 | </script> |
| 306 | <style scoped> |
huibing.xie | 1718f36 | 2018-08-24 14:50:58 +0800 | [diff] [blame] | 307 | .app-container a { |
huibing.xie | f40b2b9 | 2018-08-22 17:12:47 +0800 | [diff] [blame] | 308 | color: #00a4f4; |
| 309 | text-decoration: none; |
| 310 | } |
| 311 | </style> |
| 312 | |