chunk-5329a052.724acbba.js 31 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5329a052","chunk-2d0d6f6b"],{"0687":function(t,e,n){"use strict";n.d(e,"c",(function(){return s})),n.d(e,"f",(function(){return l})),n.d(e,"a",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"b",(function(){return d})),n.d(e,"e",(function(){return p}));var a=n("b775"),o=n("4328"),r=n.n(o),i="/api-cms";function s(t){return Object(a["a"])({url:i+"/news/queryPage",method:"get",params:t})}function l(t){return Object(a["a"])({url:i+"/news/update",method:"post",data:r.a.stringify(t)})}function c(t){return Object(a["a"])({url:i+"/news/add",method:"post",data:r.a.stringify(t)})}function u(t){return Object(a["a"])({url:i+"/news/query",method:"get",params:t})}function d(t){return Object(a["a"])({url:i+"/news/del/"+t.id,method:"post",data:r.a.stringify(t)})}function p(t){return Object(a["a"])({url:i+"/news/typeList",method:"get",params:t})}},"09f4":function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),Math.easeInOutQuad=function(t,e,n,a){return t/=a/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function o(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function r(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(t,e,n){var i=r(),s=t-i,l=20,c=0;e="undefined"===typeof e?500:e;var u=function t(){c+=l;var r=Math.easeInOutQuad(c,i,s,e);o(r),c<e?a(t):n&&"function"===typeof n&&n()};u()}},"1cb2":function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("auth",{attrs:{auths:"news/add"}},[n("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:function(e){return t.openTeaching("create")}}},[t._v("\n 新建\n ")])],1),t._v(" "),n("save-form",{staticClass:"searchForm",attrs:{inline:!0,saveKey:"contentKnowledge",model:t.searchForm},on:{submit:t.search}},[n("el-form-item",{attrs:{prop:"subType"}},[n("el-select",{attrs:{clearable:"",placeholder:"帮助类型"},model:{value:t.searchForm.subType,callback:function(e){t.$set(t.searchForm,"subType",e)},expression:"searchForm.subType"}},t._l(t.typeList,(function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),t._v(" "),n("el-form-item",[n("el-button",{attrs:{"native-type":"submit",type:"danger"}},[t._v("搜索")])],1)],1),t._v(" "),n("div",{staticClass:"tableWrap"},[n("el-table",{attrs:{data:t.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[n("el-table-column",{attrs:{align:"center",label:"编号",prop:"id"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"title",label:"标题"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"subType",label:"类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.formatSubType(e.row.subType))+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"order",label:"排序值"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",[n("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/update"}},[!e.row.memo||t.permission("banner/copyrightbtn")?n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.openTeaching("update",e.row)}}},[t._v("修改")]):t._e()],1),t._v(" "),n("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/del"}},[!e.row.memo||t.permission("banner/copyrightbtn")?n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.onDel(e.row)}}},[t._v("删除")]):t._e()],1)],1)]}}])})],1),t._v(" "),n("pagination",{attrs:{saveKey:"contentKnowledge",sync:"",total:t.pageInfo.total,page:t.pageInfo.page,limit:t.pageInfo.limit,"page-sizes":t.pageInfo.page_size},on:{"update:total":function(e){return t.$set(t.pageInfo,"total",e)},"update:page":function(e){return t.$set(t.pageInfo,"page",e)},"update:limit":function(e){return t.$set(t.pageInfo,"limit",e)},pagination:t.getList}})],1),t._v(" "),n("el-dialog",{attrs:{title:t.formTitle[t.formActionTitle],visible:t.notifyStatus,width:"800px"},on:{"update:visible":function(e){t.notifyStatus=e}}},[t.notifyStatus?n("livehelpModel",{attrs:{options:t.systemOptions,typeList:t.typeList},on:{submited:t.getList,close:function(e){t.notifyStatus=!1}}}):t._e()],1)],1)},o=[],r=(n("7f7f"),n("ac6a"),n("c80c")),i=(n("96cf"),n("3b8d")),s=n("0687"),l=n("333d"),c=(n("4360"),n("e3eb")),u=n.n(c),d=n("ec8a"),p=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"systemNotifyModel"},[n("div",{staticClass:"m-core"},[n("el-form",{ref:"form",staticStyle:{width:"100%"},attrs:{model:t.form,rules:t.rules,"label-width":"110px"}},[n("el-form-item",{attrs:{label:"标题",prop:"title"}},[n("el-input",{attrs:{placeholder:"请输入标题"},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title","string"===typeof e?e.trim():e)},expression:"form.title"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"排序值"}},[n("el-input",{attrs:{placeholder:"请输入排序值",type:"number"},model:{value:t.form.order,callback:function(e){t.$set(t.form,"order","string"===typeof e?e.trim():e)},expression:"form.order"}})],1),t._v(" "),n("el-form-item",{attrs:{prop:"subType",label:"类型"}},[n("el-select",{attrs:{clearable:"",placeholder:"帮助类型"},model:{value:t.form.subType,callback:function(e){t.$set(t.form,"subType",e)},expression:"form.subType"}},t._l(t.typeList,(function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),t._v(" "),0==t.outUrlRadio?n("el-form-item",{attrs:{label:"内容",prop:"content",rules:[{required:!0,message:"请编辑内容",trigger:"blur"}]}},[n("quill-editor",{ref:"myQuillEditor",staticClass:"ql-editor",staticStyle:{"margin-top":"-17px"},attrs:{options:t.editorOption},on:{change:function(e){return t.onEditorChange(e)}},model:{value:t.form.content,callback:function(e){t.$set(t.form,"content",e)},expression:"form.content"}}),t._v(" "),n("el-upload",{staticClass:"ivu-upload",attrs:{"show-upload-list":!1,"on-success":t.handleSuccess,accept:".jpg, .jpeg, .png, .gif","max-size":2048,multiple:"",action:t.ossUploadUrl,data:t.dataObj,"before-upload":t.beforeImgUpload}},[n("Button",{attrs:{icon:"ios-cloud-upload-outline"}})],1)],1):t._e(),t._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onSubmit("form")}}},[t._v("立即"+t._s("create"==t.pageType?"创建":"修改"))]),t._v(" "),n("el-button",{on:{click:function(e){return t.onReSet("form")}}},[t._v("重置")])],1)],1)],1),t._v(" "),n("el-dialog",{attrs:{title:"插入视频","append-to-body":!0,width:"500px",visible:t.dialogFormVisible},on:{close:function(e){return t.onDialogClose("diologForm")},"update:visible":function(e){t.dialogFormVisible=e}}},[n("el-form",{ref:"diologForm",attrs:{model:t.dialogForm,rules:t.dialogFormRules}},[n("el-form-item",{attrs:{label:"封面图地址",prop:"poster",rules:[{required:2==t.uploadType,message:"请上传封面图",trigger:"blur"}],"label-width":"120px"}},[n("el-upload",{directives:[{name:"loading",rawName:"v-loading",value:t.uploadImgLoading,expression:"uploadImgLoading"}],staticClass:"avatar-uploader",staticStyle:{"line-height":"0",display:"inline-block"},attrs:{action:t.ossUploadUrl,data:t.dataObj,"show-file-list":!1,accept:".jpg, .jpeg, .png, .gif","on-success":t.handleImgSuccess,"on-error":t.handleUploadImgError,"before-upload":t.beforeImgUpload}},[t.dialogForm.poster?n("img",{staticClass:"avatar",attrs:{src:t.dialogForm.poster}}):n("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1),t._v(" "),n("el-form-item",{attrs:{label:"视频类型","label-width":"120px"}},[n("el-radio-group",{model:{value:t.formRadio,callback:function(e){t.formRadio=e},expression:"formRadio"}},[n("el-radio",{attrs:{label:1}},[t._v("外部链接")]),t._v(" "),n("el-radio",{attrs:{label:2}},[t._v("上传")])],1)],1),t._v(" "),1==t.formRadio?n("el-form-item",{attrs:{label:"视频地址","label-width":"120px",prop:"url"}},[n("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:t.dialogForm.url,callback:function(e){t.$set(t.dialogForm,"url",e)},expression:"dialogForm.url"}})],1):t._e(),t._v(" "),2==t.formRadio?n("el-form-item",{attrs:{label:"上传视频","label-width":"120px",prop:"videoUrl"}},[n("el-upload",{directives:[{name:"loading",rawName:"v-loading",value:t.uploadLoading,expression:"uploadLoading"}],staticClass:"upload-demo",staticStyle:{display:"inline-block"},attrs:{action:t.ossUploadUrl,data:t.dataObj,"before-upload":t.beforeUpload,"on-success":t.handleUploadSuccess,"on-error":t.handleUploadError,"show-file-list":!1,accept:".mp4","file-list":t.fileList,"on-exceed":t.handleExceed}},[t.dialogForm.videoUrl?n("video",{staticStyle:{width:"120px",height:"120px"},attrs:{type:"video/mp4",preload:"auto",src:t.dialogForm.videoUrl}}):n("i",{staticClass:"el-icon-plus avatar-uploader-icon"})]),t._v(" "),n("p",{staticClass:"imageSize"},[2==t.uploadType&&8==t.type?n("span",[t._v("上传视频尺寸建议:1242px * 2208px;")]):t._e(),n("br"),t._v("\n 只能上传mp4文件, 且不超过100M\n ")])],1):t._e()],1),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onVideoComfirm("diologForm")}}},[t._v("确 定")])],1)],1),t._v(" "),n("el-dialog",{attrs:{width:"375px",title:"预览","append-to-body":!0,visible:t.lookVisible},on:{"update:visible":function(e){t.lookVisible=e}}},[n("div",{staticClass:"sd-container"},[n("h2",[t._v(t._s(t.dataInfo.title))]),t._v(" "),n("div",{staticClass:"titleInfo"},[n("p",[t._v(t._s(t.typeCheck(t.dataInfo.type)))]),t._v(" "),n("p",[t._v(t._s(t.dataInfo.updateTime))])]),t._v(" "),n("div",{staticClass:"msgWrap quill-editor ql-editor",domProps:{innerHTML:t._s(t.dataInfo.content)}})])])],1)},f=[],m=(n("28a5"),n("db72")),g=n("a8db"),h=n("3607"),b=(n("5f87"),n("61f7"),n("a753"),n("8096"),n("14e1"),n("9339")),v=n.n(b),y=n("953d"),_=n("7590"),k=n("5a0c"),w=n.n(k),x=["organIdList","linkUrl","content"],I=[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["clean"],["image","video"]],L={"ql-bold":"加粗","ql-color":"颜色","ql-font":"字体","ql-code":"插入代码","ql-italic":"斜体","ql-background":"背景颜色","ql-size":"字体大小","ql-strike":"删除线","ql-script":"上标/下标","ql-underline":"下划线","ql-blockquote":"引用","ql-header":"标题","ql-indent":"缩进","ql-list":"列表","ql-align":"文本对齐","ql-direction":"文本方向","ql-code-block":"代码块","ql-formula":"公式","ql-image":"图片","ql-video":"视频","ql-clean":"清除字体样式","ql-upload":"文件"};v.a.register(_["a"],!0);var S={props:["options","typeList"],name:"contentOperation",components:{quillEditor:y["quillEditor"]},data:function(){var t=this,e=this.options;return{uploadType:1,uploadStatus:!1,type:e.type,pageType:e.pageType,organId:null,content:null,dialogFormVisible:!1,formRadio:1,lookVisible:!1,dataInfo:{title:"",type:e.type,updateTime:w()().format("YYYY-MM-DD HH:mm:ss"),content:null},editorIndex:0,editorOption:{placeholder:"请输入内容",modules:{toolbar:{container:I,handlers:{image:function(t){t?document.querySelector(".ivu-upload .el-upload").click():this.quill.format("image",!1)},video:function(e){if(e){t.dialogFormVisible=!0;var n=t.$refs.myQuillEditor.quill;t.editorIndex=n.getSelection().index}else this.quill.format("image",!1)}}}}},dialogForm:{poster:null,url:null,videoUrl:null},uploadLoading:!1,uploadImgLoading:!1,fileList:[],dialogFormRules:{url:[{required:!0,message:"请输入视频地址",trigger:"blur"}],videoUrl:[{required:!0,message:"请上传视频",trigger:"blur"}]},outUrlRadio:0,form:{title:null,order:null,linkUrl:null,type:e.type,status:0,content:null,organIdList:[]},rules:{title:[{required:!0,message:"请输入标题",trigger:"blur"},{min:2,max:30,message:"长度在 2 到 30 个字符",trigger:"blur"}],organIdList:[{required:!0,message:"请选择分部",trigger:"change"}]},imageSize:null,dataObj:{policy:"",signature:"",key:"",KSSAccessKeyId:"",acl:"public-read",name:""},ossUploadUrl:"https://gyt.ks3-cn-beijing.ksyuncs.com",bucket_name:"gyt"}},mounted:function(){this.$store.dispatch("setBranchs"),this.init()},methods:{init:function(){this.getList(),this.addQuillTitle();var t={1:"468px * 552px;图片不能超过 2M;",2:"456px * 288px; 图片不能超过 2M;",3:"686px * 140px; 图片不能超过 2M;",4:"图片不能超过 2M;",5:"图片不能超过 2M;",6:"图片不能超过 2M;",7:"图片不能超过 2M;",8:"1242px * 2208px; 图片不能超过 2M;"};this.imageSize=t[this.form.type],this.$refs["form"].clearValidate()},onVideoComfirm:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return!1;var n=e.dialogForm,a=e.editor,o={poster:n.poster,url:1==e.formRadio?n.url:n.videoUrl};a.insertEmbed(e.editorIndex,"video",o),a.setSelection(e.editorIndex+1,{preload:!1}),e.dialogFormVisible=!1,e.dialogForm={poster:null,url:null,videoUrl:null}}))},onDialogClose:function(t){this.dialogForm={poster:null,url:null,videoUrl:null},this.$refs[t].resetFields()},addQuillTitle:function(){var t=document.querySelector(".ql-toolbar"),e=t.querySelectorAll("button"),n=t.querySelectorAll("select");e.forEach((function(t){"ql-script"===t.className?"sub"===t.value?t.title="下标":t.title="上标":"ql-indent"===t.className?"+1"===t.value?t.title="向右缩进":t.title="向左缩进":t.title=L[t.classList[0]]})),n.forEach((function(t){t.parentNode.title=L[t.classList[0]]}))},onSubmit:function(t){var e=this;this.$refs[t].validate(function(){var t=Object(i["a"])(Object(r["a"])().mark((function t(n){var a,o,i,l,c,u;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!n){t.next=15;break}if(a=e.form,o=a.organIdList,i=a.linkUrl,l=a.content,c=Object(g["a"])(a,x),1==e.outUrlRadio?l=null:i=null,u=Object(m["a"])(Object(m["a"])({},c),{},{linkUrl:i,content:l,organIdList:o?o.join(","):null}),"create"!=e.pageType){t.next=10;break}return u.id&&delete u.id,t.next=8,Object(s["a"])(u).then((function(t){e.messageTips("添加",t)}));case 8:t.next=13;break;case 10:if("update"!=e.pageType){t.next=13;break}return t.next=13,Object(s["f"])(u).then((function(t){e.messageTips("修改",t)}));case 13:t.next=17;break;case 15:return e.$nextTick((function(){var t=document.getElementsByClassName("is-error");t[0].scrollIntoView({block:"center",behavior:"smooth"})})),t.abrupt("return",!1);case 17:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},messageTips:function(t,e){200==e.code?(this.$message.success(t+"成功"),this.$listeners.submited(),this.$listeners.close()):this.$message.error(e.msg)},handleSuccess:function(t){this.uploadImgLoading=!1;var e=this.editor,n=this.ossUploadUrl+"/"+this.dataObj.key;if(n){var a=e.getSelection().index;e.insertEmbed(a,"image",n),e.setSelection(a+1)}else this.$message.error("图片插入失败")},onReSet:function(t){this.form={title:null,order:null,linkUrl:null,type:this.type,status:1,content:null,organIdList:[]},this.$refs[t].resetFields()},onLook:function(){var t=this.dataInfo;t.title=this.form.title,t.content=this.form.content,setTimeout((function(){var t=document.querySelectorAll(".msgWrap img");t.length>0&&t.forEach((function(t){t.style.width="100%"}));var e=document.querySelectorAll(".msgWrap .ql-video");e.length>0&&e.forEach((function(t){t.style.width="100%",t.style.height="195px"}))}),500),this.lookVisible=!0},getList:function(){var t=Object(i["a"])(Object(r["a"])().mark((function t(){var e=this;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if("create"!=this.pageType){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,Object(s["d"])({id:this.options.id}).then((function(t){if(200==t.code){var n=t.data,a=n.organIdList?n.organIdList.split(","):[];n.linkUrl?e.outUrlRadio=1:e.outUrlRadio=0,e.form={id:n.id,title:n.title,order:n.order,linkUrl:n.linkUrl,type:n.type,status:n.status,organIdList:a.map((function(t){return+t})),content:n.content,subType:n.subType},e.dataInfo.updateTime=n.updateTime}}));case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),handleUploadImgError:function(t){this.uploadImgLoading=!1,this.$message.error("上传失败")},handleImgSuccess:function(t,e){this.uploadImgLoading=!1;var n=this.ossUploadUrl+"/"+this.dataObj.key;n?this.dialogForm.poster=n:this.$message.error("上传失败")},beforeImgUpload:function(){var t=Object(i["a"])(Object(r["a"])().mark((function t(e){var n,a,o,i,s,l,c;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n={"image/png":!0,"image/jpeg":!0},a=n[e.type],o=e.size/1024/1024<2,a||this.$message.error("只能上传图片格式!"),o||this.$message.error("上传图片大小不能超过 2MB!"),a&&o&&(this.uploadImgLoading=!0),t.prev=7,i=e.name.replaceAll(" ","_"),s=(new Date).getTime()+i,l={filename:i,bucketName:this.bucket_name,postData:{filename:i,acl:"public-read",key:s,unknowValueField:[]}},t.next=13,Object(h["p"])(l);case 13:c=t.sent,this.dataObj={policy:c.data.policy,signature:c.data.signature,key:s,KSSAccessKeyId:c.data.kssAccessKeyId,acl:"public-read",name:i},t.next=21;break;case 17:return t.prev=17,t.t0=t["catch"](7),console.log(t.t0),t.abrupt("return",!1);case 21:return t.abrupt("return",a&&o);case 22:case"end":return t.stop()}}),t,this,[[7,17]])})));function e(e){return t.apply(this,arguments)}return e}(),typeCheck:function(t){var e={1:"精彩活动",2:"热门资讯",4:"专项训练",7:"知识库",19:"系统通知"};return e[t]?e[t]:"管乐迷"},typeIndex:function(t){var e={1:0,2:1,3:4,4:2,5:3,6:5,7:6,8:7,19:8};return e[t]},onEditorChange:function(t){t.quill;var e=t.html;t.text;this.form.content=e},beforeUpload:function(){var t=Object(i["a"])(Object(r["a"])().mark((function t(e){var n,a,o,i,s;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.size/1024/1024<100,n||this.$message.error("上传视频大小不能超过 100MB!"),this.uploadLoading=!0,t.prev=3,a=e.name.replaceAll(" ","_"),o=(new Date).getTime()+a,i={filename:a,bucketName:this.bucket_name,postData:{filename:a,acl:"public-read",key:o,unknowValueField:[]}},t.next=9,Object(h["p"])(i);case 9:s=t.sent,this.dataObj={policy:s.data.policy,signature:s.data.signature,key:o,KSSAccessKeyId:s.data.kssAccessKeyId,acl:"public-read",name:a},t.next=17;break;case 13:return t.prev=13,t.t0=t["catch"](3),console.log(t.t0),t.abrupt("return",!1);case 17:return t.abrupt("return",n);case 18:case"end":return t.stop()}}),t,this,[[3,13]])})));function e(e){return t.apply(this,arguments)}return e}(),handleUploadError:function(t){this.uploadLoading=!1,this.$message.error("上传视频失败")},handleUploadSuccess:function(t,e){this.uploadLoading=!1;var n=this.ossUploadUrl+"/"+this.dataObj.key;n?(this.$message.success("上传视频成功"),this.dialogForm.videoUrl=n):this.$message.error("上传视频失败")},handleExceed:function(t,e){this.$message.error("您已上传过视频")}},computed:{editor:function(){return this.$refs.myQuillEditor.quill}}},j=S,O=(n("1e22"),n("2877")),T=Object(O["a"])(j,p,f,!1,null,"eaf70e32",null),$=T.exports,q={name:"knowledge",components:{pagination:l["a"],livehelpModel:$},data:function(){return{searchForm:{organIdList:[],subjectId:null,subType:null},tableList:[],teacherId:this.$route.query.teacherId,pageInfo:{limit:10,page:1,total:1,page_size:[10,20,40,50]},typeList:[{name:"帮助中心",id:27},{name:"功能介绍",id:28}],formTitle:{create:"新建帮助",update:"修改帮助"},notifyStatus:!1,formActionTitle:""}},mounted:function(){var t=Object(i["a"])(Object(r["a"])().mark((function t(){var e=this;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.$store.dispatch("setSubjects"),t.next=3,Object(s["e"])({parentId:26}).then((function(t){200==t.code&&(e.typeList=t.data)}));case 3:this.$store.dispatch("setBranchs"),this.getList();case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{search:function(){this.pageInfo.page=1,this.getList()},permission:function(t){return Object(d["a"])(t)},getList:function(){var t=this,e={subType:this.searchForm.subType,rows:this.pageInfo.limit,page:this.pageInfo.page,type:26};Object(s["c"])(u()(e)).then((function(e){200==e.code&&(t.tableList=e.data.rows,t.pageInfo.total=e.data.total)}))},openTeaching:function(t,e){var n={};"update"==t&&(n.id=e.id),this.formActionTitle=t,n.type=26,n.pageType=t,this.systemOptions=n,this.notifyStatus=!0},onDel:function(t){var e=this;this.$confirm("确定是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(s["b"])({id:t.id}).then((function(t){200==t.code?(e.$message.success("删除成功"),e.getList()):e.$message.error(t.msg)}))})).catch((function(){}))},onStop:function(t,e){var n=this,a=["停用","启用"];Object(s["f"])({id:t.id,status:e}).then((function(t){200==t.code?(n.$message.success(a[e]+"成功"),n.getList()):n.$message.error(t.msg)}))},formatSubType:function(t){var e=null;return this.typeList.forEach((function(n){n.id==t&&(e=n.name)})),e}},filters:{}},U=q,F=(n("28ce"),Object(O["a"])(U,a,o,!1,null,"4e51fc3e",null));e["a"]=F.exports},"1e22":function(t,e,n){"use strict";n("4aec")},"28ce":function(t,e,n){"use strict";n("c0d1")},"3e02":function(t,e,n){},"490a":function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("auth",{attrs:{auths:"news/add"}},[n("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:function(e){return t.openTeaching("create")}}},[t._v("\n 新建\n ")])],1),t._v(" "),n("div",{staticClass:"tableWrap"},[n("el-table",{attrs:{data:t.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[n("el-table-column",{attrs:{align:"center",label:"封面图"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("img",{staticClass:"bannerImg",attrs:{src:t.row.coverImage,alt:""}})]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"title",label:"标题"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"跳转链接"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("overflow-text",{attrs:{text:t.row.linkUrl}})]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"remark",label:"是否使用"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(1==e.row.status?"是":"否")+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"memo",label:"版本号"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.memo?e.row.memo:"--")+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"order",label:"排序"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"remark",label:"适用分部"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("overflow-text",{attrs:{text:t.row.organNameList}})]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",[n("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/update"}},[n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.openTeaching("update",e.row)}}},[t._v("修改")]),t._v(" "),1==e.row.status?n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.onStop(e.row,0)}}},[t._v("停用")]):n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.onStop(e.row,1)}}},[t._v("启用")])],1),t._v(" "),n("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/del"}},[n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.onDel(e.row)}}},[t._v("删除")])],1)],1)]}}])})],1),t._v(" "),n("pagination",{attrs:{saveKey:"contentAppPage",sync:"",total:t.pageInfo.total,page:t.pageInfo.page,limit:t.pageInfo.limit,"page-sizes":t.pageInfo.page_size},on:{"update:total":function(e){return t.$set(t.pageInfo,"total",e)},"update:page":function(e){return t.$set(t.pageInfo,"page",e)},"update:limit":function(e){return t.$set(t.pageInfo,"limit",e)},pagination:t.getList}})],1)],1)},o=[],r=n("0687"),i=n("333d"),s={name:"training",components:{pagination:i["a"]},data:function(){return{searchForm:{organIdList:[]},tableList:[],teacherId:this.$route.query.teacherId,pageInfo:{limit:10,page:1,total:1,page_size:[10,20,40,50]}}},mounted:function(){this.$store.dispatch("setBranchs"),this.getList()},methods:{search:function(){this.pageInfo.page=1,this.getList()},getList:function(){var t=this,e={clientName:"manage",organIdList:this.searchForm.organIdList?this.searchForm.organIdList.join(","):null,rows:this.pageInfo.limit,page:this.pageInfo.page,type:6};Object(r["c"])(e).then((function(e){200==e.code&&(t.tableList=e.data.rows,t.pageInfo.total=e.data.total)}))},openTeaching:function(t,e){var n={};"update"==t&&(n.id=e.id),n.type=6,n.pageType=t,this.$router.push({path:"/contentManager/contentOperation",query:n},(function(t){var e=t.matched||[];for(var n in e)"/contentManager/contentOperation"==e[n].path&&(t.matched[n].meta.activeMenu="/platformIndex")}))},onDel:function(t){var e=this;this.$confirm("确定是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(r["b"])({id:t.id}).then((function(t){200==t.code?(e.$message.success("删除成功"),e.getList()):e.$message.error(t.msg)}))})).catch((function(){}))},onStop:function(t,e){var n=this,a=["停用","启用"];Object(r["f"])({id:t.id,status:e}).then((function(t){200==t.code?(n.$message.success(a[e]+"成功"),n.getList()):n.$message.error(t.msg)}))}}},l=s,c=(n("f4e2"),n("2877")),u=Object(c["a"])(l,a,o,!1,null,"b3af20ce",null);e["a"]=u.exports},"4aec":function(t,e,n){},"51d7":function(t,e,n){},7590:function(t,e,n){"use strict";var a=n("d225"),o=n("b0b4"),r=n("2a88"),i=n("6bb5"),s=n("4e2b"),l=n("c603"),c=n("953d"),u=c["Quill"].import("blots/block/embed"),d=c["Quill"].import("formats/link"),p=["height","width","src","poster"],f=function(t){Object(s["a"])(n,t);var e=Object(l["a"])(n);function n(){return Object(a["a"])(this,n),e.apply(this,arguments)}return Object(o["a"])(n,[{key:"format",value:function(t,e){p.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):Object(r["a"])(Object(i["a"])(n.prototype),"format",this).call(this,t,e)}},{key:"html",value:function(){var t=this.value(),e=t.video;return'<a href="'.concat(e,'">').concat(e,"</a>")}}],[{key:"create",value:function(t){var e=Object(r["a"])(Object(i["a"])(n),"create",this).call(this,t.url);return e.setAttribute("controls","controls"),e.setAttribute("type","video/mp4"),e.setAttribute("preload","auto"),e.setAttribute("autopaly","false"),e.setAttribute("src",this.sanitize(t.url)),e.setAttribute("poster",this.sanitize(t.poster)),e}},{key:"formats",value:function(t){return p.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return d.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),n}(u);f.blotName="video",f.className="ql-video",f.tagName="video",e["a"]=f},8496:function(t,e,n){"use strict";n("3e02")},b3fe:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("auth",{attrs:{auths:"news/add"}},[n("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:function(e){return t.openTeaching("create")}}},[t._v("\n 新建\n ")])],1),t._v(" "),n("div",{staticClass:"tableWrap"},[n("el-table",{attrs:{data:t.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[n("el-table-column",{attrs:{align:"center",label:"轮播图"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("img",{staticClass:"bannerImg",attrs:{src:t.row.coverImage,alt:""}})]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"title",label:"标题"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"跳转链接"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("overflow-text",{attrs:{text:t.row.linkUrl+"/"+t.row.id}})]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"remark",label:"是否使用"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(1==e.row.status?"是":"否"))]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"order",label:"排序"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"remark",label:"适用分部"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("overflow-text",{attrs:{text:t.row.organNameList}})]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",[n("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/update"}},[n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.openTeaching("update",e.row)}}},[t._v("修改")]),t._v(" "),1==e.row.status?n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.onStop(e.row,0)}}},[t._v("停用")]):n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.onStop(e.row,1)}}},[t._v("启用")])],1),t._v(" "),n("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/del"}},[n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.onDel(e.row)}}},[t._v("删除")])],1)],1)]}}])})],1),t._v(" "),n("pagination",{attrs:{saveKey:"contentTraining",sync:"",total:t.pageInfo.total,page:t.pageInfo.page,limit:t.pageInfo.limit,"page-sizes":t.pageInfo.page_size},on:{"update:total":function(e){return t.$set(t.pageInfo,"total",e)},"update:page":function(e){return t.$set(t.pageInfo,"page",e)},"update:limit":function(e){return t.$set(t.pageInfo,"limit",e)},pagination:t.getList}})],1)],1)},o=[],r=n("0687"),i=n("333d"),s={name:"training",components:{pagination:i["a"]},data:function(){return{searchForm:{organIdList:[]},tableList:[],teacherId:this.$route.query.teacherId,pageInfo:{limit:10,page:1,total:1,page_size:[10,20,40,50]}}},mounted:function(){this.$store.dispatch("setBranchs"),this.getList()},methods:{search:function(){this.pageInfo.page=1,this.getList()},getList:function(){var t=this,e={clientName:"manage",organIdList:this.searchForm.organIdList?this.searchForm.organIdList.join(","):null,rows:this.pageInfo.limit,page:this.pageInfo.page,type:4};Object(r["c"])(e).then((function(e){200==e.code&&(t.tableList=e.data.rows,t.pageInfo.total=e.data.total)}))},openTeaching:function(t,e){var n={};"update"==t&&(n.id=e.id),n.type=4,n.pageType=t,this.$router.push({path:"/contentManager/contentOperation",query:n})},onDel:function(t){var e=this;this.$confirm("确定是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(r["b"])({id:t.id}).then((function(t){200==t.code?(e.$message.success("删除成功"),e.getList()):e.$message.error(t.msg)}))})).catch((function(){}))},onStop:function(t,e){var n=this,a=["停用","启用"];Object(r["f"])({id:t.id,status:e}).then((function(t){200==t.code?(n.$message.success(a[e]+"成功"),n.getList()):n.$message.error(t.msg)}))}}},l=s,c=(n("8496"),n("2877")),u=Object(c["a"])(l,a,o,!1,null,"5e8f6f49",null);e["a"]=u.exports},c0d1:function(t,e,n){},f4e2:function(t,e,n){"use strict";n("51d7")}}]);