mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-11 01:52:49 +00:00
1 line
6.5 KiB
JavaScript
1 line
6.5 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-37a179d2"],{c350:function(t,e,a){"use strict";var i=a("dc0a"),n=a.n(i);n.a},dc0a:function(t,e,a){},dfd9: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",[a("div",{staticClass:"i-layout-page-header"},[a("div",{staticClass:"i-layout-page-header"},[a("span",{staticClass:"ivu-page-header-title"},[t._v(t._s(t.$route.meta.title))])])]),a("Row",{staticClass:"ivu-mt box-wrapper"},[a("Col",{staticClass:"left-wrapper",attrs:{span:"3"}},[a("Menu",{attrs:{theme:t.theme3,"active-name":t.sortName,width:"auto"}},[a("MenuGroup",t._l(t.labelSort,(function(e,i){return a("MenuItem",{key:i,staticClass:"menu-item",class:i===t.current?"showOn":"",attrs:{name:e.id},nativeOn:{click:function(a){return t.bindMenuItem(e,i)}}},[t._v("\n "+t._s(e.name)+"\n "),0!=i?a("div",{staticClass:"icon-box"},[a("Icon",{attrs:{type:"ios-more",size:"24"},on:{click:function(a){return a.stopPropagation(),t.showMenu(e)}}})],1):t._e(),0!=i?a("div",{directives:[{name:"show",rawName:"v-show",value:e.status,expression:"item.status"}],staticClass:"right-menu ivu-poptip-inner"},[a("div",{staticClass:"ivu-poptip-body",on:{click:function(a){return t.labelEdit(e)}}},[a("div",{staticClass:"ivu-poptip-body-content"},[a("div",{staticClass:"ivu-poptip-body-content-inner"},[t._v("编辑")])])]),a("div",{staticClass:"ivu-poptip-body",on:{click:function(a){return t.deleteSort(e,"删除分类",i)}}},[a("div",{staticClass:"ivu-poptip-body-content"},[a("div",{staticClass:"ivu-poptip-body-content-inner"},[t._v("删除")])])])]):t._e()])})),1)],1)],1),a("Col",{ref:"rightBox",attrs:{span:"21"}},[a("Card",{attrs:{bordered:!1,"dis-hover":""}},[a("Row",{attrs:{type:"flex"}},[a("Col",t._b({},"Col",t.grid,!1),[a("Button",{directives:[{name:"auth",rawName:"v-auth",value:["admin-user-label_add"],expression:"['admin-user-label_add']"}],attrs:{type:"primary",icon:"md-add"},on:{click:t.add}},[t._v("添加标签")]),a("Button",{directives:[{name:"auth",rawName:"v-auth",value:["admin-user-label_add"],expression:"['admin-user-label_add']"}],staticStyle:{"margin-left":"10px"},attrs:{type:"success",icon:"md-add"},on:{click:t.addSort}},[t._v("添加分类")])],1)],1),a("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.labelLists,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"icons",fn:function(t){var e=t.row;t.index;return[a("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.icon,expression:"row.icon"}]})])]}},{key:"action",fn:function(e){var i=e.row,n=e.index;return[a("a",{on:{click:function(e){return t.edit(i.id)}}},[t._v("修改")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.del(i,"删除分组",n)}}},[t._v("删除")])]}}])}),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.labelFrom.limit},on:{"on-change":t.pageChange}})],1)],1)],1)],1)],1)},n=[],r=(a("8e6e"),a("456d"),a("ac6a"),a("96cf"),a("3b8d")),s=a("bd86"),o=a("2f62"),l=a("c24f");function c(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function u(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?c(Object(a),!0).forEach((function(e){Object(s["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):c(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var d={name:"user_label",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,columns1:[{title:"ID",key:"id",align:"center",width:120},{title:"分类名称",key:"cate_name",align:"center"},{title:"标签名称",key:"label_name",align:"center"},{title:"操作",slot:"action",fixed:"right",width:120}],labelFrom:{page:1,limit:15,label_cate:""},labelLists:[],total:0,theme3:"light",labelSort:[],sortName:"",current:0}},computed:u(u({},Object(o["e"])("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getUserLabelAll()},methods:{add:function(){var t=this;this.$modalForm(Object(l["M"])(0,this.labelFrom.label_cate)).then((function(){return t.getList()}))},getList:function(){var t=this;this.loading=!0,Object(l["O"])(this.labelFrom).then(function(){var e=Object(r["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.labelLists=i.list,t.total=i.count,t.loading=!1;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.msg)}))},pageChange:function(t){this.labelFrom.page=t,this.getList()},edit:function(t){var e=this;this.$modalForm(Object(l["M"])(t)).then((function(){return e.getList()}))},del:function(t,e,a){var i=this,n={title:e,num:a,url:"user/user_label/del/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(n).then((function(t){i.$Message.success(t.msg),i.labelLists.splice(a,1),i.getList()})).catch((function(t){i.$Message.error(t.msg)}))},getUserLabelAll:function(t){var e=this;Object(l["N"])().then((function(a){var i={name:"全部",id:""};a.data.unshift(i),a.data.forEach((function(t){t.status=!1})),t||(e.sortName=a.data[0].id,e.labelFrom.label_cate=a.data[0].id,e.getList()),e.labelSort=a.data}))},showMenu:function(t){this.labelSort.forEach((function(e){e.id==t.id?e.status=!t.status:e.status=!1}))},labelEdit:function(t){var e=this;this.$modalForm(Object(l["Q"])(t.id)).then((function(){return e.getUserLabelAll(1)}))},addSort:function(){var t=this;this.$modalForm(Object(l["P"])()).then((function(){return t.getUserLabelAll()}))},deleteSort:function(t,e,a){var i=this,n={title:e,num:a,url:"user/user_label_cate/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(n).then((function(t){i.$Message.success(t.msg),i.labelSort.splice(a,1),i.labelSort=[],i.getUserLabelAll()})).catch((function(t){i.$Message.error(t.msg)}))},bindMenuItem:function(t,e){this.labelFrom.page=1,this.current=e,this.labelSort.forEach((function(t){t.status=!1})),this.labelFrom.label_cate=t.id,this.getList()}}},h=d,m=(a("c350"),a("2877")),b=Object(m["a"])(h,i,n,!1,null,"3da2be05",null);e["default"]=b.exports}}]); |