Browse Source

版本代码

master
wenlele 2 years ago
parent
commit
cce53ce7b8
  1. BIN
      code/web/client/assets/images/background/logo.png
  2. BIN
      code/web/client/assets/videos/administer_banner.mp4
  3. 2
      code/web/client/src/index.jsx
  4. 8
      code/web/client/src/layout/components/header/index.jsx
  5. 2
      code/web/client/src/layout/components/sider/index.jsx
  6. 15
      code/web/client/src/sections/edition/actions/index.js
  7. 164
      code/web/client/src/sections/edition/containers/administer.jsx
  8. 2
      code/web/client/src/utils/webapi.js

BIN
code/web/client/assets/images/background/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
code/web/client/assets/videos/administer_banner.mp4

Binary file not shown.

2
code/web/client/src/index.jsx

@ -9,4 +9,4 @@ import microApp from '@micro-zoe/micro-app'
microApp.start()
render((<App projectName="飞尚物联" />), document.getElementById('IotAuthApp'));
render((<App projectName="边缘网关" />), document.getElementById('IotAuthApp'));

8
code/web/client/src/layout/components/header/index.jsx

@ -60,10 +60,16 @@ const Header = (props) => {
left: -10,
}}
/>
<Avatar size="small" color="light-blue" style={{ margin: 4 }}>
<img src="/assets/images/avatar/6.png" />
</Avatar>
<div style={{
display: "inline-block", position: "relative",
top: 4,
left: 4,
}}>
{user && user.userName}
</div>
</div>
}
>

2
code/web/client/src/layout/components/sider/index.jsx

@ -14,7 +14,6 @@ const Sider = props => {
useEffect(() => {
const { sections, dispatch, user } = props;
let nextItems = []
console.log(sections);
for (let c of sections) {
if (typeof c.getNavItem == 'function') {
let item = c.getNavItem(user, dispatch);
@ -23,7 +22,6 @@ const Sider = props => {
}
}
}
console.log(nextItems);
setItems(nextItems)
const lastSelectedKeys = localStorage.getItem('fs_iot_auth_selected_sider')

15
code/web/client/src/sections/edition/actions/index.js

@ -1,6 +1,19 @@
'use strict';
import { ApiTable,basicAction } from "$utils";
export default {
export function getVersions() {
return (dispatch) =>
basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_CAMREA",
url: `${ApiTable.getVersions}`,
msg: { option: "查询网关版本信息" },
reducer: { name: "", params: { noClear: true } },
});
}
export default {
getVersions,
};

164
code/web/client/src/sections/edition/containers/administer.jsx

@ -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,

2
code/web/client/src/utils/webapi.js

@ -5,6 +5,8 @@ export const ApiTable = {
logout: 'v1/logout',
crossCheck: 'cross_token/check',
getVersions: 'v1/versions', //查询网关版本信息
};
export const RouteTable = {

Loading…
Cancel
Save