diff --git a/.env b/.env
index ce31977..0b38a27 100644
--- a/.env
+++ b/.env
@@ -1,2 +1,2 @@
-REACT_APP_WS_URL=192.168.1.132:8080/ws
-# REACT_APP_WS_URL=127.1.1.0:8080/ws
\ No newline at end of file
+# REACT_APP_WS_URL=192.168.1.132:8080/ws
+REACT_APP_WS_URL=127.1.1.0:8080/ws
\ No newline at end of file
diff --git a/package.json b/package.json
index 9695ba0..8f85e35 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "outline",
"version": "0.1.0",
"private": true,
- "proxy": "http://192.168.1.132:8080",
+ "proxy": "http://127.0.0.1:8080",
"dependencies": {
"@ant-design/icons": "^6.0.0",
"@babel/core": "^7.16.0",
diff --git a/public/index.html b/public/index.html
index aa069f2..5d414e3 100644
--- a/public/index.html
+++ b/public/index.html
@@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
-
React App
+ 廓形仪
You need to enable JavaScript to run this app.
diff --git a/public/manifest.json b/public/manifest.json
index 1f2f141..71989b8 100644
--- a/public/manifest.json
+++ b/public/manifest.json
@@ -1,5 +1,5 @@
{
- "short_name": "React App",
+ "short_name": "廓形仪",
"name": "Create React App Sample",
"icons": [
{
diff --git a/src/pages/measure/components/MeasureAction.tsx b/src/pages/measure/components/MeasureAction.tsx
index 8c06982..ec8759f 100644
--- a/src/pages/measure/components/MeasureAction.tsx
+++ b/src/pages/measure/components/MeasureAction.tsx
@@ -194,10 +194,10 @@ export default function MeasureAction() {
message.error("请先连接设备");
return;
}
- if(deviceInfo.power < 10){
+ if(deviceInfo.power < 20){
confirm({
title: '电量提示',
- content: '电量低于10%,测量过程会有丢包风险,请确认是否继续测量!',
+ content: '设备电量过低,请及时充电!',
okText:'确认',
cancelText:'取消',
onOk() {
diff --git a/src/pages/measure/components/MeasureDetail.tsx b/src/pages/measure/components/MeasureDetail.tsx
index 58dba0b..fe8f99f 100644
--- a/src/pages/measure/components/MeasureDetail.tsx
+++ b/src/pages/measure/components/MeasureDetail.tsx
@@ -15,7 +15,7 @@ import {
import { getBaseRecordPointSetByCode } from "../../../services/track/trackShape"
import { extraDescType, KTJ_BASE_TYPE } from '../../../services/ktjTypes';
import { GX_CODE } from '../../../constant';
-import { exportFile } from '../../../utils';
+import { exportFile, padNumber } from '../../../utils';
export default function MeasureDetail() {
useEffect(()=>{
queryDictionaryList()
@@ -68,6 +68,9 @@ export default function MeasureDetail() {
{
title: '当天测量序号',
dataIndex: 'todayNumber',
+ render: (_, record) => (
+ padNumber(record.todayNumber, 4)
+ )
},
{
title: '创建者',
diff --git a/src/pages/system/Setting.tsx b/src/pages/system/Setting.tsx
index e4d5ef2..6d3ae2c 100644
--- a/src/pages/system/Setting.tsx
+++ b/src/pages/system/Setting.tsx
@@ -34,22 +34,22 @@ export default function Setting(){
const [bleList, setBleList] = useState([])
const dormancyList = [{
label: '1分钟',
- value: '1',
+ value: 1,
},{
label: '2分钟',
- value: '2',
+ value: 2,
},{
label: '5分钟',
- value: '5',
+ value: 5,
},{
label: '10分钟',
- value: '10',
+ value: 10,
},{
label: '20分钟',
- value: '20',
+ value: 20,
},{
label: '30分钟',
- value: '30',
+ value: 30,
}]
const [standbyMinutes, setStandbyMinutes] = useState(10)
@@ -374,7 +374,7 @@ export default function Setting(){
options={dormancyList}
disabled={deviceInfo.connectedType !== 'BLE_CHANNEL'}
/>
- 确定
+ 确定
diff --git a/src/services/measure/type.ts b/src/services/measure/type.ts
index 8a16254..08b4704 100644
--- a/src/services/measure/type.ts
+++ b/src/services/measure/type.ts
@@ -17,6 +17,7 @@ export type DetailTable = {
dataSource:string;
extraDesc:string;
railSize:string;
+ todayNumber: number
}
export type MeasureRecord = {
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 0b5f71d..3803b80 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -99,4 +99,14 @@ export function exportFile(response: ArrayBuffer, fileName: string){
a.click();
// 释放 URL 对象
window.URL.revokeObjectURL(url);
-}
\ No newline at end of file
+}
+
+export function padNumber(num: number, length: number) {
+ // 将数字转换为字符串
+ let str = num.toString();
+ // 当字符串长度小于指定长度时,在前面补0
+ while (str.length < length) {
+ str = '0' + str;
+ }
+ return str;
+}