(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-05c1df34"],{"027e":function(e,t,a){"use strict";a("e32d")},a771:function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"tag-span-wraps"},[s("h2",[e._v("自定义标签")]),s("p",[e._v(" 支持自定义添加标签，为文档分配标签后，快速查找对应文档数据并在线预览 ")]),s("div",[s("el-button",{attrs:{type:"primary",round:"",icon:"el-icon-plus",size:"medium"},on:{click:e.addTagBtn}},[e._v("添加标签")]),s("el-button",{attrs:{round:"",icon:"el-icon-delete",size:"medium"},on:{click:e.removeTagBtn}},[e._v("删除标签")])],1)]),s("div",{staticClass:"tag-span-list"},[s("el-row",{attrs:{gutter:20}},e._l(e.tagData,(function(t,i){return s("el-col",{key:i,attrs:{span:4},nativeOn:{click:function(a){return e.handleTagSpanClickEvent(t,i)}}},[s("i",{class:t.icon}),s("span",[e._v(e._s(t.tagName))]),t.selected?s("img",{staticClass:"select",attrs:{src:a("aa42"),alt:""}}):e._e()])})),1)],1),s("el-pagination",{attrs:{background:"",layout:"prev, pager, next","page-size":e.query.pageSize,total:e.total},on:{"current-change":e.pageChanged}}),s("AddtagType",{ref:"tagTypeDialog",on:{refreshList:e.refreshList}})],1)},i=[],n=(a("c975"),a("d81d"),a("e853")),r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-dialog",{attrs:{title:"添加标签",visible:e.disableHidden},on:{"update:visible":function(t){e.disableHidden=t}}},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"标签名称",prop:"tagName"}},[a("el-input",{attrs:{placeholder:"请输入标签名称",size:"small"},model:{value:e.ruleForm.tagName,callback:function(t){e.$set(e.ruleForm,"tagName",t)},expression:"ruleForm.tagName"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},on:{click:e.cancleEvents}},[e._v("取 消")]),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.onSubmits}},[e._v("确 定")])],1)],1)],1)},c=[],l={data:function(){return{disableHidden:!1,ruleForm:{tagName:""},rules:{tagName:[{required:!0,message:"标签名称不能为空",trigger:"blur"}]}}},methods:{init:function(){this.ruleForm.tagName=""},onSubmits:function(){var e=this;this.$refs["ruleForm"].validate((function(t){t&&n["c"].addTagData({tagName:e.ruleForm.tagName}).then((function(t){0==t.code?(e.$message.success("添加成功"),e.cancleEvents(),e.$emit("refreshList")):(e.$message.error(t.message),e.cancleEvents())}))["catch"]((function(t){e.$message.error(t.message),e.cancleEvents()}))}))},cancleEvents:function(){this.disableHidden=!1}}},o=l,u=a("2877"),d=Object(u["a"])(o,r,c,!1,null,null,null),g=d.exports,m={data:function(){return{total:0,query:{pageNum:1,pageSize:10},selectDatas:[]}},components:{AddtagType:g},inject:["editRefreshLeftMenu"],computed:{tagData:function(){var e=this,t=this.$store.state.dict.tagList;return t.map((function(t){e.$set(t,"selected",!1)})),t}},mounted:function(){},methods:{addTagBtn:function(){var e=this;this.$refs.tagTypeDialog.disableHidden=!0,this.$nextTick((function(){e.$refs.tagTypeDialog.init()}))},removeTagBtn:function(){var e=this,t=[];this.tagData.map((function(e){t.push(e.selected)})),-1==t.indexOf(!0)&&(this.selectDatas=[]),0!=this.selectDatas.length?this.selectDatas.length>1?this.$message.error("只能选择一条数据"):n["c"].removeTagData(this.selectDatas[0].id).then((function(t){0==t.code?(e.$message.success("删除成功"),e.$store.dispatch("dict/getTagList",e.query),e.editRefreshLeftMenu()):e.$message.error(t.message)}))["catch"]((function(t){e.$message.error(t.message)})):this.$message.error("请选择数据")},pageChanged:function(e){this.query.pageNum=e,this.$store.dispatch("dict/getTagList",this.query)},refreshList:function(){this.$store.dispatch("dict/getTagList",this.query),this.editRefreshLeftMenu()},handleTagSpanClickEvent:function(e,t){this.selectDatas=[],this.tagData.map((function(t){t.id==e.id?t.selected=!t.selected:t.selected=!1})),this.selectDatas.push(e)}}},h=m,f=(a("027e"),Object(u["a"])(h,s,i,!1,null,"5a3de6cf",null));t["default"]=f.exports},aa42:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAA+UlEQVQ4T52SsU4CQRCGv/EFqCGxoqAxIYHGmFjcoSaQXEyg08SSWkoaEistWE2MDRUNJSbUWlnRQcEb+BoqQxbiHXh73MUpttj83/z/7I6QsS6MHn7BvcAVIBZbH/vK6+udCD2XJhE+M3q8hOm+xk64ZnSicJmWKgZ7RhcCR2lgbOasjr+NQ+csM1qoVYHX2QYPYd+opkV9aEIhBzfDLfjvd5wUIZ+LHKy0fQpBGYKXyGLt7HJ978DgA8Yz8EvQbcD50242sZvzDZ+uyLbBZA7NCtQe4wrxjI4ErpPmfbuF+jP8LB2wb9Rep66pcz2zvHJSKvk3fEB1BSuURkhRirnbAAAAAElFTkSuQmCC"},e32d:function(e,t,a){}}]);
//# sourceMappingURL=chunk-05c1df34.10b23aac.js.map