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
8.1 KiB
1 line
8.1 KiB
12 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-154b4748"],{"18e4":function(t,n,e){"use strict";e.r(n);var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"divBox"},[e("el-card",{staticClass:"box-card"},[e("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e("el-row",{attrs:{gutter:24}},[e("el-col",t._b({},"el-col",t.grid,!1),[e("div",{staticClass:"grid-content bg-purple"})])],1),t._v(" "),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.onAdd}},[t._v("添加身份管理")])],1),t._v(" "),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"small"}},[e("el-table-column",{attrs:{prop:"role_id",label:"ID","min-width":"60"}}),t._v(" "),e("el-table-column",{attrs:{prop:"role_name",label:"身份名称","min-width":"150"}}),t._v(" "),e("el-table-column",{attrs:{prop:"rule_name",label:"权限名称","min-width":"250"}}),t._v(" "),e("el-table-column",{attrs:{prop:"status",label:"是否开启","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"开启","inactive-text":"关闭"},on:{change:function(e){return t.onchangeIsShow(n.row)}},model:{value:n.row.status,callback:function(e){t.$set(n.row,"status",e)},expression:"scope.row.status"}})]}}])}),t._v(" "),e("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"150"}}),t._v(" "),e("el-table-column",{attrs:{label:"操作","min-width":"100",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.onEdit(n.row.role_id)}}},[t._v("编辑")]),t._v(" "),e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.handleDelete(n.row.role_id,n.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),e("div",{staticClass:"block"},[e("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},a=[],o=e("90e7"),u={name:"SystemRole",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},tableData:{data:[],total:0},listLoading:!0,tableFrom:{page:1,limit:20}}},computed:{},mounted:function(){this.getList()},methods:{getList:function(){var t=this;this.listLoading=!0,Object(o["x"])(this.tableFrom).then((function(n){t.tableData.data=n.data.list,t.tableData.total=n.data.count,t.listLoading=!1})).catch((function(n){t.listLoading=!1,t.$message.error(n.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList()},onchangeIsShow:function(t){var n=this;Object(o["J"])(t.role_id,t.status).then((function(t){var e=t.message;n.$message.success(e)})).catch((function(t){var e=t.message;n.$message.error(e)}))},onAdd:function(){var t=this;this.$modalForm(Object(o["H"])()).then((function(){return t.getList()}))},onEdit:function(t){var n=this;this.$modalForm(Object(o["K"])(t)).then((function(){return n.getList()}))},handleDelete:function(t,n){var e=this;this.$modalSure().then((function(){Object(o["I"])(t).then((function(t){var r=t.message;e.$message.success(r),e.tableData.data.splice(n,1)})).catch((function(t){var n=t.message;e.$message.error(n)}))}))}}},c=u,i=e("2877"),s=Object(i["a"])(c,r,a,!1,null,"828d0d1c",null);n["default"]=s.exports},"90e7":function(t,n,e){"use strict";e.d(n,"x",(function(){return a})),e.d(n,"H",(function(){return o})),e.d(n,"K",(function(){return u})),e.d(n,"I",(function(){return c})),e.d(n,"J",(function(){return i})),e.d(n,"e",(function(){return s})),e.d(n,"c",(function(){return l})),e.d(n,"i",(function(){return f})),e.d(n,"d",(function(){return d})),e.d(n,"h",(function(){return g})),e.d(n,"g",(function(){return m})),e.d(n,"f",(function(){return p})),e.d(n,"u",(function(){return v})),
|