|
|
@ -2,28 +2,182 @@ |
|
|
|
import React, { useEffect, useRef } from 'react'; |
|
|
|
import { connect } from 'react-redux'; |
|
|
|
import { push } from 'react-router-redux'; |
|
|
|
import { Form, Button, Toast } from '@douyinfe/semi-ui'; |
|
|
|
import { Form, Button, Table, Pagination } from '@douyinfe/semi-ui'; |
|
|
|
import { IconLock, IconUser } from '@douyinfe/semi-icons'; |
|
|
|
|
|
|
|
const EditionManage = props => { |
|
|
|
const { dispatch, user, error, actions, apiRoot, isRequesting } = props |
|
|
|
|
|
|
|
const { edition } = actions |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
|
|
|
|
dispatch(edition.getVersions()).then(res => { |
|
|
|
console.log(res); |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, []) |
|
|
|
|
|
|
|
const columns = [ |
|
|
|
{ |
|
|
|
title: "序列号", |
|
|
|
render: (_, record, index) => { |
|
|
|
return index + 1; |
|
|
|
}, |
|
|
|
}, { |
|
|
|
title: "Major", |
|
|
|
dataIndex: "Major", |
|
|
|
render: (_, record, index) => { |
|
|
|
return index + 1; |
|
|
|
}, |
|
|
|
}, { |
|
|
|
title: "Minor", |
|
|
|
dataIndex: "Minor", |
|
|
|
render: (_, record, index) => { |
|
|
|
return index + 1; |
|
|
|
}, |
|
|
|
}, { |
|
|
|
title: "Patch", |
|
|
|
dataIndex: "naPatchme", |
|
|
|
render: (_, record, index) => { |
|
|
|
return index + 1; |
|
|
|
}, |
|
|
|
}, { |
|
|
|
title: "Build", |
|
|
|
dataIndex: "Build", |
|
|
|
render: (_, record, index) => { |
|
|
|
return index + 1; |
|
|
|
}, |
|
|
|
}, { |
|
|
|
title: "Type", |
|
|
|
dataIndex: "Type", |
|
|
|
render: (_, record, index) => { |
|
|
|
return index + 1; |
|
|
|
}, |
|
|
|
}, { |
|
|
|
title: "Desc", |
|
|
|
dataIndex: "Desc", |
|
|
|
render: (_, record, index) => { |
|
|
|
return index + 1; |
|
|
|
}, |
|
|
|
}, { |
|
|
|
title: "ImageBase", |
|
|
|
dataIndex: "ImageBase", |
|
|
|
render: (_, record, index) => { |
|
|
|
return index + 1; |
|
|
|
}, |
|
|
|
}, { |
|
|
|
title: "ImageVersion", |
|
|
|
dataIndex: "ImageVersion", |
|
|
|
render: (_, record, index) => { |
|
|
|
return index + 1; |
|
|
|
}, |
|
|
|
}, { |
|
|
|
title: "CreatedAt", |
|
|
|
dataIndex: "CreatedAt", |
|
|
|
render: (_, record, index) => { |
|
|
|
return index + 1; |
|
|
|
}, |
|
|
|
}, { |
|
|
|
title: "操作", |
|
|
|
dataIndex: "operation", |
|
|
|
render: (_, record, index) => { |
|
|
|
return <Button>删除</Button> |
|
|
|
}, |
|
|
|
}, |
|
|
|
] |
|
|
|
|
|
|
|
return ( |
|
|
|
<div style={{}}> |
|
|
|
<> |
|
|
|
<div style={{ position: "" }}> |
|
|
|
<video |
|
|
|
id="cameraBanner" |
|
|
|
autoPlay |
|
|
|
loop |
|
|
|
muted |
|
|
|
style={{ width: "100%", objectFit: "cover", height: 171 }} |
|
|
|
src="/assets/videos/administer_banner.mp4" |
|
|
|
type="video/mp4" |
|
|
|
/> |
|
|
|
<div style={{ position: "absolute", top: 12 }}> |
|
|
|
<div |
|
|
|
style={{ |
|
|
|
fontSize: 22, |
|
|
|
paddingTop: 15, |
|
|
|
marginLeft: 21, |
|
|
|
}} |
|
|
|
> |
|
|
|
版本管理 |
|
|
|
</div> |
|
|
|
<div |
|
|
|
style={{ |
|
|
|
fontSize: 14, |
|
|
|
paddingTop: 18, |
|
|
|
marginLeft: 20, |
|
|
|
}} |
|
|
|
> |
|
|
|
对网关版本添加、删除的管理页面。 |
|
|
|
</div> |
|
|
|
<div |
|
|
|
style={{ |
|
|
|
fontSize: 14, |
|
|
|
marginTop: 28, |
|
|
|
marginLeft: 21, |
|
|
|
width: 89, |
|
|
|
height: 32, |
|
|
|
lineHeight: 32 + "px", |
|
|
|
textAlign: "center", |
|
|
|
backgroundColor: "#D9EAFF", |
|
|
|
color: "#1859C1", |
|
|
|
cursor: "pointer", |
|
|
|
}} |
|
|
|
onClick={() => { |
|
|
|
|
|
|
|
}} |
|
|
|
> |
|
|
|
添加版本 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ background: "#FFFFFF", marginTop: 5 }}> |
|
|
|
<Table |
|
|
|
columns={columns} |
|
|
|
dataSource={[]} |
|
|
|
bordered={false} |
|
|
|
empty="暂无数据" |
|
|
|
style={{ |
|
|
|
padding: "0px 20px", |
|
|
|
}} |
|
|
|
pagination={false} |
|
|
|
/> |
|
|
|
<div |
|
|
|
style={{ |
|
|
|
display: "flex", |
|
|
|
justifyContent: "flex-end", |
|
|
|
padding: "20px 20px", |
|
|
|
}} |
|
|
|
> |
|
|
|
<span style={{ lineHeight: "30px" }}> |
|
|
|
共{100}个设备 |
|
|
|
</span> |
|
|
|
<Pagination |
|
|
|
total={100} |
|
|
|
showSizeChanger |
|
|
|
currentPage={1} |
|
|
|
pageSizeOpts={[10, 20, 30, 40]} |
|
|
|
onChange={(currentPage, pageSize) => { |
|
|
|
// setQuery({ limit: pageSize, page: currentPage - 1 }); |
|
|
|
// page.current = currentPage - 1 |
|
|
|
}} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</> |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
function mapStateToProps(state) { |
|
|
|
function mapStateToProps (state) { |
|
|
|
const { auth, global } = state; |
|
|
|
return { |
|
|
|
user: auth.user, |
|
|
|