|
|
@ -1,7 +1,15 @@ |
|
|
|
import React, { useState, useEffect, useRef } from "react"; |
|
|
|
import { connect } from "react-redux"; |
|
|
|
import moment from "moment"; |
|
|
|
import { Button, Form, Input, Row, Table, Pagination } from "@douyinfe/semi-ui"; |
|
|
|
import { |
|
|
|
Button, |
|
|
|
Form, |
|
|
|
Input, |
|
|
|
Row, |
|
|
|
Table, |
|
|
|
Pagination, |
|
|
|
Skeleton, |
|
|
|
} from "@douyinfe/semi-ui"; |
|
|
|
import "../style.less"; |
|
|
|
import NvrModal from "../components/nvrModal"; |
|
|
|
import Setup from "../components/setup"; |
|
|
@ -17,6 +25,7 @@ export const accessType = [ |
|
|
|
const NvrHeader = (props) => { |
|
|
|
const { dispatch, actions, user, loading, equipmentWarehouseNvr } = props; |
|
|
|
const { equipmentWarehouse } = actions; |
|
|
|
// const [loading, setLoading] = useState(false); |
|
|
|
const [setup, setSetup] = useState(false); |
|
|
|
const [sideSheet, setSideSheet] = useState(false); |
|
|
|
const [setupp, setSetupp] = useState([]); |
|
|
@ -110,8 +119,9 @@ const NvrHeader = (props) => { |
|
|
|
<Button |
|
|
|
theme="borderless" |
|
|
|
onClick={() => { |
|
|
|
dispatch(equipmentWarehouse.delNvr(row.id)); |
|
|
|
dispatch(equipmentWarehouse.delNvr(row.id)).then(() => { |
|
|
|
equipmentGetNvr(); |
|
|
|
}); |
|
|
|
}} |
|
|
|
> |
|
|
|
删除 |
|
|
@ -372,6 +382,11 @@ const NvrHeader = (props) => { |
|
|
|
border: "1px solid #D9D9D9", |
|
|
|
marginBottom: 20, |
|
|
|
}} |
|
|
|
onClick={() => { |
|
|
|
api.current.reset(); |
|
|
|
setearch({}); |
|
|
|
equipmentGetNvr(); |
|
|
|
}} |
|
|
|
> |
|
|
|
重置 |
|
|
|
</Button> |
|
|
@ -434,8 +449,20 @@ const NvrHeader = (props) => { |
|
|
|
</Button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<Skeleton |
|
|
|
loading={loading} |
|
|
|
placeholder={ |
|
|
|
<Table |
|
|
|
columns={setupp.filter(s => s)} |
|
|
|
columns={setupp.filter((s) => s)} |
|
|
|
dataSource={[{ name: "" },{ key: "" },{ name: "" },{ name: "" },{ name: "" },{ name: "" },{ name: "" }]} |
|
|
|
pagination={false} |
|
|
|
style={{ background: "rgba(217, 216, 216, 1)" }} |
|
|
|
empty="" |
|
|
|
/> |
|
|
|
} |
|
|
|
> |
|
|
|
<Table |
|
|
|
columns={setupp.filter((s) => s)} |
|
|
|
dataSource={equipmentWarehouseNvr.data} |
|
|
|
bordered={false} |
|
|
|
empty="暂无数据" |
|
|
@ -444,6 +471,8 @@ const NvrHeader = (props) => { |
|
|
|
}} |
|
|
|
pagination={false} |
|
|
|
/> |
|
|
|
</Skeleton> |
|
|
|
|
|
|
|
<div |
|
|
|
style={{ |
|
|
|
display: "flex", |
|
|
@ -496,11 +525,10 @@ const NvrHeader = (props) => { |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
function mapStateToProps(state) { |
|
|
|
const { auth, global, members, equipmentWarehouseNvr } = state; |
|
|
|
return { |
|
|
|
loading: members.isRequesting, |
|
|
|
loading: equipmentWarehouseNvr.isRequesting, |
|
|
|
user: auth.user, |
|
|
|
actions: global.actions, |
|
|
|
members: members.data, |
|
|
|