You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
11 KiB
1 line
11 KiB
4 months ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-c2e8690a"],{be8d:function(t,e,r){"use strict";r.r(e);var n=r("a34a"),u=r.n(n),o=r("2f62"),c=r("c24f");function a(t,e,r,n,u,o,c){try{var a=t[o](c),i=a.value}catch(t){return void r(t)}a.done?e(i):Promise.resolve(i).then(n,u)}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var d={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,maxWidth:140}],groupFrom:{page:1,limit:10},groupLists:[],total:0}},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(r,!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},Object(o.e)("admin/layout",["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(c.p)(0)).then((function(){return t.getList()}))},getList:function(){var t=this;this.loading=!0,Object(c.R)(this.groupFrom).then(function(){var e,r=(e=u.a.mark((function e(r){var n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.groupLists=n.list,t.total=n.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,u){var o=e.apply(t,r);function c(t){a(o,n,u,c,i,"next",t)}function i(t){a(o,n,u,c,i,"throw",t)}c(void 0)}))});return function(t){return r.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(c.p)(t)).then((function(){return e.getList()}))},del:function(t,e,r){var n=this,u={title:e,num:r,url:"user/user_group/del/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(u).then((function(t){n.$Message.success(t.msg),n.groupLists.splice(r,1),n.groupLists.length||(n.groupFrom.page=1==n.groupFrom.page?1:n.groupFrom.page-1),n.getList()})).catch((function(t){n.$Message.error(t.msg)}))}}},l=r("2877"),f=Object(l.a)(d,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("Row",{attrs:{type:"flex"}},[r("Col",t._b({},"Col",t.grid,!1),[r("Button",{directives:[{name:"auth",rawName:"v-auth",value:["admin-user-group"],expression:"['admin-user-group']"}],attrs:{type:"primary"},on:{click:t.add}},[t._v("添加分组")])],1)],1),r("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,[r("viewer",[r("div",{staticClass:"tabBox_img"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.icon,expression:"row.icon"}]})])])]}},{key:"action",fn:function(e){var n=e.row,u=e.index;return[r("a",{on:{click:function(e){return t.edit(n.id)}}},[t._v("修改")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.del(n,"删除分组",u)}}},[t._v("删除")])]}}])}),r("div",{staticClass:"acea-row row-right page"},[r("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.groupFrom.limit},on:{"on-change":t.pageChange}})],1)],1)],1)}),[],!1,null,null,null);e.default=f.exports},c24f:function(t,e,r){"use strict";r.d(e,"X",(function(){return u})),r.d(e,"
|