mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-01-18 13:28:15 +00:00
1 line
3.0 KiB
JavaScript
1 line
3.0 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d21afa5"],{be8d:function(t,e,i){"use strict";i.r(e);var r=i("c964"),n=i("f3f3"),o=(i("a434"),i("96cf"),i("2f62")),a=i("c24f");n={name:"user_group",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,columns1:[{title:"ID",key:"id",width:80},{title:"分组名称",key:"group_name",minWidth:600},{title:"操作",slot:"action",fixed:"right",minWidth:120}],groupFrom:{page:1,limit:15},groupLists:[],total:0}},computed:Object(n.a)(Object(n.a)({},Object(o.e)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"left"}}),created:function(){this.getList()},methods:{add:function(){var t=this;this.$modalForm(Object(a.m)(0)).then((function(){return t.getList()}))},getList:function(){var t=this;this.loading=!0,Object(a.L)(this.groupFrom).then(function(){var e=Object(r.a)(regeneratorRuntime.mark((function e(i){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=i.data,t.groupLists=r.list,t.total=r.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.groupFrom.page=t,this.getList()},edit:function(t){var e=this;this.$modalForm(Object(a.m)(t)).then((function(){return e.getList()}))},del:function(t,e,i){var r=this;e={title:e,num:i,url:"user/user_group/del/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){r.$Message.success(t.msg),r.groupLists.splice(i,1),r.getList()})).catch((function(t){r.$Message.error(t.msg)}))}}},o=i("2877"),i=Object(o.a)(n,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[i("Row",{attrs:{type:"flex"}},[i("Col",t._b({},"Col",t.grid,!1),[i("Button",{directives:[{name:"auth",rawName:"v-auth",value:["admin-user-group"],expression:"['admin-user-group']"}],attrs:{type:"primary",icon:"md-add"},on:{click:t.add}},[t._v("添加分组")])],1)],1),i("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.groupLists,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"icons",fn:function(t){var e=t.row;return t.index,[i("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.icon,expression:"row.icon"}]})])]}},{key:"action",fn:function(e){var r=e.row,n=e.index;return[i("a",{on:{click:function(e){return t.edit(r.id)}}},[t._v("修改")]),i("Divider",{attrs:{type:"vertical"}}),i("a",{on:{click:function(e){return t.del(r,"删除分组",n)}}},[t._v("删除")])]}}])}),i("div",{staticClass:"acea-row row-right page"},[i("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.groupFrom.limit},on:{"on-change":t.pageChange}})],1)],1)],1)}),[],!1,null,"133db52c",null);e.default=i.exports}}]); |