1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-49176a0f","chunk-2d0d6f6b"],{"0687":function(e,t,r){"use strict";r.d(t,"c",(function(){return s})),r.d(t,"f",(function(){return n})),r.d(t,"a",(function(){return u})),r.d(t,"d",(function(){return d})),r.d(t,"b",(function(){return c})),r.d(t,"e",(function(){return p}));var o=r("b775"),i=r("4328"),a=r.n(i),l="/api-cms";function s(e){return Object(o["a"])({url:l+"/news/queryPage",method:"get",params:e})}function n(e){return Object(o["a"])({url:l+"/news/update",method:"post",data:a.a.stringify(e)})}function u(e){return Object(o["a"])({url:l+"/news/add",method:"post",data:a.a.stringify(e)})}function d(e){return Object(o["a"])({url:l+"/news/query",method:"get",params:e})}function c(e){return Object(o["a"])({url:l+"/news/del/"+e.id,method:"post",data:a.a.stringify(e)})}function p(e){return Object(o["a"])({url:l+"/news/typeList",method:"get",params:e})}},"17cc":function(e,t,r){},7590:function(e,t,r){"use strict";var o=r("d4ec"),i=r("bee2"),a=r("45eb"),l=r("7e84"),s=r("262e"),n=r("2caf"),u=r("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"])(r,e);var t=Object(n["a"])(r);function r(){return Object(o["a"])(this,r),t.apply(this,arguments)}return Object(i["a"])(r,[{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"])(r.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"])(r),"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,r){return e.hasAttribute(r)&&(t[r]=e.getAttribute(r)),t}),{})}},{key:"sanitize",value:function(e){return c.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),r}(d);m.blotName="video",m.className="ql-video",m.tagName="video",t["a"]=m},"95c6":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"m-container"},[r("h2",[r("el-page-header",{attrs:{content:("create"==e.pageType?"添加":"修改")+e.typeChange(e.type)},on:{back:e.onCancel}})],1),e._v(" "),r("div",{staticClass:"m-core"},[r("el-form",{ref:"form",staticStyle:{width:"100%"},attrs:{model:e.form,rules:e.rules,"label-width":"120px"}},[r("el-form-item",{attrs:{label:"标题",prop:"title"}},[r("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(" "),r("el-form-item",{attrs:{label:"排序值",prop:"order"}},[r("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&&6!=e.type?r("el-form-item",{attrs:{label:"所属分部",prop:"organIdList"}},[r("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 r("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1):e._e(),e._v(" "),7==e.type?r("el-form-item",{attrs:{prop:"subjectIdList",label:"所属声部",rules:[{required:!0,message:"请选择声部",trigger:"blur, change"}]}},[r("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 r("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?r("el-form-item",{attrs:{label:"版本号",prop:"memo"}},[r("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?r("el-form-item",{attrs:{label:"跳转方式"}},[r("el-radio-group",{model:{value:e.outUrlRadio,callback:function(t){e.outUrlRadio=t},expression:"outUrlRadio"}},[r("el-radio",{attrs:{label:1}},[e._v("外部链接")]),e._v(" "),r("el-radio",{attrs:{label:0}},[e._v("内容跳转")])],1)],1):e._e(),e._v(" "),1==e.outUrlRadio?r("el-form-item",{attrs:{label:"链接地址",prop:"linkUrl",rules:[{required:3!=e.type&&6!=e.type&&5!=e.type&&8!=e.type,message:"请输入链接地址",trigger:"blur"}]}},[r("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?r("el-form-item",{attrs:{label:"上架时间",prop:"actionTime"}},[r("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?r("el-form-item",{attrs:{label:"广告类型"}},[r("el-select",{staticStyle:{width:"400px !important"},attrs:{disabled:"create"!=e.pageType},model:{value:e.uploadType,callback:function(t){e.uploadType=t},expression:"uploadType"}},[r("el-option",{attrs:{label:"图片",value:1}}),e._v(" "),r("el-option",{attrs:{label:"视频",value:2}})],1)],1):e._e(),e._v(" "),2==e.uploadType&&8==e.type?r("el-form-item",{key:"coverImage",attrs:{label:"广告视频",prop:"coverImage"}},[r("div",{staticStyle:{display:"inline-block"},on:{click:e.addAdvVideo}},[e.form.coverImage?r("video",{staticClass:"avatar",attrs:{type:"video/mp4",preload:"auto",poster:e.form.videoCoverImage,src:e.form.coverImage}}):r("i",{staticClass:"el-icon-plus avatar-uploader-icon"})]),e._v(" "),r("p",{staticStyle:{color:"red"}},[e._v("上传视频尺寸建议:1242px * 2208px;")])]):r("el-form-item",{key:"coverImage1",attrs:{label:8==e.type?"广告图":"封面图",prop:"coverImage"}},[r("image-cropper",{attrs:{options:e.cropperOptions,imgSize:2,showSize:"",imageUrl:e.form.coverImage},on:{"crop-upload-success":e.cropSuccess}}),e._v(" "),r("p",{staticClass:"imageSize"},[e._v("图片不能超过 2M;")])],1),e._v(" "),8==e.type?r("el-form-item",{attrs:{label:"显示时长(秒)",prop:"attribute1",rules:[{required:!0,validator:e.validNum,trigger:"blur"}]}},[r("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(" "),r("p",{staticStyle:{color:"red"}},[e._v("建议时长不超过5秒")])],1):e._e(),e._v(" "),7==e.type||2==e.type?r("el-form-item",{attrs:{label:7==e.type?"知识类别":"资讯类别",prop:"subType",rules:[{required:!0,message:7==e.type?"请选择知识类别":"请选择资讯类别",trigger:"change"}]}},[r("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 r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1):e._e(),e._v(" "),r("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:"type != 8 && type != 5 && type != 3 && type != 6 && outUrlRadio != 1"}],attrs:{label:"内容",prop:"content",rules:[{required:8!=e.type&&5!=e.type&&3!=e.type&&6!=e.type&&1!=e.outUrlRadio,message:"请编辑内容",trigger:"blur"}]}},[r("Editor",{ref:"opFlow",staticClass:"Editor",attrs:{form:e.form.content,id:"Editor1",alias:"Editor1",keyWord:"opFlow"},on:{onEditorChange:e.onEditorChange}})],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onSubmit("form")}}},[e._v("立即"+e._s("create"==e.pageType?"创建":"修改"))]),e._v(" "),r("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?r("el-button",{on:{click:e.onLook}},[e._v("预览")]):e._e()],1)],1)],1),e._v(" "),r("el-dialog",{attrs:{title:"插入视频",width:"500px",visible:e.dialogFormVisible},on:{close:function(t){return e.onDialogClose("diologForm")},"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{ref:"diologForm",attrs:{model:e.dialogForm,rules:e.dialogFormRules}},[r("el-form-item",{attrs:{label:"封面图地址",prop:"poster",rules:[{required:2==e.uploadType,message:"请上传封面图",trigger:"blur"}],"label-width":"120px"}},[r("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?r("img",{staticClass:"avatar",attrs:{src:e.dialogForm.poster}}):r("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1),e._v(" "),r("el-form-item",{attrs:{label:"视频类型","label-width":"120px"}},[r("el-radio-group",{model:{value:e.formRadio,callback:function(t){e.formRadio=t},expression:"formRadio"}},[r("el-radio",{attrs:{label:1}},[e._v("外部链接")]),e._v(" "),r("el-radio",{attrs:{label:2}},[e._v("上传")])],1)],1),e._v(" "),1==e.formRadio?r("el-form-item",{attrs:{label:"视频地址","label-width":"120px",prop:"url"}},[r("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?r("el-form-item",{attrs:{label:"上传视频","label-width":"120px",prop:"videoUrl"}},[r("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?r("video",{staticStyle:{width:"120px",height:"120px"},attrs:{type:"video/mp4",preload:"auto",src:e.dialogForm.videoUrl}}):r("i",{staticClass:"el-icon-plus avatar-uploader-icon"})]),e._v(" "),r("p",{staticClass:"imageSize"},[2==e.uploadType&&8==e.type?r("span",[e._v("上传视频尺寸建议:1242px * 2208px;")]):e._e(),r("br"),e._v("\n 只能上传mp4文件, 且不超过100M\n ")])],1):e._e()],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onVideoComfirm("diologForm")}}},[e._v("确 定")])],1)],1),e._v(" "),r("el-dialog",{attrs:{width:"375px",title:"预览",visible:e.lookVisible},on:{"update:visible":function(t){e.lookVisible=t}}},[r("div",{staticClass:"sd-container"},[r("h2",[e._v(e._s(e.dataInfo.title))]),e._v(" "),r("div",{staticClass:"titleInfo"},[r("p",[e._v(e._s(e.typeCheck(e.dataInfo.type)))]),e._v(" "),r("p",[e._v(e._s(e.dataInfo.updateTime))])]),e._v(" "),r("div",{staticClass:"msgWrap quill-editor ql-editor",domProps:{innerHTML:e._s(e.dataInfo.content)}})])])],1)},i=[],a=(r("28a5"),r("96cf"),r("1da1")),l=r("5530"),s=r("15fd"),n=(r("ac6a"),r("c5f6"),r("0687")),u=(r("4360"),r("5f87")),d=r("61f7"),c=(r("a753"),r("8096"),r("14e1"),r("9339")),p=r.n(c),m=r("953d"),f=r("095c"),g=r("896b"),h=r("7590"),v=r("5a0c"),b=r.n(v),y=[["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"]],k={"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":"文件"},I=function(e,t,r){"string"==typeof t||null==t?r(new Error("请输入显示时长")):t<0?r(new Error("输入显示时长必须大于0")):r()};p.a.register(h["a"],!0);var _={name:"contentOperation",components:{quillEditor:m["quillEditor"],ImageCropper:g["a"],Editor:f["default"]},data:function(){var e=this,t=this.$route.query;return 7==t.type?Object(d["d"])()+"/#/knowledge":8==t.type||5==t.type?"":Object(d["d"])()+"/#/specialdetail",{validNum:I,uploadType:1,uploadStatus:!1,categoryList:[],type:t.type,pageType:t.pageType,organId:null,headers:{Authorization:Object(u["b"])()},content:null,dialogFormVisible:!1,formRadio:1,lookVisible:!1,dataInfo:{title:"",type:t.type,updateTime:b()().format("YYYY-MM-DD HH:mm:ss"),content:null},outUrlRadio:1,editorIndex:0,editorOption:{placeholder:"请输入内容",modules:{toolbar:{container:y,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 r=e.$refs.myQuillEditor.quill;e.editorIndex=r.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"}],organIdList:[{required:!0,message:"请选择分部",trigger:"change"}]},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 r=this.cropperOptions;this.cropperOptions=Object.assign({},r,t),console.log(this.cropperOptions,r,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 r=t.dialogForm;if(t.uploadStatus){var o=t.form;o.coverImage=1==t.formRadio?r.url:r.videoUrl,o.videoCoverImage=r.poster,t.uploadStatus=!1}else{var i=t.editor,a={poster:r.poster,url:1==t.formRadio?r.url:r.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"),r=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=k[e.classList[0]]})),r.forEach((function(e){e.parentNode.title=k[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 r=t.form,o=r.subjectIdList,i=r.organIdList,a=Object(s["a"])(r,["subjectIdList","organIdList"]),u=Object(l["a"])(Object(l["a"])({},a),{},{subjectIdList:o?o.join(","):null,organIdList:i?i.join(","):null}),d=u.actionTime;d&&d.length>0?(u.onlineTime=b()(d[0]).format("YYYY-MM-DD HH:mm:ss"),u.offlineTime=b()(d[1]).format("YYYY-MM-DD HH:mm:ss")):(u.onlineTime=null,u.offlineTime=null),1!=t.outUrlRadio&&(u.linkUrl=null),"create"==t.pageType?(u.id&&delete u.id,5==t.type&&(u.status=0),Object(n["a"])(u).then((function(e){t.messageTips("添加",e)}))):"update"==t.pageType&&Object(n["f"])(u).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 r=t.getSelection().index;t.insertEmbed(r,"image",e.data.url),t.setSelection(r+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(a["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.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(n["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(n["d"])({id:this.$route.query.id}).then((function(e){if(200==e.code){var r=e.data;t.form;r.videoCoverImage?t.uploadType=2:t.uploadType=1;var o=null;r.onlineTime&&r.offlineTime&&(o=[r.onlineTime,r.offlineTime]);var i=r.subjectIdList?r.subjectIdList.split(","):[],a=r.organIdList?r.organIdList.split(","):[];3==t.type||5==t.type||6==t.type||8==t.type||r.linkUrl?t.outUrlRadio=1:t.outUrlRadio=0,t.form={id:r.id,title:r.title,order:r.order,coverImage:r.coverImage,videoCoverImage:r.videoCoverImage,attribute1:Number(r.attribute1),linkUrl:r.linkUrl,type:r.type,status:r.status,subjectIdList:i.map((function(e){return+e})),organIdList:a.map((function(e){return+e})),memo:r.memo,content:r.content,actionTime:o,subType:r.subType?r.subType:null},t.dataInfo.updateTime=r.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},r=t[e.type],o=e.size/1024/1024<2;return r||this.$message.error("只能上传图片格式!"),o||this.$message.error("上传图片大小不能超过 2MB!"),r&&o&&(this.uploadImgLoading=!0),r&&o},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},r=t[e.type],o=e.size/1024/1024<2;return r||this.$message.error("只能上传图片格式!"),o||this.$message.error("上传图片大小不能超过 2M!"),this.uploadCoverLoading=!0,r&&o},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}}},q=_,C=(r("bedb"),r("2877")),T=Object(C["a"])(q,o,i,!1,null,"2ee969b4",null);t["default"]=T.exports},bedb:function(e,t,r){"use strict";r("17cc")}}]);
|