diff --git a/EduSystemServer/dist/js/app.468fdcef.js b/EduSystemServer/dist/js/app.468fdcef.js new file mode 100644 index 0000000..55e251b --- /dev/null +++ b/EduSystemServer/dist/js/app.468fdcef.js @@ -0,0 +1,2 @@ +(function(){"use strict";var e={5371:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",[t("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[t("el-tab-pane",{attrs:{label:"我的选课",name:"info"}}),t("el-tab-pane",{attrs:{label:"选课",name:"select"}})],1),t("router-view")],1)},l=[],r=(a(7658),{name:"course",data(){return{activeName:"info"}},methods:{handleClick(e,t){this.$router.push("/student/course/"+this.activeName)}}}),o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},6413:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("el-table",{ref:"tableData",staticStyle:{width:"100%"},attrs:{data:e.tableData}},[t("el-table-column",{attrs:{prop:"cid__name",label:"课程名称",width:"220"}}),t("el-table-column",{attrs:{prop:"cid__type",label:"课程类型",width:"220"}}),t("el-table-column",{attrs:{prop:"cid__tid__name",label:"任课老师",width:"150"}}),t("el-table-column",{attrs:{prop:"cid__tid__title",label:"老师职称",width:"150"}}),t("el-table-column",{attrs:{prop:"cid__tid__dept",label:"老师院系",width:"220"}}),t("el-table-column",{attrs:{prop:"cid__credit",width:"150",label:"课程学分"}}),t("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e.handleDelete(a.$index,a.row)}}},[e._v("退课")])]}}])})],1)},l=[],r={data(){return{tableData:[{}]}},methods:{getSelectCourse(){this.$axios.get("/course/getCourseById").then((e=>{0===e.data.code?this.tableData=e.data.data:this.$message({message:e.data.message,type:"error"})}))},handleDelete(e,t){console.log(e,t),this.$confirm("是否退出选课?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{this.$axios.get("/course/deleteSelectCourse?sid="+t.sid+"&cid="+t.cid).then((e=>{this.$message({type:0===e.data.code?"success":"error",message:e.data.message})})),this.getSelectCourse()})).catch((()=>{this.$message({type:"info",message:"已取消删除"})}))}},mounted(){this.getSelectCourse()}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},6962:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"box-card"},[t("el-form",{ref:"form",staticClass:"demo-form-inline",attrs:{model:e.form,"label-width":"80px",inline:!0}},[t("el-form-item",{attrs:{label:"课程名称"}},[t("el-input",{model:{value:e.form.cName,callback:function(t){e.$set(e.form,"cName",t)},expression:"form.cName"}})],1),t("el-form-item",{attrs:{label:"课程类型"}},[t("el-input",{model:{value:e.form.cType,callback:function(t){e.$set(e.form,"cType",t)},expression:"form.cType"}})],1),t("el-form-item",{attrs:{label:"老师名称"}},[t("el-input",{model:{value:e.form.tName,callback:function(t){e.$set(e.form,"tName",t)},expression:"form.tName"}})],1),t("el-form-item",{attrs:{size:"large"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("查询")])],1)],1)],1),t("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"20px"}},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,border:"","show-header":"",stripe:""}},[t("el-table-column",{attrs:{fixed:"",prop:"tid__course__name",label:"课程名称",width:"200"}}),t("el-table-column",{attrs:{prop:"tid__course__type",label:"课程类型",width:"180"}}),t("el-table-column",{attrs:{prop:"tid__course__credit",label:"课程学分",width:"150"}}),t("el-table-column",{attrs:{prop:"tid__name",label:"教师名称",width:"180"}}),t("el-table-column",{attrs:{prop:"tid__title",label:"教师职称",width:"180"}}),t("el-table-column",{attrs:{prop:"tid__dept",label:"教师院系",width:"220"}}),t("el-table-column",{attrs:{label:"操作",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-popconfirm",{attrs:{"confirm-button-text":"选择","cancel-button-text":"取消",icon:"el-icon-info",title:"确定选择该教师开设的课程?"},on:{confirm:function(t){return e.select(a.row)}}},[t("el-button",{attrs:{slot:"reference",type:"text",size:"small"},slot:"reference"},[e._v("选择")])],1)]}}])})],1),t("el-pagination",{staticStyle:{"text-align":"center"},attrs:{background:"",layout:"prev, pager, next",total:e.total,"page-size":10},on:{"current-change":e.changePage}})],1)],1)},l=[],r={data(){return{total:0,currentPage:1,form:{cName:"",tName:"",cType:""},tableData:[{}]}},methods:{getAllCourse(){this.$axios.get("/course/seacherCourse?currentPage="+this.currentPage+"&cName="+this.form.cName+"&tName="+this.form.tName+"&cType="+this.form.cType).then((e=>{0===e.data.code?this.tableData=e.data.data:this.$message({message:e.data.message,type:"error"})}))},search(){this.getAllCourse()},changePage(e){this.currentPage=e},select(e){console.log(e),e.username=sessionStorage.getItem("username"),this.$axios.post("/student/selectCourse",e).then((e=>{this.$message({message:e.data.message,type:0===e.data.code?"success":"error"})}))}},mounted(){this.getAllCourse()}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},2705:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("el-table",{ref:"filterTable",staticStyle:{width:"100%"},attrs:{data:e.tableData}},[t("el-table-column",{attrs:{prop:"cid__name",label:"课程名称",width:"220"}}),t("el-table-column",{attrs:{prop:"cid__type",label:"课程类型",width:"300"}}),t("el-table-column",{attrs:{prop:"cid__tid__name",label:"任课老师",width:"220"}}),t("el-table-column",{attrs:{prop:"cid__credit",width:"150",label:"课程学分"}}),t("el-table-column",{attrs:{prop:"middle_grade",label:"平时成绩",sortable:"",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tag",{attrs:{type:a.row.middle_grade<60?"danger":"success","disable-transitions":""}},[e._v(e._s(a.row.middle_grade))])]}}])}),t("el-table-column",{attrs:{prop:"end_grade",label:"期末成绩",sortable:"",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tag",{attrs:{type:a.row.end_grade<60?"danger":"success","disable-transitions":""}},[e._v(e._s(a.row.end_grade))])]}}])})],1)},l=[],r={name:"grade",data(){return{tableData:[{}]}},methods:{getGrade(){this.$axios.get("/student/getGrade").then((e=>{0===e.data.code?this.tableData=e.data.data:this.$message({message:e.data.message,type:"error"})}))}},mounted(){this.getGrade()}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},5493:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("el-descriptions",{staticClass:"margin-top",attrs:{column:3,border:""}},[t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-user"}),e._v(" 学号 ")]),e._v(" "+e._s(e.sid)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-user"}),e._v(" 用户名 ")]),e._v(" "+e._s(e.username)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-mobile-phone"}),e._v(" 姓名 ")]),e._v(" "+e._s(e.name)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-location-outline"}),e._v(" 年级 ")]),e._v(" "+e._s(e.grade)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-tickets"}),e._v(" 性别 ")]),t("el-tag",{attrs:{size:"small"}},[e._v(e._s(e.sex))])],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-office-building"}),e._v(" 班级 ")]),e._v(" "+e._s(e.class_name)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-office-building"}),e._v(" 专业 ")]),e._v(" "+e._s(e.major)+" ")],2)],1)},l=[],r={name:"home",data(){return{sid:"",username:"",password:"",name:"",sex:"",grade:"",class_name:"",major:""}},mounted(){this.$axios.get("/userinfo").then((e=>{if(0===e.data.code){const t=e.data.data;this.sid=t.sid,this.username=t.username,this.name=t.name,this.sex=t.sex,this.grade=t.grade,this.class_name=t.class_name,this.major=t.major}else this.$message({message:e.data.message,type:"error"})}))}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},1941:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",[t("el-container",[t("el-header",{staticStyle:{"text-align":"right","font-size":"18px","background-color":"#409EFF","border-radius":"3px"}},[t("div",{staticStyle:{"text-align":"center",display:"inline-block","margin-right":"40%"}},[t("span",{staticStyle:{"font-size":"25px"}},[e._v("教务管理系统(学生端)")])]),t("div",{staticStyle:{display:"inline-block"}},[t("i",{staticClass:"el-icon-s-custom",staticStyle:{"margin-right":"5px"}}),t("span",{staticStyle:{"margin-right":"15px"}},[e._v(e._s(e.name))]),t("el-button",{staticStyle:{color:"#333333","font-size":"18px"},attrs:{type:"text",icon:"el-icon-switch-button"},on:{click:function(t){return e.out()}}},[e._v(" logout ")])],1)]),t("el-container",[t("el-aside",{staticStyle:{"background-color":"rgb(238, 241, 246)",height:"810px",border:"1px solid #eee"},attrs:{width:"200px"}},[t("el-menu",{attrs:{router:"","default-active":this.$route.path}},[t("el-menu-item",{attrs:{index:"/student/home"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-info"}),e._v("学生主页")])],2),t("el-menu-item",{attrs:{index:"/student/studentInfo"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-setting"}),e._v("学生编辑")])],2),t("el-menu-item",{attrs:{index:"/student/course"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-menu"}),e._v("选课管理")])],2),t("el-menu-item",{attrs:{index:"/student/grade"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-tickets"}),e._v("查询成绩")])],2)],1)],1),t("el-main",[t("router-view")],1)],1)],1)],1)},l=[],r=(a(7658),{name:"index",data(){return{name:"张三",currentTerm:"123"}},mounted(){this.name=sessionStorage.getItem("name")},methods:{out(){sessionStorage.clear(),this.$router.push({path:"/login",query:{message:"退出登录!"}})}}}),o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,"f3ce3a26",null),d=i.exports},1864:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("修改信息")])]),t("el-form",{ref:"form",attrs:{model:e.form,"label-width":"80px",size:"mini"}},[t("el-form-item",{attrs:{label:"学号"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.sid,callback:function(t){e.$set(e.form,"sid",t)},expression:"form.sid"}})],1),t("el-form-item",{attrs:{label:"账号"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.username,callback:function(t){e.$set(e.form,"username",t)},expression:"form.username"}})],1),t("el-form-item",{attrs:{label:"密码"}},[t("el-input",{attrs:{type:"password"},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1),t("el-form-item",{attrs:{label:"姓名"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),t("el-form-item",{attrs:{label:"性别"}},[t("el-radio-group",{attrs:{size:"medium",disabled:""},model:{value:e.form.sex,callback:function(t){e.$set(e.form,"sex",t)},expression:"form.sex"}},[t("el-radio",{attrs:{border:"",label:"男",icon:"el-icon-female"}}),t("el-radio",{attrs:{border:"",label:"女",icon:"el-icon-male"}})],1)],1),t("el-form-item",{attrs:{label:"班级"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.class_name,callback:function(t){e.$set(e.form,"class_name",t)},expression:"form.class_name"}})],1),t("el-form-item",{attrs:{label:"年级"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.grade,callback:function(t){e.$set(e.form,"grade",t)},expression:"form.grade"}})],1),t("el-form-item",{attrs:{label:"专业"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.major,callback:function(t){e.$set(e.form,"major",t)},expression:"form.major"}})],1),t("el-form-item",{attrs:{size:"large"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")])],1)],1)],1)},l=[],r=(a(7658),{name:"studentInfo",data(){return{form:{sid:1,username:"",password:"",name:"",sex:"男",grade:"",class_name:"",major:""}}},methods:{onSubmit(){this.$axios.post("/student/",this.form).then((e=>{0===e.data.code?(this.$message({message:e.data.message,type:"success"}),sessionStorage.clear(),this.$router.push("/login")):this.$message({message:e.data.message,type:"error"})}))}},mounted(){this.$axios("/userinfo").then((e=>{if(0===e.data.code){const t=e.data.data;this.form.sid=t.sid,this.form.username=t.username,this.form.password=t.password,this.form.name=t.name,this.form.sex=t.sex,this.form.grade=t.grade,this.form.class_name=t.class_name,this.form.major=t.major}else this.$message({message:e.data.message,type:"error"})}))}}),o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},7241:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"box-card"},[t("el-form",{ref:"form",staticClass:"demo-form-inline",attrs:{model:e.form,"label-width":"80px",size:"mini",inline:!0}},[t("el-form-item",{attrs:{label:"学生姓名"}},[t("el-input",{model:{value:e.form.sname,callback:function(t){e.$set(e.form,"sname",t)},expression:"form.sname"}})],1),t("el-form-item",{attrs:{label:"班级"}},[t("el-input",{model:{value:e.form.className,callback:function(t){e.$set(e.form,"className",t)},expression:"form.className"}})],1),t("el-form-item",{attrs:{label:"课程名称"}},[t("el-input",{model:{value:e.form.courseName,callback:function(t){e.$set(e.form,"courseName",t)},expression:"form.courseName"}})],1),t("el-form-item",{attrs:{label:"课程类型"}},[t("el-input",{model:{value:e.form.courseType,callback:function(t){e.$set(e.form,"courseType",t)},expression:"form.courseType"}})],1),t("el-form-item",{attrs:{size:"large"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("查询")])],1)],1)],1),t("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"10px"}},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[t("el-table-column",{attrs:{label:"学号",width:"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("i",{staticClass:"el-icon-time"}),t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.sid))])]}}])}),t("el-table-column",{attrs:{label:"姓名",width:"120"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.sname))])]}}])}),t("el-table-column",{attrs:{label:"班级",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.className))])]}}])}),t("el-table-column",{attrs:{label:"课程名称",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.cname))])]}}])}),t("el-table-column",{attrs:{label:"课程类型",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.ctype))])]}}])}),t("el-table-column",{attrs:{label:"平时成绩",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t("el-tag",{attrs:{size:"medium",type:a.row.middleGrade>60?"success":"error"}},[e._v(e._s(a.row.middleGrade))])],1)]}}])}),t("el-table-column",{attrs:{label:"期末成绩",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t("el-tag",{attrs:{size:"medium",type:a.row.endGrade>60?"success":"error"}},[e._v(e._s(a.row.endGrade))])],1)]}}])}),t("el-table-column",{attrs:{label:"操作",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.handleEdit(a.$index,a.row)}}},[e._v("编辑")])]}}])})],1),t("el-pagination",{staticStyle:{"text-align":"center","margin-top":"10px"},attrs:{"hide-on-single-page":"",background:"","current-page":e.currentPage,"page-size":10,layout:"prev, pager, next, total",total:e.total},on:{"current-change":e.handleCurrentChange}})],1),t("el-drawer",{ref:"drawer",attrs:{title:"录入成绩","before-close":e.handleClose,visible:e.dialog,direction:"rtl","custom-class":"demo-drawer"},on:{"update:visible":function(t){e.dialog=t}}},[t("div",{staticClass:"demo-drawer__content"},[t("el-form",{ref:"addForm",attrs:{model:e.addForm,"label-width":"80px",size:"mini"}},[t("el-form-item",{attrs:{label:"学号"}},[t("el-input",{attrs:{disabled:""},model:{value:e.addForm.sid,callback:function(t){e.$set(e.addForm,"sid",t)},expression:"addForm.sid"}})],1),t("el-form-item",{attrs:{label:"姓名"}},[t("el-input",{attrs:{disabled:""},model:{value:e.addForm.sname,callback:function(t){e.$set(e.addForm,"sname",t)},expression:"addForm.sname"}})],1),t("el-form-item",{attrs:{label:"课程名称"}},[t("el-input",{attrs:{disabled:""},model:{value:e.addForm.cname,callback:function(t){e.$set(e.addForm,"cname",t)},expression:"addForm.cname"}})],1),t("el-form-item",{attrs:{label:"平时成绩"}},[t("el-input-number",{attrs:{min:0,max:100,label:"平时成绩"},model:{value:e.addForm.middleGrade,callback:function(t){e.$set(e.addForm,"middleGrade",t)},expression:"addForm.middleGrade"}})],1),t("el-form-item",{attrs:{label:"最终成绩"}},[t("el-input-number",{attrs:{min:0,max:100,label:"最终成绩"},model:{value:e.addForm.endGrade,callback:function(t){e.$set(e.addForm,"endGrade",t)},expression:"addForm.endGrade"}})],1)],1),t("div",{staticClass:"demo-drawer__footer"},[t("el-button",{on:{click:e.cancelForm}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:function(t){return e.$refs.drawer.closeDrawer()}}},[e._v(e._s(e.loading?"提交中 ...":"保存"))])],1)],1)])],1)},l=[],r={data(){return{currentPage:1,total:0,dialog:!1,loading:!1,title:"新增学生",tableData:[{sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""}],form:{sname:"",className:"",courseName:"",courseType:""},addForm:{sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""}}},methods:{handleEdit(e,t){console.log(t),this.addForm=new Object(t),this.dialog=!0,this.isAdd=!1,this.loading=!1},handleCurrentChange(e){this.currentPage=e,this.getAllStudent()},getAllStudent(){this.$axios.post("/course/getStudentCourse?currentPage="+this.currentPage,this.form).then((e=>{console.log(e.data),0===e.data.code&&(this.total=e.data.pageTotal,this.tableData=e.data.data)}))},search(){this.getAllStudent()},handleClose(e){this.loading||(this.$confirm("确定要提交表单吗?").then((t=>{this.loading=!0,this.timer=setTimeout((()=>{e(),this.$axios.post("/course/editGrade",this.addForm).then((e=>{0===e.data.code?(this.$message({message:e.data.message,type:"success"}),this.getAllStudent(),this.loading=!1,this.addForm={sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""}):this.$message({message:e.data.message,type:"error"})}))}),1e3)})).catch((e=>{})),console.log("close"))},cancelForm(){this.loading=!1,this.dialog=!1,this.addForm={sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""},clearTimeout(this.timer)}},mounted(){this.getAllStudent()}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},4460:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"box-card"},[t("el-form",{ref:"form",staticClass:"demo-form-inline",attrs:{model:e.form,"label-width":"80px",size:"mini",inline:!0}},[t("el-form-item",{attrs:{label:"学生姓名"}},[t("el-input",{model:{value:e.form.sname,callback:function(t){e.$set(e.form,"sname",t)},expression:"form.sname"}})],1),t("el-form-item",{attrs:{label:"班级"}},[t("el-input",{model:{value:e.form.className,callback:function(t){e.$set(e.form,"className",t)},expression:"form.className"}})],1),t("el-form-item",{attrs:{label:"课程名称"}},[t("el-input",{model:{value:e.form.courseName,callback:function(t){e.$set(e.form,"courseName",t)},expression:"form.courseName"}})],1),t("el-form-item",{attrs:{label:"课程类型"}},[t("el-input",{model:{value:e.form.courseType,callback:function(t){e.$set(e.form,"courseType",t)},expression:"form.courseType"}})],1),t("el-form-item",{attrs:{size:"large"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("查询")])],1)],1)],1),t("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"10px"}},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[t("el-table-column",{attrs:{label:"学号",width:"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("i",{staticClass:"el-icon-time"}),t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.sid))])]}}])}),t("el-table-column",{attrs:{label:"姓名",width:"120"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.sname))])]}}])}),t("el-table-column",{attrs:{label:"班级",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.className))])]}}])}),t("el-table-column",{attrs:{label:"课程名称",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.cname))])]}}])}),t("el-table-column",{attrs:{label:"课程类型",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.ctype))])]}}])}),t("el-table-column",{attrs:{label:"平时成绩",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t("el-tag",{attrs:{size:"medium",type:a.row.middleGrade>60?"success":"error"}},[e._v(e._s(a.row.middleGrade))])],1)]}}])}),t("el-table-column",{attrs:{label:"期末成绩",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t("el-tag",{attrs:{size:"medium",type:a.row.endGrade>60?"success":"error"}},[e._v(e._s(a.row.endGrade))])],1)]}}])}),t("el-table-column",{attrs:{label:"操作",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.handleEdit(a.$index,a.row)}}},[e._v("编辑")])]}}])})],1),t("el-pagination",{staticStyle:{"text-align":"center","margin-top":"10px"},attrs:{"hide-on-single-page":"",background:"","current-page":e.currentPage,"page-size":10,layout:"prev, pager, next, total",total:e.total},on:{"current-change":e.handleCurrentChange}})],1),t("el-drawer",{ref:"drawer",attrs:{title:"录入成绩","before-close":e.handleClose,visible:e.dialog,direction:"rtl","custom-class":"demo-drawer"},on:{"update:visible":function(t){e.dialog=t}}},[t("div",{staticClass:"demo-drawer__content"},[t("el-form",{ref:"addForm",attrs:{model:e.addForm,"label-width":"80px",size:"mini"}},[t("el-form-item",{attrs:{label:"学号"}},[t("el-input",{attrs:{disabled:""},model:{value:e.addForm.sid,callback:function(t){e.$set(e.addForm,"sid",t)},expression:"addForm.sid"}})],1),t("el-form-item",{attrs:{label:"姓名"}},[t("el-input",{attrs:{disabled:""},model:{value:e.addForm.sname,callback:function(t){e.$set(e.addForm,"sname",t)},expression:"addForm.sname"}})],1),t("el-form-item",{attrs:{label:"课程名称"}},[t("el-input",{attrs:{disabled:""},model:{value:e.addForm.cname,callback:function(t){e.$set(e.addForm,"cname",t)},expression:"addForm.cname"}})],1),t("el-form-item",{attrs:{label:"平时成绩"}},[t("el-input-number",{attrs:{min:0,max:100,label:"平时成绩"},model:{value:e.addForm.middleGrade,callback:function(t){e.$set(e.addForm,"middleGrade",t)},expression:"addForm.middleGrade"}})],1),t("el-form-item",{attrs:{label:"最终成绩"}},[t("el-input-number",{attrs:{min:0,max:100,label:"最终成绩"},model:{value:e.addForm.endGrade,callback:function(t){e.$set(e.addForm,"endGrade",t)},expression:"addForm.endGrade"}})],1)],1),t("div",{staticClass:"demo-drawer__footer"},[t("el-button",{on:{click:e.cancelForm}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:function(t){return e.$refs.drawer.closeDrawer()}}},[e._v(e._s(e.loading?"提交中 ...":"保存"))])],1)],1)])],1)},l=[],r={data(){return{currentPage:1,total:0,dialog:!1,loading:!1,title:"新增学生",tableData:[{sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""}],form:{sname:"",className:"",courseName:"",courseType:""},addForm:{sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""}}},methods:{handleEdit(e,t){console.log(t),this.addForm=new Object(t),this.dialog=!0,this.isAdd=!1,this.loading=!1},handleCurrentChange(e){this.currentPage=e,this.getAllStudent()},getAllStudent(){this.$axios.post("/course/getStudentCourse?currentPage="+this.currentPage,this.form).then((e=>{console.log(e.data),0===e.data.code&&(this.total=e.data.pageTotal,this.tableData=e.data.data)}))},search(){this.getAllStudent()},handleClose(e){this.loading||(this.$confirm("确定要提交表单吗?").then((t=>{this.loading=!0,this.timer=setTimeout((()=>{e(),this.$axios.post("/course/editGrade",this.addForm).then((e=>{0===e.data.code?(this.$message({message:e.data.message,type:"success"}),this.getAllStudent(),this.loading=!1,this.addForm={sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""}):this.$message({message:e.data.message,type:"error"})}))}),1e3)})).catch((e=>{})),console.log("close"))},cancelForm(){this.loading=!1,this.dialog=!1,this.addForm={sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""},clearTimeout(this.timer)}},mounted(){this.getAllStudent()}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},9215:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("el-descriptions",{staticClass:"margin-top",attrs:{column:3,border:""}},[t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-user"}),e._v(" 编号 ")]),e._v(" "+e._s(e.info.tid)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-user"}),e._v(" 用户名 ")]),e._v(" "+e._s(e.info.username)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-mobile-phone"}),e._v(" 姓名 ")]),e._v(" "+e._s(e.info.name)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-location-outline"}),e._v(" 职称 ")]),e._v(" "+e._s(e.info.title)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-tickets"}),e._v(" 性别 ")]),t("el-tag",{attrs:{size:"small"}},[e._v(e._s(e.info.sex))])],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-office-building"}),e._v(" 学历 ")]),e._v(" "+e._s(e.info.education)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-office-building"}),e._v(" 院系 ")]),e._v(" "+e._s(e.info.dept)+" ")],2)],1)},l=[],r={name:"home",data(){return{info:{tid:"",username:"",password:"",name:"",sex:"",title:"",education:"",dept:""}}},mounted(){this.$axios("/userinfo?username="+sessionStorage.getItem("username")+"&type="+sessionStorage.getItem("type")).then((e=>{0===e.data.code?this.info=e.data.data:this.$message({message:e.data.message,type:"error"})}))}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},3708:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",[t("el-container",[t("el-header",{staticStyle:{"text-align":"right","font-size":"18px","background-color":"#409EFF","border-radius":"3px"}},[t("div",{staticStyle:{"text-align":"center",display:"inline-block","margin-right":"40%"}},[t("span",{staticStyle:{"font-size":"25px"}},[e._v("教务管理系统(老师端)")])]),t("div",{staticStyle:{display:"inline-block"}},[t("i",{staticClass:"el-icon-s-custom",staticStyle:{"margin-right":"5px"}}),t("span",{staticStyle:{"margin-right":"15px"}},[e._v(e._s(e.name))]),t("el-button",{staticStyle:{color:"#333333","font-size":"18px"},attrs:{type:"text",icon:"el-icon-switch-button"},on:{click:function(t){return e.out()}}},[e._v(" logout ")])],1)]),t("el-container",[t("el-aside",{staticStyle:{"background-color":"rgb(238, 241, 246)",height:"810px",border:"1px solid #eee"},attrs:{width:"200px"}},[t("el-menu",{attrs:{router:"","default-active":this.$route.path}},[t("el-menu-item",{attrs:{index:"/teacher/home"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-info"}),e._v("老师主页")])],2),t("el-menu-item",{attrs:{index:"/teacher/teacherInfo"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-setting"}),e._v("信息编辑")])],2),t("el-menu-item",{attrs:{index:"/teacher/studentManage"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-menu"}),e._v("学生管理")])],2),t("el-menu-item",{attrs:{index:"/teacher/gradeManage"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-tickets"}),e._v("成绩管理")])],2)],1)],1),t("el-main",[t("router-view")],1)],1)],1)],1)},l=[],r=(a(7658),{name:"index",data(){return{name:"张三",currentTerm:"123"}},mounted(){this.name=sessionStorage.getItem("name")},methods:{out(){sessionStorage.clear(),this.$router.push("/login")}}}),o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,"67fd8d7d",null),d=i.exports},3677:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"box-card"},[t("el-form",{ref:"form",staticClass:"demo-form-inline",attrs:{model:e.form,"label-width":"80px",size:"mini",inline:!0}},[t("el-form-item",{attrs:{label:"学号"}},[t("el-input",{model:{value:e.form.sid,callback:function(t){e.$set(e.form,"sid",t)},expression:"form.sid"}})],1),t("el-form-item",{attrs:{label:"姓名"}},[t("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),t("el-form-item",{attrs:{label:"性别"}},[t("el-radio-group",{attrs:{size:"medium"},model:{value:e.form.sex,callback:function(t){e.$set(e.form,"sex",t)},expression:"form.sex"}},[t("el-radio",{attrs:{border:"",label:"男",icon:"el-icon-female"}}),t("el-radio",{attrs:{border:"",label:"女",icon:"el-icon-male"}}),t("el-radio",{attrs:{border:"",label:"",icon:"el-icon-male"}},[e._v("无")])],1)],1),t("el-form-item",{attrs:{label:"班级"}},[t("el-input",{model:{value:e.form.class_name,callback:function(t){e.$set(e.form,"class_name",t)},expression:"form.class_name"}})],1),t("el-form-item",{attrs:{label:"年级"}},[t("el-input",{model:{value:e.form.grade,callback:function(t){e.$set(e.form,"grade",t)},expression:"form.grade"}})],1),t("el-form-item",{attrs:{label:"专业"}},[t("el-input",{model:{value:e.form.major,callback:function(t){e.$set(e.form,"major",t)},expression:"form.major"}})],1),t("el-form-item",{attrs:{size:"large"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("查询")])],1),t("el-form-item",{attrs:{size:"large"}},[t("el-button",{attrs:{type:"primary",icon:"el-icon-plus"},on:{click:function(t){e.dialog=!e.dialog,e.isAdd=!0}}},[e._v("新增学生")])],1)],1)],1),t("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"10px"}},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[t("el-table-column",{attrs:{label:"学号",width:"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("i",{staticClass:"el-icon-time"}),t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.pk))])]}}])}),t("el-table-column",{attrs:{label:"姓名",width:"120"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.fields.name))])]}}])}),t("el-table-column",{attrs:{label:"用户名",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.fields.username))])]}}])}),t("el-table-column",{attrs:{label:"密码",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.fields.password))])]}}])}),t("el-table-column",{attrs:{label:"性别",width:"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.fields.sex))])]}}])}),t("el-table-column",{attrs:{label:"年级",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.fields.grade))])]}}])}),t("el-table-column",{attrs:{label:"班级",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.fields.class_name))])]}}])}),t("el-table-column",{attrs:{label:"专业",width:"180"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.fields.major))])]}}])}),t("el-table-column",{attrs:{label:"操作",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.handleEdit(a.$index,a.row)}}},[e._v("编辑")]),t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e.handleDelete(a.$index,a.row)}}},[e._v("删除")])]}}])})],1),t("el-pagination",{staticStyle:{"text-align":"center","margin-top":"10px"},attrs:{"hide-on-single-page":"",background:"","current-page":e.currentPage,"page-size":10,layout:"prev, pager, next, total",total:e.total},on:{"current-change":e.handleCurrentChange}})],1),t("el-drawer",{ref:"drawer",attrs:{title:e.isAdd?"新增":"编辑","before-close":e.handleClose,visible:e.dialog,direction:"rtl","custom-class":"demo-drawer"},on:{"update:visible":function(t){e.dialog=t}}},[t("div",{staticClass:"demo-drawer__content"},[t("el-form",{ref:"addForm",attrs:{model:e.addForm,"label-width":"80px",size:"mini"}},[t("el-form-item",{attrs:{label:"学号"}},[t("el-input",{attrs:{disabled:""},model:{value:e.addForm.sid,callback:function(t){e.$set(e.addForm,"sid",t)},expression:"addForm.sid"}})],1),t("el-form-item",{attrs:{label:"账号"}},[t("el-input",{model:{value:e.addForm.username,callback:function(t){e.$set(e.addForm,"username",t)},expression:"addForm.username"}})],1),t("el-form-item",{attrs:{label:"密码"}},[t("el-input",{attrs:{type:"password"},model:{value:e.addForm.password,callback:function(t){e.$set(e.addForm,"password",t)},expression:"addForm.password"}})],1),t("el-form-item",{attrs:{label:"姓名"}},[t("el-input",{model:{value:e.addForm.name,callback:function(t){e.$set(e.addForm,"name",t)},expression:"addForm.name"}})],1),t("el-form-item",{attrs:{label:"性别"}},[t("el-radio-group",{attrs:{size:"medium"},model:{value:e.addForm.sex,callback:function(t){e.$set(e.addForm,"sex",t)},expression:"addForm.sex"}},[t("el-radio",{attrs:{border:"",label:"男",icon:"el-icon-female"}}),t("el-radio",{attrs:{border:"",label:"女",icon:"el-icon-male"}})],1)],1),t("el-form-item",{attrs:{label:"班级"}},[t("el-input",{model:{value:e.addForm.class_name,callback:function(t){e.$set(e.addForm,"class_name",t)},expression:"addForm.class_name"}})],1),t("el-form-item",{attrs:{label:"年级"}},[t("el-input",{model:{value:e.addForm.grade,callback:function(t){e.$set(e.addForm,"grade",t)},expression:"addForm.grade"}})],1),t("el-form-item",{attrs:{label:"专业"}},[t("el-input",{model:{value:e.addForm.major,callback:function(t){e.$set(e.addForm,"major",t)},expression:"addForm.major"}})],1)],1),t("div",{staticClass:"demo-drawer__footer"},[t("el-button",{on:{click:e.cancelForm}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:function(t){return e.$refs.drawer.closeDrawer()}}},[e._v(e._s(e.loading?"提交中 ...":"保存"))])],1)],1)])],1)},l=[],r={data(){return{currentPage:1,total:0,isAdd:!0,dialog:!1,loading:!1,title:"新增学生",tableData:[{sid:"",username:"",password:"",name:"",sex:"",grade:"",class_name:"",major:""}],form:{sid:"",name:"",sex:"",grade:"",class_name:"",major:""},addForm:{sid:"",username:"",password:"",name:"",sex:"男",grade:"",class_name:"",major:""}}},methods:{handleEdit(e,t){console.log(t),this.addForm=new Object(t.fields),this.addForm.sid=t.pk,this.dialog=!0,this.isAdd=!1},handleDelete(e,t){this.$confirm("此操作将永久删除该学生, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{this.$axios.get("/student/delete?sid="+t.pk).then((e=>{0===e.data.code?(this.$message({type:"success",message:e.data.message}),this.getAllStudent()):this.$message({type:"error",message:e.data.message})}))})).catch((()=>{this.$message({type:"info",message:"已取消删除"})}))},handleCurrentChange(e){this.currentPage=e,this.getAllStudent()},getAllStudent(){this.$axios.post("/student/search?currentPage="+this.currentPage+"&pageSize=10",this.form).then((e=>{0===e.data.code&&(this.total=e.data.pageTotal,this.tableData=e.data.data)}))},search(){this.getAllStudent()},handleClose(e){this.loading||(this.$confirm("确定要提交表单吗?").then((t=>{this.loading=!0,this.timer=setTimeout((()=>{e(),this.$axios.post(""===this.addForm.sid?"/student/add":"/student/",this.addForm).then((e=>{0===e.data.code?(this.$message({message:e.data.message,type:"sucess"}),this.getAllStudent(),this.loading=!1,this.addForm={sid:"",username:"",password:"",name:"",sex:"男",grade:"",class_name:"",major:""}):this.$message({message:e.data.message,type:"error"})}))}),1e3)})).catch((e=>{})),console.log("close"))},cancelForm(){this.loading=!1,this.dialog=!1,this.addForm={sid:"",username:"",password:"",name:"",sex:"男",grade:"",class_name:"",major:""},clearTimeout(this.timer)}},mounted(){this.getAllStudent()}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},18:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("修改信息")])]),t("el-form",{ref:"form",attrs:{model:e.form,"label-width":"80px",size:"mini"}},[t("el-form-item",{attrs:{label:"编号"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.tid,callback:function(t){e.$set(e.form,"tid",t)},expression:"form.tid"}})],1),t("el-form-item",{attrs:{label:"账号"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.username,callback:function(t){e.$set(e.form,"username",t)},expression:"form.username"}})],1),t("el-form-item",{attrs:{label:"密码"}},[t("el-input",{attrs:{type:"password"},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1),t("el-form-item",{attrs:{label:"姓名"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),t("el-form-item",{attrs:{label:"性别"}},[t("el-radio-group",{attrs:{size:"medium",disabled:""},model:{value:e.form.sex,callback:function(t){e.$set(e.form,"sex",t)},expression:"form.sex"}},[t("el-radio",{attrs:{border:"",label:"男",icon:"el-icon-female"}}),t("el-radio",{attrs:{border:"",label:"女",icon:"el-icon-male"}})],1)],1),t("el-form-item",{attrs:{label:"职称"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.title,callback:function(t){e.$set(e.form,"title",t)},expression:"form.title"}})],1),t("el-form-item",{attrs:{label:"学历"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.education,callback:function(t){e.$set(e.form,"education",t)},expression:"form.education"}})],1),t("el-form-item",{attrs:{label:"院系"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.dept,callback:function(t){e.$set(e.form,"dept",t)},expression:"form.dept"}})],1),t("el-form-item",{attrs:{size:"large"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")])],1)],1)],1)},l=[],r=(a(7658),{name:"studentInfo",data(){return{form:{tid:"",username:"",password:"",name:"",sex:"",title:"",education:"",dept:""}}},methods:{onSubmit(){this.$axios.post("/teacher/",this.form).then((e=>{0===e.data.code?(this.$message({message:e.data.message,type:"success"}),sessionStorage.clear(),this.$router.push("/login")):this.$message({message:e.data.message,type:"error"})}))}},mounted(){this.$axios("/userinfo?username="+sessionStorage.getItem("username")+"&type="+sessionStorage.getItem("type")).then((e=>{0===e.data.code?this.form=e.data.data:this.$message({message:e.data.message,type:"error"})}))}}),o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},413:function(e,t,a){a(7658);var s=a(6369),l=function(){var e=this,t=e._self._c;return t("router-view")},r=[],o={name:"App",components:{}},n=o,i=a(1001),d=(0,i.Z)(n,l,r,!1,null,null,null),m=d.exports,c=a(2631),u=function(){var e=this,t=e._self._c;return t("div",[t("el-container",[t("el-header",[t("div",{staticStyle:{"text-align":"center","font-size":"25px","font-weight":"bolder"}},[t("i",{staticClass:"el-icon-s-home",staticStyle:{"margin-right":"25px"}}),e._v(" 教务管理系统 ")])]),t("el-main",[t("el-card",{staticClass:"login-module",attrs:{shadow:"hover"}},[t("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[t("span",{staticStyle:{"text-align":"center","font-size":"20px","font-family":"'Microsoft YaHei'"}},[t("p",[t("i",{staticClass:"el-icon-office-building",staticStyle:{"margin-right":"18px"}}),e._v("登陆")])])]),t("div",[t("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"100px"}},[t("el-form-item",{attrs:{label:"账号",prop:"username"}},[t("el-input",{attrs:{placeholder:"请输入账号","prefix-icon":"el-icon-lollipop"},model:{value:e.ruleForm.username,callback:function(t){e.$set(e.ruleForm,"username",e._n(t))},expression:"ruleForm.username"}})],1),t("el-form-item",{attrs:{label:"密码",prop:"password"}},[t("el-input",{attrs:{placeholder:"请输入密码","show-password":"","prefix-icon":"el-icon-ice-cream-round"},model:{value:e.ruleForm.password,callback:function(t){e.$set(e.ruleForm,"password",t)},expression:"ruleForm.password"}})],1),t("el-form-item",{attrs:{label:"用户类型",prop:"type"}},[t("el-radio-group",{model:{value:e.ruleForm.type,callback:function(t){e.$set(e.ruleForm,"type",t)},expression:"ruleForm.type"}},[t("el-radio",{attrs:{label:"student",value:"student"}},[e._v("学生")]),t("el-radio",{attrs:{label:"teacher",value:"teacher"}},[e._v("老师")])],1)],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm("ruleForm")}}},[e._v("登陆")]),t("el-button",{on:{click:function(t){return e.resetForm("ruleForm")}}},[e._v("重置")])],1)],1)],1)])],1)],1)],1)},p=[],f={data(){return{ruleForm:{username:null,password:null,type:"student"},rules:{username:[{required:!0,message:"请输入用户 id",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],type:[{required:!0,message:"请选择",trigger:"change"}]}}},methods:{submitForm(e){const t=this;this.$refs[e].validate((e=>{if(!e)return console.log("error submit!!"),!1;this.$axios.post("/login",{username:this.ruleForm.username,password:this.ruleForm.password,type:this.ruleForm.type}).then((e=>{0===e.data.code?(sessionStorage.setItem("username",this.ruleForm.username),sessionStorage.setItem("type",this.ruleForm.type),sessionStorage.setItem("name",e.data.data.name),sessionStorage.setItem("token",e.data.token),"student"==t.ruleForm.type?this.$router.push("/student/home"):"teacher"==t.ruleForm.type?this.$router.push("/teacher/home"):this.$router.push("/admin/home"),this.$message({message:e.data.message,type:"success"})):this.$message({message:e.data.message,type:"error"})}))}))},resetForm(e){this.$refs[e].resetFields()}},mounted(){this.$route.query.message&&(this.$message({message:this.$route.query.message,type:"warning"}),this.$router.push("/login"))}},h=f,g=(0,i.Z)(h,u,p,!1,null,null,null),b=g.exports;s["default"].use(c.Z);const _=[{path:"/login",name:"login",props:!0,component:b},{path:"/student",name:"student",component:a(1941).Z,redirect:"/student/home",children:[{path:"home",name:"主页",component:a(5493).Z},{path:"studentInfo",name:"信息编辑",component:a(1864).Z},{path:"course",name:"选课编辑",redirect:"/student/course/info",component:a(5371).Z,children:[{path:"info",name:"我的选课",component:a(6413).Z},{path:"select",name:"选课",component:a(6962).Z}]},{path:"grade",name:"成绩查询",component:a(2705).Z}]},{path:"/teacher",name:"teacher",component:a(3708).Z,redirect:"/teacher/home",children:[{path:"home",name:"老师主页",component:a(9215).Z},{path:"teacherInfo",name:"信息编辑",component:a(18).Z},{path:"studentManage",name:"学生管理",component:a(3677).Z},{path:"courseManage",name:"课程管理",component:a(7241).Z},{path:"gradeManage",name:"成绩管理",component:a(4460).Z}]}],v=new c.Z({mode:"hash",routes:_});var x=v;v.beforeEach(((e,t,a)=>{if(console.log(e.path),"/login"===e.path)a();else if(sessionStorage.getItem("token")&&sessionStorage.getItem("type")){sessionStorage.getItem("type");a()}else a({path:"/login"})}));var y=a(8499),w=a.n(y),k=a(4161);let S={baseURL:"http://127.0.0.1:8000",withCredentials:!0};const $=k.Z.create(S);$.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded",$.interceptors.request.use((e=>(sessionStorage.getItem("token")&&(e.headers.Authorization=`${sessionStorage.getItem("token")}`),e)),(e=>Promise.reject(e))),$.interceptors.response.use((e=>e),(e=>{if(e.response)switch(e.response.status){case 401:sessionStorage.clear(),x.push({path:"/login",query:{message:e.response.data.message}})}return Promise.reject(e.response.data)})),s["default"].config.productionTip=!1,s["default"].use(w()),s["default"].prototype.$axios=$,new s["default"]({router:x,render:e=>e(m)}).$mount("#app")}},t={};function a(s){var l=t[s];if(void 0!==l)return l.exports;var r=t[s]={id:s,loaded:!1,exports:{}};return e[s].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=e,function(){a.amdO={}}(),function(){var e=[];a.O=function(t,s,l,r){if(!s){var o=1/0;for(m=0;m=r)&&Object.keys(a.O).every((function(e){return a.O[e](s[i])}))?s.splice(i--,1):(n=!1,r0&&e[m-1][2]>r;m--)e[m]=e[m-1];e[m]=[s,l,r]}}(),function(){a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,{a:t}),t}}(),function(){a.d=function(e,t){for(var s in t)a.o(t,s)&&!a.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}}(),function(){a.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){a.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};a.O.j=function(t){return 0===e[t]};var t=function(t,s){var l,r,o=s[0],n=s[1],i=s[2],d=0;if(o.some((function(t){return 0!==e[t]}))){for(l in n)a.o(n,l)&&(a.m[l]=n[l]);if(i)var m=i(a)}for(t&&t(s);d{0===e.data.code?this.tableData=e.data.data:this.$message({message:e.data.message,type:"error"})}))},handleDelete(e,t){console.log(e,t),this.$confirm("是否退出选课?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{this.$axios.get("/course/deleteSelectCourse?sid="+t.sid+"&cid="+t.cid).then((e=>{this.$message({type:0===e.data.code?"success":"error",message:e.data.message})})),this.getSelectCourse()})).catch((()=>{this.$message({type:"info",message:"已取消删除"})}))}},mounted(){this.getSelectCourse()}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},1268:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"box-card"},[t("el-form",{ref:"form",staticClass:"demo-form-inline",attrs:{model:e.form,"label-width":"80px",inline:!0}},[t("el-form-item",{attrs:{label:"课程名称"}},[t("el-input",{model:{value:e.form.cName,callback:function(t){e.$set(e.form,"cName",t)},expression:"form.cName"}})],1),t("el-form-item",{attrs:{label:"课程类型"}},[t("el-input",{model:{value:e.form.cType,callback:function(t){e.$set(e.form,"cType",t)},expression:"form.cType"}})],1),t("el-form-item",{attrs:{label:"老师名称"}},[t("el-input",{model:{value:e.form.tName,callback:function(t){e.$set(e.form,"tName",t)},expression:"form.tName"}})],1),t("el-form-item",{attrs:{size:"large"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("查询")])],1)],1)],1),t("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"20px"}},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,border:"","show-header":"",stripe:""}},[t("el-table-column",{attrs:{fixed:"",prop:"name",label:"课程名称",width:"200"}}),t("el-table-column",{attrs:{prop:"type",label:"课程类型",width:"180"}}),t("el-table-column",{attrs:{prop:"credit",label:"课程学分",width:"150"}}),t("el-table-column",{attrs:{prop:"tid__name",label:"教师名称",width:"180"}}),t("el-table-column",{attrs:{prop:"tid__title",label:"教师职称",width:"180"}}),t("el-table-column",{attrs:{prop:"tid__dept",label:"教师院系",width:"220"}}),t("el-table-column",{attrs:{label:"操作",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-popconfirm",{attrs:{"confirm-button-text":"选择","cancel-button-text":"取消",icon:"el-icon-info",title:"确定选择该教师开设的课程?"},on:{confirm:function(t){return e.select(a.row)}}},[t("el-button",{attrs:{slot:"reference",type:"text",size:"small"},slot:"reference"},[e._v("选择")])],1)]}}])})],1),t("el-pagination",{staticStyle:{"text-align":"center"},attrs:{background:"",layout:"prev, pager, next",total:e.total,"page-size":10},on:{"current-change":e.changePage}})],1)],1)},l=[],r={data(){return{total:0,currentPage:1,form:{cName:"",tName:"",cType:""},tableData:[{}]}},methods:{getAllCourse(){this.$axios.get("/course/seacherCourse?currentPage="+this.currentPage+"&cName="+this.form.cName+"&tName="+this.form.tName+"&cType="+this.form.cType).then((e=>{0===e.data.code?this.tableData=e.data.data:this.$message({message:e.data.message,type:"error"})}))},search(){this.getAllCourse()},changePage(e){this.currentPage=e},select(e){console.log(e),e.username=sessionStorage.getItem("username"),this.$axios.post("/student/selectCourse",e).then((e=>{this.$message({message:e.data.message,type:0===e.data.code?"success":"error"})}))}},mounted(){this.getAllCourse()}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},2705:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("el-table",{ref:"filterTable",staticStyle:{width:"100%"},attrs:{data:e.tableData}},[t("el-table-column",{attrs:{prop:"cid__name",label:"课程名称",width:"220"}}),t("el-table-column",{attrs:{prop:"cid__type",label:"课程类型",width:"300"}}),t("el-table-column",{attrs:{prop:"cid__tid__name",label:"任课老师",width:"220"}}),t("el-table-column",{attrs:{prop:"cid__credit",width:"150",label:"课程学分"}}),t("el-table-column",{attrs:{prop:"middle_grade",label:"平时成绩",sortable:"",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tag",{attrs:{type:a.row.middle_grade<60?"danger":"success","disable-transitions":""}},[e._v(e._s(a.row.middle_grade))])]}}])}),t("el-table-column",{attrs:{prop:"end_grade",label:"期末成绩",sortable:"",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-tag",{attrs:{type:a.row.end_grade<60?"danger":"success","disable-transitions":""}},[e._v(e._s(a.row.end_grade))])]}}])})],1)},l=[],r={name:"grade",data(){return{tableData:[{}]}},methods:{getGrade(){this.$axios.get("/student/getGrade").then((e=>{0===e.data.code?this.tableData=e.data.data:this.$message({message:e.data.message,type:"error"})}))}},mounted(){this.getGrade()}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},5493:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("el-descriptions",{staticClass:"margin-top",attrs:{column:3,border:""}},[t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-user"}),e._v(" 学号 ")]),e._v(" "+e._s(e.sid)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-user"}),e._v(" 用户名 ")]),e._v(" "+e._s(e.username)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-mobile-phone"}),e._v(" 姓名 ")]),e._v(" "+e._s(e.name)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-location-outline"}),e._v(" 年级 ")]),e._v(" "+e._s(e.grade)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-tickets"}),e._v(" 性别 ")]),t("el-tag",{attrs:{size:"small"}},[e._v(e._s(e.sex))])],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-office-building"}),e._v(" 班级 ")]),e._v(" "+e._s(e.class_name)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-office-building"}),e._v(" 专业 ")]),e._v(" "+e._s(e.major)+" ")],2)],1)},l=[],r={name:"home",data(){return{sid:"",username:"",password:"",name:"",sex:"",grade:"",class_name:"",major:""}},mounted(){this.$axios.get("/userinfo").then((e=>{if(0===e.data.code){const t=e.data.data;this.sid=t.sid,this.username=t.username,this.name=t.name,this.sex=t.sex,this.grade=t.grade,this.class_name=t.class_name,this.major=t.major}else this.$message({message:e.data.message,type:"error"})}))}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},1941:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",[t("el-container",[t("el-header",{staticStyle:{"text-align":"right","font-size":"18px","background-color":"#409EFF","border-radius":"3px"}},[t("div",{staticStyle:{"text-align":"center",display:"inline-block","margin-right":"40%"}},[t("span",{staticStyle:{"font-size":"25px"}},[e._v("教务管理系统(学生端)")])]),t("div",{staticStyle:{display:"inline-block"}},[t("i",{staticClass:"el-icon-s-custom",staticStyle:{"margin-right":"5px"}}),t("span",{staticStyle:{"margin-right":"15px"}},[e._v(e._s(e.name))]),t("el-button",{staticStyle:{color:"#333333","font-size":"18px"},attrs:{type:"text",icon:"el-icon-switch-button"},on:{click:function(t){return e.out()}}},[e._v(" logout ")])],1)]),t("el-container",[t("el-aside",{staticStyle:{"background-color":"rgb(238, 241, 246)",height:"810px",border:"1px solid #eee"},attrs:{width:"200px"}},[t("el-menu",{attrs:{router:"","default-active":this.$route.path}},[t("el-menu-item",{attrs:{index:"/student/home"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-info"}),e._v("学生主页")])],2),t("el-menu-item",{attrs:{index:"/student/studentInfo"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-setting"}),e._v("学生编辑")])],2),t("el-menu-item",{attrs:{index:"/student/course"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-menu"}),e._v("选课管理")])],2),t("el-menu-item",{attrs:{index:"/student/grade"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-tickets"}),e._v("查询成绩")])],2)],1)],1),t("el-main",[t("router-view")],1)],1)],1)],1)},l=[],r=(a(7658),{name:"index",data(){return{name:"张三",currentTerm:"123"}},mounted(){this.name=sessionStorage.getItem("name")},methods:{out(){sessionStorage.clear(),this.$router.push({path:"/login",query:{message:"退出登录!"}})}}}),o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,"f3ce3a26",null),d=i.exports},1864:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("修改信息")])]),t("el-form",{ref:"form",attrs:{model:e.form,"label-width":"80px",size:"mini"}},[t("el-form-item",{attrs:{label:"学号"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.sid,callback:function(t){e.$set(e.form,"sid",t)},expression:"form.sid"}})],1),t("el-form-item",{attrs:{label:"账号"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.username,callback:function(t){e.$set(e.form,"username",t)},expression:"form.username"}})],1),t("el-form-item",{attrs:{label:"密码"}},[t("el-input",{attrs:{type:"password"},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1),t("el-form-item",{attrs:{label:"姓名"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),t("el-form-item",{attrs:{label:"性别"}},[t("el-radio-group",{attrs:{size:"medium",disabled:""},model:{value:e.form.sex,callback:function(t){e.$set(e.form,"sex",t)},expression:"form.sex"}},[t("el-radio",{attrs:{border:"",label:"男",icon:"el-icon-female"}}),t("el-radio",{attrs:{border:"",label:"女",icon:"el-icon-male"}})],1)],1),t("el-form-item",{attrs:{label:"班级"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.class_name,callback:function(t){e.$set(e.form,"class_name",t)},expression:"form.class_name"}})],1),t("el-form-item",{attrs:{label:"年级"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.grade,callback:function(t){e.$set(e.form,"grade",t)},expression:"form.grade"}})],1),t("el-form-item",{attrs:{label:"专业"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.major,callback:function(t){e.$set(e.form,"major",t)},expression:"form.major"}})],1),t("el-form-item",{attrs:{size:"large"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")])],1)],1)],1)},l=[],r=(a(7658),{name:"studentInfo",data(){return{form:{sid:1,username:"",password:"",name:"",sex:"男",grade:"",class_name:"",major:""}}},methods:{onSubmit(){this.$axios.post("/student/",this.form).then((e=>{0===e.data.code?(this.$message({message:e.data.message,type:"success"}),sessionStorage.clear(),this.$router.push("/login")):this.$message({message:e.data.message,type:"error"})}))}},mounted(){this.$axios("/userinfo").then((e=>{if(0===e.data.code){const t=e.data.data;this.form.sid=t.sid,this.form.username=t.username,this.form.password=t.password,this.form.name=t.name,this.form.sex=t.sex,this.form.grade=t.grade,this.form.class_name=t.class_name,this.form.major=t.major}else this.$message({message:e.data.message,type:"error"})}))}}),o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},7241:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"box-card"},[t("el-form",{ref:"form",staticClass:"demo-form-inline",attrs:{model:e.form,"label-width":"80px",size:"mini",inline:!0}},[t("el-form-item",{attrs:{label:"学生姓名"}},[t("el-input",{model:{value:e.form.sname,callback:function(t){e.$set(e.form,"sname",t)},expression:"form.sname"}})],1),t("el-form-item",{attrs:{label:"班级"}},[t("el-input",{model:{value:e.form.className,callback:function(t){e.$set(e.form,"className",t)},expression:"form.className"}})],1),t("el-form-item",{attrs:{label:"课程名称"}},[t("el-input",{model:{value:e.form.courseName,callback:function(t){e.$set(e.form,"courseName",t)},expression:"form.courseName"}})],1),t("el-form-item",{attrs:{label:"课程类型"}},[t("el-input",{model:{value:e.form.courseType,callback:function(t){e.$set(e.form,"courseType",t)},expression:"form.courseType"}})],1),t("el-form-item",{attrs:{size:"large"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("查询")])],1)],1)],1),t("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"10px"}},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[t("el-table-column",{attrs:{label:"学号",width:"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("i",{staticClass:"el-icon-time"}),t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.sid))])]}}])}),t("el-table-column",{attrs:{label:"姓名",width:"120"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.sname))])]}}])}),t("el-table-column",{attrs:{label:"班级",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.className))])]}}])}),t("el-table-column",{attrs:{label:"课程名称",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.cname))])]}}])}),t("el-table-column",{attrs:{label:"课程类型",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.ctype))])]}}])}),t("el-table-column",{attrs:{label:"平时成绩",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t("el-tag",{attrs:{size:"medium",type:a.row.middleGrade>60?"success":"error"}},[e._v(e._s(a.row.middleGrade))])],1)]}}])}),t("el-table-column",{attrs:{label:"期末成绩",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t("el-tag",{attrs:{size:"medium",type:a.row.endGrade>60?"success":"error"}},[e._v(e._s(a.row.endGrade))])],1)]}}])}),t("el-table-column",{attrs:{label:"操作",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.handleEdit(a.$index,a.row)}}},[e._v("编辑")])]}}])})],1),t("el-pagination",{staticStyle:{"text-align":"center","margin-top":"10px"},attrs:{"hide-on-single-page":"",background:"","current-page":e.currentPage,"page-size":10,layout:"prev, pager, next, total",total:e.total},on:{"current-change":e.handleCurrentChange}})],1),t("el-drawer",{ref:"drawer",attrs:{title:"录入成绩","before-close":e.handleClose,visible:e.dialog,direction:"rtl","custom-class":"demo-drawer"},on:{"update:visible":function(t){e.dialog=t}}},[t("div",{staticClass:"demo-drawer__content"},[t("el-form",{ref:"addForm",attrs:{model:e.addForm,"label-width":"80px",size:"mini"}},[t("el-form-item",{attrs:{label:"学号"}},[t("el-input",{attrs:{disabled:""},model:{value:e.addForm.sid,callback:function(t){e.$set(e.addForm,"sid",t)},expression:"addForm.sid"}})],1),t("el-form-item",{attrs:{label:"姓名"}},[t("el-input",{attrs:{disabled:""},model:{value:e.addForm.sname,callback:function(t){e.$set(e.addForm,"sname",t)},expression:"addForm.sname"}})],1),t("el-form-item",{attrs:{label:"课程名称"}},[t("el-input",{attrs:{disabled:""},model:{value:e.addForm.cname,callback:function(t){e.$set(e.addForm,"cname",t)},expression:"addForm.cname"}})],1),t("el-form-item",{attrs:{label:"平时成绩"}},[t("el-input-number",{attrs:{min:0,max:100,label:"平时成绩"},model:{value:e.addForm.middleGrade,callback:function(t){e.$set(e.addForm,"middleGrade",t)},expression:"addForm.middleGrade"}})],1),t("el-form-item",{attrs:{label:"最终成绩"}},[t("el-input-number",{attrs:{min:0,max:100,label:"最终成绩"},model:{value:e.addForm.endGrade,callback:function(t){e.$set(e.addForm,"endGrade",t)},expression:"addForm.endGrade"}})],1)],1),t("div",{staticClass:"demo-drawer__footer"},[t("el-button",{on:{click:e.cancelForm}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:function(t){return e.$refs.drawer.closeDrawer()}}},[e._v(e._s(e.loading?"提交中 ...":"保存"))])],1)],1)])],1)},l=[],r={data(){return{currentPage:1,total:0,dialog:!1,loading:!1,title:"新增学生",tableData:[{sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""}],form:{sname:"",className:"",courseName:"",courseType:""},addForm:{sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""}}},methods:{handleEdit(e,t){console.log(t),this.addForm=new Object(t),this.dialog=!0,this.isAdd=!1,this.loading=!1},handleCurrentChange(e){this.currentPage=e,this.getAllStudent()},getAllStudent(){this.$axios.post("/course/getStudentCourse?currentPage="+this.currentPage,this.form).then((e=>{console.log(e.data),0===e.data.code&&(this.total=e.data.pageTotal,this.tableData=e.data.data)}))},search(){this.getAllStudent()},handleClose(e){this.loading||(this.$confirm("确定要提交表单吗?").then((t=>{this.loading=!0,this.timer=setTimeout((()=>{e(),this.$axios.post("/course/editGrade",this.addForm).then((e=>{0===e.data.code?(this.$message({message:e.data.message,type:"success"}),this.getAllStudent(),this.loading=!1,this.addForm={sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""}):this.$message({message:e.data.message,type:"error"})}))}),1e3)})).catch((e=>{})),console.log("close"))},cancelForm(){this.loading=!1,this.dialog=!1,this.addForm={sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""},clearTimeout(this.timer)}},mounted(){this.getAllStudent()}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},4460:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"box-card"},[t("el-form",{ref:"form",staticClass:"demo-form-inline",attrs:{model:e.form,"label-width":"80px",size:"mini",inline:!0}},[t("el-form-item",{attrs:{label:"学生姓名"}},[t("el-input",{model:{value:e.form.sname,callback:function(t){e.$set(e.form,"sname",t)},expression:"form.sname"}})],1),t("el-form-item",{attrs:{label:"班级"}},[t("el-input",{model:{value:e.form.className,callback:function(t){e.$set(e.form,"className",t)},expression:"form.className"}})],1),t("el-form-item",{attrs:{label:"课程名称"}},[t("el-input",{model:{value:e.form.courseName,callback:function(t){e.$set(e.form,"courseName",t)},expression:"form.courseName"}})],1),t("el-form-item",{attrs:{label:"课程类型"}},[t("el-input",{model:{value:e.form.courseType,callback:function(t){e.$set(e.form,"courseType",t)},expression:"form.courseType"}})],1),t("el-form-item",{attrs:{size:"large"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("查询")])],1)],1)],1),t("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"10px"}},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[t("el-table-column",{attrs:{label:"学号",width:"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("i",{staticClass:"el-icon-time"}),t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.sid))])]}}])}),t("el-table-column",{attrs:{label:"姓名",width:"120"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.sname))])]}}])}),t("el-table-column",{attrs:{label:"班级",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.className))])]}}])}),t("el-table-column",{attrs:{label:"课程名称",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.cname))])]}}])}),t("el-table-column",{attrs:{label:"课程类型",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.ctype))])]}}])}),t("el-table-column",{attrs:{label:"平时成绩",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t("el-tag",{attrs:{size:"medium",type:a.row.middleGrade>60?"success":"error"}},[e._v(e._s(a.row.middleGrade))])],1)]}}])}),t("el-table-column",{attrs:{label:"期末成绩",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t("el-tag",{attrs:{size:"medium",type:a.row.endGrade>60?"success":"error"}},[e._v(e._s(a.row.endGrade))])],1)]}}])}),t("el-table-column",{attrs:{label:"操作",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.handleEdit(a.$index,a.row)}}},[e._v("编辑")])]}}])})],1),t("el-pagination",{staticStyle:{"text-align":"center","margin-top":"10px"},attrs:{"hide-on-single-page":"",background:"","current-page":e.currentPage,"page-size":10,layout:"prev, pager, next, total",total:e.total},on:{"current-change":e.handleCurrentChange}})],1),t("el-drawer",{ref:"drawer",attrs:{title:"录入成绩","before-close":e.handleClose,visible:e.dialog,direction:"rtl","custom-class":"demo-drawer"},on:{"update:visible":function(t){e.dialog=t}}},[t("div",{staticClass:"demo-drawer__content"},[t("el-form",{ref:"addForm",attrs:{model:e.addForm,"label-width":"80px",size:"mini"}},[t("el-form-item",{attrs:{label:"学号"}},[t("el-input",{attrs:{disabled:""},model:{value:e.addForm.sid,callback:function(t){e.$set(e.addForm,"sid",t)},expression:"addForm.sid"}})],1),t("el-form-item",{attrs:{label:"姓名"}},[t("el-input",{attrs:{disabled:""},model:{value:e.addForm.sname,callback:function(t){e.$set(e.addForm,"sname",t)},expression:"addForm.sname"}})],1),t("el-form-item",{attrs:{label:"课程名称"}},[t("el-input",{attrs:{disabled:""},model:{value:e.addForm.cname,callback:function(t){e.$set(e.addForm,"cname",t)},expression:"addForm.cname"}})],1),t("el-form-item",{attrs:{label:"平时成绩"}},[t("el-input-number",{attrs:{min:0,max:100,label:"平时成绩"},model:{value:e.addForm.middleGrade,callback:function(t){e.$set(e.addForm,"middleGrade",t)},expression:"addForm.middleGrade"}})],1),t("el-form-item",{attrs:{label:"最终成绩"}},[t("el-input-number",{attrs:{min:0,max:100,label:"最终成绩"},model:{value:e.addForm.endGrade,callback:function(t){e.$set(e.addForm,"endGrade",t)},expression:"addForm.endGrade"}})],1)],1),t("div",{staticClass:"demo-drawer__footer"},[t("el-button",{on:{click:e.cancelForm}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:function(t){return e.$refs.drawer.closeDrawer()}}},[e._v(e._s(e.loading?"提交中 ...":"保存"))])],1)],1)])],1)},l=[],r={data(){return{currentPage:1,total:0,dialog:!1,loading:!1,title:"新增学生",tableData:[{sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""}],form:{sname:"",className:"",courseName:"",courseType:""},addForm:{sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""}}},methods:{handleEdit(e,t){console.log(t),this.addForm=new Object(t),this.dialog=!0,this.isAdd=!1,this.loading=!1},handleCurrentChange(e){this.currentPage=e,this.getAllStudent()},getAllStudent(){this.$axios.post("/course/getStudentCourse?currentPage="+this.currentPage,this.form).then((e=>{console.log(e.data),0===e.data.code&&(this.total=e.data.pageTotal,this.tableData=e.data.data)}))},search(){this.getAllStudent()},handleClose(e){this.loading||(this.$confirm("确定要提交表单吗?").then((t=>{this.loading=!0,this.timer=setTimeout((()=>{e(),this.$axios.post("/course/editGrade",this.addForm).then((e=>{0===e.data.code?(this.$message({message:e.data.message,type:"success"}),this.getAllStudent(),this.loading=!1,this.addForm={sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""}):this.$message({message:e.data.message,type:"error"})}))}),1e3)})).catch((e=>{})),console.log("close"))},cancelForm(){this.loading=!1,this.dialog=!1,this.addForm={sid:"",sname:"",className:"",cname:"",ctype:"",endGrade:"",middleGrade:"",cid:""},clearTimeout(this.timer)}},mounted(){this.getAllStudent()}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},9215:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("el-descriptions",{staticClass:"margin-top",attrs:{column:3,border:""}},[t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-user"}),e._v(" 编号 ")]),e._v(" "+e._s(e.info.tid)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-user"}),e._v(" 用户名 ")]),e._v(" "+e._s(e.info.username)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-mobile-phone"}),e._v(" 姓名 ")]),e._v(" "+e._s(e.info.name)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-location-outline"}),e._v(" 职称 ")]),e._v(" "+e._s(e.info.title)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-tickets"}),e._v(" 性别 ")]),t("el-tag",{attrs:{size:"small"}},[e._v(e._s(e.info.sex))])],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-office-building"}),e._v(" 学历 ")]),e._v(" "+e._s(e.info.education)+" ")],2),t("el-descriptions-item",[t("template",{slot:"label"},[t("i",{staticClass:"el-icon-office-building"}),e._v(" 院系 ")]),e._v(" "+e._s(e.info.dept)+" ")],2)],1)},l=[],r={name:"home",data(){return{info:{tid:"",username:"",password:"",name:"",sex:"",title:"",education:"",dept:""}}},mounted(){this.$axios("/userinfo?username="+sessionStorage.getItem("username")+"&type="+sessionStorage.getItem("type")).then((e=>{0===e.data.code?this.info=e.data.data:this.$message({message:e.data.message,type:"error"})}))}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},3708:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",[t("el-container",[t("el-header",{staticStyle:{"text-align":"right","font-size":"18px","background-color":"#409EFF","border-radius":"3px"}},[t("div",{staticStyle:{"text-align":"center",display:"inline-block","margin-right":"40%"}},[t("span",{staticStyle:{"font-size":"25px"}},[e._v("教务管理系统(老师端)")])]),t("div",{staticStyle:{display:"inline-block"}},[t("i",{staticClass:"el-icon-s-custom",staticStyle:{"margin-right":"5px"}}),t("span",{staticStyle:{"margin-right":"15px"}},[e._v(e._s(e.name))]),t("el-button",{staticStyle:{color:"#333333","font-size":"18px"},attrs:{type:"text",icon:"el-icon-switch-button"},on:{click:function(t){return e.out()}}},[e._v(" logout ")])],1)]),t("el-container",[t("el-aside",{staticStyle:{"background-color":"rgb(238, 241, 246)",height:"810px",border:"1px solid #eee"},attrs:{width:"200px"}},[t("el-menu",{attrs:{router:"","default-active":this.$route.path}},[t("el-menu-item",{attrs:{index:"/teacher/home"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-info"}),e._v("老师主页")])],2),t("el-menu-item",{attrs:{index:"/teacher/teacherInfo"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-setting"}),e._v("信息编辑")])],2),t("el-menu-item",{attrs:{index:"/teacher/studentManage"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-menu"}),e._v("学生管理")])],2),t("el-menu-item",{attrs:{index:"/teacher/gradeManage"}},[t("template",{slot:"title"},[t("i",{staticClass:"el-icon-tickets"}),e._v("成绩管理")])],2)],1)],1),t("el-main",[t("router-view")],1)],1)],1)],1)},l=[],r=(a(7658),{name:"index",data(){return{name:"张三",currentTerm:"123"}},mounted(){this.name=sessionStorage.getItem("name")},methods:{out(){sessionStorage.clear(),this.$router.push("/login")}}}),o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,"67fd8d7d",null),d=i.exports},3677:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"box-card"},[t("el-form",{ref:"form",staticClass:"demo-form-inline",attrs:{model:e.form,"label-width":"80px",size:"mini",inline:!0}},[t("el-form-item",{attrs:{label:"学号"}},[t("el-input",{model:{value:e.form.sid,callback:function(t){e.$set(e.form,"sid",t)},expression:"form.sid"}})],1),t("el-form-item",{attrs:{label:"姓名"}},[t("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),t("el-form-item",{attrs:{label:"性别"}},[t("el-radio-group",{attrs:{size:"medium"},model:{value:e.form.sex,callback:function(t){e.$set(e.form,"sex",t)},expression:"form.sex"}},[t("el-radio",{attrs:{border:"",label:"男",icon:"el-icon-female"}}),t("el-radio",{attrs:{border:"",label:"女",icon:"el-icon-male"}}),t("el-radio",{attrs:{border:"",label:"",icon:"el-icon-male"}},[e._v("无")])],1)],1),t("el-form-item",{attrs:{label:"班级"}},[t("el-input",{model:{value:e.form.class_name,callback:function(t){e.$set(e.form,"class_name",t)},expression:"form.class_name"}})],1),t("el-form-item",{attrs:{label:"年级"}},[t("el-input",{model:{value:e.form.grade,callback:function(t){e.$set(e.form,"grade",t)},expression:"form.grade"}})],1),t("el-form-item",{attrs:{label:"专业"}},[t("el-input",{model:{value:e.form.major,callback:function(t){e.$set(e.form,"major",t)},expression:"form.major"}})],1),t("el-form-item",{attrs:{size:"large"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("查询")])],1),t("el-form-item",{attrs:{size:"large"}},[t("el-button",{attrs:{type:"primary",icon:"el-icon-plus"},on:{click:function(t){e.dialog=!e.dialog,e.isAdd=!0}}},[e._v("新增学生")])],1)],1)],1),t("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"10px"}},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[t("el-table-column",{attrs:{label:"学号",width:"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("i",{staticClass:"el-icon-time"}),t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.pk))])]}}])}),t("el-table-column",{attrs:{label:"姓名",width:"120"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.fields.name))])]}}])}),t("el-table-column",{attrs:{label:"用户名",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.fields.username))])]}}])}),t("el-table-column",{attrs:{label:"密码",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.fields.password))])]}}])}),t("el-table-column",{attrs:{label:"性别",width:"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.fields.sex))])]}}])}),t("el-table-column",{attrs:{label:"年级",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.fields.grade))])]}}])}),t("el-table-column",{attrs:{label:"班级",width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.fields.class_name))])]}}])}),t("el-table-column",{attrs:{label:"专业",width:"180"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(a.row.fields.major))])]}}])}),t("el-table-column",{attrs:{label:"操作",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.handleEdit(a.$index,a.row)}}},[e._v("编辑")]),t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e.handleDelete(a.$index,a.row)}}},[e._v("删除")])]}}])})],1),t("el-pagination",{staticStyle:{"text-align":"center","margin-top":"10px"},attrs:{"hide-on-single-page":"",background:"","current-page":e.currentPage,"page-size":10,layout:"prev, pager, next, total",total:e.total},on:{"current-change":e.handleCurrentChange}})],1),t("el-drawer",{ref:"drawer",attrs:{title:e.isAdd?"新增":"编辑","before-close":e.handleClose,visible:e.dialog,direction:"rtl","custom-class":"demo-drawer"},on:{"update:visible":function(t){e.dialog=t}}},[t("div",{staticClass:"demo-drawer__content"},[t("el-form",{ref:"addForm",attrs:{model:e.addForm,"label-width":"80px",size:"mini"}},[t("el-form-item",{attrs:{label:"学号"}},[t("el-input",{attrs:{disabled:""},model:{value:e.addForm.sid,callback:function(t){e.$set(e.addForm,"sid",t)},expression:"addForm.sid"}})],1),t("el-form-item",{attrs:{label:"账号"}},[t("el-input",{model:{value:e.addForm.username,callback:function(t){e.$set(e.addForm,"username",t)},expression:"addForm.username"}})],1),t("el-form-item",{attrs:{label:"密码"}},[t("el-input",{attrs:{type:"password"},model:{value:e.addForm.password,callback:function(t){e.$set(e.addForm,"password",t)},expression:"addForm.password"}})],1),t("el-form-item",{attrs:{label:"姓名"}},[t("el-input",{model:{value:e.addForm.name,callback:function(t){e.$set(e.addForm,"name",t)},expression:"addForm.name"}})],1),t("el-form-item",{attrs:{label:"性别"}},[t("el-radio-group",{attrs:{size:"medium"},model:{value:e.addForm.sex,callback:function(t){e.$set(e.addForm,"sex",t)},expression:"addForm.sex"}},[t("el-radio",{attrs:{border:"",label:"男",icon:"el-icon-female"}}),t("el-radio",{attrs:{border:"",label:"女",icon:"el-icon-male"}})],1)],1),t("el-form-item",{attrs:{label:"班级"}},[t("el-input",{model:{value:e.addForm.class_name,callback:function(t){e.$set(e.addForm,"class_name",t)},expression:"addForm.class_name"}})],1),t("el-form-item",{attrs:{label:"年级"}},[t("el-input",{model:{value:e.addForm.grade,callback:function(t){e.$set(e.addForm,"grade",t)},expression:"addForm.grade"}})],1),t("el-form-item",{attrs:{label:"专业"}},[t("el-input",{model:{value:e.addForm.major,callback:function(t){e.$set(e.addForm,"major",t)},expression:"addForm.major"}})],1)],1),t("div",{staticClass:"demo-drawer__footer"},[t("el-button",{on:{click:e.cancelForm}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:function(t){return e.$refs.drawer.closeDrawer()}}},[e._v(e._s(e.loading?"提交中 ...":"保存"))])],1)],1)])],1)},l=[],r={data(){return{currentPage:1,total:0,isAdd:!0,dialog:!1,loading:!1,title:"新增学生",tableData:[{sid:"",username:"",password:"",name:"",sex:"",grade:"",class_name:"",major:""}],form:{sid:"",name:"",sex:"",grade:"",class_name:"",major:""},addForm:{sid:"",username:"",password:"",name:"",sex:"男",grade:"",class_name:"",major:""}}},methods:{handleEdit(e,t){console.log(t),this.addForm=new Object(t.fields),this.addForm.sid=t.pk,this.dialog=!0,this.isAdd=!1},handleDelete(e,t){this.$confirm("此操作将永久删除该学生, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{this.$axios.get("/student/delete?sid="+t.pk).then((e=>{0===e.data.code?(this.$message({type:"success",message:e.data.message}),this.getAllStudent()):this.$message({type:"error",message:e.data.message})}))})).catch((()=>{this.$message({type:"info",message:"已取消删除"})}))},handleCurrentChange(e){this.currentPage=e,this.getAllStudent()},getAllStudent(){this.$axios.post("/student/search?currentPage="+this.currentPage+"&pageSize=10",this.form).then((e=>{0===e.data.code&&(this.total=e.data.pageTotal,this.tableData=e.data.data)}))},search(){this.getAllStudent()},handleClose(e){this.loading||(this.$confirm("确定要提交表单吗?").then((t=>{this.loading=!0,this.timer=setTimeout((()=>{e(),this.$axios.post(""===this.addForm.sid?"/student/add":"/student/",this.addForm).then((e=>{0===e.data.code?(this.$message({message:e.data.message,type:"sucess"}),this.getAllStudent(),this.loading=!1,this.addForm={sid:"",username:"",password:"",name:"",sex:"男",grade:"",class_name:"",major:""}):this.$message({message:e.data.message,type:"error"})}))}),1e3)})).catch((e=>{})),console.log("close"))},cancelForm(){this.loading=!1,this.dialog=!1,this.addForm={sid:"",username:"",password:"",name:"",sex:"男",grade:"",class_name:"",major:""},clearTimeout(this.timer)}},mounted(){this.getAllStudent()}},o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},18:function(e,t,a){a.d(t,{Z:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("修改信息")])]),t("el-form",{ref:"form",attrs:{model:e.form,"label-width":"80px",size:"mini"}},[t("el-form-item",{attrs:{label:"编号"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.tid,callback:function(t){e.$set(e.form,"tid",t)},expression:"form.tid"}})],1),t("el-form-item",{attrs:{label:"账号"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.username,callback:function(t){e.$set(e.form,"username",t)},expression:"form.username"}})],1),t("el-form-item",{attrs:{label:"密码"}},[t("el-input",{attrs:{type:"password"},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1),t("el-form-item",{attrs:{label:"姓名"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),t("el-form-item",{attrs:{label:"性别"}},[t("el-radio-group",{attrs:{size:"medium",disabled:""},model:{value:e.form.sex,callback:function(t){e.$set(e.form,"sex",t)},expression:"form.sex"}},[t("el-radio",{attrs:{border:"",label:"男",icon:"el-icon-female"}}),t("el-radio",{attrs:{border:"",label:"女",icon:"el-icon-male"}})],1)],1),t("el-form-item",{attrs:{label:"职称"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.title,callback:function(t){e.$set(e.form,"title",t)},expression:"form.title"}})],1),t("el-form-item",{attrs:{label:"学历"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.education,callback:function(t){e.$set(e.form,"education",t)},expression:"form.education"}})],1),t("el-form-item",{attrs:{label:"院系"}},[t("el-input",{attrs:{disabled:""},model:{value:e.form.dept,callback:function(t){e.$set(e.form,"dept",t)},expression:"form.dept"}})],1),t("el-form-item",{attrs:{size:"large"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")])],1)],1)],1)},l=[],r=(a(7658),{name:"studentInfo",data(){return{form:{tid:"",username:"",password:"",name:"",sex:"",title:"",education:"",dept:""}}},methods:{onSubmit(){this.$axios.post("/teacher/",this.form).then((e=>{0===e.data.code?(this.$message({message:e.data.message,type:"success"}),sessionStorage.clear(),this.$router.push("/login")):this.$message({message:e.data.message,type:"error"})}))}},mounted(){this.$axios("/userinfo?username="+sessionStorage.getItem("username")+"&type="+sessionStorage.getItem("type")).then((e=>{0===e.data.code?this.form=e.data.data:this.$message({message:e.data.message,type:"error"})}))}}),o=r,n=a(1001),i=(0,n.Z)(o,s,l,!1,null,null,null),d=i.exports},413:function(e,t,a){a(7658);var s=a(6369),l=function(){var e=this,t=e._self._c;return t("router-view")},r=[],o={name:"App",components:{}},n=o,i=a(1001),d=(0,i.Z)(n,l,r,!1,null,null,null),m=d.exports,c=a(2631),u=function(){var e=this,t=e._self._c;return t("div",[t("el-container",[t("el-header",[t("div",{staticStyle:{"text-align":"center","font-size":"25px","font-weight":"bolder"}},[t("i",{staticClass:"el-icon-s-home",staticStyle:{"margin-right":"25px"}}),e._v(" 教务管理系统 ")])]),t("el-main",[t("el-card",{staticClass:"login-module",attrs:{shadow:"hover"}},[t("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[t("span",{staticStyle:{"text-align":"center","font-size":"20px","font-family":"'Microsoft YaHei'"}},[t("p",[t("i",{staticClass:"el-icon-office-building",staticStyle:{"margin-right":"18px"}}),e._v("登陆")])])]),t("div",[t("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"100px"}},[t("el-form-item",{attrs:{label:"账号",prop:"username"}},[t("el-input",{attrs:{placeholder:"请输入账号","prefix-icon":"el-icon-lollipop"},model:{value:e.ruleForm.username,callback:function(t){e.$set(e.ruleForm,"username",e._n(t))},expression:"ruleForm.username"}})],1),t("el-form-item",{attrs:{label:"密码",prop:"password"}},[t("el-input",{attrs:{placeholder:"请输入密码","show-password":"","prefix-icon":"el-icon-ice-cream-round"},model:{value:e.ruleForm.password,callback:function(t){e.$set(e.ruleForm,"password",t)},expression:"ruleForm.password"}})],1),t("el-form-item",{attrs:{label:"用户类型",prop:"type"}},[t("el-radio-group",{model:{value:e.ruleForm.type,callback:function(t){e.$set(e.ruleForm,"type",t)},expression:"ruleForm.type"}},[t("el-radio",{attrs:{label:"student",value:"student"}},[e._v("学生")]),t("el-radio",{attrs:{label:"teacher",value:"teacher"}},[e._v("老师")])],1)],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm("ruleForm")}}},[e._v("登陆")]),t("el-button",{on:{click:function(t){return e.resetForm("ruleForm")}}},[e._v("重置")])],1)],1)],1)])],1)],1)],1)},p=[],f={data(){return{ruleForm:{username:null,password:null,type:"student"},rules:{username:[{required:!0,message:"请输入用户 id",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],type:[{required:!0,message:"请选择",trigger:"change"}]}}},methods:{submitForm(e){const t=this;this.$refs[e].validate((e=>{if(!e)return console.log("error submit!!"),!1;this.$axios.post("/login",{username:this.ruleForm.username,password:this.ruleForm.password,type:this.ruleForm.type}).then((e=>{0===e.data.code?(sessionStorage.setItem("username",this.ruleForm.username),sessionStorage.setItem("type",this.ruleForm.type),sessionStorage.setItem("name",e.data.data.name),sessionStorage.setItem("token",e.data.token),"student"==t.ruleForm.type?this.$router.push("/student/home"):"teacher"==t.ruleForm.type?this.$router.push("/teacher/home"):this.$router.push("/admin/home"),this.$message({message:e.data.message,type:"success"})):this.$message({message:e.data.message,type:"error"})}))}))},resetForm(e){this.$refs[e].resetFields()}},mounted(){this.$route.query.message&&(this.$message({message:this.$route.query.message,type:"warning"}),this.$router.push("/login"))}},h=f,g=(0,i.Z)(h,u,p,!1,null,null,null),b=g.exports;s["default"].use(c.Z);const _=[{path:"/login",name:"login",props:!0,component:b},{path:"/student",name:"student",component:a(1941).Z,redirect:"/student/home",children:[{path:"home",name:"主页",component:a(5493).Z},{path:"studentInfo",name:"信息编辑",component:a(1864).Z},{path:"course",name:"选课编辑",redirect:"/student/course/info",component:a(5371).Z,children:[{path:"info",name:"我的选课",component:a(6413).Z},{path:"select",name:"选课",component:a(1268).Z}]},{path:"grade",name:"成绩查询",component:a(2705).Z}]},{path:"/teacher",name:"teacher",component:a(3708).Z,redirect:"/teacher/home",children:[{path:"home",name:"老师主页",component:a(9215).Z},{path:"teacherInfo",name:"信息编辑",component:a(18).Z},{path:"studentManage",name:"学生管理",component:a(3677).Z},{path:"courseManage",name:"课程管理",component:a(7241).Z},{path:"gradeManage",name:"成绩管理",component:a(4460).Z}]}],v=new c.Z({mode:"hash",routes:_});var x=v;v.beforeEach(((e,t,a)=>{if(console.log(e.path),"/login"===e.path)a();else if(sessionStorage.getItem("token")&&sessionStorage.getItem("type")){sessionStorage.getItem("type");a()}else a({path:"/login"})}));var y=a(8499),w=a.n(y),k=a(4161);let S={baseURL:"http://127.0.0.1:8000",withCredentials:!0};const $=k.Z.create(S);$.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded",$.interceptors.request.use((e=>(sessionStorage.getItem("token")&&(e.headers.Authorization=`${sessionStorage.getItem("token")}`),e)),(e=>Promise.reject(e))),$.interceptors.response.use((e=>e),(e=>{if(e.response)switch(e.response.status){case 401:sessionStorage.clear(),x.push({path:"/login",query:{message:e.response.data.message}})}return Promise.reject(e.response.data)})),s["default"].config.productionTip=!1,s["default"].use(w()),s["default"].prototype.$axios=$,new s["default"]({router:x,render:e=>e(m)}).$mount("#app")}},t={};function a(s){var l=t[s];if(void 0!==l)return l.exports;var r=t[s]={id:s,loaded:!1,exports:{}};return e[s].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=e,function(){a.amdO={}}(),function(){var e=[];a.O=function(t,s,l,r){if(!s){var o=1/0;for(m=0;m=r)&&Object.keys(a.O).every((function(e){return a.O[e](s[i])}))?s.splice(i--,1):(n=!1,r0&&e[m-1][2]>r;m--)e[m]=e[m-1];e[m]=[s,l,r]}}(),function(){a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,{a:t}),t}}(),function(){a.d=function(e,t){for(var s in t)a.o(t,s)&&!a.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}}(),function(){a.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){a.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};a.O.j=function(t){return 0===e[t]};var t=function(t,s){var l,r,o=s[0],n=s[1],i=s[2],d=0;if(o.some((function(t){return 0!==e[t]}))){for(l in n)a.o(n,l)&&(a.m[l]=n[l]);if(i)var m=i(a)}for(t&&t(s);d