chunk-88562136.837a1aa8.js 13 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-88562136"],{"0ad0":function(e,t,a){"use strict";a("ba32")},"2d7f":function(e,t,a){"use strict";a("45a1")},"45a1":function(e,t,a){},"71e1":function(e,t,a){"use strict";a.r(t),a.d(t,"getList",(function(){return n})),a.d(t,"doEdit",(function(){return s})),a.d(t,"doAdd",(function(){return o})),a.d(t,"doDelete",(function(){return i})),a.d(t,"doDeletes",(function(){return l})),a.d(t,"importTeacher",(function(){return c}));var r=a("b775");function n(e){return Object(r["default"])({url:"/mentor/term",method:"get",params:e})}function s(e){return Object(r["default"])({url:"/mentor/term/"+e.id,method:"put",data:e})}function o(e){return Object(r["default"])({url:"/mentor/term",method:"post",data:e})}function i(e){return Object(r["default"])({url:"/mentor/term/"+e,method:"delete"})}function l(e){return Object(r["default"])({url:"/mentor/term-delete",method:"post",data:e})}function c(e){return Object(r["default"])({url:"/mentor/teacher-import",method:"post",data:e})}},"91f4":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("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[a("el-button",{on:{click:e.close}},[e._v("取 消")]),"编辑"==e.title?a("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v(" 确 定 ")]):e._e(),"添加"==e.title?a("el-button",{attrs:{type:"primary"},on:{click:e.add}},[e._v(" 添 加 ")]):e._e()]},proxy:!0}])},[a("el-form",{ref:"form",attrs:{"label-width":"100px",model:e.form,rules:e.rules}},[a("el-form-item",{attrs:{label:"学年名称",prop:"name"}},[a("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),a("el-form-item",{attrs:{label:"学年开始日期",prop:"start_date"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{format:"yyyy-MM-dd",placeholder:"选择日期时间",type:"date","value-format":"yyyy-MM-dd"},model:{value:e.form.start_date,callback:function(t){e.$set(e.form,"start_date",t)},expression:"form.start_date"}})],1),a("el-form-item",{attrs:{label:"学年结束日期",prop:"end_date"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{format:"yyyy-MM-dd",placeholder:"选择日期时间",type:"date","value-format":"yyyy-MM-dd"},model:{value:e.form.end_date,callback:function(t){e.$set(e.form,"end_date",t)},expression:"form.end_date"}})],1),a("el-form-item",{attrs:{label:"开始预约时间",prop:"start_time"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{format:"yyyy-MM-dd HH:mm:ss",placeholder:"选择日期时间",type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.form.start_time,callback:function(t){e.$set(e.form,"start_time",t)},expression:"form.start_time"}})],1),a("el-form-item",{attrs:{label:"结束预约时间",prop:"end_time"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{format:"yyyy-MM-dd HH:mm:ss",placeholder:"选择日期时间",type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.form.end_time,callback:function(t){e.$set(e.form,"end_time",t)},expression:"form.end_time"}})],1),a("el-form-item",{attrs:{label:"状态",prop:"status"}},[a("el-radio-group",{model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},[a("el-radio",{attrs:{label:1}},[e._v("正常")]),a("el-radio",{attrs:{label:0}},[e._v("暂停")])],1)],1)],1)],1)},n=[],s=a("1da1"),o=(a("96cf"),a("b0c0"),a("71e1")),i=a("f121"),l={name:"DepartmentManagementEdit",data:function(){return{action:"",uploadData:{file_type:"img",type:"course"},limit:1,form:{status:1,start_date:null,end_date:null,start_time:null,end_time:null},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:"请输入教工号(登录账号)"}],status:[{required:!0,trigger:"blur",message:"请选择状态"}]},title:"",dialogFormVisible:!1}},created:function(){this.action=i["baseURL"]+"/common/upload",console.log(this.action,"action"),this.fileList=[]},methods:{showEdit:function(e){e?(this.title="编辑",this.rules={truename:[{required:!0,trigger:"blur",message:"请输入姓名"}],account:[{required:!0,trigger:"blur",message:"请输入教工号(登陆账号)"}],status:[{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},clearFile:function(){console.log("上传之前"),this.imageUrl=""},changeRole:function(e){this.form.role_id=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")},close:function(){this.$refs["form"].resetFields(),this.form=this.$options.data().form,this.dialogFormVisible=!1,this.fileList=[]},save:function(){var e=this;this.$refs["form"].validate(function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(a){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=9;break}return t.next=3,Object(o["doEdit"])(e.form);case 3:r=t.sent,n=r.message,e.$baseMessage(n,"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.$refs["form"].validate(function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(a){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=9;break}return t.next=3,Object(o["doAdd"])(e.form);case 3:r=t.sent,n=r.message,e.$baseMessage(n,"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)}}())}}},c=l,u=(a("2d7f"),a("2877")),d=Object(u["a"])(c,r,n,!1,null,null,null);t["default"]=d.exports},ba32:function(e,t,a){},e8e6:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"role-management-container"},[r("vab-query-form",[r("vab-query-form-left-panel",{attrs:{span:5}},[r("el-button",{attrs:{icon:"el-icon-plus",type:"primary"},on:{click:e.handleEdit}},[e._v(" 添加 ")]),r("el-button",{attrs:{icon:"el-icon-delete",type:"danger"},on:{click:e.handleDelete}},[e._v(" 批量删除 ")])],1),r("vab-query-form-right-panel",{attrs:{span:19}},[r("el-form",{attrs:{inline:!0,model:e.queryForm},nativeOn:{submit:function(e){e.preventDefault()}}},[r("el-form-item",[r("el-input",{staticStyle:{width:"160px","margin-right":"5px"},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.name,callback:function(t){e.$set(e.queryForm,"name","string"===typeof t?t.trim():t)},expression:"queryForm.name"}})],1),r("el-form-item",[r("el-button",{attrs:{icon:"el-icon-search",type:"primary"},on:{click:e.queryData}},[e._v(" 查询 ")])],1)],1)],1)],1),r("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[r("el-image",{staticClass:"vab-data-empty",attrs:{src:a("f1f0")}})]},proxy:!0}])},[r("el-table-column",{attrs:{"show-overflow-tooltip":"",type:"selection"}}),r("el-table-column",{attrs:{align:"center",label:"序号",sortable:"",type:"index",width:"60"}}),r("el-table-column",{attrs:{align:"center",label:"学年名称",prop:"name","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{align:"center",label:"学年开始日期",prop:"start_date","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{align:"center",label:"学年结束日期",prop:"end_date","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{align:"center",label:"开始预约时间",prop:"start_time","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{align:"center",label:"结束预约时间",prop:"end_time","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{align:"center",label:"状态",prop:"status","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[1==a.status?r("el-tag",[e._v("正常")]):e._e(),0==a.status?r("el-tag",{attrs:{type:"danger"}},[e._v("暂停")]):e._e()]}}])}),r("el-table-column",{attrs:{align:"center",label:"操作","show-overflow-tooltip":"",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[r("el-button",{attrs:{type:"text"},on:{click:function(t){return e.handleDetail(a)}}},[e._v("详情")]),r("el-button",{attrs:{type:"text"},on:{click:function(t){return e.handleEdit(a)}}},[e._v("编辑")])]}}])})],1),r("el-dialog",{attrs:{"before-close":e.handleClose1,center:"",title:e.d_list.name,visible:e.detail_visable,width:"600px"},on:{"update:visible":function(t){e.detail_visable=t}}},[r("div",{staticClass:"detail_wrap"},[r("div",[e._v("学年开始日期:"+e._s(e.d_list.start_date))]),r("div",[e._v("学年结束日期:"+e._s(e.d_list.end_date))]),r("div",[e._v("开始预约时间:"+e._s(e.d_list.start_time))]),r("div",[e._v("结束预约时间:"+e._s(e.d_list.end_time))])]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.detail_visable=!1}}},[e._v(" 确 定 ")])],1)]),r("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}}),r("edit",{ref:"edit",on:{"fetch-data":e.fetchData}})],1)},n=[],s=a("1da1"),o=a("5530"),i=(a("d81d"),a("96cf"),a("71e1")),l=a("91f4"),c=a("f121"),u=a("2f62"),d={name:"RoleManagement",components:{Edit:l["default"]},data:function(){return{action:"",uploadData:{file_type:"file",type:"import_teacher"},fileList:[],list:[],fileId:"",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:{},editForm:"",editStatus:0,authForm:{id:"",menuIds:[]}}},computed:Object(o["a"])({},Object(u["c"])({token:"user/token",language:"settings/language"})),created:function(){this.fetchData(),this.action=c["baseURL"]+"/base/common/upload",this.fileList=[]},methods:{setSelectRows:function(e){this.selectRows=e},handleClose1:function(){this.detail_visable=!1},handleEdit:function(e){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(s["a"])(regeneratorRuntime.mark((function a(){var r,n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(i["doDelete"])(e.id);case 2:return r=a.sent,n=r.message,t.$baseMessage(n,"success",!1,"vab-hey-message-success"),a.next=7,t.fetchData();case 7:case"end":return a.stop()}}),a)}))));else if(this.selectRows.length>0){var a=this.selectRows.map((function(e){return e.id}));console.log(a,"ids"),this.$baseConfirm("你确定要删除选中项吗",null,Object(s["a"])(regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(i["doDeletes"])({ids:a});case 2:return r=e.sent,n=r.message,t.$baseMessage(n,"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(s["a"])(regeneratorRuntime.mark((function t(){var a,r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.listLoading=!0,t.next=3,Object(i["getList"])(e.queryForm);case 3:a=t.sent,r=a.data,console.log(r,"学年列表"),e.list=r.list,n=r.meta,e.queryForm.total=n.pagination.total,e.listLoading=!1;case 10:case"end":return t.stop()}}),t)})))()}}},m=d,f=(a("0ad0"),a("2877")),p=Object(f["a"])(m,r,n,!1,null,"6f716a5a",null);t["default"]=p.exports},f1f0:function(e,t,a){e.exports=a.p+"static/img/data_empty.475a2a1e.png"}}]);