chunk-0b1e0316.24527263.js 24 KB

123456
  1. /*!
  2. * build: Hopaheal
  3. * copyright: Mead
  4. * time: 2022-6-7 11:38:49
  5. */
  6. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0b1e0316"],{"065b":function(e,t,r){},"0939":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"role-management-container"},[a("vab-query-form",[a("vab-query-form-left-panel",{attrs:{span:8}},[a("el-button",{attrs:{icon:"el-icon-plus",type:"primary"},on:{click:e.handleEdit}},[e._v(" 添加 ")]),a("el-button",{attrs:{icon:"el-icon-delete",type:"danger"},on:{click:e.handleDelete}},[e._v(" 批量删除 ")]),a("el-button",{attrs:{icon:"el-icon-upload2",type:"success"},on:{click:function(t){e.importVisible=!0}}},[e._v(" 批量导入 ")])],1),a("vab-query-form-right-panel",{attrs:{span:16}},[a("el-form",{attrs:{inline:!0,model:e.queryForm},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-form-item",[a("el-input",{staticStyle:{width:"160px"},attrs:{clearable:"",placeholder:"请输入姓名"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.queryData.apply(null,arguments)}},model:{value:e.queryForm.truename,callback:function(t){e.$set(e.queryForm,"truename","string"===typeof t?t.trim():t)},expression:"queryForm.truename"}})],1),a("el-form-item",[a("el-input",{staticStyle:{width:"160px","margin-right":"10px"},attrs:{clearable:"",placeholder:"请输入工号"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.queryData.apply(null,arguments)}},model:{value:e.queryForm.account,callback:function(t){e.$set(e.queryForm,"account","string"===typeof t?t.trim():t)},expression:"queryForm.account"}})],1),a("el-form-item",{staticClass:"history",attrs:{label:""}},[a("el-select",{staticStyle:{width:"160px","margin-right":"10px"},attrs:{clearable:"",placeholder:"请选择状态"},model:{value:e.queryForm.status,callback:function(t){e.$set(e.queryForm,"status",t)},expression:"queryForm.status"}},e._l(e.t_status,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),a("el-form-item",[a("el-button",{attrs:{icon:"el-icon-search",type:"primary"},on:{click:e.queryData}},[e._v(" 查询 ")])],1)],1)],1)],1),a("el-dialog",{attrs:{"before-close":e.handleClose,center:"",title:"导入导师信息",visible:e.importVisible,width:"50%"},on:{"update:visible":function(t){e.importVisible=t}}},[a("el-upload",{staticClass:"upload-demo",attrs:{accept:".xls,.xlsx",action:e.action,data:e.uploadData,"file-list":e.fileList,multiple:"","on-error":e.uploadError,"on-success":e.uploadSuccess}},[a("el-button",{staticClass:"btn-import",attrs:{slot:"trigger",size:"mini",type:"primary"},slot:"trigger"},[e._v(" 选择excel ")]),a("a",{staticClass:"btn-template",attrs:{download:"学业导师导入模板",href:e.modelUrl}},[e._v(" 点击下载模板 ")])],1),a("div",{staticClass:"model"},[a("div",{staticClass:"import-msg"},[a("p",{staticStyle:{"margin-bottom":"5px"}},[e._v("注意:")]),a("p",[e._v("1.请严格按照模板中提供的数据案例格式进行填写;")]),a("p",[e._v(" 2.其中姓名、教工号、手机号必须填写,教工号不能重复,否则数据不能导入; ")])])]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancelImport}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.batchImport}},[e._v("确 定")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{border:"",data:e.list},on:{"selection-change":e.setSelectRows},scopedSlots:e._u([{key:"empty",fn:function(){return[a("el-image",{staticClass:"vab-data-empty",attrs:{src:r("f1f0")}})]},proxy:!0}])},[a("el-table-column",{attrs:{"show-overflow-tooltip":"",type:"selection"}}),a("el-table-column",{attrs:{align:"center",label:"序号",sortable:"",type:"index",width:"60"}}),a("el-table-column",{attrs:{align:"center",label:"头像"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("el-image",{attrs:{"preview-src-list":e.imageList,src:r.headimg}})]}}])}),a("el-table-column",{attrs:{align:"center",label:"工号","min-width":"130",prop:"account","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{align:"center",label:"姓名","min-width":"130",prop:"truename","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{align:"center",label:"性别","min-width":"80",prop:"sex","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[0==r.sex?a("div",[e._v("未知")]):e._e(),1==r.sex?a("div",[e._v("男")]):e._e(),2==r.sex?a("div",[e._v("女")]):e._e()]}}])}),a("el-table-column",{attrs:{align:"center",label:"手机号","min-width":"130",prop:"mobile","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{align:"center",label:"毕业院校","min-width":"130",prop:"school","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{align:"center",label:"学科","min-width":"130",prop:"subject","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{align:"center",label:"预约状态","min-width":"130",prop:"max_student_nums","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[e._v(" "+e._s(r.student_nums)+"/"+e._s(r.max_student_nums)+" ")]}}])}),a("el-table-column",{attrs:{align:"center",label:"最大学生数","min-width":"130",prop:"max_student_nums","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{align:"center",label:"担任课程","min-width":"130",prop:"class","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{align:"center",label:"状态","min-width":"130",prop:"status","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[1==r.status?a("el-tag",[e._v("正常")]):e._e(),0==r.status?a("el-tag",{attrs:{type:"danger"}},[e._v("暂停")]):e._e()]}}])}),a("el-table-column",{attrs:{align:"center",fixed:"right",label:"操作","show-overflow-tooltip":"",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.handleDetail(r)}}},[e._v("详情")]),a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")]),e.open?a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.handlePing(r)}}},[e._v(" 评价 ")]):e._e(),a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.handleLeaving(r)}}},[e._v(" 查看留言 ")])]}}])})],1),a("el-dialog",{attrs:{"before-close":e.handleClose1,center:"",title:"",visible:e.detail_visable,width:"50%"},on:{"update:visible":function(t){e.detail_visable=t}}},[a("div",{staticClass:"detail_wrap"},[a("div",{staticClass:"top"},[a("div",{staticClass:"img clearfix"},[a("img",{attrs:{alt:"",src:e.d_list.headimg}})]),a("div",{staticClass:"list clearfix"},[a("span",[e._v("工号:"+e._s(e.d_list.account))]),a("span",[e._v("姓名:"+e._s(e.d_list.truename))]),a("span",[e._v("手机号:"+e._s(e.d_list.mobile))]),a("span",[e._v("毕业院校:"+e._s(e.d_list.school))]),a("span",[e._v("学科:"+e._s(e.d_list.subject))]),a("span",[e._v("担任课程:"+e._s(e.d_list.class))])])]),a("div",{staticClass:"bottom"},[a("div",{staticClass:"b_wrap"},[a("span"),a("div",[e._v("研究方向")]),a("span")]),a("div",{staticClass:"content"},[e._v(e._s(e.d_list.direction))])]),a("div",{staticClass:"bottom"},[a("div",{staticClass:"b_wrap"},[a("span"),a("div",[e._v("承担项目")]),a("span")]),a("div",{staticClass:"content"},[e._v(e._s(e.d_list.project))])]),a("div",{staticClass:"bottom"},[a("div",{staticClass:"b_wrap"},[a("span"),a("div",[e._v("代表成果")]),a("span")]),a("div",{staticClass:"content"},[e._v(e._s(e.d_list.results))])])]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.detail_visable=!1}}},[e._v(" 确 定 ")])],1)]),a("el-pagination",{attrs:{background:"","current-page":e.queryForm.page,layout:e.layout,"page-size":e.queryForm.per_page,"page-sizes":[15,20,30,40,50,100],total:e.queryForm.total},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}}),a("edit",{ref:"edit",attrs:{"type-date":e.typeDate},on:{"fetch-data":e.fetchData}})],1)},s=[],o=r("1da1"),n=r("5530"),i=(r("d3b7"),r("159b"),r("ac1f"),r("466d"),r("3ca3"),r("ddb0"),r("2b3d"),r("9861"),r("d81d"),r("96cf"),r("3059")),l=r("73d0"),c=r("f121"),u=r("bc3a"),d=r.n(u),m=r("2f62"),p=r("c6d8"),f={name:"RoleManagement",components:{Edit:l["default"]},data:function(){return{open:!1,action:"",uploadData:{file_type:"file",type:"import_teacher"},fileList:[],importVisible:!1,list:[],fileId:"",modelUrl:c["base_url"]+"/default/import_teacher_xy.xlsx",listLoading:!0,layout:"total, sizes, prev, pager, next, jumper",selectRows:"",queryForm:{page:1,per_page:15},imageList:[],t_status:[{id:0,name:"暂停"},{id:1,name:"正常"}],detail_visable:!1,d_list:{},typeDate:[],editForm:"",editStatus:0,authForm:{id:"",menuIds:[]}}},computed:Object(n["a"])({},Object(m["c"])({token:"user/token",language:"settings/language"})),created:function(){this.fetchData(),this.action=c["baseURL"]+"/base/common/upload",this.fileList=[],this.getType(),this.getOpen()},methods:{handleLeaving:function(e){this.$router.push({path:"/leavingMessage/leaving",query:{teacher_id:e.id}})},getOpen:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var r,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(p["isOpen"])();case 2:r=t.sent,a=r.data,e.open=a.status,console.log(a,"是否打开入口");case 6:case"end":return t.stop()}}),t)})))()},getType:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var r,a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["getType"])();case 2:for(s in r=t.sent,a=r.data,a.TeacherTypeEnum)e.typeDate.push({id:s,type:a.TeacherTypeEnum[s]});console.log(e.typeDate,"type");case 6:case"end":return t.stop()}}),t)})))()},setSelectRows:function(e){this.selectRows=e},batchImport:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var r,a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r={id:e.fileId,type:1},t.next=3,Object(i["importTeacher"])(r);case 3:return a=t.sent,s=a.data,e.importVisible=!1,e.fileList=[],e.fileId="",t.next=10,e.fetchData();case 10:console.log(s,"导入导师信息");case 11:case"end":return t.stop()}}),t)})))()},uploadError:function(){this.$message.error("文件上传失败,请重新上传")},uploadSuccess:function(e){console.log(e,"文件上传成功"),this.fileId=e.data.id},cancelImport:function(){this.importVisible=!1,this.fileList=[],this.fileId=""},handleClose:function(){this.importVisible=!1,this.fileList=[],this.fileId=""},handleClose1:function(e){e()},handleCommand:function(e){this.importFieldsVisible=!0,this.command=e;var t=[],r=[];if(1==e)r=this.list;else if(2==e){if(0==this.selectRows.length)return void this.$message.error("请勾选需要导出的内容");r=this.selectRows}r.forEach((function(e){return e.id,t.push(e.id),t})),this.download(t)},download:function(e){var t=this;console.log(e,"test"),d()({baseURL:c["baseURL"],timeout:5e3,method:"post",url:"/mentor/teacher-export",headers:{Authorization:"Bearer ".concat(this.token)},params:{ids:e},responseType:"blob"}).then((function(e){t.convertRes2Blob(e)}))},convertRes2Blob:function(e){var t=e.headers["content-disposition"].match(/filename=(.*)(.*)/);console.log(t,"Mead");var r=t[1],a=new Blob([e.data],{type:"application/vnd.ms-excel"});if("undefined"!==typeof window.navigator.msSaveBlob)window.navigator.msSaveBlob(a,decodeURI(r));else{var s=window.URL.createObjectURL(a),o=document.createElement("a");o.style.display="none",o.href=s,o.setAttribute("download",decodeURI(r)),"undefined"===typeof o.download&&o.setAttribute("target","_blank"),document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(s)}},checkNode:function(e){console.log(e,"pppppppppppppp"),this.authForm.menuIds=this.$refs.tree.getCheckedKeys(),console.log(this.authForm.menuIds," this.authForm.menuIds")},handlePing:function(e){console.log(e,"导师贷款实际发生的副驾驶的会计法"),this.$router.push({path:"../../wenjuan/wenJuanTs",query:{id:e.id}})},handleEdit:function(e){console.log(e,"2lll"),e.id?this.$refs["edit"].showEdit(e):this.$refs["edit"].showEdit()},handleDetail:function(e){this.detail_visable=!0,this.d_list=e,console.log(e,"详情")},handleDelete:function(e){var t=this;if(e.id)this.$baseConfirm("你确定要删除当前项吗",null,Object(o["a"])(regeneratorRuntime.mark((function r(){var a,s;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Object(i["doDelete"])(e.id);case 2:return a=r.sent,s=a.message,t.$baseMessage(s,"success",!1,"vab-hey-message-success"),r.next=7,t.fetchData();case 7:case"end":return r.stop()}}),r)}))));else if(this.selectRows.length>0){var r=this.selectRows.map((function(e){return e.id}));console.log(r,"ids"),this.$baseConfirm("你确定要删除选中项吗",null,Object(o["a"])(regeneratorRuntime.mark((function e(){var a,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(i["doDeletes"])({ids:r});case 2:return a=e.sent,s=a.message,t.$baseMessage(s,"success",!1,"vab-hey-message-success"),e.next=7,t.fetchData();case 7:case"end":return e.stop()}}),e)}))))}else this.$baseMessage("未选中任何行","error",!1,"vab-hey-message-error")},handleSizeChange:function(e){this.queryForm.per_page=e,this.fetchData()},handleCurrentChange:function(e){this.queryForm.page=e,this.fetchData()},queryData:function(){this.queryForm.page=1,this.fetchData()},fetchData:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var r,a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.listLoading=!0,e.queryForm.type=1,t.next=4,Object(i["getList"])(e.queryForm);case 4:r=t.sent,a=r.data,console.log(a,"导师列表"),e.list=a.list,s=a.meta,e.queryForm.total=s.pagination.total,e.listLoading=!1;case 11:case"end":return t.stop()}}),t)})))()}}},h=f,b=(r("6cdb"),r("2877")),g=Object(b["a"])(h,a,s,!1,null,"2e1164af",null);t["default"]=g.exports},3059:function(e,t,r){"use strict";r.r(t),r.d(t,"getList",(function(){return s})),r.d(t,"getType",(function(){return o})),r.d(t,"doEdit",(function(){return n})),r.d(t,"doAdd",(function(){return i})),r.d(t,"doDelete",(function(){return l})),r.d(t,"doDeletes",(function(){return c})),r.d(t,"importTeacher",(function(){return u})),r.d(t,"getPoint",(function(){return d})),r.d(t,"getPoint_freash",(function(){return m}));var a=r("b775");function s(e){return Object(a["default"])({url:"/mentor/teacher",method:"get",params:e})}function o(e){return Object(a["default"])({url:"/base/common/enums",method:"get",params:e})}function n(e){return Object(a["default"])({url:"/mentor/teacher/"+e.id,method:"put",data:e})}function i(e){return Object(a["default"])({url:"/mentor/teacher",method:"post",data:e})}function l(e){return Object(a["default"])({url:"/mentor/teacher/"+e,method:"delete"})}function c(e){return Object(a["default"])({url:"/mentor/teacher-delete",method:"post",data:e})}function u(e){return Object(a["default"])({url:"/mentor/teacher-import",method:"post",data:e})}function d(e){return Object(a["default"])({url:"/mentor/teacher-statistical",method:"get",params:e})}function m(e){return Object(a["default"])({url:"/mentor/teacher-refresh",method:"get",params:e})}},"6cdb":function(e,t,r){"use strict";r("b6ac")},"73d0":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-dialog",{attrs:{title:e.title,visible:e.dialogFormVisible,width:"800px"},on:{"update:visible":function(t){e.dialogFormVisible=t},close:e.close},scopedSlots:e._u([{key:"footer",fn:function(){return[r("el-button",{on:{click:e.close}},[e._v("取 消")]),"编辑"==e.title?r("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v(" 确 定 ")]):e._e(),"添加"==e.title?r("el-button",{attrs:{type:"primary"},on:{click:e.add}},[e._v(" 添 加 ")]):e._e()]},proxy:!0}])},[r("el-form",{ref:"form",attrs:{"label-width":"100px",model:e.form,rules:e.rules}},[r("el-form-item",{attrs:{label:"姓名",prop:"truename"}},[r("el-input",{model:{value:e.form.truename,callback:function(t){e.$set(e.form,"truename",t)},expression:"form.truename"}})],1),r("el-form-item",{attrs:{label:"教工号",prop:"account"}},[r("el-input",{model:{value:e.form.account,callback:function(t){e.$set(e.form,"account",t)},expression:"form.account"}})],1),r("el-form-item",{attrs:{label:"密码",prop:"password"}},[r("el-input",{attrs:{"show-password":""},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1),r("el-form-item",{attrs:{label:"性别",prop:"sex"}},[r("el-radio-group",{model:{value:e.form.sex,callback:function(t){e.$set(e.form,"sex",t)},expression:"form.sex"}},[r("el-radio",{attrs:{label:1}},[e._v("男")]),r("el-radio",{attrs:{label:2}},[e._v("女")])],1)],1),1==e.role_id?r("el-form-item",{attrs:{label:"最大学生数",prop:"max_student_nums"}},[r("el-input",{model:{value:e.form.max_student_nums,callback:function(t){e.$set(e.form,"max_student_nums",t)},expression:"form.max_student_nums"}})],1):e._e(),r("el-form-item",{attrs:{label:"手机号",prop:"mobile"}},[r("el-input",{model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}})],1),r("el-form-item",{attrs:{label:"照片",prop:"headimg"}},[r("el-upload",{staticClass:"upload-demo",attrs:{action:e.action,data:e.uploadData,"file-list":e.fileList,limit:e.limit,"list-type":"picture",multiple:"","on-success":e.uploadSuccess}},[r("img",{staticClass:"yulan",attrs:{alt:"",src:e.form.headimg}}),r("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.clearFile}},[e._v(" "+e._s("添加"==e.title?"上传照片":"重新上传")+" ")]),r("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v(" 只能上传jpg/png文件,且不超过500kb ")])],1)],1),r("el-form-item",{attrs:{label:"毕业学校",prop:"school"}},[r("el-input",{model:{value:e.form.school,callback:function(t){e.$set(e.form,"school",t)},expression:"form.school"}})],1),r("el-form-item",{attrs:{label:"邮箱",prop:"email"}},[r("el-input",{model:{value:e.form.email,callback:function(t){e.$set(e.form,"email",t)},expression:"form.email"}})],1),r("el-form-item",{attrs:{label:"学科",prop:"subject"}},[r("el-input",{model:{value:e.form.subject,callback:function(t){e.$set(e.form,"subject",t)},expression:"form.subject"}})],1),r("el-form-item",{attrs:{label:"担任课程",prop:"class"}},[r("el-input",{model:{value:e.form.class,callback:function(t){e.$set(e.form,"class",t)},expression:"form.class"}})],1),r("el-form-item",{attrs:{label:"研究方向",prop:"direction"}},[r("el-input",{attrs:{type:"textarea"},model:{value:e.form.direction,callback:function(t){e.$set(e.form,"direction",t)},expression:"form.direction"}})],1),r("el-form-item",{attrs:{label:"承担项目",prop:"project"}},[r("el-input",{attrs:{type:"textarea"},model:{value:e.form.project,callback:function(t){e.$set(e.form,"project",t)},expression:"form.project"}})],1),r("el-form-item",{attrs:{label:"代表成果",prop:"results"}},[r("el-input",{attrs:{type:"textarea"},model:{value:e.form.results,callback:function(t){e.$set(e.form,"results",t)},expression:"form.results"}})],1),r("el-form-item",{attrs:{label:"状态",prop:"status"}},[r("el-radio-group",{model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},[r("el-radio",{attrs:{label:1}},[e._v("正常")]),r("el-radio",{attrs:{label:0}},[e._v("暂停")])],1)],1)],1)],1)},s=[],o=r("1da1"),n=r("5530"),i=(r("96cf"),r("b0c0"),r("3059")),l=r("f121"),c=r("2f62"),u={name:"DepartmentManagementEdit",props:{typeDate:{type:Array,required:!0}},data:function(){return{action:"",fileList:[],uploadData:{file_type:"img",type:"teacher_headimg"},limit:1,form:{parent_id:0,status:1,parent_name:""},defaultProps:{children:"children",label:"name"},roleData:[{id:0,name:"无"}],lazy:!1,rules:{truename:[{required:!0,trigger:"blur",message:"请输入姓名"}],password:[{required:!0,trigger:"blur",message:"请输入密码"}],account:[{required:!0,trigger:"blur",message:"请输入教工号(登录账号)"}],sex:[{required:!0,trigger:"blur",message:"请选择性别"}],type_text:[{required:!0,trigger:"blur",message:"请选择导师类型"}],max_student_nums:[{required:!0,trigger:"blur",message:"请输入最大学生数"}],status:[{required:!0,trigger:"blur",message:"请选择状态"}]},title:"",dialogFormVisible:!1}},computed:Object(n["a"])({},Object(c["c"])({role_id:"user/role_id",type_id:"user/type_id"})),created:function(){this.action=l["baseURL"]+"/base/common/upload",console.log(this.action,"action"),this.fileList=[],console.log(this.role_id,"id")},methods:{showEdit:function(e){e?(this.title="编辑",0==e.sex&&(e.sex=""),this.rules={truename:[{required:!0,trigger:"blur",message:"请输入姓名"}],account:[{required:!0,trigger:"blur",message:"请输入教工号(登陆账号)"}],type_text:[{required:!0,trigger:"blur",message:"请选择导师类型"}],max_student_nums:[{required:!0,trigger:"blur",message:"请输入最大学生数"}],status:[{required:!0,trigger:"blur",message:"请选择状态"}],sex:[{required:!0,trigger:"blur",message:"请选择性别"}]},this.form=Object.assign({},e)):this.title="添加",this.dialogFormVisible=!0},uploadSuccess:function(e){console.log(e,"图片上传成功"),this.form.headimg=e.data.url,this.fileList=[]},clearFile:function(){console.log("上传之前"),this.imageUrl=""},close:function(){this.$refs["form"].resetFields(),this.form=this.$options.data().form,this.dialogFormVisible=!1,this.fileList=[]},changeRole:function(e){this.form.type=e,console.log(e,"----------------")},handleNodeClick:function(e){console.log(e,"选择节点"),this.$refs.selectblur.blur(),this.form.department_name=e.name,this.form.department_id=e.id,this.$forceUpdate(),console.log(this.form,"form")},save:function(){var e=this;this.form.type=1,this.$refs["form"].validate(function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(r){var a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!r){t.next=9;break}return t.next=3,Object(i["doEdit"])(e.form);case 3:a=t.sent,s=a.message,e.$baseMessage(s,"success",!1,"vab-hey-message-success"),e.$emit("fetch-data"),e.fileList=[],e.close();case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},add:function(){var e=this;this.form.type=1,this.$refs["form"].validate(function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(r){var a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!r){t.next=9;break}return t.next=3,Object(i["doAdd"])(e.form);case 3:a=t.sent,s=a.message,e.$baseMessage(s,"success",!1,"vab-hey-message-success"),e.$emit("fetch-data"),e.fileList=[],e.close();case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}}},d=u,m=(r("ff5e"),r("2877")),p=Object(m["a"])(d,a,s,!1,null,null,null);t["default"]=p.exports},b6ac:function(e,t,r){},c6d8:function(e,t,r){"use strict";r.r(t),r.d(t,"getList",(function(){return s})),r.d(t,"doList",(function(){return o})),r.d(t,"isList",(function(){return n})),r.d(t,"isOpen",(function(){return i}));var a=r("b775");function s(e){return Object(a["default"])({url:"/answer/question",method:"get",params:e})}function o(e){return Object(a["default"])({url:"/answer/answer",method:"post",data:e})}function n(e){return Object(a["default"])({url:"/answer/is-answer-status",method:"get",params:e})}function i(e){return Object(a["default"])({url:"/answer/is-answer-display-status",method:"get",params:e})}},f1f0:function(e,t,r){e.exports=r.p+"static/img/data_empty.475a2a1e.png"},ff5e:function(e,t,r){"use strict";r("065b")}}]);