(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-77ec7c1a"],{"01a2":function(e,t,a){},"0995":function(e,t,a){"use strict";a("92f0")},"306e":function(e,t,a){},8599:function(e,t,a){"use strict";a("01a2")},"92f0":function(e,t,a){},b62d:function(e,t,a){"use strict";a("306e")},fcab:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"m-container"},[e._m(0),e._v(" "),a("div",{staticClass:"m-core"},[a("tab-router",{attrs:{type:"card"},on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName="string"===typeof t?t.trim():t},expression:"activeName"}},[e.permissionList.training?a("el-tab-pane",{attrs:{label:"专项练习",lazy:"",name:"2"}},[2==e.activeName?a("training"):e._e()],1):e._e(),e._v(" "),e.permissionList.appPage?a("el-tab-pane",{attrs:{label:"学生端按钮管理",lazy:"",name:"5"}},[5==e.activeName?a("appPage"):e._e()],1):e._e(),e._v(" "),e.permissionList.teacherButton?a("el-tab-pane",{attrs:{label:"老师端按钮管理",lazy:"",name:"23"}},[23==e.activeName?a("teacherButton"):e._e()],1):e._e(),e._v(" "),e.permissionList.appBottomPage?a("el-tab-pane",{attrs:{label:"APP底部按钮管理",lazy:"",name:"20"}},[20==e.activeName?a("appBottomPage"):e._e()],1):e._e(),e._v(" "),e.permissionList.appBottomPage?a("el-tab-pane",{attrs:{label:"学校端按钮管理",lazy:"",name:"29"}},[a("schoolButton")],1):e._e(),e._v(" "),e.permissionList.liveHelp?a("el-tab-pane",{attrs:{label:"直播帮助",lazy:"",name:"9"}},[9==e.activeName?a("liveHelp"):e._e()],1):e._e()],1)],1)])},n=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("h2",[a("div",{staticClass:"squrt"}),e._v("\n 平台内容管理\n ")])}],o=(a("7f7f"),a("b3fe")),s=a("490a"),i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("auth",{attrs:{auths:"news/add"}},[a("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:function(t){return e.openTeaching("create")}}},[e._v("\n 新建\n ")])],1),e._v(" "),a("save-form",{staticClass:"searchForm",attrs:{inline:!0,saveKey:"contentKnowledge",model:e.searchForm},on:{submit:e.search}},[a("el-form-item",{attrs:{prop:"subType"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择分类"},model:{value:e.searchForm.subType,callback:function(t){e.$set(e.searchForm,"subType",t)},expression:"searchForm.subType"}},e._l(e.typeList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"danger"}},[e._v("搜索")])],1)],1),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",label:"默认图"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("img",{staticClass:"bannerImg",attrs:{src:e.row.coverImage,alt:""}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"选中图"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("img",{staticClass:"bannerImg",attrs:{src:e.row.attribute1,alt:""}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"title",label:"标题"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"跳转链接"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("overflow-text",{attrs:{width:"100%",text:e.row.linkUrl}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"remark",label:"是否使用"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(1==t.row.status?"是":"否")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"subType",label:"分类"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.formatSubType(t.row.subType))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"memo",label:"版本号"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"order",label:"排序"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/update"}},[!t.row.memo||e.permission("banner/copyrightbtn")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.openTeaching("update",t.row)}}},[e._v("修改")]):e._e(),e._v(" "),!t.row.memo||e.permission("banner/copyrightbtn")?a("div",{staticStyle:{display:"inline-block"}},[1==t.row.status?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.onStop(t.row,0)}}},[e._v("停用")]):a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.onStop(t.row,1)}}},[e._v("启用")])],1):e._e()],1),e._v(" "),a("auth",{attrs:{auths:"news/del"}},[!t.row.memo||e.permission("banner/copyrightbtn")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.onDel(t.row)}}},[e._v("删除")]):e._e()],1)],1)]}}])})],1),e._v(" "),a("pagination",{attrs:{saveKey:"contentKnowledge",sync:"",total:e.pageInfo.total,page:e.pageInfo.page,limit:e.pageInfo.limit,"page-sizes":e.pageInfo.page_size},on:{"update:total":function(t){return e.$set(e.pageInfo,"total",t)},"update:page":function(t){return e.$set(e.pageInfo,"page",t)},"update:limit":function(t){return e.$set(e.pageInfo,"limit",t)},pagination:e.getList}})],1),e._v(" "),a("el-dialog",{attrs:{title:e.formTitle[e.pageType],visible:e.teacherStatus,width:"500px"},on:{"update:visible":function(t){e.teacherStatus=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"标题",prop:"title",rules:[{required:!0,message:"请输入标题",trigger:"blur"}]}},[a("el-input",{attrs:{placeholder:"请输入标题"},model:{value:e.form.title,callback:function(t){e.$set(e.form,"title","string"===typeof t?t.trim():t)},expression:"form.title"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"排序值",prop:"order"}},[a("el-input",{attrs:{placeholder:"请输入排序值"},model:{value:e.form.order,callback:function(t){e.$set(e.form,"order","string"===typeof t?t.trim():t)},expression:"form.order"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"版本号",prop:"memo"}},[a("el-input",{attrs:{placeholder:"请输入版本号"},model:{value:e.form.memo,callback:function(t){e.$set(e.form,"memo",t)},expression:"form.memo"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"链接地址",prop:"linkUrl"}},[a("el-input",{attrs:{placeholder:"请输入链接地址"},model:{value:e.form.linkUrl,callback:function(t){e.$set(e.form,"linkUrl","string"===typeof t?t.trim():t)},expression:"form.linkUrl"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"分类",prop:"subType",rules:[{required:!0,message:"请选择分类",trigger:"change"}]}},[a("el-select",{staticStyle:{width:"100% !important"},attrs:{placeholder:"请选择分类"},model:{value:e.form.subType,callback:function(t){e.$set(e.form,"subType",t)},expression:"form.subType"}},e._l(e.typeList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"默认图",prop:"coverImage",rules:[{required:!0,message:"请上传默认图",trigger:"blur"}]}},[a("image-cropper",{attrs:{options:e.cropperOptions,imgSize:2,showSize:"",imageUrl:e.form.coverImage},on:{"crop-upload-success":e.cropSuccess}}),e._v(" "),a("p",{staticClass:"imageSize"},[e._v("图片不能超过 2M;图片尺寸:76*76;")])],1),e._v(" "),a("el-form-item",{attrs:{label:"选中图",prop:"attribute1",rules:[{required:!0,message:"请上传选中图",trigger:"blur"}]}},[a("image-cropper",{attrs:{options:e.cropperOptions,imgSize:2,showSize:"",imageUrl:e.form.attribute1},on:{"crop-upload-success":e.cropSuccess2}}),e._v(" "),a("p",{staticClass:"imageSize"},[e._v("图片不能超过 2M;图片尺寸:76*76;")])],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.teacherStatus=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("确 定")])],1)],1)],1)},l=[],c=(a("ac6a"),a("5530")),u=a("c7eb"),p=(a("96cf"),a("1da1")),m=a("0687"),f=a("896b"),g=a("333d"),b=a("e3eb"),d=a.n(b),h=a("ec8a"),v={name:"appButtonPage",components:{pagination:g["a"],ImageCropper:f["a"]},data:function(){return{teacherStatus:!1,formTitle:{create:"新建老师端按钮",update:"修改老师端按钮"},pageType:"create",cropperOptions:{autoCrop:!0,autoCropWidth:76,autoCropHeight:76,fixedBox:!0,previewsCircle:!1,full:!0,title:"上传图片"},form:{title:"",order:null,linkUrl:"",coverImage:"",attribute1:"",subType:null,memo:"",type:20,status:1,content:""},searchForm:{subType:null},tableList:[],teacherId:this.$route.query.teacherId,pageInfo:{limit:10,page:1,total:1,page_size:[10,20,40,50]},typeList:[]}},mounted:function(){var e=Object(p["a"])(Object(u["a"])().mark((function e(){var t=this;return Object(u["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(m["e"])({parentId:20}).then((function(e){200==e.code&&(t.typeList=e.data)}));case 2:this.getList();case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{cropSuccess:function(e){this.form.coverImage=e.data.url},cropSuccess2:function(e){this.form.attribute1=e.data.url},onSubmit:function(){var e=this;this.$refs["form"].validate(function(){var t=Object(p["a"])(Object(u["a"])().mark((function t(a){var r;return Object(u["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=11;break}if(r=Object(c["a"])({},e.form),"create"!=e.pageType){t.next=8;break}return r.id&&delete r.id,t.next=6,Object(m["a"])(r).then((function(t){e.messageTips("添加",t)}));case 6:t.next=11;break;case 8:if("update"!=e.pageType){t.next=11;break}return t.next=11,Object(m["f"])(r).then((function(t){e.messageTips("修改",t)}));case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},messageTips:function(e,t){200==t.code?(this.$message.success(e+"成功"),this.getList(),this.teacherStatus=!1):this.$message.error(t.msg)},search:function(){this.pageInfo.page=1,this.getList()},permission:function(e){return Object(h["a"])(e)},getList:function(){var e=this,t={clientName:"manage",subType:this.searchForm.subType,rows:this.pageInfo.limit,page:this.pageInfo.page,type:20};Object(m["c"])(d()(t)).then((function(t){200==t.code&&(e.tableList=t.data.rows,e.pageInfo.total=t.data.total)}))},openTeaching:function(e,t){var a=this;this.teacherStatus=!0,this.$nextTick((function(){a.$refs["form"]&&a.$refs["form"].resetFields(),a.pageType=e,"update"==e&&(a.form.id=t.id,a.form.title=t.title,a.form.order=t.order,a.form.linkUrl=t.linkUrl,a.form.coverImage=t.coverImage,a.form.subType=t.subType,a.form.memo=t.memo,a.form.attribute1=t.attribute1,a.form.status=t.status)}))},onDel:function(e){var t=this;this.$confirm("确定是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(m["b"])({id:e.id}).then((function(e){200==e.code?(t.$message.success("删除成功"),t.getList()):t.$message.error(e.msg)}))})).catch((function(){}))},onStop:function(e,t){var a=this,r=["停用","启用"];Object(m["f"])({id:e.id,status:t}).then((function(e){200==e.code?(a.$message.success(r[t]+"成功"),a.getList()):a.$message.error(e.msg)}))},formatSubType:function(e){var t=null;return this.typeList.forEach((function(a){a.id==e&&(t=a.name)})),t}}},y=v,_=(a("b62d"),a("2877")),k=Object(_["a"])(y,i,l,!1,null,"04e2c680",null),w=k.exports,x=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("auth",{attrs:{auths:"news/add"}},[a("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:function(t){return e.openTeaching("create")}}},[e._v("\n 新建\n ")])],1),e._v(" "),a("save-form",{staticClass:"searchForm",attrs:{inline:!0,saveKey:"contentKnowledge",model:e.searchForm},on:{submit:e.search}},[a("el-form-item",{attrs:{prop:"subType"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择分类"},model:{value:e.searchForm.subType,callback:function(t){e.$set(e.searchForm,"subType",t)},expression:"searchForm.subType"}},e._l(e.typeList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"danger"}},[e._v("搜索")])],1)],1),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",label:"封面图"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("img",{staticClass:"bannerImg",attrs:{src:e.row.coverImage,alt:""}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"title",label:"标题"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"跳转链接"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("overflow-text",{attrs:{width:"100%",text:e.row.linkUrl}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"remark",label:"是否使用"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(1==t.row.status?"是":"否")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"subType",label:"分类"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.formatSubType(t.row.subType))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"",label:"可用分部"},scopedSlots:e._u([{key:"header",fn:function(t){return[a("div",{staticClass:"titleCell"},[a("span",[e._v("可用分部")]),e._v(" "),a("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[a("div",{attrs:{slot:"content"},slot:"content"},[e._v("可用分部为空则所有分部都显示")]),e._v(" "),a("i",{staticClass:"el-icon-question micon el-tooltip",staticStyle:{"font-size":"18px",color:"#f56c6c",top:"2px",position:"relative"}})])],1)]}},{key:"default",fn:function(e){return[a("overflow-text",{attrs:{width:"100%",text:e.row.organNameList?e.row.organNameList:"全部分部"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"memo",label:"版本号"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"order",label:"排序"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/update"}},[!t.row.memo||e.permission("banner/copyrightbtn")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.openTeaching("update",t.row)}}},[e._v("修改")]):e._e(),e._v(" "),!t.row.memo||e.permission("banner/copyrightbtn")?a("div",{staticStyle:{display:"inline-block"}},[1==t.row.status?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.onStop(t.row,0)}}},[e._v("停用")]):a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.onStop(t.row,1)}}},[e._v("启用")])],1):e._e()],1),e._v(" "),a("auth",{attrs:{auths:"news/del"}},[!t.row.memo||e.permission("banner/copyrightbtn")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.onDel(t.row)}}},[e._v("删除")]):e._e()],1)],1)]}}])})],1),e._v(" "),a("pagination",{attrs:{saveKey:"contentKnowledge",sync:"",total:e.pageInfo.total,page:e.pageInfo.page,limit:e.pageInfo.limit,"page-sizes":e.pageInfo.page_size},on:{"update:total":function(t){return e.$set(e.pageInfo,"total",t)},"update:page":function(t){return e.$set(e.pageInfo,"page",t)},"update:limit":function(t){return e.$set(e.pageInfo,"limit",t)},pagination:e.getList}})],1),e._v(" "),a("el-dialog",{attrs:{title:e.formTitle[e.pageType],visible:e.teacherStatus,width:"500px"},on:{"update:visible":function(t){e.teacherStatus=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"标题",prop:"title",rules:[{required:!0,message:"请输入标题",trigger:"blur"}]}},[a("el-input",{attrs:{placeholder:"请输入标题"},model:{value:e.form.title,callback:function(t){e.$set(e.form,"title","string"===typeof t?t.trim():t)},expression:"form.title"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"排序值",prop:"order"}},[a("el-input",{attrs:{placeholder:"请输入排序值"},model:{value:e.form.order,callback:function(t){e.$set(e.form,"order","string"===typeof t?t.trim():t)},expression:"form.order"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"链接地址",prop:"linkUrl"}},[a("el-input",{attrs:{placeholder:"请输入链接地址"},model:{value:e.form.linkUrl,callback:function(t){e.$set(e.form,"linkUrl","string"===typeof t?t.trim():t)},expression:"form.linkUrl"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"版本号",prop:"memo"}},[a("el-input",{attrs:{placeholder:"请输入版本号"},model:{value:e.form.memo,callback:function(t){e.$set(e.form,"memo",t)},expression:"form.memo"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"分类",prop:"subType",rules:[{required:!0,message:"请选择分类",trigger:"change"}]}},[a("el-select",{staticStyle:{width:"100% !important"},attrs:{placeholder:"请选择分类"},model:{value:e.form.subType,callback:function(t){e.$set(e.form,"subType",t)},expression:"form.subType"}},e._l(e.typeList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"可用分部",prop:"organIdList"}},[a("template",{slot:"label"},[e._v("\n 可用分部"),a("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[a("div",{attrs:{slot:"content"},slot:"content"},[e._v("可用分部为空则所有分部都显示")]),e._v(" "),a("i",{staticClass:"el-icon-question micon el-tooltip",staticStyle:{"font-size":"18px",color:"#f56c6c",top:"2px",position:"relative"}})])],1),e._v(" "),a("select-all",{attrs:{multiple:"","collapse-tags":"",clearable:"",filterable:"",placeholder:"请选择可用分部"},model:{value:e.form.organIdList,callback:function(t){e.$set(e.form,"organIdList",t)},expression:"form.organIdList"}},e._l(e.selects.branchs,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],2),e._v(" "),a("el-form-item",{attrs:{label:"封面图",prop:"coverImage",rules:[{required:!0,message:"请上传封面图",trigger:"blur"}]}},[a("image-cropper",{attrs:{options:e.cropperOptions,imgSize:2,showSize:"",imageUrl:e.form.coverImage},on:{"crop-upload-success":e.cropSuccess}}),e._v(" "),a("p",{staticClass:"imageSize"},[e._v("图片不能超过 2M;图片尺寸:88*88;")])],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.teacherStatus=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("确 定")])],1)],1)],1)},T=[],S=(a("c5f6"),a("28a5"),{name:"teacherButton",components:{pagination:g["a"],ImageCropper:f["a"]},data:function(){return{teacherStatus:!1,formTitle:{create:"新建老师端按钮",update:"修改老师端按钮"},pageType:"create",cropperOptions:{autoCrop:!0,autoCropWidth:88,autoCropHeight:88,fixedBox:!0,previewsCircle:!1,full:!0,title:"上传图片"},form:{title:"",order:null,linkUrl:"",coverImage:"",subType:null,type:23,organIdList:[],memo:"",status:1,content:""},searchForm:{subType:null},tableList:[],teacherId:this.$route.query.teacherId,pageInfo:{limit:10,page:1,total:1,page_size:[10,20,40,50]},typeList:[]}},mounted:function(){var e=Object(p["a"])(Object(u["a"])().mark((function e(){var t=this;return Object(u["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(m["e"])({parentId:23}).then((function(e){200==e.code&&(t.typeList=e.data)}));case 2:this.getList();case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{cropSuccess:function(e){this.form.coverImage=e.data.url},onSubmit:function(){var e=this;this.$refs["form"].validate(function(){var t=Object(p["a"])(Object(u["a"])().mark((function t(a){var r;return Object(u["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=11;break}if(r=Object(c["a"])(Object(c["a"])({},e.form),{},{organIdList:e.form.organIdList.join(",")}),"create"!=e.pageType){t.next=8;break}return r.id&&delete r.id,t.next=6,Object(m["a"])(r).then((function(t){e.messageTips("添加",t)}));case 6:t.next=11;break;case 8:if("update"!=e.pageType){t.next=11;break}return t.next=11,Object(m["f"])(r).then((function(t){e.messageTips("修改",t)}));case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},messageTips:function(e,t){200==t.code?(this.$message.success(e+"成功"),this.getList(),this.teacherStatus=!1):this.$message.error(t.msg)},search:function(){this.pageInfo.page=1,this.getList()},permission:function(e){return Object(h["a"])(e)},getList:function(){var e=this,t={clientName:"manage",subType:this.searchForm.subType,rows:this.pageInfo.limit,page:this.pageInfo.page,type:23};Object(m["c"])(d()(t)).then((function(t){200==t.code&&(e.tableList=t.data.rows,e.pageInfo.total=t.data.total)}))},openTeaching:function(e,t){var a=this;this.teacherStatus=!0,this.$nextTick((function(){a.$refs["form"]&&a.$refs["form"].resetFields(),a.pageType=e,"update"==e&&(a.form.id=t.id,a.form.title=t.title,a.form.order=t.order,a.form.linkUrl=t.linkUrl,a.form.organIdList=t.organIdList?t.organIdList.split(",").map((function(e){return Number(e)})):[],a.form.coverImage=t.coverImage,a.form.subType=t.subType,a.form.memo=t.memo,a.form.status=t.status)}))},onDel:function(e){var t=this;this.$confirm("确定是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(m["b"])({id:e.id}).then((function(e){200==e.code?(t.$message.success("删除成功"),t.getList()):t.$message.error(e.msg)}))})).catch((function(){}))},onStop:function(e,t){var a=this,r=["停用","启用"];Object(m["f"])({id:e.id,status:t}).then((function(e){200==e.code?(a.$message.success(r[t]+"成功"),a.getList()):a.$message.error(e.msg)}))},formatSubType:function(e){var t=null;return this.typeList.forEach((function(a){a.id==e&&(t=a.name)})),t}}}),I=S,$=(a("0995"),Object(_["a"])(I,x,T,!1,null,"c2e062c2",null)),L=$.exports,O=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("auth",{attrs:{auths:"news/add"}},[a("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:function(t){return e.openTeaching("create")}}},[e._v("\n 新建\n ")])],1),e._v(" "),a("save-form",{staticClass:"searchForm",attrs:{inline:!0,saveKey:"contentKnowledge",model:e.searchForm},on:{submit:e.search}},[a("el-form-item",{attrs:{prop:"subType"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择分类"},model:{value:e.searchForm.subType,callback:function(t){e.$set(e.searchForm,"subType",t)},expression:"searchForm.subType"}},e._l(e.typeList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"danger"}},[e._v("搜索")])],1)],1),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",label:"封面图"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("img",{staticClass:"bannerImg",attrs:{src:e.row.coverImage,alt:""}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"title",label:"标题"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"跳转链接"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("overflow-text",{attrs:{width:"100%",text:e.row.linkUrl}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"remark",label:"是否使用"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(1==t.row.status?"是":"否")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"order",label:"排序"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/update"}},[!t.row.memo||e.permission("banner/copyrightbtn")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.openTeaching("update",t.row)}}},[e._v("修改")]):e._e(),e._v(" "),!t.row.memo||e.permission("banner/copyrightbtn")?a("div",{staticStyle:{display:"inline-block"}},[1==t.row.status?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.onStop(t.row,0)}}},[e._v("停用")]):a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.onStop(t.row,1)}}},[e._v("启用")])],1):e._e()],1),e._v(" "),a("auth",{attrs:{auths:"news/del"}},[!t.row.memo||e.permission("banner/copyrightbtn")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.onDel(t.row)}}},[e._v("删除")]):e._e()],1)],1)]}}])})],1),e._v(" "),a("pagination",{attrs:{saveKey:"contentKnowledge",sync:"",total:e.pageInfo.total,page:e.pageInfo.page,limit:e.pageInfo.limit,"page-sizes":e.pageInfo.page_size},on:{"update:total":function(t){return e.$set(e.pageInfo,"total",t)},"update:page":function(t){return e.$set(e.pageInfo,"page",t)},"update:limit":function(t){return e.$set(e.pageInfo,"limit",t)},pagination:e.getList}})],1),e._v(" "),a("el-dialog",{attrs:{title:e.formTitle[e.pageType],visible:e.teacherStatus,width:"500px"},on:{"update:visible":function(t){e.teacherStatus=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"标题",prop:"title",rules:[{required:!0,message:"请输入标题",trigger:"blur"}]}},[a("el-input",{attrs:{placeholder:"请输入标题"},model:{value:e.form.title,callback:function(t){e.$set(e.form,"title","string"===typeof t?t.trim():t)},expression:"form.title"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"排序值",prop:"order"}},[a("el-input",{attrs:{placeholder:"请输入排序值"},model:{value:e.form.order,callback:function(t){e.$set(e.form,"order","string"===typeof t?t.trim():t)},expression:"form.order"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"链接地址",prop:"linkUrl"}},[a("el-input",{attrs:{placeholder:"请输入链接地址"},model:{value:e.form.linkUrl,callback:function(t){e.$set(e.form,"linkUrl","string"===typeof t?t.trim():t)},expression:"form.linkUrl"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"封面图",prop:"coverImage",rules:[{required:!0,message:"请上传封面图",trigger:"blur"}]}},[a("image-cropper",{attrs:{options:e.cropperOptions,imgSize:2,showSize:"",imageUrl:e.form.coverImage},on:{"crop-upload-success":e.cropSuccess}}),e._v(" "),a("p",{staticClass:"imageSize"},[e._v("图片不能超过 2M;图片尺寸:88*88;")])],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.teacherStatus=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("确 定")])],1)],1)],1)},j=[],C={name:"teacherButton",components:{pagination:g["a"],ImageCropper:f["a"]},data:function(){return{teacherStatus:!1,formTitle:{create:"新建学校端按钮",update:"修改学校端按钮"},pageType:"create",cropperOptions:{autoCrop:!0,autoCropWidth:88,autoCropHeight:88,fixedBox:!0,previewsCircle:!1,full:!0,title:"上传图片"},form:{title:"",order:null,linkUrl:"",coverImage:"",subType:null,type:29,memo:"",status:1,content:""},searchForm:{subType:null},tableList:[],teacherId:this.$route.query.teacherId,pageInfo:{limit:10,page:1,total:1,page_size:[10,20,40,50]},typeList:[]}},mounted:function(){var e=Object(p["a"])(Object(u["a"])().mark((function e(){var t=this;return Object(u["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(m["e"])({parentId:29}).then((function(e){200==e.code&&(t.typeList=e.data)}));case 2:this.getList();case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{cropSuccess:function(e){this.form.coverImage=e.data.url},onSubmit:function(){var e=this;this.$refs["form"].validate(function(){var t=Object(p["a"])(Object(u["a"])().mark((function t(a){var r;return Object(u["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=11;break}if(r=Object(c["a"])({},e.form),"create"!=e.pageType){t.next=8;break}return r.id&&delete r.id,t.next=6,Object(m["a"])(r).then((function(t){e.messageTips("添加",t)}));case 6:t.next=11;break;case 8:if("update"!=e.pageType){t.next=11;break}return t.next=11,Object(m["f"])(r).then((function(t){e.messageTips("修改",t)}));case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},messageTips:function(e,t){200==t.code?(this.$message.success(e+"成功"),this.getList(),this.teacherStatus=!1):this.$message.error(t.msg)},search:function(){this.pageInfo.page=1,this.getList()},permission:function(e){return Object(h["a"])(e)},getList:function(){var e=this,t={clientName:"manage",subType:this.searchForm.subType,rows:this.pageInfo.limit,page:this.pageInfo.page,type:29};Object(m["c"])(d()(t)).then((function(t){200==t.code&&(e.tableList=t.data.rows,e.pageInfo.total=t.data.total)}))},openTeaching:function(e,t){var a=this;this.teacherStatus=!0,this.$nextTick((function(){a.$refs["form"]&&a.$refs["form"].resetFields(),a.pageType=e,"update"==e&&(a.form.id=t.id,a.form.title=t.title,a.form.order=t.order,a.form.linkUrl=t.linkUrl,a.form.coverImage=t.coverImage,a.form.subType=t.subType,a.form.memo=t.memo,a.form.status=t.status)}))},onDel:function(e){var t=this;this.$confirm("确定是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(m["b"])({id:e.id}).then((function(e){200==e.code?(t.$message.success("删除成功"),t.getList()):t.$message.error(e.msg)}))})).catch((function(){}))},onStop:function(e,t){var a=this,r=["停用","启用"];Object(m["f"])({id:e.id,status:t}).then((function(e){200==e.code?(a.$message.success(r[t]+"成功"),a.getList()):a.$message.error(e.msg)}))},formatSubType:function(e){var t=null;return this.typeList.forEach((function(a){a.id==e&&(t=a.name)})),t}}},z=C,U=(a("8599"),Object(_["a"])(z,O,j,!1,null,"8c344fd0",null)),F=U.exports,B=a("1cb2"),E={components:{training:o["a"],appPage:s["a"],appBottomPage:w,teacherButton:L,liveHelp:B["a"],schoolButton:F},name:"contentManager",data:function(){return{activeName:"0",permissionList:{training:Object(h["a"])("/contentManager/training"),appPage:Object(h["a"])("/contentManager/appPage"),appBottomPage:Object(h["a"])("/contentManager/appBottomPage"),teacherButton:Object(h["a"])("/contentManager/teacherButton"),liveHelp:Object(h["a"])("/contentManager/liveHelp")}}},methods:{handleClick:function(e,t){this.activeName=e.name}}},N=E,q=Object(_["a"])(N,r,n,!1,null,null,null);t["default"]=q.exports}}]);