(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{267:function(e,t,i){"use strict";i.r(t);var s=i(437),l=i(347);for(var r in l)"default"!==r&&function(e){i.d(t,e,function(){return l[e]})}(r);i(413);var a=i(1),n=Object(a.a)(l.default,s.a,s.b,!1,null,"7ebc5ce1",null);n.options.__file="feedback.vue",t.default=n.exports},347:function(e,t,i){"use strict";i.r(t);var s=i(348),l=i.n(s);for(var r in s)"default"!==r&&function(e){i.d(t,e,function(){return s[e]})}(r);t.default=l.a},348:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=r(i(41)),l=r(i(249));function r(e){return e&&e.__esModule?e:{default:e}}t.default={components:{},data:function(){return{ckeditor:null,setApply:{name:"",content:""},applyRules:{name:[{required:!0,message:"问题描述不能为空",trigger:"blur"}]},successFileUrl:"",filesArr:[],file:{id:"WU_FILE_0",name:"",type:"",lastModifiedDate:"",size:"",file:""}}},mounted:function(){this.initckeditor()},destroyed:function(){this.ckeditor&&this.ckeditor.destroy(!0),this.ckeditor=null},methods:{handleChange:function(e,t){this.file.name=e.raw.name,this.file.type=e.raw.type,this.file.lastModifiedDate=e.raw.lastModifiedDate,this.file.size=e.raw.size,this.file.file=e.raw},uploadFile:function(){var t=this,e=this.$loading({lock:!0,text:"",spinner:"",background:"rgba(255, 255, 255, 0.9)"});s.default.chapterAction.uploadFile(this.file).then(function(e){t.successFileUrl=e.url,t.filesArr.pop()}).catch(function(e){t.filesArr.pop(),t.$message.error(e.message)}).finally(function(){e.close()})},onApplyFrom:function(){var i=this;this.$refs.setApplyForm.validate(function(e){if(!e)return i.$message.error("请检查输入项，确认无误后，重新提交"),!1;var t=i.$loading({lock:!0,text:"",spinner:"",background:"rgba(255, 255, 255, 0.9)"});s.default.scoreAction.feedbackcommit({title:i.setApply.name,contents:i.ckeditor.getData(),attachments:JSON.stringify([{name:i.file.name,url:i.successFileUrl}])}).then(function(e){e.success&&(i.$message({type:"success",message:"提交成功，等待反馈"}),i.ckeditor.setData(""),i.$refs.setApplyForm.resetFields())}).catch(function(e){i.filesArr.pop(),i.$message.error(e.message)}).finally(function(){t.close()})})},initckeditor:function(){!this.ckeditor&&(this.ckeditor=l.default.replace("editor",{height:300,uiColor:"#eeeeee",filebrowserImageUploadUrl:"/api/ckeditor/img/upload",toolbar:[{name:"styles",items:["Styles","Format","Font","FontSize"]},{name:"colors",items:["TextColor","BGColor"]},{name:"tools",items:["Maximize","ShowBlocks"]},{name:"editing",items:["Find","Replace"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote","CreateDiv","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Table","HorizontalRule"]}]}))}}}},349:function(e,t,i){},413:function(e,t,i){"use strict";var s=i(349);i.n(s).a},437:function(e,t,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticClass:"con-title"},[t._v("系统反馈")]),t._v(" "),i("div",{staticClass:"con-box"},[i("el-row",{attrs:{type:"flex",justify:"center"}},[i("el-col",{attrs:{xs:24,sm:24,md:24,lg:24,xl:24}},[i("el-form",{ref:"setApplyForm",attrs:{model:t.setApply,rules:t.applyRules}},[i("el-form-item",{attrs:{label:"问题描述",prop:"name"}},[i("el-input",{attrs:{placeholder:"请输入问题描述",type:"text"},model:{value:t.setApply.name,callback:function(e){t.$set(t.setApply,"name",e)},expression:"setApply.name"}})],1),t._v(" "),i("div",{staticStyle:{width:"100%",height:"10px"}}),t._v(" "),i("div",{staticClass:"label",staticStyle:{"font-size":"14px","line-height":"2"}},[t._v("问题详情：")]),t._v(" "),i("textarea",{attrs:{id:"editor"}}),t._v(" "),i("el-form-item",{attrs:{label:"附 件",prop:"file"}},[i("el-upload",{ref:"upFile",staticClass:"upload-demo",attrs:{action:"",multiple:!1,limit:1,"show-file-list":!1,"on-change":t.handleChange,"http-request":t.uploadFile,"file-list":t.filesArr}},[i("el-button",{attrs:{size:"small",type:"primary"}},[t._v("点击上传")]),t._v(" "),i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("（可以上传 word、ppt、png、jpg、zip、rar等资源，多文件请先压缩打包成一个文件后，再上传）")]),t._v(" "),t.successFileUrl?[t._v("\n                "+t._s(t.successFileUrl.replace(/.*\/([^\/]*\.[^.]+)$/gi,"$1"))+"\n              ")]:t._e()],2),t._v(" "),t.successFileUrl?[i("a",{attrs:{href:t.successFileUrl}},[t._v("下载已上传附件")])]:t._e()],2),t._v(" "),i("el-form-item",[i("el-button",{attrs:{type:"primary"},on:{click:t.onApplyFrom}},[t._v("提交")])],1)],1)],1)],1)],1)])},l=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return l})}}]);