魏熙美 hace 5 años
padre
commit
86e28cbea0
Se han modificado 2 ficheros con 4 adiciones y 6 borrados
  1. 4
    4
      src/pages/staff/list/StaffList.jsx
  2. 0
    2
      src/pages/system/document/audit.jsx

+ 4
- 4
src/pages/staff/list/StaffList.jsx Ver fichero

@@ -103,7 +103,7 @@ const CartBody = (props) => {
103 103
 }
104 104
 
105 105
 const header = (props) => {
106
-  const [tempData, setTempData] = useState([])
106
+  const [tempData, setTempData] = useState({ records: [] })
107 107
   const [pageTotal, setPageTotal] = useState('')
108 108
   useEffect(() => {
109 109
     getList({ pageNum: 1, pageSize: 10 });
@@ -112,7 +112,7 @@ const header = (props) => {
112 112
   const getList = (params) => {
113 113
     request({ ...apis.staff.taUser, params: { ...params } }).then((data) => {
114 114
       console.log(data, "listData")
115
-      setTempData(data.records)
115
+      setTempData(data)
116 116
       setPageTotal(data.total)
117 117
     })
118 118
   }
@@ -193,7 +193,7 @@ const header = (props) => {
193 193
       <Button type="danger" style={{ margin: '20px 0', padding: '2px 36px' }} onClick={toEditStaff()}>新增</Button>
194 194
       <Row style={{ padding: ' 0 10px' }}>
195 195
         {
196
-          tempData.map((item, index) => (
196
+          tempData.records.map((item, index) => (
197 197
             <Col span={6}>
198 198
               <CartBody data={item} onFresh={()=> getList({ pageNum: 1, pageSize: 10 })}/>
199 199
             </Col>
@@ -203,7 +203,7 @@ const header = (props) => {
203 203
 
204 204
       {/* 分页  */}
205 205
       <div style={{ display: 'flex', justifyContent: 'flex-end' }}>
206
-        <Pagination showQuickJumper defaultCurrent={1} total={pageTotal} onChange={onChange} current={data.current}/>
206
+        <Pagination showQuickJumper defaultCurrent={1} total={pageTotal} onChange={onChange} current={tempData.current}/>
207 207
       </div>
208 208
     </>
209 209
   )

+ 0
- 2
src/pages/system/document/audit.jsx Ver fichero

@@ -28,8 +28,6 @@ function body (props) {
28 28
   }
29 29
 
30 30
   function onVerify (params) {
31
-
32
-    alert(params)
33 31
     // 网路请求
34 32
     request({ ...apis.system.updateTaPolicy, urlData: { id: documentVerifyId }, data: { verifyStatus: params } }).then(data => {
35 33