Explorar el Código

fix: rename word

touchitvoid hace 3 años
padre
commit
c2bfffe2ca
Se han modificado 3 ficheros con 9 adiciones y 8 borrados
  1. 1 1
      src/pages/dust/index.tsx
  2. 6 5
      src/pages/video/index.tsx
  3. 2 2
      src/services/dust.ts

+ 1 - 1
src/pages/dust/index.tsx

@@ -49,7 +49,7 @@ const colums: ColumnProps<DustRecordProps>[] = [
 			const isOnline = DevicestateKeys.onLine === dataIndex;
 			return record.status === 1 ? (
 				<Fragment>
-					<Badge color={isOnline ? 'green' : 'red'}></Badge>
+					<Badge color={isOnline ? 'green' : 'red'}/>
 					<Text type={isOnline ? 'success' : 'secondary'}>
 						{DustState[dataIndex]}
 					</Text>

+ 6 - 5
src/pages/video/index.tsx

@@ -1,5 +1,5 @@
 import React, { Fragment } from 'react';
-import { Table, Button, Modal, Row, Input, Col, Typography, Badge } from 'antd';
+import { Table, Button, Modal, Row, Input, Col, Typography, Badge, Divider } from 'antd';
 import { EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons';
 import { ColumnProps } from 'antd/lib/table';
 import { RouteComponentProps } from 'react-router-dom';
@@ -32,7 +32,7 @@ const chanleColums: ColumnProps<any>[] = [
 			return (
 				<Badge
 					status={indexKey === 1 ? 'success' : 'error'}
-					text={chanleState[indexKey as 0 | 1]}></Badge>
+					text={chanleState[indexKey as 0 | 1]}/>
 			);
 		},
 	},
@@ -148,9 +148,10 @@ const videos: React.FC<RouteComponentProps> = ({ history }) => {
 				<Col span={6}>
 					<Search
 						placeholder='设备唯一编码,项目名或安监备案号'
-						onSearch={handleSearch}></Search>
+						onSearch={handleSearch}/>
 				</Col>
 			</Row>
+      <Divider/>
 			<Table
 				rowKey={(record) => record.id}
 				pagination={{
@@ -163,7 +164,7 @@ const videos: React.FC<RouteComponentProps> = ({ history }) => {
 				}}
 				columns={videoListColums}
 				dataSource={VideoListState.dataSource}
-				loading={VideoListState.loading}></Table>
+				loading={VideoListState.loading}/>
 			<Modal
 				width={600}
 				title='通道列表'
@@ -182,7 +183,7 @@ const videos: React.FC<RouteComponentProps> = ({ history }) => {
 							requestChanleList({ sn: state.sn as string, page }),
 						total: chanleListState.total,
 					}}
-					dataSource={chanleListState.dataSource}></Table>
+					dataSource={chanleListState.dataSource}/>
 			</Modal>
 		</React.Fragment>
 	);

+ 2 - 2
src/services/dust.ts

@@ -49,8 +49,8 @@ export const useDustList = () => {
 				setState((preState) => ({
 					...preState,
 					loading: false,
-					dataSouce: data.list,
-					totol: data.total,
+					dataSource: data.list,
+					total: data.total,
 					page: data.page,
 				}));
 			})