chunk-2657.d1227540.js 6.2 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2657"],{"8qzN":function(t,e,a){"use strict";a.r(e);var s="",i="",l={components:{wechat_customers_label_side:a("dE/r").a},data:function(){return{label_name:"",group_id:"",group_arr:[],listData:[],page:1,total_page:0,delLabelTipsShow:!1,delLabelObj:{}}},created:function(){s="",i="",this.$route.params&&this.$route.params.group_id&&(this.group_id=this.$route.params.group_id,i=this.$route.params.group_id),this.getTagList(),this.getLabelList(),console.log(this.$route.params)},methods:{pageChange:function(t){this.page=t,this.getTagList()},handSearch:function(){s=this.label_name||"",i=this.group_id||"",this.page=1,this.getTagList()},delLabelShow:function(t){this.delLabelTipsShow=!0,this.delLabelObj=t.row,this.delLabelObj.$index=t.$index,console.log(item)},delLabel:function(){var t=this;this.delLabelTipsShow=!1,$http.pc_get("plugin/WorkWechatTag/deleteTag",{id:this.delLabelObj.id},"loading").then(function(e){1===e.result?(e.msg&&t.$message.success(e.msg),t.listData.splice(t.delLabelObj.$index,1)):e.msg&&t.$message.error(e.msg),t.delLabelTipsShow=!1}).catch(function(t){console.error(t)})},getTagList:function(){var t=this,e={page:this.page};""!=s&&(e.name=s),""!=i&&(e.group_id=i),$http.pc_get("plugin/WorkWechatTag/tagList",e,"loading").then(function(e){1===e.result?(t.listData=e.data.tag_list.data,t.total_page=e.data.tag_list.last_page):e.msg&&t.$message.error(e.msg)}).catch(function(t){console.error(t)})},getLabelList:function(){var t=this;$http.pc_get("plugin/WorkWechatTag/groupChooseList",{},"loading").then(function(e){1===e.result?t.group_arr=e.data:e.msg&&t.$message.error(e.msg)}).catch(function(t){console.error(t)})},gotoLabelEdit:function(t){var e={};t>0&&(e.label_id=t),this.$router.push(this.fun.getUrl("wechatCustomersLabelEdit",{},e))},seeCustomer:function(t){this.$router.push(this.fun.getUrl("wechatCustomersIndex",{tag_id:t},{}))},refreshWechatTag:function(){var t=this;$http.pc_get("plugin/WorkWechatTag/refreshWechatTag",{},"loading").then(function(e){1===e.result?e.msg&&t.$message.success(e.msg):e.msg&&t.$message.error(e.msg)}).catch(function(t){console.error(t)})},refreshShopTag:function(){var t=this;$http.pc_get("plugin/WorkWechatTag/refreshShopTag",{},"loading").then(function(e){1===e.result?e.msg&&t.$message.success(e.msg):e.msg&&t.$message.error(e.msg)}).catch(function(t){console.error(t)})}}},n=(a("LJxY"),a("KHd+")),o=Object(n.a)(l,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"all"},[a("wechat_customers_label_side",{attrs:{defaultActive:"2"}}),t._v(" "),a("div",{attrs:{id:"app"}},[a("div",{staticClass:"header"},[a("div",{staticClass:"vue-main-title"},[a("div",{staticClass:"vue-main-title-left"}),t._v(" "),a("div",{staticClass:"vue-main-title-content customers_name title"},[t._v("\n 标签管理\n ")]),t._v(" "),a("div",{staticClass:"add_label_btn"},[a("el-button",{attrs:{type:"primary",size:"mini",plain:""},on:{click:t.gotoLabelEdit}},[a("i",{staticClass:"el-icon-plus"}),t._v("添加标签")])],1)]),t._v(" "),a("div",{staticClass:"search"},[a("el-input",{staticStyle:{width:"150px","margin-right":"10px"},attrs:{placeholder:"标签名字"},model:{value:t.label_name,callback:function(e){t.label_name=e},expression:"label_name"}}),t._v(" "),a("el-select",{staticStyle:{width:"120px","margin-right":"50px"},attrs:{placeholder:"标签分类",clearable:""},model:{value:t.group_id,callback:function(e){t.group_id=e},expression:"group_id"}},t._l(t.group_arr,function(t){return a("el-option",{key:t.group_id,attrs:{label:t.group_name,value:t.group_id}})})),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.handSearch}},[t._v("搜索")]),t._v(" "),a("div",{staticClass:"syncBtn"},[a("el-button",{attrs:{type:"primary"},on:{click:t.refreshWechatTag}},[t._v("同步企业微信标签")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.refreshShopTag}},[t._v("同步商城标签")])],1)],1)]),t._v(" "),a("div",{staticClass:"list_container"},[t._m(0),t._v(" "),a("div",{staticClass:"list_table"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.listData,"header-cell-style":{"text-align":"center"},"cell-style":{"text-align":"center"}}},[a("el-table-column",{attrs:{prop:"id",label:"ID",width:"180"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"标签名称",width:"180"}}),t._v(" "),a("el-table-column",{attrs:{prop:"group_name",label:"标签组"}}),t._v(" "),a("el-table-column",{attrs:{prop:"customer_count",label:"标签客户数量"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.gotoLabelEdit(e.row.id)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.seeCustomer(e.row.tag_id)}}},[t._v("查看客户")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.delLabelShow(e)}}},[t._v("删除")])]}}])})],1)],1)])]),t._v(" "),a("el-dialog",{attrs:{title:"操作提示",visible:t.delLabelTipsShow,width:"30%",center:""},on:{"update:visible":function(e){t.delLabelTipsShow=e}}},[a("span",[t._v("您确定要删除当前标签嘛!!!")]),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{staticStyle:{"margin-right":"10px"},attrs:{type:"primary"},on:{click:t.delLabel}},[t._v("\n 确定\n ")]),t._v(" "),a("el-button",{attrs:{type:"info"},on:{click:function(e){t.delLabelTipsShow=!1}}},[t._v("\n 取消\n ")])],1)]),t._v(" "),a("div",{staticClass:"vue-page"},[a("el-row",[a("el-col",{attrs:{align:"right"}},[a("el-pagination",{attrs:{layout:"prev, pager, next,jumper","page-count":t.total_page,background:""},on:{"current-change":t.pageChange}})],1)],1)],1)],1)},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"vue-main-title"},[e("div",{staticClass:"vue-main-title-left"}),this._v(" "),e("div",{staticClass:"vue-main-title-content customers_name title"},[this._v("\n 标签列表\n ")])])}],!1,null,"73cc3234",null);o.options.__file="management.vue";e.default=o.exports},BFUU:function(t,e,a){},LJxY:function(t,e,a){"use strict";var s=a("BFUU");a.n(s).a}}]);