windows提交
This commit is contained in:
12
.roo/mcp.json
Normal file
12
.roo/mcp.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"mcpServers": {
|
||||
"filesystem": {
|
||||
"command": "npx",
|
||||
"args": [
|
||||
"-y",
|
||||
"@modelcontextprotocol/server-filesystem",
|
||||
"./"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
3
doc/数据查看前端文档.md
Normal file
3
doc/数据查看前端文档.md
Normal file
@ -0,0 +1,3 @@
|
||||
1 函数 invoke("getoneirisfile",{path:"iris_data_example.iris"}) 返回一次数据
|
||||
|
||||
2 fs
|
@ -2,6 +2,6 @@ C:\Users\xin\AppData\Local\Programs\CLion\bin\cmake\win\x64\bin\cmake.exe -DCMAK
|
||||
-- FOUND CSerialPort, E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/debug/lib/libcserialport.lib
|
||||
-- CSerialPort_INCLUDE_DIR: E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/include
|
||||
-- CSerialPort_LIBRARY: E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/debug/lib/libcserialport.lib
|
||||
-- Configuring done (1.2s)
|
||||
-- Generating done (0.4s)
|
||||
-- Configuring done (0.5s)
|
||||
-- Generating done (0.1s)
|
||||
-- Build files have been written to: D:/06Learn/rust/tarui/myfirst_tauri/myis11/project/is3/cmake-build-debug-visual-studio
|
||||
|
@ -3,7 +3,7 @@
|
||||
21 907 7659725145667238 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3_INST.cpp.obj 3c5858a3264438b4
|
||||
33 941 7659725145778173 CMakeFiles/is3test.dir/testmain.cpp.obj 905a72b1ea8bf22c
|
||||
2 616 7669134105668608 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 96f167c4e5f0d851
|
||||
1 71 7677050246360766 build.ninja 7106bca1f4b570da
|
||||
1 71 7725385590380927 build.ninja 7106bca1f4b570da
|
||||
27 1400 7659725145725854 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj 4364cfe7f408eeb7
|
||||
4 94 7630155613477022 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/thirdpart/iris_proto_tool/src/IRIS_Method.cpp.obj 366a7a8636d2dadc
|
||||
617 1030 7669134111816719 iris_is3lib.dll c7564dfa3e9c17a2
|
||||
|
@ -2,6 +2,6 @@ C:\Users\xin\AppData\Local\Programs\CLion\bin\cmake\win\x64\bin\cmake.exe -DCMAK
|
||||
-- FOUND CSerialPort, E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/lib/libcserialport.lib
|
||||
-- CSerialPort_INCLUDE_DIR: E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/include
|
||||
-- CSerialPort_LIBRARY: E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/lib/libcserialport.lib
|
||||
-- Configuring done (1.2s)
|
||||
-- Generating done (0.3s)
|
||||
-- Configuring done (0.5s)
|
||||
-- Generating done (0.1s)
|
||||
-- Build files have been written to: D:/06Learn/rust/tarui/myfirst_tauri/myis11/project/is3/cmake-build-release-visual-studio
|
||||
|
418
package-lock.json
generated
418
package-lock.json
generated
@ -18,12 +18,14 @@
|
||||
"element-plus": "^2.4.4",
|
||||
"json-editor-vue3": "^1.1.1",
|
||||
"less": "^4.2.0",
|
||||
"maptalks": "^1.1.3",
|
||||
"markdown-it": "^14.1.0",
|
||||
"mitt": "^3.0.1",
|
||||
"serialport": "^12.0.0",
|
||||
"vue": "^3.3.4",
|
||||
"vue-drag-resize": "^2.0.3",
|
||||
"vue-json-viewer": "^3.0.4",
|
||||
"vue-markdown-render": "^2.2.1",
|
||||
"vue3-json-editor": "^1.1.5",
|
||||
"vue3-konami-code": "^1.0.0"
|
||||
},
|
||||
@ -631,6 +633,25 @@
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
||||
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
|
||||
},
|
||||
"node_modules/@maptalks/feature-filter": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@maptalks/feature-filter/-/feature-filter-1.3.0.tgz",
|
||||
"integrity": "sha512-O6GcFzPuCbz6bO4TNBnmP8VunS0GexTzZ4m36A4HbYQICY1cplpFgntX2fyB/TY3cZrFRGoeMePBeMZFMOOhcQ=="
|
||||
},
|
||||
"node_modules/@maptalks/function-type": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@maptalks/function-type/-/function-type-1.4.1.tgz",
|
||||
"integrity": "sha512-Z78FdI8mZ4vdcBqxlMDV6HP6WE/njZ9PhlM5JwbURxW1DnQK7R1GP+fubkGJPP6hVSv0Y52/dK8cZE/HuXVZ3A==",
|
||||
"dependencies": {
|
||||
"colorin": "^0.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@maptalks/function-type/node_modules/colorin": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/colorin/-/colorin-0.5.0.tgz",
|
||||
"integrity": "sha512-gN6fIMCehYUonAhbmm5+ZHeFunG75u77hI2tRlVndNthO6v0wZMV2G2FwYSi8Ws4b4lpFJK1ql2a/MlW9z/Vhg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
@ -746,7 +767,6 @@
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@ -914,7 +934,6 @@
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@ -1723,10 +1742,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
||||
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0"
|
||||
}
|
||||
@ -1834,6 +1854,12 @@
|
||||
"simple-swizzle": "^0.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/colorin": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/colorin/-/colorin-0.6.0.tgz",
|
||||
"integrity": "sha512-huI54MwKNMP6eypurqzxGf7rvTA3pNWdXZopQbN7v3TDxXYWyyGQ3CtQndNZ2Z0Gy6HDWqA7sRYxbjRDO2FZMA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/compute-scroll-into-view": {
|
||||
"version": "1.0.20",
|
||||
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.20.tgz",
|
||||
@ -2234,6 +2260,12 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/frustum-intersects": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/frustum-intersects/-/frustum-intersects-0.1.0.tgz",
|
||||
"integrity": "sha512-W0S6dmX5LJLtamimyuKhvbkpDTm5eVfMgk4X9yXNyWQ1zZ/cMm0PZoeX9Pm0tL302l+erQVrdfRGhV3ILfeTeQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fsevents": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||
@ -2536,9 +2568,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/koa": {
|
||||
"version": "2.16.0",
|
||||
"resolved": "https://registry.npmjs.org/koa/-/koa-2.16.0.tgz",
|
||||
"integrity": "sha512-Afhqq0Vq3W7C+/rW6IqHVBDLzqObwZ07JaUNUEF8yCQ6afiyFE3RAy+i7V0E46XOWlH7vPWn/x0vsZwNy6PWxw==",
|
||||
"version": "2.16.1",
|
||||
"resolved": "https://registry.npmjs.org/koa/-/koa-2.16.1.tgz",
|
||||
"integrity": "sha512-umfX9d3iuSxTQP4pnzLOz0HKnPg0FaUUIKcye2lOiz3KPu1Y3M3xlz76dISdFPQs37P9eJz1wUpcTS6KDPn9fA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"accepts": "^1.3.5",
|
||||
@ -2644,6 +2676,12 @@
|
||||
"source-map": "~0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/lineclip": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/lineclip/-/lineclip-1.1.5.tgz",
|
||||
"integrity": "sha512-KlA/wRSjpKl7tS9iRUdlG72oQ7qZ1IlVbVgHwoO10TBR/4gQ86uhKow6nlzMAJJhjCWKto8OeoAzzIzKSmN25A==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/linkify-it": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz",
|
||||
@ -2710,6 +2748,25 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/maptalks": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/maptalks/-/maptalks-1.1.3.tgz",
|
||||
"integrity": "sha512-swf+5/h7s9SyHgnz5Gnnocjq1TVBbmazZnP2iPN+bzbNTf0ExnjVCiqml9wuPHBcUW3LCzjLqzL6KCB0CVCv+g==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@maptalks/feature-filter": "^1.3.0",
|
||||
"@maptalks/function-type": "^1.4.1",
|
||||
"colorin": "^0.6.0",
|
||||
"frustum-intersects": "^0.1.0",
|
||||
"lineclip": "^1.1.5",
|
||||
"rbush": "^2.0.2",
|
||||
"simplify-js": "^1.2.1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-darwin-x64": "^4.13.0",
|
||||
"@rollup/rollup-linux-x64-gnu": "^4.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/markdown-it": {
|
||||
"version": "14.1.0",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz",
|
||||
@ -3095,6 +3152,21 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/quickselect": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/quickselect/-/quickselect-1.1.1.tgz",
|
||||
"integrity": "sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/rbush": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/rbush/-/rbush-2.0.2.tgz",
|
||||
"integrity": "sha512-XBOuALcTm+O/H8G90b6pzu6nX6v2zCKiFG4BJho8a+bY6AER6t8uQUZdi5bomQc0AprCWhEGa7ncAbbRap0bRA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"quickselect": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/readdirp": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
||||
@ -3298,6 +3370,12 @@
|
||||
"is-arrayish": "^0.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/simplify-js": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/simplify-js/-/simplify-js-1.2.4.tgz",
|
||||
"integrity": "sha512-vITfSlwt7h/oyrU42R83mtzFpwYk3+mkH9bOHqq/Qw6n8rtR7aE3NZQ5fbcyCUVVmuMJR6ynsAhOfK2qoah8Jg==",
|
||||
"license": "BSD-2-Clause"
|
||||
},
|
||||
"node_modules/source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
@ -3341,6 +3419,51 @@
|
||||
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
|
||||
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
|
||||
},
|
||||
"node_modules/tinyglobby": {
|
||||
"version": "0.2.14",
|
||||
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz",
|
||||
"integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fdir": "^6.4.4",
|
||||
"picomatch": "^4.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/SuperchupuDev"
|
||||
}
|
||||
},
|
||||
"node_modules/tinyglobby/node_modules/fdir": {
|
||||
"version": "6.4.6",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz",
|
||||
"integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"picomatch": "^3 || ^4"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"picomatch": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/tinyglobby/node_modules/picomatch": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
|
||||
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/to-regex-range": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://mirrors.cloud.tencent.com/npm/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
@ -3481,15 +3604,18 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "6.2.3",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.2.3.tgz",
|
||||
"integrity": "sha512-IzwM54g4y9JA/xAeBPNaDXiBF8Jsgl3VBQ2YQ/wOY6fyW3xMdSoltIV3Bo59DErdqdE6RxUfv8W69DvUorE4Eg==",
|
||||
"version": "6.3.5",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz",
|
||||
"integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"fdir": "^6.4.4",
|
||||
"picomatch": "^4.0.2",
|
||||
"postcss": "^8.5.3",
|
||||
"rollup": "^4.30.1"
|
||||
"rollup": "^4.34.9",
|
||||
"tinyglobby": "^0.2.13"
|
||||
},
|
||||
"bin": {
|
||||
"vite": "bin/vite.js"
|
||||
@ -3552,6 +3678,34 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/vite/node_modules/fdir": {
|
||||
"version": "6.4.6",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz",
|
||||
"integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"picomatch": "^3 || ^4"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"picomatch": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/vite/node_modules/picomatch": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
|
||||
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/vue": {
|
||||
"version": "3.4.21",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.21.tgz",
|
||||
@ -3588,6 +3742,67 @@
|
||||
"vue": "^3.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/vue-markdown-render": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/vue-markdown-render/-/vue-markdown-render-2.2.1.tgz",
|
||||
"integrity": "sha512-XkYnC0PMdbs6Vy6j/gZXSvCuOS0787Se5COwXlepRqiqPiunyCIeTPQAO2XnB4Yl04EOHXwLx5y6IuszMWSgyQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"markdown-it": "^13.0.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/vue-markdown-render/node_modules/entities": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
|
||||
"integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==",
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/fb55/entities?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/vue-markdown-render/node_modules/linkify-it": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz",
|
||||
"integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"uc.micro": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/vue-markdown-render/node_modules/markdown-it": {
|
||||
"version": "13.0.2",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.2.tgz",
|
||||
"integrity": "sha512-FtwnEuuK+2yVU7goGn/MJ0WBZMM9ZPgU9spqlFs7/A/pDIUNSOQZhUgOqYCficIuR2QaFnrt8LHqBWsbTAoI5w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"argparse": "^2.0.1",
|
||||
"entities": "~3.0.1",
|
||||
"linkify-it": "^4.0.1",
|
||||
"mdurl": "^1.0.1",
|
||||
"uc.micro": "^1.0.5"
|
||||
},
|
||||
"bin": {
|
||||
"markdown-it": "bin/markdown-it.js"
|
||||
}
|
||||
},
|
||||
"node_modules/vue-markdown-render/node_modules/mdurl": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
|
||||
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/vue-markdown-render/node_modules/uc.micro": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
|
||||
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/vue3-json-editor": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/vue3-json-editor/-/vue3-json-editor-1.1.5.tgz",
|
||||
@ -3920,6 +4135,26 @@
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
||||
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
|
||||
},
|
||||
"@maptalks/feature-filter": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@maptalks/feature-filter/-/feature-filter-1.3.0.tgz",
|
||||
"integrity": "sha512-O6GcFzPuCbz6bO4TNBnmP8VunS0GexTzZ4m36A4HbYQICY1cplpFgntX2fyB/TY3cZrFRGoeMePBeMZFMOOhcQ=="
|
||||
},
|
||||
"@maptalks/function-type": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@maptalks/function-type/-/function-type-1.4.1.tgz",
|
||||
"integrity": "sha512-Z78FdI8mZ4vdcBqxlMDV6HP6WE/njZ9PhlM5JwbURxW1DnQK7R1GP+fubkGJPP6hVSv0Y52/dK8cZE/HuXVZ3A==",
|
||||
"requires": {
|
||||
"colorin": "^0.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"colorin": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/colorin/-/colorin-0.5.0.tgz",
|
||||
"integrity": "sha512-gN6fIMCehYUonAhbmm5+ZHeFunG75u77hI2tRlVndNthO6v0wZMV2G2FwYSi8Ws4b4lpFJK1ql2a/MlW9z/Vhg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
@ -3987,7 +4222,6 @@
|
||||
"version": "4.38.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.38.0.tgz",
|
||||
"integrity": "sha512-Mgcmc78AjunP1SKXl624vVBOF2bzwNWFPMP4fpOu05vS0amnLcX8gHIge7q/lDAHy3T2HeR0TqrriZDQS2Woeg==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"@rollup/rollup-freebsd-arm64": {
|
||||
@ -4071,7 +4305,6 @@
|
||||
"version": "4.38.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.38.0.tgz",
|
||||
"integrity": "sha512-vPvNgFlZRAgO7rwncMeE0+8c4Hmc+qixnp00/Uv3ht2x7KYrJ6ERVd3/R0nUtlE6/hu7/HiiNHJ/rP6knRFt1w==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"@rollup/rollup-linux-x64-musl": {
|
||||
@ -4557,9 +4790,9 @@
|
||||
}
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
||||
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0"
|
||||
@ -4649,6 +4882,11 @@
|
||||
"simple-swizzle": "^0.2.2"
|
||||
}
|
||||
},
|
||||
"colorin": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/colorin/-/colorin-0.6.0.tgz",
|
||||
"integrity": "sha512-huI54MwKNMP6eypurqzxGf7rvTA3pNWdXZopQbN7v3TDxXYWyyGQ3CtQndNZ2Z0Gy6HDWqA7sRYxbjRDO2FZMA=="
|
||||
},
|
||||
"compute-scroll-into-view": {
|
||||
"version": "1.0.20",
|
||||
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.20.tgz",
|
||||
@ -4939,6 +5177,11 @@
|
||||
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
||||
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="
|
||||
},
|
||||
"frustum-intersects": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/frustum-intersects/-/frustum-intersects-0.1.0.tgz",
|
||||
"integrity": "sha512-W0S6dmX5LJLtamimyuKhvbkpDTm5eVfMgk4X9yXNyWQ1zZ/cMm0PZoeX9Pm0tL302l+erQVrdfRGhV3ILfeTeQ=="
|
||||
},
|
||||
"fsevents": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||
@ -5166,9 +5409,9 @@
|
||||
}
|
||||
},
|
||||
"koa": {
|
||||
"version": "2.16.0",
|
||||
"resolved": "https://registry.npmjs.org/koa/-/koa-2.16.0.tgz",
|
||||
"integrity": "sha512-Afhqq0Vq3W7C+/rW6IqHVBDLzqObwZ07JaUNUEF8yCQ6afiyFE3RAy+i7V0E46XOWlH7vPWn/x0vsZwNy6PWxw==",
|
||||
"version": "2.16.1",
|
||||
"resolved": "https://registry.npmjs.org/koa/-/koa-2.16.1.tgz",
|
||||
"integrity": "sha512-umfX9d3iuSxTQP4pnzLOz0HKnPg0FaUUIKcye2lOiz3KPu1Y3M3xlz76dISdFPQs37P9eJz1wUpcTS6KDPn9fA==",
|
||||
"requires": {
|
||||
"accepts": "^1.3.5",
|
||||
"cache-content-type": "^1.0.0",
|
||||
@ -5257,6 +5500,11 @@
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"lineclip": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/lineclip/-/lineclip-1.1.5.tgz",
|
||||
"integrity": "sha512-KlA/wRSjpKl7tS9iRUdlG72oQ7qZ1IlVbVgHwoO10TBR/4gQ86uhKow6nlzMAJJhjCWKto8OeoAzzIzKSmN25A=="
|
||||
},
|
||||
"linkify-it": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz",
|
||||
@ -5309,6 +5557,22 @@
|
||||
"semver": "^5.6.0"
|
||||
}
|
||||
},
|
||||
"maptalks": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/maptalks/-/maptalks-1.1.3.tgz",
|
||||
"integrity": "sha512-swf+5/h7s9SyHgnz5Gnnocjq1TVBbmazZnP2iPN+bzbNTf0ExnjVCiqml9wuPHBcUW3LCzjLqzL6KCB0CVCv+g==",
|
||||
"requires": {
|
||||
"@maptalks/feature-filter": "^1.3.0",
|
||||
"@maptalks/function-type": "^1.4.1",
|
||||
"@rollup/rollup-darwin-x64": "^4.13.0",
|
||||
"@rollup/rollup-linux-x64-gnu": "^4.13.0",
|
||||
"colorin": "^0.6.0",
|
||||
"frustum-intersects": "^0.1.0",
|
||||
"lineclip": "^1.1.5",
|
||||
"rbush": "^2.0.2",
|
||||
"simplify-js": "^1.2.1"
|
||||
}
|
||||
},
|
||||
"markdown-it": {
|
||||
"version": "14.1.0",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz",
|
||||
@ -5568,6 +5832,19 @@
|
||||
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
|
||||
"dev": true
|
||||
},
|
||||
"quickselect": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/quickselect/-/quickselect-1.1.1.tgz",
|
||||
"integrity": "sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ=="
|
||||
},
|
||||
"rbush": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/rbush/-/rbush-2.0.2.tgz",
|
||||
"integrity": "sha512-XBOuALcTm+O/H8G90b6pzu6nX6v2zCKiFG4BJho8a+bY6AER6t8uQUZdi5bomQc0AprCWhEGa7ncAbbRap0bRA==",
|
||||
"requires": {
|
||||
"quickselect": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"readdirp": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
||||
@ -5711,6 +5988,11 @@
|
||||
"is-arrayish": "^0.3.1"
|
||||
}
|
||||
},
|
||||
"simplify-js": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/simplify-js/-/simplify-js-1.2.4.tgz",
|
||||
"integrity": "sha512-vITfSlwt7h/oyrU42R83mtzFpwYk3+mkH9bOHqq/Qw6n8rtR7aE3NZQ5fbcyCUVVmuMJR6ynsAhOfK2qoah8Jg=="
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
@ -5738,6 +6020,31 @@
|
||||
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
|
||||
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
|
||||
},
|
||||
"tinyglobby": {
|
||||
"version": "0.2.14",
|
||||
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz",
|
||||
"integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fdir": "^6.4.4",
|
||||
"picomatch": "^4.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"fdir": {
|
||||
"version": "6.4.6",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz",
|
||||
"integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"picomatch": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
|
||||
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"to-regex-range": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://mirrors.cloud.tencent.com/npm/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
@ -5839,15 +6146,33 @@
|
||||
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
|
||||
},
|
||||
"vite": {
|
||||
"version": "6.2.3",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.2.3.tgz",
|
||||
"integrity": "sha512-IzwM54g4y9JA/xAeBPNaDXiBF8Jsgl3VBQ2YQ/wOY6fyW3xMdSoltIV3Bo59DErdqdE6RxUfv8W69DvUorE4Eg==",
|
||||
"version": "6.3.5",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz",
|
||||
"integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"esbuild": "^0.25.0",
|
||||
"fdir": "^6.4.4",
|
||||
"fsevents": "~2.3.3",
|
||||
"picomatch": "^4.0.2",
|
||||
"postcss": "^8.5.3",
|
||||
"rollup": "^4.30.1"
|
||||
"rollup": "^4.34.9",
|
||||
"tinyglobby": "^0.2.13"
|
||||
},
|
||||
"dependencies": {
|
||||
"fdir": {
|
||||
"version": "6.4.6",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz",
|
||||
"integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"picomatch": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
|
||||
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"vue": {
|
||||
@ -5875,6 +6200,51 @@
|
||||
"clipboard": "^2.0.4"
|
||||
}
|
||||
},
|
||||
"vue-markdown-render": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/vue-markdown-render/-/vue-markdown-render-2.2.1.tgz",
|
||||
"integrity": "sha512-XkYnC0PMdbs6Vy6j/gZXSvCuOS0787Se5COwXlepRqiqPiunyCIeTPQAO2XnB4Yl04EOHXwLx5y6IuszMWSgyQ==",
|
||||
"requires": {
|
||||
"markdown-it": "^13.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"entities": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
|
||||
"integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q=="
|
||||
},
|
||||
"linkify-it": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz",
|
||||
"integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",
|
||||
"requires": {
|
||||
"uc.micro": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"markdown-it": {
|
||||
"version": "13.0.2",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.2.tgz",
|
||||
"integrity": "sha512-FtwnEuuK+2yVU7goGn/MJ0WBZMM9ZPgU9spqlFs7/A/pDIUNSOQZhUgOqYCficIuR2QaFnrt8LHqBWsbTAoI5w==",
|
||||
"requires": {
|
||||
"argparse": "^2.0.1",
|
||||
"entities": "~3.0.1",
|
||||
"linkify-it": "^4.0.1",
|
||||
"mdurl": "^1.0.1",
|
||||
"uc.micro": "^1.0.5"
|
||||
}
|
||||
},
|
||||
"mdurl": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
|
||||
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="
|
||||
},
|
||||
"uc.micro": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
|
||||
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"vue3-json-editor": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/vue3-json-editor/-/vue3-json-editor-1.1.5.tgz",
|
||||
|
@ -21,12 +21,14 @@
|
||||
"element-plus": "^2.4.4",
|
||||
"json-editor-vue3": "^1.1.1",
|
||||
"less": "^4.2.0",
|
||||
"maptalks": "^1.1.3",
|
||||
"markdown-it": "^14.1.0",
|
||||
"mitt": "^3.0.1",
|
||||
"serialport": "^12.0.0",
|
||||
"vue": "^3.3.4",
|
||||
"vue-drag-resize": "^2.0.3",
|
||||
"vue-json-viewer": "^3.0.4",
|
||||
"vue-markdown-render": "^2.2.1",
|
||||
"vue3-json-editor": "^1.1.5",
|
||||
"vue3-konami-code": "^1.0.0"
|
||||
},
|
||||
|
@ -1,12 +0,0 @@
|
||||
[Setup]
|
||||
AppName=MyApp
|
||||
AppVersion=1.0
|
||||
DefaultDirName={pf}\MyApp
|
||||
OutputDir=.
|
||||
OutputBaseFilename=MyAppInstaller
|
||||
|
||||
[Files]
|
||||
Source: "src-tauri/target/release/bundle/msi/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\path\to\vsruntime\installer.exe"; Parameters: "/quiet /norestart"; Flags: waituntilterminated
|
@ -1 +1 @@
|
||||
{"pathofsave":null,"Filename":"testaa","caijiavgNumber":"1","useSG":false,"usehighpass":false,"Dispatcher":{"isenable":true,"begin":"06:25","end":"23:59"},"sensor_typeforset":"IS3"}
|
||||
{"pathofsave":"C:\\Program Files\\lucamtool","Filename":"testaa","caijiavgNumber":"1","useSG":false,"usehighpass":false,"Dispatcher":{"isenable":true,"begin":"06:25","end":"23:59"},"sensor_typeforset":"IS3"}
|
BIN
src-tauri/iris_data_example.iris
Normal file
BIN
src-tauri/iris_data_example.iris
Normal file
Binary file not shown.
Binary file not shown.
189
src-tauri/src/irisdatamanager/mod.rs
Normal file
189
src-tauri/src/irisdatamanager/mod.rs
Normal file
@ -0,0 +1,189 @@
|
||||
use std::fmt::format;
|
||||
|
||||
use chrono::Datelike;
|
||||
use chrono::Timelike;
|
||||
use serde_json::json;
|
||||
|
||||
use crate::myformatiris::structures::*;
|
||||
use crate::myformatiris::read::*;
|
||||
use crate::myformatiris::write::*;
|
||||
|
||||
|
||||
pub fn savecalibratefileIRIS(Gain:serde_json::Value,direction: bool, filepath: String, dndata: serde_json::Value, lampdata: serde_json::Value, devinfo: serde_json::Value) -> String {
|
||||
//输出 输入参数
|
||||
//println!("Gain: {:?}", Gain);
|
||||
// println!("direction: {:?}", direction);
|
||||
// println!("Filepath: {:?}", devinfo);
|
||||
// println!("DNData: {:?}", dndata);
|
||||
// println!("Lampdata: {:?}", lampdata);
|
||||
// println!("Devinfo: {:?}", devinfo);
|
||||
let mut oneirisdata:OneIRISData = OneIRISData::new();
|
||||
let mut spectraldatagain: SpectralData= SpectralData::new();
|
||||
spectraldatagain.name= devinfo["name"].as_str().unwrap_or("Unknown").to_string()+&"_".to_string()+&devinfo["serialnumber"].as_str().unwrap_or("Unknown").to_string()+&"_gain".to_string();
|
||||
spectraldatagain.sensor_id= devinfo["name"].as_str().unwrap_or("Unknown").to_string()+&devinfo["serialnumber"].as_str().unwrap_or("Unknown").to_string();
|
||||
spectraldatagain.bands= devinfo["bands"].as_u64().unwrap_or(0) as u16;
|
||||
spectraldatagain.pixel_size=8;
|
||||
spectraldatagain.data_type=DATA_TYPE_FLOAT64;
|
||||
spectraldatagain.fiber_id=direction as u8;
|
||||
spectraldatagain.exposure=Gain["shutter_time"].as_u64().unwrap_or(0) as f64;
|
||||
spectraldatagain.gain=Gain["sensor_gain"].as_f64().unwrap_or(1.0) as f32;
|
||||
let datenow = chrono::Local::now();
|
||||
let nowtiem= TimeStruct {
|
||||
|
||||
time_zone:50,
|
||||
year:datenow.year() as u16,
|
||||
month:datenow.month() as u8,
|
||||
day:datenow.day() as u8,
|
||||
hour:datenow.hour() as u8,
|
||||
minute:datenow.minute() as u8,
|
||||
second:datenow.second() as u8,
|
||||
millisecond:datenow.timestamp_subsec_millis() as u16,
|
||||
};
|
||||
spectraldatagain.collection_time=nowtiem.clone();
|
||||
spectraldatagain.ground_type=Target_Spectral_Type_CaliFile_Gain;
|
||||
spectraldatagain.valid_flag=1;
|
||||
let spectraldatavec:Vec<f64>=Gain["Data"].as_array().unwrap_or(&vec![]).iter()
|
||||
.map(|x| x.as_f64().unwrap_or(0.0))
|
||||
.collect::<Vec<f64>>();
|
||||
spectraldatagain.Set_Spectral_Data(spectraldatavec, DATA_TYPE_FLOAT64);
|
||||
println!("spectraldata.name: {:?}", spectraldatagain.name);
|
||||
oneirisdata.spectral_data_section.push(spectraldatagain);
|
||||
let mut spectraldata_dn: SpectralData= SpectralData::new();
|
||||
spectraldata_dn.name= devinfo["name"].as_str().unwrap_or("Unknown").to_string()+&"_".to_string()+&devinfo["serialnumber"].as_str().unwrap_or("Unknown").to_string()+&"_dn".to_string();
|
||||
spectraldata_dn.sensor_id= devinfo["name"].as_str().unwrap_or("Unknown").to_string()+&devinfo["serialnumber"].as_str().unwrap_or("Unknown").to_string();
|
||||
spectraldata_dn.bands= devinfo["bands"].as_u64().unwrap_or(0) as u16;
|
||||
spectraldata_dn.pixel_size=8;
|
||||
spectraldata_dn.fiber_id=direction as u8;
|
||||
spectraldata_dn.exposure=dndata["shutter_time"].as_u64().unwrap_or(0) as f64;
|
||||
spectraldata_dn.gain=dndata["gain"].as_f64().unwrap_or(1.0) as f32;
|
||||
spectraldata_dn.data_type=DATA_TYPE_FLOAT64;
|
||||
spectraldata_dn.collection_time=nowtiem.clone();
|
||||
spectraldata_dn.ground_type=Target_Spectral_Type_DN;
|
||||
spectraldata_dn.valid_flag=1;
|
||||
let spectraldatavec_dn:Vec<f64>=dndata["data"].as_array().unwrap_or(&vec![]).iter()
|
||||
.map(|x| x.as_f64().unwrap_or(0.0))
|
||||
.collect::<Vec<f64>>();
|
||||
spectraldata_dn.Set_Spectral_Data(spectraldatavec_dn, DATA_TYPE_FLOAT64);
|
||||
println!("spectraldata_dn.name: {:?}", spectraldata_dn.name);
|
||||
oneirisdata.spectral_data_section.push(spectraldata_dn);
|
||||
let mut spectraldata_lamp: SpectralData= SpectralData::new();
|
||||
let lampvalue= lampdata["value_lable"].as_str().unwrap_or("Unknown");
|
||||
let datalabel= lampdata["data_value"].as_str().unwrap_or("Unknown");
|
||||
spectraldata_lamp.name= devinfo["name"].as_str().unwrap_or("Unknown").to_string()+&"_".to_string()+&devinfo["serialnumber"].as_str().unwrap_or("Unknown").to_string()+&"_lamplable_".to_string()+&lampvalue.to_string()+&"_datalabel_".to_string()+&datalabel.to_string();
|
||||
spectraldata_lamp.sensor_id= devinfo["name"].as_str().unwrap_or("Unknown").to_string()+&devinfo["serialnumber"].as_str().unwrap_or("Unknown").to_string();
|
||||
let lampvalue_f64_vec= lampdata["data"].as_array().unwrap_or(&vec![]).iter()
|
||||
.map(|x| x.as_f64().unwrap_or(0.0))
|
||||
.collect::<Vec<f64>>();
|
||||
spectraldata_lamp.Set_Spectral_Data(lampvalue_f64_vec, DATA_TYPE_FLOAT64);
|
||||
spectraldata_lamp.ground_type=Target_LAMP_VALUE_SCALED;
|
||||
oneirisdata.spectral_data_section.push(spectraldata_lamp);
|
||||
|
||||
let spectraldata_devinfo= json!(
|
||||
{
|
||||
"info_type": "devinfo", // 0 for device info
|
||||
"sensor_id": devinfo["serialnumber"].as_str().unwrap_or("Unknown").to_string(),
|
||||
"wave_coeff": {
|
||||
"a1": devinfo["bochangxishu"]["a1"].as_f64().unwrap_or(0.0),
|
||||
"a2": devinfo["bochangxishu"]["a2"].as_f64().unwrap_or(0.0),
|
||||
"a3": devinfo["bochangxishu"]["a3"].as_f64().unwrap_or(0.0),
|
||||
"a4": devinfo["bochangxishu"]["a4"].as_f64().unwrap_or(0.0)
|
||||
}
|
||||
|
||||
}
|
||||
);
|
||||
let environment_info= json!(
|
||||
{
|
||||
"info_type": "environment", // 1 for environment info
|
||||
"date": format!("{}-{:02}-{:02} {:02}:{:02}:{:02}",
|
||||
datenow.year(),
|
||||
datenow.month(),
|
||||
datenow.day(),
|
||||
datenow.hour(),
|
||||
datenow.minute(),
|
||||
datenow.second()
|
||||
),
|
||||
|
||||
|
||||
}
|
||||
);
|
||||
/*
|
||||
let spectraldata_devinfo= json!(
|
||||
{
|
||||
"info_type": "infolist", // 0 for device info
|
||||
"info_number":3,
|
||||
"info_list": [
|
||||
{
|
||||
"info_type": "devinfo", // 0 for device info
|
||||
"sensor_id": "is30002",
|
||||
"bandnum": 2048,
|
||||
"wave_coeff": {
|
||||
"a1": 0.0,
|
||||
"a2": 0.0,
|
||||
"a3": 400,
|
||||
"a4": 1.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"info_type": "environment", // 1 for gain info
|
||||
"date": "2000-01-00 00:00:00",
|
||||
//下面可选
|
||||
"humidity":90.0,
|
||||
"temperature":35.0 ,
|
||||
"gps":{
|
||||
"latitude":115.01,
|
||||
"longitude": 39.01,
|
||||
"altitude": 100.0
|
||||
},
|
||||
},
|
||||
{
|
||||
"info_type": "devinfo", // 0 for device info
|
||||
"sensor_id": "is20001",
|
||||
"bandnum": 512,
|
||||
"wave_coeff": {
|
||||
"a1": 0,
|
||||
"a2": 0.0,
|
||||
"a3":390,
|
||||
"a4": 4
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
);
|
||||
*/
|
||||
|
||||
// spectraldata_devinfo.sensor_id=devinfo["serialnumber"].as_str().unwrap_or("Unknown").to_string();
|
||||
// spectraldata_devinfo.wave_coeff[0]=devinfo["bochangxishu"]["a1"].as_f64().unwrap_or(0.0);
|
||||
// spectraldata_devinfo.wave_coeff[1]=devinfo["bochangxishu"]["a2"].as_f64().unwrap_or(0.0);
|
||||
// spectraldata_devinfo.wave_coeff[2]=devinfo["bochangxishu"]["a3"].as_f64().unwrap_or(0.0);
|
||||
// spectraldata_devinfo.wave_coeff[3]=devinfo["bochangxishu"]["a4"].as_f64().unwrap_or(0.0);
|
||||
|
||||
oneirisdata.spectral_info_section.push(spectraldata_devinfo);
|
||||
oneirisdata.spectral_info_section.push(environment_info);
|
||||
|
||||
// 修复后的代码
|
||||
let filesave_date = format!("{}_{:04}{:02}{:02}",
|
||||
filepath, // 如果 filepath 是 String,这里会自动借用
|
||||
datenow.year(),
|
||||
datenow.month(),
|
||||
|
||||
datenow.day()
|
||||
);
|
||||
let filesavepath=filesave_date.clone()+".iris";
|
||||
|
||||
wirte_iris_data(&oneirisdata, &filesavepath);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
"ok".to_string()
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
mod irisdatamanager;
|
||||
mod algorithm;
|
||||
mod mylog;
|
||||
mod serport;
|
||||
@ -8,12 +8,13 @@ mod iris_spectral;
|
||||
mod irishypersptral;
|
||||
mod mydefine;
|
||||
mod comman1;
|
||||
mod myformatiris;
|
||||
use comman1::*;
|
||||
use algorithm::interpolate_spline;
|
||||
use algorithm::sg_smooth;
|
||||
use mydefine::*;
|
||||
use iris_spectral::spectralbase::Senortype;
|
||||
|
||||
use myformatiris::getoneirisfile;
|
||||
enum DevName {
|
||||
IRIS_IS11,
|
||||
IRIS_SENSOR(Senortype),
|
||||
@ -21,6 +22,7 @@ enum DevName {
|
||||
}
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use tauri::api::dir;
|
||||
use std::sync::Mutex;
|
||||
//设置一个可修改的全局变量
|
||||
lazy_static! {
|
||||
@ -42,6 +44,30 @@ lazy_static! {
|
||||
//println!("{}",readdatafromport(1000));
|
||||
String::from("Port set ok")
|
||||
}
|
||||
/* let data = {
|
||||
gain: Gain,
|
||||
direction: direction,
|
||||
filepath: Filepath,
|
||||
DNData: DNData,
|
||||
LampData: Lampdata,
|
||||
Devinfo: Devinfo
|
||||
} */
|
||||
#[tauri::command]
|
||||
fn savecalibratefileIRIS(Gain:serde_json::Value,direction: bool, filepath: String, dndata: serde_json::Value, lampdata: serde_json::Value, devinfo: serde_json::Value) -> String {
|
||||
//输出 输入参数
|
||||
// println!("Gain: {:?}", Gain);
|
||||
// println!("direction: {:?}", direction);
|
||||
// println!("Filepath: {:?}", devinfo);
|
||||
// println!("DNData: {:?}", dndata);
|
||||
// println!("Lampdata: {:?}", lampdata);
|
||||
// println!("Devinfo: {:?}", devinfo);
|
||||
|
||||
|
||||
|
||||
irisdatamanager::savecalibratefileIRIS(Gain, direction, filepath, dndata, lampdata, devinfo)
|
||||
|
||||
}
|
||||
|
||||
|
||||
#[tauri::command]
|
||||
fn savecalibratefile(gain: Vec<f32>, shutter: u32, direction: bool, filepath: String) -> String {
|
||||
@ -213,6 +239,7 @@ fn main() {
|
||||
interpolate_spline,
|
||||
sg_smooth,
|
||||
savecalibratefile,
|
||||
savecalibratefileIRIS,
|
||||
sendcalibratetodev,
|
||||
setdevtype,
|
||||
set_weave_coeff,
|
||||
@ -220,7 +247,8 @@ fn main() {
|
||||
algorithm::gaussian_filter_high,
|
||||
algorithm::interpolate_spline_at_points,
|
||||
algorithm::find_peek,
|
||||
algorithm::compute_weave_coeff
|
||||
algorithm::compute_weave_coeff,
|
||||
getoneirisfile
|
||||
])
|
||||
.setup(|app| {
|
||||
|
||||
|
16
src-tauri/src/myformatiris/mod.rs
Normal file
16
src-tauri/src/myformatiris/mod.rs
Normal file
@ -0,0 +1,16 @@
|
||||
pub mod structures;
|
||||
pub mod read;
|
||||
pub mod write;
|
||||
|
||||
|
||||
pub use structures::{TimeStruct, SpectralData, ImageInfo, OneIRISData};
|
||||
pub use structures::*;
|
||||
pub use read::{read_time, read_spectral_data, read_image_info, read_iris_file};
|
||||
pub use write::*;
|
||||
|
||||
#[tauri::command]
|
||||
pub fn getoneirisfile(path:String)->OneIRISData{
|
||||
let returndata=read_iris_file(&path).unwrap();
|
||||
return returndata;
|
||||
|
||||
}
|
343
src-tauri/src/myformatiris/read.rs
Normal file
343
src-tauri/src/myformatiris/read.rs
Normal file
@ -0,0 +1,343 @@
|
||||
use std::io::{Read, Result, BufReader};
|
||||
use std::fs::File;
|
||||
use std::convert::TryInto;
|
||||
use super::structures::{TimeStruct, SpectralData, ImageInfo, OneIRISData};
|
||||
// use serde::de::value;
|
||||
use serde_json::Value;
|
||||
pub fn read_time<R: Read>(reader: &mut R) -> Result<TimeStruct> {
|
||||
let mut buffer = [0u8; 10]; // Corrected buffer size to 10 bytes
|
||||
reader.read_exact(&mut buffer)?;
|
||||
|
||||
Ok(TimeStruct {
|
||||
time_zone: buffer[0] as i8,
|
||||
year: u16::from_le_bytes([buffer[1], buffer[2]]),
|
||||
month: buffer[3],
|
||||
day: buffer[4],
|
||||
hour: buffer[5],
|
||||
minute: buffer[6],
|
||||
second: buffer[7],
|
||||
millisecond: u16::from_le_bytes([buffer[8], buffer[9]]), // Indices 8 and 9 are correct for 10-byte buffer
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
pub fn read_image_info<R: Read>(reader: &mut R) -> Result<ImageInfo> {
|
||||
let mut info = ImageInfo::new();
|
||||
|
||||
// Read data length
|
||||
let mut len_buf = [0u8; 8];
|
||||
reader.read_exact(&mut len_buf)?;
|
||||
info.data_length = u64::from_le_bytes(len_buf);
|
||||
|
||||
// Read name (fixed size 100 bytes)
|
||||
let mut name_buf = [0u8; 100];
|
||||
reader.read_exact(&mut name_buf)?;
|
||||
info.name = String::from_utf8_lossy(&name_buf).trim_end_matches('\0').to_string();
|
||||
info.name = remove_after_null_split_once(info.name);
|
||||
|
||||
// Read collection time
|
||||
info.collection_time = read_time(reader)?;
|
||||
|
||||
// Read info type
|
||||
let mut type_buf = [0u8; 1];
|
||||
reader.read_exact(&mut type_buf)?;
|
||||
info.info_type = type_buf[0];
|
||||
let imagedatlenth= info.data_length as u64- 100-10-1; // Adjusted to account for the size of TimeStruct and info_type
|
||||
// Read image data
|
||||
info.image_data.resize(imagedatlenth as usize, 0);
|
||||
reader.read_exact(&mut info.image_data)?;
|
||||
|
||||
Ok(info)
|
||||
}
|
||||
|
||||
pub fn read_iris_file(path: &str) -> Result<OneIRISData> {
|
||||
let file = File::open(path)?;
|
||||
let mut reader = BufReader::new(file);
|
||||
|
||||
// Read and verify magic number
|
||||
// let mut magic = [0u8; 4];
|
||||
// reader.read_exact(&mut magic)?;
|
||||
// if magic != [0x49, 0x52, 0x49, 0x53] { // "IRIS" in ASCII
|
||||
// return Err(std::io::Error::new(
|
||||
// std::io::ErrorKind::InvalidData,
|
||||
// "Not a valid IRIS file"
|
||||
// ));
|
||||
// }
|
||||
|
||||
let mut iris_data = OneIRISData::new();
|
||||
|
||||
// // Read file version
|
||||
// let mut version = [0u8; 2];
|
||||
// reader.read_exact(&mut version)?;
|
||||
|
||||
// Read sections until EOF
|
||||
loop {
|
||||
let mut section_header = [0u8; 12]; // type (4) + length (8)
|
||||
if reader.read_exact(&mut section_header).is_err() {
|
||||
break; // EOF reached
|
||||
}
|
||||
|
||||
let section_type = u32::from_le_bytes(section_header[0..4].try_into().unwrap());
|
||||
let section_length = u64::from_le_bytes(section_header[4..12].try_into().unwrap());
|
||||
|
||||
match section_type {
|
||||
0x00FF00FF => { // Spectral data section
|
||||
let count = read_section_count(&mut reader)?;
|
||||
let mut data = Vec::with_capacity(count);
|
||||
for _ in 0..count {
|
||||
data.push(read_spectral_data(&mut reader)?);
|
||||
}
|
||||
iris_data.spectral_data_section = data;
|
||||
},
|
||||
0xFF00FF00 => { // Spectral info section
|
||||
let count = read_section_count(&mut reader)?;
|
||||
let mut data = Vec::with_capacity(count);
|
||||
for _ in 0..count {
|
||||
let mut tempbuffer = [0u8; 3]; // Adjust size as needed
|
||||
reader.read_exact(&mut tempbuffer)?;
|
||||
let lenth = u16::from_le_bytes([tempbuffer[0],tempbuffer[1]]) as usize;
|
||||
let datatype= u8::from_le_bytes([tempbuffer[2]]);
|
||||
let mut tempvector = vec![0u8; lenth];
|
||||
reader.read_exact(&mut tempvector)?;
|
||||
// Convert to String
|
||||
let json_string = String::from_utf8(tempvector).unwrap_or_default();
|
||||
let json_string = json_string.trim_end_matches('\0').to_string();
|
||||
//print!("JSON String: {}", json_string);
|
||||
let json:Value = match serde_json::from_str(&json_string){
|
||||
Ok(json) => json,
|
||||
Err(e) => {
|
||||
eprintln!("Error parsing JSON: {}", e);
|
||||
continue; // Skip this entry if parsing fails
|
||||
}
|
||||
}; // Handle parsing error gracefully
|
||||
|
||||
//判断json["info_type"]是否存在
|
||||
if !json.get("info_type").is_some() {
|
||||
eprintln!("JSON does not contain 'info_type': {}", json_string);
|
||||
continue; // Skip this entry if "info_type" is missing
|
||||
}
|
||||
/* {
|
||||
"info_type": "infolist", // 0 for device info
|
||||
"info_number":3,
|
||||
"info_list": [
|
||||
{
|
||||
"info_type": "devinfo", // 0 for device info
|
||||
"sensor_id": "is30002",
|
||||
"bandnum": 2048,
|
||||
"wave_coeff": {
|
||||
"a1": 0.0,
|
||||
"a2": 0.0,
|
||||
"a3": 400,
|
||||
"a4": 1.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"info_type": "environment", // 1 for gain info
|
||||
"date": "2000-01-00 00:00:00",
|
||||
//下面可选
|
||||
"humidity":90.0,
|
||||
"temperature":35.0 ,
|
||||
"gps":{
|
||||
"latitude":115.01,
|
||||
"longitude": 39.01,
|
||||
"altitude": 100.0
|
||||
},
|
||||
},
|
||||
{
|
||||
"info_type": "devinfo", // 0 for device info
|
||||
"sensor_id": "is20001",
|
||||
"bandnum": 512,
|
||||
"wave_coeff": {
|
||||
"a1": 0,
|
||||
"a2": 0.0,
|
||||
"a3":390,
|
||||
"a4": 4
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
} */
|
||||
//如果info_type是infolist 则需要逐个解析
|
||||
if json.get("info_type").and_then(Value::as_str) == Some("infolist") {
|
||||
let info_number = json.get("info_number").and_then(Value::as_u64).unwrap_or(0) as usize;
|
||||
for i in 0 ..info_number{
|
||||
//将对应的info加入到data中
|
||||
if let Some(info) = json.get("info_list").and_then(|list| list.get(i)) {
|
||||
data.push(info.clone());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
continue; // Skip the rest of the loop for this entry
|
||||
}
|
||||
|
||||
|
||||
|
||||
data.push(json);
|
||||
//println!("Parsed JSON: {:?}", json);
|
||||
// let mut data_entry = SpectralInfo::new();
|
||||
// data_entry.sensor_id = json.get("SensorId").and_then(Value::as_str).unwrap_or_default().to_string();
|
||||
// data_entry.wave_coeff[0]=json["WaveCoeff"]["a1"].as_f64().unwrap_or(0.0);
|
||||
// data_entry.wave_coeff[1]=json["WaveCoeff"]["a2"].as_f64().unwrap_or(0.0);
|
||||
// data_entry.wave_coeff[2]=json["WaveCoeff"]["a3"].as_f64().unwrap_or(0.0);
|
||||
// data_entry.wave_coeff[3]=json["WaveCoeff"]["a4"].as_f64().unwrap_or(0.0);
|
||||
// data.push(data_entry);
|
||||
// Parse JSON string
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
iris_data.spectral_info_section = data;
|
||||
},
|
||||
0xF0F0F0F0 => { // Other info section
|
||||
if section_length == 0 {
|
||||
iris_data.other_info_section = Vec::new(); // Handle empty section
|
||||
continue; // Skip empty section
|
||||
}
|
||||
let count = read_section_count(&mut reader)?;
|
||||
let mut data = Vec::with_capacity(count);
|
||||
for _ in 0..count {
|
||||
let mut tempbuffer = [0u8; 3]; // Adjust size as needed
|
||||
reader.read_exact(&mut tempbuffer)?;
|
||||
let lenth = u16::from_le_bytes([tempbuffer[0], tempbuffer[1]]) as usize;
|
||||
let info_type = u8::from_le_bytes([tempbuffer[2]]);
|
||||
let mut tempvector = vec![0u8; lenth];
|
||||
reader.read_exact(&mut tempvector)?;
|
||||
// Convert to String
|
||||
let json_string = String::from_utf8(tempvector).unwrap_or_default();
|
||||
let json_string = json_string.trim_end_matches('\0').to_string();
|
||||
//print!("JSON String: {}", json_string);
|
||||
let json: Value = match serde_json::from_str(&json_string) {
|
||||
Ok(json) => json,
|
||||
Err(e) => {
|
||||
eprintln!("Error parsing JSON: {}", e);
|
||||
continue; // Skip this entry if parsing fails
|
||||
}
|
||||
}; // Handle parsing error gracefully
|
||||
data.push(json);
|
||||
|
||||
}
|
||||
iris_data.other_info_section = data;
|
||||
},
|
||||
0x0F0F0F0F => { // Image info section
|
||||
if section_length== 0 {
|
||||
iris_data.image_info_section= Vec::new(); // Handle empty section
|
||||
continue; // Skip empty section
|
||||
|
||||
}
|
||||
let count = read_section_count(&mut reader)?;
|
||||
let mut data = Vec::with_capacity(count);
|
||||
for _ in 0..count {
|
||||
data.push(read_image_info(&mut reader)?);
|
||||
}
|
||||
iris_data.image_info_section = data;
|
||||
},
|
||||
_ => {
|
||||
// Skip unknown sections
|
||||
let mut buf = vec![0u8; section_length as usize];
|
||||
reader.read_exact(&mut buf)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(iris_data)
|
||||
}
|
||||
|
||||
fn read_section_count<R: Read>(reader: &mut R) -> Result<usize> {
|
||||
let mut count_buf = [0u8; 2];
|
||||
reader.read_exact(&mut count_buf)?;
|
||||
Ok(u16::from_le_bytes(count_buf) as usize)
|
||||
}
|
||||
|
||||
// pub fn read_other_info<R: Read>(reader: &mut R) -> Result<OtherInfo> {
|
||||
// let mut info = OtherInfo::new();
|
||||
|
||||
// // Read info type
|
||||
// let mut type_buf = [0u8; 1];
|
||||
// reader.read_exact(&mut type_buf)?;
|
||||
// info.info_type = type_buf[0];
|
||||
|
||||
// // Read data length
|
||||
// let mut len_buf = [0u8; 8];
|
||||
// reader.read_exact(&mut len_buf)?;
|
||||
// let data_len = u64::from_le_bytes(len_buf) as usize;
|
||||
|
||||
// // Read data
|
||||
// info.data.resize(data_len, 0);
|
||||
// reader.read_exact(&mut info.data)?;
|
||||
|
||||
// Ok(info)
|
||||
// }
|
||||
fn remove_after_null_split_once(s: String) -> String {
|
||||
if let Some((before_null, _after_null)) = s.split_once('\0') {
|
||||
// 返回 \0 之前的部分
|
||||
before_null.to_string()
|
||||
} else {
|
||||
// 如果没有找到 \0,就返回原始 String
|
||||
s
|
||||
}
|
||||
}
|
||||
pub fn read_spectral_data<R: Read>(reader: &mut R) -> Result<SpectralData> {
|
||||
let mut data = SpectralData::new();
|
||||
|
||||
// Read fixed-size fields
|
||||
let mut name_buf = [0u8; 100];
|
||||
|
||||
reader.read_exact(&mut name_buf)?;
|
||||
name_buf[99] = 0; // Ensure null termination
|
||||
let temp= String::from_utf8_lossy(&name_buf);
|
||||
data.name = temp.trim_end_matches('\0').to_string();
|
||||
data.name = remove_after_null_split_once(data.name);
|
||||
|
||||
let mut sensor_buf = [0u8; 50];
|
||||
reader.read_exact(&mut sensor_buf)?;
|
||||
data.sensor_id = String::from_utf8_lossy(&sensor_buf).trim_end_matches('\0').to_string();
|
||||
data.sensor_id = remove_after_null_split_once(data.sensor_id);
|
||||
let mut uint8_buf = [0u8; 1];
|
||||
|
||||
reader.read_exact(&mut uint8_buf)?;
|
||||
data.fiber_id = uint8_buf[0];
|
||||
|
||||
|
||||
data.collection_time = read_time(reader)?;
|
||||
|
||||
|
||||
let mut float_buf = [0u8; 8];
|
||||
reader.read_exact(&mut float_buf)?;
|
||||
data.exposure = f64::from_le_bytes(float_buf);
|
||||
|
||||
let mut float_buf = [0u8; 4];
|
||||
reader.read_exact(&mut float_buf)?;
|
||||
data.gain = f32::from_le_bytes(float_buf);
|
||||
|
||||
let mut byte_buf = [0u8; 1];
|
||||
reader.read_exact(&mut byte_buf)?;
|
||||
data.data_type = byte_buf[0];
|
||||
|
||||
reader.read_exact(&mut byte_buf)?;
|
||||
data.pixel_size = byte_buf[0];
|
||||
|
||||
reader.read_exact(&mut byte_buf)?;
|
||||
data.ground_type = byte_buf[0];
|
||||
|
||||
let mut short_buf = [0u8; 2];
|
||||
reader.read_exact(&mut short_buf)?;
|
||||
data.bands = u16::from_le_bytes(short_buf);
|
||||
|
||||
reader.read_exact(&mut byte_buf)?;
|
||||
data.valid_flag = byte_buf[0];
|
||||
let data_len=data.pixel_size as usize * data.bands as usize;
|
||||
// Read the length of the spectral_data vector
|
||||
// let mut len_buf = [0u8; 8];
|
||||
// reader.read_exact(&mut len_buf)?;
|
||||
// let data_len = u64::from_le_bytes(len_buf) as usize;
|
||||
|
||||
// Read the spectral_data vector
|
||||
data.spectral_data.resize(data_len, 0);
|
||||
reader.read_exact(&mut data.spectral_data)?;
|
||||
|
||||
Ok(data)
|
||||
}
|
411
src-tauri/src/myformatiris/structures.rs
Normal file
411
src-tauri/src/myformatiris/structures.rs
Normal file
@ -0,0 +1,411 @@
|
||||
|
||||
pub const DATA_TYPE_UINT8: u8 = 0x10;
|
||||
pub const DATA_TYPE_INT16: u8 = 0x11;
|
||||
pub const DATA_TYPE_UINT16: u8 = 0x12;
|
||||
pub const DATA_TYPE_INT32: u8 = 0x13;
|
||||
pub const DATA_TYPE_UINT32: u8 = 0x14;
|
||||
pub const DATA_TYPE_FLOAT32: u8 = 0x20;
|
||||
pub const DATA_TYPE_FLOAT64: u8 = 0x21;
|
||||
|
||||
/* 0 dn 1 rad 2 ref 3 irad 4 califile 5 flat_ref 6 dark_dn 7 flat_dn */
|
||||
|
||||
pub const Target_Spectral_Type_DN:u8 = 0x00;
|
||||
pub const Target_Spectral_Type_Rad:u8 = 0x01;
|
||||
pub const Target_Spectral_Type_Ref:u8 = 0x02;
|
||||
pub const Target_Spectral_Type_IRad:u8 = 0x03;
|
||||
pub const Target_Spectral_Type_CaliFile_Gain:u8 = 0x04;
|
||||
pub const Target_Spectral_Type_FlatRef:u8 = 0x05;
|
||||
pub const Target_Spectral_Type_DarkDN:u8 = 0x06;
|
||||
pub const Target_Spectral_Type_FlatDN:u8 = 0x07;
|
||||
pub const Target_LAMP_VALUE_SCALED:u8 = 0x08;
|
||||
|
||||
use serde::Serialize;
|
||||
use serde_json::json;
|
||||
|
||||
|
||||
|
||||
#[derive(serde::Serialize,Debug, Clone, PartialEq)]
|
||||
pub struct TimeStruct {
|
||||
pub time_zone: i8,
|
||||
pub year: u16,
|
||||
pub month: u8,
|
||||
pub day: u8,
|
||||
pub hour: u8,
|
||||
pub minute: u8,
|
||||
pub second: u8,
|
||||
pub millisecond: u16,
|
||||
}
|
||||
|
||||
impl TimeStruct {
|
||||
pub fn new() -> Self {
|
||||
TimeStruct {
|
||||
time_zone: 0,
|
||||
year: 0,
|
||||
month: 1,
|
||||
day: 1,
|
||||
hour: 0,
|
||||
minute: 0,
|
||||
second: 0,
|
||||
millisecond: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize,Debug, Clone, PartialEq)]
|
||||
pub struct SpectralData {
|
||||
pub name: String,
|
||||
pub sensor_id: String,
|
||||
pub fiber_id: u8,
|
||||
pub collection_time: TimeStruct,
|
||||
pub exposure: f64,
|
||||
pub gain: f32,
|
||||
pub data_type: u8,
|
||||
pub pixel_size: u8,
|
||||
pub ground_type: u8,
|
||||
pub bands: u16,
|
||||
pub valid_flag: u8,
|
||||
pub spectral_data: Vec<u8>,
|
||||
}
|
||||
|
||||
impl SpectralData {
|
||||
pub fn new() -> Self {
|
||||
SpectralData {
|
||||
name: String::new(),
|
||||
sensor_id: String::new(),
|
||||
fiber_id:0,
|
||||
collection_time: TimeStruct::new(),
|
||||
exposure: 0.0,
|
||||
gain: 0.0,
|
||||
data_type: 0,
|
||||
pixel_size: 0,
|
||||
ground_type: 0,
|
||||
bands: 0,
|
||||
valid_flag: 0,
|
||||
spectral_data: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn Get_Spectral_Data(&self)-> Vec<f64> {
|
||||
let mut retrun_data: Vec<f64> = Vec::new();
|
||||
let datatype = self.data_type;
|
||||
let bands = self.bands as usize;
|
||||
match datatype {
|
||||
DATA_TYPE_UINT8 => {
|
||||
// uint8
|
||||
for i in 0..bands {
|
||||
retrun_data.push(self.spectral_data[i] as f64);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
DATA_TYPE_INT16 => {
|
||||
// int16
|
||||
self.spectral_data.chunks(2).for_each(|chunk| {
|
||||
if chunk.len() == 2 {
|
||||
let value = i16::from_le_bytes([chunk[0], chunk[1]]);
|
||||
retrun_data.push(value as f64);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
DATA_TYPE_UINT16 => {
|
||||
// uint16
|
||||
self.spectral_data.chunks(2).for_each(|chunk| {
|
||||
if chunk.len() == 2 {
|
||||
let value = u16::from_le_bytes([chunk[0], chunk[1]]);
|
||||
retrun_data.push(value as f64);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
DATA_TYPE_INT32 => {
|
||||
// int32
|
||||
|
||||
|
||||
self.spectral_data.chunks(4).for_each(|chunk| {
|
||||
if chunk.len() == 4 {
|
||||
let value = i32::from_le_bytes([
|
||||
chunk[0],
|
||||
chunk[1],
|
||||
chunk[2],
|
||||
chunk[3],
|
||||
]);
|
||||
retrun_data.push(value as f64);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
DATA_TYPE_UINT32 => {
|
||||
// uint32
|
||||
for i in (0..self.spectral_data.len()).step_by(4) {
|
||||
let value = u32::from_le_bytes([
|
||||
self.spectral_data[i],
|
||||
self.spectral_data[i + 1],
|
||||
self.spectral_data[i + 2],
|
||||
self.spectral_data[i + 3],
|
||||
]);
|
||||
retrun_data.push(value as f64);
|
||||
}
|
||||
}
|
||||
DATA_TYPE_FLOAT32 => {
|
||||
// float32
|
||||
for i in (0..self.spectral_data.len()).step_by(4) {
|
||||
let value = f32::from_le_bytes([
|
||||
self.spectral_data[i],
|
||||
self.spectral_data[i + 1],
|
||||
self.spectral_data[i + 2],
|
||||
self.spectral_data[i + 3],
|
||||
]);
|
||||
retrun_data.push(value as f64);
|
||||
}
|
||||
}
|
||||
DATA_TYPE_FLOAT64 => {
|
||||
// float64
|
||||
for i in (0..self.spectral_data.len()).step_by(8) {
|
||||
let value = f64::from_le_bytes([
|
||||
self.spectral_data[i],
|
||||
self.spectral_data[i + 1],
|
||||
self.spectral_data[i + 2],
|
||||
self.spectral_data[i + 3],
|
||||
self.spectral_data[i + 4],
|
||||
self.spectral_data[i + 5],
|
||||
self.spectral_data[i + 6],
|
||||
self.spectral_data[i + 7],
|
||||
]);
|
||||
retrun_data.push(value);
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
// Unsupported data type
|
||||
panic!("Unsupported data type: {}", datatype);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
retrun_data
|
||||
|
||||
|
||||
}
|
||||
pub fn Set_Spectral_Data(&mut self, data: Vec<f64>,datatype: u8) {
|
||||
self.data_type = datatype;
|
||||
self.bands = data.len() as u16;
|
||||
self.spectral_data.clear();
|
||||
|
||||
// let datatype = self.data_type;
|
||||
let bands = self.bands as usize;
|
||||
match datatype {
|
||||
DATA_TYPE_UINT8 => {
|
||||
// uint8
|
||||
self.pixel_size = 1;
|
||||
self.spectral_data.clear();
|
||||
for i in 0..bands {
|
||||
if i < data.len() {
|
||||
self.spectral_data.push(data[i] as u8);
|
||||
} else {
|
||||
self.spectral_data.push(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
DATA_TYPE_INT16 => {
|
||||
// int16
|
||||
self.pixel_size = 2;
|
||||
self.spectral_data.clear();
|
||||
for i in 0..bands {
|
||||
if i < data.len() {
|
||||
let value = data[i] as i16;
|
||||
self.spectral_data.extend_from_slice(&value.to_le_bytes());
|
||||
} else {
|
||||
self.spectral_data.extend_from_slice(&[0, 0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
DATA_TYPE_UINT16 => {
|
||||
// uint16
|
||||
self.pixel_size = 2;
|
||||
self.spectral_data.clear();
|
||||
for i in 0..bands {
|
||||
if i < data.len() {
|
||||
let value = data[i] as u16;
|
||||
self.spectral_data.extend_from_slice(&value.to_le_bytes());
|
||||
} else {
|
||||
self.spectral_data.extend_from_slice(&[0, 0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
DATA_TYPE_INT32 => {
|
||||
// int32
|
||||
self.pixel_size = 4;
|
||||
self.spectral_data.clear();
|
||||
for i in 0..bands {
|
||||
if i < data.len() {
|
||||
let value = data[i] as i32;
|
||||
self.spectral_data.extend_from_slice(&value.to_le_bytes());
|
||||
} else {
|
||||
self.spectral_data.extend_from_slice(&[0, 0, 0, 0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
DATA_TYPE_UINT32 => {
|
||||
// uint32
|
||||
self.pixel_size = 4;
|
||||
self.spectral_data.clear();
|
||||
for i in 0..bands {
|
||||
if i < data.len() {
|
||||
let value = data[i] as u32;
|
||||
self.spectral_data.extend_from_slice(&value.to_le_bytes());
|
||||
} else {
|
||||
self.spectral_data.extend_from_slice(&[0, 0, 0, 0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
DATA_TYPE_FLOAT32 => {
|
||||
// float32
|
||||
self.pixel_size = 4;
|
||||
self.spectral_data.clear();
|
||||
for i in 0..bands {
|
||||
if i < data.len() {
|
||||
let value = data[i] as f32;
|
||||
self.spectral_data.extend_from_slice(&value.to_le_bytes());
|
||||
} else {
|
||||
self.spectral_data.extend_from_slice(&[0, 0, 0, 0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
DATA_TYPE_FLOAT64 => {
|
||||
// float64
|
||||
self.pixel_size = 8;
|
||||
self.spectral_data.clear();
|
||||
for i in 0..bands {
|
||||
if i < data.len() {
|
||||
let value = data[i];
|
||||
self.spectral_data.extend_from_slice(&value.to_le_bytes());
|
||||
} else {
|
||||
self.spectral_data.extend_from_slice(&[0, 0, 0, 0, 0, 0, 0, 0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
// Unsupported data type
|
||||
panic!("Unsupported data type: {}", datatype);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// #[derive(Debug, Clone, PartialEq)]
|
||||
// pub struct OtherInfo {
|
||||
// pub info_type: u8,
|
||||
// pub data: Vec<u8>, // Assuming the data is variable length
|
||||
// }
|
||||
|
||||
// impl OtherInfo {
|
||||
// pub fn new() -> Self {
|
||||
// OtherInfo {
|
||||
// info_type: 0,
|
||||
// data: Vec::new(),
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
#[derive(serde::Serialize, Debug, Clone, PartialEq)]
|
||||
pub struct OneIRISData {
|
||||
pub spectral_data_section: Vec<SpectralData>,
|
||||
pub spectral_info_section: Vec<serde_json::Value>, // Using serde_json::Value for flexibility
|
||||
pub other_info_section: Vec<serde_json::Value>,
|
||||
pub image_info_section: Vec<ImageInfo>,
|
||||
}
|
||||
|
||||
impl OneIRISData {
|
||||
pub fn new() -> Self {
|
||||
OneIRISData {
|
||||
spectral_data_section: Vec::new(),
|
||||
spectral_info_section: Vec::new(),
|
||||
other_info_section: Vec::new(),
|
||||
image_info_section: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// #[derive(Debug, Clone, PartialEq)]
|
||||
// pub struct SpectralInfo {
|
||||
// pub sensor_id: String,
|
||||
// pub wave_coeff: [f64; 4],
|
||||
|
||||
// }
|
||||
|
||||
// impl SpectralInfo {
|
||||
// pub fn new() -> Self {
|
||||
// SpectralInfo {
|
||||
// sensor_id: String::new(),
|
||||
// wave_coeff: [0.0; 4],
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
#[derive(serde::Serialize,Debug, Clone, PartialEq)]
|
||||
pub struct ImageInfo {
|
||||
pub data_length: u64,
|
||||
pub name: String,
|
||||
pub collection_time: TimeStruct,
|
||||
pub info_type: u8,
|
||||
pub image_data: Vec<u8>, // Assuming the data is variable length
|
||||
}
|
||||
|
||||
impl ImageInfo {
|
||||
pub fn new() -> Self {
|
||||
ImageInfo {
|
||||
data_length: 0,
|
||||
name: String::new(),
|
||||
collection_time: TimeStruct::new(),
|
||||
info_type: 0,
|
||||
image_data: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_time_struct() {
|
||||
let time = TimeStruct::new();
|
||||
assert_eq!(time.time_zone, 0);
|
||||
assert_eq!(time.year, 0);
|
||||
assert_eq!(time.month, 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_spectral_data() {
|
||||
let data = SpectralData::new();
|
||||
assert_eq!(data.name, "");
|
||||
assert_eq!(data.bands, 0);
|
||||
assert!(data.spectral_data.is_empty());
|
||||
}
|
||||
|
||||
// #[test]
|
||||
// fn test_spectral_info() {
|
||||
// let info = SpectralInfo::new();
|
||||
// assert_eq!(info.sensor_id, "");
|
||||
// assert_eq!(info.wave_coeff, [0.0; 4]);
|
||||
// }
|
||||
|
||||
// #[test]
|
||||
// fn test_other_info() {
|
||||
// let info = OtherInfo::new();
|
||||
// assert_eq!(info.info_type, 0);
|
||||
// assert!(info.data.is_empty());
|
||||
// }
|
||||
|
||||
#[test]
|
||||
fn test_image_info() {
|
||||
let info = ImageInfo::new();
|
||||
assert_eq!(info.data_length, 0);
|
||||
assert_eq!(info.name, "");
|
||||
assert!(info.image_data.is_empty());
|
||||
}
|
||||
}
|
222
src-tauri/src/myformatiris/write.rs
Normal file
222
src-tauri/src/myformatiris/write.rs
Normal file
@ -0,0 +1,222 @@
|
||||
use std::fs::File;
|
||||
use std::io::{self, Write, Result};
|
||||
use std::vec;
|
||||
use serde_json::json;
|
||||
|
||||
// use crate::write;
|
||||
|
||||
use super::structures::{TimeStruct, SpectralData, ImageInfo,OneIRISData};
|
||||
|
||||
// Internal writer functions remain the same
|
||||
fn write_time<W: Write>(time: &TimeStruct, writer: &mut W) -> Result<()> {
|
||||
writer.write_all(&[time.time_zone as u8])?;
|
||||
writer.write_all(&time.year.to_le_bytes())?;
|
||||
writer.write_all(&[time.month])?;
|
||||
writer.write_all(&[time.day])?;
|
||||
writer.write_all(&[time.hour])?;
|
||||
writer.write_all(&[time.minute])?;
|
||||
writer.write_all(&[time.second])?;
|
||||
writer.write_all(&time.millisecond.to_le_bytes())?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
pub fn write_image_info<W: Write>(info: &ImageInfo, writer: &mut W) -> Result<()> {
|
||||
// Write data length
|
||||
writer.write_all(&info.data_length.to_le_bytes())?;
|
||||
|
||||
// Write name (fixed size 100 bytes)
|
||||
let mut name_buf = [0u8; 100];
|
||||
let name_bytes = info.name.as_bytes();
|
||||
name_buf[..info.name.len().min(99)].copy_from_slice(name_bytes[0..name_bytes.len().min(99)].as_ref());
|
||||
writer.write_all(&name_buf)?;
|
||||
|
||||
// Write collection time
|
||||
write_time(&info.collection_time, writer)?;
|
||||
|
||||
// Write info type
|
||||
writer.write_all(&[info.info_type])?;
|
||||
|
||||
// Write image data
|
||||
writer.write_all(&info.image_data)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
|
||||
pub fn write_spectral_data<W: Write>(data: &SpectralData, writer: &mut W) -> Result<()> {
|
||||
// Write fixed-size fields
|
||||
let mut name_buf = [0u8; 100];
|
||||
|
||||
let namebyte= data.name.as_bytes();
|
||||
name_buf[..data.name.len().min(99)].copy_from_slice(namebyte[0..namebyte.len().min(99)].as_ref());
|
||||
writer.write_all(&name_buf)?;
|
||||
|
||||
let mut sensor_buf = [0u8; 50];
|
||||
let sensor_id_bytes = data.sensor_id.as_bytes();
|
||||
sensor_buf[..data.sensor_id.len().min(49)].copy_from_slice(sensor_id_bytes[0..sensor_id_bytes.len().min(49)].as_ref());
|
||||
writer.write_all(&sensor_buf)?;
|
||||
writer.write_all(&[data.fiber_id])?;
|
||||
|
||||
write_time(&data.collection_time, writer)?;
|
||||
writer.write_all(&data.exposure.to_le_bytes())?;
|
||||
writer.write_all(&data.gain.to_le_bytes())?;
|
||||
writer.write_all(&[data.data_type])?;
|
||||
writer.write_all(&[data.pixel_size])?;
|
||||
writer.write_all(&[data.ground_type])?;
|
||||
writer.write_all(&data.bands.to_le_bytes())?;
|
||||
writer.write_all(&[data.valid_flag])?;
|
||||
|
||||
// // Write the length of the spectral_data vector
|
||||
// writer.write_all(&(data.spectral_data.len() as u64).to_le_bytes())?;
|
||||
// Write the spectral_data vector
|
||||
writer.write_all(&data.spectral_data)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
pub fn caculate_spectral_data_length(data: &Vec<SpectralData>) -> u64 {
|
||||
let mut lenth:u64 = 0;
|
||||
//加上u16的长度
|
||||
lenth += 2; // bands
|
||||
//加上u8的长度
|
||||
// let numberofspectral=data.len();
|
||||
for datatemp in data {
|
||||
lenth += 100; // name
|
||||
lenth += 50; // sensor_id
|
||||
lenth += 1 ; // fiber_id
|
||||
lenth += 10; // time_zone
|
||||
lenth += 8; // exposure
|
||||
lenth += 4; // gain
|
||||
lenth += 1; // data_type
|
||||
lenth += 1; // pixel_size
|
||||
lenth += 1; // ground_type
|
||||
lenth += 2; // bands
|
||||
lenth += 1; // valid_flag
|
||||
lenth += datatemp.spectral_data.len() as u64;
|
||||
|
||||
}
|
||||
lenth
|
||||
|
||||
}
|
||||
pub fn caculate_image_info_length(data: &Vec<ImageInfo>) -> u64 {
|
||||
let mut lenth: u64 = 0;
|
||||
if data.is_empty() {
|
||||
return lenth;
|
||||
}
|
||||
lenth +=2;
|
||||
for info in data {
|
||||
lenth += 8; // data_length
|
||||
lenth += 100; // name
|
||||
lenth += 10; // time_zone
|
||||
lenth += 1; // info_type
|
||||
lenth += info.image_data.len() as u64; // image_data length
|
||||
}
|
||||
lenth
|
||||
}
|
||||
|
||||
|
||||
pub fn cacluate_other_info_length(data: &Vec<serde_json::Value>) -> (Vec<u8>, u64) {
|
||||
let mut lenth: u64 = 0;
|
||||
let mut vecback= Vec::new();
|
||||
if data.is_empty() {
|
||||
return (vecback, lenth);
|
||||
}
|
||||
// for info in data {
|
||||
// lenth+=1; // info_type
|
||||
// lenth+=8; // data length
|
||||
// lenth += info.data.len() as u64; // data length
|
||||
// vecback.push(info.info_type);
|
||||
// vecback.extend_from_slice(&(info.data.len() as u64).to_le_bytes());
|
||||
// vecback.extend_from_slice(&info.data);
|
||||
// }
|
||||
(vecback, lenth)
|
||||
}
|
||||
|
||||
pub fn caculate_spectral_info_length(data: &Vec<serde_json::Value>) -> (Vec<u8>, u64) {
|
||||
let mut lenth: u64 = 0;
|
||||
let mut vecback= Vec::new();
|
||||
if data.is_empty() {
|
||||
return (vecback, lenth);
|
||||
}
|
||||
|
||||
|
||||
|
||||
lenth+=2; // sensor_id
|
||||
let lenthofinfo=data.len() as u16;
|
||||
vecback.extend_from_slice(&lenthofinfo.to_le_bytes()); // Number of spectral info entries
|
||||
|
||||
|
||||
for info in data {
|
||||
lenth+=2;
|
||||
lenth+=1;
|
||||
let mut lenthofthisinfo:u16=0;
|
||||
let json=info;
|
||||
let json_string = serde_json::to_string(&json).unwrap();
|
||||
let json_bytes = json_string.as_bytes();
|
||||
lenthofthisinfo= json_bytes.len() as u16+1;
|
||||
lenth += lenthofthisinfo as u64 ;
|
||||
|
||||
// 将长度转换为字节并添加到 vecback
|
||||
vecback.extend_from_slice(&lenthofthisinfo.to_le_bytes());
|
||||
vecback.push(0x00); // json 标识
|
||||
vecback.extend_from_slice(json_bytes);
|
||||
vecback.push(0x00); // 添加一个字节的0x00
|
||||
}
|
||||
(vecback, lenth)
|
||||
|
||||
}
|
||||
pub fn wirte_iris_data(data:&OneIRISData,filepath:&str) -> Result<()> {
|
||||
let mut file = File::create(filepath)?;
|
||||
//写入光谱数据header
|
||||
let SPectralData_Flag:u32=0x00FF00FF;
|
||||
file.write_all(&SPectralData_Flag.to_le_bytes())?;
|
||||
let mut sectionlenth: u64 = caculate_spectral_data_length(&data.spectral_data_section);
|
||||
file.write_all(&(sectionlenth).to_le_bytes())?; // Section length
|
||||
let numberofspectral=data.spectral_data_section.len() as u16;
|
||||
file.write_all(&numberofspectral.to_le_bytes())?; // Number of spectral data entries
|
||||
// Write spectral data section
|
||||
for spectral_data in &data.spectral_data_section {
|
||||
write_spectral_data(spectral_data, &mut file)?;
|
||||
}
|
||||
|
||||
// Write section length
|
||||
|
||||
// Write spectral info section
|
||||
let spectral_info_flag: u32 = 0xFF00FF00;
|
||||
|
||||
|
||||
let (spectral_info_vec, spectral_info_length) = caculate_spectral_info_length(&data.spectral_info_section);
|
||||
file.write_all(&spectral_info_flag.to_le_bytes())?; // Spectral info 区块标识
|
||||
file.write_all(&spectral_info_length.to_le_bytes())?; // Section length
|
||||
if spectral_info_length != 0 {
|
||||
file.write_all(&spectral_info_vec)?; // Write the spectral info section data
|
||||
|
||||
}
|
||||
|
||||
let other_info_flag: u32 = 0xF0F0F0F0;
|
||||
let (other_info_vec, other_info_length) = cacluate_other_info_length(&data.other_info_section);
|
||||
file.write_all(&other_info_flag.to_le_bytes())?; // Other info 区块标识
|
||||
file.write_all(&other_info_length.to_le_bytes())?; // Section length
|
||||
if other_info_length != 0 {
|
||||
file.write_all(&other_info_vec)?; // Write the other info section data
|
||||
}
|
||||
|
||||
|
||||
|
||||
let image_info_flag: u32 = 0x0F0F0F0F;
|
||||
file.write_all(&image_info_flag.to_le_bytes())?; // Image info 区块标识
|
||||
let image_info_length = caculate_image_info_length(&data.image_info_section);
|
||||
file.write_all(&image_info_length.to_le_bytes())?; // Section length
|
||||
if image_info_length != 0 {
|
||||
let numberofimageinfo = data.image_info_section.len() as u16;
|
||||
file.write_all(&numberofimageinfo.to_le_bytes())?; // Write the image info section data
|
||||
// Write image info section
|
||||
for image_info in &data.image_info_section {
|
||||
write_image_info(image_info, &mut file)?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ok(())
|
||||
}
|
@ -10,7 +10,7 @@
|
||||
|
||||
"package": {
|
||||
"productName": "SpectralPlot",
|
||||
"version": "0.6.62"
|
||||
"version": "0.6.66"
|
||||
},
|
||||
"tauri": {
|
||||
|
||||
|
20
src-tauri/updatelog.md
Normal file
20
src-tauri/updatelog.md
Normal file
@ -0,0 +1,20 @@
|
||||
# IRIS SpectralPlot 更新日志
|
||||
|
||||
---
|
||||
|
||||
## 公司信息
|
||||
|
||||
* **公司名称**:北京依锐思遥感技术有限公司
|
||||
* **官方网站**:[http://www.iris-rs.cn](http://www.iris-rs.cn)
|
||||
* **联系邮箱**:renlixin@iris-rs.cn
|
||||
|
||||
---
|
||||
|
||||
## 更新日志
|
||||
|
||||
* **v0.6.58** 增加了IS3的支持。
|
||||
* **v0.6.59** 将连续保存功能分割为“连续(不保存)”和“连续保存”两个独立功能。
|
||||
* **v0.6.60** 增加了IS3快门的控制功能。
|
||||
* **v0.6.62** 修正了保存逻辑,并修复了波长倒置的问题。
|
||||
* **v0.6.65** 增加了HH3定标功能。
|
||||
* **v0.6.66** 增加了HH3波长定标所需的波长参数,并将寻峰最小值调整为3000。
|
50
src/App.vue
50
src/App.vue
@ -1,26 +1,48 @@
|
||||
<script setup>
|
||||
<script>
|
||||
// This starter template is using Vue 3 <script setup> SFCs
|
||||
// Check out https://vuejs.org/api/sfc-script-setup.html#script-setup
|
||||
import Greet from "./components/Greet.vue";
|
||||
import AppHyperSpectral from "./AppHyperSpectral.vue";
|
||||
import APPDataview from "./DataView/APPDataview.vue";
|
||||
import EventBus from "./eventBus.js";
|
||||
export default {
|
||||
components: {
|
||||
Greet,
|
||||
AppHyperSpectral,
|
||||
APPDataview
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
modalcomponent: 'AppHyperSpectral',
|
||||
compomentlist: ['AppHyperSpectral', 'APPDataview'],
|
||||
indexofcomponent: 0,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
EventBus.on('changemainvue', this.onchangemainvue);
|
||||
console.log(window.__TAURI__);
|
||||
|
||||
},
|
||||
methods: {
|
||||
onchangemainvue(){
|
||||
this.indexofcomponent++;
|
||||
if (this.indexofcomponent >= this.compomentlist.length) {
|
||||
this.indexofcomponent = 0;
|
||||
}
|
||||
this.modalcomponent = this.compomentlist[this.indexofcomponent];
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="container">
|
||||
|
||||
|
||||
<Greet />
|
||||
</div>
|
||||
<component :is="modalcomponent" ref="Commancompent" style="user-select: none;"></component>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.logo.vite:hover {
|
||||
filter: drop-shadow(0 0 2em #747bff);
|
||||
}
|
||||
|
||||
.logo.vue:hover {
|
||||
filter: drop-shadow(0 0 2em #249b73);
|
||||
/* Your additional CSS code here */
|
||||
|
||||
}
|
||||
</style>
|
||||
|
@ -119,6 +119,7 @@ export default {
|
||||
|
||||
<template>
|
||||
|
||||
|
||||
<BToastOrchestrator />
|
||||
|
||||
|
||||
|
98
src/DataView/APPDataview.vue
Normal file
98
src/DataView/APPDataview.vue
Normal file
@ -0,0 +1,98 @@
|
||||
<template>
|
||||
|
||||
|
||||
|
||||
<a-layout style="height: 100vh; width: 100vw;">
|
||||
<a-layout-header>
|
||||
<menubardatavue></menubardatavue>
|
||||
</a-layout-header>
|
||||
<a-layout>
|
||||
<a-layout-sider :resize-directions="['right']" style=" min-width: 200px;max-width: 50vw;">
|
||||
<a-dropdown trigger="contextMenu" alignPoint :style="{ display: 'block' }">
|
||||
<GuiLeftSider class="lefttree" v-on:NodeClicked="ononeFilechoese"></GuiLeftSider>
|
||||
<template #content>
|
||||
<a-doption>Option 1</a-doption>
|
||||
<a-doption>Option 2</a-doption>
|
||||
<a-doption>Option 3</a-doption>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</a-layout-sider>
|
||||
<a-layout-content class="right">
|
||||
<GuiForDataShow ref="GuiForDataShow"></GuiForDataShow>
|
||||
|
||||
</a-layout-content>
|
||||
</a-layout>
|
||||
<a-layout-footer>Footer</a-layout-footer>
|
||||
</a-layout>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import menubardatavue from './menuvue/menubar.vue';
|
||||
import GuiForDataShow from './vuecomponents/GuiForDataShow.vue';
|
||||
import GuiLeftSider from './vuecomponents/GuiLeftSider.vue';
|
||||
export default {
|
||||
name: 'APPDataview',
|
||||
components: {
|
||||
menubardatavue,
|
||||
GuiForDataShow,
|
||||
GuiLeftSider
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 初始化数据
|
||||
message: '欢迎使用 Vue!',
|
||||
treeData: [
|
||||
{
|
||||
title: 'Trunk 0-0',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: 'Branch 0-0-0',
|
||||
key: '0-0-0',
|
||||
children: [
|
||||
{
|
||||
title: 'Leaf',
|
||||
key: '0-0-0-0',
|
||||
},
|
||||
{
|
||||
title: 'Leaf',
|
||||
key: '0-0-0-1',
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Branch 0-0-1',
|
||||
key: '0-0-1',
|
||||
children: [
|
||||
{
|
||||
title: 'Leaf',
|
||||
key: '0-0-1-0',
|
||||
},
|
||||
]
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 方法定义
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 样式区域 */
|
||||
h1 {
|
||||
color: #42b983;
|
||||
}
|
||||
.right {
|
||||
flex: 1;
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
12
src/DataView/appGloblefunction.js
Normal file
12
src/DataView/appGloblefunction.js
Normal file
@ -0,0 +1,12 @@
|
||||
export default {
|
||||
install(app, options) {
|
||||
// 将整个 myFileMethod 实例挂载到全局属性 $fileUtils
|
||||
app.config.globalProperties.$fileUtils = myFileMethod;
|
||||
// 将 isElectron 函数也挂载到全局属性 $isElectron
|
||||
app.config.globalProperties.$isElectron = isElectron;
|
||||
// 如果还有其他全局组件、指令等,也可以在这里注册
|
||||
// app.component('MyGlobalComponent', MyGlobalComponent);
|
||||
// app.directive('my-directive', myDirective);
|
||||
console.log('fileUtilsPlugin 已安装');
|
||||
}
|
||||
};
|
204
src/DataView/menuvue/menubar.vue
Normal file
204
src/DataView/menuvue/menubar.vue
Normal file
@ -0,0 +1,204 @@
|
||||
<script >
|
||||
import { BDropdownItem,BDropdown,BDropdownDivider,BButtonGroup,BButton,BModal,BNavbar,BNavbarBrand,BNavbarNav,BNavItem,BNavItemDropdown,BToast,useToast } from 'bootstrap-vue-next';
|
||||
|
||||
import { ref,Teleport} from 'vue';
|
||||
|
||||
import EventBus from "../../eventBus.js";
|
||||
|
||||
export default {
|
||||
name: 'menubardatavue',
|
||||
components: {
|
||||
BDropdownItem,
|
||||
BDropdown,
|
||||
BDropdownDivider,
|
||||
BButtonGroup,
|
||||
BButton,
|
||||
BModal,
|
||||
BNavbar,
|
||||
BNavbarBrand,
|
||||
BNavbarNav,
|
||||
BNavItem,
|
||||
BNavItemDropdown,
|
||||
BToast
|
||||
|
||||
},
|
||||
emits: ['menubalclicked'],
|
||||
data() {
|
||||
return {
|
||||
msg: 'Welcome to Your Vue.js App',
|
||||
modal:false,
|
||||
DCbutton:{
|
||||
state:"init",
|
||||
|
||||
},
|
||||
WRbutton:{
|
||||
state:"init",
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
setup(props, context) {
|
||||
const active = ref(false);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {active}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener("keydown",this.handlekeydown)
|
||||
EventBus.on('SetMenubutton',this.setbutton);
|
||||
},
|
||||
methods: {
|
||||
setbutton(command){
|
||||
if (command.name == "DC"){
|
||||
this.DCbutton.state = command.state;
|
||||
}
|
||||
if (command.name == "WR"){
|
||||
this.WRbutton.state = command.state;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
showbox(){
|
||||
EventBus.emit('showbox',"hello","提示11")
|
||||
},
|
||||
changemainvue() {
|
||||
EventBus.emit('changemainvue');
|
||||
},
|
||||
|
||||
onmenuclick(type, name) {
|
||||
|
||||
|
||||
|
||||
|
||||
// console.log("menu " + name + " click");
|
||||
// let command = {
|
||||
// name: name,
|
||||
// type: type
|
||||
// }
|
||||
// this.$emit("menubalclicked", command)
|
||||
},
|
||||
handlekeydown(event) {
|
||||
// console.log(event.key);
|
||||
if (event.ctrlKey) {
|
||||
if (event.key == "n" || event.key == "N") {
|
||||
this.onmenuclick('Set', 'Workmode');
|
||||
}
|
||||
if (event.key == "d" || event.key == "D") {
|
||||
this.onmenuclick('Set', 'DevInfo');
|
||||
}
|
||||
if (event.key == "w" || event.key == "W") {
|
||||
this.onmenuclick('Set', 'Weavelenth');
|
||||
}
|
||||
if (event.key == "c" || event.key == "C") {
|
||||
this.onmenuclick('Set', 'Calibrate');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--<script setup lang="ts">-->
|
||||
<!--import { BDropdownItem,BDropdown,BDropdownDivider,BButtonGroup,BButton,BModal,BNavbar,BNavbarBrand,BNavbarNav,BNavItem,BNavItemDropdown,BToast,useToast } from 'bootstrap-vue-next';-->
|
||||
<!--import { ref} from 'vue';-->
|
||||
<!--const {show1} = useToast();-->
|
||||
<!--const active = ref(false)-->
|
||||
<!--</script>-->
|
||||
<template>
|
||||
<BNavbar variant="dark" v-b-color-mode="'dark'" style="height: 3vh">
|
||||
|
||||
<BNavbarNav>
|
||||
<BNavItemDropdown text="文件" right>
|
||||
<BDropdownItem href="#">新建</BDropdownItem>
|
||||
<BDropdownItem href="#" >打开</BDropdownItem>
|
||||
<BDropdownItem href="#">保存</BDropdownItem>
|
||||
<BDropdownItem href="#">另存为</BDropdownItem>
|
||||
<BDropdownDivider></BDropdownDivider>
|
||||
<BDropdownItem href="#">退出</BDropdownItem>
|
||||
<BDropdownItem href="#" @click="onmenuclick('File','Advance')">高级</BDropdownItem>
|
||||
<BDropdownItem @click="onmenuclick('info','help')">帮助</BDropdownItem>
|
||||
</BNavItemDropdown>
|
||||
|
||||
<!-- <!– Navbar dropdowns –>-->
|
||||
|
||||
|
||||
<BNavItemDropdown text="设置" right>
|
||||
<!-- <BDropdownItem @click="onmenuclick('Set','Workmode')">工作模式</BDropdownItem>
|
||||
<BDropdownItem @click="onmenuclick('Set','DevInfo')">设备信息</BDropdownItem> -->
|
||||
<!-- <BDropdownItem @click="onmenuclick('Set','Weavelenth')">波长系数</BDropdownItem> -->
|
||||
<!-- <BDropdownItem @click="onmenuclick('Set','Weavelenthcoeff')">波长设定</BDropdownItem>
|
||||
<BDropdownItem @click="onmenuclick('Set','Calibrate')">定标</BDropdownItem>
|
||||
<BDropdownItem @click="onmenuclick('Set','CalibrateHH3')">HH3定标</BDropdownItem> -->
|
||||
</BNavItemDropdown>
|
||||
|
||||
<BNavItemDropdown text="窗口" right>
|
||||
|
||||
|
||||
<BDropdownItem @click="changemainvue()">数据采集</BDropdownItem>
|
||||
<!-- <BDropdownItem >ES</BDropdownItem>-->
|
||||
<!-- <BDropdownItem href="#">RU</BDropdownItem>-->
|
||||
<!-- <BDropdownItem href="#">FA</BDropdownItem>-->
|
||||
</BNavItemDropdown>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <Teleport to="body">-->
|
||||
<!-- <div class="toast-container position-fixed " style="top:0px;right: 0px;width: 300px" >-->
|
||||
<!-- <BToast v-model="active" variant="info" interval="10" value="100" progress-props="{-->
|
||||
<!-- variant: 'danger',-->
|
||||
<!-- },">-->
|
||||
<!-- <template #title>-->
|
||||
<!-- Title-->
|
||||
<!-- </template>-->
|
||||
<!-- 你好-->
|
||||
<!-- </BToast>-->
|
||||
<!-- </div>-->
|
||||
<!-- </Teleport>-->
|
||||
<!-- <BButton @click="active = !active">Toggle</BButton>-->
|
||||
</BNavbarNav>
|
||||
<!-- <div class="btgroup">
|
||||
<b-button variant="secondary" pill class="siglebt" @click="onmenuclick('Work','OPT')">OPT</b-button>
|
||||
<b-button :variant='DCbutton.state=="OK"?"success":"secondary"' pill class="siglebt" @click=" onmenuclick('Work','DC') ">DC</b-button>
|
||||
|
||||
<b-button :variant='WRbutton.state=="OK"?"success":"secondary"' pill class="siglebt" @click="onmenuclick('Work','WR')">WR</b-button>
|
||||
<b-button variant="secondary" pill class="siglebt" disabled @click="onmenuclick('Work','Rad')">Rad</b-button>
|
||||
<b-button variant="secondary" pill class="siglebt" @click="onmenuclick('Work','Save')">Save</b-button>
|
||||
|
||||
</div> -->
|
||||
</BNavbar>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.navbar {
|
||||
background-color: #f8f9fa;
|
||||
width: 100vw;
|
||||
}
|
||||
.btgroup{
|
||||
position: absolute;
|
||||
right: 15%;
|
||||
}
|
||||
.siglebt{
|
||||
radio: 50%;
|
||||
font-size: 10px;
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
padding: 0px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
73
src/DataView/vuecomponents/GuiForDataShow.vue
Normal file
73
src/DataView/vuecomponents/GuiForDataShow.vue
Normal file
@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<el-main style="height: 100%; width: 100%; overflow: auto;">
|
||||
<el-row class="secondhang">
|
||||
<GuiForPlotShow ref="ASDPlotShow" class="plotcontainer"></GuiForPlotShow>
|
||||
</el-row>
|
||||
<el-row class="firsthang">
|
||||
<el-col :span="10" class="diveinfo">
|
||||
设备信息
|
||||
<GuiForDivesInfo ref="GuiForDivesInforef"></GuiForDivesInfo>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
地图
|
||||
<!-- <MapContainer></MapContainer> -->
|
||||
<a-image
|
||||
width="200"
|
||||
src="https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/a8c8cdb109cb051163646151a4a5083b.png~tplv-uwbnlip3yd-webp.webp"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-main>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import GuiForPlotShow from "./GuiForPlotShow.vue";
|
||||
import MapContainer from "./MapContainer.vue";
|
||||
import GuiForDivesInfo from "./GuiForDivesInfo.vue";
|
||||
import {invoke} from "@tauri-apps/api/tauri";
|
||||
export default {
|
||||
name: "GuiForDataShow",
|
||||
components: {
|
||||
GuiForPlotShow,
|
||||
MapContainer,
|
||||
GuiForDivesInfo
|
||||
},
|
||||
methods: {
|
||||
async onloaddata(data){
|
||||
// console.log(data);
|
||||
let jsonfiletem = await this.$MyGetJsonData(data);
|
||||
this.$refs.ASDPlotShow.onloaddata(jsonfiletem);
|
||||
this.$refs.GuiForDivesInforef.onloaddata(jsonfiletem["ASDInfo"]);
|
||||
|
||||
}
|
||||
},
|
||||
async mounted(){
|
||||
let aaa=await invoke("getoneirisfile",{path:"iris_data_example.iris"});
|
||||
console.log(aaa);
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.plotcontainer{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.firsthang{
|
||||
height: 30%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.secondhang{
|
||||
height: 70%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.diveinfo{
|
||||
|
||||
}
|
||||
</style>
|
74
src/DataView/vuecomponents/GuiForDivesInfo.vue
Normal file
74
src/DataView/vuecomponents/GuiForDivesInfo.vue
Normal file
@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<div class="maincontemer">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>设备信息</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
|
||||
width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="Value"
|
||||
|
||||
width="100px">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "GuiForDivesInfo",
|
||||
data(){
|
||||
return {
|
||||
tableData: [{
|
||||
name: '设备名称',
|
||||
Value: 'ARS'
|
||||
} ]
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
onloaddata(jsondata){
|
||||
//if (jsondata.isObject){
|
||||
this.tableData=[];
|
||||
this.tableData.push(...convertObjectToArray(jsondata));
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function convertObjectToArray(jsonObject) {
|
||||
const jsonArray = [];
|
||||
|
||||
for (const key in jsonObject) {
|
||||
if (jsonObject.hasOwnProperty(key)) {
|
||||
const keyValueObject = {
|
||||
name: key,
|
||||
Value: jsonObject[key]
|
||||
};
|
||||
jsonArray.push(keyValueObject);
|
||||
}
|
||||
}
|
||||
|
||||
return jsonArray;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.maincontemer{
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
425
src/DataView/vuecomponents/GuiForPlotShow.vue
Normal file
425
src/DataView/vuecomponents/GuiForPlotShow.vue
Normal file
@ -0,0 +1,425 @@
|
||||
<template>
|
||||
|
||||
<div class="elbutton" style="width: 100% ;max-height: 50px;">
|
||||
<el-button class="plotbutton">求导</el-button>
|
||||
<el-checkbox v-model="Prameter.smooth" @change="singleshowclicked($event,'Smooth')">平滑</el-checkbox>
|
||||
<el-checkbox @change="singleshowclicked($event,'single')">单条显示</el-checkbox>
|
||||
<el-checkbox @change="singleshowclicked($event,'Radiance')">Radiance</el-checkbox>
|
||||
|
||||
<el-button class="plotbutton" @click="onsavetcliked">导出数据</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="echartbox">
|
||||
|
||||
<div class="chart-container" ref="chart"></div>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import 'zrender/lib/svg/svg';
|
||||
|
||||
export default {
|
||||
name: "GuiForPlotShow",
|
||||
|
||||
data() {
|
||||
return {
|
||||
Prameter: {
|
||||
smooth: false,
|
||||
singleshow: false,
|
||||
Radiance: "DN",
|
||||
Data: null,
|
||||
zoomLock: false
|
||||
},
|
||||
//chart: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
singleshowclicked(event, slots) {
|
||||
if (slots == 'Radiance') {
|
||||
if (event) {
|
||||
this.Prameter.Radiance = "Radiance";
|
||||
} else {
|
||||
this.Prameter.Radiance = "DN";
|
||||
}
|
||||
if (this.Prameter.Data) {
|
||||
this.onloaddata(this.Prameter.Data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// const customText = event.target.getAttribute('custom-text');
|
||||
if (slots == 'single') {
|
||||
if (event) {
|
||||
this.option.legend.selectedMode = 'single';
|
||||
} else {
|
||||
this.option.legend.selectedMode = 'multiple';
|
||||
let lenthofseries = this.option.series.length;
|
||||
this.option.legend.selected = [];
|
||||
for (let i = 0; i < lenthofseries; i++) {
|
||||
this.option.legend.selected.push(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (slots == 'Smooth') {
|
||||
let lenthofseries = this.option.series.length;
|
||||
this.option.legend.selected = [];
|
||||
for (let i = 0; i < lenthofseries; i++) {
|
||||
this.option.series[i].smooth = event;
|
||||
}
|
||||
}
|
||||
this.flushplot();
|
||||
},
|
||||
onsavetcliked(){
|
||||
let data=this.option;
|
||||
var lenthofseries = data.series.length;
|
||||
let xdata = [];
|
||||
let xbegin = data.xAxis.min;
|
||||
let xend = data.xAxis.max;
|
||||
for (let i = xbegin; i <= xend; i++) {
|
||||
xdata.push(i);
|
||||
}
|
||||
var datalenth=data.series[0].data.length;
|
||||
let content = "weavelength,";
|
||||
for (let i = 0; i < lenthofseries; i++) {
|
||||
content += data.series[i].name +",";
|
||||
|
||||
}
|
||||
content += "\n";
|
||||
for (let i = 0; i < datalenth; i++) {
|
||||
content += xdata[i] + ",";
|
||||
for (let j = 0; j < lenthofseries; j++) {
|
||||
content += data.series[j].data[i][1] + ",";
|
||||
}
|
||||
content += "\n";
|
||||
}
|
||||
|
||||
let orgdata=this.Prameter.Data;
|
||||
if (!orgdata){
|
||||
alert("没有数据")
|
||||
return;
|
||||
}
|
||||
let dateget=orgdata["Date"];
|
||||
// dataget 是"2024-05-11 12:01:31" 格式 转换成2024_05_11_12_01_31
|
||||
let dataname=dateget.replace(/-/g,"_");
|
||||
dataname=dataname.replace(/:/g,"_");
|
||||
dataname=dataname.replace(" ","_");
|
||||
dataname=dataname+"_"+this.Prameter.Radiance+".csv";
|
||||
|
||||
// alert(dateget1);
|
||||
|
||||
|
||||
createAndDownloadFile(dataname, content);
|
||||
|
||||
|
||||
},
|
||||
flushplot() {
|
||||
const chartDom = this.$refs.chart;
|
||||
let chart = echarts.getInstanceByDom(chartDom);
|
||||
chart.setOption(this.option);
|
||||
},
|
||||
onloaddata(data) {
|
||||
this.Prameter.Data = data;
|
||||
const chartDom = this.$refs.chart;
|
||||
let chart = echarts.getInstanceByDom(chartDom);
|
||||
this.option.series = [];
|
||||
// console.log(data);
|
||||
let jsonfiletem = data;
|
||||
let lenthofpint = jsonfiletem["Data"].length;
|
||||
;
|
||||
this.option.legend.data = [];
|
||||
//this.option.legend.selected=[];
|
||||
for (let j = lenthofpint - 1; j >= 0; j--) {
|
||||
let lenthofpointdata = jsonfiletem["Data"][j]["PointData"].length;
|
||||
|
||||
let bandsumnow = 0;
|
||||
if (jsonfiletem["Data"][j]["OptimizeResult"]["bandsum"]) {
|
||||
bandsumnow = jsonfiletem["Data"][j]["OptimizeResult"]["bandsum"];
|
||||
} else {
|
||||
bandsumnow = 2151;
|
||||
}
|
||||
|
||||
for (let k = 0; k < lenthofpointdata; k++) {
|
||||
let serilatemp = {
|
||||
type: 'line',
|
||||
//type: 'custom',
|
||||
// minInterval:0.0000000001,
|
||||
|
||||
symbol: 'none', // 不显示数据点
|
||||
smooth: true, // 不使用平滑处理
|
||||
//step: 'start' // 设置 step 类型的起始位置
|
||||
};
|
||||
if (this.Prameter.smooth) {
|
||||
serilatemp.smooth = true;
|
||||
}
|
||||
let temp = [];
|
||||
for (let ii = 0; ii < bandsumnow; ii++) {
|
||||
if (this.Prameter.Radiance == "Radiance")
|
||||
temp.push([ii + 350, jsonfiletem["Data"][j]["PointData"][k][this.Prameter.Radiance][ii] * 1000]);
|
||||
if (this.Prameter.Radiance == "DN")
|
||||
temp.push([ii + 350, jsonfiletem["Data"][j]["PointData"][k][this.Prameter.Radiance][ii]]);
|
||||
//temp.push([ii+350, jsonfiletem["Data"][j]["PointData"][k]["DN"][ii]]);
|
||||
|
||||
|
||||
}
|
||||
serilatemp.data = temp;
|
||||
//serilatemp.renderItem=baoluo,
|
||||
serilatemp.large = true;
|
||||
serilatemp.name = jsonfiletem["Data"][j]["PointData"][k]["PointName"];
|
||||
this.option.legend.data.push(jsonfiletem["Data"][j]["PointData"][k]["PointName"]);
|
||||
this.option.series.push(serilatemp);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
chart.setOption(this.option);
|
||||
var aaa = chart.getOption();
|
||||
aaa = {};
|
||||
},
|
||||
initChart() {
|
||||
const chartDom = this.$refs.chart;
|
||||
let chart = echarts.init(chartDom, null, {renderer: 'svg'});
|
||||
|
||||
this.option = {
|
||||
|
||||
toolbox: {
|
||||
left: 'center',
|
||||
itemSize: 25,
|
||||
top: 55,
|
||||
feature: {
|
||||
dataZoom: {},
|
||||
restore: {}
|
||||
}
|
||||
},
|
||||
// ECharts 配置选项
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
boundaryGap: false,// 显示连续的刻度
|
||||
min: 350,
|
||||
max: 2500,
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside', // 内置数据区域缩放
|
||||
start: 0, // 初始缩放范围的起始位置(0%)
|
||||
end: 100 // 初始缩放范围的结束位置(100%)
|
||||
}
|
||||
]
|
||||
},
|
||||
animation: false,
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
// minInterval: 1//只显示整数
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside', // 内置数据区域缩放
|
||||
start: 0, // 初始缩放范围的起始位置(0%)
|
||||
end: 100 // 初始缩放范围的结束位置(100%)
|
||||
}
|
||||
]
|
||||
//min:0,
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside', // 内置数据区域缩放,包括滚轮缩放
|
||||
xAxisIndex: [0], // 对应 x 轴
|
||||
filterMode: 'none' // 不过滤数据
|
||||
},
|
||||
{
|
||||
type: 'inside', // 内置数据区域缩放,包括滚轮缩放
|
||||
yAxisIndex: [0], // 对应 y 轴
|
||||
filterMode: 'none' // 不过滤数据
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
legend: {
|
||||
data: ['曲线'], // 图例名称
|
||||
show: true,// 显示图例
|
||||
selectedMode: 'multiple', // 图例的选择模式。默认开启图例开关,可选single,multiple
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: [[1, 150], [2, 230], [3, 224], [4, 218], [5, 135], [6, 147], [7, 260]], // 使用二维数组表示数据点的坐标
|
||||
type: 'line',
|
||||
//minInterval:0.0000000001,
|
||||
symbol: 'none', // 不显示数据点
|
||||
smooth: true, // 不使用平滑处理
|
||||
//step: 'start' // 设置 step 类型的起始位置
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
chart.setOption(this.option);
|
||||
let that = this;
|
||||
window.addEventListener('resize', function () {
|
||||
that.echartresize();
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
getDataURL(chart) {
|
||||
// 获取图表数据 URL
|
||||
var url = chart.getDataURL({
|
||||
type: 'csv'
|
||||
});
|
||||
// 创建 XMLHttpRequest 对象
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', url);
|
||||
xhr.setRequestHeader('Content-Type', 'application/csv');
|
||||
xhr.onload = function () {
|
||||
if (xhr.status === 200) {
|
||||
// 下载数据
|
||||
exportCSV(chart, 'data.csv', function () {
|
||||
return xhr.responseText;
|
||||
});
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
},
|
||||
|
||||
handleKeyDown(event) {
|
||||
// 按下 Ctrl 键
|
||||
if (event.ctrlKey) {
|
||||
this.Prameter.zoomLock = true;
|
||||
}
|
||||
},
|
||||
handleKeyUp(event) {
|
||||
// 释放 Ctrl 键
|
||||
if (!event.ctrlKey) {
|
||||
this.Prameter.zoomLock = false;
|
||||
}
|
||||
},
|
||||
handleClickOutside(event) {
|
||||
// 点击图表外部
|
||||
if (this.Prameter.zoomLock) {
|
||||
this.getDataURL(this.chart);
|
||||
}
|
||||
} ,
|
||||
echartresize(){
|
||||
console.log("resize")
|
||||
const chartDom = this.$refs.chart;
|
||||
let chart = echarts.getInstanceByDom(chartDom);
|
||||
|
||||
chart.resize();
|
||||
let width=chartDom.clientWidth;
|
||||
// if (width<800)
|
||||
// {
|
||||
// let option =this.option;
|
||||
// option.grid.left="10%";
|
||||
// chart.setOption(option);
|
||||
// }else{
|
||||
// let option =this.option;
|
||||
// option.grid.left="5%";
|
||||
// chart.setOption(option);
|
||||
// }
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
mounted() {
|
||||
this.initChart();
|
||||
window.addEventListener('keydown', this.handleKeyDown);
|
||||
window.addEventListener('keyup', this.handleKeyUp);
|
||||
window.addEventListener('click', this.handleClickOutside);
|
||||
},
|
||||
beforeUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyDown);
|
||||
window.removeEventListener('keyup', this.handleKeyUp);
|
||||
window.removeEventListener('click', this.handleClickOutside);
|
||||
},
|
||||
|
||||
|
||||
|
||||
beforeDestroy() {
|
||||
if (this.chart) {
|
||||
this.chart.dispose();
|
||||
}
|
||||
}
|
||||
};
|
||||
function exportCSV(chart, filename, getDataFn) {
|
||||
// 获取导出的数据
|
||||
var data = getDataFn();
|
||||
// 创建 Blob 对象
|
||||
var blob = new Blob([data], { type: 'text/csv;charset=utf-8;' });
|
||||
// 创建下载链接
|
||||
var downloadLink = document.createElement('a');
|
||||
downloadLink.setAttribute('download', filename);
|
||||
downloadLink.setAttribute('href', URL.createObjectURL(blob));
|
||||
downloadLink.style.display = 'none';
|
||||
document.body.appendChild(downloadLink);
|
||||
// 触发下载链接
|
||||
downloadLink.click();
|
||||
// 移除下载链接
|
||||
document.body.removeChild(downloadLink);
|
||||
}
|
||||
function createAndDownloadFile(fileName, content) {
|
||||
// 创建一个 a 标签
|
||||
var aTag = document.createElement('a');
|
||||
// 创建一个 Blob 对象
|
||||
var blob = new Blob([content]);
|
||||
// 设置下载的文件名
|
||||
aTag.download = fileName;
|
||||
// 创建一个临时的 URL 指向 Blob 对象
|
||||
aTag.href = URL.createObjectURL(blob);
|
||||
// 模拟 a 标签的点击事件,触发下载
|
||||
aTag.click();
|
||||
// 释放创建的临时 URL 资源
|
||||
URL.revokeObjectURL(blob);
|
||||
}
|
||||
|
||||
|
||||
function baoluo(params, api) {
|
||||
// console.log(params);
|
||||
var xValue = api.value(0);
|
||||
var highPoint = api.coord([xValue, api.value(1)]);
|
||||
var lowPoint = api.coord([xValue, api.value(2)]);
|
||||
|
||||
return {
|
||||
type: 'line',
|
||||
shape: {
|
||||
x1: 350,
|
||||
y1: 10,
|
||||
x2: 400,
|
||||
y2: 100
|
||||
},
|
||||
style: api.style({
|
||||
stroke: 'rgba(0,255,0,0.2)',
|
||||
fill: 'none'
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.chart-container {
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
}
|
||||
|
||||
.echartbox {
|
||||
width: 95%;
|
||||
height: 90%;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.plotbutton {
|
||||
margin-right: 20px;
|
||||
|
||||
}
|
||||
</style>
|
78
src/DataView/vuecomponents/GuiLeftSider.vue
Normal file
78
src/DataView/vuecomponents/GuiLeftSider.vue
Normal file
@ -0,0 +1,78 @@
|
||||
<template>
|
||||
<div class="el-treecontain">
|
||||
<el-tree :data="data" :props="defaultProps" class="el-treemain" @node-click="handleNodeClick"/>
|
||||
</div>
|
||||
<button @click="onopendata">click</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "GuiLeftSider",
|
||||
data() {
|
||||
return {
|
||||
data: [{
|
||||
label: '请选择',
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label',
|
||||
},
|
||||
DefualtPath: "\\ARS_data"
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
//if(this.$isElectron()) {
|
||||
this.DefualtPath="";
|
||||
return
|
||||
|
||||
// };
|
||||
await this.onopendata();
|
||||
},
|
||||
methods: {
|
||||
handleNodeClick(data) {
|
||||
if (data.isLeaf)
|
||||
// console.log(getParentPath(data));
|
||||
this.$emit("NodeClicked", this.DefualtPath+getParentPath(data));
|
||||
|
||||
},
|
||||
async onopendata() {
|
||||
let cfiles = await this.$MyGetFolderlist(this.DefualtPath);
|
||||
this.data = [];
|
||||
this.data.push(cfiles);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getParentPath(node) {
|
||||
if (!node) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (node.parent) {
|
||||
return getParentPath(node.parent) + '\\' + node.label;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
el-tree{
|
||||
height: 100vh;
|
||||
overflow: auto;
|
||||
}
|
||||
.el-treemain {
|
||||
min-width: 100%;
|
||||
white-space: nowrap; /* 不换行,使树节点水平排列 */
|
||||
display: inline-block; /* 横向排列 */
|
||||
text-align: left;
|
||||
}
|
||||
.el-treecontain{
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
40
src/DataView/vuecomponents/HelloWorld.vue
Normal file
40
src/DataView/vuecomponents/HelloWorld.vue
Normal file
@ -0,0 +1,40 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
defineProps({
|
||||
msg: String,
|
||||
})
|
||||
|
||||
const count = ref(0)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>{{ msg }}</h1>
|
||||
|
||||
<div class="card">
|
||||
<button type="button" @click="count++">count is {{ count }}</button>
|
||||
<p>
|
||||
Edit
|
||||
<code>components/HelloWorld.vue</code> to test HMR
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Check out
|
||||
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
|
||||
>create-vue</a
|
||||
>, the official Vue + Vite starter
|
||||
</p>
|
||||
<p>
|
||||
Install
|
||||
<a href="https://github.com/vuejs/language-tools" target="_blank">Volar</a>
|
||||
in your IDE for a better DX
|
||||
</p>
|
||||
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.read-the-docs {
|
||||
color: #888;
|
||||
}
|
||||
</style>
|
78
src/DataView/vuecomponents/MapContainer.vue
Normal file
78
src/DataView/vuecomponents/MapContainer.vue
Normal file
@ -0,0 +1,78 @@
|
||||
<template>
|
||||
<div ref="mapContainer" id="map" style="width: 100%; height: 400px;"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import "maptalks/dist/maptalks.css";
|
||||
import * as maptalks from "maptalks";
|
||||
|
||||
export default {
|
||||
name: "MapContainer",
|
||||
data() {
|
||||
return {
|
||||
map: null,
|
||||
layer: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
addpointtomap(lon,lat){
|
||||
var marker1 = new maptalks.Marker(
|
||||
[116.255535,40.204654],
|
||||
{
|
||||
'symbol': {
|
||||
'markerType': 'ellipse',
|
||||
'markerFill': 'rgb(135,196,240)',
|
||||
'markerFillOpacity': 1,
|
||||
'markerLineColor': '#34495e',
|
||||
'markerLineWidth': 3,
|
||||
'markerLineOpacity': 1,
|
||||
'markerLineDasharray': [],
|
||||
'markerWidth': 40,
|
||||
'markerHeight': 40,
|
||||
'markerDx': 0,
|
||||
'markerDy': 0,
|
||||
'markerOpacity': 1
|
||||
}
|
||||
}
|
||||
)
|
||||
marker1.addTo(this.layer);
|
||||
|
||||
},
|
||||
initializeMap() {
|
||||
this.map = new maptalks.Map('map', {
|
||||
center: [-0.113049,51.498568],
|
||||
zoom: 14,
|
||||
compassControl: {
|
||||
position: 'top-left',
|
||||
},
|
||||
|
||||
baseLayer: new maptalks.TileLayer('base', {
|
||||
urlTemplate: 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png',
|
||||
subdomains: ['a','b','c','d'],
|
||||
attribution: '© <a href="http://osm.org">OpenStreetMap</a> contributors, © <a href="https://carto.com/">CARTO</a>'
|
||||
})
|
||||
});
|
||||
this.map.setCenter([116.255535,40.204654]);
|
||||
this.layer=new maptalks.VectorLayer('vector').addTo(this.map);
|
||||
this.addpointtomap(0,0)
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.initializeMap();
|
||||
// const mapOptions = {
|
||||
// center: [0, 0],
|
||||
// zoom: 10
|
||||
// };
|
||||
//
|
||||
// const map = new Map(this.$refs.mapContainer, mapOptions);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -7,6 +7,7 @@ import setWavelenth from "./components/menubox/SetWavelenth.vue";
|
||||
import SetName from "./components/menubox/SetName.vue";
|
||||
import SetWorkmode from "./components/menubox/SetWorkmode.vue";
|
||||
import setCalibrate from "./components/menubox/SetCalibrate.vue";
|
||||
import setCalibrateHH3 from "./components/menubox/SetCalibrateHH3.vue";
|
||||
import setWavelenthCoeff from "./components/menubox/SetWavelenthcoeff.vue";
|
||||
import Help from "./components/menubox/help.vue";
|
||||
import Greet from "./components/Greet.vue";
|
||||
@ -109,6 +110,17 @@ export default {
|
||||
this.showModal();
|
||||
|
||||
|
||||
}
|
||||
if (command.name=="CalibrateHH3")
|
||||
{
|
||||
if (!this.isinAdvanceMode()) return;
|
||||
this.modaltitle="能量定标";
|
||||
this.modalcomponent=setCalibrateHH3
|
||||
await this.$nextTick();
|
||||
// this.$refs.Commancompent.GetSenSorInfo();
|
||||
this.showModal();
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (command.type=="Work")
|
||||
|
@ -66,6 +66,9 @@ export default {
|
||||
showbox(){
|
||||
EventBus.emit('showbox',"hello","提示11")
|
||||
},
|
||||
changemainvue() {
|
||||
EventBus.emit('changemainvue');
|
||||
},
|
||||
|
||||
onmenuclick(type, name) {
|
||||
|
||||
@ -138,12 +141,13 @@ export default {
|
||||
<!-- <BDropdownItem @click="onmenuclick('Set','Weavelenth')">波长系数</BDropdownItem> -->
|
||||
<BDropdownItem @click="onmenuclick('Set','Weavelenthcoeff')">波长设定</BDropdownItem>
|
||||
<BDropdownItem @click="onmenuclick('Set','Calibrate')">定标</BDropdownItem>
|
||||
<BDropdownItem @click="onmenuclick('Set','CalibrateHH3')">HH3定标</BDropdownItem>
|
||||
</BNavItemDropdown>
|
||||
|
||||
<BNavItemDropdown text="窗口" right>
|
||||
|
||||
|
||||
<!-- <BDropdownItem @click="showbox">EN</BDropdownItem>-->
|
||||
<BDropdownItem @click="changemainvue()">数据查看</BDropdownItem>
|
||||
<!-- <BDropdownItem >ES</BDropdownItem>-->
|
||||
<!-- <BDropdownItem href="#">RU</BDropdownItem>-->
|
||||
<!-- <BDropdownItem href="#">FA</BDropdownItem>-->
|
||||
|
1112
src/components/menubox/SetCalibrateHH3.vue
Normal file
1112
src/components/menubox/SetCalibrateHH3.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -41,6 +41,7 @@ export default {
|
||||
546.074,
|
||||
576.960,
|
||||
579.066,
|
||||
587.092,
|
||||
696.543,
|
||||
706.722,
|
||||
714.704,
|
||||
@ -49,15 +50,20 @@ export default {
|
||||
750.387,
|
||||
763.511,
|
||||
772.376,
|
||||
785.482,
|
||||
794.818,
|
||||
800.616,
|
||||
811.531,
|
||||
826.452,
|
||||
842.465,
|
||||
850.887,
|
||||
852.144,
|
||||
866.794,
|
||||
892.869,
|
||||
912.297,
|
||||
922.450
|
||||
922.450,
|
||||
965.779,
|
||||
1013.976
|
||||
],
|
||||
shutter_time_up: 1,
|
||||
shutter_time_down: 1,
|
||||
@ -266,7 +272,7 @@ export default {
|
||||
async findpeak(specindex) {
|
||||
if (specindex == 0) {
|
||||
let dataforpeak = this.Data.data;
|
||||
var peaks = await invoke("find_peek", { data: dataforpeak, minheigh: 5000 });
|
||||
var peaks = await invoke("find_peek", { data: dataforpeak, minheigh: 3000 });
|
||||
console.log(peaks);
|
||||
let peaksforshow = [];
|
||||
let coeffweave1 = this.Devinfo.bochangxishu.a0;
|
||||
@ -331,7 +337,7 @@ export default {
|
||||
|
||||
else if (specindex == 1) {
|
||||
let dataforpeak = this.DataDown.data;
|
||||
var peaks = await invoke("find_peek", { data: dataforpeak, minheigh: 500 });
|
||||
var peaks = await invoke("find_peek", { data: dataforpeak, minheigh: 3000 });
|
||||
console.log(peaks);
|
||||
let peaksforshow = [];
|
||||
let coeffweave1 = this.Devinfo.bochangxishu2.a0;
|
||||
|
@ -1,12 +1,54 @@
|
||||
<template>
|
||||
<div class="help">
|
||||
<h1>更新日志</h1>
|
||||
<MarkdownFile></MarkdownFile>
|
||||
<div class="markdown-container help">
|
||||
<vue-markdown :source="markdownContent" :options="markdownOptions"></vue-markdown>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import VueMarkdown from 'vue-markdown-render'; // 注意这里的导入路径可能因库版本而异
|
||||
import {fs} from "@tauri-apps/api";
|
||||
|
||||
// 导入一个 highlight.js 的主题样式,例如 dracula
|
||||
// 你需要安装 highlight.js:npm install highlight.js
|
||||
// import 'highlight.js/styles/dracula.css'; // 你可以选择其他主题样式
|
||||
export default {
|
||||
name: 'MarkdownViewerComponent',
|
||||
components: {
|
||||
VueMarkdown
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: 'Vue 中展示 Markdown (使用组件)',
|
||||
markdownContent: "",
|
||||
markdownOptions: {
|
||||
gfm: true, // 启用 GitHub Flavored Markdown
|
||||
breaks: true, // 将单个换行符渲染为 <br>
|
||||
// highlight 选项用于代码块高亮
|
||||
highlight: function(code, lang) {
|
||||
const language = hljs.getLanguage(lang) ? lang : 'plaintext';
|
||||
return hljs.highlight(code, { language }).value;
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.loadMarkdownContent();
|
||||
},
|
||||
methods: {
|
||||
async loadMarkdownContent() {
|
||||
try {
|
||||
// 确保文件路径正确,Tauri 应用中文件路径需要注意
|
||||
// 如果 updatelog.md 在应用的资源目录,可能需要使用 fs.appDataDir() 或 fs.resourceDir()
|
||||
// 这里假设它在应用启动的当前工作目录或通过bundle访问
|
||||
var configdata = await fs.readTextFile("updatelog.md");
|
||||
this.markdownContent = configdata;
|
||||
} catch (error) {
|
||||
console.error("Error reading markdown file:", error);
|
||||
this.markdownContent = "无法加载更新日志。";
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
@ -16,6 +58,18 @@
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
/* 针对 markdown-container 增加滚动条和高度限制 */
|
||||
.markdown-container {
|
||||
/* 设置最大高度,例如:视口高度减去顶部或其他元素的高度 */
|
||||
/* 你可以根据实际布局调整这个值,例如固定的 500px */
|
||||
max-height: calc(100vh - 250px); /* 假设留出 150px 给其他内容或边距 */
|
||||
overflow-y: auto; /* 当内容超出最大高度时显示垂直滚动条 */
|
||||
/* 可以添加一些内边距,让滚动条不紧贴内容 */
|
||||
padding-right: 15px; /* 为滚动条留出空间,避免内容被遮挡 */
|
||||
box-sizing: border-box; /* 确保 padding 包含在 max-height 内 */
|
||||
}
|
||||
|
||||
|
||||
.help h1 {
|
||||
font-size: 24px;
|
||||
margin-bottom: 10px;
|
||||
@ -24,4 +78,25 @@
|
||||
.help p {
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
/* 如果需要,可以进一步美化滚动条 */
|
||||
/* 适用于 WebKit 浏览器 (Chrome, Safari, Edge) */
|
||||
.markdown-container::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
|
||||
}
|
||||
|
||||
.markdown-container::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.markdown-container::-webkit-scrollbar-thumb {
|
||||
background: #888;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.markdown-container::-webkit-scrollbar-thumb:hover {
|
||||
background: #555;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { createApp } from "vue";
|
||||
import "./styles.css";
|
||||
import App from "./AppHyperSpectral.vue";
|
||||
//import App from "./AppHyperSpectral.vue";
|
||||
import App from "./App.vue";
|
||||
import { appWindow } from '@tauri-apps/api/window';
|
||||
import { LogicalSize } from '@tauri-apps/api/window';
|
||||
import ElementPlus from 'element-plus';
|
||||
@ -28,7 +29,7 @@ async function setWindowSize() {
|
||||
}
|
||||
var app = createApp(App);
|
||||
app.use(ElementPlus);
|
||||
app.use(createBootstrap( {components: true, directives: true,plugins:true,icons: true,}));
|
||||
app.use(createBootstrap( {components: true, directives: true,plugins:true,icons: true,}));
|
||||
app.use(ArcoVue);
|
||||
app.use(DraggablePlugin);
|
||||
app.use(KonamiCode, {
|
||||
|
148
yarn.lock
148
yarn.lock
@ -91,6 +91,18 @@
|
||||
resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz"
|
||||
integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
|
||||
|
||||
"@maptalks/feature-filter@^1.3.0":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.npmjs.org/@maptalks/feature-filter/-/feature-filter-1.3.0.tgz"
|
||||
integrity sha512-O6GcFzPuCbz6bO4TNBnmP8VunS0GexTzZ4m36A4HbYQICY1cplpFgntX2fyB/TY3cZrFRGoeMePBeMZFMOOhcQ==
|
||||
|
||||
"@maptalks/function-type@^1.4.1":
|
||||
version "1.4.1"
|
||||
resolved "https://registry.npmjs.org/@maptalks/function-type/-/function-type-1.4.1.tgz"
|
||||
integrity sha512-Z78FdI8mZ4vdcBqxlMDV6HP6WE/njZ9PhlM5JwbURxW1DnQK7R1GP+fubkGJPP6hVSv0Y52/dK8cZE/HuXVZ3A==
|
||||
dependencies:
|
||||
colorin "^0.5.0"
|
||||
|
||||
"@nodelib/fs.scandir@2.1.5":
|
||||
version "2.1.5"
|
||||
resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz"
|
||||
@ -498,9 +510,9 @@ bootstrap@^5.3.3:
|
||||
integrity sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==
|
||||
|
||||
brace-expansion@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz"
|
||||
integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
|
||||
version "2.0.2"
|
||||
resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz"
|
||||
integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==
|
||||
dependencies:
|
||||
balanced-match "^1.0.0"
|
||||
|
||||
@ -576,6 +588,16 @@ color@^3.1.3:
|
||||
color-convert "^1.9.3"
|
||||
color-string "^1.6.0"
|
||||
|
||||
colorin@^0.5.0:
|
||||
version "0.5.0"
|
||||
resolved "https://registry.npmjs.org/colorin/-/colorin-0.5.0.tgz"
|
||||
integrity sha512-gN6fIMCehYUonAhbmm5+ZHeFunG75u77hI2tRlVndNthO6v0wZMV2G2FwYSi8Ws4b4lpFJK1ql2a/MlW9z/Vhg==
|
||||
|
||||
colorin@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.npmjs.org/colorin/-/colorin-0.6.0.tgz"
|
||||
integrity sha512-huI54MwKNMP6eypurqzxGf7rvTA3pNWdXZopQbN7v3TDxXYWyyGQ3CtQndNZ2Z0Gy6HDWqA7sRYxbjRDO2FZMA==
|
||||
|
||||
compute-scroll-into-view@^1.0.20:
|
||||
version "1.0.20"
|
||||
resolved "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.20.tgz"
|
||||
@ -724,6 +746,11 @@ entities@^4.4.0, entities@^4.5.0:
|
||||
resolved "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz"
|
||||
integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==
|
||||
|
||||
entities@~3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz"
|
||||
integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==
|
||||
|
||||
errno@^0.1.1:
|
||||
version "0.1.8"
|
||||
resolved "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz"
|
||||
@ -800,6 +827,11 @@ fastq@^1.6.0:
|
||||
dependencies:
|
||||
reusify "^1.0.4"
|
||||
|
||||
fdir@^6.4.4:
|
||||
version "6.4.6"
|
||||
resolved "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz"
|
||||
integrity sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==
|
||||
|
||||
fill-range@^7.1.1:
|
||||
version "7.1.1"
|
||||
resolved "https://mirrors.cloud.tencent.com/npm/fill-range/-/fill-range-7.1.1.tgz"
|
||||
@ -812,6 +844,11 @@ fresh@~0.5.2:
|
||||
resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz"
|
||||
integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==
|
||||
|
||||
frustum-intersects@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.npmjs.org/frustum-intersects/-/frustum-intersects-0.1.0.tgz"
|
||||
integrity sha512-W0S6dmX5LJLtamimyuKhvbkpDTm5eVfMgk4X9yXNyWQ1zZ/cMm0PZoeX9Pm0tL302l+erQVrdfRGhV3ILfeTeQ==
|
||||
|
||||
function-bind@^1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz"
|
||||
@ -1031,9 +1068,9 @@ koa-router@^7.1.1:
|
||||
urijs "^1.19.0"
|
||||
|
||||
koa@^2.2.0:
|
||||
version "2.16.0"
|
||||
resolved "https://registry.npmjs.org/koa/-/koa-2.16.0.tgz"
|
||||
integrity sha512-Afhqq0Vq3W7C+/rW6IqHVBDLzqObwZ07JaUNUEF8yCQ6afiyFE3RAy+i7V0E46XOWlH7vPWn/x0vsZwNy6PWxw==
|
||||
version "2.16.1"
|
||||
resolved "https://registry.npmjs.org/koa/-/koa-2.16.1.tgz"
|
||||
integrity sha512-umfX9d3iuSxTQP4pnzLOz0HKnPg0FaUUIKcye2lOiz3KPu1Y3M3xlz76dISdFPQs37P9eJz1wUpcTS6KDPn9fA==
|
||||
dependencies:
|
||||
accepts "^1.3.5"
|
||||
cache-content-type "^1.0.0"
|
||||
@ -1076,6 +1113,18 @@ less@*, less@^4.2.0:
|
||||
needle "^3.1.0"
|
||||
source-map "~0.6.0"
|
||||
|
||||
lineclip@^1.1.5:
|
||||
version "1.1.5"
|
||||
resolved "https://registry.npmjs.org/lineclip/-/lineclip-1.1.5.tgz"
|
||||
integrity sha512-KlA/wRSjpKl7tS9iRUdlG72oQ7qZ1IlVbVgHwoO10TBR/4gQ86uhKow6nlzMAJJhjCWKto8OeoAzzIzKSmN25A==
|
||||
|
||||
linkify-it@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz"
|
||||
integrity sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==
|
||||
dependencies:
|
||||
uc.micro "^1.0.1"
|
||||
|
||||
linkify-it@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz"
|
||||
@ -1121,6 +1170,33 @@ make-dir@^2.1.0:
|
||||
pify "^4.0.1"
|
||||
semver "^5.6.0"
|
||||
|
||||
maptalks@^1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.npmjs.org/maptalks/-/maptalks-1.1.3.tgz"
|
||||
integrity sha512-swf+5/h7s9SyHgnz5Gnnocjq1TVBbmazZnP2iPN+bzbNTf0ExnjVCiqml9wuPHBcUW3LCzjLqzL6KCB0CVCv+g==
|
||||
dependencies:
|
||||
"@maptalks/feature-filter" "^1.3.0"
|
||||
"@maptalks/function-type" "^1.4.1"
|
||||
colorin "^0.6.0"
|
||||
frustum-intersects "^0.1.0"
|
||||
lineclip "^1.1.5"
|
||||
rbush "^2.0.2"
|
||||
simplify-js "^1.2.1"
|
||||
optionalDependencies:
|
||||
"@rollup/rollup-darwin-x64" "^4.13.0"
|
||||
"@rollup/rollup-linux-x64-gnu" "^4.13.0"
|
||||
|
||||
markdown-it@^13.0.2:
|
||||
version "13.0.2"
|
||||
resolved "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.2.tgz"
|
||||
integrity sha512-FtwnEuuK+2yVU7goGn/MJ0WBZMM9ZPgU9spqlFs7/A/pDIUNSOQZhUgOqYCficIuR2QaFnrt8LHqBWsbTAoI5w==
|
||||
dependencies:
|
||||
argparse "^2.0.1"
|
||||
entities "~3.0.1"
|
||||
linkify-it "^4.0.1"
|
||||
mdurl "^1.0.1"
|
||||
uc.micro "^1.0.5"
|
||||
|
||||
markdown-it@^14.1.0:
|
||||
version "14.1.0"
|
||||
resolved "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz"
|
||||
@ -1133,6 +1209,11 @@ markdown-it@^14.1.0:
|
||||
punycode.js "^2.3.1"
|
||||
uc.micro "^2.1.0"
|
||||
|
||||
mdurl@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz"
|
||||
integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==
|
||||
|
||||
mdurl@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz"
|
||||
@ -1307,6 +1388,11 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1:
|
||||
resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz"
|
||||
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
||||
|
||||
"picomatch@^3 || ^4", picomatch@^4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz"
|
||||
integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==
|
||||
|
||||
picomodal@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.npmjs.org/picomodal/-/picomodal-3.0.0.tgz"
|
||||
@ -1355,6 +1441,18 @@ queue-microtask@^1.2.2:
|
||||
resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz"
|
||||
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
|
||||
|
||||
quickselect@^1.0.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.npmjs.org/quickselect/-/quickselect-1.1.1.tgz"
|
||||
integrity sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ==
|
||||
|
||||
rbush@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.npmjs.org/rbush/-/rbush-2.0.2.tgz"
|
||||
integrity sha512-XBOuALcTm+O/H8G90b6pzu6nX6v2zCKiFG4BJho8a+bY6AER6t8uQUZdi5bomQc0AprCWhEGa7ncAbbRap0bRA==
|
||||
dependencies:
|
||||
quickselect "^1.0.1"
|
||||
|
||||
readdirp@~3.6.0:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz"
|
||||
@ -1381,7 +1479,7 @@ reusify@^1.0.4:
|
||||
resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz"
|
||||
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
|
||||
|
||||
rollup@^1.20.0||^2.0.0||^3.0.0||^4.0.0, rollup@^4.30.1:
|
||||
rollup@^1.20.0||^2.0.0||^3.0.0||^4.0.0, rollup@^4.34.9:
|
||||
version "4.38.0"
|
||||
resolved "https://registry.npmjs.org/rollup/-/rollup-4.38.0.tgz"
|
||||
integrity sha512-5SsIRtJy9bf1ErAOiFMFzl64Ex9X5V7bnJ+WlFMb+zmP459OSWCEG7b0ERZ+PEU7xPt4OG3RHbrp1LJlXxYTrw==
|
||||
@ -1481,6 +1579,11 @@ simple-swizzle@^0.2.2:
|
||||
dependencies:
|
||||
is-arrayish "^0.3.1"
|
||||
|
||||
simplify-js@^1.2.1:
|
||||
version "1.2.4"
|
||||
resolved "https://registry.npmjs.org/simplify-js/-/simplify-js-1.2.4.tgz"
|
||||
integrity sha512-vITfSlwt7h/oyrU42R83mtzFpwYk3+mkH9bOHqq/Qw6n8rtR7aE3NZQ5fbcyCUVVmuMJR6ynsAhOfK2qoah8Jg==
|
||||
|
||||
source-map-js@^1.0.2, source-map-js@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz"
|
||||
@ -1506,6 +1609,14 @@ tiny-emitter@^2.0.0:
|
||||
resolved "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz"
|
||||
integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==
|
||||
|
||||
tinyglobby@^0.2.13:
|
||||
version "0.2.14"
|
||||
resolved "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz"
|
||||
integrity sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==
|
||||
dependencies:
|
||||
fdir "^6.4.4"
|
||||
picomatch "^4.0.2"
|
||||
|
||||
to-regex-range@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://mirrors.cloud.tencent.com/npm/to-regex-range/-/to-regex-range-5.0.1.tgz"
|
||||
@ -1536,6 +1647,11 @@ type-is@^1.6.16:
|
||||
media-typer "0.3.0"
|
||||
mime-types "~2.1.24"
|
||||
|
||||
uc.micro@^1.0.1, uc.micro@^1.0.5:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz"
|
||||
integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==
|
||||
|
||||
uc.micro@^2.0.0, uc.micro@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz"
|
||||
@ -1597,13 +1713,16 @@ vary@^1.1.2:
|
||||
integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==
|
||||
|
||||
"vite@^5.0.0 || ^6.0.0", vite@^6.2.3:
|
||||
version "6.2.3"
|
||||
resolved "https://registry.npmjs.org/vite/-/vite-6.2.3.tgz"
|
||||
integrity sha512-IzwM54g4y9JA/xAeBPNaDXiBF8Jsgl3VBQ2YQ/wOY6fyW3xMdSoltIV3Bo59DErdqdE6RxUfv8W69DvUorE4Eg==
|
||||
version "6.3.5"
|
||||
resolved "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz"
|
||||
integrity sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==
|
||||
dependencies:
|
||||
esbuild "^0.25.0"
|
||||
fdir "^6.4.4"
|
||||
picomatch "^4.0.2"
|
||||
postcss "^8.5.3"
|
||||
rollup "^4.30.1"
|
||||
rollup "^4.34.9"
|
||||
tinyglobby "^0.2.13"
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.3"
|
||||
|
||||
@ -1639,6 +1758,13 @@ vue-json-viewer@^3.0.4:
|
||||
dependencies:
|
||||
clipboard "^2.0.4"
|
||||
|
||||
vue-markdown-render@^2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.npmjs.org/vue-markdown-render/-/vue-markdown-render-2.2.1.tgz"
|
||||
integrity sha512-XkYnC0PMdbs6Vy6j/gZXSvCuOS0787Se5COwXlepRqiqPiunyCIeTPQAO2XnB4Yl04EOHXwLx5y6IuszMWSgyQ==
|
||||
dependencies:
|
||||
markdown-it "^13.0.2"
|
||||
|
||||
"vue@^2.0.0 || >=3.0.5", "vue@^3.0.0-0 || ^2.6.0", vue@^3.1.0, vue@^3.2.0, vue@^3.2.2, vue@^3.2.25, vue@^3.2.31, vue@^3.3.4, vue@^3.4.21, "vue@2 || 3", vue@3.4.21:
|
||||
version "3.4.21"
|
||||
resolved "https://registry.npmjs.org/vue/-/vue-3.4.21.tgz"
|
||||
|
Reference in New Issue
Block a user