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