|
@@ -1,49 +1,30 @@
|
1
|
|
-import React from 'react';
|
|
1
|
+import React, { useCallback, useEffect, useRef, useState } from 'react';
|
2
|
2
|
import { history, Link } from 'umi';
|
|
3
|
+import classNames from 'classnames';
|
3
|
4
|
// import { getPersonList, exportPersonList } from '@/services/person';
|
4
|
5
|
import { PageHeaderWrapper } from '@ant-design/pro-layout';
|
5
|
|
-import moment from 'moment';
|
6
|
|
-import PageTable from '@/components/PageTable';
|
7
|
|
-
|
8
|
|
-const formatterTime = (val) => {
|
9
|
|
- return val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '';
|
10
|
|
-};
|
|
6
|
+import { FullscreenOutlined } from '@ant-design/icons';
|
|
7
|
+import { Button } from 'antd';
|
|
8
|
+import { useFullScreen } from './hook';
|
|
9
|
+import Styles from './style.less';
|
11
|
10
|
|
12
|
11
|
export default (props) => {
|
13
|
|
- const columns = [
|
14
|
|
- {
|
15
|
|
- title: '农机名',
|
16
|
|
- dataIndex: 'machineryName',
|
17
|
|
- key: 'machineryName',
|
18
|
|
- },
|
19
|
|
- {
|
20
|
|
- title: '农机型号',
|
21
|
|
- dataIndex: 'type',
|
22
|
|
- key: 'type',
|
23
|
|
- },
|
24
|
|
- {
|
25
|
|
- title: '操作',
|
26
|
|
- valueType: 'option',
|
27
|
|
- width: '300px',
|
28
|
|
- render: (_, record) => [
|
29
|
|
- <Link key={2} to={`./detail.jsx`}>
|
30
|
|
- 查看轨迹
|
31
|
|
- </Link>,
|
32
|
|
- ],
|
33
|
|
- },
|
34
|
|
- // 农机列表点击进入详情页 下面是轨迹上面是时间
|
35
|
|
- ];
|
|
12
|
+ const { style, isFullScreen, onFullScreen } = useFullScreen();
|
36
|
13
|
|
37
|
14
|
return (
|
38
|
|
- <PageHeaderWrapper>
|
39
|
|
- <PageTable
|
40
|
|
- // request={getPersonList}
|
41
|
|
- // expfunc={exportPersonList}
|
42
|
|
- columns={columns}
|
43
|
|
- rowKey="machineryId"
|
44
|
|
- options={false}
|
45
|
|
- scroll={{ x: 1000 }}
|
46
|
|
- />
|
|
15
|
+ <PageHeaderWrapper
|
|
16
|
+ extra={
|
|
17
|
+ <Button icon={<FullscreenOutlined />} onClick={onFullScreen}>
|
|
18
|
+ 全屏
|
|
19
|
+ </Button>
|
|
20
|
+ }
|
|
21
|
+ >
|
|
22
|
+ <div
|
|
23
|
+ className={classNames(Styles['screen-page'], { [Styles['full-screen']]: isFullScreen })}
|
|
24
|
+ style={style}
|
|
25
|
+ >
|
|
26
|
+ <div className={Styles.demo}>邓州</div>
|
|
27
|
+ </div>
|
47
|
28
|
</PageHeaderWrapper>
|
48
|
29
|
);
|
49
|
30
|
};
|