Commit 72407245 authored by Davve's avatar Davve

run build

parent b30bae41
This diff is collapsed.
.createPost-container[data-v-61f14248]{position:relative}.createPost-container .createPost-main-container[data-v-61f14248]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-61f14248]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-61f14248]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-61f14248]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-61f14248]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-61f14248]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-61f14248]{display:inline-block}.createPost-container .word-counter[data-v-61f14248]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file
.createPost-container[data-v-0f1b55b8]{position:relative}.createPost-container .createPost-main-container[data-v-0f1b55b8]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-0f1b55b8]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-0f1b55b8]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-0f1b55b8]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-0f1b55b8]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-0f1b55b8]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-0f1b55b8]{display:inline-block}.createPost-container .word-counter[data-v-0f1b55b8]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file
.createPost-container[data-v-61f14248]{position:relative}.createPost-container .createPost-main-container[data-v-61f14248]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-61f14248]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-61f14248]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-61f14248]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-61f14248]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-61f14248]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-61f14248]{display:inline-block}.createPost-container .word-counter[data-v-61f14248]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file
.createPost-container[data-v-0f1b55b8]{position:relative}.createPost-container .createPost-main-container[data-v-0f1b55b8]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-0f1b55b8]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-0f1b55b8]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-0f1b55b8]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-0f1b55b8]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-0f1b55b8]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-0f1b55b8]{display:inline-block}.createPost-container .word-counter[data-v-0f1b55b8]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file
.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-31a688b5]{position:relative}.createPost-container .createPost-main-container[data-v-31a688b5]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-31a688b5]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-31a688b5]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-31a688b5]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-31a688b5]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-31a688b5]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-31a688b5]{display:inline-block}.createPost-container .word-counter[data-v-31a688b5]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file
.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-6ebd4d4c]{position:relative}.createPost-container .createPost-main-container[data-v-6ebd4d4c]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-6ebd4d4c]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-6ebd4d4c]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-6ebd4d4c]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-6ebd4d4c]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-6ebd4d4c]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-6ebd4d4c]{display:inline-block}.createPost-container .word-counter[data-v-6ebd4d4c]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file
.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-31a688b5]{position:relative}.createPost-container .createPost-main-container[data-v-31a688b5]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-31a688b5]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-31a688b5]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-31a688b5]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-31a688b5]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-31a688b5]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-31a688b5]{display:inline-block}.createPost-container .word-counter[data-v-31a688b5]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file
.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-6ebd4d4c]{position:relative}.createPost-container .createPost-main-container[data-v-6ebd4d4c]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-6ebd4d4c]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-6ebd4d4c]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-6ebd4d4c]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-6ebd4d4c]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-6ebd4d4c]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-6ebd4d4c]{display:inline-block}.createPost-container .word-counter[data-v-6ebd4d4c]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file
.editor-slide-upload[data-v-39480e6e]{margin-bottom:20px}.editor-slide-upload[data-v-39480e6e] .el-upload--picture-card{width:100%}.tinymce-container[data-v-261f5e1f]{position:relative}.tinymce-container[data-v-261f5e1f] .mce-fullscreen{z-index:10000}.tinymce-textarea[data-v-261f5e1f]{visibility:hidden;z-index:-1}.editor-custom-btn-container[data-v-261f5e1f]{position:absolute;right:4px;top:4px}.fullscreen .editor-custom-btn-container[data-v-261f5e1f]{z-index:10000;position:fixed}.editor-upload-btn[data-v-261f5e1f]{display:inline-block}.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-6b3eafe3]{position:relative}.createPost-container .createPost-main-container[data-v-6b3eafe3]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-6b3eafe3]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-6b3eafe3]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-6b3eafe3]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-6b3eafe3]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-6b3eafe3]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-6b3eafe3]{display:inline-block}.createPost-container .word-counter[data-v-6b3eafe3]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file
.editor-slide-upload[data-v-39480e6e]{margin-bottom:20px}.editor-slide-upload[data-v-39480e6e] .el-upload--picture-card{width:100%}.tinymce-container[data-v-261f5e1f]{position:relative}.tinymce-container[data-v-261f5e1f] .mce-fullscreen{z-index:10000}.tinymce-textarea[data-v-261f5e1f]{visibility:hidden;z-index:-1}.editor-custom-btn-container[data-v-261f5e1f]{position:absolute;right:4px;top:4px}.fullscreen .editor-custom-btn-container[data-v-261f5e1f]{z-index:10000;position:fixed}.editor-upload-btn[data-v-261f5e1f]{display:inline-block}.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-54829ce4]{position:relative}.createPost-container .createPost-main-container[data-v-54829ce4]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-54829ce4]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-54829ce4]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-54829ce4]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-54829ce4]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-54829ce4]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-54829ce4]{display:inline-block}.createPost-container .word-counter[data-v-54829ce4]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-5e84"],{"0o2y":function(t,e,a){"use strict";a.d(e,"c",function(){return r}),a.d(e,"b",function(){return s}),a.d(e,"a",function(){return n}),a.d(e,"d",function(){return i});var o=a("t3Un");function r(t){return Object(o.a)({url:"/api/tag/list",method:"get",params:t})}function s(t){return Object(o.a)({url:"/api/tag/list/update",method:"post",data:t})}function n(t){return Object(o.a)({url:"/api/tag/create",method:"post",data:t})}function i(t){return Object(o.a)({url:"/api/tag/detail",method:"get",params:{id:t}})}},EBwg:function(t,e,a){"use strict";var o=a("P2sY"),r=a.n(o),s=a("EJiy"),n=a.n(s),i=a("m1cH"),l=a.n(i),c=a("Grqa"),u=a("uARZ"),p=a("0o2y"),m=a("gg54"),d=a("7Qib");function g(t,e){for(var a=[],o=0;o<t.length;o++)Object(d.c)(e,t[o].name)&&(a.push(t[o].id),Object(d.f)(e,t[o].name));return a.push.apply(a,l()(e)),a.join(",")}function f(t){for(var e=0;e<t.length;e++)""!=t[e]&&null!=t[e]&&void 0!=n()(t[e])||(t.splice(e,1),e-=1);return t}var h={status:"draft",name:"",description:"",up_tags:[],down_tags:[]},b={name:"TagDetail",components:{MDinput:c.a,Sticky:u.a},props:{isEdit:{type:Boolean,default:!1}},data:function(){var t=this;return{postForm:r()({},h),loading:!1,TagListOptions:[],rules:{name:[{validator:function(e,a,o){""===a?(t.$message({message:e.field+"为必传项",type:"error"}),o(new Error(e.field+"为必传项"))):o()},trigger:"blur"}]},tempRoute:{},temparray:{up_tags:[],down_tags:[]}}},computed:{contentShortLength:function(){return this.postForm.description.length}},created:function(){if(this.isEdit){var t=this.$route.params&&this.$route.params.id;this.fetchData(t)}else this.postForm=r()({},h);this.tempRoute=r()({},this.$route)},methods:{fetchData:function(t){var e=this;Object(p.d)(t).then(function(t){for(var a=t.data.data.data,o=[],r=[],s=0;s<a.up_tags.length;s++)o.push(a.up_tags[s].name),e.temparray.up_tags.push(a.up_tags[s]);for(var n=0;n<a.down_tags.length;n++)r.push(a.down_tags[n].name),e.temparray.down_tags.push(a.down_tags[n]);a.down_tags=r,a.up_tags=o,e.postForm=a}).catch(function(t){console.log(t)})},submitForm:function(){var t=this;this.$refs.postForm.validate(function(e){if(!e)return console.log("error submit!!"),!1;t.loading=!0,t.isEdit?(t.postForm.up_tags=g(t.temparray.up_tags,t.postForm.up_tags),t.postForm.down_tags=g(t.temparray.down_tags,t.postForm.down_tags)):(t.postForm.up_tags=t.postForm.up_tags.join(","),t.postForm.down_tags=t.postForm.down_tags.join(","));for(var a=!1,o=f(t.postForm.up_tags.split(",")),r=f(t.postForm.down_tags.split(",")),s=0;s<o.length;s++)if(Object(d.c)(r,o[s])){t.$message.error("上下级标签不能存相同标签"),t.postForm.up_tags=[],t.postForm.down_tags=[],a=!0;break}if(a)return!1;Object(p.a)(t.postForm).then(function(e){t.$notify({title:"成功",message:e.data.data.message,type:"success",duration:2e3}),setTimeout(function(){t.$router.push("/tag/list")},1e3)}).catch(function(e){t.$notify({title:"失败",message:"操作失败",type:"danger",duration:2e3})}),t.postForm.status="published",t.loading=!1})},getRemoteTagList:function(t){var e=this;Object(m.e)(t).then(function(t){t.data.data.data&&(e.TagListOptions=t.data.data.data)})}}},_=(a("yFR9"),a("KHd+")),v=Object(_.a)(b,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"createPost-container"},[a("el-form",{ref:"postForm",staticClass:"form-container",attrs:{model:t.postForm,rules:t.rules}},[a("sticky",{attrs:{"class-name":"sub-navbar"}},[a("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"margin-left":"10px"},attrs:{type:"success"},on:{click:t.submitForm}},[t._v("保存\n ")])],1),t._v(" "),a("div",{staticClass:"createPost-main-container"},[a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"name"}},[a("MDinput",{attrs:{maxlength:100,name:"name",required:""},model:{value:t.postForm.name,callback:function(e){t.$set(t.postForm,"name",e)},expression:"postForm.name"}},[t._v("\n 标签名称\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("div",{staticClass:"postInfo-container"},[a("el-row",[a("el-col",{attrs:{span:12}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"20px"},attrs:{"label-width":"75px",label:"标签ID:",prop:"position"}},[a("el-input",{staticClass:"article-textarea",staticStyle:{width:"300px"},attrs:{rows:1,type:"number",disabled:""},model:{value:t.postForm.id,callback:function(e){t.$set(t.postForm,"id",e)},expression:"postForm.id"}})],1):t._e()],1),t._v(" "),a("el-col",{attrs:{span:12}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"20px"},attrs:{"label-width":"75px",label:"创建时间:",prop:"position"}},[a("el-input",{staticClass:"article-textarea",staticStyle:{width:"300px"},attrs:{rows:1,type:"text",disabled:""},model:{value:t.postForm.create_time,callback:function(e){t.$set(t.postForm,"create_time",e)},expression:"postForm.create_time"}})],1):t._e()],1)],1)],1)])],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{staticClass:"postInfo-container-item",attrs:{"label-width":"75px",label:"上级标签:"}},[a("el-select",{staticStyle:{width:"70%"},attrs:{"remote-method":t.getRemoteTagList,filterable:"",remote:"",multiple:"","value-key":"id",placeholder:"搜索标签"},model:{value:t.postForm.up_tags,callback:function(e){t.$set(t.postForm,"up_tags",e)},expression:"postForm.up_tags"}},t._l(t.TagListOptions,function(t,e){return a("el-option",{key:t+e,attrs:{label:t.name,value:t.id}})}))],1)],1),t._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{staticClass:"postInfo-container-item",attrs:{"label-width":"75px",label:"下级标签:"}},[a("el-select",{staticStyle:{width:"70%"},attrs:{"remote-method":t.getRemoteTagList,multiple:"",filterable:"",remote:"","reserve-keyword":"",placeholder:"搜索标签",loading:t.loading,"value-key":"id"},model:{value:t.postForm.down_tags,callback:function(e){t.$set(t.postForm,"down_tags",e)},expression:"postForm.down_tags"}},t._l(t.TagListOptions,function(t,e){return a("el-option",{key:t+e,attrs:{label:t.name,value:t.id}})}))],1)],1)],1),t._v(" "),a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{"label-width":"75px",label:"标签简介:",prop:"desc"}},[a("el-input",{staticClass:"article-textarea",attrs:{rows:1,type:"textarea",autosize:"",placeholder:"请输入内容"},model:{value:t.postForm.description,callback:function(e){t.$set(t.postForm,"description",e)},expression:"postForm.description"}}),t._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:t.contentShortLength,expression:"contentShortLength"}],staticClass:"word-counter"},[t._v(t._s(t.contentShortLength)+"字")])],1)],1)],1)],1)},[],!1,null,"0f1b55b8",null);v.options.__file="TagDetail.vue";e.a=v.exports},"STa+":function(t,e,a){"use strict";a.r(e);var o={name:"EditTag",components:{TagDetail:a("EBwg").a}},r=a("KHd+"),s=Object(r.a)(o,function(){var t=this.$createElement;return(this._self._c||t)("tag-detail",{attrs:{"is-edit":!1}})},[],!1,null,null,null);s.options.__file="create.vue";e.default=s.exports},gg54:function(t,e,a){"use strict";a.d(e,"g",function(){return r}),a.d(e,"c",function(){return s}),a.d(e,"e",function(){return n}),a.d(e,"d",function(){return i}),a.d(e,"b",function(){return l}),a.d(e,"a",function(){return c}),a.d(e,"f",function(){return u});var o=a("t3Un");function r(t){return Object(o.a)({url:"/api/search/user",method:"get",params:{name:t}})}function s(t){return Object(o.a)({url:"/api/search/group",method:"get",params:{name:t}})}function n(t){return Object(o.a)({url:"/api/search/tag",method:"get",params:{name:t}})}function i(t){return Object(o.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function l(t){return Object(o.a)({url:"/api/search/city",method:"get",params:{name:t}})}function c(t){return Object(o.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function u(t){return Object(o.a)({url:"/api/search/topic",method:"get",params:{name:t}})}},rVvD:function(t,e,a){},yFR9:function(t,e,a){"use strict";var o=a("rVvD");a.n(o).a}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-5e841"],{"0o2y":function(t,e,a){"use strict";a.d(e,"c",function(){return r}),a.d(e,"b",function(){return s}),a.d(e,"a",function(){return n}),a.d(e,"d",function(){return i});var o=a("t3Un");function r(t){return Object(o.a)({url:"/api/tag/list",method:"get",params:t})}function s(t){return Object(o.a)({url:"/api/tag/list/update",method:"post",data:t})}function n(t){return Object(o.a)({url:"/api/tag/create",method:"post",data:t})}function i(t){return Object(o.a)({url:"/api/tag/detail",method:"get",params:{id:t}})}},EBwg:function(t,e,a){"use strict";var o=a("P2sY"),r=a.n(o),s=a("EJiy"),n=a.n(s),i=a("m1cH"),l=a.n(i),c=a("Grqa"),u=a("uARZ"),p=a("0o2y"),m=a("gg54"),d=a("7Qib");function g(t,e){for(var a=[],o=0;o<t.length;o++)Object(d.c)(e,t[o].name)&&(a.push(t[o].id),Object(d.f)(e,t[o].name));return a.push.apply(a,l()(e)),a.join(",")}function f(t){for(var e=0;e<t.length;e++)""!=t[e]&&null!=t[e]&&void 0!=n()(t[e])||(t.splice(e,1),e-=1);return t}var h={status:"draft",name:"",description:"",up_tags:[],down_tags:[]},b={name:"TagDetail",components:{MDinput:c.a,Sticky:u.a},props:{isEdit:{type:Boolean,default:!1}},data:function(){var t=this;return{postForm:r()({},h),loading:!1,TagListOptions:[],rules:{name:[{validator:function(e,a,o){""===a?(t.$message({message:e.field+"为必传项",type:"error"}),o(new Error(e.field+"为必传项"))):o()},trigger:"blur"}]},tempRoute:{},temparray:{up_tags:[],down_tags:[]}}},computed:{contentShortLength:function(){return this.postForm.description.length}},created:function(){if(this.isEdit){var t=this.$route.params&&this.$route.params.id;this.fetchData(t)}else this.postForm=r()({},h);this.tempRoute=r()({},this.$route)},methods:{fetchData:function(t){var e=this;Object(p.d)(t).then(function(t){for(var a=t.data.data.data,o=[],r=[],s=0;s<a.up_tags.length;s++)o.push(a.up_tags[s].name),e.temparray.up_tags.push(a.up_tags[s]);for(var n=0;n<a.down_tags.length;n++)r.push(a.down_tags[n].name),e.temparray.down_tags.push(a.down_tags[n]);a.down_tags=r,a.up_tags=o,e.postForm=a}).catch(function(t){console.log(t)})},submitForm:function(){var t=this;this.$refs.postForm.validate(function(e){if(!e)return console.log("error submit!!"),!1;t.loading=!0,t.isEdit?(t.postForm.up_tags=g(t.temparray.up_tags,t.postForm.up_tags),t.postForm.down_tags=g(t.temparray.down_tags,t.postForm.down_tags)):(t.postForm.up_tags=t.postForm.up_tags.join(","),t.postForm.down_tags=t.postForm.down_tags.join(","));for(var a=!1,o=f(t.postForm.up_tags.split(",")),r=f(t.postForm.down_tags.split(",")),s=0;s<o.length;s++)if(Object(d.c)(r,o[s])){t.$message.error("上下级标签不能存相同标签"),t.postForm.up_tags=[],t.postForm.down_tags=[],a=!0;break}if(a)return!1;Object(p.a)(t.postForm).then(function(e){t.$notify({title:"成功",message:e.data.data.message,type:"success",duration:2e3}),setTimeout(function(){t.$router.push("/tag/list")},1e3)}).catch(function(e){t.$notify({title:"失败",message:"操作失败",type:"danger",duration:2e3})}),t.postForm.status="published",t.loading=!1})},getRemoteTagList:function(t){var e=this;Object(m.e)(t).then(function(t){t.data.data.data&&(e.TagListOptions=t.data.data.data)})}}},_=(a("yFR9"),a("KHd+")),v=Object(_.a)(b,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"createPost-container"},[a("el-form",{ref:"postForm",staticClass:"form-container",attrs:{model:t.postForm,rules:t.rules}},[a("sticky",{attrs:{"class-name":"sub-navbar"}},[a("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"margin-left":"10px"},attrs:{type:"success"},on:{click:t.submitForm}},[t._v("保存\n ")])],1),t._v(" "),a("div",{staticClass:"createPost-main-container"},[a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"name"}},[a("MDinput",{attrs:{maxlength:100,name:"name",required:""},model:{value:t.postForm.name,callback:function(e){t.$set(t.postForm,"name",e)},expression:"postForm.name"}},[t._v("\n 标签名称\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("div",{staticClass:"postInfo-container"},[a("el-row",[a("el-col",{attrs:{span:12}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"20px"},attrs:{"label-width":"75px",label:"标签ID:",prop:"position"}},[a("el-input",{staticClass:"article-textarea",staticStyle:{width:"300px"},attrs:{rows:1,type:"number",disabled:""},model:{value:t.postForm.id,callback:function(e){t.$set(t.postForm,"id",e)},expression:"postForm.id"}})],1):t._e()],1),t._v(" "),a("el-col",{attrs:{span:12}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"20px"},attrs:{"label-width":"75px",label:"创建时间:",prop:"position"}},[a("el-input",{staticClass:"article-textarea",staticStyle:{width:"300px"},attrs:{rows:1,type:"text",disabled:""},model:{value:t.postForm.create_time,callback:function(e){t.$set(t.postForm,"create_time",e)},expression:"postForm.create_time"}})],1):t._e()],1)],1)],1)])],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{staticClass:"postInfo-container-item",attrs:{"label-width":"75px",label:"上级标签:"}},[a("el-select",{staticStyle:{width:"70%"},attrs:{"remote-method":t.getRemoteTagList,filterable:"",remote:"",multiple:"","value-key":"id",placeholder:"搜索标签"},model:{value:t.postForm.up_tags,callback:function(e){t.$set(t.postForm,"up_tags",e)},expression:"postForm.up_tags"}},t._l(t.TagListOptions,function(t,e){return a("el-option",{key:t+e,attrs:{label:t.name,value:t.id}})}))],1)],1),t._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{staticClass:"postInfo-container-item",attrs:{"label-width":"75px",label:"下级标签:"}},[a("el-select",{staticStyle:{width:"70%"},attrs:{"remote-method":t.getRemoteTagList,multiple:"",filterable:"",remote:"","reserve-keyword":"",placeholder:"搜索标签",loading:t.loading,"value-key":"id"},model:{value:t.postForm.down_tags,callback:function(e){t.$set(t.postForm,"down_tags",e)},expression:"postForm.down_tags"}},t._l(t.TagListOptions,function(t,e){return a("el-option",{key:t+e,attrs:{label:t.name,value:t.id}})}))],1)],1)],1),t._v(" "),a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{"label-width":"75px",label:"标签简介:",prop:"desc"}},[a("el-input",{staticClass:"article-textarea",attrs:{rows:1,type:"textarea",autosize:"",placeholder:"请输入内容"},model:{value:t.postForm.description,callback:function(e){t.$set(t.postForm,"description",e)},expression:"postForm.description"}}),t._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:t.contentShortLength,expression:"contentShortLength"}],staticClass:"word-counter"},[t._v(t._s(t.contentShortLength)+"字")])],1)],1)],1)],1)},[],!1,null,"0f1b55b8",null);v.options.__file="TagDetail.vue";e.a=v.exports},S2fK:function(t,e,a){"use strict";a.r(e);var o={name:"EditTag",components:{TagDetail:a("EBwg").a}},r=a("KHd+"),s=Object(r.a)(o,function(){var t=this.$createElement;return(this._self._c||t)("tag-detail",{attrs:{"is-edit":!0}})},[],!1,null,null,null);s.options.__file="edit.vue";e.default=s.exports},gg54:function(t,e,a){"use strict";a.d(e,"g",function(){return r}),a.d(e,"c",function(){return s}),a.d(e,"e",function(){return n}),a.d(e,"d",function(){return i}),a.d(e,"b",function(){return l}),a.d(e,"a",function(){return c}),a.d(e,"f",function(){return u});var o=a("t3Un");function r(t){return Object(o.a)({url:"/api/search/user",method:"get",params:{name:t}})}function s(t){return Object(o.a)({url:"/api/search/group",method:"get",params:{name:t}})}function n(t){return Object(o.a)({url:"/api/search/tag",method:"get",params:{name:t}})}function i(t){return Object(o.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function l(t){return Object(o.a)({url:"/api/search/city",method:"get",params:{name:t}})}function c(t){return Object(o.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function u(t){return Object(o.a)({url:"/api/search/topic",method:"get",params:{name:t}})}},rVvD:function(t,e,a){},yFR9:function(t,e,a){"use strict";var o=a("rVvD");a.n(o).a}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6504"],{"0o2y":function(t,e,a){"use strict";a.d(e,"c",function(){return r}),a.d(e,"b",function(){return s}),a.d(e,"a",function(){return n}),a.d(e,"d",function(){return i});var o=a("t3Un");function r(t){return Object(o.a)({url:"/api/tag/list",method:"get",params:t})}function s(t){return Object(o.a)({url:"/api/tag/list/update",method:"post",data:t})}function n(t){return Object(o.a)({url:"/api/tag/create",method:"post",data:t})}function i(t){return Object(o.a)({url:"/api/tag/detail",method:"get",params:{id:t}})}},"7qcn":function(t,e,a){},EBwg:function(t,e,a){"use strict";var o=a("P2sY"),r=a.n(o),s=a("EJiy"),n=a.n(s),i=a("m1cH"),l=a.n(i),c=a("Grqa"),u=a("uARZ"),p=a("0o2y"),m=a("gg54"),d=a("7Qib");function g(t,e){for(var a=[],o=0;o<t.length;o++)Object(d.c)(e,t[o].name)&&(a.push(t[o].id),Object(d.f)(e,t[o].name));return a.push.apply(a,l()(e)),a.join(",")}function f(t){for(var e=0;e<t.length;e++)""!=t[e]&&null!=t[e]&&void 0!=n()(t[e])||(t.splice(e,1),e-=1);return t}var h={status:"draft",name:"",description:"",up_tags:[],down_tags:[]},b={name:"TagDetail",components:{MDinput:c.a,Sticky:u.a},props:{isEdit:{type:Boolean,default:!1}},data:function(){var t=this;return{postForm:r()({},h),loading:!1,TagListOptions:[],rules:{name:[{validator:function(e,a,o){""===a?(t.$message({message:e.field+"为必传项",type:"error"}),o(new Error(e.field+"为必传项"))):o()},trigger:"blur"}]},tempRoute:{},temparray:{up_tags:[],down_tags:[]}}},computed:{contentShortLength:function(){return this.postForm.description.length}},created:function(){if(this.isEdit){var t=this.$route.params&&this.$route.params.id;this.fetchData(t)}else this.postForm=r()({},h);this.tempRoute=r()({},this.$route)},methods:{fetchData:function(t){var e=this;Object(p.d)(t).then(function(t){for(var a=t.data.data.data,o=[],r=[],s=0;s<a.up_tags.length;s++)o.push(a.up_tags[s].name),e.temparray.up_tags.push(a.up_tags[s]);for(var n=0;n<a.down_tags.length;n++)r.push(a.down_tags[n].name),e.temparray.down_tags.push(a.down_tags[n]);a.down_tags=r,a.up_tags=o,e.postForm=a,console.log(e.postForm)}).catch(function(t){console.log(t)})},submitForm:function(){var t=this;this.$refs.postForm.validate(function(e){if(!e)return console.log("error submit!!"),!1;t.loading=!0,t.isEdit?(t.postForm.up_tags=g(t.temparray.up_tags,t.postForm.up_tags),t.postForm.down_tags=g(t.temparray.down_tags,t.postForm.down_tags)):(t.postForm.up_tags=t.postForm.up_tags.join(","),t.postForm.down_tags=t.postForm.down_tags.join(","));for(var a=!1,o=f(t.postForm.up_tags.split(",")),r=f(t.postForm.down_tags.split(",")),s=0;s<o.length;s++)if(Object(d.c)(r,o[s])){t.$message.error("上下级标签不能存相同标签"),t.postForm.up_tags=[],t.postForm.down_tags=[],a=!0;break}if(a)return!1;Object(p.a)(t.postForm).then(function(e){t.$notify({title:"成功",message:e.data.data.message,type:"success",duration:2e3}),setTimeout(function(){t.$router.push("/tag/list")},1e3)}).catch(function(e){t.$notify({title:"失败",message:"操作失败",type:"danger",duration:2e3})}),t.postForm.status="published",t.loading=!1})},getRemoteTagList:function(t){var e=this;Object(m.e)(t).then(function(t){t.data.data.data&&(e.TagListOptions=t.data.data.data)})}}},_=(a("yJqR"),a("KHd+")),v=Object(_.a)(b,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"createPost-container"},[a("el-form",{ref:"postForm",staticClass:"form-container",attrs:{model:t.postForm,rules:t.rules}},[a("sticky",{attrs:{"class-name":"sub-navbar"}},[a("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"margin-left":"10px"},attrs:{type:"success"},on:{click:t.submitForm}},[t._v("保存\n ")])],1),t._v(" "),a("div",{staticClass:"createPost-main-container"},[a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"name"}},[a("MDinput",{attrs:{maxlength:100,name:"name",required:""},model:{value:t.postForm.name,callback:function(e){t.$set(t.postForm,"name",e)},expression:"postForm.name"}},[t._v("\n 标签名称\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("div",{staticClass:"postInfo-container"},[a("el-row",[a("el-col",{attrs:{span:12}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"20px"},attrs:{"label-width":"75px",label:"标签ID:",prop:"position"}},[a("el-input",{staticClass:"article-textarea",staticStyle:{width:"300px"},attrs:{rows:1,type:"number",disabled:""},model:{value:t.postForm.id,callback:function(e){t.$set(t.postForm,"id",e)},expression:"postForm.id"}})],1):t._e()],1),t._v(" "),a("el-col",{attrs:{span:12}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"20px"},attrs:{"label-width":"75px",label:"创建时间:",prop:"position"}},[a("el-input",{staticClass:"article-textarea",staticStyle:{width:"300px"},attrs:{rows:1,type:"text",disabled:""},model:{value:t.postForm.create_time,callback:function(e){t.$set(t.postForm,"create_time",e)},expression:"postForm.create_time"}})],1):t._e()],1)],1)],1)])],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{staticClass:"postInfo-container-item",attrs:{"label-width":"75px",label:"上级标签:"}},[a("el-select",{staticStyle:{width:"70%"},attrs:{"remote-method":t.getRemoteTagList,filterable:"",remote:"",multiple:"","value-key":"id",placeholder:"搜索标签"},model:{value:t.postForm.up_tags,callback:function(e){t.$set(t.postForm,"up_tags",e)},expression:"postForm.up_tags"}},t._l(t.TagListOptions,function(t,e){return a("el-option",{key:t+e,attrs:{label:t.name,value:t.id}})}))],1)],1),t._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{staticClass:"postInfo-container-item",attrs:{"label-width":"75px",label:"下级标签:"}},[a("el-select",{staticStyle:{width:"70%"},attrs:{"remote-method":t.getRemoteTagList,multiple:"",filterable:"",remote:"","reserve-keyword":"",placeholder:"搜索标签",loading:t.loading,"value-key":"id"},model:{value:t.postForm.down_tags,callback:function(e){t.$set(t.postForm,"down_tags",e)},expression:"postForm.down_tags"}},t._l(t.TagListOptions,function(t,e){return a("el-option",{key:t+e,attrs:{label:t.name,value:t.id}})}))],1)],1)],1),t._v(" "),a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{"label-width":"75px",label:"标签简介:",prop:"desc"}},[a("el-input",{staticClass:"article-textarea",attrs:{rows:1,type:"textarea",autosize:"",placeholder:"请输入内容"},model:{value:t.postForm.description,callback:function(e){t.$set(t.postForm,"description",e)},expression:"postForm.description"}}),t._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:t.contentShortLength,expression:"contentShortLength"}],staticClass:"word-counter"},[t._v(t._s(t.contentShortLength)+"字")])],1)],1)],1)],1)},[],!1,null,"61f14248",null);v.options.__file="TagDetail.vue";e.a=v.exports},"STa+":function(t,e,a){"use strict";a.r(e);var o={name:"EditTag",components:{TagDetail:a("EBwg").a}},r=a("KHd+"),s=Object(r.a)(o,function(){var t=this.$createElement;return(this._self._c||t)("tag-detail",{attrs:{"is-edit":!1}})},[],!1,null,null,null);s.options.__file="create.vue";e.default=s.exports},gg54:function(t,e,a){"use strict";a.d(e,"g",function(){return r}),a.d(e,"c",function(){return s}),a.d(e,"e",function(){return n}),a.d(e,"d",function(){return i}),a.d(e,"b",function(){return l}),a.d(e,"a",function(){return c}),a.d(e,"f",function(){return u});var o=a("t3Un");function r(t){return Object(o.a)({url:"/api/search/user",method:"get",params:{name:t}})}function s(t){return Object(o.a)({url:"/api/search/group",method:"get",params:{name:t}})}function n(t){return Object(o.a)({url:"/api/search/tag",method:"get",params:{name:t}})}function i(t){return Object(o.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function l(t){return Object(o.a)({url:"/api/search/city",method:"get",params:{name:t}})}function c(t){return Object(o.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function u(t){return Object(o.a)({url:"/api/search/topic",method:"get",params:{name:t}})}},yJqR:function(t,e,a){"use strict";var o=a("7qcn");a.n(o).a}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-65042"],{"0o2y":function(t,e,a){"use strict";a.d(e,"c",function(){return s}),a.d(e,"b",function(){return r}),a.d(e,"a",function(){return n}),a.d(e,"d",function(){return i});var o=a("t3Un");function s(t){return Object(o.a)({url:"/api/tag/list",method:"get",params:t})}function r(t){return Object(o.a)({url:"/api/tag/list/update",method:"post",data:t})}function n(t){return Object(o.a)({url:"/api/tag/create",method:"post",data:t})}function i(t){return Object(o.a)({url:"/api/tag/detail",method:"get",params:{id:t}})}},"7qcn":function(t,e,a){},EBwg:function(t,e,a){"use strict";var o=a("P2sY"),s=a.n(o),r=a("EJiy"),n=a.n(r),i=a("m1cH"),l=a.n(i),c=a("Grqa"),u=a("uARZ"),p=a("0o2y"),m=a("gg54"),d=a("7Qib");function g(t,e){for(var a=[],o=0;o<t.length;o++)Object(d.c)(e,t[o].name)&&(a.push(t[o].id),Object(d.f)(e,t[o].name));return a.push.apply(a,l()(e)),a.join(",")}function f(t){for(var e=0;e<t.length;e++)""!=t[e]&&null!=t[e]&&void 0!=n()(t[e])||(t.splice(e,1),e-=1);return t}var h={status:"draft",name:"",description:"",up_tags:[],down_tags:[]},b={name:"TagDetail",components:{MDinput:c.a,Sticky:u.a},props:{isEdit:{type:Boolean,default:!1}},data:function(){var t=this;return{postForm:s()({},h),loading:!1,TagListOptions:[],rules:{name:[{validator:function(e,a,o){""===a?(t.$message({message:e.field+"为必传项",type:"error"}),o(new Error(e.field+"为必传项"))):o()},trigger:"blur"}]},tempRoute:{},temparray:{up_tags:[],down_tags:[]}}},computed:{contentShortLength:function(){return this.postForm.description.length}},created:function(){if(this.isEdit){var t=this.$route.params&&this.$route.params.id;this.fetchData(t)}else this.postForm=s()({},h);this.tempRoute=s()({},this.$route)},methods:{fetchData:function(t){var e=this;Object(p.d)(t).then(function(t){for(var a=t.data.data.data,o=[],s=[],r=0;r<a.up_tags.length;r++)o.push(a.up_tags[r].name),e.temparray.up_tags.push(a.up_tags[r]);for(var n=0;n<a.down_tags.length;n++)s.push(a.down_tags[n].name),e.temparray.down_tags.push(a.down_tags[n]);a.down_tags=s,a.up_tags=o,e.postForm=a,console.log(e.postForm)}).catch(function(t){console.log(t)})},submitForm:function(){var t=this;this.$refs.postForm.validate(function(e){if(!e)return console.log("error submit!!"),!1;t.loading=!0,t.isEdit?(t.postForm.up_tags=g(t.temparray.up_tags,t.postForm.up_tags),t.postForm.down_tags=g(t.temparray.down_tags,t.postForm.down_tags)):(t.postForm.up_tags=t.postForm.up_tags.join(","),t.postForm.down_tags=t.postForm.down_tags.join(","));for(var a=!1,o=f(t.postForm.up_tags.split(",")),s=f(t.postForm.down_tags.split(",")),r=0;r<o.length;r++)if(Object(d.c)(s,o[r])){t.$message.error("上下级标签不能存相同标签"),t.postForm.up_tags=[],t.postForm.down_tags=[],a=!0;break}if(a)return!1;Object(p.a)(t.postForm).then(function(e){t.$notify({title:"成功",message:e.data.data.message,type:"success",duration:2e3}),setTimeout(function(){t.$router.push("/tag/list")},1e3)}).catch(function(e){t.$notify({title:"失败",message:"操作失败",type:"danger",duration:2e3})}),t.postForm.status="published",t.loading=!1})},getRemoteTagList:function(t){var e=this;Object(m.e)(t).then(function(t){t.data.data.data&&(e.TagListOptions=t.data.data.data)})}}},_=(a("yJqR"),a("KHd+")),v=Object(_.a)(b,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"createPost-container"},[a("el-form",{ref:"postForm",staticClass:"form-container",attrs:{model:t.postForm,rules:t.rules}},[a("sticky",{attrs:{"class-name":"sub-navbar"}},[a("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"margin-left":"10px"},attrs:{type:"success"},on:{click:t.submitForm}},[t._v("保存\n ")])],1),t._v(" "),a("div",{staticClass:"createPost-main-container"},[a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"name"}},[a("MDinput",{attrs:{maxlength:100,name:"name",required:""},model:{value:t.postForm.name,callback:function(e){t.$set(t.postForm,"name",e)},expression:"postForm.name"}},[t._v("\n 标签名称\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("div",{staticClass:"postInfo-container"},[a("el-row",[a("el-col",{attrs:{span:12}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"20px"},attrs:{"label-width":"75px",label:"标签ID:",prop:"position"}},[a("el-input",{staticClass:"article-textarea",staticStyle:{width:"300px"},attrs:{rows:1,type:"number",disabled:""},model:{value:t.postForm.id,callback:function(e){t.$set(t.postForm,"id",e)},expression:"postForm.id"}})],1):t._e()],1),t._v(" "),a("el-col",{attrs:{span:12}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"20px"},attrs:{"label-width":"75px",label:"创建时间:",prop:"position"}},[a("el-input",{staticClass:"article-textarea",staticStyle:{width:"300px"},attrs:{rows:1,type:"text",disabled:""},model:{value:t.postForm.create_time,callback:function(e){t.$set(t.postForm,"create_time",e)},expression:"postForm.create_time"}})],1):t._e()],1)],1)],1)])],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{staticClass:"postInfo-container-item",attrs:{"label-width":"75px",label:"上级标签:"}},[a("el-select",{staticStyle:{width:"70%"},attrs:{"remote-method":t.getRemoteTagList,filterable:"",remote:"",multiple:"","value-key":"id",placeholder:"搜索标签"},model:{value:t.postForm.up_tags,callback:function(e){t.$set(t.postForm,"up_tags",e)},expression:"postForm.up_tags"}},t._l(t.TagListOptions,function(t,e){return a("el-option",{key:t+e,attrs:{label:t.name,value:t.id}})}))],1)],1),t._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{staticClass:"postInfo-container-item",attrs:{"label-width":"75px",label:"下级标签:"}},[a("el-select",{staticStyle:{width:"70%"},attrs:{"remote-method":t.getRemoteTagList,multiple:"",filterable:"",remote:"","reserve-keyword":"",placeholder:"搜索标签",loading:t.loading,"value-key":"id"},model:{value:t.postForm.down_tags,callback:function(e){t.$set(t.postForm,"down_tags",e)},expression:"postForm.down_tags"}},t._l(t.TagListOptions,function(t,e){return a("el-option",{key:t+e,attrs:{label:t.name,value:t.id}})}))],1)],1)],1),t._v(" "),a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{"label-width":"75px",label:"标签简介:",prop:"desc"}},[a("el-input",{staticClass:"article-textarea",attrs:{rows:1,type:"textarea",autosize:"",placeholder:"请输入内容"},model:{value:t.postForm.description,callback:function(e){t.$set(t.postForm,"description",e)},expression:"postForm.description"}}),t._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:t.contentShortLength,expression:"contentShortLength"}],staticClass:"word-counter"},[t._v(t._s(t.contentShortLength)+"字")])],1)],1)],1)],1)},[],!1,null,"61f14248",null);v.options.__file="TagDetail.vue";e.a=v.exports},S2fK:function(t,e,a){"use strict";a.r(e);var o={name:"EditTag",components:{TagDetail:a("EBwg").a}},s=a("KHd+"),r=Object(s.a)(o,function(){var t=this.$createElement;return(this._self._c||t)("tag-detail",{attrs:{"is-edit":!0}})},[],!1,null,null,null);r.options.__file="edit.vue";e.default=r.exports},gg54:function(t,e,a){"use strict";a.d(e,"g",function(){return s}),a.d(e,"c",function(){return r}),a.d(e,"e",function(){return n}),a.d(e,"d",function(){return i}),a.d(e,"b",function(){return l}),a.d(e,"a",function(){return c}),a.d(e,"f",function(){return u});var o=a("t3Un");function s(t){return Object(o.a)({url:"/api/search/user",method:"get",params:{name:t}})}function r(t){return Object(o.a)({url:"/api/search/group",method:"get",params:{name:t}})}function n(t){return Object(o.a)({url:"/api/search/tag",method:"get",params:{name:t}})}function i(t){return Object(o.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function l(t){return Object(o.a)({url:"/api/search/city",method:"get",params:{name:t}})}function c(t){return Object(o.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function u(t){return Object(o.a)({url:"/api/search/topic",method:"get",params:{name:t}})}},yJqR:function(t,e,a){"use strict";var o=a("7qcn");a.n(o).a}}]);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment