diff --git a/electron-builder.yml b/electron-builder.yml
index ce62993..27aef19 100644
--- a/electron-builder.yml
+++ b/electron-builder.yml
@@ -1,7 +1,7 @@
# 应用程序的唯一标识符
appId: gy.calibration.pc
# 应用程序的名称
-productName: 谷云标定工具
+productName: 谷云校表产测
# 定义构建资源和输出文件的目录
directories:
buildResources: build
diff --git a/package.json b/package.json
index 9bfac4c..69e6f62 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "calibration-pc",
- "version": "1.0.4",
+ "version": "1.0.6",
"description": "谷云开发部开发的断路器标定软件",
"main": "./out/main/index.js",
"author": "example.com",
diff --git a/resources/service/config/config.yaml b/resources/service/config/config.yaml
index 3a67e5d..deefde0 100644
--- a/resources/service/config/config.yaml
+++ b/resources/service/config/config.yaml
@@ -1,35 +1,19 @@
server:
- address: ":8888"
- openapiPath: "/api.json"
- swaggerPath: "/swagger"
+ serverMain:
+ address: "8000"
+ serverRoot: "resource/public"
logger:
- level : "all"
- stdout: true
path: "logs"
+ level: "info"
-
-# GRPC Server.
-grpc:
- address: ""
- name: "demo"
- logPath: ""
- logStdout: true
- errorStack: true
- errorLogEnabled: true
- errorLogPattern: "error-{Ymd}.log"
- accessLogEnabled: true
- accessLogPattern: "access-{Ymd}.log"
-
-# Database.
-database:
- logger:
- level: "all"
- stdout: true
-
- default:
- link: "mysql:root:12345678@tcp(127.0.0.1:3306)/test"
- debug: true
-
-plugin:
- path: "./plugins"
\ No newline at end of file
+#台体编号
+equipment: HS-9203M-0001
+#设备总数
+totalNum: 16
+#起始端口号
+startAddr: 3
+#测试源电压波动比例
+fluctuateRatioU: 90
+#测试源电压波动比例
+fluctuateRatioI: 90
\ No newline at end of file
diff --git a/resources/service/data.db b/resources/service/data.db
new file mode 100644
index 0000000..43b8283
Binary files /dev/null and b/resources/service/data.db differ
diff --git a/resources/service/hscom.dll b/resources/service/hscom.dll
new file mode 100644
index 0000000..61508b8
Binary files /dev/null and b/resources/service/hscom.dll differ
diff --git a/resources/service/plugins/gateway.exe b/resources/service/plugins/gateway.exe
deleted file mode 100644
index b32d81d..0000000
Binary files a/resources/service/plugins/gateway.exe and /dev/null differ
diff --git a/resources/service/plugins/serial.exe b/resources/service/plugins/serial.exe
deleted file mode 100644
index 959d7cd..0000000
Binary files a/resources/service/plugins/serial.exe and /dev/null differ
diff --git a/resources/service/protocol.json b/resources/service/protocol.json
new file mode 100644
index 0000000..a9d6d0c
--- /dev/null
+++ b/resources/service/protocol.json
@@ -0,0 +1,713 @@
+[
+ {
+ "key": "c_id",
+ "name": "芯片id",
+ "addr": 0,
+ "len": 4,
+ "dataType": "string",
+ "rwType": "R",
+ "default": "0",
+ "precision": "",
+ "unit": ""
+ },
+ {
+ "id": 0,
+ "key": "calibration_conf",
+ "name": "标定参数",
+ "addr": 30018,
+ "len": 5,
+ "dataType": "struct",
+ "rwType": "R",
+ "default": "",
+ "precision": "",
+ "unit": "",
+ "format": [
+ {
+ "index": 0,
+ "size": 16,
+ "key": "ec",
+ "name": "脉冲常数",
+ "unit": "",
+ "value": "3200"
+ },
+ {
+ "index": 16,
+ "size": 16,
+ "key": "u",
+ "name": "电压",
+ "unit": "V",
+ "value": "220"
+ },
+ {
+ "index": 32,
+ "size": 16,
+ "key": "i",
+ "name": "电流",
+ "unit": "A",
+ "value": "10"
+ },
+ {
+ "index": 48,
+ "size": 16,
+ "key": "pt",
+ "name": "电压比",
+ "unit": "",
+ "value": "1981"
+ },
+ {
+ "index": 64,
+ "size": 16,
+ "key": "ct",
+ "name": "电流比",
+ "unit": "",
+ "value": "2000"
+ },
+ {
+ "index": 80,
+ "size": 16,
+ "key": "ileak",
+ "name": "漏电流",
+ "unit": "mA",
+ "value": "20"
+ },
+ {
+ "index": 96,
+ "size": 8,
+ "key": "ig",
+ "name": "电流通道放大倍数",
+ "unit": "",
+ "value": "0"
+ },
+ {
+ "index": 104,
+ "size": 8,
+ "key": "vg",
+ "name": "电压通道放大倍数",
+ "unit": "",
+ "value": "0"
+ },
+ {
+ "index": 112,
+ "size": 8,
+ "key": "ilg",
+ "name": "漏电流通道放大倍数",
+ "unit": "",
+ "value": "3"
+ },
+ {
+ "index": 120,
+ "size": 8,
+ "key": "reserve",
+ "name": "保留位",
+ "unit": "",
+ "value": "0"
+ },
+ {
+ "index": 128,
+ "size": 32,
+ "key": "isr",
+ "name": "电流采样电阻",
+ "unit": "10mΩ",
+ "value": "440"
+ }
+ ]
+ },
+ {
+ "key": "last_event",
+ "name": "事件",
+ "addr": 50000,
+ "len": 1,
+ "dataType": "string",
+ "rwType": "R",
+ "default": "0",
+ "precision": "",
+ "unit": ""
+ },
+ {
+ "key": "last_event_time",
+ "name": "事件发生时间",
+ "addr": 50001,
+ "len": 1,
+ "dataType": "time",
+ "rwType": "R",
+ "default": "0",
+ "precision": "",
+ "unit": ""
+ },
+ {
+ "key": "update_time",
+ "name": "时间戳",
+ "addr": 50002,
+ "len": 1,
+ "dataType": "time",
+ "rwType": "R",
+ "default": "0",
+ "precision": "",
+ "unit": ""
+ },
+ {
+ "key": "switch",
+ "name": "开关状态",
+ "addr": 50003,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "",
+ "precision": "",
+ "unit": ""
+ },
+ {
+ "key": "Freq",
+ "name": "电网频率",
+ "addr": 50004,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.01",
+ "unit": "Hz"
+ },
+ {
+ "key": "Leak_I",
+ "name": "漏电流/N相电流",
+ "addr": 50005,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "mA"
+ },
+ {
+ "key": "Tn_1",
+ "name": "N相进线温度",
+ "addr": 50006,
+ "len": 1,
+ "dataType": "int32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.1",
+ "unit": "℃"
+ },
+ {
+ "key": "Tn_2",
+ "name": "N相出线温度",
+ "addr": 50007,
+ "len": 1,
+ "dataType": "int32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.1",
+ "unit": "℃"
+ },
+ {
+ "key": "Ua",
+ "name": "A/L相电压",
+ "addr": 50008,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.01",
+ "unit": "V"
+ },
+ {
+ "key": "Ia",
+ "name": "A/L相电流",
+ "addr": 50009,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "A",
+ "critical": "0.2"
+ },
+ {
+ "key": "Pa",
+ "name": "A/L相有功功率",
+ "addr": 50010,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "W"
+ },
+ {
+ "key": "Qa",
+ "name": "A/L相无功功率",
+ "addr": 50011,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "var"
+ },
+ {
+ "key": "Sa",
+ "name": "A/L相视在功率",
+ "addr": 50012,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "va"
+ },
+ {
+ "key": "Pfa",
+ "name": "A/L相功率因数",
+ "addr": 50013,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": ""
+ },
+ {
+ "key": "EPa_H",
+ "name": "A/L相有功电能高32位",
+ "addr": 50014,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "Wh"
+ },
+ {
+ "key": "EPa_L",
+ "name": "A/L相有功电能低32位",
+ "addr": 50015,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "Wh"
+ },
+ {
+ "key": "EQa_H",
+ "name": "A/L相无功电能高32位",
+ "addr": 50016,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "varh"
+ },
+ {
+ "key": "EQa_L",
+ "name": "A/L相无功电能低32位",
+ "addr": 50017,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "varh"
+ },
+ {
+ "key": "Ta_1",
+ "name": "L/A相进线温度",
+ "addr": 50018,
+ "len": 1,
+ "dataType": "int32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.1",
+ "unit": "℃"
+ },
+ {
+ "key": "Ta_2",
+ "name": "L/A相出线温度",
+ "addr": 50019,
+ "len": 1,
+ "dataType": "int32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.1",
+ "unit": "℃"
+ },
+ {
+ "key": "Ub",
+ "name": "B相电压",
+ "addr": 50020,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.01",
+ "unit": "V"
+ },
+ {
+ "key": "Ib",
+ "name": "B相电流",
+ "addr": 50021,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "A",
+ "critical": "0.2"
+ },
+ {
+ "key": "Pb",
+ "name": "B相有功功率 ",
+ "addr": 50022,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "W"
+ },
+ {
+ "key": "Qb",
+ "name": "B相无功功率",
+ "addr": 50023,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "var"
+ },
+ {
+ "key": "Sb",
+ "name": "B相视在功率",
+ "addr": 50024,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "va"
+ },
+ {
+ "key": "Pfb",
+ "name": "B相功率因数",
+ "addr": 50025,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": ""
+ },
+ {
+ "key": "EPb_H",
+ "name": "B相有功电能高32位",
+ "addr": 50026,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "Wh"
+ },
+ {
+ "key": "EPb_L",
+ "name": "B相有功电能低32位",
+ "addr": 50027,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "Wh"
+ },
+ {
+ "key": "EQb_H",
+ "name": "B相无功电能高32位",
+ "addr": 50028,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "varh"
+ },
+ {
+ "key": "EQb_L",
+ "name": "B相无功电能低32位",
+ "addr": 50029,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "varh"
+ },
+ {
+ "key": "Tb_1",
+ "name": "B相进线温度",
+ "addr": 50030,
+ "len": 1,
+ "dataType": "int32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.1",
+ "unit": "℃"
+ },
+ {
+ "key": "Tb_2",
+ "name": "B相出线温度",
+ "addr": 50031,
+ "len": 1,
+ "dataType": "int32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.1",
+ "unit": "℃"
+ },
+ {
+ "key": "Uc",
+ "name": "C相电压",
+ "addr": 50032,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.01",
+ "unit": "V"
+ },
+ {
+ "key": "Ic",
+ "name": "C相电流",
+ "addr": 50033,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "A",
+ "critical": "0.2"
+ },
+ {
+ "key": "Pc",
+ "name": "C相有功功率 ",
+ "addr": 50034,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "W"
+ },
+ {
+ "key": "Qc",
+ "name": "C相无功功率",
+ "addr": 50035,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "var"
+ },
+ {
+ "key": "Sc",
+ "name": "C相视在功率",
+ "addr": 50036,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "va"
+ },
+ {
+ "key": "Pfc",
+ "name": "C相功率因数",
+ "addr": 50037,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": ""
+ },
+ {
+ "key": "EPc_H",
+ "name": "C相有功电能高32位",
+ "addr": 50038,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "Wh"
+ },
+ {
+ "key": "EPc_L",
+ "name": "C相有功电能低32位",
+ "addr": 50039,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "Wh"
+ },
+ {
+ "key": "EQc_H",
+ "name": "C相无功电能高32位",
+ "addr": 50040,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "varh"
+ },
+ {
+ "key": "EQc_L",
+ "name": "C相无功电能低32位",
+ "addr": 50041,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "varh"
+ },
+ {
+ "key": "Tc_1",
+ "name": "C相进线温度",
+ "addr": 50042,
+ "len": 1,
+ "dataType": "int32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.1",
+ "unit": "℃"
+ },
+ {
+ "key": "Tc_2",
+ "name": "C相出线温度",
+ "addr": 50043,
+ "len": 1,
+ "dataType": "int32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.1",
+ "unit": "℃"
+ },
+ {
+ "key": "Usum",
+ "name": "合相电压",
+ "addr": 50044,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.01",
+ "unit": "V"
+ },
+ {
+ "key": "Isum",
+ "name": "合相电流/剩余电流",
+ "addr": 50045,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "A",
+ "critical": "0.2"
+ },
+ {
+ "key": "Psum",
+ "name": "合相有功功率",
+ "addr": 50046,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "W"
+ },
+ {
+ "key": "Qsum",
+ "name": "合相无功功率",
+ "addr": 50047,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "var"
+ },
+ {
+ "key": "Ssum",
+ "name": "RMS 合相视在功率",
+ "addr": 50048,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": "va"
+ },
+ {
+ "key": "Pfsum",
+ "name": "RMS 合相功率因数",
+ "addr": 50049,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "0.001",
+ "unit": ""
+ },
+ {
+ "key": "EPsum_H;",
+ "name": "合相有功电能高32位",
+ "addr": 50050,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "Wh"
+ },
+ {
+ "key": "EPsum_L;",
+ "name": "合相有功电能低32位",
+ "addr": 50051,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "Wh"
+ },
+ {
+ "key": "EQsum_H,;",
+ "name": "合相无功电能高32位",
+ "addr": 50052,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "varh"
+ },
+ {
+ "key": "EQsum_L;",
+ "name": "合相无功电能低32位",
+ "addr": 50053,
+ "len": 1,
+ "dataType": "uint32",
+ "rwType": "R",
+ "default": "0",
+ "precision": "1",
+ "unit": "varh"
+ }
+]
\ No newline at end of file
diff --git a/src/renderer/src/assets/iconfont/iconfont.css b/src/renderer/src/assets/iconfont/iconfont.css
index adc9d80..7d0939d 100644
--- a/src/renderer/src/assets/iconfont/iconfont.css
+++ b/src/renderer/src/assets/iconfont/iconfont.css
@@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 4622943 */
- src: url('iconfont.woff2?t=1751007258575') format('woff2'),
- url('iconfont.woff?t=1751007258575') format('woff'),
- url('iconfont.ttf?t=1751007258575') format('truetype');
+ src: url('iconfont.woff2?t=1752127229460') format('woff2'),
+ url('iconfont.woff?t=1752127229460') format('woff'),
+ url('iconfont.ttf?t=1752127229460') format('truetype');
}
.iconfont {
@@ -13,6 +13,14 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-kuaijiejian:before {
+ content: "\e603";
+}
+
+.icon-sousuo:before {
+ content: "\e60e";
+}
+
.icon-xwtubiaoku-13:before {
content: "\e61a";
}
diff --git a/src/renderer/src/assets/iconfont/iconfont.ttf b/src/renderer/src/assets/iconfont/iconfont.ttf
index d73afde..e442c27 100644
Binary files a/src/renderer/src/assets/iconfont/iconfont.ttf and b/src/renderer/src/assets/iconfont/iconfont.ttf differ
diff --git a/src/renderer/src/assets/iconfont/iconfont.woff b/src/renderer/src/assets/iconfont/iconfont.woff
index f71075b..0160f1c 100644
Binary files a/src/renderer/src/assets/iconfont/iconfont.woff and b/src/renderer/src/assets/iconfont/iconfont.woff differ
diff --git a/src/renderer/src/assets/iconfont/iconfont.woff2 b/src/renderer/src/assets/iconfont/iconfont.woff2
index f7fa963..c982c26 100644
Binary files a/src/renderer/src/assets/iconfont/iconfont.woff2 and b/src/renderer/src/assets/iconfont/iconfont.woff2 differ
diff --git a/src/renderer/src/views/calibration/index.vue b/src/renderer/src/views/calibration/index.vue
index 08eb1b9..3dadb0b 100644
--- a/src/renderer/src/views/calibration/index.vue
+++ b/src/renderer/src/views/calibration/index.vue
@@ -7,7 +7,8 @@
设备端口: {{ device.devicePort || '无' }}
标定结果: - {{ - device.result === 1 ? '成功' : device.result === -1 ? '失败' : '未标定' || '无' + {{ + device.result === 1 ? '成功' : device.result === -1 ? '失败' : device.result === 2 ? '标定中' : '未标定' || '无' }}
@@ -89,8 +93,39 @@