Commit b49c8ad5 authored by wangwei's avatar wangwei

gengxin

parent 1a8add53
......@@ -12,8 +12,8 @@ module.exports = {
//本地代理设置
proxyTable: {
'/api': {
target: 'http://local.base-api.sing.com', // 接口的域名
// target: 'https://wechat-test.changchangenglish.com/',
// target: 'http://local.base-api.sing.com', // 接口的域名
target: 'https://wechat-test.changchangenglish.com/',
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
}
},
......@@ -25,8 +25,6 @@ module.exports = {
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
/**
* Source Maps
*/
......
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=never><link rel=stylesheet href=https://at.alicdn.com/t/font_746649_7dsnjecwkpg.css><title>唱唱启蒙-后台</title><link href=/static/css/app.47522eb6a68d6d41ad23b5eb163afbdd.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.dafc75b6dd2eb1958bd0.js></script><script type=text/javascript src=/static/js/vendor.4a52c6513a395e5eac06.js></script><script type=text/javascript src=/static/js/app.9cd47435d66e7833e4fa.js></script></body><script>let el = document.getElementsByTagName("script");
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=never><link rel=stylesheet href=https://at.alicdn.com/t/font_746649_7dsnjecwkpg.css><title>唱唱启蒙-后台</title><link href=/static/css/app.47522eb6a68d6d41ad23b5eb163afbdd.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.5f21a328423f58a62d25.js></script><script type=text/javascript src=/static/js/vendor.4a52c6513a395e5eac06.js></script><script type=text/javascript src=/static/js/app.9cd47435d66e7833e4fa.js></script></body><script>let el = document.getElementsByTagName("script");
el.onerror = function(a,b,c){
console.log('error:',a,b,c);
};
......
webpackJsonp([5],{"1/HN":function(t,e,n){(t.exports=n("FZ+f")(!0)).push([t.i,"\n.demo-table-expand {\n font-size: 0;\n}\n.demo-table-expand label {\n width: 90px;\n color: #99a9bf;\n}\n.demo-table-expand .el-form-item {\n margin-right: 0;\n margin-bottom: 0;\n width: 50%;\n}\n","",{version:3,sources:["D:/myproject/changchang-admin-new/src/components/class/index.vue"],names:[],mappings:";AACA;EACE,aAAa;CACd;AACD;EACE,YAAY;EACZ,eAAe;CAChB;AACD;EACE,gBAAgB;EAChB,iBAAiB;EACjB,WAAW;CACZ",file:"index.vue",sourcesContent:["\n.demo-table-expand {\n font-size: 0;\n}\n.demo-table-expand label {\n width: 90px;\n color: #99a9bf;\n}\n.demo-table-expand .el-form-item {\n margin-right: 0;\n margin-bottom: 0;\n width: 50%;\n}\n"],sourceRoot:""}])},BenM:function(t,e,n){(t.exports=n("FZ+f")(!0)).push([t.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","",{version:3,sources:[],names:[],mappings:"",file:"dialog.vue",sourceRoot:""}])},JP4Q:function(t,e,n){var i=n("BenM");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n("rjj0")("486a2a46",i,!1,{})},NzM9:function(t,e,n){(t.exports=n("FZ+f")(!0)).push([t.i,"\n.class[data-v-426dc2ae] {\n padding: 20px 0;\n}\n.intro .el-form-item[data-v-426dc2ae] {\n margin-bottom: 0;\n}\n","",{version:3,sources:["D:/myproject/changchang-admin-new/src/components/class/index.vue"],names:[],mappings:";AACA;EACE,gBAAgB;CACjB;AACD;EACE,iBAAiB;CAClB",file:"index.vue",sourcesContent:["\n.class[data-v-426dc2ae] {\n padding: 20px 0;\n}\n.intro .el-form-item[data-v-426dc2ae] {\n margin-bottom: 0;\n}\n"],sourceRoot:""}])},OX9A:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("CCn6"),s={props:["dialogObj"],data:function(){return{form:{teacher_id:"",max_join_num:""},teacherList:[],exitTeacherList:[],goodsList:[],periods:{}}},methods:{findDifferentArray:function(t,e){var n=[];return t.forEach(function(t){-1===e.findIndex(function(e){return e.teacher_id===t.id})&&n.push(t)}),n},getTeacher:function(){var t=this;this.exitTeacherList=this.dialogObj.teacherList.length>0?this.dialogObj.teacherList:[],Object(i._29)().then(function(e){if(t.exitTeacherList.length>0){if(t.teacherList=t.findDifferentArray(e.list,t.exitTeacherList),t.form.teacher_id&&-1===t.teacherList.findIndex(function(e){return e.id==t.form.teacher_id})){var n=e.list.find(function(e){return e.id==t.form.teacher_id});t.teacherList.push(n)}}else t.teacherList=e.list})},getTeacherByPeriods:function(){var t=this;Object(i._21)(this.periods.id).then(function(e){t.exitTeacherList=e,Object(i._29)().then(function(e){t.exitTeacherList.length>0?t.teacherList=t.findDifferentArray(e.list,t.exitTeacherList):t.teacherList=e.list})})},initPage:function(){var t=this;switch(this.periods=this.dialogObj.periods,this.dialogObj.type){case 0:this.dialogObj.periodsId||this.getPeriodList(),this.form={teacher_id:"",max_join_num:""},this.getTeacher();break;case 1:Object(i._4)(this.dialogObj.id).then(function(e){t.form={teacher_id:parseInt(e.teacher_id),max_join_num:e.max_join_num},t.getTeacher()})}},getPeriodList:function(){var t=this;Object(i._13)().then(function(e){e.list.forEach(function(t){t.children=[]}),t.goodsList=e.list,t.periods||Object(i._19)({goods_id:t.goodsList[0].id}).then(function(e){e.list.forEach(function(t){t.name=t.title}),t.goodsList[0].children=e.list,t.periods=e.list[0]})})},onSave:function(){var t=this;switch(this.dialogObj.type){case 0:var e=this.dialogObj.periodsId?this.dialogObj.periodsId:this.periods.id;Object(i.f)(e,this.form).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.$emit("reflash",t.periods),t.dialogObj.show=!1});break;case 1:Object(i.M)(this.dialogObj.id,this.form).then(function(e){t.$message({type:"success",message:"修改成功!"}),t.$emit("reflash",t.periods),t.dialogObj.show=!1})}},handleItemChange:function(t){var e=this;Object(i._19)({goods_id:t[0]}).then(function(n){n.list.forEach(function(t){t.name=t.title}),e.goodsList.find(function(e){return e.id===t[0]}).children=n.list})},changePeriods:function(t){if(t.length>1){var e=this.goodsList.find(function(e){return e.id===t[0]});this.periods=e.children.find(function(e){return e.id===t[1]}),this.getTeacherByPeriods()}}},watch:{dialogObj:function(t){this.initPage()}}},o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{attrs:{title:t.dialogObj.title,visible:t.dialogObj.show},on:{"update:visible":function(e){t.$set(t.dialogObj,"show",e)}}},[n("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px"}},[this.dialogObj.periodsId?t._e():n("el-form-item",{attrs:{label:"期数"}},[n("el-cascader",{attrs:{options:t.goodsList,props:{value:"id",label:"name"}},on:{"active-item-change":t.handleItemChange,change:t.changePeriods}})],1),t._v(" "),n("el-form-item",{attrs:{label:"老师"}},[n("el-select",{attrs:{placeholder:"请选择"},model:{value:t.form.teacher_id,callback:function(e){t.$set(t.form,"teacher_id",e)},expression:"form.teacher_id"}},t._l(t.teacherList,function(t,e){return n("el-option",{key:e,attrs:{label:t.name,value:t.id}})}))],1),t._v(" "),n("el-form-item",{attrs:{label:"最大学员"}},[n("el-input-number",{model:{value:t.form.max_join_num,callback:function(e){t.$set(t.form,"max_join_num",e)},expression:"form.max_join_num"}})],1)],1),t._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.dialogObj.show=!1}}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.onSave}},[t._v("确 定")])],1)],1)};o._withStripped=!0;var a={render:o,staticRenderFns:[]},r=a;var l=!1;var c=n("VU/8")(s,r,!1,function(t){l||n("JP4Q")},"data-v-e25797c8",null);c.options.__file="src\\components\\class\\dialog.vue";var d=c.exports,u=n("kmJW"),_=n("+TkF"),f={name:"userList",props:["userObj"],data:function(){return{userTable:[],addId:"",lookDetail:{show:!1,loading:!1,list:[]},addShow:!1,userList:[],nowPage:1,limit:5,total:0,searchFrom:{userId:"",nickName:"",mobile:""},multipleSelection:[]}},components:{page:u.a},filters:{isOrNot:function(t){return _.h[t]},percent:function(t){return(100*t).toFixed(2)+"%"}},methods:{userLook:function(t){var e=this;this.lookDetail.show=!0,this.lookDetail.loading=!0,Object(i._47)(t.periods_id,t.id).then(function(t){e.lookDetail.list=t.list,e.lookDetail.loading=!1})},initPage:function(){var t=this;Object(i._7)(this.userObj.classId).then(function(e){t.userTable=e.list})},changeUser:function(t){var e=this;this.$confirm("此操作将修改成员看课权限?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.p)(t.id,{is_view_course:0===t.is_view_course?1:0}).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.initPage()})})},onDel:function(t){var e=this;this.$confirm("此操作将删除该成员?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.x)(t.id).then(function(t){e.$message({type:"success",message:"删除成功!"}),e.initPage()})})},onAdd:function(){var t=this;0!==this.multipleSelection.length?1===this.multipleSelection.length?(this.addId=this.multipleSelection[0].user_id,this.addId&&Object(i.g)(this.userObj.classId,this.addId,{is_buy:0}).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.addShow=!1,t.initPage()})):this.$message({type:"error",message:"只能选择一个用户!"}):this.$message({type:"error",message:"请选择用户!"})},onAddUser:function(){this.addShow=!0,this.getUser()},getUser:function(){var t=this,e={page:this.nowPage,limit:this.limit};this.searchFrom.userId&&(e.user_id=this.searchFrom.userId),this.searchFrom.nickName&&(e.nickname=this.searchFrom.nickName),this.searchFrom.mobile&&(e.mobile=this.searchFrom.mobile),Object(i._31)(e).then(function(e){t.userList=e.list,t.total=e.total})},onPageChange:function(t){this.nowPage=t,this.getUser()},handleSelectionChange:function(t){this.multipleSelection=t},editComment:function(t,e){var n=this;this.$prompt("","编辑备注",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:e}).then(function(e){var s=e.value;Object(i.k)(t,{desc:s}).then(function(t){n.$message({type:"success",message:"编辑备注成功"}),n.initPage()})})}},watch:{userObj:function(){this.initPage()}}},h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{attrs:{title:t.userObj.title,visible:t.userObj.show,modal:!1,fullscreen:!0},on:{"update:visible":function(e){t.$set(t.userObj,"show",e)}}},[n("div",[n("el-form",{attrs:{"label-width":"90px",inline:""}},[n("el-form-item",{staticStyle:{float:"right"}},[t.$store.state.readonly?t._e():n("el-button",{attrs:{type:"success"},on:{click:t.onAddUser}},[t._v("+添加用户")])],1)],1),t._v(" "),n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.userTable}},[n("el-table-column",{attrs:{label:"用户",className:"f-c"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("img",{staticStyle:{"margin-right":"5px",width:"50px",height:"50px","border-radius":"50px"},attrs:{src:e.row.avatar}}),t._v(" "+t._s(e.row.nickname)+"(ID:"+t._s(e.row.user_id)+")\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"是否购买"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(0===e.row.is_buy?"否":"是")+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"看课权限"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("isOrNot")(e.row.is_view_course))+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"desc",label:"备注"}}),t._v(" "),n("el-table-column",{attrs:{label:"最后登录时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.last_login_at)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"看课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.watch_course_rate)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"课包查看次数"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.watch_course_num)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"学习时长(分)"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(Math.round(e.row.watch_course_time/60*100)/100)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"作业率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("percent")(e.row.work_rate))+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"打卡率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("percent")(e.row.clock_rate))+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"续费情况"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("isOrNot")(e.row.is_continue_buy))+"\n ")]}}])}),t._v(" "),t.$store.state.readonly?t._e():n("el-table-column",{attrs:{label:"操作",width:"300"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.$store.state.readonly?t._e():n("el-button",{attrs:{type:"warning",size:"mini"},on:{click:function(n){t.editComment(e.row.id,e.row.desc)}}},[t._v("编辑备注")]),t._v(" "),t.$store.state.readonly?t._e():n("el-button",{attrs:{type:"warning",size:"mini"},on:{click:function(n){t.changeUser(e.row)}}},[t._v("看课权限")]),t._v(" "),t.$store.state.readonly?t._e():n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(n){t.userLook(e.row)}}},[t._v("看课情况")]),t._v(" "),t.$store.state.deletePermission&&!t.$store.state.readonly?n("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(n){t.onDel(e.row)}}},[t._v("删除")]):t._e()]}}])})],1)],1),t._v(" "),n("el-dialog",{attrs:{modal:!1,visible:t.addShow},on:{"update:visible":function(e){t.addShow=e}}},[n("el-form",{attrs:{"label-width":"90px"}},[n("el-row",[n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"ID"}},[n("el-input",{model:{value:t.searchFrom.userId,callback:function(e){t.$set(t.searchFrom,"userId",e)},expression:"searchFrom.userId"}})],1)],1),t._v(" "),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"昵称"}},[n("el-input",{model:{value:t.searchFrom.nickName,callback:function(e){t.$set(t.searchFrom,"nickName",e)},expression:"searchFrom.nickName"}})],1)],1),t._v(" "),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"电话"}},[n("el-input",{model:{value:t.searchFrom.mobile,callback:function(e){t.$set(t.searchFrom,"mobile",e)},expression:"searchFrom.mobile"}})],1)],1)],1),t._v(" "),n("el-row",[n("el-col",{attrs:{span:8,offset:16}},[n("el-form-item",[n("el-button",{staticStyle:{float:"right"},attrs:{type:"primary",plain:""},on:{click:t.getUser}},[t._v("搜索")])],1)],1)],1)],1),t._v(" "),n("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.userList},on:{"selection-change":t.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),n("el-table-column",{attrs:{className:"f-c",label:"用户"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("img",{staticStyle:{"margin-right":"5px",width:"50px",height:"50px","border-radius":"50px"},attrs:{src:e.row.avatar}}),t._v(t._s(e.row.nickname)+"(ID:"+t._s(e.row.user_id)+")\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"mobile",label:"手机号"}})],1),t._v(" "),n("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange}}),t._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.addShow=!1}}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.onAdd}},[t._v("确 定")])],1)],1),t._v(" "),n("el-dialog",{attrs:{modal:!1,visible:t.lookDetail.show},on:{"update:visible":function(e){t.$set(t.lookDetail,"show",e)}}},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.lookDetail.loading,expression:"lookDetail.loading"}],staticStyle:{width:"100%"},attrs:{data:t.lookDetail.list}},[n("el-table-column",{attrs:{prop:"start_at",label:"日期"}}),t._v(" "),n("el-table-column",{attrs:{label:"爸妈看一看"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.watch_list&&e.row.watch_list.length>0&&e.row.watch_list.find(function(t){return 1===t.page_id})?n("span",[t._v("\n 学习时长:"+t._s(e.row.watch_list.find(function(t){return 1===t.page_id}).stay_time)+"\n ")]):t._e(),t._v(" "),e.row.watch_list.find(function(t){return 1===t.page_id})?t._e():n("span",[t._v("\n 暂未上课\n ")])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"宝贝玩一玩"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.watch_list&&e.row.watch_list.length>0&&e.row.watch_list.find(function(t){return 1===t.page_id})?n("span",[t._v("\n 学习时长:"+t._s(e.row.watch_list.find(function(t){return 2===t.page_id}).stay_time)+"\n ")]):t._e(),t._v(" "),e.row.watch_list.find(function(t){return 1===t.page_id})?t._e():n("span",[t._v("\n 暂未上课\n ")])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"爸妈秀宝贝"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.watch_list&&e.row.watch_list.length>0&&e.row.watch_list.find(function(t){return 1===t.page_id})?n("span",[t._v("\n 学习记录:"),n("div",{domProps:{innerHTML:t._s(e.row.watch_list.find(function(t){return 0===t.page_id}).learn_report)}}),t._v(t._s(e.row.watch_list.find(function(t){return 3===t.page_id}).stay_time)+"\n ")]):t._e(),t._v(" "),e.row.watch_list.find(function(t){return 1===t.page_id})?t._e():n("span",[t._v("\n 暂未上课\n ")])]}}])})],1)],1)],1)};h._withStripped=!0;var m={render:h,staticRenderFns:[]},p=m;var b=!1;var v=n("VU/8")(f,p,!1,function(t){b||n("nZHh")},null,null);v.options.__file="src\\components\\class\\userList.vue";var g={data:function(){return{nowPage:1,total:0,limit:10,periodsId:null,goodsList:[],teacher_id:"",classList:[],title:"",countObj:"",teacherList:[],userObj:{classId:"",title:"",show:!1},dialogObj:{show:!1,title:"添加班级",periodsId:"",type:0,id:0},selectedGoods:[]}},components:{UserList:v.exports,classDialog:d,page:u.a},filters:{classTypeFilter:function(t){var e=parseInt(t);return 1===e?"带班班级":2===e?"观摩班级":""},percent:function(t){return(100*t).toFixed(2)+"%"}},mounted:function(){this.initPage()},methods:{changeRow:function(t,e){e.indexOf(t)>-1&&Object(i._6)(t.periods_id,t.id).then(function(e){t.arrive_course_rate=e.arrive_course_rate,t.watch_course_rate=e.watch_course_rate,t.over_course_rate=e.over_course_rate,t.work_rate=e.work_rate,t.over_work_rate=e.over_work_rate,t.clock_rate=e.clock_rate,t.over_clock_rate=e.over_clock_rate,t.transform_rate=e.transform_rate})},initQuery:function(){var t=this,e=this.$route.query;e&&e.goods_id&&e.periods_id&&(this.selectedGoods=[parseInt(e.goods_id),parseInt(e.periods_id)],Object(i._19)({goods_id:this.selectedGoods[0]}).then(function(e){e.list.forEach(function(t){t.name=t.title}),t.goodsList.find(function(e){return e.id===t.selectedGoods[0]}).children=e.list;var n=t.goodsList.find(function(e){return e.id===t.selectedGoods[0]});t.periods=n.children.find(function(e){return e.id===t.selectedGoods[1]}),t.teacher_id="",t.getClassList()}))},initPage:function(){var t=this;Object(i._13)().then(function(e){e.list.forEach(function(t){t.children=[]}),t.goodsList=e.list,t.initQuery()})},showUser:function(t){this.userObj={classId:t.id,show:!0,title:t.teacher_name+"班级用户列表"}},getTeacher:function(){var t=this;this.periods&&Object(i._21)(this.periods.id).then(function(e){t.teacherList=e})},changePeriods:function(t){if(t.length>1){var e=this.goodsList.find(function(e){return e.id===t[0]});this.periods=e.children.find(function(e){return e.id===t[1]}),this.teacher_id="",this.getTeacher()}},onPageChange:function(t){this.nowPage=t,this.getClassList()},onReflash:function(t){this.periods=t,this.selectedGoods=[t.goods_id,t.id],this.getClassList()},getClassList:function(){var t=this;if(this.periods){this.getTeacher();var e={limit:this.limit,page:this.nowPage};this.teacher_id&&(e.teacher_id=this.teacher_id),Object(i._5)(this.periods.id,e).then(function(e){e.list.forEach(function(t){t.arrive_course_rate=0,t.watch_course_rate=0,t.over_course_rate=0,t.work_rate=0,t.over_work_rate=0,t.clock_rate=0,t.over_clock_rate=0,t.transform_rate=0}),t.title=e.periods,t.countObj=e.count?e.count:"",t.classList=e.list,t.total=e.total})}},handleItemChange:function(t){var e=this;Object(i._19)({goods_id:t[0]}).then(function(n){n.list.forEach(function(t){t.name=t.title}),e.goodsList.find(function(e){return e.id===t[0]}).children=n.list})},delClass:function(t){var e=this;this.$confirm("此操作将删除该班级?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.w)(t.id).then(function(t){e.$message({type:"success",message:"删除成功!"}),e.getClassList()})})},onAdd:function(){console.log("onAdd",this.periods),this.dialogObj={show:!0,title:"添加班级",type:0,teacherList:this.teacherList?this.teacherList:[]},this.periods&&(this.dialogObj.periods=this.periods,this.dialogObj.periodsId=this.periods.id)},editClass:function(t){this.dialogObj={show:!0,title:"编辑班级",type:1,id:t.id,teacherList:this.teacherList?this.teacherList:[]},this.periods&&(this.dialogObj.periods=this.periods,this.dialogObj.periodsId=this.periods.id)}}},w=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"class"},[n("div",{staticClass:"form-block"},[n("el-form",{attrs:{"label-width":"90px",inline:""}},[n("el-form-item",{attrs:{label:"期数"}},[n("el-cascader",{attrs:{options:t.goodsList,props:{value:"id",label:"name"}},on:{"active-item-change":t.handleItemChange,change:t.changePeriods},model:{value:t.selectedGoods,callback:function(e){t.selectedGoods=e},expression:"selectedGoods"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"老师"}},[n("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:t.teacher_id,callback:function(e){t.teacher_id=e},expression:"teacher_id"}},t._l(t.teacherList,function(t,e){return n("el-option",{key:e,attrs:{label:t.teacher_name,value:t.teacher_id}})}))],1),t._v(" "),n("el-form-item",{attrs:{label:""}},[n("el-button",{attrs:{type:"primary"},on:{click:t.getClassList}},[t._v("\n 搜索\n ")])],1),t._v(" "),n("el-form-item",{staticStyle:{float:"right"}},[t.$store.state.readonly?t._e():n("el-button",{attrs:{type:"success"},on:{click:t.onAdd}},[t._v("+添加班级")])],1)],1)],1),t._v(" "),t.classList&&t.classList.length>0?n("div",{staticClass:"intro"},[n("el-form",{attrs:{"label-width":"100px"}},[n("el-row",[n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"期数名称"}},[t._v(t._s(t.title.title))])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"可看课包数"}},[t._v(t._s(t.title.watch_num))])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"已看课包数"}},[t._v(t._s(t.title.has_watch_num))])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"开始时间"}},[t._v(t._s(t.title.start_at))])],1)],1),t._v(" "),n("el-row",[n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"老师数量"}},[t._v(t._s(t.countObj.count_teacher_num))])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"预计学员总数"}},[t._v(t._s(t.countObj.count_max_join_num))])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"学员总数"}},[t._v(t._s(t.countObj.count_join_num))])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"结束时间"}},[t._v(t._s(t.title.over_at))])],1)],1)],1)],1):t._e(),t._v(" "),t.classList&&0!==t.classList.length?t._e():n("div",[n("el-form",{attrs:{"label-width":"300px",inline:""}},[n("el-form-item",{attrs:{label:"暂无期数信息,请先选择期数"}})],1)],1),t._v(" "),n("div",[n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.classList},on:{"expand-change":t.changeRow}},[n("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-table",{staticStyle:{width:"100%"},attrs:{data:[e.row]}},[n("el-table-column",{attrs:{label:"到课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.arrive_course_rate)))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"看课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.watch_course_rate)))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"完课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.over_course_rate)))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"作业率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.work_rate)))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"全勤作业率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.over_work_rate)))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"打卡率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.clock_rate)))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"全勤打卡率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.over_clock_rate)))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"转化率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.transform_rate)))])]}}])})],1)]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"teacher_name",label:"班主任"}}),t._v(" "),n("el-table-column",{attrs:{label:"班级类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("classTypeFilter")(e.row.type))+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"max_join_num",label:"最大人数"}}),t._v(" "),n("el-table-column",{attrs:{prop:"join_num",label:"现有人数"}}),t._v(" "),n("el-table-column",{attrs:{width:"250",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(n){t.showUser(e.row)}}},[t._v("班级成员")]),t._v(" "),t.$store.state.readonly?t._e():n("el-button",{attrs:{size:"mini",type:"warning"},on:{click:function(n){t.editClass(e.row)}}},[t._v("编辑")]),t._v(" "),t.$store.state.deletePermission&&!t.$store.state.readonly?n("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(n){t.delClass(e.row)}}},[t._v("删除")]):t._e()]}}])})],1)],1),t._v(" "),n("page",{attrs:{nowPage:t.nowPage,total:t.total,limit:t.limit},on:{pageChange:t.onPageChange}}),t._v(" "),n("class-dialog",{attrs:{dialogObj:t.dialogObj},on:{reflash:t.onReflash}}),t._v(" "),n("user-list",{attrs:{userObj:t.userObj},on:{reflash:t.getClassList}})],1)};w._withStripped=!0;var y={render:w,staticRenderFns:[]},k=y;var x=!1;var j=n("VU/8")(g,k,!1,function(t){x||(n("rKW7"),n("a1h3"))},"data-v-426dc2ae",null);j.options.__file="src\\components\\class\\index.vue";e.default=j.exports},a1h3:function(t,e,n){var i=n("1/HN");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n("rjj0")("171dfdde",i,!1,{})},nZHh:function(t,e,n){var i=n("tnil");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n("rjj0")("21b1deb2",i,!1,{})},rKW7:function(t,e,n){var i=n("NzM9");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n("rjj0")("94e58b82",i,!1,{})},tnil:function(t,e,n){(t.exports=n("FZ+f")(!0)).push([t.i,"\n.f-c > div{\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-flow: row nowrap;\n flex-flow: row nowrap;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n","",{version:3,sources:["D:/myproject/changchang-admin-new/src/components/class/userList.vue"],names:[],mappings:";AACA;EACE,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;EACd,+BAA+B;EAC/B,8BAA8B;MAC1B,0BAA0B;UACtB,sBAAsB;EAC9B,wBAAwB;MACpB,qBAAqB;UACjB,4BAA4B;EACpC,0BAA0B;MACtB,uBAAuB;UACnB,oBAAoB;CAC7B",file:"userList.vue",sourcesContent:["\n.f-c > div{\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-flow: row nowrap;\n flex-flow: row nowrap;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n"],sourceRoot:""}])}});
\ No newline at end of file
webpackJsonp([5],{"1/HN":function(t,e,n){(t.exports=n("FZ+f")(!0)).push([t.i,"\n.demo-table-expand {\n font-size: 0;\n}\n.demo-table-expand label {\n width: 90px;\n color: #99a9bf;\n}\n.demo-table-expand .el-form-item {\n margin-right: 0;\n margin-bottom: 0;\n width: 50%;\n}\n","",{version:3,sources:["D:/myproject/changchang-admin-new/src/components/class/index.vue"],names:[],mappings:";AACA;EACE,aAAa;CACd;AACD;EACE,YAAY;EACZ,eAAe;CAChB;AACD;EACE,gBAAgB;EAChB,iBAAiB;EACjB,WAAW;CACZ",file:"index.vue",sourcesContent:["\n.demo-table-expand {\n font-size: 0;\n}\n.demo-table-expand label {\n width: 90px;\n color: #99a9bf;\n}\n.demo-table-expand .el-form-item {\n margin-right: 0;\n margin-bottom: 0;\n width: 50%;\n}\n"],sourceRoot:""}])},BenM:function(t,e,n){(t.exports=n("FZ+f")(!0)).push([t.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","",{version:3,sources:[],names:[],mappings:"",file:"dialog.vue",sourceRoot:""}])},JP4Q:function(t,e,n){var i=n("BenM");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n("rjj0")("486a2a46",i,!1,{})},NzM9:function(t,e,n){(t.exports=n("FZ+f")(!0)).push([t.i,"\n.class[data-v-426dc2ae] {\n padding: 20px 0;\n}\n.intro .el-form-item[data-v-426dc2ae] {\n margin-bottom: 0;\n}\n","",{version:3,sources:["D:/myproject/changchang-admin-new/src/components/class/index.vue"],names:[],mappings:";AACA;EACE,gBAAgB;CACjB;AACD;EACE,iBAAiB;CAClB",file:"index.vue",sourcesContent:["\n.class[data-v-426dc2ae] {\n padding: 20px 0;\n}\n.intro .el-form-item[data-v-426dc2ae] {\n margin-bottom: 0;\n}\n"],sourceRoot:""}])},OX9A:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("CCn6"),s={props:["dialogObj"],data:function(){return{form:{teacher_id:"",max_join_num:""},teacherList:[],exitTeacherList:[],goodsList:[],periods:{}}},methods:{findDifferentArray:function(t,e){var n=[];return t.forEach(function(t){-1===e.findIndex(function(e){return e.teacher_id==t.id})&&n.push(t)}),n},getTeacher:function(){var t=this;this.exitTeacherList=this.dialogObj.teacherList.length>0?this.dialogObj.teacherList:[],Object(i._29)().then(function(e){if(t.exitTeacherList.length>0){if(t.teacherList=t.findDifferentArray(e.list,t.exitTeacherList),t.form.teacher_id&&-1===t.teacherList.findIndex(function(e){return e.id==t.form.teacher_id})){var n=e.list.find(function(e){return e.id==t.form.teacher_id});t.teacherList.push(n)}}else t.teacherList=e.list})},getTeacherByPeriods:function(){var t=this;Object(i._21)(this.periods.id).then(function(e){t.exitTeacherList=e,Object(i._29)().then(function(e){t.exitTeacherList.length>0?t.teacherList=t.findDifferentArray(e.list,t.exitTeacherList):t.teacherList=e.list})})},initPage:function(){var t=this;switch(this.periods=this.dialogObj.periods,this.dialogObj.type){case 0:this.dialogObj.periodsId||this.getPeriodList(),this.form={teacher_id:"",max_join_num:""},this.getTeacher();break;case 1:Object(i._4)(this.dialogObj.id).then(function(e){t.form={teacher_id:parseInt(e.teacher_id),max_join_num:e.max_join_num},t.getTeacher()})}},getPeriodList:function(){var t=this;Object(i._13)().then(function(e){e.list.forEach(function(t){t.children=[]}),t.goodsList=e.list,t.periods||Object(i._19)({goods_id:t.goodsList[0].id}).then(function(e){e.list.forEach(function(t){t.name=t.title}),t.goodsList[0].children=e.list,t.periods=e.list[0]})})},onSave:function(){var t=this;switch(this.dialogObj.type){case 0:var e=this.dialogObj.periodsId?this.dialogObj.periodsId:this.periods.id;Object(i.f)(e,this.form).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.$emit("reflash",t.periods),t.dialogObj.show=!1});break;case 1:Object(i.M)(this.dialogObj.id,this.form).then(function(e){t.$message({type:"success",message:"修改成功!"}),t.$emit("reflash",t.periods),t.dialogObj.show=!1})}},handleItemChange:function(t){var e=this;Object(i._19)({goods_id:t[0]}).then(function(n){n.list.forEach(function(t){t.name=t.title}),e.goodsList.find(function(e){return e.id===t[0]}).children=n.list})},changePeriods:function(t){if(t.length>1){var e=this.goodsList.find(function(e){return e.id===t[0]});this.periods=e.children.find(function(e){return e.id===t[1]}),this.getTeacherByPeriods()}}},watch:{dialogObj:function(t){this.initPage()}}},o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{attrs:{title:t.dialogObj.title,visible:t.dialogObj.show},on:{"update:visible":function(e){t.$set(t.dialogObj,"show",e)}}},[n("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px"}},[this.dialogObj.periodsId?t._e():n("el-form-item",{attrs:{label:"期数"}},[n("el-cascader",{attrs:{options:t.goodsList,props:{value:"id",label:"name"}},on:{"active-item-change":t.handleItemChange,change:t.changePeriods}})],1),t._v(" "),n("el-form-item",{attrs:{label:"老师"}},[n("el-select",{attrs:{placeholder:"请选择"},model:{value:t.form.teacher_id,callback:function(e){t.$set(t.form,"teacher_id",e)},expression:"form.teacher_id"}},t._l(t.teacherList,function(t,e){return n("el-option",{key:e,attrs:{label:t.name,value:t.id}})}))],1),t._v(" "),n("el-form-item",{attrs:{label:"最大学员"}},[n("el-input-number",{model:{value:t.form.max_join_num,callback:function(e){t.$set(t.form,"max_join_num",e)},expression:"form.max_join_num"}})],1)],1),t._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.dialogObj.show=!1}}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.onSave}},[t._v("确 定")])],1)],1)};o._withStripped=!0;var a={render:o,staticRenderFns:[]},r=a;var l=!1;var c=n("VU/8")(s,r,!1,function(t){l||n("JP4Q")},"data-v-e25797c8",null);c.options.__file="src\\components\\class\\dialog.vue";var d=c.exports,u=n("kmJW"),_=n("+TkF"),f={name:"userList",props:["userObj"],data:function(){return{userTable:[],addId:"",lookDetail:{show:!1,loading:!1,list:[]},addShow:!1,userList:[],nowPage:1,limit:5,total:0,searchFrom:{userId:"",nickName:"",mobile:""},multipleSelection:[]}},components:{page:u.a},filters:{isOrNot:function(t){return _.h[t]},percent:function(t){return(100*t).toFixed(2)+"%"}},methods:{userLook:function(t){var e=this;this.lookDetail.show=!0,this.lookDetail.loading=!0,Object(i._47)(t.periods_id,t.id).then(function(t){e.lookDetail.list=t.list,e.lookDetail.loading=!1})},initPage:function(){var t=this;Object(i._7)(this.userObj.classId).then(function(e){t.userTable=e.list})},changeUser:function(t){var e=this;this.$confirm("此操作将修改成员看课权限?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.p)(t.id,{is_view_course:0===t.is_view_course?1:0}).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.initPage()})})},onDel:function(t){var e=this;this.$confirm("此操作将删除该成员?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.x)(t.id).then(function(t){e.$message({type:"success",message:"删除成功!"}),e.initPage()})})},onAdd:function(){var t=this;0!==this.multipleSelection.length?1===this.multipleSelection.length?(this.addId=this.multipleSelection[0].user_id,this.addId&&Object(i.g)(this.userObj.classId,this.addId,{is_buy:0}).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.addShow=!1,t.initPage()})):this.$message({type:"error",message:"只能选择一个用户!"}):this.$message({type:"error",message:"请选择用户!"})},onAddUser:function(){this.addShow=!0,this.getUser()},getUser:function(){var t=this,e={page:this.nowPage,limit:this.limit};this.searchFrom.userId&&(e.user_id=this.searchFrom.userId),this.searchFrom.nickName&&(e.nickname=this.searchFrom.nickName),this.searchFrom.mobile&&(e.mobile=this.searchFrom.mobile),Object(i._31)(e).then(function(e){t.userList=e.list,t.total=e.total})},onPageChange:function(t){this.nowPage=t,this.getUser()},handleSelectionChange:function(t){this.multipleSelection=t},editComment:function(t,e){var n=this;this.$prompt("","编辑备注",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:e}).then(function(e){var s=e.value;Object(i.k)(t,{desc:s}).then(function(t){n.$message({type:"success",message:"编辑备注成功"}),n.initPage()})})}},watch:{userObj:function(){this.initPage()}}},h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{attrs:{title:t.userObj.title,visible:t.userObj.show,modal:!1,fullscreen:!0},on:{"update:visible":function(e){t.$set(t.userObj,"show",e)}}},[n("div",[n("el-form",{attrs:{"label-width":"90px",inline:""}},[n("el-form-item",{staticStyle:{float:"right"}},[t.$store.state.readonly?t._e():n("el-button",{attrs:{type:"success"},on:{click:t.onAddUser}},[t._v("+添加用户")])],1)],1),t._v(" "),n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.userTable}},[n("el-table-column",{attrs:{label:"用户",className:"f-c"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("img",{staticStyle:{"margin-right":"5px",width:"50px",height:"50px","border-radius":"50px"},attrs:{src:e.row.avatar}}),t._v(" "+t._s(e.row.nickname)+"(ID:"+t._s(e.row.user_id)+")\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"是否购买"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(0===e.row.is_buy?"否":"是")+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"看课权限"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("isOrNot")(e.row.is_view_course))+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"desc",label:"备注"}}),t._v(" "),n("el-table-column",{attrs:{label:"最后登录时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.last_login_at)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"看课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.watch_course_rate)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"课包查看次数"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.watch_course_num)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"学习时长(分)"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(Math.round(e.row.watch_course_time/60*100)/100)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"作业率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("percent")(e.row.work_rate))+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"打卡率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("percent")(e.row.clock_rate))+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"续费情况"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("isOrNot")(e.row.is_continue_buy))+"\n ")]}}])}),t._v(" "),t.$store.state.readonly?t._e():n("el-table-column",{attrs:{label:"操作",width:"300"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.$store.state.readonly?t._e():n("el-button",{attrs:{type:"warning",size:"mini"},on:{click:function(n){t.editComment(e.row.id,e.row.desc)}}},[t._v("编辑备注")]),t._v(" "),t.$store.state.readonly?t._e():n("el-button",{attrs:{type:"warning",size:"mini"},on:{click:function(n){t.changeUser(e.row)}}},[t._v("看课权限")]),t._v(" "),t.$store.state.readonly?t._e():n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(n){t.userLook(e.row)}}},[t._v("看课情况")]),t._v(" "),t.$store.state.deletePermission&&!t.$store.state.readonly?n("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(n){t.onDel(e.row)}}},[t._v("删除")]):t._e()]}}])})],1)],1),t._v(" "),n("el-dialog",{attrs:{modal:!1,visible:t.addShow},on:{"update:visible":function(e){t.addShow=e}}},[n("el-form",{attrs:{"label-width":"90px"}},[n("el-row",[n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"ID"}},[n("el-input",{model:{value:t.searchFrom.userId,callback:function(e){t.$set(t.searchFrom,"userId",e)},expression:"searchFrom.userId"}})],1)],1),t._v(" "),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"昵称"}},[n("el-input",{model:{value:t.searchFrom.nickName,callback:function(e){t.$set(t.searchFrom,"nickName",e)},expression:"searchFrom.nickName"}})],1)],1),t._v(" "),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"电话"}},[n("el-input",{model:{value:t.searchFrom.mobile,callback:function(e){t.$set(t.searchFrom,"mobile",e)},expression:"searchFrom.mobile"}})],1)],1)],1),t._v(" "),n("el-row",[n("el-col",{attrs:{span:8,offset:16}},[n("el-form-item",[n("el-button",{staticStyle:{float:"right"},attrs:{type:"primary",plain:""},on:{click:t.getUser}},[t._v("搜索")])],1)],1)],1)],1),t._v(" "),n("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.userList},on:{"selection-change":t.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),n("el-table-column",{attrs:{className:"f-c",label:"用户"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("img",{staticStyle:{"margin-right":"5px",width:"50px",height:"50px","border-radius":"50px"},attrs:{src:e.row.avatar}}),t._v(t._s(e.row.nickname)+"(ID:"+t._s(e.row.user_id)+")\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"mobile",label:"手机号"}})],1),t._v(" "),n("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange}}),t._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.addShow=!1}}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.onAdd}},[t._v("确 定")])],1)],1),t._v(" "),n("el-dialog",{attrs:{modal:!1,visible:t.lookDetail.show},on:{"update:visible":function(e){t.$set(t.lookDetail,"show",e)}}},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.lookDetail.loading,expression:"lookDetail.loading"}],staticStyle:{width:"100%"},attrs:{data:t.lookDetail.list}},[n("el-table-column",{attrs:{prop:"start_at",label:"日期"}}),t._v(" "),n("el-table-column",{attrs:{label:"爸妈看一看"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.watch_list&&e.row.watch_list.length>0&&e.row.watch_list.find(function(t){return 1===t.page_id})?n("span",[t._v("\n 学习时长:"+t._s(e.row.watch_list.find(function(t){return 1===t.page_id}).stay_time)+"\n ")]):t._e(),t._v(" "),e.row.watch_list.find(function(t){return 1===t.page_id})?t._e():n("span",[t._v("\n 暂未上课\n ")])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"宝贝玩一玩"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.watch_list&&e.row.watch_list.length>0&&e.row.watch_list.find(function(t){return 1===t.page_id})?n("span",[t._v("\n 学习时长:"+t._s(e.row.watch_list.find(function(t){return 2===t.page_id}).stay_time)+"\n ")]):t._e(),t._v(" "),e.row.watch_list.find(function(t){return 1===t.page_id})?t._e():n("span",[t._v("\n 暂未上课\n ")])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"爸妈秀宝贝"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.watch_list&&e.row.watch_list.length>0&&e.row.watch_list.find(function(t){return 1===t.page_id})?n("span",[t._v("\n 学习记录:"),n("div",{domProps:{innerHTML:t._s(e.row.watch_list.find(function(t){return 0===t.page_id}).learn_report)}}),t._v(t._s(e.row.watch_list.find(function(t){return 3===t.page_id}).stay_time)+"\n ")]):t._e(),t._v(" "),e.row.watch_list.find(function(t){return 1===t.page_id})?t._e():n("span",[t._v("\n 暂未上课\n ")])]}}])})],1)],1)],1)};h._withStripped=!0;var m={render:h,staticRenderFns:[]},p=m;var b=!1;var v=n("VU/8")(f,p,!1,function(t){b||n("nZHh")},null,null);v.options.__file="src\\components\\class\\userList.vue";var g={data:function(){return{nowPage:1,total:0,limit:10,periodsId:null,goodsList:[],teacher_id:"",classList:[],title:"",countObj:"",teacherList:[],userObj:{classId:"",title:"",show:!1},dialogObj:{show:!1,title:"添加班级",periodsId:"",type:0,id:0},selectedGoods:[]}},components:{UserList:v.exports,classDialog:d,page:u.a},filters:{classTypeFilter:function(t){var e=parseInt(t);return 1===e?"带班班级":2===e?"观摩班级":""},percent:function(t){return(100*t).toFixed(2)+"%"}},mounted:function(){this.initPage()},methods:{changeRow:function(t,e){e.indexOf(t)>-1&&Object(i._6)(t.periods_id,t.id).then(function(e){t.arrive_course_rate=e.arrive_course_rate,t.watch_course_rate=e.watch_course_rate,t.over_course_rate=e.over_course_rate,t.work_rate=e.work_rate,t.over_work_rate=e.over_work_rate,t.clock_rate=e.clock_rate,t.over_clock_rate=e.over_clock_rate,t.transform_rate=e.transform_rate})},initQuery:function(){var t=this,e=this.$route.query;e&&e.goods_id&&e.periods_id&&(this.selectedGoods=[parseInt(e.goods_id),parseInt(e.periods_id)],Object(i._19)({goods_id:this.selectedGoods[0]}).then(function(e){e.list.forEach(function(t){t.name=t.title}),t.goodsList.find(function(e){return e.id===t.selectedGoods[0]}).children=e.list;var n=t.goodsList.find(function(e){return e.id===t.selectedGoods[0]});t.periods=n.children.find(function(e){return e.id===t.selectedGoods[1]}),t.teacher_id="",t.getClassList()}))},initPage:function(){var t=this;Object(i._13)().then(function(e){e.list.forEach(function(t){t.children=[]}),t.goodsList=e.list,t.initQuery()})},showUser:function(t){this.userObj={classId:t.id,show:!0,title:t.teacher_name+"班级用户列表"}},getTeacher:function(){var t=this;this.periods&&Object(i._21)(this.periods.id).then(function(e){t.teacherList=e})},changePeriods:function(t){if(t.length>1){var e=this.goodsList.find(function(e){return e.id===t[0]});this.periods=e.children.find(function(e){return e.id===t[1]}),this.teacher_id="",this.getTeacher()}},onPageChange:function(t){this.nowPage=t,this.getClassList()},onReflash:function(t){this.periods=t,this.selectedGoods=[t.goods_id,t.id],this.getClassList()},getClassList:function(){var t=this;if(this.periods){this.getTeacher();var e={limit:this.limit,page:this.nowPage};this.teacher_id&&(e.teacher_id=this.teacher_id),Object(i._5)(this.periods.id,e).then(function(e){e.list.forEach(function(t){t.arrive_course_rate=0,t.watch_course_rate=0,t.over_course_rate=0,t.work_rate=0,t.over_work_rate=0,t.clock_rate=0,t.over_clock_rate=0,t.transform_rate=0}),t.title=e.periods,t.countObj=e.count?e.count:"",t.classList=e.list,t.total=e.total})}},handleItemChange:function(t){var e=this;Object(i._19)({goods_id:t[0]}).then(function(n){n.list.forEach(function(t){t.name=t.title}),e.goodsList.find(function(e){return e.id===t[0]}).children=n.list})},delClass:function(t){var e=this;this.$confirm("此操作将删除该班级?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.w)(t.id).then(function(t){e.$message({type:"success",message:"删除成功!"}),e.getClassList()})})},onAdd:function(){console.log("onAdd",this.periods),this.dialogObj={show:!0,title:"添加班级",type:0,teacherList:this.teacherList?this.teacherList:[]},this.periods&&(this.dialogObj.periods=this.periods,this.dialogObj.periodsId=this.periods.id)},editClass:function(t){this.dialogObj={show:!0,title:"编辑班级",type:1,id:t.id,teacherList:this.teacherList?this.teacherList:[]},this.periods&&(this.dialogObj.periods=this.periods,this.dialogObj.periodsId=this.periods.id)}}},w=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"class"},[n("div",{staticClass:"form-block"},[n("el-form",{attrs:{"label-width":"90px",inline:""}},[n("el-form-item",{attrs:{label:"期数"}},[n("el-cascader",{attrs:{options:t.goodsList,props:{value:"id",label:"name"}},on:{"active-item-change":t.handleItemChange,change:t.changePeriods},model:{value:t.selectedGoods,callback:function(e){t.selectedGoods=e},expression:"selectedGoods"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"老师"}},[n("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:t.teacher_id,callback:function(e){t.teacher_id=e},expression:"teacher_id"}},t._l(t.teacherList,function(t,e){return n("el-option",{key:e,attrs:{label:t.teacher_name,value:t.teacher_id}})}))],1),t._v(" "),n("el-form-item",{attrs:{label:""}},[n("el-button",{attrs:{type:"primary"},on:{click:t.getClassList}},[t._v("\n 搜索\n ")])],1),t._v(" "),n("el-form-item",{staticStyle:{float:"right"}},[t.$store.state.readonly?t._e():n("el-button",{attrs:{type:"success"},on:{click:t.onAdd}},[t._v("+添加班级")])],1)],1)],1),t._v(" "),t.classList&&t.classList.length>0?n("div",{staticClass:"intro"},[n("el-form",{attrs:{"label-width":"100px"}},[n("el-row",[n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"期数名称"}},[t._v(t._s(t.title.title))])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"可看课包数"}},[t._v(t._s(t.title.watch_num))])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"已看课包数"}},[t._v(t._s(t.title.has_watch_num))])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"开始时间"}},[t._v(t._s(t.title.start_at))])],1)],1),t._v(" "),n("el-row",[n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"老师数量"}},[t._v(t._s(t.countObj.count_teacher_num))])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"预计学员总数"}},[t._v(t._s(t.countObj.count_max_join_num))])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"学员总数"}},[t._v(t._s(t.countObj.count_join_num))])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"结束时间"}},[t._v(t._s(t.title.over_at))])],1)],1)],1)],1):t._e(),t._v(" "),t.classList&&0!==t.classList.length?t._e():n("div",[n("el-form",{attrs:{"label-width":"300px",inline:""}},[n("el-form-item",{attrs:{label:"暂无期数信息,请先选择期数"}})],1)],1),t._v(" "),n("div",[n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.classList},on:{"expand-change":t.changeRow}},[n("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-table",{staticStyle:{width:"100%"},attrs:{data:[e.row]}},[n("el-table-column",{attrs:{label:"到课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.arrive_course_rate)))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"看课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.watch_course_rate)))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"完课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.over_course_rate)))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"作业率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.work_rate)))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"全勤作业率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.over_work_rate)))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"打卡率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.clock_rate)))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"全勤打卡率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.over_clock_rate)))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"转化率"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("percent")(e.row.transform_rate)))])]}}])})],1)]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"teacher_name",label:"班主任"}}),t._v(" "),n("el-table-column",{attrs:{label:"班级类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("classTypeFilter")(e.row.type))+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"max_join_num",label:"最大人数"}}),t._v(" "),n("el-table-column",{attrs:{prop:"join_num",label:"现有人数"}}),t._v(" "),n("el-table-column",{attrs:{width:"250",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(n){t.showUser(e.row)}}},[t._v("班级成员")]),t._v(" "),t.$store.state.readonly?t._e():n("el-button",{attrs:{size:"mini",type:"warning"},on:{click:function(n){t.editClass(e.row)}}},[t._v("编辑")]),t._v(" "),t.$store.state.deletePermission&&!t.$store.state.readonly?n("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(n){t.delClass(e.row)}}},[t._v("删除")]):t._e()]}}])})],1)],1),t._v(" "),n("page",{attrs:{nowPage:t.nowPage,total:t.total,limit:t.limit},on:{pageChange:t.onPageChange}}),t._v(" "),n("class-dialog",{attrs:{dialogObj:t.dialogObj},on:{reflash:t.onReflash}}),t._v(" "),n("user-list",{attrs:{userObj:t.userObj},on:{reflash:t.getClassList}})],1)};w._withStripped=!0;var y={render:w,staticRenderFns:[]},k=y;var x=!1;var j=n("VU/8")(g,k,!1,function(t){x||(n("rKW7"),n("a1h3"))},"data-v-426dc2ae",null);j.options.__file="src\\components\\class\\index.vue";e.default=j.exports},a1h3:function(t,e,n){var i=n("1/HN");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n("rjj0")("171dfdde",i,!1,{})},nZHh:function(t,e,n){var i=n("tnil");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n("rjj0")("21b1deb2",i,!1,{})},rKW7:function(t,e,n){var i=n("NzM9");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n("rjj0")("94e58b82",i,!1,{})},tnil:function(t,e,n){(t.exports=n("FZ+f")(!0)).push([t.i,"\n.f-c > div{\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-flow: row nowrap;\n flex-flow: row nowrap;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n","",{version:3,sources:["D:/myproject/changchang-admin-new/src/components/class/userList.vue"],names:[],mappings:";AACA;EACE,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;EACd,+BAA+B;EAC/B,8BAA8B;MAC1B,0BAA0B;UACtB,sBAAsB;EAC9B,wBAAwB;MACpB,qBAAqB;UACjB,4BAA4B;EACpC,0BAA0B;MACtB,uBAAuB;UACnB,oBAAoB;CAC7B",file:"userList.vue",sourcesContent:["\n.f-c > div{\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-flow: row nowrap;\n flex-flow: row nowrap;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n"],sourceRoot:""}])}});
\ No newline at end of file
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(c,r,t){for(var o,d,b,i=0,u=[];i<c.length;i++)d=c[i],f[d]&&u.push(f[d][0]),f[d]=0;for(o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);for(a&&a(c,r,t);u.length;)u.shift()();if(t)for(i=0;i<t.length;i++)b=n(n.s=t[i]);return b};var c={},f={33:0};function n(a){if(c[a])return c[a].exports;var f=c[a]={i:a,l:!1,exports:{}};return e[a].call(f.exports,f,f.exports,n),f.l=!0,f.exports}n.e=function(e){var a=f[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var c=new Promise(function(c,n){a=f[e]=[c,n]});a[2]=c;var r=document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.charset="utf-8",t.async=!0,t.timeout=12e4,n.nc&&t.setAttribute("nonce",n.nc),t.src=n.p+"static/js/"+e+"."+{0:"5ca042217d5b9cb7d920",1:"1871934ca7b3a77934e5",2:"3faf640d37e133ae20de",3:"9894ce6b3759fc4267f2",4:"ca9711fc473f2d5d51fd",5:"0784f1f07b4fa27fcd36",6:"5513adfbecc524f15956",7:"08132a3517d8ac06a670",8:"ba6880baff2639ad9544",9:"6185b5dc1cbab93cdbf3",10:"8cb9adcd5aa0f85d8839",11:"1c8ca50a73415bf27def",12:"f6490be245f90afabc6f",13:"d3d020f7ae5dcb8756fd",14:"4881aaeec5577c553970",15:"e2f1692c4d5ce3f12106",16:"129c4f08663c78115241",17:"f8aba2b0c2853b11ea80",18:"890473049161348fce72",19:"3d106dc8f8d7aad659f5",20:"32d4eeaf129a9e03e625",21:"74a439bf1a0461033dab",22:"34ce9d13a07b04c5028e",23:"b89d8a468eee89413544",24:"67013d6ba2ad456617d8",25:"98e6c04d12b219478813",26:"6cd43dcb6c7f4ffc4921",27:"75fff564b6e3c5032daf",28:"51ae89493bf8e2545b84",29:"2ab4a390bf4296cec1a1",30:"a4cab5f9b5d37773496c"}[e]+".js";var o=setTimeout(d,12e4);function d(){t.onerror=t.onload=null,clearTimeout(o);var a=f[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return t.onerror=t.onload=d,r.appendChild(t),c},n.m=e,n.c=c,n.d=function(e,a,c){n.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},n.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(a,"a",a),a},n.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},n.p="/",n.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(c,t,f){for(var o,d,b,i=0,u=[];i<c.length;i++)d=c[i],n[d]&&u.push(n[d][0]),n[d]=0;for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);for(a&&a(c,t,f);u.length;)u.shift()();if(f)for(i=0;i<f.length;i++)b=r(r.s=f[i]);return b};var c={},n={33:0};function r(a){if(c[a])return c[a].exports;var n=c[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.e=function(e){var a=n[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var c=new Promise(function(c,r){a=n[e]=[c,r]});a[2]=c;var t=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,r.nc&&f.setAttribute("nonce",r.nc),f.src=r.p+"static/js/"+e+"."+{0:"5ca042217d5b9cb7d920",1:"1871934ca7b3a77934e5",2:"3faf640d37e133ae20de",3:"9894ce6b3759fc4267f2",4:"ca9711fc473f2d5d51fd",5:"074852d5a77deed7f02a",6:"5513adfbecc524f15956",7:"08132a3517d8ac06a670",8:"ba6880baff2639ad9544",9:"6185b5dc1cbab93cdbf3",10:"8cb9adcd5aa0f85d8839",11:"1c8ca50a73415bf27def",12:"f6490be245f90afabc6f",13:"d3d020f7ae5dcb8756fd",14:"4881aaeec5577c553970",15:"e2f1692c4d5ce3f12106",16:"129c4f08663c78115241",17:"f8aba2b0c2853b11ea80",18:"890473049161348fce72",19:"3d106dc8f8d7aad659f5",20:"32d4eeaf129a9e03e625",21:"74a439bf1a0461033dab",22:"34ce9d13a07b04c5028e",23:"b89d8a468eee89413544",24:"67013d6ba2ad456617d8",25:"98e6c04d12b219478813",26:"6cd43dcb6c7f4ffc4921",27:"75fff564b6e3c5032daf",28:"51ae89493bf8e2545b84",29:"2ab4a390bf4296cec1a1",30:"a4cab5f9b5d37773496c"}[e]+".js";var o=setTimeout(d,12e4);function d(){f.onerror=f.onload=null,clearTimeout(o);var a=n[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return f.onerror=f.onload=d,t.appendChild(f),c},r.m=e,r.c=c,r.d=function(e,a,c){r.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},r.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(a,"a",a),a},r.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},r.p="/",r.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=never><link rel=stylesheet href=https://at.alicdn.com/t/font_746649_7dsnjecwkpg.css><title>唱唱启蒙-后台</title><link href=/static/css/app.c0ccfe4f9ac370bfc34d293c1aa36530.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.0703230a961ac91d905d.js></script><script type=text/javascript src=/static/js/vendor.870830d4f06345c43c87.js></script><script type=text/javascript src=/static/js/app.9f92cfe99a9e477c7436.js></script></body><script>let el = document.getElementsByTagName("script");
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=never><link rel=stylesheet href=https://at.alicdn.com/t/font_746649_7dsnjecwkpg.css><title>唱唱启蒙-后台</title><link href=/static/css/app.c0ccfe4f9ac370bfc34d293c1aa36530.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.b2e331749cbc0fbd48f1.js></script><script type=text/javascript src=/static/js/vendor.870830d4f06345c43c87.js></script><script type=text/javascript src=/static/js/app.9f92cfe99a9e477c7436.js></script></body><script>let el = document.getElementsByTagName("script");
el.onerror = function(a,b,c){
console.log('error:',a,b,c);
};
......
webpackJsonp([6],{"+Xdu":function(t,e){},OX9A:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i("CCn6"),n={props:["dialogObj"],data:function(){return{form:{teacher_id:"",max_join_num:""},teacherList:[],exitTeacherList:[],goodsList:[],periods:{}}},methods:{findDifferentArray:function(t,e){var i=[];return t.forEach(function(t){-1===e.findIndex(function(e){return e.teacher_id==t.id})&&i.push(t)}),i},getTeacher:function(){var t=this;this.exitTeacherList=this.dialogObj.teacherList.length>0?this.dialogObj.teacherList:[],Object(s._29)().then(function(e){if(t.exitTeacherList.length>0){if(t.teacherList=t.findDifferentArray(e.list,t.exitTeacherList),t.form.teacher_id&&-1===t.teacherList.findIndex(function(e){return e.id==t.form.teacher_id})){var i=e.list.find(function(e){return e.id==t.form.teacher_id});t.teacherList.push(i)}}else t.teacherList=e.list})},getTeacherByPeriods:function(){var t=this;Object(s._21)(this.periods.id).then(function(e){t.exitTeacherList=e,Object(s._29)().then(function(e){t.exitTeacherList.length>0?t.teacherList=t.findDifferentArray(e.list,t.exitTeacherList):t.teacherList=e.list})})},initPage:function(){var t=this;switch(this.periods=this.dialogObj.periods,this.dialogObj.type){case 0:this.dialogObj.periodsId||this.getPeriodList(),this.form={teacher_id:"",max_join_num:""},this.getTeacher();break;case 1:Object(s._4)(this.dialogObj.id).then(function(e){t.form={teacher_id:parseInt(e.teacher_id),max_join_num:e.max_join_num},t.getTeacher()})}},getPeriodList:function(){var t=this;Object(s._13)().then(function(e){e.list.forEach(function(t){t.children=[]}),t.goodsList=e.list,t.periods||Object(s._19)({goods_id:t.goodsList[0].id}).then(function(e){e.list.forEach(function(t){t.name=t.title}),t.goodsList[0].children=e.list,t.periods=e.list[0]})})},onSave:function(){var t=this;switch(this.dialogObj.type){case 0:var e=this.dialogObj.periodsId?this.dialogObj.periodsId:this.periods.id;Object(s.f)(e,this.form).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.$emit("reflash",t.periods),t.dialogObj.show=!1});break;case 1:Object(s.M)(this.dialogObj.id,this.form).then(function(e){t.$message({type:"success",message:"修改成功!"}),t.$emit("reflash",t.periods),t.dialogObj.show=!1})}},handleItemChange:function(t){var e=this;Object(s._19)({goods_id:t[0]}).then(function(i){i.list.forEach(function(t){t.name=t.title}),e.goodsList.find(function(e){return e.id===t[0]}).children=i.list})},changePeriods:function(t){if(t.length>1){var e=this.goodsList.find(function(e){return e.id===t[0]});this.periods=e.children.find(function(e){return e.id===t[1]}),this.getTeacherByPeriods()}}},watch:{dialogObj:function(t){this.initPage()}}},o={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{title:t.dialogObj.title,visible:t.dialogObj.show},on:{"update:visible":function(e){t.$set(t.dialogObj,"show",e)}}},[i("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px"}},[this.dialogObj.periodsId?t._e():i("el-form-item",{attrs:{label:"期数"}},[i("el-cascader",{attrs:{options:t.goodsList,props:{value:"id",label:"name"}},on:{"active-item-change":t.handleItemChange,change:t.changePeriods}})],1),t._v(" "),i("el-form-item",{attrs:{label:"老师"}},[i("el-select",{attrs:{placeholder:"请选择"},model:{value:t.form.teacher_id,callback:function(e){t.$set(t.form,"teacher_id",e)},expression:"form.teacher_id"}},t._l(t.teacherList,function(t,e){return i("el-option",{key:e,attrs:{label:t.name,value:t.id}})}))],1),t._v(" "),i("el-form-item",{attrs:{label:"最大学员"}},[i("el-input-number",{model:{value:t.form.max_join_num,callback:function(e){t.$set(t.form,"max_join_num",e)},expression:"form.max_join_num"}})],1)],1),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.dialogObj.show=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.onSave}},[t._v("确 定")])],1)],1)},staticRenderFns:[]};var a=i("VU/8")(n,o,!1,function(t){i("pe1i")},"data-v-46142434",null).exports,r=i("kmJW"),l=i("+TkF"),c={name:"userList",props:["userObj"],data:function(){return{userTable:[],addId:"",lookDetail:{show:!1,loading:!1,list:[]},addShow:!1,userList:[],nowPage:1,limit:5,total:0,searchFrom:{userId:"",nickName:"",mobile:""},multipleSelection:[]}},components:{page:r.a},filters:{isOrNot:function(t){return l.h[t]},percent:function(t){return(100*t).toFixed(2)+"%"}},methods:{userLook:function(t){var e=this;this.lookDetail.show=!0,this.lookDetail.loading=!0,Object(s._47)(t.periods_id,t.id).then(function(t){e.lookDetail.list=t.list,e.lookDetail.loading=!1})},initPage:function(){var t=this;Object(s._7)(this.userObj.classId).then(function(e){t.userTable=e.list})},changeUser:function(t){var e=this;this.$confirm("此操作将修改成员看课权限?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.p)(t.id,{is_view_course:0===t.is_view_course?1:0}).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.initPage()})})},onDel:function(t){var e=this;this.$confirm("此操作将删除该成员?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.x)(t.id).then(function(t){e.$message({type:"success",message:"删除成功!"}),e.initPage()})})},onAdd:function(){var t=this;0!==this.multipleSelection.length?1===this.multipleSelection.length?(this.addId=this.multipleSelection[0].user_id,this.addId&&Object(s.g)(this.userObj.classId,this.addId,{is_buy:0}).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.addShow=!1,t.initPage()})):this.$message({type:"error",message:"只能选择一个用户!"}):this.$message({type:"error",message:"请选择用户!"})},onAddUser:function(){this.addShow=!0,this.getUser()},getUser:function(){var t=this,e={page:this.nowPage,limit:this.limit};this.searchFrom.userId&&(e.user_id=this.searchFrom.userId),this.searchFrom.nickName&&(e.nickname=this.searchFrom.nickName),this.searchFrom.mobile&&(e.mobile=this.searchFrom.mobile),Object(s._31)(e).then(function(e){t.userList=e.list,t.total=e.total})},onPageChange:function(t){this.nowPage=t,this.getUser()},handleSelectionChange:function(t){this.multipleSelection=t},editComment:function(t,e){var i=this;this.$prompt("","编辑备注",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:e}).then(function(e){var n=e.value;Object(s.k)(t,{desc:n}).then(function(t){i.$message({type:"success",message:"编辑备注成功"}),i.initPage()})})}},watch:{userObj:function(){this.initPage()}}},u={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{title:t.userObj.title,visible:t.userObj.show,modal:!1,fullscreen:!0},on:{"update:visible":function(e){t.$set(t.userObj,"show",e)}}},[i("div",[i("el-form",{attrs:{"label-width":"90px",inline:""}},[i("el-form-item",{staticStyle:{float:"right"}},[t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"success"},on:{click:t.onAddUser}},[t._v("+添加用户")])],1)],1),t._v(" "),i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.userTable}},[i("el-table-column",{attrs:{label:"用户",className:"f-c"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("img",{staticStyle:{"margin-right":"5px",width:"50px",height:"50px","border-radius":"50px"},attrs:{src:e.row.avatar}}),t._v(" "+t._s(e.row.nickname)+"(ID:"+t._s(e.row.user_id)+")\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"是否购买"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(0===e.row.is_buy?"否":"是")+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"看课权限"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("isOrNot")(e.row.is_view_course))+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"desc",label:"备注"}}),t._v(" "),i("el-table-column",{attrs:{label:"最后登录时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.last_login_at)+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"看课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.watch_course_rate)+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"课包查看次数"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.watch_course_num)+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"学习时长(分)"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(Math.round(e.row.watch_course_time/60*100)/100)+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"作业率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("percent")(e.row.work_rate))+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"打卡率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("percent")(e.row.clock_rate))+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"续费情况"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("isOrNot")(e.row.is_continue_buy))+"\n ")]}}])}),t._v(" "),t.$store.state.readonly?t._e():i("el-table-column",{attrs:{label:"操作",width:"300"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"warning",size:"mini"},on:{click:function(i){t.editComment(e.row.id,e.row.desc)}}},[t._v("编辑备注")]),t._v(" "),t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"warning",size:"mini"},on:{click:function(i){t.changeUser(e.row)}}},[t._v("看课权限")]),t._v(" "),t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(i){t.userLook(e.row)}}},[t._v("看课情况")]),t._v(" "),t.$store.state.deletePermission&&!t.$store.state.readonly?i("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(i){t.onDel(e.row)}}},[t._v("删除")]):t._e()]}}])})],1)],1),t._v(" "),i("el-dialog",{attrs:{modal:!1,visible:t.addShow},on:{"update:visible":function(e){t.addShow=e}}},[i("el-form",{attrs:{"label-width":"90px"}},[i("el-row",[i("el-col",{attrs:{span:8}},[i("el-form-item",{attrs:{label:"ID"}},[i("el-input",{model:{value:t.searchFrom.userId,callback:function(e){t.$set(t.searchFrom,"userId",e)},expression:"searchFrom.userId"}})],1)],1),t._v(" "),i("el-col",{attrs:{span:8}},[i("el-form-item",{attrs:{label:"昵称"}},[i("el-input",{model:{value:t.searchFrom.nickName,callback:function(e){t.$set(t.searchFrom,"nickName",e)},expression:"searchFrom.nickName"}})],1)],1),t._v(" "),i("el-col",{attrs:{span:8}},[i("el-form-item",{attrs:{label:"电话"}},[i("el-input",{model:{value:t.searchFrom.mobile,callback:function(e){t.$set(t.searchFrom,"mobile",e)},expression:"searchFrom.mobile"}})],1)],1)],1),t._v(" "),i("el-row",[i("el-col",{attrs:{span:8,offset:16}},[i("el-form-item",[i("el-button",{staticStyle:{float:"right"},attrs:{type:"primary",plain:""},on:{click:t.getUser}},[t._v("搜索")])],1)],1)],1)],1),t._v(" "),i("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.userList},on:{"selection-change":t.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),i("el-table-column",{attrs:{className:"f-c",label:"用户"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("img",{staticStyle:{"margin-right":"5px",width:"50px",height:"50px","border-radius":"50px"},attrs:{src:e.row.avatar}}),t._v(t._s(e.row.nickname)+"(ID:"+t._s(e.row.user_id)+")\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"mobile",label:"手机号"}})],1),t._v(" "),i("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange}}),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.addShow=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.onAdd}},[t._v("确 定")])],1)],1),t._v(" "),i("el-dialog",{attrs:{modal:!1,visible:t.lookDetail.show},on:{"update:visible":function(e){t.$set(t.lookDetail,"show",e)}}},[i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.lookDetail.loading,expression:"lookDetail.loading"}],staticStyle:{width:"100%"},attrs:{data:t.lookDetail.list}},[i("el-table-column",{attrs:{prop:"start_at",label:"日期"}}),t._v(" "),i("el-table-column",{attrs:{label:"爸妈看一看"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.watch_list&&e.row.watch_list.length>0&&e.row.watch_list.find(function(t){return 1===t.page_id})?i("span",[t._v("\n 学习时长:"+t._s(e.row.watch_list.find(function(t){return 1===t.page_id}).stay_time)+"\n ")]):t._e(),t._v(" "),e.row.watch_list.find(function(t){return 1===t.page_id})?t._e():i("span",[t._v("\n 暂未上课\n ")])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"宝贝玩一玩"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.watch_list&&e.row.watch_list.length>0&&e.row.watch_list.find(function(t){return 1===t.page_id})?i("span",[t._v("\n 学习时长:"+t._s(e.row.watch_list.find(function(t){return 2===t.page_id}).stay_time)+"\n ")]):t._e(),t._v(" "),e.row.watch_list.find(function(t){return 1===t.page_id})?t._e():i("span",[t._v("\n 暂未上课\n ")])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"爸妈秀宝贝"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.watch_list&&e.row.watch_list.length>0&&e.row.watch_list.find(function(t){return 1===t.page_id})?i("span",[t._v("\n 学习记录:"),i("div",{domProps:{innerHTML:t._s(e.row.watch_list.find(function(t){return 0===t.page_id}).learn_report)}}),t._v(t._s(e.row.watch_list.find(function(t){return 3===t.page_id}).stay_time)+"\n ")]):t._e(),t._v(" "),e.row.watch_list.find(function(t){return 1===t.page_id})?t._e():i("span",[t._v("\n 暂未上课\n ")])]}}])})],1)],1)],1)},staticRenderFns:[]};var d={data:function(){return{nowPage:1,total:0,limit:10,periodsId:null,goodsList:[],teacher_id:"",classList:[],title:"",countObj:"",teacherList:[],userObj:{classId:"",title:"",show:!1},dialogObj:{show:!1,title:"添加班级",periodsId:"",type:0,id:0},selectedGoods:[]}},components:{UserList:i("VU/8")(c,u,!1,function(t){i("zrzO")},null,null).exports,classDialog:a,page:r.a},filters:{classTypeFilter:function(t){var e=parseInt(t);return 1===e?"带班班级":2===e?"观摩班级":""},percent:function(t){return(100*t).toFixed(2)+"%"}},mounted:function(){this.initPage()},methods:{changeRow:function(t,e){e.indexOf(t)>-1&&Object(s._6)(t.periods_id,t.id).then(function(e){t.arrive_course_rate=e.arrive_course_rate,t.watch_course_rate=e.watch_course_rate,t.over_course_rate=e.over_course_rate,t.work_rate=e.work_rate,t.over_work_rate=e.over_work_rate,t.clock_rate=e.clock_rate,t.over_clock_rate=e.over_clock_rate,t.transform_rate=e.transform_rate})},initQuery:function(){var t=this,e=this.$route.query;e&&e.goods_id&&e.periods_id&&(this.selectedGoods=[parseInt(e.goods_id),parseInt(e.periods_id)],Object(s._19)({goods_id:this.selectedGoods[0]}).then(function(e){e.list.forEach(function(t){t.name=t.title}),t.goodsList.find(function(e){return e.id===t.selectedGoods[0]}).children=e.list;var i=t.goodsList.find(function(e){return e.id===t.selectedGoods[0]});t.periods=i.children.find(function(e){return e.id===t.selectedGoods[1]}),t.teacher_id="",t.getClassList()}))},initPage:function(){var t=this;Object(s._13)().then(function(e){e.list.forEach(function(t){t.children=[]}),t.goodsList=e.list,t.initQuery()})},showUser:function(t){this.userObj={classId:t.id,show:!0,title:t.teacher_name+"班级用户列表"}},getTeacher:function(){var t=this;this.periods&&Object(s._21)(this.periods.id).then(function(e){t.teacherList=e})},changePeriods:function(t){if(t.length>1){var e=this.goodsList.find(function(e){return e.id===t[0]});this.periods=e.children.find(function(e){return e.id===t[1]}),this.teacher_id="",this.getTeacher()}},onPageChange:function(t){this.nowPage=t,this.getClassList()},onReflash:function(t){this.periods=t,this.selectedGoods=[t.goods_id,t.id],this.getClassList()},getClassList:function(){var t=this;if(this.periods){this.getTeacher();var e={limit:this.limit,page:this.nowPage};this.teacher_id&&(e.teacher_id=this.teacher_id),Object(s._5)(this.periods.id,e).then(function(e){e.list.forEach(function(t){t.arrive_course_rate=0,t.watch_course_rate=0,t.over_course_rate=0,t.work_rate=0,t.over_work_rate=0,t.clock_rate=0,t.over_clock_rate=0,t.transform_rate=0}),t.title=e.periods,t.countObj=e.count?e.count:"",t.classList=e.list,t.total=e.total})}},handleItemChange:function(t){var e=this;Object(s._19)({goods_id:t[0]}).then(function(i){i.list.forEach(function(t){t.name=t.title}),e.goodsList.find(function(e){return e.id===t[0]}).children=i.list})},delClass:function(t){var e=this;this.$confirm("此操作将删除该班级?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.w)(t.id).then(function(t){e.$message({type:"success",message:"删除成功!"}),e.getClassList()})})},onAdd:function(){console.log("onAdd",this.periods),this.dialogObj={show:!0,title:"添加班级",type:0,teacherList:this.teacherList?this.teacherList:[]},this.periods&&(this.dialogObj.periods=this.periods,this.dialogObj.periodsId=this.periods.id)},editClass:function(t){this.dialogObj={show:!0,title:"编辑班级",type:1,id:t.id,teacherList:this.teacherList?this.teacherList:[]},this.periods&&(this.dialogObj.periods=this.periods,this.dialogObj.periodsId=this.periods.id)}}},_={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"class"},[i("div",{staticClass:"form-block"},[i("el-form",{attrs:{"label-width":"90px",inline:""}},[i("el-form-item",{attrs:{label:"期数"}},[i("el-cascader",{attrs:{options:t.goodsList,props:{value:"id",label:"name"}},on:{"active-item-change":t.handleItemChange,change:t.changePeriods},model:{value:t.selectedGoods,callback:function(e){t.selectedGoods=e},expression:"selectedGoods"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"老师"}},[i("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:t.teacher_id,callback:function(e){t.teacher_id=e},expression:"teacher_id"}},t._l(t.teacherList,function(t,e){return i("el-option",{key:e,attrs:{label:t.teacher_name,value:t.teacher_id}})}))],1),t._v(" "),i("el-form-item",{attrs:{label:""}},[i("el-button",{attrs:{type:"primary"},on:{click:t.getClassList}},[t._v("\n 搜索\n ")])],1),t._v(" "),i("el-form-item",{staticStyle:{float:"right"}},[t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"success"},on:{click:t.onAdd}},[t._v("+添加班级")])],1)],1)],1),t._v(" "),t.classList&&t.classList.length>0?i("div",{staticClass:"intro"},[i("el-form",{attrs:{"label-width":"100px"}},[i("el-row",[i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"期数名称"}},[t._v(t._s(t.title.title))])],1),t._v(" "),i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"可看课包数"}},[t._v(t._s(t.title.watch_num))])],1),t._v(" "),i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"已看课包数"}},[t._v(t._s(t.title.has_watch_num))])],1),t._v(" "),i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"开始时间"}},[t._v(t._s(t.title.start_at))])],1)],1),t._v(" "),i("el-row",[i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"老师数量"}},[t._v(t._s(t.countObj.count_teacher_num))])],1),t._v(" "),i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"预计学员总数"}},[t._v(t._s(t.countObj.count_max_join_num))])],1),t._v(" "),i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"学员总数"}},[t._v(t._s(t.countObj.count_join_num))])],1),t._v(" "),i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"结束时间"}},[t._v(t._s(t.title.over_at))])],1)],1)],1)],1):t._e(),t._v(" "),t.classList&&0!==t.classList.length?t._e():i("div",[i("el-form",{attrs:{"label-width":"300px",inline:""}},[i("el-form-item",{attrs:{label:"暂无期数信息,请先选择期数"}})],1)],1),t._v(" "),i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.classList},on:{"expand-change":t.changeRow}},[i("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-table",{staticStyle:{width:"100%"},attrs:{data:[e.row]}},[i("el-table-column",{attrs:{label:"到课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.arrive_course_rate)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"看课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.watch_course_rate)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"完课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.over_course_rate)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"作业率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.work_rate)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"全勤作业率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.over_work_rate)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"打卡率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.clock_rate)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"全勤打卡率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.over_clock_rate)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"转化率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.transform_rate)))])]}}])})],1)]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"teacher_name",label:"班主任"}}),t._v(" "),i("el-table-column",{attrs:{label:"班级类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("classTypeFilter")(e.row.type))+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"max_join_num",label:"最大人数"}}),t._v(" "),i("el-table-column",{attrs:{prop:"join_num",label:"现有人数"}}),t._v(" "),i("el-table-column",{attrs:{width:"250",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(i){t.showUser(e.row)}}},[t._v("班级成员")]),t._v(" "),t.$store.state.readonly?t._e():i("el-button",{attrs:{size:"mini",type:"warning"},on:{click:function(i){t.editClass(e.row)}}},[t._v("编辑")]),t._v(" "),t.$store.state.deletePermission&&!t.$store.state.readonly?i("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(i){t.delClass(e.row)}}},[t._v("删除")]):t._e()]}}])})],1)],1),t._v(" "),i("page",{attrs:{nowPage:t.nowPage,total:t.total,limit:t.limit},on:{pageChange:t.onPageChange}}),t._v(" "),i("class-dialog",{attrs:{dialogObj:t.dialogObj},on:{reflash:t.onReflash}}),t._v(" "),i("user-list",{attrs:{userObj:t.userObj},on:{reflash:t.getClassList}})],1)},staticRenderFns:[]};var h=i("VU/8")(d,_,!1,function(t){i("Xcol"),i("+Xdu")},"data-v-2b54d131",null);e.default=h.exports},Xcol:function(t,e){},pe1i:function(t,e){},zrzO:function(t,e){}});
\ No newline at end of file
webpackJsonp([6],{"+Xdu":function(t,e){},OX9A:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i("CCn6"),n={props:["dialogObj"],data:function(){return{form:{teacher_id:"",max_join_num:""},teacherList:[],exitTeacherList:[],goodsList:[],periods:{}}},methods:{findDifferentArray:function(t,e){var i=[];return t.forEach(function(t){-1===e.findIndex(function(e){return e.teacher_id==t.id})&&i.push(t)}),i},getTeacher:function(){var t=this;this.exitTeacherList=this.dialogObj.teacherList.length>0?this.dialogObj.teacherList:[],Object(s._29)().then(function(e){if(t.exitTeacherList.length>0){if(t.teacherList=t.findDifferentArray(e.list,t.exitTeacherList),t.form.teacher_id&&-1===t.teacherList.findIndex(function(e){return e.id==t.form.teacher_id})){var i=e.list.find(function(e){return e.id==t.form.teacher_id});t.teacherList.push(i)}}else t.teacherList=e.list})},getTeacherByPeriods:function(){var t=this;Object(s._21)(this.periods.id).then(function(e){t.exitTeacherList=e,Object(s._29)().then(function(e){t.exitTeacherList.length>0?t.teacherList=t.findDifferentArray(e.list,t.exitTeacherList):t.teacherList=e.list})})},initPage:function(){var t=this;switch(this.periods=this.dialogObj.periods,this.dialogObj.type){case 0:this.dialogObj.periodsId||this.getPeriodList(),this.form={teacher_id:"",max_join_num:""},this.getTeacher();break;case 1:Object(s._4)(this.dialogObj.id).then(function(e){t.form={teacher_id:parseInt(e.teacher_id),max_join_num:e.max_join_num},t.getTeacher()})}},getPeriodList:function(){var t=this;Object(s._13)().then(function(e){e.list.forEach(function(t){t.children=[]}),t.goodsList=e.list,t.periods||Object(s._19)({goods_id:t.goodsList[0].id}).then(function(e){e.list.forEach(function(t){t.name=t.title}),t.goodsList[0].children=e.list,t.periods=e.list[0]})})},onSave:function(){var t=this;switch(this.dialogObj.type){case 0:var e=this.dialogObj.periodsId?this.dialogObj.periodsId:this.periods.id;Object(s.f)(e,this.form).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.$emit("reflash",t.periods),t.dialogObj.show=!1});break;case 1:Object(s.M)(this.dialogObj.id,this.form).then(function(e){t.$message({type:"success",message:"修改成功!"}),t.$emit("reflash",t.periods),t.dialogObj.show=!1})}},handleItemChange:function(t){var e=this;Object(s._19)({goods_id:t[0]}).then(function(i){i.list.forEach(function(t){t.name=t.title}),e.goodsList.find(function(e){return e.id===t[0]}).children=i.list})},changePeriods:function(t){if(t.length>1){var e=this.goodsList.find(function(e){return e.id===t[0]});this.periods=e.children.find(function(e){return e.id===t[1]}),this.getTeacherByPeriods()}}},watch:{dialogObj:function(t){this.initPage()}}},o={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{title:t.dialogObj.title,visible:t.dialogObj.show},on:{"update:visible":function(e){t.$set(t.dialogObj,"show",e)}}},[i("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px"}},[this.dialogObj.periodsId?t._e():i("el-form-item",{attrs:{label:"期数"}},[i("el-cascader",{attrs:{options:t.goodsList,props:{value:"id",label:"name"}},on:{"active-item-change":t.handleItemChange,change:t.changePeriods}})],1),t._v(" "),i("el-form-item",{attrs:{label:"老师"}},[i("el-select",{attrs:{placeholder:"请选择"},model:{value:t.form.teacher_id,callback:function(e){t.$set(t.form,"teacher_id",e)},expression:"form.teacher_id"}},t._l(t.teacherList,function(t,e){return i("el-option",{key:e,attrs:{label:t.name,value:t.id}})}))],1),t._v(" "),i("el-form-item",{attrs:{label:"最大学员"}},[i("el-input-number",{model:{value:t.form.max_join_num,callback:function(e){t.$set(t.form,"max_join_num",e)},expression:"form.max_join_num"}})],1)],1),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.dialogObj.show=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.onSave}},[t._v("确 定")])],1)],1)},staticRenderFns:[]};var a=i("VU/8")(n,o,!1,function(t){i("pe1i")},"data-v-46142434",null).exports,r=i("kmJW"),l=i("+TkF"),c={name:"userList",props:["userObj"],data:function(){return{userTable:[],addId:"",lookDetail:{show:!1,loading:!1,list:[]},addShow:!1,userList:[],nowPage:1,limit:5,total:0,searchFrom:{userId:"",nickName:"",mobile:""},multipleSelection:[]}},components:{page:r.a},filters:{isOrNot:function(t){return l.h[t]},percent:function(t){return(100*t).toFixed(2)+"%"}},methods:{userLook:function(t){var e=this;this.lookDetail.show=!0,this.lookDetail.loading=!0,Object(s._47)(t.periods_id,t.id).then(function(t){e.lookDetail.list=t.list,e.lookDetail.loading=!1})},initPage:function(){var t=this;Object(s._7)(this.userObj.classId).then(function(e){t.userTable=e.list})},changeUser:function(t){var e=this;this.$confirm("此操作将修改成员看课权限?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.p)(t.id,{is_view_course:0===t.is_view_course?1:0}).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.initPage()})})},onDel:function(t){var e=this;this.$confirm("此操作将删除该成员?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.x)(t.id).then(function(t){e.$message({type:"success",message:"删除成功!"}),e.initPage()})})},onAdd:function(){var t=this;0!==this.multipleSelection.length?1===this.multipleSelection.length?(this.addId=this.multipleSelection[0].user_id,this.addId&&Object(s.g)(this.userObj.classId,this.addId,{is_buy:0}).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.addShow=!1,t.initPage()})):this.$message({type:"error",message:"只能选择一个用户!"}):this.$message({type:"error",message:"请选择用户!"})},onAddUser:function(){this.addShow=!0,this.getUser()},getUser:function(){var t=this,e={page:this.nowPage,limit:this.limit};this.searchFrom.userId&&(e.user_id=this.searchFrom.userId),this.searchFrom.nickName&&(e.nickname=this.searchFrom.nickName),this.searchFrom.mobile&&(e.mobile=this.searchFrom.mobile),Object(s._31)(e).then(function(e){t.userList=e.list,t.total=e.total})},onPageChange:function(t){this.nowPage=t,this.getUser()},handleSelectionChange:function(t){this.multipleSelection=t},editComment:function(t,e){var i=this;this.$prompt("","编辑备注",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:e}).then(function(e){var n=e.value;Object(s.k)(t,{desc:n}).then(function(t){i.$message({type:"success",message:"编辑备注成功"}),i.initPage()})})}},watch:{userObj:function(){this.initPage()}}},u={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{title:t.userObj.title,visible:t.userObj.show,modal:!1,fullscreen:!0},on:{"update:visible":function(e){t.$set(t.userObj,"show",e)}}},[i("div",[i("el-form",{attrs:{"label-width":"90px",inline:""}},[i("el-form-item",{staticStyle:{float:"right"}},[t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"success"},on:{click:t.onAddUser}},[t._v("+添加用户")])],1)],1),t._v(" "),i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.userTable}},[i("el-table-column",{attrs:{label:"用户",className:"f-c"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("img",{staticStyle:{"margin-right":"5px",width:"50px",height:"50px","border-radius":"50px"},attrs:{src:e.row.avatar}}),t._v(" "+t._s(e.row.nickname)+"(ID:"+t._s(e.row.user_id)+")\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"是否购买"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(0===e.row.is_buy?"否":"是")+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"看课权限"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("isOrNot")(e.row.is_view_course))+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"desc",label:"备注"}}),t._v(" "),i("el-table-column",{attrs:{label:"最后登录时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.last_login_at)+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"看课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.watch_course_rate)+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"课包查看次数"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.watch_course_num)+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"学习时长(分)"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(Math.round(e.row.watch_course_time/60*100)/100)+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"作业率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("percent")(e.row.work_rate))+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"打卡率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("percent")(e.row.clock_rate))+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"续费情况"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("isOrNot")(e.row.is_continue_buy))+"\n ")]}}])}),t._v(" "),t.$store.state.readonly?t._e():i("el-table-column",{attrs:{label:"操作",width:"300"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"warning",size:"mini"},on:{click:function(i){t.editComment(e.row.id,e.row.desc)}}},[t._v("编辑备注")]),t._v(" "),t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"warning",size:"mini"},on:{click:function(i){t.changeUser(e.row)}}},[t._v("看课权限")]),t._v(" "),t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(i){t.userLook(e.row)}}},[t._v("看课情况")]),t._v(" "),t.$store.state.deletePermission&&!t.$store.state.readonly?i("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(i){t.onDel(e.row)}}},[t._v("删除")]):t._e()]}}])})],1)],1),t._v(" "),i("el-dialog",{attrs:{modal:!1,visible:t.addShow},on:{"update:visible":function(e){t.addShow=e}}},[i("el-form",{attrs:{"label-width":"90px"}},[i("el-row",[i("el-col",{attrs:{span:8}},[i("el-form-item",{attrs:{label:"ID"}},[i("el-input",{model:{value:t.searchFrom.userId,callback:function(e){t.$set(t.searchFrom,"userId",e)},expression:"searchFrom.userId"}})],1)],1),t._v(" "),i("el-col",{attrs:{span:8}},[i("el-form-item",{attrs:{label:"昵称"}},[i("el-input",{model:{value:t.searchFrom.nickName,callback:function(e){t.$set(t.searchFrom,"nickName",e)},expression:"searchFrom.nickName"}})],1)],1),t._v(" "),i("el-col",{attrs:{span:8}},[i("el-form-item",{attrs:{label:"电话"}},[i("el-input",{model:{value:t.searchFrom.mobile,callback:function(e){t.$set(t.searchFrom,"mobile",e)},expression:"searchFrom.mobile"}})],1)],1)],1),t._v(" "),i("el-row",[i("el-col",{attrs:{span:8,offset:16}},[i("el-form-item",[i("el-button",{staticStyle:{float:"right"},attrs:{type:"primary",plain:""},on:{click:t.getUser}},[t._v("搜索")])],1)],1)],1)],1),t._v(" "),i("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.userList},on:{"selection-change":t.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),i("el-table-column",{attrs:{className:"f-c",label:"用户"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("img",{staticStyle:{"margin-right":"5px",width:"50px",height:"50px","border-radius":"50px"},attrs:{src:e.row.avatar}}),t._v(t._s(e.row.nickname)+"(ID:"+t._s(e.row.user_id)+")\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"mobile",label:"手机号"}})],1),t._v(" "),i("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange}}),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.addShow=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.onAdd}},[t._v("确 定")])],1)],1),t._v(" "),i("el-dialog",{attrs:{modal:!1,visible:t.lookDetail.show},on:{"update:visible":function(e){t.$set(t.lookDetail,"show",e)}}},[i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.lookDetail.loading,expression:"lookDetail.loading"}],staticStyle:{width:"100%"},attrs:{data:t.lookDetail.list}},[i("el-table-column",{attrs:{prop:"start_at",label:"日期"}}),t._v(" "),i("el-table-column",{attrs:{label:"爸妈看一看"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.watch_list&&e.row.watch_list.length>0&&e.row.watch_list.find(function(t){return 1===t.page_id})?i("span",[t._v("\n 学习时长:"+t._s(e.row.watch_list.find(function(t){return 1===t.page_id}).stay_time)+"\n ")]):t._e(),t._v(" "),e.row.watch_list.find(function(t){return 1===t.page_id})?t._e():i("span",[t._v("\n 暂未上课\n ")])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"宝贝玩一玩"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.watch_list&&e.row.watch_list.length>0&&e.row.watch_list.find(function(t){return 1===t.page_id})?i("span",[t._v("\n 学习时长:"+t._s(e.row.watch_list.find(function(t){return 2===t.page_id}).stay_time)+"\n ")]):t._e(),t._v(" "),e.row.watch_list.find(function(t){return 1===t.page_id})?t._e():i("span",[t._v("\n 暂未上课\n ")])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"爸妈秀宝贝"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.watch_list&&e.row.watch_list.length>0&&e.row.watch_list.find(function(t){return 1===t.page_id})?i("span",[t._v("\n 学习记录:"),i("div",{domProps:{innerHTML:t._s(e.row.watch_list.find(function(t){return 0===t.page_id}).learn_report)}}),t._v(t._s(e.row.watch_list.find(function(t){return 3===t.page_id}).stay_time)+"\n ")]):t._e(),t._v(" "),e.row.watch_list.find(function(t){return 1===t.page_id})?t._e():i("span",[t._v("\n 暂未上课\n ")])]}}])})],1)],1)],1)},staticRenderFns:[]};var d={data:function(){return{nowPage:1,total:0,limit:10,periodsId:null,goodsList:[],teacher_id:"",classList:[],title:"",countObj:"",teacherList:[],userObj:{classId:"",title:"",show:!1},dialogObj:{show:!1,title:"添加班级",periodsId:"",type:0,id:0},selectedGoods:[]}},components:{UserList:i("VU/8")(c,u,!1,function(t){i("n1o3")},null,null).exports,classDialog:a,page:r.a},filters:{classTypeFilter:function(t){var e=parseInt(t);return 1===e?"带班班级":2===e?"观摩班级":""},percent:function(t){return(100*t).toFixed(2)+"%"}},mounted:function(){this.initPage()},methods:{changeRow:function(t,e){e.indexOf(t)>-1&&Object(s._6)(t.periods_id,t.id).then(function(e){t.arrive_course_rate=e.arrive_course_rate,t.watch_course_rate=e.watch_course_rate,t.over_course_rate=e.over_course_rate,t.work_rate=e.work_rate,t.over_work_rate=e.over_work_rate,t.clock_rate=e.clock_rate,t.over_clock_rate=e.over_clock_rate,t.transform_rate=e.transform_rate})},initQuery:function(){var t=this,e=this.$route.query;e&&e.goods_id&&e.periods_id&&(this.selectedGoods=[parseInt(e.goods_id),parseInt(e.periods_id)],Object(s._19)({goods_id:this.selectedGoods[0]}).then(function(e){e.list.forEach(function(t){t.name=t.title}),t.goodsList.find(function(e){return e.id===t.selectedGoods[0]}).children=e.list;var i=t.goodsList.find(function(e){return e.id===t.selectedGoods[0]});t.periods=i.children.find(function(e){return e.id===t.selectedGoods[1]}),t.teacher_id="",t.getClassList()}))},initPage:function(){var t=this;Object(s._13)().then(function(e){e.list.forEach(function(t){t.children=[]}),t.goodsList=e.list,t.initQuery()})},showUser:function(t){this.userObj={classId:t.id,show:!0,title:t.teacher_name+"班级用户列表"}},getTeacher:function(){var t=this;this.periods&&Object(s._21)(this.periods.id).then(function(e){t.teacherList=e})},changePeriods:function(t){if(t.length>1){var e=this.goodsList.find(function(e){return e.id===t[0]});this.periods=e.children.find(function(e){return e.id===t[1]}),this.teacher_id="",this.getTeacher()}},onPageChange:function(t){this.nowPage=t,this.getClassList()},onReflash:function(t){this.periods=t,this.selectedGoods=[t.goods_id,t.id],this.getClassList()},getClassList:function(){var t=this;if(this.periods){this.getTeacher();var e={limit:this.limit,page:this.nowPage};this.teacher_id&&(e.teacher_id=this.teacher_id),Object(s._5)(this.periods.id,e).then(function(e){e.list.forEach(function(t){t.arrive_course_rate=0,t.watch_course_rate=0,t.over_course_rate=0,t.work_rate=0,t.over_work_rate=0,t.clock_rate=0,t.over_clock_rate=0,t.transform_rate=0}),t.title=e.periods,t.countObj=e.count?e.count:"",t.classList=e.list,t.total=e.total})}},handleItemChange:function(t){var e=this;Object(s._19)({goods_id:t[0]}).then(function(i){i.list.forEach(function(t){t.name=t.title}),e.goodsList.find(function(e){return e.id===t[0]}).children=i.list})},delClass:function(t){var e=this;this.$confirm("此操作将删除该班级?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.w)(t.id).then(function(t){e.$message({type:"success",message:"删除成功!"}),e.getClassList()})})},onAdd:function(){console.log("onAdd",this.periods),this.dialogObj={show:!0,title:"添加班级",type:0,teacherList:this.teacherList?this.teacherList:[]},this.periods&&(this.dialogObj.periods=this.periods,this.dialogObj.periodsId=this.periods.id)},editClass:function(t){this.dialogObj={show:!0,title:"编辑班级",type:1,id:t.id,teacherList:this.teacherList?this.teacherList:[]},this.periods&&(this.dialogObj.periods=this.periods,this.dialogObj.periodsId=this.periods.id)}}},_={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"class"},[i("div",{staticClass:"form-block"},[i("el-form",{attrs:{"label-width":"90px",inline:""}},[i("el-form-item",{attrs:{label:"期数"}},[i("el-cascader",{attrs:{options:t.goodsList,props:{value:"id",label:"name"}},on:{"active-item-change":t.handleItemChange,change:t.changePeriods},model:{value:t.selectedGoods,callback:function(e){t.selectedGoods=e},expression:"selectedGoods"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"老师"}},[i("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:t.teacher_id,callback:function(e){t.teacher_id=e},expression:"teacher_id"}},t._l(t.teacherList,function(t,e){return i("el-option",{key:e,attrs:{label:t.teacher_name,value:t.teacher_id}})}))],1),t._v(" "),i("el-form-item",{attrs:{label:""}},[i("el-button",{attrs:{type:"primary"},on:{click:t.getClassList}},[t._v("\n 搜索\n ")])],1),t._v(" "),i("el-form-item",{staticStyle:{float:"right"}},[t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"success"},on:{click:t.onAdd}},[t._v("+添加班级")])],1)],1)],1),t._v(" "),t.classList&&t.classList.length>0?i("div",{staticClass:"intro"},[i("el-form",{attrs:{"label-width":"100px"}},[i("el-row",[i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"期数名称"}},[t._v(t._s(t.title.title))])],1),t._v(" "),i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"可看课包数"}},[t._v(t._s(t.title.watch_num))])],1),t._v(" "),i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"已看课包数"}},[t._v(t._s(t.title.has_watch_num))])],1),t._v(" "),i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"开始时间"}},[t._v(t._s(t.title.start_at))])],1)],1),t._v(" "),i("el-row",[i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"老师数量"}},[t._v(t._s(t.countObj.count_teacher_num))])],1),t._v(" "),i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"预计学员总数"}},[t._v(t._s(t.countObj.count_max_join_num))])],1),t._v(" "),i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"学员总数"}},[t._v(t._s(t.countObj.count_join_num))])],1),t._v(" "),i("el-col",{attrs:{span:6}},[i("el-form-item",{attrs:{label:"结束时间"}},[t._v(t._s(t.title.over_at))])],1)],1)],1)],1):t._e(),t._v(" "),t.classList&&0!==t.classList.length?t._e():i("div",[i("el-form",{attrs:{"label-width":"300px",inline:""}},[i("el-form-item",{attrs:{label:"暂无期数信息,请先选择期数"}})],1)],1),t._v(" "),i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.classList},on:{"expand-change":t.changeRow}},[i("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-table",{staticStyle:{width:"100%"},attrs:{data:[e.row]}},[i("el-table-column",{attrs:{label:"到课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.arrive_course_rate)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"看课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.watch_course_rate)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"完课率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.over_course_rate)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"作业率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.work_rate)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"全勤作业率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.over_work_rate)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"打卡率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.clock_rate)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"全勤打卡率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.over_clock_rate)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"转化率"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(t._f("percent")(e.row.transform_rate)))])]}}])})],1)]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"teacher_name",label:"班主任"}}),t._v(" "),i("el-table-column",{attrs:{label:"班级类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("classTypeFilter")(e.row.type))+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"max_join_num",label:"最大人数"}}),t._v(" "),i("el-table-column",{attrs:{prop:"join_num",label:"现有人数"}}),t._v(" "),i("el-table-column",{attrs:{width:"250",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(i){t.showUser(e.row)}}},[t._v("班级成员")]),t._v(" "),t.$store.state.readonly?t._e():i("el-button",{attrs:{size:"mini",type:"warning"},on:{click:function(i){t.editClass(e.row)}}},[t._v("编辑")]),t._v(" "),t.$store.state.deletePermission&&!t.$store.state.readonly?i("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(i){t.delClass(e.row)}}},[t._v("删除")]):t._e()]}}])})],1)],1),t._v(" "),i("page",{attrs:{nowPage:t.nowPage,total:t.total,limit:t.limit},on:{pageChange:t.onPageChange}}),t._v(" "),i("class-dialog",{attrs:{dialogObj:t.dialogObj},on:{reflash:t.onReflash}}),t._v(" "),i("user-list",{attrs:{userObj:t.userObj},on:{reflash:t.getClassList}})],1)},staticRenderFns:[]};var h=i("VU/8")(d,_,!1,function(t){i("Xcol"),i("+Xdu")},"data-v-2b54d131",null);e.default=h.exports},Xcol:function(t,e){},n1o3:function(t,e){},pe1i:function(t,e){}});
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,t,f){for(var d,o,b,i=0,u=[];i<a.length;i++)o=a[i],n[o]&&u.push(n[o][0]),n[o]=0;for(d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d]);for(c&&c(a,t,f);u.length;)u.shift()();if(f)for(i=0;i<f.length;i++)b=r(r.s=f[i]);return b};var a={},n={33:0};function r(c){if(a[c])return a[c].exports;var n=a[c]={i:c,l:!1,exports:{}};return e[c].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.e=function(e){var c=n[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,r){c=n[e]=[a,r]});c[2]=a;var t=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,r.nc&&f.setAttribute("nonce",r.nc),f.src=r.p+"static/js/"+e+"."+{0:"cf244d18b861e5614994",1:"7f60a51e0286fa5795f8",2:"2ef3d4467d5f1bc88ccd",3:"58df26638cb030357eb5",4:"84776f9abf4585293d82",5:"01cef1d5549a84d2065f",6:"5d7e6cbb44bc57b09d10",7:"f563844019b7ad0e133d",8:"5eefa2aec9125cd5dd6d",9:"8b0611015c947ecfb6ab",10:"fca006e7a215fb8576b0",11:"b5ac022443301aa10897",12:"b118c7d9c78ba18a7394",13:"493713928437a56fc01d",14:"652885868c5e7158e198",15:"64b9621aef03d2a46cec",16:"f61af6550198186460cf",17:"5b6dad580b9206038816",18:"c0a5a22b3a0157e18e49",19:"e8d7d16dbab2a862bea8",20:"e1bbcd7cbe8028f912ea",21:"5bf9b10d972e3224edd9",22:"df70e293d4175d7a7ec5",23:"3bc2d95c4d5c0824310a",24:"276d08562a325a7f4b50",25:"4cc25ab8c7d5dd7c6614",26:"b736ed973503fb223ff9",27:"f1f6ab0ef0d8e9b26f89",28:"e469d5671f79a4684dc7",29:"0c7d527ac1c50fe269cd",30:"566af776e4fdb415bf93"}[e]+".js";var d=setTimeout(o,12e4);function o(){f.onerror=f.onload=null,clearTimeout(d);var c=n[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return f.onerror=f.onload=o,t.appendChild(f),a},r.m=e,r.c=a,r.d=function(e,c,a){r.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},r.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(c,"a",c),c},r.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},r.p="/",r.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,t,f){for(var o,d,b,i=0,u=[];i<a.length;i++)d=a[i],n[d]&&u.push(n[d][0]),n[d]=0;for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);for(c&&c(a,t,f);u.length;)u.shift()();if(f)for(i=0;i<f.length;i++)b=r(r.s=f[i]);return b};var a={},n={33:0};function r(c){if(a[c])return a[c].exports;var n=a[c]={i:c,l:!1,exports:{}};return e[c].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.e=function(e){var c=n[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,r){c=n[e]=[a,r]});c[2]=a;var t=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,r.nc&&f.setAttribute("nonce",r.nc),f.src=r.p+"static/js/"+e+"."+{0:"cf244d18b861e5614994",1:"7f60a51e0286fa5795f8",2:"2ef3d4467d5f1bc88ccd",3:"58df26638cb030357eb5",4:"84776f9abf4585293d82",5:"01cef1d5549a84d2065f",6:"b14ed9f1472106f28380",7:"f563844019b7ad0e133d",8:"5eefa2aec9125cd5dd6d",9:"8b0611015c947ecfb6ab",10:"fca006e7a215fb8576b0",11:"b5ac022443301aa10897",12:"b118c7d9c78ba18a7394",13:"493713928437a56fc01d",14:"652885868c5e7158e198",15:"64b9621aef03d2a46cec",16:"f61af6550198186460cf",17:"5b6dad580b9206038816",18:"c0a5a22b3a0157e18e49",19:"e8d7d16dbab2a862bea8",20:"e1bbcd7cbe8028f912ea",21:"5bf9b10d972e3224edd9",22:"df70e293d4175d7a7ec5",23:"3bc2d95c4d5c0824310a",24:"276d08562a325a7f4b50",25:"4cc25ab8c7d5dd7c6614",26:"b736ed973503fb223ff9",27:"f1f6ab0ef0d8e9b26f89",28:"e469d5671f79a4684dc7",29:"0c7d527ac1c50fe269cd",30:"566af776e4fdb415bf93"}[e]+".js";var o=setTimeout(d,12e4);function d(){f.onerror=f.onload=null,clearTimeout(o);var c=n[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return f.onerror=f.onload=d,t.appendChild(f),a},r.m=e,r.c=a,r.d=function(e,c,a){r.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},r.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(c,"a",c),c},r.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},r.p="/",r.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -54,10 +54,10 @@
},
methods:{
findDifferentArray(array1, array2){
let newArray = []
let newArray = [];
array1.forEach((val)=>{
let index = array2.findIndex((item)=>{
return item.teacher_id == val.id
return item.teacher_id === val.id
})
if (index === -1) {
newArray.push(val)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment