(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-67263d67","chunk-5c79b44d"],{"271a":function(e,t,i){"use strict";var n=i("cb2d"),o=i("e330"),a=i("577e"),s=i("d6d6"),r=URLSearchParams,l=r.prototype,c=o(l.getAll),d=o(l.has),u=new r("a=1");!u.has("a",2)&&u.has("a",void 0)||n(l,"has",(function(e){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&void 0===i)return d(this,e);var n=c(this,e);s(t,1);var o=a(i),r=0;while(r<n.length)if(n[r++]===o)return!0;return!1}),{enumerable:!0,unsafe:!0})},5494:function(e,t,i){"use strict";var n=i("83ab"),o=i("e330"),a=i("edd0"),s=URLSearchParams.prototype,r=o(s.forEach);n&&!("size"in s)&&a(s,"size",{get:function(){var e=0;return r(this,(function(){e++})),e},configurable:!0,enumerable:!0})},"556c":function(e,t,i){},"780f":function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return o})),i.d(t,"d",(function(){return a})),i.d(t,"e",(function(){return s})),i.d(t,"f",(function(){return r})),i.d(t,"c",(function(){return l}));const n=["59977128740917248-1","190753622680670208-1"],o=["59977128740917248-1","190753622680670208-1"],a=["49533847984934912","457463292223295488"],s=["49533847984934912"],r=["49538854775951360","277074055142576128","433941816648142848","206837259536699392","623838149964992512","597752793981259776","248406016956305408","664474518881832960","431400775143395328","695282348047994880","301339078173921280","721670915129085952","728906792943226880"],l=["457463292223295488"]},8256:function(e,t,i){"use strict";var n=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loadJs,expression:"loadJs"}],staticClass:"tinymce-container",class:{fullscreen:e.fullscreen},style:{width:e.containerWidth}},[t("textarea",{staticClass:"tinymce-textarea",attrs:{id:e.tinymceId}}),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.showUploadFile,expression:"showUploadFile"}],staticClass:"editor-custom-btn-container"},[t("editorImage",{staticClass:"editor-upload-btn",attrs:{color:"#1890ff"},on:{successCBK:e.imageSuccessCBK}})],1)])},o=[],a=(i("e9f5"),i("7d54"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"upload-container"},[t("el-button",{style:{background:e.color,borderColor:e.color},attrs:{icon:"el-icon-upload",size:"mini",type:"primary"},on:{click:function(t){e.dialogVisible=!0}}},[e._v(" 上传文件 ")]),t("el-dialog",{attrs:{visible:e.dialogVisible,"append-to-body":""},on:{"update:visible":function(t){e.dialogVisible=t}}},[t("el-upload",{staticClass:"editor-slide-upload",staticStyle:{width:"50%"},attrs:{multiple:!0,"file-list":e.fileList,"show-file-list":!0,"on-error":e.handleError,"on-remove":e.handleRemove,"on-success":e.handleSuccess,"before-upload":e.beforeUpload,"http-request":e.uploadRequest,action:"void"}},[t("el-button",{attrs:{size:"small",type:"primary"}},[e._v(" 点击上传 ")])],1),t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(" 取 消 ")]),t("el-button",{attrs:{type:"primary"},on:{click:e.handleSubmit}},[e._v(" 确 定 ")])],1)],1)}),s=[],r=(i("d866"),i("ab43"),i("88a7"),i("271a"),i("5494"),i("e698")),l={name:"EditorSlideUpload",props:{color:{type:String,default:"#1890ff"}},data(){return{dialogVisible:!1,listObj:{},fileList:[],errList:""}},methods:{checkAllSuccess(){return Object.keys(this.listObj).every(e=>this.listObj[e].hasSuccess)},handleSubmit(){const e=Object.keys(this.listObj).map(e=>this.listObj[e]);if(!this.checkAllSuccess())return Object.keys(this.listObj).forEach((e,t)=>{this.listObj[e].hasSuccess||(this.errList=this.errList+(t+1)+",")}),void this.$message("第"+this.errList+"个文件上传失败，请删除这些，保存后重新再上传");this.$emit("successCBK",e),this.listObj={},this.fileList=[],this.dialogVisible=!1},handleSuccess(e,t){const i=t.uid,n=Object.keys(this.listObj);for(let o=0,a=n.length;o<a;o++)if(this.listObj[n[o]].uid===i)return this.listObj[n[o]].url=e.data,void(this.listObj[n[o]].hasSuccess=!0)},handleError(e){return!0},handleRemove(e){const t=e.uid,i=Object.keys(this.listObj);for(let n=0,o=i.length;n<o;n++)if(this.listObj[i[n]].uid===t)return void delete this.listObj[i[n]]},beforeUpload(e){const t=this;let i=r["a"].getFileType(e)[0],n="";switch(i){case"image":if(!r["a"].checkFileSize(r["a"].fileSizeLimit.questionContentImg,e))return!1;n=i;break;case"video":if(!r["a"].checkFileSize(r["a"].fileSizeLimit.questionContentVideo,e))return!1;n=i;break;case"audio":if(!r["a"].checkFileSize(r["a"].fileSizeLimit.questionContentAudio,e))return!1;n=i;break;default:if(!r["a"].checkFileSize(r["a"].fileSizeLimit.questionContentOther,e))return!1;n="other";break}window.URL||window.webkitURL;const o=e.uid;this.listObj[o]={},t.listObj[o]={hasSuccess:!0,uid:e.uid}},async uploadRequest(e){let t=e.file;return await new Promise((e,i)=>{r["a"].qiNiuUpload(t,{next:e=>{},error:t=>{console.log(t),e(!1),alert("上传失败")},complete:i=>{let n=r["a"].getBucketDomain(t),o=n+"/"+i.key;e({data:o})}})})}}},c=l,d=(i("f90b"),i("2877")),u=Object(d["a"])(c,a,s,!1,null,"407cb1a8",null),h=u.exports;const m=["advlist anchor autolink autosave colorpicker colorpicker contextmenu directionality emoticons fullscreen hr image imagetools insertdatetime link lists media nonbreaking noneditable pagebreak powerpaste preview print save searchreplace spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount"];var p=m;const f=["searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent  blockquote undo redo removeformat subscript superscript code codesample","hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen"];var g=f;i("d9e2"),i("14d9");let y=[];function b(){return window.tinymce}const v=(e,t)=>{const i=document.getElementById(e),n=t||function(){};if(!i){const t=document.createElement("script");t.src=e,t.id=e,document.body.appendChild(t),y.push(n);const i="onload"in t?o:a;i(t)}function o(t){t.onload=function(){this.onerror=this.onload=null;for(const e of y)e(null,t);y=null},t.onerror=function(){this.onerror=this.onload=null,n(new Error("Failed to load "+e),t)}}function a(e){e.onreadystatechange=function(){if("complete"===this.readyState||"loaded"===this.readyState){this.onreadystatechange=null;for(const t of y)t(null,e);y=null}}}i&&n&&(b()?n(null,i):y.push(n))};var w=v,_=i("780f");const k="https://resouce.cdzyhd.com/tinymce-all-in-one-4.9.3/tinymce.min.js",S="https://resouce.cdzyhd.com/powerpaste-2.1.10/plugin.min.js";var x={name:"Tinymce",components:{editorImage:h},props:{id:{type:String,default:function(){return"vue-tinymce-"+ +new Date+(1e3*Math.random()).toFixed(0)}},value:{type:String,default:""},toolbar:{type:Array,required:!1,default(){return[]}},menubar:{type:String,default:"file edit insert view format table"},height:{type:[Number,String],required:!1,default:360},width:{type:[Number,String],required:!1,default:"auto"}},data(){return{editorShowUploadList:_["c"],loadJs:!1,hasChange:!1,hasInit:!1,tinymceId:this.id,fullscreen:!1,showUploadFile:!1,languageTypeList:{zh:"zh_CN"}}},computed:{language(){return"zh_CN"},containerWidth(){const e=this.width;return/^[\d]+(\.[\d]+)?$/.test(e)?e+"px":e}},watch:{value(e){!this.hasChange&&this.hasInit&&this.$nextTick(()=>window.tinymce.get(this.tinymceId).setContent(e||""))},language(){this.destroyTinymce(),this.$nextTick(()=>this.initTinymce())}},mounted(){this.init();let e=JSON.parse(sessionStorage.getItem("expUserInfo")),t=e["schoolId"],i=e["rolename"];this.editorShowUploadList.indexOf(t)>-1&&"teacher"===i&&(this.showUploadFile=!0)},activated(){window.tinymce&&this.initTinymce()},deactivated(){this.destroyTinymce()},destroyed(){this.destroyTinymce()},methods:{init(){this.loadJs=!0,w(k,e=>{this.loadJs=!1,e?this.$message.error(e.message):this.initTinymce()})},initTinymce(){const e=this;window.tinymce.init({language:this.language,selector:"#"+this.tinymceId,height:this.height,body_class:"panel-body ",object_resizing:!1,toolbar:this.toolbar.length>0?this.toolbar:g,menubar:this.menubar,external_plugins:{powerpaste:S},plugins:p,end_container_on_empty_block:!0,paste_retain_style_properties:"all",paste_word_valid_elements:"*[*]",paste_data_images:!0,paste_convert_word_fake_lists:!1,paste_webkit_styles:"all",paste_merge_formats:!0,powerpaste_word_import:"prompt",powerpaste_html_import:"prompt",powerpaste_allow_local_images:!0,code_dialog_height:450,code_dialog_width:1e3,advlist_bullet_styles:"square",advlist_number_styles:"default",imagetools_cors_hosts:["www.tinymce.com","codepen.io"],default_link_target:"_blank",link_title:!1,nonbreaking_force_tab:!0,init_instance_callback:t=>{e.value&&t.setContent(e.value),e.hasInit=!0,t.on("NodeChange Change KeyUp SetContent",()=>{this.hasChange=!0,this.$emit("input",t.getContent())})},setup(t){t.on("FullscreenStateChanged",t=>{e.fullscreen=t.state})},convert_urls:!1,images_dataimg_filter(e){return e},images_upload_handler(e,t,i,n){n(0);let o=new File([e.blob()],r["a"].getUuid()+".png",{type:"image/png"});r["a"].qiNiuUpload(o,{next:e=>{},error:e=>{console.log(e),alert("上传失败")},complete:e=>{let i=r["a"].getBucketDomain(o),a=i+"/"+e.key;t(a),n(100)}})}}).then(e=>{console.log("Tinymce初始化完毕"),this.$emit("initEd")})},destroyTinymce(){const e=window.tinymce.get(this.tinymceId);this.fullscreen&&e.execCommand("mceFullScreen"),e&&e.destroy()},setContent(e){window.tinymce.get(this.tinymceId).setContent(e)},getContent(){window.tinymce.get(this.tinymceId).getContent()},imageSuccessCBK(e){e.forEach(e=>{let t=e.url.split("."),i=t[t.length-1],n=e.url.split("/")[3];r["a"].fileSuffixEnum.image.indexOf(i)>-1?window.tinymce.get(this.tinymceId).insertContent(`<img class="tinymce-upload-img" src="${e.url}" >`):r["a"].fileSuffixEnum.video.indexOf(i)>-1?window.tinymce.get(this.tinymceId).insertContent(`<video class="tinymce-upload-video" src="${e.url}" controls="controls">`):r["a"].fileSuffixEnum.audio.indexOf(i)>-1?window.tinymce.get(this.tinymceId).insertContent(`<embed height="50" width="100" src="${e.url}"/>`):window.tinymce.get(this.tinymceId).insertContent(`<a class="tinymce-upload-other" href="${e.url}" >${n}</a>`)})}}},C=x,O=(i("c0fc"),Object(d["a"])(C,n,o,!1,null,"58f430dd",null));t["a"]=O.exports},"88a7":function(e,t,i){"use strict";var n=i("cb2d"),o=i("e330"),a=i("577e"),s=i("d6d6"),r=URLSearchParams,l=r.prototype,c=o(l.append),d=o(l["delete"]),u=o(l.forEach),h=o([].push),m=new r("a=1&a=2&b=3");m["delete"]("a",1),m["delete"]("b",void 0),m+""!=="a=2"&&n(l,"delete",(function(e){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&void 0===i)return d(this,e);var n=[];u(this,(function(e,t){h(n,{key:t,value:e})})),s(t,1);var o,r=a(e),l=a(i),m=0,p=0,f=!1,g=n.length;while(m<g)o=n[m++],f||o.key===r?(f=!0,d(this,o.key)):p++;while(p<g)o=n[p++],o.key===r&&o.value===l||c(this,o.key,o.value)}),{enumerable:!0,unsafe:!0})},"9ab2":function(e,t,i){},a888:function(e,t,i){"use strict";const n=20;function o(e,t,i){return Math.min(Math.max(e,t),i)}function a(e){return{dialogHeaderEl:e.querySelector(".el-dialog__header"),dragDom:e.querySelector(".el-dialog")}}function s(e){return e.componentInstance||e.child}function r(e){return Boolean(s(e)&&s(e).visible)}function l(e){return e&&"object"===typeof e.value&&null!==e.value?e.value:{center:Boolean(e&&e.value)}}function c(e,t){const i=document.documentElement.clientWidth,o=document.documentElement.clientHeight,a=n,s=Math.max(i-e.offsetWidth-n,a),r=n,l=Math.max(o-t.offsetHeight-n,r);return{screenWidth:i,screenHeight:o,minLeft:a,maxLeft:s,minTop:r,maxTop:l}}function d(e){const{dialogHeaderEl:t,dragDom:i}=a(e);if(!t||!i||!i.offsetWidth)return;const n=e.__dragDialogOptions||{},s=c(i,t),r=window.getComputedStyle(i),l=parseFloat(r.marginTop)||s.minTop,d=(s.screenWidth-i.offsetWidth)/2,u=(s.screenHeight-i.offsetHeight)/2,h=n.center?u:l;i.style.position="fixed",i.style.margin="0",i.style.left=o(d,s.minLeft,s.maxLeft)+"px",i.style.top=o(h,s.minTop,s.maxTop)+"px",i.style.right="auto",i.style.bottom="auto"}function u(e,t,i){e.__dragDialogOptions=l(t),e.__dragDialogVm=s(i);const n=r(i),o=e.__dragDialogVisible;e.__dragDialogVisible=n,n&&!o&&requestAnimationFrame(()=>{d(e)})}var h={inserted(e,t,i){const{dialogHeaderEl:n,dragDom:s}=a(e);n&&s&&(n.style.cursor="move",n.onmousedown=t=>{const i=c(s,n),a=parseFloat(s.style.left)||s.getBoundingClientRect().left,r=parseFloat(s.style.top)||s.getBoundingClientRect().top,l=t.clientX,d=t.clientY,u=t=>{const n=o(a+t.clientX-l,i.minLeft,i.maxLeft),c=o(r+t.clientY-d,i.minTop,i.maxTop);s.style.left=n+"px",s.style.top=c+"px",e.__dragDialogVm&&e.__dragDialogVm.$emit&&e.__dragDialogVm.$emit("dragDialog")},h=()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",h)};document.addEventListener("mousemove",u),document.addEventListener("mouseup",h),t.preventDefault()},u(e,t,i))},componentUpdated(e,t,i){u(e,t,i)},unbind(e){const{dialogHeaderEl:t}=a(e);t&&(t.onmousedown=null),delete e.__dragDialogOptions,delete e.__dragDialogVisible,delete e.__dragDialogVm}};const m=function(e){e.directive("el-drag-dialog",h)};window.Vue&&(window["el-drag-dialog"]=h,Vue.use(m)),h.install=m;t["a"]=h},ab43:function(e,t,i){"use strict";var n=i("23e7"),o=i("c65b"),a=i("59ed"),s=i("825a"),r=i("46c4"),l=i("c5cc"),c=i("9bdd"),d=i("2a62"),u=i("2baa"),h=i("f99f"),m=i("c430"),p=!m&&!u("map",(function(){})),f=!m&&!p&&h("map",TypeError),g=m||p||f,y=l((function(){var e=this.iterator,t=s(o(this.next,e)),i=this.done=!!t.done;if(!i)return c(e,this.mapper,[t.value,this.counter++],!0)}));n({target:"Iterator",proto:!0,real:!0,forced:g},{map:function(e){s(this);try{a(e)}catch(t){d(this,"throw",t)}return f?o(f,this,e):new y(r(this),{mapper:e})}})},c0fc:function(e,t,i){"use strict";i("556c")},d6d6:function(e,t,i){"use strict";var n=TypeError;e.exports=function(e,t){if(e<t)throw new n("Not enough arguments");return e}},f90b:function(e,t,i){"use strict";i("9ab2")}}]);