chunk-36ddf80d.689d14cf.js 23 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-36ddf80d","chunk-2d0d6f6b"],{"0687":function(e,t,o){"use strict";o.d(t,"c",(function(){return s})),o.d(t,"f",(function(){return n})),o.d(t,"a",(function(){return u})),o.d(t,"d",(function(){return d})),o.d(t,"b",(function(){return c})),o.d(t,"e",(function(){return p}));var r=o("b775"),i=o("4328"),a=o.n(i),l="/api-cms";function s(e){return Object(r["a"])({url:l+"/news/queryPage",method:"get",params:e})}function n(e){return Object(r["a"])({url:l+"/news/update",method:"post",data:a.a.stringify(e)})}function u(e){return Object(r["a"])({url:l+"/news/add",method:"post",data:a.a.stringify(e)})}function d(e){return Object(r["a"])({url:l+"/news/query",method:"get",params:e})}function c(e){return Object(r["a"])({url:l+"/news/del/"+e.id,method:"post",data:a.a.stringify(e)})}function p(e){return Object(r["a"])({url:l+"/news/typeList",method:"get",params:e})}},"22ec":function(e,t,o){"use strict";o("aa34")},7590:function(e,t,o){"use strict";var r=o("d4ec"),i=o("bee2"),a=o("45eb"),l=o("7e84a"),s=o("262e"),n=o("2caf8"),u=o("953d"),d=u["Quill"].import("blots/block/embed"),c=u["Quill"].import("formats/link"),p=["height","width","src","poster"],m=function(e){Object(s["a"])(o,e);var t=Object(n["a"])(o);function o(){return Object(r["a"])(this,o),t.apply(this,arguments)}return Object(i["a"])(o,[{key:"format",value:function(e,t){p.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):Object(a["a"])(Object(l["a"])(o.prototype),"format",this).call(this,e,t)}},{key:"html",value:function(){var e=this.value(),t=e.video;return'<a href="'.concat(t,'">').concat(t,"</a>")}}],[{key:"create",value:function(e){var t=Object(a["a"])(Object(l["a"])(o),"create",this).call(this,e.url);return t.setAttribute("controls","controls"),t.setAttribute("type","video/mp4"),t.setAttribute("preload","auto"),t.setAttribute("autopaly","false"),t.setAttribute("src",this.sanitize(e.url)),t.setAttribute("poster",this.sanitize(e.poster)),t}},{key:"formats",value:function(e){return p.reduce((function(t,o){return e.hasAttribute(o)&&(t[o]=e.getAttribute(o)),t}),{})}},{key:"sanitize",value:function(e){return c.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),o}(d);m.blotName="video",m.className="ql-video",m.tagName="video",t["a"]=m},"95c6":function(e,t,o){"use strict";o.r(t);var r=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"m-container"},[o("h2",[o("el-page-header",{attrs:{content:("create"==e.pageType?"添加":"修改")+e.typeChange(e.type)},on:{back:e.onCancel}})],1),e._v(" "),o("div",{staticClass:"m-core"},[o("el-form",{ref:"form",staticStyle:{width:"100%"},attrs:{model:e.form,rules:e.rules,"label-width":"120px"}},[o("el-form-item",{attrs:{label:"标题",prop:"title"}},[o("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(" "),o("el-form-item",{attrs:{label:"排序值",prop:"order"}},[o("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(" "),4!=e.type?o("el-form-item",{attrs:{label:"所属分部",prop:"organIdList",rules:[{required:6!=e.type,message:"请选择分部",trigger:"change"}]}},[o("template",{slot:"label"},[e._v("\n "+e._s(6==e.type?"可用分部":"所属分部")+"\n "),6==e.type?o("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[o("div",{attrs:{slot:"content"},slot:"content"},[e._v("可用分部为空则所有分部都显示")]),e._v(" "),o("i",{staticClass:"el-icon-question micon el-tooltip",staticStyle:{"font-size":"18px",color:"#f56c6c",top:"2px",position:"relative"}})]):e._e()],1),e._v(" "),o("select-all",{staticStyle:{width:"400px !important"},attrs:{filterable:"",placeholder:"请选择分部",multiple:"",clearable:""},model:{value:e.form.organIdList,callback:function(t){e.$set(e.form,"organIdList","string"===typeof t?t.trim():t)},expression:"form.organIdList"}},e._l(e.selects.branchs,(function(e,t){return o("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],2):e._e(),e._v(" "),7==e.type?o("el-form-item",{attrs:{prop:"subjectIdList",label:"所属声部",rules:[{required:!0,message:"请选择声部",trigger:"blur, change"}]}},[o("select-all",{staticStyle:{width:"400px !important"},attrs:{clearable:"",filterable:"",multiple:"",placeholder:"请选择声部"},model:{value:e.form.subjectIdList,callback:function(t){e.$set(e.form,"subjectIdList",t)},expression:"form.subjectIdList"}},e._l(e.selects.subjects,(function(e){return o("el-option",{key:e.id,attrs:{value:e.id,label:e.name}})})),1)],1):e._e(),e._v(" "),3==e.type||6==e.type||8==e.type?o("el-form-item",{attrs:{label:"版本号",prop:"memo"}},[o("el-input",{model:{value:e.form.memo,callback:function(t){e.$set(e.form,"memo",t)},expression:"form.memo"}})],1):e._e(),e._v(" "),1==e.type||2==e.type||4==e.type||7==e.type?o("el-form-item",{attrs:{label:"跳转方式"}},[o("el-radio-group",{model:{value:e.outUrlRadio,callback:function(t){e.outUrlRadio=t},expression:"outUrlRadio"}},[o("el-radio",{attrs:{label:1}},[e._v("外部链接")]),e._v(" "),o("el-radio",{attrs:{label:0}},[e._v("内容跳转")])],1)],1):e._e(),e._v(" "),1==e.outUrlRadio?o("el-form-item",{attrs:{label:"链接地址",prop:"linkUrl",rules:[{required:3!=e.type&&6!=e.type&&5!=e.type&&8!=e.type,message:"请输入链接地址",trigger:"blur"}]}},[o("el-input",{model:{value:e.form.linkUrl,callback:function(t){e.$set(e.form,"linkUrl","string"===typeof t?t.trim():t)},expression:"form.linkUrl"}})],1):e._e(),e._v(" "),5==e.type||8==e.type||3==e.type?o("el-form-item",{attrs:{label:"上架时间",prop:"actionTime"}},[o("el-date-picker",{staticStyle:{width:"400px"},attrs:{clearable:!0,type:"datetimerange","default-time":["00:00:00","23:59:59"],"range-separator":"至","picker-options":{firstDayOfWeek:1},"start-placeholder":"上架开始日期","end-placeholder":"上架结束日期"},model:{value:e.form.actionTime,callback:function(t){e.$set(e.form,"actionTime",t)},expression:"form.actionTime"}})],1):e._e(),e._v(" "),8==e.type?o("el-form-item",{attrs:{label:"广告类型"}},[o("el-select",{staticStyle:{width:"400px !important"},attrs:{disabled:"create"!=e.pageType},model:{value:e.uploadType,callback:function(t){e.uploadType=t},expression:"uploadType"}},[o("el-option",{attrs:{label:"图片",value:1}}),e._v(" "),o("el-option",{attrs:{label:"视频",value:2}})],1)],1):e._e(),e._v(" "),2==e.uploadType&&8==e.type?o("el-form-item",{key:"coverImage",attrs:{label:"广告视频",prop:"coverImage"}},[o("div",{staticStyle:{display:"inline-block"},on:{click:e.addAdvVideo}},[e.form.coverImage?o("video",{staticClass:"avatar",attrs:{type:"video/mp4",preload:"auto",poster:e.form.videoCoverImage,src:e.form.coverImage}}):o("i",{staticClass:"el-icon-plus avatar-uploader-icon"})]),e._v(" "),o("p",{staticStyle:{color:"red"}},[e._v("上传视频尺寸建议:1242px * 2208px;")])]):o("el-form-item",{key:"coverImage1",attrs:{label:8==e.type?"广告图":"封面图",prop:"coverImage"}},[o("el-upload",{directives:[{name:"loading",rawName:"v-loading",value:e.uploadCoverLoading,expression:"uploadCoverLoading"}],staticClass:"avatar-uploader",attrs:{action:"/api-web/uploadFile",headers:e.headers,"show-file-list":!1,accept:".jpg, .jpeg, .png, .gif","on-success":e.handleAvatarSuccess,"on-error":e.handleAvatarError,"before-upload":e.beforeAvatarUpload}},[e.form.coverImage?o("img",{staticClass:"avatar",attrs:{src:e.form.coverImage}}):o("i",{staticClass:"el-icon-plus avatar-uploader-icon"})]),e._v(" "),o("p",{staticClass:"imageSize"},[e._v("图片不能超过 2M;")])],1),e._v(" "),8==e.type?o("el-form-item",{attrs:{label:"显示时长(秒)",prop:"attribute1",rules:[{required:!0,validator:e.validNum,trigger:"blur"}]}},[o("el-input",{attrs:{type:"number"},model:{value:e.form.attribute1,callback:function(t){e.$set(e.form,"attribute1",e._n(t))},expression:"form.attribute1"}}),e._v(" "),o("p",{staticStyle:{color:"red"}},[e._v("建议时长不超过5秒")])],1):e._e(),e._v(" "),7==e.type||2==e.type?o("el-form-item",{attrs:{label:7==e.type?"知识类别":"资讯类别",prop:"subType",rules:[{required:!0,message:7==e.type?"请选择知识类别":"请选择资讯类别",trigger:"change"}]}},[o("el-select",{staticStyle:{width:"400px !important"},model:{value:e.form.subType,callback:function(t){e.$set(e.form,"subType",t)},expression:"form.subType"}},e._l(e.typeList,(function(e){return o("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1):e._e(),e._v(" "),o("el-form-item",{directives:[{name:"show",rawName:"v-show",value:8!=e.type&&5!=e.type&&3!=e.type&&6!=e.type&&1!=e.outUrlRadio,expression:"\n type != 8 && type != 5 && type != 3 && type != 6 && outUrlRadio != 1\n "}],attrs:{label:"内容",prop:"content",rules:[{required:8!=e.type&&5!=e.type&&3!=e.type&&6!=e.type&&1!=e.outUrlRadio,message:"请编辑内容",trigger:"blur"}]}},[o("Editor",{ref:"opFlow",staticClass:"Editor",attrs:{form:e.form.content,id:"Editor1",alias:"Editor1",keyWord:"opFlow"},on:{onEditorChange:e.onEditorChange}})],1),e._v(" "),o("el-form-item",[o("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onSubmit("form")}}},[e._v("立即"+e._s("create"==e.pageType?"创建":"修改"))]),e._v(" "),o("el-button",{on:{click:function(t){return e.onReSet("form")}}},[e._v("重置")]),e._v(" "),8!=e.type&&5!=e.type&&3!=e.type&&6!=e.type?o("el-button",{on:{click:e.onLook}},[e._v("预览")]):e._e()],1)],1)],1),e._v(" "),o("el-dialog",{attrs:{title:"插入视频",width:"500px",visible:e.dialogFormVisible},on:{close:function(t){return e.onDialogClose("diologForm")},"update:visible":function(t){e.dialogFormVisible=t}}},[o("el-form",{ref:"diologForm",attrs:{model:e.dialogForm,rules:e.dialogFormRules}},[o("el-form-item",{attrs:{label:"封面图地址",prop:"poster",rules:[{required:2==e.uploadType,message:"请上传封面图",trigger:"blur"}],"label-width":"120px"}},[o("el-upload",{directives:[{name:"loading",rawName:"v-loading",value:e.uploadImgLoading,expression:"uploadImgLoading"}],staticClass:"avatar-uploader",staticStyle:{"line-height":"0",display:"inline-block"},attrs:{action:"/api-web/uploadFile",headers:e.headers,"show-file-list":!1,accept:".jpg, .jpeg, .png, .gif","on-success":e.handleImgSuccess,"on-error":e.handleUploadImgError,"before-upload":e.beforeImgUpload}},[e.dialogForm.poster?o("img",{staticClass:"avatar",attrs:{src:e.dialogForm.poster}}):o("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1),e._v(" "),o("el-form-item",{attrs:{label:"视频类型","label-width":"120px"}},[o("el-radio-group",{model:{value:e.formRadio,callback:function(t){e.formRadio=t},expression:"formRadio"}},[o("el-radio",{attrs:{label:1}},[e._v("外部链接")]),e._v(" "),o("el-radio",{attrs:{label:2}},[e._v("上传")])],1)],1),e._v(" "),1==e.formRadio?o("el-form-item",{attrs:{label:"视频地址","label-width":"120px",prop:"url"}},[o("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.dialogForm.url,callback:function(t){e.$set(e.dialogForm,"url",t)},expression:"dialogForm.url"}})],1):e._e(),e._v(" "),2==e.formRadio?o("el-form-item",{attrs:{label:"上传视频","label-width":"120px",prop:"videoUrl"}},[o("el-upload",{directives:[{name:"loading",rawName:"v-loading",value:e.uploadLoading,expression:"uploadLoading"}],staticClass:"upload-demo",staticStyle:{display:"inline-block"},attrs:{action:"/api-web/uploadFile","before-upload":e.beforeUpload,"on-success":e.handleUploadSuccess,"on-error":e.handleUploadError,"show-file-list":!1,accept:".mp4","file-list":e.fileList,"on-exceed":e.handleExceed}},[e.dialogForm.videoUrl?o("video",{staticStyle:{width:"120px",height:"120px"},attrs:{type:"video/mp4",preload:"auto",src:e.dialogForm.videoUrl}}):o("i",{staticClass:"el-icon-plus avatar-uploader-icon"})]),e._v(" "),o("p",{staticClass:"imageSize"},[2==e.uploadType&&8==e.type?o("span",[e._v("上传视频尺寸建议:1242px * 2208px;")]):e._e(),o("br"),e._v("\n 只能上传mp4文件, 且不超过100M\n ")])],1):e._e()],1),e._v(" "),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),e._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onVideoComfirm("diologForm")}}},[e._v("确 定")])],1)],1),e._v(" "),o("el-dialog",{attrs:{width:"375px",title:"预览",visible:e.lookVisible},on:{"update:visible":function(t){e.lookVisible=t}}},[o("div",{staticClass:"sd-container"},[o("h2",[e._v(e._s(e.dataInfo.title))]),e._v(" "),o("div",{staticClass:"titleInfo"},[o("p",[e._v(e._s(e.typeCheck(e.dataInfo.type)))]),e._v(" "),o("p",[e._v(e._s(e.dataInfo.updateTime))])]),e._v(" "),o("div",{staticClass:"msgWrap quill-editor ql-editor",domProps:{innerHTML:e._s(e.dataInfo.content)}})])])],1)},i=[],a=o("c7eb"),l=(o("28a5"),o("96cf"),o("1da1")),s=o("5530"),n=o("15fd"),u=(o("ac6a"),o("c5f6"),o("0687")),d=(o("4360"),o("5f87")),c=o("61f7"),p=(o("a753"),o("8096"),o("14e1"),o("9339")),m=o.n(p),f=o("953d"),g=o("095c"),v=o("896b"),h=o("7590"),b=o("5a0c"),y=o.n(b),k=["subjectIdList","organIdList"],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"]],_={"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":"文件"},C=function(e,t,o){"string"==typeof t||null==t?o(new Error("请输入显示时长")):t<0?o(new Error("输入显示时长必须大于0")):o()};m.a.register(h["a"],!0);var q={name:"contentOperation",components:{quillEditor:f["quillEditor"],ImageCropper:v["a"],Editor:g["default"]},data:function(){var e=this,t=this.$route.query;return 7==t.type?Object(c["e"])()+"/#/knowledge":8==t.type||5==t.type?"":Object(c["e"])()+"/#/specialdetail",{validNum:C,uploadType:1,uploadStatus:!1,categoryList:[],type:t.type,pageType:t.pageType,organId:null,headers:{Authorization:Object(d["b"])()},content:null,dialogFormVisible:!1,formRadio:1,lookVisible:!1,dataInfo:{title:"",type:t.type,updateTime:y()().format("YYYY-MM-DD HH:mm:ss"),content:null},outUrlRadio:1,editorIndex:0,editorOption:{placeholder:"请输入内容",modules:{toolbar:{container:I,handlers:{image:function(e){e?document.querySelector(".ivu-upload .el-upload").click():this.quill.format("image",!1)},video:function(t){if(t){e.dialogFormVisible=!0;var o=e.$refs.myQuillEditor.quill;e.editorIndex=o.getSelection().index}else this.quill.format("image",!1)}}}}},dialogForm:{poster:null,url:null,videoUrl:null},uploadCoverLoading:!1,uploadLoading:!1,uploadImgLoading:!1,fileList:[],dialogFormRules:{url:[{required:!0,message:"请输入视频地址",trigger:"blur"}],videoUrl:[{required:!0,message:"请上传视频",trigger:"blur"}]},form:{title:null,order:null,coverImage:null,videoCoverImage:null,attribute1:null,linkUrl:null,subjectIdList:null,type:t.type,status:1,content:null,subType:null,actionTime:null,organIdList:[]},rules:{title:[{required:!0,message:"请输入标题",trigger:"blur"},{min:2,max:30,message:"长度在 2 到 30 个字符",trigger:"blur"}],coverImage:[{required:!0,message:"请选择封面图或广告视频",trigger:"blur"}]},typeList:[],cropperOptions:{autoCrop:!0,autoCropWidth:300,autoCropHeight:300,fixedBox:!0,previewsCircle:!1,full:!0,title:"上传图片"}}},created:function(){},mounted:function(){var e=this.$route.query;"create"==e.pageType&&(this.$refs["form"].clearValidate(),this.dialogForm={poster:null,url:null,videoUrl:null},this.fileList=[]),this.type=e.type,this.pageType=e.pageType,this.$store.dispatch("setSubjects"),this.$store.dispatch("setBranchs"),this.init()},methods:{init:function(){var e=this.$route.query;this.type=e.type,this.pageType=e.pageType,this.initCrop(),this.getList(),this.addQuillTitle(),this.$refs["form"].clearValidate()},initCrop:function(){var e=Number(this.type),t={};switch(e){case 1:t={enlarge:2,autoCropWidth:316,autoCropHeight:156};break;case 2:t={enlarge:2,autoCropWidth:350,autoCropHeight:224};break;case 3:t={enlarge:2.63,autoCropWidth:350,autoCropHeight:133};break;case 5:t={enlarge:.73,autoCropWidth:255,autoCropHeight:350};break;case 6:t={enlarge:1,autoCropWidth:112,autoCropHeight:134};break;case 7:t={enlarge:2,autoCropWidth:167,autoCropHeight:100};break}var o=this.cropperOptions;this.cropperOptions=Object.assign({},o,t),console.log(this.cropperOptions,o,e,t)},cropSuccess:function(e){this.form.coverImage=e.data.url},addAdvVideo:function(){this.dialogFormVisible=!0;var e=this.dialogForm;e.poster=this.form.videoCoverImage,1==this.formRadio?e.url=this.form.coverImage:e.videoUrl=this.form.coverImage,this.uploadStatus=!0},onVideoComfirm:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;var o=t.dialogForm;if(t.uploadStatus){var r=t.form;r.coverImage=1==t.formRadio?o.url:o.videoUrl,r.videoCoverImage=o.poster,t.uploadStatus=!1}else{var i=t.editor,a={poster:o.poster,url:1==t.formRadio?o.url:o.videoUrl};i.insertEmbed(t.editorIndex,"video",a),i.setSelection(t.editorIndex+1,{preload:!1})}t.dialogFormVisible=!1,t.dialogForm={poster:null,url:null,videoUrl:null}}))},onDialogClose:function(e){this.dialogForm={poster:null,url:null,videoUrl:null},this.$refs[e].resetFields()},addQuillTitle:function(){this.$nextTick((function(){var e=document.querySelector(".ql-toolbar");if(console.log(e),e){var t=e.querySelectorAll("button"),o=e.querySelectorAll("select");t.forEach((function(e){"ql-script"===e.className?"sub"===e.value?e.title="下标":e.title="上标":"ql-indent"===e.className?"+1"===e.value?e.title="向右缩进":e.title="向左缩进":e.title=_[e.classList[0]]})),o.forEach((function(e){e.parentNode.title=_[e.classList[0]]}))}}))},onSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return t.$nextTick((function(){var e=document.getElementsByClassName("is-error");e[0].scrollIntoView({block:"center",behavior:"smooth"})})),!1;var o=t.form,r=o.subjectIdList,i=o.organIdList,a=Object(n["a"])(o,k),l=Object(s["a"])(Object(s["a"])({},a),{},{subjectIdList:r?r.join(","):null,organIdList:i?i.join(","):null}),d=l.actionTime;d&&d.length>0?(l.onlineTime=y()(d[0]).format("YYYY-MM-DD HH:mm:ss"),l.offlineTime=y()(d[1]).format("YYYY-MM-DD HH:mm:ss")):(l.onlineTime=null,l.offlineTime=null),1!=t.outUrlRadio&&(l.linkUrl=null),"create"==t.pageType?(l.id&&delete l.id,5==t.type&&(l.status=0),Object(u["a"])(l).then((function(e){t.messageTips("添加",e)}))):"update"==t.pageType&&Object(u["f"])(l).then((function(e){t.messageTips("修改",e)}))}))},messageTips:function(e,t){200==t.code?(this.$message.success(e+"成功"),this.onCancel()):this.$message.error(t.msg)},onCancel:function(){var e=4==this.type||6==this.type;this.$store.dispatch("delVisitedViews",this.$route),this.$router.push({path:e?"/platformIndex":"/contentManager/contentManager",query:{tabrouter:this.typeIndex(this.type)}})},handleSuccess:function(e){var t=this.editor;if(e.code){var o=t.getSelection().index;t.insertEmbed(o,"image",e.data.url),t.setSelection(o+1)}else this.$message.error("图片插入失败")},onReSet:function(e){var t=this.$route.query;this.form={title:null,order:null,coverImage:null,videoCoverImage:null,attribute1:null,linkUrl:null,type:t.type,status:1,content:null,organIdList:null,subType:null,actionTime:null},this.$refs[e].resetFields()},onLook:function(){var e=this.dataInfo;e.title=this.form.title,e.content=this.form.content,setTimeout((function(){var e=document.querySelectorAll(".msgWrap img");e.length>0&&e.forEach((function(e){e.style.width="100%"}));var t=document.querySelectorAll(".msgWrap .ql-video");t.length>0&&t.forEach((function(e){e.style.width="100%",e.style.height="195px"}))}),500),this.lookVisible=!0},getList:function(){var e=Object(l["a"])(Object(a["a"])().mark((function e(){var t=this;return Object(a["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(7!=this.type&&2!=this.type){e.next=3;break}return e.next=3,Object(u["e"])({parentId:this.type}).then((function(e){console.log(e),200==e.code&&(t.typeList=e.data)}));case 3:if("create"!=this.pageType){e.next=7;break}return e.abrupt("return");case 7:Object(u["d"])({id:this.$route.query.id}).then((function(e){if(200==e.code){var o=e.data;t.form;o.videoCoverImage?t.uploadType=2:t.uploadType=1;var r=null;o.onlineTime&&o.offlineTime&&(r=[o.onlineTime,o.offlineTime]);var i=o.subjectIdList?o.subjectIdList.split(","):[],a=o.organIdList?o.organIdList.split(","):[];3==t.type||5==t.type||6==t.type||8==t.type||o.linkUrl?t.outUrlRadio=1:t.outUrlRadio=0,t.form={id:o.id,title:o.title,order:o.order,coverImage:o.coverImage,videoCoverImage:o.videoCoverImage,attribute1:Number(o.attribute1),linkUrl:o.linkUrl,type:o.type,status:o.status,subjectIdList:i.map((function(e){return+e})),organIdList:a.map((function(e){return+e})),memo:o.memo,content:o.content,actionTime:r,subType:o.subType?o.subType:null},t.dataInfo.updateTime=o.updateTime}}));case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),handleUploadImgError:function(e){this.uploadImgLoading=!1,this.$message.error("上传失败")},handleImgSuccess:function(e,t){this.uploadImgLoading=!1,200==e.code?this.dialogForm.poster=e.data.url:this.$message.error("上传失败")},beforeImgUpload:function(e){var t={"image/png":!0,"image/jpeg":!0,"image/gif":!0},o=t[e.type],r=e.size/1024/1024<2;return o||this.$message.error("只能上传图片格式!"),r||this.$message.error("上传图片大小不能超过 2MB!"),o&&r&&(this.uploadImgLoading=!0),o&&r},handleAvatarSuccess:function(e,t){this.uploadCoverLoading=!1,200==e.code?this.form.coverImage=e.data.url:this.$message.error("上传失败")},handleAvatarError:function(){this.uploadCoverLoading=!1},beforeAvatarUpload:function(e){var t={"image/png":!0,"image/jpeg":!0,"image/gif":!0},o=t[e.type],r=e.size/1024/1024<2;return o||this.$message.error("只能上传图片格式!"),r||this.$message.error("上传图片大小不能超过 2M!"),this.uploadCoverLoading=!0,o&&r},typeChange:function(e){var t={1:"精彩活动",2:"热门资讯",4:"专项练习",5:"闪页管理",3:"BANNER管理",6:"APP按钮管理",7:"知识库管理",8:"广告管理"};return t[e]},typeCheck:function(e){var t={1:"精彩活动",2:"热门资讯",4:"专项练习",7:"知识库"};return t[e]?t[e]:"管乐迷"},typeIndex:function(e){var t={1:0,2:1,3:4,4:2,5:3,6:5,7:6,8:7};return t[e]},onEditorChange:function(e){this.form.content=e},beforeUpload:function(e){var t=e.size/1024/1024<100;return t||this.$message.error("上传视频大小不能超过 100MB!"),this.uploadLoading=!0,t},handleUploadError:function(e){this.uploadLoading=!1,this.$message.error("上传视频失败")},handleUploadSuccess:function(e,t){this.uploadLoading=!1,200==e.code?(this.$message.success("上传视频成功"),this.dialogForm.videoUrl=e.data.url):this.$message.error("上传视频失败")},handleExceed:function(e,t){this.$message.error("您已上传过视频")}},computed:{editor:function(){return this.$refs.myQuillEditor.quill}}},x=q,T=(o("22ec"),o("2877")),L=Object(T["a"])(x,r,i,!1,null,"7835533b",null);t["default"]=L.exports},aa34:function(e,t,o){}}]);