| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-68c0559f"],{"0a28":function(t,e,a){"use strict";var i=a("6da9"),r=a.n(i);r.a},1336:function(t,e,a){"use strict";a.d(e,"g",(function(){return r})),a.d(e,"b",(function(){return n})),a.d(e,"j",(function(){return o})),a.d(e,"d",(function(){return s})),a.d(e,"i",(function(){return l})),a.d(e,"h",(function(){return c})),a.d(e,"e",(function(){return u})),a.d(e,"a",(function(){return d})),a.d(e,"f",(function(){return m})),a.d(e,"c",(function(){return f}));var i=a("0c6d");function r(){return i["a"].get("system/article/category/lst")}function n(){return i["a"].get("system/article/category/create/form")}function o(t){return i["a"].get("system/article/category/update/form/".concat(t))}function s(t){return i["a"].delete("system/article/category/delete/".concat(t))}function l(t,e){return i["a"].post("system/article/category/status/".concat(t),{status:e})}function c(t){return i["a"].get("system/article/article/lst",t)}function u(t){return i["a"].get("system/article/article/detail/".concat(t))}function d(t){return i["a"].post("system/article/article/create",t)}function m(t,e){return i["a"].post("system/article/article/update/".concat(e),t)}function f(t){return i["a"].delete("system/article/article/delete/".concat(t))}},"6da9":function(t,e,a){},c3b3:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("el-button",{staticClass:"pan-back-btn mb20",attrs:{icon:"el-icon-arrow-left",size:"mini"},on:{click:t.back}},[t._v("返回")]),t._v(" "),a("el-form",{ref:"formValidate",staticClass:"form",attrs:{model:t.formValidate,"label-width":"120px",rules:t.ruleValidate},nativeOn:{submit:function(t){t.preventDefault()}}},[a("div",{staticClass:"dividerTitle"},[a("span",{staticClass:"title mr10"},[t._v("文章信息")]),t._v(" "),a("el-divider")],1),t._v(" "),a("el-row",{attrs:{gutter:10}},[a("el-col",t._b({},"el-col",t.grid,!1),[a("el-form-item",{attrs:{label:"标题:",prop:"title","label-for":"title"}},[a("el-input",{staticStyle:{width:"90%"},attrs:{placeholder:"请输入","element-id":"title"},model:{value:t.formValidate.title,callback:function(e){t.$set(t.formValidate,"title",e)},expression:"formValidate.title"}})],1)],1),t._v(" "),a("el-col",t._b({staticClass:"mr50"},"el-col",t.grid,!1),[a("el-form-item",{attrs:{label:"作者:",prop:"author","label-for":"author"}},[a("el-input",{staticStyle:{width:"90%"},attrs:{placeholder:"请输入",maxLength:"32","element-id":"author"},model:{value:t.formValidate.author,callback:function(e){t.$set(t.formValidate,"author",e)},expression:"formValidate.author"}})],1)],1),t._v(" "),a("el-col",t._b({},"el-col",t.grid,!1),[a("el-form-item",{attrs:{label:"文章分类:","label-for":"cid",prop:"cid"}},[a("el-select",{staticClass:"mb15",staticStyle:{width:"90%"},attrs:{clearable:"",placeholder:"请选择"},model:{value:t.formValidate.cid,callback:function(e){t.$set(t.formValidate,"cid",e)},expression:"formValidate.cid"}},[a("el-option",{staticStyle:{width:"560px",height:"200px",overflow:"auto","background-color":"#fff"},attrs:{label:t.sleOptions.title,value:t.sleOptions.article_category_id}},[a("el-tree",{ref:"tree2",attrs:{data:t.treeData,props:t.defaultProps,"highlight-current":""},on:{"node-click":t.handleSelClick}})],1)],1)],1)],1),t._v(" "),a("el-col",t._b({staticClass:"mr50"},"el-col",t.grid,!1),[a("el-form-item",{attrs:{label:"文章简介:",prop:"synopsis","label-for":"synopsis"}},[a("el-input",{staticStyle:{width:"90%"},attrs:{type:"textarea",placeholder:"请输入"},model:{value:t.formValidate.synopsis,callback:function(e){t.$set(t.formValidate,"synopsis",e)},expression:"formValidate.synopsis"}})],1)],1),t._v(" "),a("el-col",t._b({staticClass:"mr50"},"el-col",t.grid,!1),[a("el-form-item",{attrs:{label:"图文封面:",prop:"image_input"}},[a("div",{staticClass:"upLoadPicBox",on:{click:function(e){return t.modalPicTap("1")}}},[t.formValidate.image_input?a("div",{staticClass:"pictrue"},[a("img",{attrs:{src:t.formValidate.image_input}})]):a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])])],1)],1),t._v(" "),a("div",{staticClass:"dividerTitle"},[a("span",{staticClass:"title"},[t._v("文章内容")]),t._v(" "),a("el-divider")],1),t._v(" "),a("el-form-item",{attrs:{label:"文章内容:",prop:"content"}},[a("ueditor-from",{attrs:{content:t.formValidate.content},model:{value:t.formValidate.content,callback:function(e){t.$set(t.formValidate,"content",e)},expression:"formValidate.content"}})],1),t._v(" "),a("div",{staticClass:"dividerTitle"},[a("span",{staticClass:"title"},[t._v("其他设置")]),t._v(" "),a("el-divider")],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"是否显示:"}},[a("el-radio-group",{model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[a("el-radio",{staticClass:"radio",attrs:{label:1}},[t._v("显示")]),t._v(" "),a("el-radio",{attrs:{label:0}},[t._v("不显示")])],1)],1)],1)],1),t._v(" "),a("el-button",{staticClass:"submission",attrs:{type:"primary"},on:{click:function(e){return t.onsubmit("formValidate")}}},[t._v("提交")])],1)],1)],1)},r=[],n=(a("96cf"),a("3b8d")),o=(a("7f7f"),a("1336")),s=a("ef0d"),l=a("83d6"),c={name:"EditArticle",components:{ueditorFrom:s["a"]},data:function(){var t=this,e=function(e,a,i){t.formValidate.image_input?i():i(new Error("请上传图文封面"))},a=function(e,a,i){t.formValidate.cid?i():i(new Error("请选择文章分类"))};return{roterPre:l["roterPre"],sleOptions:{title:"",article_category_id:""},defaultProps:{children:"children",label:"title"},list:[],treeData:[],grid:{xl:10,lg:10,md:10,sm:24,xs:24},formValidate:{cid:"",title:"",author:"",image_input:"",content:"",synopsis:"",url:"",is_hot:0,is_banner:0,status:0},ruleValidate:{title:[{required:!0,message:"请输入标题",trigger:"blur"}],author:[{required:!0,message:"请输入作者",trigger:"blur"}],cid:[{required:!0,validator:a,trigger:"change"}],image_input:[{required:!0,validator:e,trigger:"change"}],content:[{required:!0,message:"请输入文章内容",trigger:"change"}]},tempRoute:{}}},watch:{$route:function(t,e){this.$route.params.id?this.getDetails():this.formValidate={title:"",author:"",image_input:"",content:"",synopsis:"",url:"",is_hot:0,is_banner:0,status:0}}},created:function(){this.tempRoute=Object.assign({},this.$route)},mounted:function(){this.getList(),this.$route.params.id&&(this.setTagsViewTitle(),this.getDetails())},methods:{back:function(){this.$router.push({path:"".concat(l["roterPre"],"/cms/article")})},getList:function(){var t=this;Object(o["g"])().then((function(e){t.treeData=e.data})).catch((function(e){t.$message.error(e.message)}))},modalPicTap:function(t){var e=this;this.$modalUpload((function(t){e.formValidate.image_input=t[0]}),t)},handleSelClick:function(t){this.formValidate.cid=t.article_category_id,this.sleOptions={title:t.title,article_category_id:t.article_category_id}},onsubmit:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return!1;e.$route.params.id?Object(o["f"])(e.formValidate,e.$route.params.id).then(function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(a){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$message.success(a.message),setTimeout((function(){e.$router.push({path:"".concat(l["roterPre"],"/cms/article")})}),500);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$message.error(t.message)})):Object(o["a"])(e.formValidate).then(function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(a){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$message.success(a.message),setTimeout((function(){e.$router.push({path:"".concat(l["roterPre"],"/cms/article")})}),500);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$message.error(t.message)}))}))},getDetails:function(){var t=this;Object(o["e"])(this.$route.params.id?this.$route.params.id:0).then(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(a){var i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=a.data,t.sleOptions.title=i.articleCategory.title,t.sleOptions.article_category_id=i.articleCategory.article_category_id,t.formValidate={cid:i.articleCategory.article_category_id,title:i.title,author:i.author,image_input:i.image_input,content:i.content.content,synopsis:i.synopsis,url:i.url,is_hot:i.is_hot,is_banner:i.is_banner,status:i.status};case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$message.error(e.message)}))},setTagsViewTitle:function(){var t="编辑文章",e=Object.assign({},this.tempRoute,{title:"".concat(t,"-").concat(this.$route.params.id)});this.$store.dispatch("tagsView/updateVisitedView",e)}}},u=c,d=(a("0a28"),a("2877")),m=Object(d["a"])(u,i,r,!1,null,"58d06d80",null);e["default"]=m.exports},ef0d:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("vue-ueditor-wrap",{staticStyle:{width:"90%"},attrs:{config:t.myConfig},on:{beforeInit:t.addCustomDialog},model:{value:t.contents,callback:function(e){t.contents=e},expression:"contents"}})],1)},r=[],n=a("6625"),o=a.n(n),s=a("83d6"),l={name:"Index",components:{VueUeditorWrap:o.a},scrollerHeight:{content:String,default:""},props:{content:{type:String,default:""}},data:function(){return{contents:this.content,myConfig:{autoHeightEnabled:!1,initialFrameHeight:500,initialFrameWidth:"100%",UEDITOR_HOME_URL:"/UEditor/",elementPathEnabled:!1,wordCount:!1,enableAutoSave:!1}}},watch:{content:function(t){this.contents=this.content},contents:function(t){this.$emit("input",t)}},created:function(){},methods:{addCustomDialog:function(t){window.UE.registerUI("test-dialog",(function(t,e){var a=new window.UE.ui.Dialog({iframeUrl:s["roterPre"]+"/setting/uploadPicture?field=dialog",editor:t,name:e,title:"上传图片",cssRules:"width:1000px;height:620px;padding:20px;"});this.dialog=a;var i=new window.UE.ui.Button({name:"dialog-button",title:"上传图片",cssRules:"background-image: url(@/assets/images/icons.png);background-position: -726px -77px;",onclick:function(){a.render(),a.open()}});return i}),37)}}},c=l,u=a("2877"),d=Object(u["a"])(c,i,r,!1,null,"20a9303c",null);e["a"]=d.exports}}]);
|