From a729826c8df0f0939fbd5ab82a695b8164a57306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 6 Sep 2024 14:15:39 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.15.1.2407.01-=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/taxAgent.js | 4 ++ .../hrmSalary/pages/roleManagement/index.js | 48 +++++++++++++++++-- .../hrmSalary/pages/roleManagement/index.less | 4 ++ 3 files changed, 53 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/taxAgent.js b/pc4mobx/hrmSalary/apis/taxAgent.js index 1f297904..aa74fd63 100644 --- a/pc4mobx/hrmSalary/apis/taxAgent.js +++ b/pc4mobx/hrmSalary/apis/taxAgent.js @@ -100,6 +100,10 @@ export const hasIconInTax = (params) => { }; /**权限-角色相关*/ +//角色列表 +export const getRoleList = (params) => { + return postFetch("/api/bs/hrmsalary/auth/role/list", params); +}; //保存角色 export const saveAuthRole = (params) => { return postFetch("/api/bs/hrmsalary/auth/role/save", params); diff --git a/pc4mobx/hrmSalary/pages/roleManagement/index.js b/pc4mobx/hrmSalary/pages/roleManagement/index.js index 8b9f1355..66b92a2a 100644 --- a/pc4mobx/hrmSalary/pages/roleManagement/index.js +++ b/pc4mobx/hrmSalary/pages/roleManagement/index.js @@ -8,23 +8,65 @@ * @description: */ import React, { Component } from "react"; -import { WeaLocaleProvider, WeaTop } from "ecCom"; +import { WeaInputSearch, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; +import * as API from "../../apis/taxAgent"; import { Button } from "antd"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; class Index extends Component { + constructor(props) { + super(props); + this.state = { + query: { name: "" }, dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 } + }; + } + + componentDidMount() { + this.getRoleList(); + } + + getRoleList = () => { + const { query, pageInfo } = this.state; + const paylaod = { ...pageInfo, ...query }; + API.getRoleList(paylaod).then(({ status, data }) => { + if (status) { + console.log(data); + } + }); + }; + render() { + const { query, dataSource, columns, pageInfo } = this.state; const buttons = [ - + , + this.setState({ query: { name } })} + onSearch={() => this.setState({ pageInfo: { ...pageInfo, current: 1 } }, + () => this.getRoleList())}/> ]; + const pagination = { + ...pageInfo, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getRoleList()); + }, + onChange: current => { + this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getRoleList()); + } + }; return ( } iconBgcolor="#F14A2D" buttons={buttons} className="rolemanagement-index" > -
+
+ +
); } diff --git a/pc4mobx/hrmSalary/pages/roleManagement/index.less b/pc4mobx/hrmSalary/pages/roleManagement/index.less index de10225a..190f45bc 100644 --- a/pc4mobx/hrmSalary/pages/roleManagement/index.less +++ b/pc4mobx/hrmSalary/pages/roleManagement/index.less @@ -4,5 +4,9 @@ overflow-y: hidden; padding: 16px 16px 0; background: rgb(246, 246, 246); + + .wea-new-table { + background: #FFF; + } } }