dingxin 5 years ago
parent
commit
d65d2b0d99
2 changed files with 10 additions and 4 deletions
  1. 10
    2
      src/pages/staff/list/StaffList.jsx
  2. 0
    2
      src/pages/system/document/audit.jsx

+ 10
- 2
src/pages/staff/list/StaffList.jsx View File

@@ -104,7 +104,7 @@ const CartBody = (props) => {
104 104
 }
105 105
 
106 106
 const header = (props) => {
107
-  const [tempData, setTempData] = useState([])
107
+  const [tempData, setTempData] = useState({ records: [] })
108 108
   const [pageTotal, setPageTotal] = useState('')
109 109
   const [data,setData] = useState({})
110 110
   useEffect(() => {
@@ -114,8 +114,12 @@ const header = (props) => {
114 114
   const getList = (params) => {
115 115
     request({ ...apis.staff.taUser, params: { ...params } }).then((data) => {
116 116
       console.log(data, "listData")
117
+<<<<<<< HEAD
118
+      setTempData(data)
119
+=======
117 120
       setData(data)
118 121
       setTempData(data.records)
122
+>>>>>>> 07ab51117db15061e9e469cbddcabf3ec412859e
119 123
       setPageTotal(data.total)
120 124
     })
121 125
   }
@@ -196,7 +200,7 @@ const header = (props) => {
196 200
       <Button type="danger" style={{ margin: '20px 0', padding: '2px 36px' }} onClick={toEditStaff()}>新增</Button>
197 201
       <Row style={{ padding: ' 0 10px' }}>
198 202
         {
199
-          tempData.map((item, index) => (
203
+          tempData.records.map((item, index) => (
200 204
             <Col span={6}>
201 205
               <CartBody data={item} onFresh={() => getList({ pageNum: 1, pageSize: 8 })} />
202 206
             </Col>
@@ -206,7 +210,11 @@ const header = (props) => {
206 210
 
207 211
       {/* 分页  */}
208 212
       <div style={{ display: 'flex', justifyContent: 'flex-end' }}>
213
+<<<<<<< HEAD
214
+        <Pagination showQuickJumper defaultCurrent={1} total={pageTotal} onChange={onChange} current={tempData.current}/>
215
+=======
209 216
         <Pagination showQuickJumper defaultCurrent={1} pageSize={8} total={pageTotal} onChange={onChange} current={data.current}/>
217
+>>>>>>> 07ab51117db15061e9e469cbddcabf3ec412859e
210 218
       </div>
211 219
     </>
212 220
   )

+ 0
- 2
src/pages/system/document/audit.jsx View File

@@ -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.updateVerify, urlData: { id: documentVerifyId }, data: { verifyStatus: params } }).then(data => {
35 33