text: webpackJsonp([17],{BrMi:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={inject:["reload"],data:function(){return{infoInput:{name:"",number:"",password:"",college:"",class:""},activeIndex:"2",labelPosition:"right",trainInfo:{train:"是",cloths:"",shoes:"",reason:""},cloths:[{value:"165CM-170CM",label:"165CM-170CM"},{value:"170CM-175CM",label:"170CM-175CM"},{value:"175CM-180CM",label:"175CM-180CM"},{value:"180CM-185CM",label:"180CM-185CM"},{value:"其他情况请联系辅导员",label:"其他情况请联系辅导员"}],shoes:[{value:"选项1",label:"鞋码：36码"},{value:"选项2",label:"鞋码：38码"},{value:"选项3",label:"鞋码：40码"},{value:"选项4",label:"鞋码：42码"},{value:"选项5",label:"其他情况请联系辅导员"}],reason:[{value:"身体原因（需三甲医院开具证明）",label:"身体原因（需三甲医院开具证明）"},{value:"退役兵（需申请免修）",label:"退役兵（需申请免修）"},{value:"其他原因(请直接向辅导员申请)",label:"其他原因(请直接向辅导员申请)"}],train_yes:!0,train_no:!1,rules:{number:[{required:!0,message:"请输入学生学号",trigger:"blur"},{min:9,max:10,message:"请输入完整学号",trigger:"blur"}],name:[{required:!0,message:"请输入姓名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],college:[{required:!0,message:"请输入学院",trigger:"blur"}],class:[{required:!0,message:"请输入班级",trigger:"blur"}],cloths:[{required:!0,message:"请选择衣服尺码",trigger:"blur"}],shoes:[{required:!0,message:"请输入鞋子尺码",trigger:"blur"}]},disabled:0}},methods:{train:function(){"是"==this.trainInfo.train?(this.train_yes=!0,this.train_no=!1):(this.train_yes=!1,this.train_no=!0)},stuInfo:function(e){var t=this;this.$refs[e].validate(function(e){if(e){var n=t.infoInput.number,a=t.infoInput.password;t.$http.post("/api/user/stuList",{number:n,begin:0,end:500}).then(function(e){0==e.data.length?t.$message({message:"没有该生信息，请联系辅导员",type:"warning"}):e.data.length>1?t.$message({message:"请输入完整的学号",type:"warning"}):e.data[0].password!=a?t.$message({message:"密码错误，请重新输入！",type:"warning"}):(t.infoInput.password="",t.disabled=1,t.infoInput.name=e.data[0].name,t.infoInput.college=e.data[0].college,t.infoInput.class=e.data[0].class,t.trainInfo.train=e.data[0].train,t.trainInfo.cloths=e.data[0].cloths,t.train(),t.trainInfo.shoes=e.data[0].shoes,t.trainInfo.reason=e.data[0].reason)})}})},stuInfoChange:function(){var e=this,t=this.infoInput.number,n=this.infoInput.name,a=this.infoInput.college,s=this.infoInput.class,l=this.trainInfo.train,o=this.trainInfo.cloths,r=this.trainInfo.shoes,i=this.trainInfo.reason;""==n||""==a|""==s||""==l||""==o||""==r?this.$message({message:"内容输入不能为空",type:"warning"}):this.$confirm("是否提交修改，该过程不可撤销","警告提示",{confirmButtonText:"确定修改",cancelButtonText:"取消修改",type:"warning"}).then(function(){e.$http.post("/api/user/stuInfoUpdate",{number:t,name:n,college:a,class:s,train:l,cloths:o,shoes:r,reason:i},{}).then(function(t){console.log(t),t?(e.$message({message:"修改成功",type:"info"}),e.reload()):e.$message({message:"修改失败",type:"warning"})})}).catch(function(){})},reset:function(){this.infoInput.number="",this.infoInput.password="",this.disabled=0,this.infoInput.name="",this.infoInput.college="",this.infoInput.class="",this.trainInfo.train="",this.trainInfo.cloths="",this.trainInfo.shoes="",this.trainInfo.reason=""}}},s={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"home"},[n("div",{staticClass:"container"},[n("div",{staticClass:"stuInfo"},[n("el-form",{ref:"infoInput",attrs:{model:e.infoInput,inline:"",rules:e.rules}},[n("el-form-item",{attrs:{label:"学号",prop:"number"}},[n("el-input",{attrs:{placeholder:""},model:{value:e.infoInput.number,callback:function(t){e.$set(e.infoInput,"number",t)},expression:"infoInput.number"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"密码",prop:"password"}},[n("el-input",{attrs:{type:"password",disabled:e.disabled,placeholder:""},model:{value:e.infoInput.password,callback:function(t){e.$set(e.infoInput,"password",t)},expression:"infoInput.password"}})],1),e._v(" "),n("el-button",{staticStyle:{"margin-top":"5px"},attrs:{type:"primary",size:"small"},on:{click:function(t){e.stuInfo("infoInput")}}},[e._v("查询")])],1),e._v(" "),n("el-form",{ref:"infoInput",attrs:{model:e.infoInput,inline:""}},[n("el-form-item",{attrs:{label:"姓名",prop:"name"}},[n("el-input",{attrs:{placeholder:""},model:{value:e.infoInput.name,callback:function(t){e.$set(e.infoInput,"name",t)},expression:"infoInput.name"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"学院",prop:"college"}},[n("el-input",{attrs:{placeholder:""},model:{value:e.infoInput.college,callback:function(t){e.$set(e.infoInput,"college",t)},expression:"infoInput.college"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"班级",prop:"class"}},[n("el-input",{attrs:{placeholder:""},model:{value:e.infoInput.class,callback:function(t){e.$set(e.infoInput,"class",t)},expression:"infoInput.class"}})],1)],1)],1),e._v(" "),n("div",{staticClass:"trainInfo"},[n("el-form",{ref:"trainInfo",attrs:{model:e.trainInfo}},[n("el-form-item",{attrs:{label:"参加军训"}},[n("el-radio-group",{on:{change:function(t){e.train()}},model:{value:e.trainInfo.train,callback:function(t){e.$set(e.trainInfo,"train",t)},expression:"trainInfo.train"}},[n("el-radio",{attrs:{label:"是"}}),e._v(" "),n("el-radio",{attrs:{label:"否"}})],1)],1)],1),e._v(" "),n("el-form",{directives:[{name:"show",rawName:"v-show",value:e.train_yes,expression:"train_yes"}],attrs:{model:e.trainInfo,inline:""}},[n("el-form-item",{attrs:{label:"军训服"}},[n("el-select",{attrs:{placeholder:" 请选择衣服尺寸（套装）"},model:{value:e.trainInfo.cloths,callback:function(t){e.$set(e.trainInfo,"cloths",t)},expression:"trainInfo.cloths"}},e._l(e.cloths,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),n("el-form",{directives:[{name:"show",rawName:"v-show",value:e.train_yes,expression:"train_yes"}],attrs:{model:e.trainInfo}},[n("el-form-item",{attrs:{label:"军训鞋"}},[n("el-select",{attrs:{placeholder:" 请选择鞋子码数"},model:{value:e.trainInfo.shoes,callback:function(t){e.$set(e.trainInfo,"shoes",t)},expression:"trainInfo.shoes"}},e._l(e.shoes,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),n("el-form",{directives:[{name:"show",rawName:"v-show",value:e.train_no,expression:"train_no"}],attrs:{model:e.trainInfo,inline:""}},[n("el-form-item",{attrs:{label:"具体原因"}},[n("el-select",{attrs:{placeholder:"请选择原因...  "},model:{value:e.trainInfo.reason,callback:function(t){e.$set(e.trainInfo,"reason",t)},expression:"trainInfo.reason"}},e._l(e.reason,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),n("el-form",{attrs:{model:e.reason,inline:""}},[n("el-button",{attrs:{type:"primary"},on:{click:function(t){e.stuInfoChange("infoInput","trainInfo")}}},[e._v("修改")]),e._v(" "),n("el-button",{attrs:{type:"danger"},on:{click:function(t){e.reset()}}},[e._v("清空")])],1)],1)])])},staticRenderFns:[]};var l=n("VU/8")(a,s,!1,function(e){n("OaEb")},null,null);t.default=l.exports},OaEb:function(e,t){}});
  //# sourceMappingURL=17.7a08d13eb4b05b13e818.js.map