Pārlūkot izejas kodu

重置分页默认已切换分页

1178232204@qq.com 3 gadi atpakaļ
vecāks
revīzija
b9b0a707ad

+ 1 - 1
src/components/DataManager/index.js

@@ -38,7 +38,7 @@ function DataManager() {
   let data = {
     pages: 1,
     current: 1,
-    size: 15
+    size: size
   }
   const showModal = (flag, id) => {
     setaddVisible(true)

+ 4 - 20
src/components/ExceptionLog/index.js

@@ -8,8 +8,6 @@ const { Option } = Select;
 function ExceptionLog() {
   useEffect(() => {
     getAbnormalLog();
-    console.log(123);
-
   }, []);
   const [logList, setLogList] = useState([]);
   const [total, setTotal] = useState(0);
@@ -28,15 +26,13 @@ function ExceptionLog() {
   let data = {
     pages: 1,
     current: 1,
-    size: 15
+    size: size,
   }
   //表格数据
   function getAbnormalLog(param) {
     post(api.getAbnormalLog, param || params).then((res) => {
       if (res.data.code === 200) {
         const data = res.data.data;
-        console.log(data);
-
         setLogList(data.records);
         setTotal(data.total)
       }
@@ -58,9 +54,9 @@ function ExceptionLog() {
     setParams(params)
     getAbnormalLog()
   }
-  function showModal(operationWay) {
+  function showModal(operationErrorInfo) {
     setMsvisible(true)
-    getAbnormalLogWayAndIp(operationWay)
+    setTipText(operationErrorInfo)
   }
   function handleOk() {
     setMsvisible(false)
@@ -68,18 +64,6 @@ function ExceptionLog() {
   function handleCancel() {
     setMsvisible(false)
   }
-  function getAbnormalLogWayAndIp(operationWay) {
-    let params = {
-      mark:0,
-      operationWay: operationWay
-    }
-    post(api.getAbnormalLogWayAndIp, params).then((res) => {
-      if (res.data.code === 200) {
-        const data = res.data.data;
-        setTipText(data)
-      }
-    })
-  }
   const onFinish = (value) => {
     const param = {
       ...data,
@@ -114,7 +98,7 @@ function ExceptionLog() {
     {
       title: '操作', dataIndex: 'key', render: (text, record) => (
         <Space size="middle">
-          <a onClick={e => showModal(record.operationWay)}>查看</a>
+          <a onClick={e => showModal(record.operationErrorInfo)}>查看</a>
         </Space>
       )
     }

+ 1 - 1
src/components/InpaManager/index.js

@@ -40,7 +40,7 @@ function InpaManager() {
   let data = {
     pages: 1,
     current: 1,
-    size: 15
+    size: size
   }
   const tipText = {
     1: '确定要删除该病区?',

+ 1 - 1
src/components/LoginLog/index.js

@@ -25,7 +25,7 @@ function LoginLog() {
   let data = {
     pages: 1,
     current: 1,
-    size: 15
+    size: size
   }
   //表格数据
   function getLoginLog(param) {

+ 1 - 1
src/components/OperationLog/index.js

@@ -25,7 +25,7 @@ function OperationLog() {
   let data = {
     pages: 1,
     current: 1,
-    size: 15
+    size: size
   }
   //表格数据
   function getOperationLog(param) {

+ 1 - 1
src/components/RoleManager/index.js

@@ -46,7 +46,7 @@ function RoleManager(){
     let data = {
         pages: 1,
         current: 1,
-        size: 15
+        size: size
     }
     //获取表格数据
     function getTableData(param){

+ 1 - 1
src/components/UserManager/index.js

@@ -45,7 +45,7 @@ function UserManager() {
   let data = {
     pages: 1,
     current: 1,
-    size: 15
+    size: size
   }
   const { statusList } = staticInfo;
   //新增弹窗

+ 8 - 3
src/index.js

@@ -5,15 +5,20 @@ import App from './App';
 import { Provider } from 'react-redux'
 import configureStore from './store/reducerExtras/configureStore'
 import utils from '@api/index';
+import { ConfigProvider } from 'antd'
+import zhCN from 'antd/lib/locale/zh_CN';
+
 
 const { interceptors } = utils;
 const store = configureStore();
 interceptors();       //拦截所有请求,401跳登录
 const renderApp = () =>
     render(
-        <Provider store={store}>
-            <App />
-        </Provider>,
+        <ConfigProvider locale={zhCN} >
+            <Provider store={store}>
+                <App />
+            </Provider>
+        </ConfigProvider>,
         document.getElementById('root')
     )