(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-54467407"],{"0191":function(t,e,o){},"18ea":function(t,e,o){},2861:function(t,e,o){"use strict";o("0191")},"4b51":function(t,e,o){},"9d4f":function(t,e,o){"use strict";o.r(e);var i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"tableTitle"},[o("span",{staticClass:"tableFloatLine"}),t._v(" "+t._s(t.name)+" ")])},r=[],a={props:{name:{type:String,required:!0}},data:function(){return{someData:""}}},l=a,n=(o("2861"),o("2877")),s=Object(n["a"])(l,i,r,!1,null,"aed0c080",null);e["default"]=s.exports},cce6:function(t,e,o){"use strict";o.r(e);var i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"mainBox"},[o("div",{staticClass:"layerBox"},[o("tableTitle",{attrs:{name:t.tableDivTitle}}),o("el-form",{ref:"form",attrs:{model:t.form,rules:t.formRules,"label-position":"left","label-width":"120px"}},[o("div",{staticClass:"formDiv"},[o("div",[o("el-form-item",{staticClass:"custom-align-right",attrs:{label:"课题分类:",prop:"type"}},[o("el-select",{attrs:{placeholder:"请选择课题分类.."},model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}},t._l(t.topicType,(function(t){return o("el-option",{attrs:{label:t.label,value:t.value}})})),1)],1),o("el-form-item",{staticClass:"custom-align-right",attrs:{label:"课题标题:",prop:"title"}},[o("el-input",{attrs:{autocomplete:"off",placeholder:"请输入课题标题"},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),o("div",{staticClass:"QuillTitle"},[o("span",[t._v("* ")]),t._v("课题内容: "),o("div",{staticClass:"QuillModelBtn",on:{click:t.toggleSourceMode}},[t._v(" "+t._s(t.showHtml?"切换到编辑模式":"切换到源码模式")+" ")])]),o("el-form-item",{attrs:{label:""}},[o("div",{staticClass:"editor-container"},[t.showHtml?o("div",[o("textarea",{directives:[{name:"model",rawName:"v-model",value:t.editorHtml,expression:"editorHtml"}],staticStyle:{width:"100%",height:"400px"},domProps:{value:t.editorHtml},on:{input:function(e){e.target.composing||(t.editorHtml=e.target.value)}}})]):o("div",[o("quill-editor",{ref:"quillEditor",staticClass:"my-quill-editor",attrs:{options:t.editorOptions},model:{value:t.form.content,callback:function(e){t.$set(t.form,"content",e)},expression:"form.content"}})],1),o("input",{ref:"multiFileInput",attrs:{type:"file",multiple:"",hidden:"",accept:"image/jpeg, image/png"},on:{change:t.handleMultipleFiles}})])]),o("el-form-item",{staticClass:"custom-align-right",attrs:{label:"建立群聊:",prop:"is_group"}},[o("el-radio-group",{attrs:{disabled:void 0!=this.$route.query.id},model:{value:t.form.is_group,callback:function(e){t.$set(t.form,"is_group",e)},expression:"form.is_group"}},[o("el-radio",{attrs:{label:"1"}},[t._v("是")]),o("el-radio",{attrs:{label:"0"}},[t._v("否")])],1)],1),o("div",["1"==t.form.is_group?o("el-form-item",{staticClass:"custom-align-right",attrs:{label:"群聊名称:",prop:"group_name"}},[o("el-input",{attrs:{autocomplete:"off",placeholder:"请输入群聊名称",disabled:t.groupStatus,maxlength:"20"},model:{value:t.form.group_name,callback:function(e){t.$set(t.form,"group_name",e)},expression:"form.group_name"}})],1):t._e(),o("el-form-item",{staticClass:"custom-align-right",attrs:{label:"作者:"}},[o("el-input",{attrs:{autocomplete:"off",placeholder:"请输入作者名"},model:{value:t.form.author,callback:function(e){t.$set(t.form,"author",e)},expression:"form.author"}})],1)],1)],1)])])],1),o("div",{staticClass:"bottomBtnBox"},[o("el-button",{attrs:{type:"info"},on:{click:t.returnPage}},[t._v("返回")]),1==t.editStatus?o("el-button",{attrs:{type:"primary"},on:{click:t.editToServe}},[t._v("修改")]):o("el-button",{attrs:{type:"primary"},on:{click:t.addToServe}},[t._v("创建")])],1)])},r=[],a=o("c7eb"),l=o("1da1"),n=(o("d81d"),o("b0c0"),o("d3b7"),o("3ca3"),o("2ca0"),o("0643"),o("4e3e"),o("a573"),o("159b"),o("ddb0"),o("9d4f")),s=(o("4b51"),o("953d")),c=(o("8096"),o("f318")),u=o.n(c),d=o("9339"),m=o.n(d);o("98cd");m.a.register("modules/imageResize",u.a);var f={components:{quillEditor:s["quillEditor"],tableTitle:n["default"]},data:function(){var t=this,e=function(t,e,o){0==e.length?o(new Error("该项不能为空!")):o()},o=function(t,e,o){0==e.length?o(new Error("该项不能为空!")):o()};return{editStatus:!1,groupStatus:!1,tableDivTitle:"编辑课题",disclaimer:!0,form:{type:"",title:"",content:"",is_group:"0",group_name:"",author:""},topicType:[],topicStatus:[],formRules:{title:[{required:!0,trigger:"blur",validator:e}],type:[{required:!0,trigger:"blur",validator:o}],is_group:[{required:!0,trigger:"blur",validator:e}],group_name:[{required:!0,trigger:"blur",validator:e}]},showHtml:!1,editorHtml:"",editorOptions:{placeholder:"请输入内容...",theme:"snow",modules:{toolbar:{container:[[{font:[]}],[{header:[1,2,3,4,5,6,!1]}],[{size:["small",!1,"large","huge"]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{script:"sub"},{script:"super"}],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],[{align:[]}],["blockquote","code-block"],["link","image","video"],["clean"],[{html:!0}]],handlers:{image:function(){t.handleImageClick()},showHtml:function(){this.$emit("toggleSourceMode")}}},imageResize:{displayStyles:{backgroundColor:"black",border:"none",color:"white"},modules:["Resize","DisplaySize","Toolbar"]}}}}},methods:{beforeAvatarUpload:function(t){var e=this,o="image/jpeg"===t.type,i="image/png"===t.type,r=t.size/1024/1024<2;if(!o&&!i)return this.$message.error("上传缩略图只能是 JPG 或 PNG 格式!"),!1;if(!r)return this.$message.error("上传缩略图大小不能超过 2MB!"),!1;var a=new FormData;return a.append("file",t),this.$store.dispatch("pool/uploadFile",a).then((function(t){e.imgUrl=t.data.imgUrl,e.form.imgurl=t.data.imgUrl,console.log(t.data.imgUrl)})).catch((function(){e.$message({type:"info",message:"网络错误,请重试!"})})),!1},addToServe:function(){var t=this;this.$refs.form.validate((function(e){e&&t.$store.dispatch("chat/addTopic",t.form).then((function(e){t.$message({type:"success",message:"已成功创建商圈!"}),t.cleatForm(),t.returnPage()})).catch((function(){t.$message({type:"info",message:"网络错误,请重试!"})}))}))},cleatForm:function(){this.form.type="",this.form.title="",this.form.content="",this.form.is_group="",this.form.group_name="",this.form.author=""},getTopicType:function(){var t=this;this.$store.dispatch("chat/topicType",this.getApiData).then((function(e){t.topicType=e.data,console.log(t.topicType)})).catch((function(){t.$message.error("查询商圈分类失败!")}))},getTopicStatus:function(){var t=this;this.$store.dispatch("chat/topicStatus",this.getApiData).then((function(e){t.topicStatus=e.data,console.log(e)})).catch((function(){t.$message.error("查询商圈状态失败!")}))},returnPage:function(){this.$router.push({path:"/topic"})},getMainData:function(){var t=this,e={id:this.$route.query.id+""};this.$store.dispatch("chat/getTopicInfo",e).then((function(e){console.log(e),t.form.title=e.data.title,t.form.type=e.data.type,t.form.content=e.data.content,t.form.is_group=e.data.is_group,t.form.group_name=e.data.group_name,t.form.author=e.data.author,"1"==e.data.is_group&&(t.groupStatus=!0)})).catch((function(){t.$message({type:"info",message:"网络错误,请重试!"})}))},loadCascaderPath:function(t){var e=this;return Object(l["a"])(Object(a["a"])().mark((function o(){var i,r;return Object(a["a"])().wrap((function(o){while(1)switch(o.prev=o.next){case 0:i=Object(a["a"])().mark((function o(){var i,l;return Object(a["a"])().wrap((function(o){while(1)switch(o.prev=o.next){case 0:return i=t[r-1]||0,l=r,o.next=4,e.$store.dispatch("pool/categoryList",{pid:i}).then((function(o){o.data.map((function(t){return{value:t.id,label:t.name,leaf:l>=3}}));l===t.length-1&&(e.form.cat_arr_id=t,e.parentKey+=1)}));case 4:case"end":return o.stop()}}),o)})),r=0;case 2:if(!(r