webpackJsonp([16],{"G/on":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a("5QTb"),s=(a("Mk6G"),a("3E4D")),n=a("Ch4/"),i=(a("PI0u"),a("P9l9")),o={name:"platformTagList",data:function(){return{tagLibName:"platformTag",tagSearch:"",tagTableData:[],selTagTableData:[],currentPage:1,pageSize:20,total:0,currentGroupId:0}},methods:{toAddMyTagLib:function(t,e){var a={};if("mult"===t){if(!this.selTagTableData.length)return this.$message.error({message:"请选择标签"}),!1;a.tagIds=[],this.selTagTableData.forEach(function(t,e){a.tagIds.push(t.tagId)}),a.tagIds=a.tagIds.join(","),this.addByTagId("addByTagIds",a)}else a.tagId=e,this.addByTagId("addByTagId",a)},addByTagId:function(t,e){var a=this;Object(i.a)("/enterpriseMemberTag/"+t,e).then(function(t){var e=t.data;if(1==e.errorCode)return s.a.showmsg("添加成功","success"),void a.getTagList();n.a.errorMsg(e)}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},searchEnterFun:function(t){this.currentPage=1,this.getTagList()},clearSearch:function(){this.currentPage=1,this.getTagList()},handleSelectChange:function(t){this.selTagTableData=t},handleSizeChange:function(t){this.pageSize=t,this.getTagList()},handleCurrentChange:function(t){this.currentPage=t,this.$route.fullPath.includes("?")&&this.$router.push(this.$route.path+"?tagLevelGroupId="+this.$route.query.tagLevelGroupId+"&currentPage="+t),this.getTagList()},getTagList:function(t){var e=this,a={tagName:e.tagSearch,tagLevelGroupId:e.currentGroupId,pageNum:e.currentPage,pageSize:e.pageSize};Object(i.a)("/memberTag/platformTagPageList",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.tagTableData=a.result.result,void(e.total=a.result.totalCount);n.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getUrlParams:function(){this.tagSearch=this.$route.query.searchName?this.$route.query.searchName:"",this.currentGroupId=this.$route.query.tagLevelGroupId?this.$route.query.tagLevelGroupId:0,this.currentPage=this.$route.query.currentPage?parseInt(this.$route.query.currentPage):1,this.getTagList()}},watch:{$route:{handler:function(t,e){this.getUrlParams()},deep:!0}},mounted:function(){this.getUrlParams()},components:{tagCategory:r.a}},l={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"platformTagList-wrap common-wrap"},[a("div",{staticClass:"right-content"},[a("div",{staticClass:"right-box"},[a("div",{staticClass:"common-wrap__cateTags"},[a("tag-category",{attrs:{tagLibName:t.tagLibName}})],1),t._v(" "),a("div",{staticClass:"common-wrap__opt"},[a("el-input",{staticClass:"w-184",attrs:{placeholder:"搜索标签","prefix-icon":"el-icon-search",clearable:""},on:{clear:t.clearSearch},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.searchEnterFun(e)}},model:{value:t.tagSearch,callback:function(e){t.tagSearch=e},expression:"tagSearch"}}),t._v(" "),a("el-button",{staticClass:"fr",attrs:{type:"primary"},on:{click:function(e){return t.toAddMyTagLib("mult")}}},[t._v("添加至我的标签库")])],1),t._v(" "),a("div",{staticClass:"common-wrap__table m-t-20"},[a("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.tagTableData,"tooltip-effect":"dark"},on:{"selection-change":t.handleSelectChange}},[a("el-table-column",{attrs:{type:"selection"}}),t._v(" "),a("el-table-column",{attrs:{prop:"tagName",label:"标签名称","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"tagDescribe",label:"标签描述","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{label:"是否实时"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n              "+t._s(1==e.row.isActive?"实时":"非实时")+"\n            ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("router-link",{staticClass:"edit-btn el-button--text",attrs:{to:{path:"/platformTagDetail",query:{tagId:e.row.tagId,addFlag:e.row.isAdd,form:"notMyTag",navSign:"platformTag"}}}},[t._v("详情")]),t._v(" "),a("el-button",{staticClass:"p-l-10",attrs:{type:"text",size:"small",disabled:1==e.row.isAdd},on:{click:function(a){return t.toAddMyTagLib("single",e.row.tagId)}}},[t._v("\n                "+t._s(1==e.row.isAdd?"已":"")+"添加至我的标签库\n              ")])]}}])})],1)],1),t._v(" "),0!=t.tagTableData.length?a("div",{staticClass:"block common-wrap__page text-right"},[a("dm-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[10,20,30,40],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()])])])},staticRenderFns:[]};var c=a("VU/8")(o,l,!1,function(t){a("YceJ")},"data-v-e63bc8ae",null);e.default=c.exports},YceJ:function(t,e){}});