1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d4043"],{"5eda":function(t,a,e){"use strict";e.r(a);var l=function(){var t=this,a=this,e=a._self._c;return e("a-card",{attrs:{bordered:!1}},[e("div",{staticClass:"table-page-search-wrapper"},[e("a-form",{attrs:{layout:"inline"}},[e("a-row",{attrs:{gutter:48}},[e("a-col",{attrs:{md:8,sm:24}},[e("a-form-item",{attrs:{label:"角色ID"}},[e("a-input",{attrs:{placeholder:"请输入"}})],1)],1),e("a-col",{attrs:{md:8,sm:24}},[e("a-form-item",{attrs:{label:"状态"}},[e("a-select",{attrs:{placeholder:"请选择","default-value":"0"}},[e("a-select-option",{attrs:{value:"0"}},[a._v("全部")]),e("a-select-option",{attrs:{value:"1"}},[a._v("关闭")]),e("a-select-option",{attrs:{value:"2"}},[a._v("运行中")])],1)],1)],1),e("a-col",{attrs:{md:8,sm:24}},[e("span",{staticClass:"table-page-search-submitButtons"},[e("a-button",{attrs:{type:"primary"}},[a._v("查询")]),e("a-button",{staticStyle:{"margin-left":"8px"}},[a._v("重置")])],1)])],1)],1)],1),e("s-table",{attrs:{size:"default",columns:a.columns,data:a.loadData},scopedSlots:a._u([{key:"expandedRowRender",fn:function(t){return e("div",{staticStyle:{margin:"0"}},[e("a-row",{style:{marginBottom:"12px"},attrs:{gutter:24}},a._l(t.permissions,(function(t,l){return e("a-col",{key:l,style:{marginBottom:"12px"},attrs:{span:12}},[e("a-col",{attrs:{lg:4,md:24}},[e("span",[a._v(a._s(t.permissionName)+":")])]),t.actionEntitySet.length>0?e("a-col",{attrs:{lg:20,md:24}},a._l(t.actionEntitySet,(function(t,l){return e("a-tag",{key:l,attrs:{color:"cyan"}},[a._v(a._s(t.describe))])})),1):e("a-col",{attrs:{span:20}},[a._v("-")])],1)})),1)],1)}},{key:"action",fn:function(t,l){return e("span",{},[e("a",{on:{click:function(t){return a.handleEdit(l)}}},[a._v("编辑")]),e("a-divider",{attrs:{type:"vertical"}}),e("a-dropdown",[e("a",{staticClass:"ant-dropdown-link"},[a._v("\n 更多 "),e("a-icon",{attrs:{type:"down"}})],1),e("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[e("a-menu-item",[e("a",{attrs:{href:"javascript:;"}},[a._v("详情")])]),e("a-menu-item",[e("a",{attrs:{href:"javascript:;"}},[a._v("禁用")])]),e("a-menu-item",[e("a",{attrs:{href:"javascript:;"}},[a._v("删除")])])],1)],1)],1)}}])}),e("a-modal",{staticStyle:{top:"20px"},attrs:{title:"操作",width:800},on:{ok:a.handleOk},model:{value:a.visible,callback:function(t){a.visible=t},expression:"visible"}},[e("a-form",{attrs:{autoFormCreate:function(a){t.form=a}}},[e("a-form-item",{attrs:{labelCol:a.labelCol,wrapperCol:a.wrapperCol,label:"唯一识别码",hasFeedback:"",validateStatus:"success"}},[e("a-input",{attrs:{placeholder:"唯一识别码",id:"no",disabled:"disabled"},model:{value:a.mdl.id,callback:function(t){a.$set(a.mdl,"id",t)},expression:"mdl.id"}})],1),e("a-form-item",{attrs:{labelCol:a.labelCol,wrapperCol:a.wrapperCol,label:"角色名称",hasFeedback:"",validateStatus:"success"}},[e("a-input",{attrs:{placeholder:"起一个名字",id:"role_name"},model:{value:a.mdl.name,callback:function(t){a.$set(a.mdl,"name",t)},expression:"mdl.name"}})],1),e("a-form-item",{attrs:{labelCol:a.labelCol,wrapperCol:a.wrapperCol,label:"状态",hasFeedback:"",validateStatus:"warning"}},[e("a-select",{model:{value:a.mdl.status,callback:function(t){a.$set(a.mdl,"status",t)},expression:"mdl.status"}},[e("a-select-option",{attrs:{value:"1"}},[a._v("正常")]),e("a-select-option",{attrs:{value:"2"}},[a._v("禁用")])],1)],1),e("a-form-item",{attrs:{labelCol:a.labelCol,wrapperCol:a.wrapperCol,label:"描述",hasFeedback:""}},[e("a-textarea",{attrs:{rows:5,placeholder:"...",id:"describe"},model:{value:a.mdl.describe,callback:function(t){a.$set(a.mdl,"describe",t)},expression:"mdl.describe"}})],1),e("a-divider"),e("a-form-item",{attrs:{labelCol:a.labelCol,wrapperCol:a.wrapperCol,label:"拥有权限",hasFeedback:""}},a._l(a.mdl.permissions,(function(t,l){return e("a-row",{key:l,attrs:{gutter:16}},[e("a-col",{attrs:{span:4}},[a._v("\n "+a._s(t.permissionName)+":\n ")]),e("a-col",{attrs:{span:20}},[e("a-checkbox-group",{attrs:{options:t.actionsOptions}})],1)],1)})),1)],1)],1)],1)},s=[],n=e("e8c4"),o=e("0fea"),r={name:"TableList",components:{STable:n["a"]},data:function(){return{description:"列表使用场景:后台管理中的权限管理以及角色管理,可用于基于 RBAC 设计的角色权限控制,颗粒度细到每一个操作类型。",visible:!1,labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},form:null,mdl:{},advanced:!1,queryParam:{},columns:[{title:"唯一识别码",dataIndex:"id"},{title:"角色名称",dataIndex:"name"},{title:"状态",dataIndex:"status"},{title:"创建时间",dataIndex:"createTime",sorter:!0},{title:"操作",width:"150px",dataIndex:"action",scopedSlots:{customRender:"action"}}],loadData:function(t){return Object(o["g"])(t).then((function(t){return t.result}))},selectedRowKeys:[],selectedRows:[]}},created:function(){Object(o["h"])().then((function(t){})),Object(o["g"])().then((function(t){}))},methods:{handleEdit:function(t){this.mdl=Object.assign({},t),this.mdl.permissions.forEach((function(t){t.actionsOptions=t.actionEntitySet.map((function(t){return{label:t.describe,value:t.action,defaultCheck:t.defaultCheck}}))})),this.visible=!0},handleOk:function(){},onChange:function(t,a){this.selectedRowKeys=t,this.selectedRows=a},toggleAdvanced:function(){this.advanced=!this.advanced}},watch:{}},i=r,c=e("2877"),d=Object(c["a"])(i,l,s,!1,null,null,null);a["default"]=d.exports}}]);
|