chunk-7becf5b3.65895838.js 33 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7becf5b3","chunk-2d0d6f6b"],{"0687":function(t,e,a){"use strict";a.d(e,"c",(function(){return s})),a.d(e,"f",(function(){return l})),a.d(e,"a",(function(){return c})),a.d(e,"d",(function(){return u})),a.d(e,"b",(function(){return d})),a.d(e,"e",(function(){return p}));var n=a("b775"),r=a("4328"),o=a.n(r),i="/api-cms";function s(t){return Object(n["a"])({url:i+"/news/queryPage",method:"get",params:t})}function l(t){return Object(n["a"])({url:i+"/news/update",method:"post",data:o.a.stringify(t)})}function c(t){return Object(n["a"])({url:i+"/news/add",method:"post",data:o.a.stringify(t)})}function u(t){return Object(n["a"])({url:i+"/news/query",method:"get",params:t})}function d(t){return Object(n["a"])({url:i+"/news/del/"+t.id,method:"post",data:o.a.stringify(t)})}function p(t){return Object(n["a"])({url:i+"/news/typeList",method:"get",params:t})}},"09f4":function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),Math.easeInOutQuad=function(t,e,a,n){return t/=n/2,t<1?a/2*t*t+e:(t--,-a/2*(t*(t-2)-1)+e)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function r(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(t,e,a){var i=o(),s=t-i,l=20,c=0;e="undefined"===typeof e?500:e;var u=function t(){c+=l;var o=Math.easeInOutQuad(c,i,s,e);r(o),c<e?n(t):a&&"function"===typeof a&&a()};u()}},"1cb2":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("auth",{attrs:{auths:"news/add"}},[a("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:function(e){return t.openTeaching("create")}}},[t._v("\n 新建\n ")])],1),t._v(" "),a("save-form",{staticClass:"searchForm",attrs:{inline:!0,saveKey:"contentKnowledge",model:t.searchForm},on:{submit:t.search}},[a("el-form-item",{attrs:{prop:"subType"}},[a("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 a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"danger"}},[t._v("搜索")])],1)],1),t._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:t.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",label:"编号",prop:"id"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"title",label:"标题"}}),t._v(" "),a("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(" "),a("el-table-column",{attrs:{align:"center",prop:"order",label:"排序值"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[a("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/update"}},[!e.row.memo||t.permission("banner/copyrightbtn")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.openTeaching("update",e.row)}}},[t._v("修改")]):t._e()],1),t._v(" "),a("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/del"}},[!e.row.memo||t.permission("banner/copyrightbtn")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.onDel(e.row)}}},[t._v("删除")]):t._e()],1)],1)]}}])})],1),t._v(" "),a("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(" "),a("el-dialog",{attrs:{title:t.formTitle[t.formActionTitle],visible:t.notifyStatus,width:"800px"},on:{"update:visible":function(e){t.notifyStatus=e}}},[t.notifyStatus?a("livehelpModel",{attrs:{options:t.systemOptions,typeList:t.typeList},on:{submited:t.getList,close:function(e){t.notifyStatus=!1}}}):t._e()],1)],1)},r=[],o=(a("7f7f"),a("ac6a"),a("c80c")),i=(a("96cf"),a("3b8d")),s=a("0687"),l=a("333d"),c=(a("4360"),a("e3eb")),u=a.n(c),d=a("ec8a"),p=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"systemNotifyModel"},[a("div",{staticClass:"m-core"},[a("el-form",{ref:"form",staticStyle:{width:"100%"},attrs:{model:t.form,rules:t.rules,"label-width":"110px"}},[a("el-form-item",{attrs:{label:"标题",prop:"title"}},[a("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(" "),a("el-form-item",{attrs:{label:"排序值"}},[a("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(" "),a("el-form-item",{attrs:{prop:"subType",label:"类型"}},[a("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 a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),t._v(" "),0==t.outUrlRadio?a("el-form-item",{attrs:{label:"内容",prop:"content",rules:[{required:!0,message:"请编辑内容",trigger:"blur"}]}},[a("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(" "),a("el-upload",{staticClass:"ivu-upload",attrs:{"show-upload-list":!1,"http-request":t.handleSuccess,accept:".jpg, .jpeg, .png, .gif","max-size":2048,multiple:"",action:t.ossUploadUrl,data:t.dataObj,"before-upload":t.beforeImgUpload}},[a("Button",{attrs:{icon:"ios-cloud-upload-outline"}})],1)],1):t._e(),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onSubmit("form")}}},[t._v("立即"+t._s("create"==t.pageType?"创建":"修改"))]),t._v(" "),a("el-button",{on:{click:function(e){return t.onReSet("form")}}},[t._v("重置")])],1)],1)],1),t._v(" "),a("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}}},[a("el-form",{ref:"diologForm",attrs:{model:t.dialogForm,rules:t.dialogFormRules}},[a("el-form-item",{attrs:{label:"封面图地址",prop:"poster",rules:[{required:2==t.uploadType,message:"请上传封面图",trigger:"blur"}],"label-width":"120px"}},[a("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","http-request":t.handleImgSuccess,"on-error":t.handleUploadImgError,"before-upload":t.beforeImgUpload}},[t.dialogForm.poster?a("img",{staticClass:"avatar",attrs:{src:t.dialogForm.poster}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1),t._v(" "),a("el-form-item",{attrs:{label:"视频类型","label-width":"120px"}},[a("el-radio-group",{model:{value:t.formRadio,callback:function(e){t.formRadio=e},expression:"formRadio"}},[a("el-radio",{attrs:{label:1}},[t._v("外部链接")]),t._v(" "),a("el-radio",{attrs:{label:2}},[t._v("上传")])],1)],1),t._v(" "),1==t.formRadio?a("el-form-item",{attrs:{label:"视频地址","label-width":"120px",prop:"url"}},[a("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?a("el-form-item",{attrs:{label:"上传视频","label-width":"120px",prop:"videoUrl"}},[a("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,"http-request":t.handleUploadSuccess,"on-error":t.handleUploadError,"show-file-list":!1,accept:".mp4","file-list":t.fileList,"on-exceed":t.handleExceed}},[t.dialogForm.videoUrl?a("video",{staticStyle:{width:"120px",height:"120px"},attrs:{type:"video/mp4",preload:"auto",src:t.dialogForm.videoUrl}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})]),t._v(" "),a("p",{staticClass:"imageSize"},[2==t.uploadType&&8==t.type?a("span",[t._v("上传视频尺寸建议:1242px * 2208px;")]):t._e(),a("br"),t._v("\n 只能上传mp4文件, 且不超过100M\n ")])],1):t._e()],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onVideoComfirm("diologForm")}}},[t._v("确 定")])],1)],1),t._v(" "),a("el-dialog",{attrs:{width:"375px",title:"预览","append-to-body":!0,visible:t.lookVisible},on:{"update:visible":function(e){t.lookVisible=e}}},[a("div",{staticClass:"sd-container"},[a("h2",[t._v(t._s(t.dataInfo.title))]),t._v(" "),a("div",{staticClass:"titleInfo"},[a("p",[t._v(t._s(t.typeCheck(t.dataInfo.type)))]),t._v(" "),a("p",[t._v(t._s(t.dataInfo.updateTime))])]),t._v(" "),a("div",{staticClass:"msgWrap quill-editor ql-editor",domProps:{innerHTML:t._s(t.dataInfo.content)}})])])],1)},f=[],m=(a("28a5"),a("db72")),g=a("a8db"),b=(a("3607"),a("4450")),h=(a("5f87"),a("61f7"),a("a753"),a("8096"),a("14e1"),a("9339")),v=a.n(h),y=a("953d"),k=a("7590"),_=a("5a0c"),w=a.n(_),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"]],j={"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(k["a"],!0);var O={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 a=t.$refs.myQuillEditor.quill;t.editorIndex=a.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 a=e.dialogForm,n=e.editor,r={poster:a.poster,url:1==e.formRadio?a.url:a.videoUrl};n.insertEmbed(e.editorIndex,"video",r),n.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"),a=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=j[t.classList[0]]})),a.forEach((function(t){t.parentNode.title=j[t.classList[0]]}))},onSubmit:function(t){var e=this;this.$refs[t].validate(function(){var t=Object(i["a"])(Object(o["a"])().mark((function t(a){var n,r,i,l,c,u;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=15;break}if(n=e.form,r=n.organIdList,i=n.linkUrl,l=n.content,c=Object(g["a"])(n,x),1==e.outUrlRadio?l=null:i=null,u=Object(m["a"])(Object(m["a"])({},c),{},{linkUrl:i,content:l,organIdList:r?r.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(){var t=Object(i["a"])(Object(o["a"])().mark((function t(e){var a,n,r,i;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a={policy:e.data.policy,signature:e.data.signature,key:e.data.key,KSSAccessKeyId:e.data.kssAccessKeyId,acl:"public-read",name:e.data.key,file:e.file},t.next=4,Object(b["b"])(this.ossUploadUrl,a);case 4:n=t.sent,r=this.editor,n?(i=r.getSelection().index,r.insertEmbed(i,"image",n),r.setSelection(i+1)):this.$message.error("图片插入失败"),t.next=11;break;case 9:t.prev=9,t.t0=t["catch"](0);case 11:this.uploadImgLoading=!1;case 12:case"end":return t.stop()}}),t,this,[[0,9]])})));function e(e){return t.apply(this,arguments)}return e}(),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(o["a"])().mark((function t(){var e=this;return Object(o["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 a=t.data,n=a.organIdList?a.organIdList.split(","):[];a.linkUrl?e.outUrlRadio=1:e.outUrlRadio=0,e.form={id:a.id,title:a.title,order:a.order,linkUrl:a.linkUrl,type:a.type,status:a.status,organIdList:n.map((function(t){return+t})),content:a.content,subType:a.subType},e.dataInfo.updateTime=a.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(){var t=Object(i["a"])(Object(o["a"])().mark((function t(e){var a,n;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a={policy:e.data.policy,signature:e.data.signature,key:e.data.key,KSSAccessKeyId:e.data.kssAccessKeyId,acl:"public-read",name:e.data.key,file:e.file},t.next=4,Object(b["b"])(this.ossUploadUrl,a);case 4:n=t.sent,n?this.dialogForm.poster=n:this.$message.error("上传失败"),t.next=10;break;case 8:t.prev=8,t.t0=t["catch"](0);case 10:this.uploadImgLoading=!1;case 11:case"end":return t.stop()}}),t,this,[[0,8]])})));function e(e){return t.apply(this,arguments)}return e}(),beforeImgUpload:function(){var t=Object(i["a"])(Object(o["a"])().mark((function t(e){var a,n,r,i,s,l,c;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a={"image/png":!0,"image/jpeg":!0},n=a[e.type],r=e.size/1024/1024<2,n||this.$message.error("只能上传图片格式!"),r||this.$message.error("上传图片大小不能超过 2MB!"),n&&r&&(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}},t.next=13,Object(b["a"])(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",n&&r);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(o["a"])().mark((function t(e){var a,n,r,i,s;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e.size/1024/1024<100,a||this.$message.error("上传视频大小不能超过 100MB!"),this.uploadLoading=!0,t.prev=3,n=e.name.replaceAll(" ","_"),r=(new Date).getTime()+n,i={filename:n,bucketName:this.bucket_name,postData:{filename:n,acl:"public-read",key:r,unknowValueField:[]}},t.next=9,Object(b["a"])(i);case 9:s=t.sent,this.dataObj={policy:s.data.policy,signature:s.data.signature,key:r,KSSAccessKeyId:s.data.kssAccessKeyId,acl:"public-read",name:n},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",a);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(){var t=Object(i["a"])(Object(o["a"])().mark((function t(e){var a,n;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a={policy:e.data.policy,signature:e.data.signature,key:e.data.key,KSSAccessKeyId:e.data.kssAccessKeyId,acl:"public-read",name:e.data.key,file:e.file},t.next=4,Object(b["b"])(this.ossUploadUrl,a);case 4:n=t.sent,n?(this.$message.success("上传视频成功"),this.dialogForm.videoUrl=n):this.$message.error("上传视频失败"),t.next=10;break;case 8:t.prev=8,t.t0=t["catch"](0);case 10:this.uploadLoading=!1;case 11:case"end":return t.stop()}}),t,this,[[0,8]])})));function e(e){return t.apply(this,arguments)}return e}(),handleExceed:function(t,e){this.$message.error("您已上传过视频")}},computed:{editor:function(){return this.$refs.myQuillEditor.quill}}},S=O,L=(a("cdd7"),a("2877")),T=Object(L["a"])(S,p,f,!1,null,"86e99612",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(o["a"])().mark((function t(){var e=this;return Object(o["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 a={};"update"==t&&(a.id=e.id),this.formActionTitle=t,a.type=26,a.pageType=t,this.systemOptions=a,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 a=this,n=["停用","启用"];Object(s["f"])({id:t.id,status:e}).then((function(t){200==t.code?(a.$message.success(n[e]+"成功"),a.getList()):a.$message.error(t.msg)}))},formatSubType:function(t){var e=null;return this.typeList.forEach((function(a){a.id==t&&(e=a.name)})),e}},filters:{}},U=q,F=(a("28ce"),Object(L["a"])(U,n,r,!1,null,"4e51fc3e",null));e["a"]=F.exports},"28ce":function(t,e,a){"use strict";a("c0d1")},"3e02":function(t,e,a){},"490a":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("auth",{attrs:{auths:"news/add"}},[a("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:function(e){return t.openTeaching("create")}}},[t._v("\n 新建\n ")])],1),t._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:t.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",label:"封面图"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("img",{staticClass:"bannerImg",attrs:{src:t.row.coverImage,alt:""}})]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"title",label:"标题"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"跳转链接"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("overflow-text",{attrs:{text:t.row.linkUrl}})]}}])}),t._v(" "),a("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(" "),a("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(" "),a("el-table-column",{attrs:{align:"center",prop:"order",label:"排序"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"remark",label:"适用分部"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("overflow-text",{attrs:{text:t.row.organNameList}})]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[a("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/update"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.openTeaching("update",e.row)}}},[t._v("修改")]),t._v(" "),1==e.row.status?a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.onStop(e.row,0)}}},[t._v("停用")]):a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.onStop(e.row,1)}}},[t._v("启用")])],1),t._v(" "),a("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/del"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.onDel(e.row)}}},[t._v("删除")])],1)],1)]}}])})],1),t._v(" "),a("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)},r=[],o=a("0687"),i=a("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(o["c"])(e).then((function(e){200==e.code&&(t.tableList=e.data.rows,t.pageInfo.total=e.data.total)}))},openTeaching:function(t,e){var a={};"update"==t&&(a.id=e.id),a.type=6,a.pageType=t,this.$router.push({path:"/contentManager/contentOperation",query:a},(function(t){var e=t.matched||[];for(var a in e)"/contentManager/contentOperation"==e[a].path&&(t.matched[a].meta.activeMenu="/platformIndex")}))},onDel:function(t){var e=this;this.$confirm("确定是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(o["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 a=this,n=["停用","启用"];Object(o["f"])({id:t.id,status:e}).then((function(t){200==t.code?(a.$message.success(n[e]+"成功"),a.getList()):a.$message.error(t.msg)}))}}},l=s,c=(a("f4e2"),a("2877")),u=Object(c["a"])(l,n,r,!1,null,"b3af20ce",null);e["a"]=u.exports},"51d7":function(t,e,a){},"63b1":function(t,e,a){},7590:function(t,e,a){"use strict";var n=a("d225"),r=a("b0b4"),o=a("2a88"),i=a("6bb5"),s=a("4e2b"),l=a("c603"),c=a("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"])(a,t);var e=Object(l["a"])(a);function a(){return Object(n["a"])(this,a),e.apply(this,arguments)}return Object(r["a"])(a,[{key:"format",value:function(t,e){p.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):Object(o["a"])(Object(i["a"])(a.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(o["a"])(Object(i["a"])(a),"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,a){return t.hasAttribute(a)&&(e[a]=t.getAttribute(a)),e}),{})}},{key:"sanitize",value:function(t){return d.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),a}(u);f.blotName="video",f.className="ql-video",f.tagName="video",e["a"]=f},8496:function(t,e,a){"use strict";a("3e02")},b3fe:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("auth",{attrs:{auths:"news/add"}},[a("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:function(e){return t.openTeaching("create")}}},[t._v("\n 新建\n ")])],1),t._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:t.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",label:"轮播图"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("img",{staticClass:"bannerImg",attrs:{src:t.row.coverImage,alt:""}})]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"title",label:"标题"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"跳转链接"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("overflow-text",{attrs:{text:t.row.linkUrl+"/"+t.row.id}})]}}])}),t._v(" "),a("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(" "),a("el-table-column",{attrs:{align:"center",prop:"order",label:"排序"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"remark",label:"适用分部"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("overflow-text",{attrs:{text:t.row.organNameList}})]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[a("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/update"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.openTeaching("update",e.row)}}},[t._v("修改")]),t._v(" "),1==e.row.status?a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.onStop(e.row,0)}}},[t._v("停用")]):a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.onStop(e.row,1)}}},[t._v("启用")])],1),t._v(" "),a("auth",{staticStyle:{"margin-left":"10px"},attrs:{auths:"news/del"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.onDel(e.row)}}},[t._v("删除")])],1)],1)]}}])})],1),t._v(" "),a("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)},r=[],o=a("0687"),i=a("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(o["c"])(e).then((function(e){200==e.code&&(t.tableList=e.data.rows,t.pageInfo.total=e.data.total)}))},openTeaching:function(t,e){var a={};"update"==t&&(a.id=e.id),a.type=4,a.pageType=t,this.$router.push({path:"/contentManager/contentOperation",query:a})},onDel:function(t){var e=this;this.$confirm("确定是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(o["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 a=this,n=["停用","启用"];Object(o["f"])({id:t.id,status:e}).then((function(t){200==t.code?(a.$message.success(n[e]+"成功"),a.getList()):a.$message.error(t.msg)}))}}},l=s,c=(a("8496"),a("2877")),u=Object(c["a"])(l,n,r,!1,null,"5e8f6f49",null);e["a"]=u.exports},c0d1:function(t,e,a){},cdd7:function(t,e,a){"use strict";a("63b1")},f4e2:function(t,e,a){"use strict";a("51d7")}}]);