Commit 0761e2baa0ed14cfa41775cc7ce930407cc73f86
1 parent
bad53ff7
分班和学校管理调整
Showing
2 changed files
with
5 additions
and
81 deletions
src/views/standard/setUp/archived.vue
| ... | ... | @@ -69,7 +69,7 @@ |
| 69 | 69 | <div class="step-item"> |
| 70 | 70 | <up-load |
| 71 | 71 | id="downTeacher" |
| 72 | - :url="urlStudent" | |
| 72 | + :url="urlClazz" | |
| 73 | 73 | @upSuccess="upStudentSuccess" |
| 74 | 74 | fileName="学生名单模板" |
| 75 | 75 | > |
| ... | ... | @@ -153,13 +153,13 @@ export default { |
| 153 | 153 | return { |
| 154 | 154 | loading: false, |
| 155 | 155 | loadingClass: false, |
| 156 | - step: 1, | |
| 156 | + step: 0, | |
| 157 | 157 | gradeName: "", |
| 158 | 158 | gradeList: [], |
| 159 | 159 | classIds: [], |
| 160 | 160 | classList: [], |
| 161 | - urlStudent: "", | |
| 162 | - urlTeacher: "", | |
| 161 | + urlClazz: "/api_html/school/manager/importClazzClicker", | |
| 162 | + urlTeacher: "/api_html/school/manager/importTeacher", | |
| 163 | 163 | }; |
| 164 | 164 | }, |
| 165 | 165 | created() { | ... | ... |
src/views/standard/setUp/school.vue
| ... | ... | @@ -4,28 +4,6 @@ |
| 4 | 4 | <template slot="title"> |
| 5 | 5 | <span>学校设置</span> |
| 6 | 6 | </template> |
| 7 | - <template slot="btns" v-if="!code"> | |
| 8 | - <el-tooltip effect="dark" content="导入班级名单" placement="bottom"> | |
| 9 | - <el-button | |
| 10 | - type="primary" | |
| 11 | - icon="el-icon-upload2" | |
| 12 | - size="mini" | |
| 13 | - plain | |
| 14 | - circle | |
| 15 | - @click="diaUp = true" | |
| 16 | - ></el-button> | |
| 17 | - </el-tooltip> | |
| 18 | - <el-tooltip effect="dark" content="导出班级名单" placement="bottom"> | |
| 19 | - <el-button | |
| 20 | - type="primary" | |
| 21 | - icon="el-icon-download" | |
| 22 | - size="mini" | |
| 23 | - plain | |
| 24 | - circle | |
| 25 | - @click="exportClazzExl" | |
| 26 | - ></el-button> | |
| 27 | - </el-tooltip> | |
| 28 | - </template> | |
| 29 | 7 | </back-box> |
| 30 | 8 | <div class="page-content"> |
| 31 | 9 | <div class="content-box"> |
| ... | ... | @@ -96,22 +74,6 @@ |
| 96 | 74 | </div> |
| 97 | 75 | </div> |
| 98 | 76 | </div> |
| 99 | - <el-dialog title="导入学校名单" :visible.sync="diaUp" width="400"> | |
| 100 | - <up-load | |
| 101 | - id="downDevice" | |
| 102 | - :url="url" | |
| 103 | - @upSuccess="upSuccess" | |
| 104 | - fileName="学校名单" | |
| 105 | - > | |
| 106 | - <p class="down-txt" slot="down"> | |
| 107 | - 通过Excel导入学校全部班级名单,点击 | |
| 108 | - <el-link type="danger" @click="downExcel">模板下载</el-link> 。 | |
| 109 | - </p> | |
| 110 | - </up-load> | |
| 111 | - <div class="dialog-footer" slot="footer"> | |
| 112 | - <el-button @click="diaUp = false">取 消</el-button> | |
| 113 | - </div> | |
| 114 | - </el-dialog> | |
| 115 | 77 | <el-dialog title="修改学校信息" :visible.sync="diaSchool" width="400"> |
| 116 | 78 | <el-form |
| 117 | 79 | ref="formSchool" |
| ... | ... | @@ -194,7 +156,6 @@ export default { |
| 194 | 156 | code: "", //长水跳转标志 |
| 195 | 157 | loading: false, |
| 196 | 158 | url: "/api_html/school/manager/importClassAndStudent", |
| 197 | - diaUp: false, | |
| 198 | 159 | diaSchool: false, |
| 199 | 160 | school: { |
| 200 | 161 | schoolName: "", |
| ... | ... | @@ -259,19 +220,7 @@ export default { |
| 259 | 220 | this._QuerySectionList(); |
| 260 | 221 | }, |
| 261 | 222 | methods: { |
| 262 | - upSuccess(res) { | |
| 263 | - //导入成功 | |
| 264 | - this.$message.closeAll(); | |
| 265 | - this.$message({ | |
| 266 | - showClose: true, | |
| 267 | - message: `成功(${res.data.success})`, | |
| 268 | - type: "success", | |
| 269 | - duration: 5000, | |
| 270 | - }); | |
| 271 | - this.diaUp = false; | |
| 272 | - this._QueryDataSchool(); | |
| 273 | - this._QueryDataGrade(); | |
| 274 | - }, | |
| 223 | + | |
| 275 | 224 | editSchool() { |
| 276 | 225 | //保存修改学校信息 |
| 277 | 226 | if (!this.formSchool.sections.length) { |
| ... | ... | @@ -368,31 +317,6 @@ export default { |
| 368 | 317 | this.$message.error(info); |
| 369 | 318 | } |
| 370 | 319 | }, |
| 371 | - | |
| 372 | - async downExcel() { | |
| 373 | - let data = await this.$request.classAndStudentTemplate(); | |
| 374 | - if (data && !data.code) { | |
| 375 | - let blob = new Blob([data], { | |
| 376 | - type: "application/vnd.ms-excel;charset=utf-8", | |
| 377 | - }); | |
| 378 | - downloadFile(`班级名单模版.xlsx`, blob); | |
| 379 | - } else { | |
| 380 | - this.$message.error(data.info); | |
| 381 | - } | |
| 382 | - }, | |
| 383 | - async exportClazzExl() { | |
| 384 | - this.loadingDown = true; | |
| 385 | - let data = await this.$request.exportClassAndStudent(); | |
| 386 | - this.loadingDown = false; | |
| 387 | - if (data) { | |
| 388 | - let blob = new Blob([data], { | |
| 389 | - type: "application/vnd.ms-excel;charset=utf-8", | |
| 390 | - }); | |
| 391 | - downloadFile(`班级名单.xlsx`, blob); | |
| 392 | - } else { | |
| 393 | - this.$message.error("下载失败"); | |
| 394 | - } | |
| 395 | - }, | |
| 396 | 320 | }, |
| 397 | 321 | }; |
| 398 | 322 | </script> | ... | ... |