From f12c8ffbf3d4143b0f63692e08ea3f5aa8fc6b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0?= <15071126431@163.com> Date: Fri, 14 May 2021 17:57:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/img/class.png | Bin 0 -> 3161 bytes src/components/page/ClassAchievement.vue | 59 ++-- src/components/page/ClassInfo.vue | 32 +- src/components/page/ClassStudent.vue | 70 ++-- src/components/page/Dashboard.vue | 270 ++++++++++----- src/components/page/Student.vue | 1 + src/components/page/classExperimentAss.vue | 362 +++++++++++++++++++++ src/main.js | 3 +- src/router/routes.js | 5 + src/utils/api.js | 12 + src/utils/http.js | 83 +++++ 11 files changed, 741 insertions(+), 156 deletions(-) create mode 100644 src/assets/img/class.png create mode 100644 src/components/page/classExperimentAss.vue diff --git a/src/assets/img/class.png b/src/assets/img/class.png new file mode 100644 index 0000000000000000000000000000000000000000..6144687b706136bc8bc5e8ad02b5efc4bcde4666 GIT binary patch literal 3161 zcmaJ@c|6nqAD?>&BSiT!Ge@*bY_^bN3?ZRHCpKB^uuV4ioii0VzCsDPQlZ=tN;F6A zRFq07ln#;WH+`$`?~h-<&*Sm=ypPB8`Fvf^KR)pe_5=yBtzrNGK*HJz@5o!-dG8^h zFz@U6=Djy>QDj-Tu$*XKtN?cg31CX3d62-?6!#M(N0K{{(Z-1o_a=3;~mgMv#O0c1SzAImw%B704ht z1=>4%2KsnniICmKU_&;JCqN;w+`(*$FO`X78$o{P;&}UwYXk)R1H$q#g8Y+|i=6}5 zoW>x5(QqWp6N%IXW3X@(T2Bv++yT}_>LL+HeFRDuhC<_zdN>pY{PThEqA`eGI7htY z&se;Z5yYFtqT>*VfPesaz)m=gaRPzDVzCIME<#rq#zVlE94gD54WlyEektHdOiu=x z&LY#O;0;B051K#A2*S(spAsna-?CK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)1 z^wO?zLp7L-AW5^Y$$*Gm7Hih-Wb?UW zOG09R!dI3Tx<&@>sms?aR@m)_n%a#_PCWxQcWamIKjq(rb_0qW4}Cwi-gtCtwed)I>l&KZrjr!NfpV746Y1LFnZJ79IyGM|*)h z`TT$}?b3X$ig(`2MweSkfo&o`LV!SUSHws4A=$~e&mQwE>Cd+7tWEha9Z7;mW9L5g zGV_YE=R>P-ao~vRbiea9)U_{>Le^{-GU+kS?a6(+*hgGeGW}mr~357T`rHP zTc^jm7GD{E3UTSYy3?M}lkj@nTs*3J_MAH3nCk3e>(g&mS4Db3gJIIa@7RBx^f&e~ z(HIl(dpuB-JYpqaJmF+K-n7a8Wdb8d8iorLOB?4yGGq=A*1f83e*rx(zY!C>85dmq zAh}AR!fDO=rj^tZyLJY&()OnOvw1ZKCv}*-dED4=X_%FLvs3SEJmZV%KvUHq$YDtn zU}JeL5XPTPc*T8_l)Pl6&yCaCMtGL=vLa8Uz$9cWy!*qAOB9%oTPS&D_`Hf#$;g$% z(B$TVZ$zgs!@kGe7k6qdomwp@|F(E2w2GT6qs_rB0)~gT-YHWbc&t_lReq6TE&&zA zRkr$Wq9_rv<%_SitY&?k?oF4A{IoarR^JDy-~+IXLM7Wl5!)BXuL|5KsmwO=f_@l$ z)L0B%j$Tfhcrt|u334@k&{opW6!F3Qq~5#o{CVr{X?n`TF=9g*~m5*k%_r&oHZcS+r z?Rx84D89cl9&hLw@1mj~Vm9g~%MpMZHz&2`{Cy?(fl6Te_1!Phcf-5(VRk+%sWDsR zUJjxuHB1eCy>(Dycy@u1nvr~9vV?qxE+HhP%l%HeueDpSfA*UzBzF8bL0>?6Ikvp0 pU{XcLF{p91_wU+|$mw - + - + @@ -58,6 +58,8 @@ export default { name: 'achievement', data() { return { + classId: this.$route.query.classId, + className: this.$route.query.className, userId: this.$store.state.userLoginId, keyword: '', systemId: this.$config.systemId, @@ -138,19 +140,14 @@ export default { background: 'rgba(255,255,255,.6)' }) let data = { - searchContant: this.encodeString(this.keyword), - startTime: this.startingtime, - endtime: this.endtime, - month: this.month, - page: this.pageNo, - size: this.pageSize, - userId: this.userId, - systemId: this.systemId, - projectPermissions: this.projectPermissions + classId: this.classId, + searchContent: this.encodeString(this.keyword), + current: this.pageNo, + pageSize: this.pageSize, } - this.$get(this.api.queryAchievementNew,data).then(res => { - this.listData = res.data.list - this.totals = res.data.total + this.$post(this.api.classAssessmentList,data).then(res => { + this.listData = res.list.list + this.totals = res.list.totalCount this.$nextTick(() => { this.loadIns.close() }) @@ -159,25 +156,19 @@ export default { }) }, entry(row){ - if(this.projectPermissions){ - this.$store.commit('addExperimentData',{experimentData: { - id: row.id, - name: row.projectName, - class: row.experimentalClassName, - systemId: this.systemId, - projectId: row.projectId, - experimentalName: row.experimentalName - }}) - this.$router.push('experimentTeach') - }else{ - this.$store.commit('addExperimentData',{experimentData: { - id: row.projectId, - name: row.projectName, - class: row.experimentalClassName, - systemId: this.systemId - }}) - this.$router.push('experimentVir') - } + let classList = [{ + classId: this.classId, + className: this.className + }] + + this.$store.commit('addExperimentData',{experimentData: { + id: row.id, + name: row.projectName, + classList, + projectId: row.projectId, + experimentalName: row.experimentalName + }}) + this.$router.push('classExperimentAss') }, disabledSelection(row,index){ if(row.isdel == 0) return false diff --git a/src/components/page/ClassInfo.vue b/src/components/page/ClassInfo.vue index 3e33db2..8d994c9 100644 --- a/src/components/page/ClassInfo.vue +++ b/src/components/page/ClassInfo.vue @@ -1,14 +1,23 @@ @@ -21,6 +30,8 @@ export default { return { activeName: 'first', userId: this.$store.state.userId, + classId: this.$route.query.classId, + className: this.$route.query.className, tabs: { first: '学生管理', second: '成绩管理' @@ -37,6 +48,9 @@ export default { methods: { tabChange(index){ this.activeName = index + }, + goback() { + this.$router.back() } } }; diff --git a/src/components/page/ClassStudent.vue b/src/components/page/ClassStudent.vue index ad667a6..7801ad2 100644 --- a/src/components/page/ClassStudent.vue +++ b/src/components/page/ClassStudent.vue @@ -8,22 +8,21 @@ 批量删除
- +
- + - - - - + + + + + @@ -99,9 +98,10 @@ :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" - :action="this.api.uploadFile" - :file-list="uploadList" + :action="this.api.uploadStudents" + :file-list="uploadList" name="file" + :data="uploadData" > 上传文件 @@ -140,6 +140,7 @@ + + + diff --git a/src/main.js b/src/main.js index 230ea80..4f148db 100644 --- a/src/main.js +++ b/src/main.js @@ -11,7 +11,7 @@ import './assets/icon/iconfont.css'; import './components/common/directives'; import 'babel-polyfill'; import './util/rem'; -import {post,get,del,put} from './utils/http'; +import {post,get,del,delbody,put} from './utils/http'; import api from './utils/api'; import store from './store' import config from '@/config' @@ -29,6 +29,7 @@ Vue.prototype.api = api; Vue.prototype.$get = get; Vue.prototype.$post = post; Vue.prototype.$del = del; +Vue.prototype.$delbody = delbody; Vue.prototype.$put = put; Vue.prototype.$config = config diff --git a/src/router/routes.js b/src/router/routes.js index a1d53c0..bbf460f 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -65,6 +65,11 @@ export default [ component: () => import('../components/page/ExperimentAss.vue'), meta: { title: '成绩管理' } }, + { + path: '/classExperimentAss', + component: () => import('../components/page/classExperimentAss.vue'), + meta: { title: '成绩管理' } + }, { path: '/addexperiment', component: () => import('../components/page/AddExperiment.vue'), diff --git a/src/utils/api.js b/src/utils/api.js index e2c6df1..73c21bc 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -169,4 +169,16 @@ export default { queryPoint: `${host}/kdSys/queryPoint`, querySubject: `${host}/kdSys/querySubject`, queryItem: `${host}/kdSys/queryItem`, + + // 班级管理 + classList: `${host}/evaluation/class/management/classList`, //班级列表 + saveClass: `${host}/evaluation/class/management/saveClass`, //新增班级 + editClass: `${host}/evaluation/class/management/editClass`, //编辑班级 + deleteClass: `${host}/evaluation/class/management/deleteClass`, //删除班级 + queryStudentList: `${host}/evaluation/class/management/queryStudentList`, //学生列表 + deleteStudents: `${host}/evaluation/class/management/deleteStudents`, //删除学生 + addStudentToClass: `${host}/evaluation/class/management/addStudentToClass`, //新增学生 + uploadStudents: `${host}/evaluation/class/management/uploadFile`, //批量导入学生到班级 + + classAssessmentList: `${host}/evaluation/class/management/classAssessmentList`, //成绩管理列表 } \ No newline at end of file diff --git a/src/utils/http.js b/src/utils/http.js index 9766457..a235384 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -398,6 +398,89 @@ export function post(url, params) { }); } +export function delbody(url, params){ + getToken() + return new Promise((resolve, reject) =>{ + axios.delete(url, {data: params}) + .then(res => { + if(res.data.code == 99999){ + this.$message.error( + res.data.message + ) + }else{ + if (res.data.status) { + switch (res.data.status) { + case 200: + resolve(res.data); + break; + // case 300: + // this.$message.error( + // res.data.errmessage + // ); + // break; + case 500: + this.$message.error( + res.data.errmessage + ); + break; + case 404: + this.$message.error( + res.data.errmessage + ); + router.replace({ + path: '/404', + }); + break; + case 403: + this.$message.error( + res.data.errmessage + ); + break; + case 401: + Message.error("token失效,请重新登录"); + sessionStorage.removeItem('token'); + router.replace('/login') + break; + case 405: + this.$message.error( + res.data.errmessage + ); + break; + case 406: + this.$message.error( + res.data.errmessage + ); + break; + case 1000201: + this.$message.error( + res.data.errmessage + ); + break; + default: + reject(res) + } + }else if(res.data.code == 99999){ + Message.error(res.data.message); + }else if(res.data.success){ + resolve(res.data); + }else{ + if(!res.data.success) { + resolve(res.data); + } + } + } + }) + .catch(err => { + reject(err.data) + this.$message({ + showClose: true, + message: '请求失败,请刷新页面重新进行请求', + type: 'error' + }); + }) + }); +} + /** * put修改 * @param {} url