Compare commits

..

47 Commits

Author SHA1 Message Date
peterlu14 a0fea97ca7 [update] differential 2022-08-19 18:56:12 +08:00
peterlu14 82f46030a3 [update] fix realtime unit function type 2022-08-19 16:17:57 +08:00
peterlu14 8052dfcbf4 [update] file table fix 2022-08-19 15:55:14 +08:00
peterlu14 001f7139eb [update] fix file table 2022-08-16 20:27:35 +08:00
peterlu14 27bb612bd8 [update] add eis global mode 2022-08-16 19:51:35 +08:00
peterlu14 f5ce74f308 [update] EIS add VOLT_VSCAN and time_duration 2022-08-16 19:51:31 +08:00
peterlu14 fc269f972a [update] realtime chart default unit determine by mode now 2022-08-15 19:06:16 +08:00
peterlu14 05abfd122a [debug] fix file-table folder show working mode error 2022-08-15 18:12:04 +08:00
peterlu14 567d7595cf Merge remote-tracking branch 'origin/dev/delete_actions' into release/v1.3.2/replay_new_function 2022-08-15 14:26:50 +08:00
sss28072637 2167f9ef06 [update] complete delete actions, default parameter 2022-08-15 12:01:57 +08:00
peterlu14 68e0edfcdd [update] fix captured failed 2022-08-14 19:09:24 +08:00
peterlu14 07c3f6c9a6 [update] file show working mode 2022-08-13 22:41:00 +08:00
peterlu14 7fb30ffa0a [update] remove replay Axis option cycle 2022-08-13 22:05:14 +08:00
peterlu14 d501d2e01d [update] change default unit & change idiot to not support 2022-08-13 21:53:00 +08:00
peterlu14 99d903dcbf [debug] fix init Time-X Graph change xAxis to other cause chart crush problem (cost lots time) 2022-08-13 21:52:24 +08:00
peterlu14 599838adc5 [debug] fix init not showing data 2022-08-13 21:51:05 +08:00
peterlu14 c9593e2a6e [update] remove old code & refreshformatter no need to refreshChart 2022-08-13 21:50:24 +08:00
peterlu14 16e3e49168 [debug] fix cycle not showing & data null & rules followed by controlPanel 2022-08-13 20:38:45 +08:00
peterlu14 fb0d8bd3f2 [update] replay hide old methods 2022-08-12 21:34:33 +08:00
peterlu14 2f1fe88a60 [update] remove 456456 2022-08-12 21:10:28 +08:00
peterlu14 1eca3c0e72 [update] chart ui resize & mac address to uppercase 2022-08-12 21:09:57 +08:00
peterlu14 1f72708e69 [update] chart name uppercase 2022-08-12 21:08:20 +08:00
peterlu14 8efeb6572d Merge remote-tracking branch 'origin/dev/replayControlPanelFix' into release/v1.3.1/issue_fixed 2022-08-12 19:00:23 +08:00
nthu1080112244 3fce79d6c9 [update] replay control panel & real time layout 2022-08-12 18:57:42 +08:00
peterlu14 52d93f7fad Merge remote-tracking branch 'origin/dev/adjust_button' into release/v1.3.1/issue_fixed 2022-08-12 18:51:33 +08:00
sss28072637 4178842ba3 [update] update button icon 2022-08-12 18:06:33 +08:00
sss28072637 625908053b [fix] fix select-box of device 2022-08-12 11:05:48 +08:00
peterlu14 94eb83ec24 [update] fix replay legend label not showing 2022-08-11 20:33:45 +08:00
peterlu14 4bd25148de [update] hide overview chart legend name 2022-08-11 19:14:37 +08:00
sss28072637 17feeb893e [update] device automatically connect when clicking project 2022-08-11 18:19:28 +08:00
peterlu14 f6b66f0114 [update] hide control panel 2022-08-11 17:36:39 +08:00
peterlu14 a256112c6b [update] refresh timer speed up 2022-08-11 15:20:14 +08:00
sss28072637 0ad6b39f96 [update] add button of each task & add close btn 2022-08-11 15:18:11 +08:00
peterlu14 bad7406b10 [update] remove duplicate router 2022-08-11 13:33:05 +08:00
peterlu14 957e806abb [debug] fix last data not show 2022-08-11 13:32:38 +08:00
peterlu14 0824a6b534 [update] remove max limit & short max range 2022-08-11 11:20:45 +08:00
peterlu14 95f1e05b7e [debug] fix databufferstream not clear problem 2022-08-11 11:19:30 +08:00
peterlu14 1fae8538e8 Merge branch 'dev/debug' into release/v1.3.0/replay-capture-sgFilter 2022-08-11 01:04:28 +08:00
peterlu14 f92ba3d098 Merge remote-tracking branch 'origin/dev/scheduler-function' into release/v1.3.0/replay-capture-sgFilter 2022-08-11 01:04:25 +08:00
peterlu14 28b6ee9aa8 Merge remote-tracking branch 'origin/dev/task_button_scheduler' into release/v1.3.0/replay-capture-sgFilter 2022-08-11 01:04:08 +08:00
peterlu14 1a028c1595 Merge remote-tracking branch 'origin/dev/replayControlPanelFix' into release/v1.3.0/replay-capture-sgFilter 2022-08-11 01:02:25 +08:00
nthu1080112244 fc5c222dc7 [update] unit and functional can works 2022-08-10 18:09:38 +08:00
sss28072637 ff3a9061de [update] add setting button to the row of Task 2022-08-10 17:59:33 +08:00
108000207 89e80a67af [update] add the router for Project(scheduler) 2022-08-10 14:02:44 +08:00
nthu1080112244 868577de7d [update] new comtrol panel block 2022-08-10 12:06:35 +08:00
sss28072637 82dfb8a5ff Merge branch 'release/v1.3.0/replay-capture-sgFilter' of https://gitlab.com/wisetop/controller/wisetopvue into release/v1.3.0/replay-capture-sgFilter 2022-08-09 17:49:08 +08:00
sss28072637 726e262124 [debug] fix dataZoom of Slider 2022-08-09 11:16:25 +08:00
46 changed files with 1366 additions and 393 deletions
+1 -3
View File
@@ -71,9 +71,7 @@ localforage.config({ name: 'bioprovue' })
let MqttUrl
// for developer
if (process.env.NODE_ENV === 'development') {
MqttUrl = 'ws://192.168.5.37:8083'
// MqttUrl = 'ws://192.168.5.42:8083'
// MqttUrl = 'ws://192.168.5.240:8080'
MqttUrl = 'ws://192.168.5.66:8083'
// MqttUrl = 'ws://192.168.5.57:8083'
// MqttUrl = 'ws://192.168.5.57:8080'
} else {
+4
View File
@@ -0,0 +1,4 @@
<svg width="55" height="30" viewBox="0 0 55 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="55" height="30" rx="15" fill="#45589E"/>
<path d="M10.8849 20V9.81818H13.0376V18.2251H17.4027V20H10.8849ZM22.2388 20.1491C21.4666 20.1491 20.7987 19.9851 20.2353 19.657C19.6751 19.3255 19.2426 18.8648 18.9377 18.2749C18.6328 17.6816 18.4803 16.9938 18.4803 16.2116C18.4803 15.4228 18.6328 14.7334 18.9377 14.1435C19.2426 13.5502 19.6751 13.0895 20.2353 12.7614C20.7987 12.4299 21.4666 12.2642 22.2388 12.2642C23.0111 12.2642 23.6773 12.4299 24.2374 12.7614C24.8008 13.0895 25.235 13.5502 25.54 14.1435C25.8449 14.7334 25.9973 15.4228 25.9973 16.2116C25.9973 16.9938 25.8449 17.6816 25.54 18.2749C25.235 18.8648 24.8008 19.3255 24.2374 19.657C23.6773 19.9851 23.0111 20.1491 22.2388 20.1491ZM22.2488 18.5085C22.6001 18.5085 22.8934 18.4091 23.1287 18.2102C23.3641 18.008 23.5414 17.733 23.6607 17.3849C23.7833 17.0369 23.8446 16.6409 23.8446 16.1967C23.8446 15.7526 23.7833 15.3565 23.6607 15.0085C23.5414 14.6605 23.3641 14.3854 23.1287 14.1832C22.8934 13.9811 22.6001 13.88 22.2488 13.88C21.8941 13.88 21.5958 13.9811 21.3539 14.1832C21.1152 14.3854 20.9346 14.6605 20.812 15.0085C20.6926 15.3565 20.633 15.7526 20.633 16.1967C20.633 16.6409 20.6926 17.0369 20.812 17.3849C20.9346 17.733 21.1152 18.008 21.3539 18.2102C21.5958 18.4091 21.8941 18.5085 22.2488 18.5085ZM30.8148 23.0227C30.1287 23.0227 29.5404 22.9283 29.0499 22.7393C28.5627 22.5537 28.1749 22.3002 27.8865 21.9787C27.5982 21.6572 27.4109 21.2959 27.3248 20.8949L29.2836 20.6314C29.3432 20.7839 29.4377 20.9264 29.5669 21.0589C29.6962 21.1915 29.8669 21.2976 30.079 21.3771C30.2944 21.46 30.5563 21.5014 30.8645 21.5014C31.3252 21.5014 31.7047 21.3887 32.003 21.1634C32.3046 20.9413 32.4554 20.5684 32.4554 20.0447V18.6477H32.3659C32.2731 18.8598 32.1339 19.0604 31.9483 19.2493C31.7627 19.4382 31.5241 19.5923 31.2324 19.7116C30.9408 19.831 30.5927 19.8906 30.1884 19.8906C29.615 19.8906 29.093 19.758 28.6223 19.4929C28.155 19.2244 27.7821 18.8151 27.5037 18.2649C27.2286 17.7114 27.0911 17.0121 27.0911 16.1669C27.0911 15.3018 27.2319 14.5793 27.5137 13.9993C27.7954 13.4193 28.1699 12.9851 28.6373 12.6967C29.1079 12.4084 29.6233 12.2642 30.1834 12.2642C30.611 12.2642 30.9689 12.3371 31.2573 12.483C31.5456 12.6255 31.7776 12.8045 31.9533 13.0199C32.1323 13.232 32.2698 13.4408 32.3659 13.6463H32.4455V12.3636H34.5485V20.0746C34.5485 20.7242 34.3894 21.2678 34.0712 21.7053C33.753 22.1428 33.3122 22.4709 32.7488 22.6896C32.1886 22.9117 31.544 23.0227 30.8148 23.0227ZM30.8596 18.2997C31.2009 18.2997 31.4893 18.2152 31.7246 18.0462C31.9632 17.8738 32.1455 17.6286 32.2715 17.3104C32.4007 16.9889 32.4654 16.6044 32.4654 16.157C32.4654 15.7095 32.4024 15.3217 32.2765 14.9936C32.1505 14.6622 31.9682 14.4053 31.7296 14.223C31.4909 14.0407 31.2009 13.9496 30.8596 13.9496C30.5115 13.9496 30.2182 14.044 29.9796 14.233C29.7409 14.4186 29.5603 14.6771 29.4377 15.0085C29.315 15.34 29.2537 15.7228 29.2537 16.157C29.2537 16.5978 29.315 16.9789 29.4377 17.3004C29.5636 17.6186 29.7443 17.8655 29.9796 18.0412C30.2182 18.2135 30.5115 18.2997 30.8596 18.2997ZM38.2921 9.81818L40.3453 13.2884H40.4249L42.4881 9.81818H44.9192L41.812 14.9091L44.9888 20H42.513L40.4249 16.5249H40.3453L38.2573 20H35.7914L38.9782 14.9091L35.851 9.81818H38.2921Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

+4
View File
@@ -0,0 +1,4 @@
<svg width="55" height="30" viewBox="0 0 55 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="55" height="30" rx="15" fill="#E34A4A"/>
<path d="M10.8849 20V9.81818H13.0376V18.2251H17.4027V20H10.8849ZM22.2388 20.1491C21.4666 20.1491 20.7987 19.9851 20.2353 19.657C19.6751 19.3255 19.2426 18.8648 18.9377 18.2749C18.6328 17.6816 18.4803 16.9938 18.4803 16.2116C18.4803 15.4228 18.6328 14.7334 18.9377 14.1435C19.2426 13.5502 19.6751 13.0895 20.2353 12.7614C20.7987 12.4299 21.4666 12.2642 22.2388 12.2642C23.0111 12.2642 23.6773 12.4299 24.2374 12.7614C24.8008 13.0895 25.235 13.5502 25.54 14.1435C25.8449 14.7334 25.9973 15.4228 25.9973 16.2116C25.9973 16.9938 25.8449 17.6816 25.54 18.2749C25.235 18.8648 24.8008 19.3255 24.2374 19.657C23.6773 19.9851 23.0111 20.1491 22.2388 20.1491ZM22.2488 18.5085C22.6001 18.5085 22.8934 18.4091 23.1287 18.2102C23.3641 18.008 23.5414 17.733 23.6607 17.3849C23.7833 17.0369 23.8446 16.6409 23.8446 16.1967C23.8446 15.7526 23.7833 15.3565 23.6607 15.0085C23.5414 14.6605 23.3641 14.3854 23.1287 14.1832C22.8934 13.9811 22.6001 13.88 22.2488 13.88C21.8941 13.88 21.5958 13.9811 21.3539 14.1832C21.1152 14.3854 20.9346 14.6605 20.812 15.0085C20.6926 15.3565 20.633 15.7526 20.633 16.1967C20.633 16.6409 20.6926 17.0369 20.812 17.3849C20.9346 17.733 21.1152 18.008 21.3539 18.2102C21.5958 18.4091 21.8941 18.5085 22.2488 18.5085ZM30.8148 23.0227C30.1287 23.0227 29.5404 22.9283 29.0499 22.7393C28.5627 22.5537 28.1749 22.3002 27.8865 21.9787C27.5982 21.6572 27.4109 21.2959 27.3248 20.8949L29.2836 20.6314C29.3432 20.7839 29.4377 20.9264 29.5669 21.0589C29.6962 21.1915 29.8669 21.2976 30.079 21.3771C30.2944 21.46 30.5563 21.5014 30.8645 21.5014C31.3252 21.5014 31.7047 21.3887 32.003 21.1634C32.3046 20.9413 32.4554 20.5684 32.4554 20.0447V18.6477H32.3659C32.2731 18.8598 32.1339 19.0604 31.9483 19.2493C31.7627 19.4382 31.5241 19.5923 31.2324 19.7116C30.9408 19.831 30.5927 19.8906 30.1884 19.8906C29.615 19.8906 29.093 19.758 28.6223 19.4929C28.155 19.2244 27.7821 18.8151 27.5037 18.2649C27.2286 17.7114 27.0911 17.0121 27.0911 16.1669C27.0911 15.3018 27.2319 14.5793 27.5137 13.9993C27.7954 13.4193 28.1699 12.9851 28.6373 12.6967C29.1079 12.4084 29.6233 12.2642 30.1834 12.2642C30.611 12.2642 30.9689 12.3371 31.2573 12.483C31.5456 12.6255 31.7776 12.8045 31.9533 13.0199C32.1323 13.232 32.2698 13.4408 32.3659 13.6463H32.4455V12.3636H34.5485V20.0746C34.5485 20.7242 34.3894 21.2678 34.0712 21.7053C33.753 22.1428 33.3122 22.4709 32.7488 22.6896C32.1886 22.9117 31.544 23.0227 30.8148 23.0227ZM30.8596 18.2997C31.2009 18.2997 31.4893 18.2152 31.7246 18.0462C31.9632 17.8738 32.1455 17.6286 32.2715 17.3104C32.4007 16.9889 32.4654 16.6044 32.4654 16.157C32.4654 15.7095 32.4024 15.3217 32.2765 14.9936C32.1505 14.6622 31.9682 14.4053 31.7296 14.223C31.4909 14.0407 31.2009 13.9496 30.8596 13.9496C30.5115 13.9496 30.2182 14.044 29.9796 14.233C29.7409 14.4186 29.5603 14.6771 29.4377 15.0085C29.315 15.34 29.2537 15.7228 29.2537 16.157C29.2537 16.5978 29.315 16.9789 29.4377 17.3004C29.5636 17.6186 29.7443 17.8655 29.9796 18.0412C30.2182 18.2135 30.5115 18.2997 30.8596 18.2997ZM38.2921 9.81818L40.3453 13.2884H40.4249L42.4881 9.81818H44.9192L41.812 14.9091L44.9888 20H42.513L40.4249 16.5249H40.3453L38.2573 20H35.7914L38.9782 14.9091L35.851 9.81818H38.2921Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

+4
View File
@@ -0,0 +1,4 @@
<svg width="55" height="30" viewBox="0 0 55 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="55" height="30" rx="15" fill="#6CB0A4"/>
<path d="M10.8849 20V9.81818H13.0376V18.2251H17.4027V20H10.8849ZM22.2388 20.1491C21.4666 20.1491 20.7987 19.9851 20.2353 19.657C19.6751 19.3255 19.2426 18.8648 18.9377 18.2749C18.6328 17.6816 18.4803 16.9938 18.4803 16.2116C18.4803 15.4228 18.6328 14.7334 18.9377 14.1435C19.2426 13.5502 19.6751 13.0895 20.2353 12.7614C20.7987 12.4299 21.4666 12.2642 22.2388 12.2642C23.0111 12.2642 23.6773 12.4299 24.2374 12.7614C24.8008 13.0895 25.235 13.5502 25.54 14.1435C25.8449 14.7334 25.9973 15.4228 25.9973 16.2116C25.9973 16.9938 25.8449 17.6816 25.54 18.2749C25.235 18.8648 24.8008 19.3255 24.2374 19.657C23.6773 19.9851 23.0111 20.1491 22.2388 20.1491ZM22.2488 18.5085C22.6001 18.5085 22.8934 18.4091 23.1287 18.2102C23.3641 18.008 23.5414 17.733 23.6607 17.3849C23.7833 17.0369 23.8446 16.6409 23.8446 16.1967C23.8446 15.7526 23.7833 15.3565 23.6607 15.0085C23.5414 14.6605 23.3641 14.3854 23.1287 14.1832C22.8934 13.9811 22.6001 13.88 22.2488 13.88C21.8941 13.88 21.5958 13.9811 21.3539 14.1832C21.1152 14.3854 20.9346 14.6605 20.812 15.0085C20.6926 15.3565 20.633 15.7526 20.633 16.1967C20.633 16.6409 20.6926 17.0369 20.812 17.3849C20.9346 17.733 21.1152 18.008 21.3539 18.2102C21.5958 18.4091 21.8941 18.5085 22.2488 18.5085ZM30.8148 23.0227C30.1287 23.0227 29.5404 22.9283 29.0499 22.7393C28.5627 22.5537 28.1749 22.3002 27.8865 21.9787C27.5982 21.6572 27.4109 21.2959 27.3248 20.8949L29.2836 20.6314C29.3432 20.7839 29.4377 20.9264 29.5669 21.0589C29.6962 21.1915 29.8669 21.2976 30.079 21.3771C30.2944 21.46 30.5563 21.5014 30.8645 21.5014C31.3252 21.5014 31.7047 21.3887 32.003 21.1634C32.3046 20.9413 32.4554 20.5684 32.4554 20.0447V18.6477H32.3659C32.2731 18.8598 32.1339 19.0604 31.9483 19.2493C31.7627 19.4382 31.5241 19.5923 31.2324 19.7116C30.9408 19.831 30.5927 19.8906 30.1884 19.8906C29.615 19.8906 29.093 19.758 28.6223 19.4929C28.155 19.2244 27.7821 18.8151 27.5037 18.2649C27.2286 17.7114 27.0911 17.0121 27.0911 16.1669C27.0911 15.3018 27.2319 14.5793 27.5137 13.9993C27.7954 13.4193 28.1699 12.9851 28.6373 12.6967C29.1079 12.4084 29.6233 12.2642 30.1834 12.2642C30.611 12.2642 30.9689 12.3371 31.2573 12.483C31.5456 12.6255 31.7776 12.8045 31.9533 13.0199C32.1323 13.232 32.2698 13.4408 32.3659 13.6463H32.4455V12.3636H34.5485V20.0746C34.5485 20.7242 34.3894 21.2678 34.0712 21.7053C33.753 22.1428 33.3122 22.4709 32.7488 22.6896C32.1886 22.9117 31.544 23.0227 30.8148 23.0227ZM30.8596 18.2997C31.2009 18.2997 31.4893 18.2152 31.7246 18.0462C31.9632 17.8738 32.1455 17.6286 32.2715 17.3104C32.4007 16.9889 32.4654 16.6044 32.4654 16.157C32.4654 15.7095 32.4024 15.3217 32.2765 14.9936C32.1505 14.6622 31.9682 14.4053 31.7296 14.223C31.4909 14.0407 31.2009 13.9496 30.8596 13.9496C30.5115 13.9496 30.2182 14.044 29.9796 14.233C29.7409 14.4186 29.5603 14.6771 29.4377 15.0085C29.315 15.34 29.2537 15.7228 29.2537 16.157C29.2537 16.5978 29.315 16.9789 29.4377 17.3004C29.5636 17.6186 29.7443 17.8655 29.9796 18.0412C30.2182 18.2135 30.5115 18.2997 30.8596 18.2997ZM35.677 9.81818H38.0882L40.41 14.2031H40.5094L42.8311 9.81818H45.2424L41.5286 16.4006V20H39.3908V16.4006L35.677 9.81818Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

+4
View File
@@ -0,0 +1,4 @@
<svg width="55" height="30" viewBox="0 0 55 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="55" height="30" rx="15" fill="#E34A4A"/>
<path d="M10.8849 20V9.81818H13.0376V18.2251H17.4027V20H10.8849ZM22.2388 20.1491C21.4666 20.1491 20.7987 19.9851 20.2353 19.657C19.6751 19.3255 19.2426 18.8648 18.9377 18.2749C18.6328 17.6816 18.4803 16.9938 18.4803 16.2116C18.4803 15.4228 18.6328 14.7334 18.9377 14.1435C19.2426 13.5502 19.6751 13.0895 20.2353 12.7614C20.7987 12.4299 21.4666 12.2642 22.2388 12.2642C23.0111 12.2642 23.6773 12.4299 24.2374 12.7614C24.8008 13.0895 25.235 13.5502 25.54 14.1435C25.8449 14.7334 25.9973 15.4228 25.9973 16.2116C25.9973 16.9938 25.8449 17.6816 25.54 18.2749C25.235 18.8648 24.8008 19.3255 24.2374 19.657C23.6773 19.9851 23.0111 20.1491 22.2388 20.1491ZM22.2488 18.5085C22.6001 18.5085 22.8934 18.4091 23.1287 18.2102C23.3641 18.008 23.5414 17.733 23.6607 17.3849C23.7833 17.0369 23.8446 16.6409 23.8446 16.1967C23.8446 15.7526 23.7833 15.3565 23.6607 15.0085C23.5414 14.6605 23.3641 14.3854 23.1287 14.1832C22.8934 13.9811 22.6001 13.88 22.2488 13.88C21.8941 13.88 21.5958 13.9811 21.3539 14.1832C21.1152 14.3854 20.9346 14.6605 20.812 15.0085C20.6926 15.3565 20.633 15.7526 20.633 16.1967C20.633 16.6409 20.6926 17.0369 20.812 17.3849C20.9346 17.733 21.1152 18.008 21.3539 18.2102C21.5958 18.4091 21.8941 18.5085 22.2488 18.5085ZM30.8148 23.0227C30.1287 23.0227 29.5404 22.9283 29.0499 22.7393C28.5627 22.5537 28.1749 22.3002 27.8865 21.9787C27.5982 21.6572 27.4109 21.2959 27.3248 20.8949L29.2836 20.6314C29.3432 20.7839 29.4377 20.9264 29.5669 21.0589C29.6962 21.1915 29.8669 21.2976 30.079 21.3771C30.2944 21.46 30.5563 21.5014 30.8645 21.5014C31.3252 21.5014 31.7047 21.3887 32.003 21.1634C32.3046 20.9413 32.4554 20.5684 32.4554 20.0447V18.6477H32.3659C32.2731 18.8598 32.1339 19.0604 31.9483 19.2493C31.7627 19.4382 31.5241 19.5923 31.2324 19.7116C30.9408 19.831 30.5927 19.8906 30.1884 19.8906C29.615 19.8906 29.093 19.758 28.6223 19.4929C28.155 19.2244 27.7821 18.8151 27.5037 18.2649C27.2286 17.7114 27.0911 17.0121 27.0911 16.1669C27.0911 15.3018 27.2319 14.5793 27.5137 13.9993C27.7954 13.4193 28.1699 12.9851 28.6373 12.6967C29.1079 12.4084 29.6233 12.2642 30.1834 12.2642C30.611 12.2642 30.9689 12.3371 31.2573 12.483C31.5456 12.6255 31.7776 12.8045 31.9533 13.0199C32.1323 13.232 32.2698 13.4408 32.3659 13.6463H32.4455V12.3636H34.5485V20.0746C34.5485 20.7242 34.3894 21.2678 34.0712 21.7053C33.753 22.1428 33.3122 22.4709 32.7488 22.6896C32.1886 22.9117 31.544 23.0227 30.8148 23.0227ZM30.8596 18.2997C31.2009 18.2997 31.4893 18.2152 31.7246 18.0462C31.9632 17.8738 32.1455 17.6286 32.2715 17.3104C32.4007 16.9889 32.4654 16.6044 32.4654 16.157C32.4654 15.7095 32.4024 15.3217 32.2765 14.9936C32.1505 14.6622 31.9682 14.4053 31.7296 14.223C31.4909 14.0407 31.2009 13.9496 30.8596 13.9496C30.5115 13.9496 30.2182 14.044 29.9796 14.233C29.7409 14.4186 29.5603 14.6771 29.4377 15.0085C29.315 15.34 29.2537 15.7228 29.2537 16.157C29.2537 16.5978 29.315 16.9789 29.4377 17.3004C29.5636 17.6186 29.7443 17.8655 29.9796 18.0412C30.2182 18.2135 30.5115 18.2997 30.8596 18.2997ZM35.677 9.81818H38.0882L40.41 14.2031H40.5094L42.8311 9.81818H45.2424L41.5286 16.4006V20H39.3908V16.4006L35.677 9.81818Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

+9
View File
@@ -0,0 +1,9 @@
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0C23.2843 0 30 6.71573 30 15Z" fill="#D6860F"/>
<mask id="mask0_4_143" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="5" y="5" width="20" height="19">
<rect x="5" y="5" width="20" height="19" fill="#D9D9D9"/>
</mask>
<g mask="url(#mask0_4_143)">
<path d="M20.8334 11.3333V9.75001H19.1667V8.16668H20.8334V6.58334H22.5V8.16668H24.1667V9.75001H22.5V11.3333H20.8334ZM7.50004 22.4167C7.04171 22.4167 6.64949 22.2618 6.32337 21.952C5.99671 21.6416 5.83337 21.2688 5.83337 20.8333V11.3333C5.83337 10.8979 5.99671 10.5253 6.32337 10.2155C6.64949 9.90518 7.04171 9.75001 7.50004 9.75001H10.125L11.6667 8.16668H16.6667V9.75001H12.3959L10.875 11.3333H7.50004V20.8333H20.8334V13.7083H22.5V20.8333C22.5 21.2688 22.337 21.6416 22.0109 21.952C21.6842 22.2618 21.2917 22.4167 20.8334 22.4167H7.50004ZM14.1667 19.6458C15.2084 19.6458 16.0939 19.2996 16.8234 18.6072C17.5523 17.9142 17.9167 17.0729 17.9167 16.0833C17.9167 15.0938 17.5523 14.2525 16.8234 13.5595C16.0939 12.8671 15.2084 12.5208 14.1667 12.5208C13.125 12.5208 12.2395 12.8671 11.51 13.5595C10.7812 14.2525 10.4167 15.0938 10.4167 16.0833C10.4167 17.0729 10.7812 17.9142 11.51 18.6072C12.2395 19.2996 13.125 19.6458 14.1667 19.6458ZM14.1667 18.0625C13.5834 18.0625 13.0903 17.8712 12.6875 17.4886C12.2848 17.1059 12.0834 16.6375 12.0834 16.0833C12.0834 15.5292 12.2848 15.0608 12.6875 14.6781C13.0903 14.2955 13.5834 14.1042 14.1667 14.1042C14.75 14.1042 15.2431 14.2955 15.6459 14.6781C16.0487 15.0608 16.25 15.5292 16.25 16.0833C16.25 16.6375 16.0487 17.1059 15.6459 17.4886C15.2431 17.8712 14.75 18.0625 14.1667 18.0625Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

+6
View File
@@ -0,0 +1,6 @@
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="15" cy="15" r="15" fill="#8D8D8D"/>
<path d="M6.61364 12.0888C6.19934 12.0888 5.8241 11.9822 5.48793 11.7692C5.15412 11.5537 4.88897 11.2377 4.69247 10.821C4.49834 10.402 4.40128 9.88826 4.40128 9.27983C4.40128 8.65483 4.50189 8.13518 4.70312 7.72088C4.90436 7.30421 5.17188 6.9929 5.50568 6.78693C5.84186 6.5786 6.20999 6.47443 6.61009 6.47443C6.91548 6.47443 7.16998 6.52652 7.37358 6.63068C7.57955 6.73248 7.74527 6.86032 7.87074 7.0142C7.99858 7.16572 8.09564 7.31487 8.16193 7.46165H8.2081V4.72727H9.71733V12H8.22585V11.1264H8.16193C8.09091 11.2779 7.99029 11.4283 7.86009 11.5774C7.73224 11.7242 7.56534 11.8461 7.35938 11.9432C7.15578 12.0402 6.9072 12.0888 6.61364 12.0888ZM7.09304 10.8849C7.33688 10.8849 7.54285 10.8187 7.71094 10.6861C7.88139 10.5511 8.0116 10.3629 8.10156 10.1214C8.19389 9.87997 8.24006 9.59706 8.24006 9.27273C8.24006 8.94839 8.19508 8.66667 8.10511 8.42756C8.01515 8.18845 7.88494 8.00379 7.71449 7.87358C7.54403 7.74337 7.33688 7.67827 7.09304 7.67827C6.84446 7.67827 6.63494 7.74574 6.46449 7.88068C6.29403 8.01562 6.16501 8.20265 6.07741 8.44176C5.98982 8.68087 5.94602 8.95786 5.94602 9.27273C5.94602 9.58996 5.98982 9.8705 6.07741 10.1143C6.16738 10.3558 6.2964 10.5452 6.46449 10.6825C6.63494 10.8175 6.84446 10.8849 7.09304 10.8849ZM11.8951 14.0455C11.7033 14.0455 11.5234 14.0301 11.3553 13.9993C11.1896 13.9709 11.0523 13.9342 10.9434 13.8892L11.2843 12.7599C11.4618 12.8144 11.6216 12.844 11.7637 12.8487C11.9081 12.8535 12.0324 12.8203 12.1365 12.7493C12.2431 12.6783 12.3295 12.5575 12.3958 12.3871L12.4846 12.1562L10.5279 6.54545H12.1188L13.248 10.5511H13.3049L14.4448 6.54545H16.0463L13.9263 12.5895C13.8245 12.883 13.686 13.1387 13.5108 13.3565C13.338 13.5767 13.119 13.746 12.8539 13.8643C12.5887 13.9851 12.2691 14.0455 11.8951 14.0455Z" fill="white"/>
<path d="M15.6136 25.0888C15.1993 25.0888 14.8241 24.9822 14.4879 24.7692C14.1541 24.5537 13.889 24.2377 13.6925 23.821C13.4983 23.402 13.4013 22.8883 13.4013 22.2798C13.4013 21.6548 13.5019 21.1352 13.7031 20.7209C13.9044 20.3042 14.1719 19.9929 14.5057 19.7869C14.8419 19.5786 15.21 19.4744 15.6101 19.4744C15.9155 19.4744 16.17 19.5265 16.3736 19.6307C16.5795 19.7325 16.7453 19.8603 16.8707 20.0142C16.9986 20.1657 17.0956 20.3149 17.1619 20.4616H17.2081V17.7273H18.7173V25H17.2259V24.1264H17.1619C17.0909 24.2779 16.9903 24.4283 16.8601 24.5774C16.7322 24.7242 16.5653 24.8461 16.3594 24.9432C16.1558 25.0402 15.9072 25.0888 15.6136 25.0888ZM16.093 23.8849C16.3369 23.8849 16.5429 23.8187 16.7109 23.6861C16.8814 23.5511 17.0116 23.3629 17.1016 23.1214C17.1939 22.88 17.2401 22.5971 17.2401 22.2727C17.2401 21.9484 17.1951 21.6667 17.1051 21.4276C17.0152 21.1884 16.8849 21.0038 16.7145 20.8736C16.544 20.7434 16.3369 20.6783 16.093 20.6783C15.8445 20.6783 15.6349 20.7457 15.4645 20.8807C15.294 21.0156 15.165 21.2027 15.0774 21.4418C14.9898 21.6809 14.946 21.9579 14.946 22.2727C14.946 22.59 14.9898 22.8705 15.0774 23.1143C15.1674 23.3558 15.2964 23.5452 15.4645 23.6825C15.6349 23.8175 15.8445 23.8849 16.093 23.8849ZM21.2253 19.5455L22.2267 21.4524L23.253 19.5455H24.8049L23.2246 22.2727L24.8475 25H23.3027L22.2267 23.1143L21.1685 25H19.606L21.2253 22.2727L19.6628 19.5455H21.2253Z" fill="white"/>
<line x1="6.81281" y1="22.7756" x2="21.9396" y2="7.02154" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

+6
View File
@@ -0,0 +1,6 @@
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="15" cy="15" r="15" fill="#E34A4A"/>
<path d="M6.61364 12.0888C6.19934 12.0888 5.8241 11.9822 5.48793 11.7692C5.15412 11.5537 4.88897 11.2377 4.69247 10.821C4.49834 10.402 4.40128 9.88826 4.40128 9.27983C4.40128 8.65483 4.50189 8.13518 4.70312 7.72088C4.90436 7.30421 5.17188 6.9929 5.50568 6.78693C5.84186 6.5786 6.20999 6.47443 6.61009 6.47443C6.91548 6.47443 7.16998 6.52652 7.37358 6.63068C7.57955 6.73248 7.74527 6.86032 7.87074 7.0142C7.99858 7.16572 8.09564 7.31487 8.16193 7.46165H8.2081V4.72727H9.71733V12H8.22585V11.1264H8.16193C8.09091 11.2779 7.99029 11.4283 7.86009 11.5774C7.73224 11.7242 7.56534 11.8461 7.35938 11.9432C7.15578 12.0402 6.9072 12.0888 6.61364 12.0888ZM7.09304 10.8849C7.33688 10.8849 7.54285 10.8187 7.71094 10.6861C7.88139 10.5511 8.0116 10.3629 8.10156 10.1214C8.19389 9.87997 8.24006 9.59706 8.24006 9.27273C8.24006 8.94839 8.19508 8.66667 8.10511 8.42756C8.01515 8.18845 7.88494 8.00379 7.71449 7.87358C7.54403 7.74337 7.33688 7.67827 7.09304 7.67827C6.84446 7.67827 6.63494 7.74574 6.46449 7.88068C6.29403 8.01562 6.16501 8.20265 6.07741 8.44176C5.98982 8.68087 5.94602 8.95786 5.94602 9.27273C5.94602 9.58996 5.98982 9.8705 6.07741 10.1143C6.16738 10.3558 6.2964 10.5452 6.46449 10.6825C6.63494 10.8175 6.84446 10.8849 7.09304 10.8849ZM11.8951 14.0455C11.7033 14.0455 11.5234 14.0301 11.3553 13.9993C11.1896 13.9709 11.0523 13.9342 10.9434 13.8892L11.2843 12.7599C11.4618 12.8144 11.6216 12.844 11.7637 12.8487C11.9081 12.8535 12.0324 12.8203 12.1365 12.7493C12.2431 12.6783 12.3295 12.5575 12.3958 12.3871L12.4846 12.1562L10.5279 6.54545H12.1188L13.248 10.5511H13.3049L14.4448 6.54545H16.0463L13.9263 12.5895C13.8245 12.883 13.686 13.1387 13.5108 13.3565C13.338 13.5767 13.119 13.746 12.8539 13.8643C12.5887 13.9851 12.2691 14.0455 11.8951 14.0455Z" fill="white"/>
<path d="M15.6136 25.0888C15.1993 25.0888 14.8241 24.9822 14.4879 24.7692C14.1541 24.5537 13.889 24.2377 13.6925 23.821C13.4983 23.402 13.4013 22.8883 13.4013 22.2798C13.4013 21.6548 13.5019 21.1352 13.7031 20.7209C13.9044 20.3042 14.1719 19.9929 14.5057 19.7869C14.8419 19.5786 15.21 19.4744 15.6101 19.4744C15.9155 19.4744 16.17 19.5265 16.3736 19.6307C16.5795 19.7325 16.7453 19.8603 16.8707 20.0142C16.9986 20.1657 17.0956 20.3149 17.1619 20.4616H17.2081V17.7273H18.7173V25H17.2259V24.1264H17.1619C17.0909 24.2779 16.9903 24.4283 16.8601 24.5774C16.7322 24.7242 16.5653 24.8461 16.3594 24.9432C16.1558 25.0402 15.9072 25.0888 15.6136 25.0888ZM16.093 23.8849C16.3369 23.8849 16.5429 23.8187 16.7109 23.6861C16.8814 23.5511 17.0116 23.3629 17.1016 23.1214C17.1939 22.88 17.2401 22.5971 17.2401 22.2727C17.2401 21.9484 17.1951 21.6667 17.1051 21.4276C17.0152 21.1884 16.8849 21.0038 16.7145 20.8736C16.544 20.7434 16.3369 20.6783 16.093 20.6783C15.8445 20.6783 15.6349 20.7457 15.4645 20.8807C15.294 21.0156 15.165 21.2027 15.0774 21.4418C14.9898 21.6809 14.946 21.9579 14.946 22.2727C14.946 22.59 14.9898 22.8705 15.0774 23.1143C15.1674 23.3558 15.2964 23.5452 15.4645 23.6825C15.6349 23.8175 15.8445 23.8849 16.093 23.8849ZM21.2253 19.5455L22.2267 21.4524L23.253 19.5455H24.8049L23.2246 22.2727L24.8475 25H23.3027L22.2267 23.1143L21.1685 25H19.606L21.2253 22.2727L19.6628 19.5455H21.2253Z" fill="white"/>
<line x1="6.81281" y1="22.7756" x2="21.9396" y2="7.02154" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

+4
View File
@@ -0,0 +1,4 @@
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="15" cy="15" r="15" fill="#4597B1"/>
<path d="M15.0199 20.2131C14.8021 21.5199 14.3073 22.5213 13.5355 23.2173C12.7637 23.9134 11.7576 24.2614 10.517 24.2614C10.2424 24.2614 9.98911 24.2495 9.7571 24.2259C9.52036 24.2022 9.28835 24.1619 9.06108 24.1051L9.60085 21.7685C9.72396 21.7969 9.86127 21.8229 10.0128 21.8466C10.1643 21.8703 10.3442 21.8821 10.5526 21.8821C10.9976 21.8821 11.3456 21.759 11.5966 21.5128C11.8523 21.2713 12.0204 20.8949 12.1009 20.3835L13.9972 8.94886C14.2197 7.6089 14.7334 6.58144 15.5384 5.86648C16.3433 5.15151 17.392 4.79403 18.6847 4.79403C18.9356 4.79403 19.1889 4.81297 19.4446 4.85085C19.7003 4.884 19.9702 4.93845 20.2543 5.0142L19.6364 7.27983C19.4991 7.25142 19.3168 7.23011 19.0895 7.21591C18.867 7.2017 18.642 7.1946 18.4148 7.1946C17.9886 7.1946 17.6548 7.30824 17.4134 7.53551C17.1766 7.76278 17.018 8.1179 16.9375 8.60085L15.0199 20.2131Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1010 B

@@ -0,0 +1,4 @@
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="15" cy="15" r="15" fill="#E34A4A"/>
<path d="M15.0199 20.2131C14.8021 21.5199 14.3073 22.5213 13.5355 23.2173C12.7637 23.9134 11.7576 24.2614 10.517 24.2614C10.2424 24.2614 9.98911 24.2495 9.7571 24.2259C9.52036 24.2022 9.28835 24.1619 9.06108 24.1051L9.60085 21.7685C9.72396 21.7969 9.86127 21.8229 10.0128 21.8466C10.1643 21.8703 10.3442 21.8821 10.5526 21.8821C10.9976 21.8821 11.3456 21.759 11.5966 21.5128C11.8523 21.2713 12.0204 20.8949 12.1009 20.3835L13.9972 8.94886C14.2197 7.6089 14.7334 6.58144 15.5384 5.86648C16.3433 5.15151 17.392 4.79403 18.6847 4.79403C18.9356 4.79403 19.1889 4.81297 19.4446 4.85085C19.7003 4.884 19.9702 4.93845 20.2543 5.0142L19.6364 7.27983C19.4991 7.25142 19.3168 7.23011 19.0895 7.21591C18.867 7.2017 18.642 7.1946 18.4148 7.1946C17.9886 7.1946 17.6548 7.30824 17.4134 7.53551C17.1766 7.76278 17.018 8.1179 16.9375 8.60085L15.0199 20.2131Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1010 B

@@ -61,6 +61,14 @@ export const navigationRoutes = {
iconClass: 'vuestic-iconset vuestic-iconset-settings',
},
},
{
name: 'project',
displayName: 'Scheduler',
meta: {
iconClass: 'vuestic-iconset vuestic-iconset-tables',
// iconClass: 'vuestic-iconset vuestic-iconset-browse-gallery',
},
},
// {
// name: 'forms',
// displayName: 'menu.forms',
@@ -26,7 +26,7 @@
<div class="flex sm12 xl12 md12 xs12">
<!-- <chart :style="'width: auto; height: 88vhvh;'" :option="options"></chart> -->
<elite-replay-overview-chart v-show="showOverviewChart" :ref="'chart_overview'" class="mb-1" :cardheight="'7vh'" :data="chartOverviewData" @dataZoomEvent="dataZoomEvent($event)"/>
<elite-replay-chart :ref="'chart_detail'" :cardheight="'88vh'" :chartheight="detailchartheight" :data="chartDetailData" @updateIntegralBoundary="updateIntegralBoundary" />
<elite-replay-chart :ref="'chart_detail'" :cardheight="'90vh'" :chartheight="detailchartheight" :data="chartDetailData" @updateIntegralBoundary="updateIntegralBoundary" />
<change-channel-value-min-max :ref="'set_min_max'"/>
</div>
</div>
@@ -79,6 +79,7 @@ export default {
'startTimeCurrent',
'endTimeCurrent',
'sampleMethod',
'controlPanel',
]),
},
props: {
@@ -223,6 +224,8 @@ export default {
channelY: ch,
})
})
// disable overviewData legend
this.chartOverviewData.legend.show = false
this.chartDetailData.xAxis[_gridNumber].axisLabel.show = true
if (this.maxTime < parseInt(meta.time_duration)) {
this.maxTime = parseInt(meta.time_duration)
@@ -371,7 +374,6 @@ export default {
this.hideChartLoading()
},
drawDetailData: async function () {
var panelInfo = this.$refs.top_control_panel.getPanelInfo()
// brush setting write at here, due to mounted won't show the brush
this.chartDetailData.brush = {
toolbox: ['rect', 'clear'],
@@ -380,7 +382,6 @@ export default {
// throttleType: 'debounce',
// throttleDelay: 5,
}
console.log('panelInfo: ', panelInfo) // TODO: update the formatter for tooltips
this.showChartLoading('detail')
const timeDur = this.endTimeCurrent - this.startTimeCurrent
let _gridNumber = 0
@@ -393,7 +394,7 @@ export default {
})
let scale = '1'
if (this.axisXDataType.description === 'Time') {
if (this.controlPanel.x.type === 'Time') {
scale = await this.computeResampleScale(metaInfo, timeDur)
}
// elite的sample rate不像neulive這麼高,因此試試scale = 100 or 1000時不要再sampling一次了,不然有些形狀(e.g. peak)會不一樣
@@ -412,11 +413,11 @@ export default {
this.currentScale = scale
this.chartDetailData.series[_gridNumber].data.length = 0
let dataListX
const channelX = parseInt(this.axisXDataType.id)
if (this.axisXDataType.description !== 'Time') {
const channelX = parseInt(this.controlPanel.x.channel)
if (this.controlPanel.x.type !== 'Time') {
dataListX = this.dataInfo[meta][channelX][scale]
}
const channelY = parseInt(this.axisYDataType.id)
const channelY = parseInt(this.controlPanel.y.channel)
const dataListY = this.dataInfo[meta][channelY][scale]
const isThisModeHasCycle = this.GLOBAL.hasCycleMode(metaInfo.parameter_set.MODE, metaInfo.device.library_name)
@@ -463,7 +464,7 @@ export default {
for (let i = startIndex; i <= endIndex; i++) {
const data = await this.getData(parseInt(scale), this.sampleMethod, dataListY[i].id, channelY, metaInfo)
let dataX
if (this.axisXDataType.description !== 'Time') {
if (this.controlPanel.x.type !== 'Time') {
dataX = await this.getData(parseInt(scale), this.sampleMethod, dataListX[i].id, channelX, metaInfo)
}
var deltaX = 0
@@ -565,7 +566,7 @@ export default {
}
}
if (this.axisXDataType.description === 'Time') {
if (this.controlPanel.x.type === 'Time') {
this.chartDetailData.xAxis[_gridNumber].min = _startTime
this.chartDetailData.xAxis[_gridNumber].max = _endTime
} else {
@@ -575,7 +576,7 @@ export default {
_gridNumber += 1
}
if (this.axisXDataType.description !== 'Time') {
if (this.controlPanel.x.type !== 'Time') {
this.showOverviewChart = false
this.detailchartheight = '88vh'
// this.$refs.chart_detail.updateChartHeight()
@@ -607,33 +608,65 @@ export default {
}
},
changeAxis (gridIndex) {
// if (this.initDone) {
// const libName = this.metaList[gridIndex].device.library_name
// let xType
// let xValue
// if (this.axisXDataType.description === 'Time') {
// xType = 'Time'
// } else {
// if (libName === 'EliteZM15' || libName.includes('Elite_EDC')) {
// xType = 'Elite'
// } else if (libName.includes('EIS')) {
// xType = 'EliteEIS'
// }
// xValue = this.axisXDataType.id + 1
// }
// this.updateRegisteredChart({
// chartAllData: this.chartData,
// chartID: this.chartDetailData.chartID,
// gridIndex: gridIndex,
// deviceNameX: xType,
// deviceIDX: this.metaList[gridIndex].name,
// channelX: xValue,
// deviceNameY: libName.includes('EIS') ? 'EliteEIS' : 'Elite',
// deviceIDY: '',
// channelY: this.axisYDataType.id + 1,
// })
// console.log({
// chartAllData: this.chartData,
// chartID: this.chartDetailData.chartID,
// gridIndex: gridIndex,
// deviceNameX: xType,
// deviceIDX: this.metaList[gridIndex].name,
// channelX: xValue,
// deviceNameY: libName.includes('EIS') ? 'EliteEIS' : 'Elite',
// deviceIDY: '',
// channelY: this.axisYDataType.id + 1,
// })
// }
// if (this.axisXDataType.description === 'Time') {
// this.drawOverviewData()
// }
// this.drawDetailData() // reDraw
// tang
if (this.initDone) {
const libName = this.metaList[gridIndex].device.library_name
let xType
let xValue
if (this.axisXDataType.description === 'Time') {
xType = 'Time'
} else {
if (libName === 'EliteZM15' || libName.includes('Elite_EDC')) {
xType = 'Elite'
} else if (libName.includes('EIS')) {
xType = 'EliteEIS'
}
xValue = this.axisXDataType.id + 1
}
const xType = (this.controlPanel.x.type === 'Time') ? 'Time' : ((libName === 'EliteZM15' || libName.includes('Elite_EDC') ? 'Elite' : 'EliteEIS'))
const xChannel = (this.controlPanel.x.channel === -1) ? undefined : this.controlPanel.x.channel + 1
this.updateRegisteredChart({
chartAllData: this.chartData,
chartID: this.chartDetailData.chartID,
gridIndex: gridIndex,
deviceNameX: xType,
deviceIDX: this.metaList[gridIndex].name,
channelX: xValue,
channelX: xChannel,
deviceNameY: libName.includes('EIS') ? 'EliteEIS' : 'Elite',
deviceIDY: '',
channelY: this.axisYDataType.id + 1,
channelY: this.controlPanel.y.channel + 1,
})
}
if (this.axisXDataType.description === 'Time') {
if (this.controlPanel.x.type === 'Time') {
this.drawOverviewData()
}
this.drawDetailData() // reDraw
@@ -656,7 +689,7 @@ export default {
}
if (rawData[prevIndex][0] >= boundary.x_start && rawData[prevIndex][0] <= boundary.x_end &&
rawData[index][0] >= boundary.x_start && rawData[index][0] <= boundary.x_end) {
deltaX = Number(rawData[index][0]) - Number(rawData[prevIndex][0])
deltaX = Math.abs(Number(rawData[index][0]) - Number(rawData[prevIndex][0]))
if (rawData[index][1] > boundary.y_end) rawData[index][1] = boundary.y_end
else if (rawData[index][1] < boundary.y_start) {
continue
@@ -114,7 +114,7 @@ export default {
throttleDelay: 5,
} */
this.$refs.chart_ref.chart.on('brushSelected', (params) => {
if (params.batch[0].areas.length !== 0) {
if (params.batch[0] && params.batch[0].areas.length !== 0) {
var boundary = {
x_start: Number(params.batch[0].areas[0].coordRange[0][0].toFixed(4)),
x_end: Number(params.batch[0].areas[0].coordRange[0][1].toFixed(4)),
@@ -13,7 +13,7 @@
</div>
</div>
<div class="flex-container mb-2">
<!-- <div class="flex-container mb-2" v-show='false'>
<div class="flex sm2 xl2 md2 xs2 px-0 py-0">
<p class="display-6"> X-axis </p>
</div>
@@ -24,7 +24,7 @@
<change-unit :ref="'change_unit_x'" axis="x" @refreshChart="refreshChart"/>
</div>
</div>
<div class="flex-container mb-2">
<div class="flex-container mb-2" v-show='false'>
<div class="flex sm2 xl2 md2 xs2 px-0 py-0" />
<div class="flex sm5 xl5 md5 xs5 pl-1 pr-0 py-0">
<change-scale :ref="'change_scale_x'" axis="x" @refreshChart="refreshChart" @clearCycle="clearCycle" @changeAxis="changeAxis" @changeFunctional="changeFunctional"/>
@@ -32,9 +32,9 @@
<div class="flex sm5 xl5 md5 xs5 px-0 py-0">
<abs-toggle :ref="'abs_x'" axis="x" @changeAxis="changeAxis"/>
</div>
</div>
</div> -->
<div class="flex-container mb-2">
<!-- <div class="flex-container mb-2" v-show='false'>
<div class="flex sm2 xl2 md2 xs2 px-0 py-0">
<p class="display-6"> Y-axis </p>
</div>
@@ -45,7 +45,7 @@
<change-unit :ref="'change_unit_y'" axis="y" @refreshChart="refreshChart"/>
</div>
</div>
<div class="flex-container mb-2">
<div class="flex-container mb-2" v-show='false'>
<div class="flex sm2 xl2 md2 xs2 px-0 py-0" />
<div class="flex sm5 xl5 md5 xs5 pl-1 pr-0 py-0">
<change-scale :ref="'change_scale_y'" axis="y" @refreshChart="refreshChart" @clearCycle="clearCycle" @changeAxis="changeAxis" @changeFunctional="changeFunctional"/>
@@ -53,7 +53,7 @@
<div class="flex sm5 xl5 md5 xs5 px-0 py-0">
<abs-toggle :ref="'abs_y'" axis="y" @changeAxis="changeAxis"/>
</div>
</div>
</div> -->
<!-- <va-button @click="switchCollapse"></va-button>
<va-collapse class="mb-2" :isOpenDefault="false" v-model="innerCollapse">
<span slot="header">Specific Integral</span>
@@ -63,7 +63,53 @@
</div>
</div>
</va-collapse> -->
<specific-integral :ref="'specific_integral'" @setBrushBoundary="setBrushBoundary" />
<!-- tang -->
<div class="flex-container mb-2">
<div class="flex sm2 xl2 md2 xs2 px-0 py-0">
<p class="display-6"> X-Axis </p>
</div>
<div class="flex sm5 xl5 md5 xs5 pl-1 pr-0 py-0">
<change-axis-b :ref="'axis_x'" axis="x" @changeAxis="changeAxis"/>
</div>
<div class="flex sm5 xl5 md5 xs5 pl-1 pr-0 py-0">
<change-unit-b
:ref="'unit_x'"
axis="x"
@changeUnit="refreshFormatter"
/>
</div>
</div>
<div class="flex-container mb-2">
<div class="flex sm2 xl2 md2 xs2 px-0 py-0" />
<div class="flex sm5 xl5 md5 xs5 pl-1 pr-0 py-0">
<change-funct-b :ref="'funct_x'" axis="x" @changeFunct="changeFunct"/>
</div>
</div>
<div class="flex-container mb-2">
<div class="flex sm2 xl2 md2 xs2 px-0 py-0">
<p class="display-6"> Y-Axis </p>
</div>
<div class="flex sm5 xl5 md5 xs5 pl-1 pr-0 py-0">
<change-axis-b
:ref="'axis_y'"
axis="y"
@changeAxis="changeAxis"
/>
</div>
<div class="flex sm5 xl5 md5 xs5 pl-1 pr-0 py-0">
<change-unit-b
:ref="'unit_y'"
axis="y"
@changeUnit="refreshFormatter"/>
</div>
</div>
<div class="flex-container mb-2">
<div class="flex sm2 xl2 md2 xs2 px-0 py-0" />
<div class="flex sm5 xl5 md5 xs5 pl-1 pr-0 py-0">
<change-funct-b :ref="'funct_y'" axis="y" @changeFunct="changeFunct"/>
</div>
</div>
<specific-integral :ref="'specific_integral'" @setBrushBoundary="setBrushBoundary"/>
<div class="flex-container mb-2">
<div class="flex sm10 xl10 md10 xs10 px-0 py-0">
<change-window-start-and-size :ref="'change_window_start_and_size'" @changeOverviewDataZoom="changeOverviewDataZoom"/>
@@ -81,11 +127,14 @@
<script>
import ShowResampleRate from '@/components/analysis/replay/toolbox/ShowResampleRate.vue'
import ChangeAxis from '@/components/analysis/replay/toolbox/ChangeAxis.vue'
import ChangeUnit from '@/components/analysis/replay/toolbox/ChangeUnit.vue'
import ChangeScale from '@/components/analysis/replay/toolbox/ChangeScale.vue'
// import ChangeAxis from '@/components/analysis/replay/toolbox/ChangeAxis.vue'
import ChangeAxisB from '@/components/analysis/replay/toolbox/ChangeAxisB.vue'
// import ChangeUnit from '@/components/analysis/replay/toolbox/ChangeUnit.vue'
import ChangeUnitB from '@/components/analysis/replay/toolbox/ChangeUnitB.vue'
// import ChangeScale from '@/components/analysis/replay/toolbox/ChangeScale.vue'
import ChangeFunctB from '@/components/analysis/replay/toolbox/ChangeFunctB.vue'
import ChangeCycle from '@/components/analysis/replay/toolbox/ChangeCycle.vue'
import AbsToggle from '@/components/analysis/replay/toolbox/AbsToggle.vue'
// import AbsToggle from '@/components/analysis/replay/toolbox/AbsToggle.vue'
import SpecificIntegral from '@/components/analysis/replay/toolbox/SpecificIntegral.vue'
import DownloadFile from '@/components/analysis/replay/toolbox/DownloadFile.vue'
import DeleteFile from '@/components/analysis/replay/toolbox/DeleteFile.vue'
@@ -93,17 +142,19 @@ import EditFileName from '@/components/analysis/replay/toolbox/EditFileName.vue'
import ShowParameter from '@/components/analysis/replay/toolbox/ShowParameter.vue'
import LockDataZoom from '@/components/analysis/replay/toolbox/LockDataZoom.vue'
import ChangeWindowStartAndSize from '@/components/analysis/replay/toolbox/ChangeWindowStartAndSize.vue'
import { mapMutations } from 'vuex'
import { mapFields } from 'vuex-map-fields'
import { tableRouter } from '@/components/analysis/replay/toolbox/EliteReplayTable'
import types from '@/store/modules/analysis/replay/types'
export default {
name: 'top-control-panel',
components: {
ShowResampleRate,
ChangeAxis,
ChangeUnit,
ChangeScale,
ChangeAxisB,
ChangeUnitB,
ChangeFunctB,
ChangeCycle,
AbsToggle,
SpecificIntegral,
DownloadFile,
DeleteFile,
@@ -114,8 +165,10 @@ export default {
},
computed: {
...mapFields('replay', [
'chartData',
'metaList',
'showCyclePanel',
'controlPanel',
]),
},
props: {
@@ -127,21 +180,63 @@ export default {
deviceName: '',
showCycle: false,
innerCollapse: false,
tableRouter,
}
},
mqtt: {
},
methods: {
...mapMutations('replay', [types.chart.updateAxisLabel]),
refreshFormatter (axis) {
this.updateAxisLabelChart({
chartID: 1,
axis: axis,
axisIndex: 0,
})
},
changeFunct (axis) {
this.refreshUnit()
this.refreshFormatter(axis)
this.$emit('changeFunctional', axis, this.controlPanel[axis].funct)
this.$emit('changeAxis', 0)
},
refreshAxis () {
const xType = this.controlPanel.x.type
const yType = this.controlPanel.y.type
const xFunct = this.controlPanel.x.funct
const yFunct = this.controlPanel.y.funct
this.$refs.axis_x.refreshAxis(xType, xFunct, yType, yFunct)
this.$refs.axis_y.refreshAxis(xType, xFunct, yType, yFunct)
},
refreshUnit (axis) {
const xType = this.controlPanel.x.type
const yType = this.controlPanel.y.type
const xFunct = this.controlPanel.x.funct
const yFunct = this.controlPanel.y.funct
if (axis === 'x') {
this.$refs.unit_x.refreshUnit(xType, xFunct, yType, yFunct)
} else {
this.$refs.unit_y.refreshUnit(xType, xFunct, yType, yFunct)
}
},
init () {
//
this.deviceName = this.metaList[0].device.library_name
this.$refs.change_unit_x.init(this.deviceName)
this.$refs.change_unit_y.init(this.deviceName)
this.$refs.change_axis_x.init(this.deviceName)
this.$refs.change_axis_y.init(this.deviceName)
this.$refs.change_scale_x.init(this.deviceName)
this.$refs.change_scale_y.init(this.deviceName)
this.$refs.abs_x.init(this.deviceName)
this.$refs.abs_y.init(this.deviceName)
// tang
this.initDefaultControlPanel()
this.$refs.axis_x.init()
this.$refs.funct_x.init()
this.$refs.unit_x.init(this.controlPanel.x.type)
this.$refs.axis_y.init()
this.$refs.funct_y.init()
this.$refs.unit_y.init(this.controlPanel.y.type)
// prev
// this.$refs.change_unit_x.init(this.deviceName)
// this.$refs.change_unit_y.init(this.deviceName)
// this.$refs.change_axis_x.init(this.deviceName)
// this.$refs.change_axis_y.init(this.deviceName)
// this.$refs.change_scale_x.init(this.deviceName)
// this.$refs.change_scale_y.init(this.deviceName)
// this.$refs.abs_x.init(this.deviceName)
// this.$refs.abs_y.init(this.deviceName)
this.$refs.change_cycle.init()
this.$refs.edit_file_name.init()
this.$refs.show_param.init(this.deviceName)
@@ -157,6 +252,14 @@ export default {
this.$emit('changeFunctional', axis, functional)
},
changeAxis (gridIndex) {
this.$refs.funct_x.init()
this.$refs.funct_y.init()
this.$refs.unit_x.init(this.controlPanel.x.type)
this.$refs.unit_y.init(this.controlPanel.y.type)
this.refreshFormatter('x')
this.refreshFormatter('y')
this.$emit('changeFunctional', 'x', 'Linear')
this.$emit('changeFunctional', 'y', 'Linear')
this.$emit('changeAxis', gridIndex)
},
changeUnit (axis) {
@@ -166,18 +269,6 @@ export default {
this.$refs.change_unit_y.changeUnitByAxis()
}
},
getPanelInfo () {
var panelInfo = {
axis_x: this.$refs.change_axis_x.getChannelByAxis(),
axis_y: this.$refs.change_axis_y.getChannelByAxis(),
scale_x: this.$refs.change_scale_x.getScaleByAxis(),
scale_y: this.$refs.change_scale_y.getScaleByAxis(),
unit_x: this.$refs.change_unit_x.getUnitByAxis(),
unit_y: this.$refs.change_unit_y.getUnitByAxis(),
}
// console.log('panelInfo: ', panelInfo)
return panelInfo
},
clearCycle () {
this.$refs.change_cycle.clear()
},
@@ -188,6 +279,112 @@ export default {
this.innerCollapse = this.innerCollapse ? false : true
console.log(this.innerCollapse)
}, */
initDefaultControlPanel () {
// use state meta to decide which default unit need to be used (like check I-V mode...)
const setting = this.GLOBAL.getDefaultChartTypeByMode(this.metaList[0].parameter_set.MODE, this.deviceName)
// x-axis
let settingType = setting[0]
let settingValue = setting[1]
if (this.deviceName === 'EliteZM15' || this.deviceName.includes('Elite_EDC')) {
if (settingType === 'Elite') {
// 1: I, 2: V, 3: R, 4: cycle
if (settingValue === 1) {
this.controlPanel.x.type = 'Current'
this.controlPanel.x.channel = 0
} else if (settingValue === 2) {
this.controlPanel.x.type = 'Voltage'
this.controlPanel.x.channel = 1
} else if (settingValue === 3) {
this.controlPanel.x.type = 'Resistance'
this.controlPanel.x.channel = 2
} else if (settingValue === 4) {
this.controlPanel.x.type = 'Cycle'
this.controlPanel.x.channel = 3
}
} else if (settingType === 'Time') {
this.controlPanel.x.type = 'Time'
this.controlPanel.x.channel = undefined
}
} else if (this.deviceName.includes('EIS')) {
if (settingType.includes('EIS')) {
if (settingValue === 3) {
this.controlPanel.x.type = 'Frequency'
} else if (settingValue === 5 || settingValue === 6 || settingValue === 7) {
this.controlPanel.x.type = 'Impedance'
} else if (settingValue === 8) {
this.controlPanel.x.type = 'Phase'
} else if (settingValue === 9) {
this.controlPanel.x.type = 'Current'
} else if (settingValue === 10) {
this.controlPanel.x.type = 'Default'
}
} else if (settingType === 'Elite') {
// 1: I, 2: V, 3: R
if (settingValue === 1) {
this.controlPanel.x.type = 'Current'
} else if (settingValue === 2) {
this.dataTcontrolPanel.xype = 'Voltage'
} else if (settingValue === 3) {
this.controlPanel.x.type = 'Resistance'
}
} else if (settingType === 'Time') {
this.controlPanel.x.type = 'Time'
}
}
// y-axis
settingType = setting[2]
settingValue = setting[3]
if (this.deviceName === 'EliteZM15' || this.deviceName.includes('Elite_EDC')) {
if (settingType === 'Elite') {
// 1: I, 2: V, 3: R, 4: cycle
if (settingValue === 1) {
this.controlPanel.y.type = 'Current'
this.controlPanel.y.channel = 0
} else if (settingValue === 2) {
this.controlPanel.y.type = 'Voltage'
this.controlPanel.y.channel = 1
} else if (settingValue === 3) {
this.controlPanel.y.type = 'Resistance'
this.controlPanel.y.channel = 2
} else if (settingValue === 4) {
this.controlPanel.y.type = 'Cycle'
this.controlPanel.y.channel = 3
}
} else if (settingType === 'Time') {
this.controlPanel.y.type = 'Time'
this.controlPanel.y.channel = undefined
}
} else if (this.deviceName.includes('EIS')) {
if (settingType.includes('EIS')) {
if (settingValue === 3) {
this.controlPanel.y.type = 'Frequency'
} else if (settingValue === 5 || settingValue === 6 || settingValue === 7) {
this.controlPanel.y.type = 'Impedance'
} else if (settingValue === 8) {
this.controlPanel.y.type = 'Phase'
} else if (settingValue === 9) {
this.controlPanel.y.type = 'Current'
} else if (settingValue === 10) {
this.controlPanel.y.type = 'Default'
}
} else if (settingType === 'Elite') {
// 1: I, 2: V, 3: R
if (settingValue === 1) {
this.controlPanel.y.type = 'Current'
} else if (settingValue === 2) {
this.dataTcontrolPanel.xype = 'Voltage'
} else if (settingValue === 3) {
this.controlPanel.y.type = 'Resistance'
}
} else if (settingType === 'Time') {
this.controlPanel.y.type = 'Time'
}
}
},
},
mounted () {
},
@@ -0,0 +1,81 @@
<template>
<div>
<va-select
v-model="controlPanel[axis].type"
testBy="name"
class="va-select-without-margin"
:options="typeOption"
:noClear='true'
@input="changeAxis()"
/>
</div>
</template>
<script>
import { mapFields } from 'vuex-map-fields'
import { tableRouter } from '@/components/analysis/replay/toolbox/EliteReplayTable'
export default {
name: 'change-axis-b',
props: {
axis: {
type: String, // x or y
},
},
data () {
return {
typeOption: [],
tableRouter,
}
},
computed: {
...mapFields('replay', [
'controlPanel',
]),
},
methods: {
init (type) {
if (this.axis === 'x') {
this.typeOption = [
'Time',
'Current',
'Voltage',
'Resistance',
]
} else {
this.typeOption = [
'Current',
'Voltage',
'Resistance',
]
}
// init call change Axis
if (this.axis === 'y') {
this.$emit('changeAxis', 0) // temporarily use metaIndex for gridIndex
}
},
refreshAxis (xType, xFunct, yType, yFunct) {
const [xTable, yTable] = this.tableRouter.getTable(xType, xFunct, yType, yFunct)
if (this.axis === 'x') {
this.controlPanel[this.axis].type = xTable.name
this.controlPanel[this.axis].channel = xTable.channel
} else {
this.controlPanel[this.axis].type = yTable.name
this.controlPanel[this.axis].channel = yTable.channel
}
},
changeAxis () {
this.controlPanel[this.axis].channel = tableRouter.getChannel(this.controlPanel[this.axis].type)
this.$emit('changeAxis', 0)
},
},
}
</script>
<style lang="scss">
.va-select-without-margin {
.va-select {
margin-bottom: 0;
}
}
</style>
@@ -49,7 +49,9 @@ export default {
'axisYDataType',
'axisXLabelScale',
'axisYLabelScale',
'showCyclePanel',
'showWhichCycles',
'controlPanel',
]),
},
watch: {
@@ -81,8 +83,10 @@ export default {
this.metaID = meta.id
this.isThisModeHasCycle = this.GLOBAL.hasCycleMode(this.metaList[this.metaIndex].parameter_set.MODE, meta.device.library_name)
if (this.isThisModeHasCycle === true) {
this.showCyclePanel = true
this.showPanel = true
} else {
this.showCyclePanel = false
this.showPanel = false
}
},
@@ -90,7 +94,6 @@ export default {
this.showWhichCycles = '1'
},
async setCycle () {
console.log('setCycle')
if (this.isThisModeHasCycle === true) {
const dataCycleList = this.recInfo[this.metaID][this.cycleDataID][this.currentScale]
const cycleDataList = []
@@ -105,10 +108,10 @@ export default {
const cycleDict = this.getCycleDictRec()(cycleDataList)
this.cycleNum = Object.keys(cycleDict).length
let dataXList
if (this.axisXDataType.description !== 'Time') {
dataXList = this.recInfo[this.metaID][this.axisXDataType.id][this.currentScale]
if (this.controlPanel.x.type !== 'Time') {
dataXList = this.recInfo[this.metaID][this.controlPanel.x.channel][this.currentScale]
}
const dataYList = this.recInfo[this.metaID][this.axisYDataType.id][this.currentScale]
const dataYList = this.recInfo[this.metaID][this.controlPanel.y.channel][this.currentScale]
const filteredData = []
let counter = 0
@@ -129,36 +132,18 @@ export default {
endIndex = i
}
}
for (let i = startIndex; i <= endIndex; i++) {
const dataY = await this.getData(parseInt(this.currentScale), this.sampleMethod, dataYList[i].id, this.axisYDataType.id, this.metaList[this.metaIndex])
if (this.axisXDataType.description !== 'Time') {
const dataX = await this.getData(parseInt(this.currentScale), this.sampleMethod, dataXList[i].id, this.axisXDataType.id, this.metaList[this.metaIndex])
const dataY = await this.getData(parseInt(this.currentScale), this.sampleMethod, dataYList[i].id, this.controlPanel.y.channel, this.metaList[this.metaIndex])
if (this.controlPanel.x.type !== 'Time') {
const dataX = await this.getData(parseInt(this.currentScale), this.sampleMethod, dataXList[i].id, this.controlPanel.x.channel, this.metaList[this.metaIndex])
for (let j = 0, len = dataY.length; j < len; j++) {
if (parseInt(dataY[j][0]) >= startTime && parseInt(dataY[j][0]) <= endTime) {
let x
let y
if (this.axisXLabelScale.description === 'Log') {
x = Math.abs(dataX[j][1])
} else if (this.axisXLabelScale.description === 'Linear') {
x = dataX[j][1]
}
if (this.axisYLabelScale.description === 'Log') {
y = Math.abs(dataY[j][1])
} else if (this.axisYLabelScale.description === 'Linear') {
y = dataY[j][1]
}
filteredData.push([x, y])
filteredData.push([dataX[j][1], dataY[j][1]])
}
}
} else {
for (let j = 0, len = dataY.length; j < len; j++) {
if (parseInt(dataY[j][0]) >= startTime && parseInt(dataY[j][0]) <= endTime) {
if (this.axisYLabelScale.description === 'Log') {
dataY[j][1] = Math.abs(dataY[j][1])
} else if (this.axisYLabelScale.description === 'Linear') {
// do nothing
}
filteredData.push(dataY[j])
}
}
@@ -170,7 +155,7 @@ export default {
seriesIndex: this.metaIndex,
data: filteredData,
})
if (this.axisXDataType.description === 'Time') {
if (this.controlPanel.x.type === 'Time') {
if (counter === 0) {
this.chartData[this.chartID].xAxis[this.metaIndex].min = startTime
}
@@ -0,0 +1,55 @@
<template>
<div>
<va-radio-button
v-for="(funct, index) in functOption"
:key="index"
v-model="controlPanel[axis].funct"
:option="funct"
@input="changeFunct()"
/>
</div>
</template>
<script>
import { mapFields } from 'vuex-map-fields'
import { tableRouter } from '@/components/analysis/replay/toolbox/EliteReplayTable'
export default {
name: 'change-funct-b',
props: {
axis: {
type: String, // x or y
},
},
data () {
return {
funct: '',
functOption: [],
tableRouter,
}
},
computed: {
...mapFields('replay', [
'controlPanel',
]),
},
methods: {
init () {
this.controlPanel[this.axis].funct = 'Linear'
this.functOption = this.tableRouter.getFunct(this.axis)
},
changeFunct () {
this.$emit('changeFunct', this.axis)
},
},
}
</script>
<style lang="scss">
.va-select-without-margin {
.va-select {
margin-bottom: 0;
}
}
</style>
@@ -0,0 +1,65 @@
<template>
<div>
<va-select
@input="changeUnit()"
v-model="controlPanel[axis].unit"
class="va-select-without-margin"
:options="unitOption"
:noClear='true'
/>
</div>
</template>
<script>
import { mapFields } from 'vuex-map-fields'
import { tableRouter } from '@/components/analysis/replay/toolbox/EliteReplayTable'
export default {
name: 'change-unit-b',
props: {
axis: {
type: String, // x or y
},
},
data () {
return {
unit: '',
unitOption: [],
tableRouter,
}
},
computed: {
...mapFields('replay', [
'controlPanel',
]),
},
methods: {
init (type) {
this.controlPanel[this.axis].unit = this.tableRouter.getDefaultUnit(type)
this.unitOption = Object.keys(this.tableRouter.getOption(type))
},
refreshUnit (xType, xFunct, yType, yFunct) {
const [xTable, yTable] = this.tableRouter.getTable(xType, xFunct, yType, yFunct)
if (this.axis === 'x') {
this.controlPanel[this.axis].unit = xTable.defaultUnit
this.unitOption = Object.keys(xTable.option)
} else {
this.controlPanel[this.axis].unit = yTable.defaultUnit
this.unitOption = Object.keys(yTable.option)
}
},
changeUnit () {
this.$emit('changeUnit', this.axis)
},
},
}
</script>
<style lang="scss">
.va-select-without-margin {
.va-select {
margin-bottom: 0;
}
}
</style>
@@ -0,0 +1,163 @@
const chartTable = {
// axis type
Time: {
name: 'Time',
channel: -1,
option: {
auto: 1,
},
defaultUnit: 'auto',
downloadUnit: 'auto',
},
Current: {
name: 'Current',
channel: 0,
option: {
nA: 1,
uA: 1e3,
mA: 1e6,
A: 1e9,
},
defaultUnit: 'mA',
downloadUnit: 'A',
},
Voltage: {
name: 'Voltage',
channel: 1,
option: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'V',
},
Resistance: {
name: 'Resistance',
channel: 2,
option: {
: 1,
Ω: 1e3,
: 1e6,
: 1e9,
},
defaultUnit: 'Ω',
downloadUnit: 'Ω',
},
Cycle: {
name: 'Cycle',
channel: 3,
option: {
cycle: 1,
},
defaultUnit: 'cycle',
downloadUnit: 'cycle',
},
Charge: {
name: 'Charge',
channel: -1,
option: {
nC: 1e6,
uC: 1e9,
mC: 1e12,
C: 1e15,
},
defaultUnit: 'C',
downloadUnit: 'C',
},
Power: {
name: 'Power',
channel: -1,
option: {
mW: 1e12,
W: 1e15,
kW: 1e18,
},
defaultUnit: 'W',
downloadUnit: 'W',
},
Transconductance: {
name: 'Transconductance',
channel: -1,
option: {
'mA/V': 1,
'A/V': 1e3,
'kA/V': 1e6,
},
defaultUnit: 'A/V',
downloadUnit: 'A/V',
},
Idiot: {
name: 'not support',
channel: -1,
option: {
'not support': 1,
},
defaultUnit: 'not support',
downloadUnit: 'not support',
},
}
export const tableRouter = {
getChannel: (axis) => {
return chartTable[axis].channel
},
getDefaultUnit: (axis) => {
return chartTable[axis].defaultUnit
},
getOption: (axis) => {
return chartTable[axis].option
},
getTable: (xAxis, xFunct, yAxis, yFunct) => {
var xTable = chartTable[xAxis]
var yTable = chartTable.Idiot
if (yFunct === 'Linear' || yFunct === 'Log') {
yTable = chartTable[yAxis]
} else if (yFunct === 'Integral') {
if (xAxis === 'Time' && yAxis === 'Current') {
yTable = chartTable.Charge
} else if (xAxis === 'Current' && yAxis === 'Voltage') {
yTable = chartTable.Power
} else if (xAxis === 'Voltage' && yAxis === 'Current') {
yTable = chartTable.Power
}
} else if (yFunct === 'Differential') {
if (xAxis === 'Current' && yAxis === 'Voltage') {
yTable = chartTable.Resistance
} else if (xAxis === 'Voltage' && yAxis === 'Current') {
yTable = chartTable.Transconductance
}
}
return [xTable, yTable]
},
getFunct (axis) {
if (axis === 'x') {
return ['Linear', 'Log']
} else {
return ['Linear', 'Log', 'Integral', 'Differential']
}
},
// axisLabel formatter
autoTimeFormatter (val) {
let label = ''
const hour = parseInt(val / 3.6e9)
const minute = parseInt((val % 3.6e9) / 1000000 / 60)
const second = parseInt((val % 6e7) / 1000000)
const millisecond = parseInt((val % 1e6) / 1000)
if (hour > 0) {
label += hour + ' h '
}
if (minute > 0) {
label += minute + ' m '
}
if (second > 0) {
label += second + ' s '
}
if (millisecond > 0) {
label += millisecond + ' ms '
}
if (hour === 0 && minute === 0 && second === 0 && millisecond === 0) {
label += ' 0 ms '
}
return label
},
}
+1 -1
View File
@@ -68,7 +68,7 @@ export default {
this.$refs.file_ref.currentInfo = initCollection.data[0]
const folders = await api.collection.getByParent('folder', initCollection.data[0].id)
const files = await api.meta.getAttrByParent('folder', initCollection.data[0].id, 'id-path-name-parent-description-size-time_duration-uuid-device-channels-created_at')
const files = await api.meta.getAttrByParent('folder', initCollection.data[0].id, 'id-path-name-parent-description-size-time_duration-uuid-device-channels-parameter_set-created_at')
file.updateFileList(folders)
file.updateFileList(files)
+22 -3
View File
@@ -178,6 +178,9 @@
/>
{{ props.rowData.name }}
</template>
<template slot="parameter_set" slot-scope="props">
{{ getWorkingMode(props.rowData) }}
</template>
<template slot="created_at" slot-scope="props">
{{transDate(props.rowData.created_at)}}
</template>
@@ -234,6 +237,7 @@ import { file } from '../../../data/file/File'
import { FulfillingBouncingCircleSpinner } from 'epic-spinners'
import api from '../../../data/api/index'
import SdCardButton from '../sdcard/SdCardButton.vue'
import configTable from '@/data/config-table/index.js'
export default {
name: 'FileTable',
@@ -315,6 +319,13 @@ export default {
// titleClass: 'text-center',
// dataClass: 'text-center',
// },
{
name: '__slot:parameter_set',
title: 'Working Mode',
width: '10%',
titleClass: 'text-center',
dataClass: 'text-center',
},
{
name: '__slot:created_at',
title: 'create time',
@@ -416,7 +427,7 @@ export default {
// call getfolder api and update
const folders = await api.collection.getByParent('folder', info.id)
const files = await api.meta.getAttrByParent('folder', info.id, 'id-path-name-parent-description-size-time_duration-uuid-device-channels-created_at')
const files = await api.meta.getAttrByParent('folder', info.id, 'id-path-name-parent-description-size-time_duration-uuid-device-channels-parameter_set-created_at')
file.updateFileList(folders)
file.updateFileList(files)
@@ -436,7 +447,7 @@ export default {
this.currentInfo = item
// call getfolder api and update
const folders = await api.collection.getByParent('folder', item.id)
const files = await api.meta.getAttrByParent('folder', item.id, 'id-path-name-parent-description-size-time_duration-uuid-device-channels-created_at')
const files = await api.meta.getAttrByParent('folder', item.id, 'id-path-name-parent-description-size-time_duration-uuid-device-channels-parameter_set-created_at')
file.updateFileList(folders)
file.updateFileList(files)
@@ -457,7 +468,7 @@ export default {
if (initCollection.data.length === 1) {
this.currentInfo = initCollection.data[0]
const folders = await api.collection.getByParent('folder', initCollection.data[0].id)
const files = await api.meta.getAttrByParent('folder', initCollection.data[0].id, 'id-path-name-parent-description-size-time_duration-uuid-device-channels-created_at')
const files = await api.meta.getAttrByParent('folder', initCollection.data[0].id, 'id-path-name-parent-description-size-time_duration-uuid-device-channels-parameter_set-created_at')
file.updateFileList(folders)
file.updateFileList(files)
this.fileLists = file.getFileList()
@@ -760,6 +771,14 @@ export default {
})
}
},
getWorkingMode: function (rowData) {
try {
if (rowData.type === 'folder') return ''
return configTable.getModeConfig(rowData.device.library_name, rowData.parameter_set.MODE).name
} catch {
return ''
}
},
},
async mounted () {
const controllerList = await api.controller.getAll()
+2 -1
View File
@@ -157,12 +157,13 @@ export default {
...mapActions('project',
[
types.project.update,
types.project.addDevice,
],
),
},
async mounted () {
await this.initPage()
console.log('controllerID', taskInfo.getTaskInfo().controllerID)
// console.log('controllerID', taskInfo.getTaskInfo().controllerID)
/** get connect device list */
this.mqttPub(taskInfo.getTaskInfo().controllerID + '_user', JSON.stringify({
@@ -2,8 +2,32 @@
<div>
<va-card style="height: 90vh; overflow: auto; display: block;">
<template slot="header">
<va-icon name="fa fa-bluetooth-b mr-3" color="primary"/>
<h5 class="mt-0 mb-0">PROJECTS</h5>
<div class="row">
<div class="flex d-flex xs5 sm5 lg5 xl5">
<va-icon name="fa fa-bluetooth-b" color="primary"/>
<h5 class="mb-0">PROJECTS</h5>
</div>
<div class="flex xs7 sm7 lg7 xl7" style="text-align: right;">
<!-- <va-button v-if="projectConfigList.length !== 0" class="ma-0 circle-button" @click="closePanel"> -->
<va-icon v-if="projectConfigList.length !== 0" @click.native="closePanel"
name="fa fa-times"
color="black"
/>
<!-- </va-button> -->
</div>
</div>
<!-- <div class="flex d-flex xl5 lg5 sm5 xs5 ma-0">
<va-icon name="fa fa-bluetooth-b mr-3" color="primary"/>
<h5 class="mb-0">PROJECTS</h5>
</div>
<div class="flex d-flex xl7 lg7 sm7 xs7 ma-0" style="text-align: right;">
<va-button v-if="projectConfigList.length !== 0" class="pa-0 ma-0 circle-button" small color="dark" @click="closePanel">
<va-icon
name="fa fa-times"
color="white"
/>
</va-button>
</div> -->
</template>
<div class="flex d-flex m12 xs12 md12 xl12">
<div>
@@ -44,6 +68,7 @@ export default {
'projectList',
'projectConfigList',
'runningProjectList',
'projectManagerPanel',
]),
},
data () {
@@ -63,9 +88,16 @@ export default {
types.project.create,
],
),
closePanel: function () {
this.projectManagerPanel.show = !this.projectManagerPanel.show
},
},
mounted () {
this.projectList = this.projectConfigList
},
}
</script>
<style>
</style>
@@ -3,6 +3,12 @@
<div class="task-config__header-separator mb-1">
<div class="task-config__header-text">
<span>Action &#38; Condition</span>
<va-button class="circle-button" small color="dark" @click="closePanel">
<va-icon
name="fa fa-times"
color="white"
/>
</va-button>
</div>
</div>
<div>
@@ -76,6 +82,7 @@ export default {
...mapFields('project', [
'taskSelectKey',
'taskViewPanel',
]),
},
data () {
@@ -95,6 +102,9 @@ export default {
}
},
methods: {
closePanel: function () {
this.taskViewPanel.show = !(this.taskViewPanel.show)
},
selectDevice: function (deviceKey) {
this.settingStep = 1
this.deviceSelect = deviceKey
@@ -2,7 +2,13 @@
<div class="flex sm12 xl12 md12 xs12">
<div class="task-config__header-separator mb-1">
<div class="task-config__header-text">
<span >Device</span>
<span> Device </span>
<va-button class="circle-button" small color="dark" @click="closePanel">
<va-icon
name="fa fa-times"
color="white"
/>
</va-button>
</div>
</div>
<div>
@@ -57,6 +63,7 @@ export default {
...mapFields('project', [
'taskSelectKey',
'taskViewPanel',
]),
},
data () {
@@ -68,6 +75,7 @@ export default {
// if select single task
if (this.taskSelectKey !== undefined) {
device.isSelect = event
// console.log('device.isSelect: ', device.isSelect)
device.isSelect.includes(String(this.taskSelectKey)) === true
? this.getSelectTask.device.push(key)
: this.getSelectTask.device = this.getSelectTask.device.filter(item => item !== key)
@@ -90,6 +98,9 @@ export default {
}
}
},
closePanel: function () {
this.taskViewPanel.show = !(this.taskViewPanel.show)
},
},
mounted () {
},
@@ -3,6 +3,12 @@
<div class="task-config__header-separator mb-1">
<div class="task-config__header-text">
<span >Parameter Set</span>
<va-button class="circle-button" small color="dark" @click="closePanel">
<va-icon
name="fa fa-times"
color="white"
/>
</va-button>
</div>
</div>
<div>
@@ -54,6 +60,9 @@ export default {
}
},
methods: {
closePanel: function () {
this.taskViewPanel.show = !(this.taskViewPanel.show)
},
selectDevice: function (device) {
this.deviceSelected = device
},
@@ -80,8 +89,14 @@ export default {
resetParameter: function (mode) {
// get Device
this.device = this.getDeviceProject(this.deviceSelectKey)
console.log('this.device', this.device)
// get Config
this.config = configTable.getConfig(this.device.library.value)
if (typeof this.device.library === 'string') { // string
this.config = configTable.getConfig(this.device.library)
} else { // object
this.config = configTable.getConfig(this.device.library.value)
}
console.log('this.config', this.config)
// create default parameter
const defaultValue = {}
for (const key in this.config) {
+33 -1
View File
@@ -5,6 +5,9 @@
<va-icon name="fa fa-bluetooth-b mr-3" color="primary"/>
<h5 class="mt-0 mb-0"> {{ getSelectProject ? getSelectProject.name : '' }}</h5>
</template>
<!-- <pre>
{{ getSelectProject ? getSelectProject: '' }}
</pre> -->
<div v-if="getSelectProject === undefined">
<span>please select project</span>
</div>
@@ -26,7 +29,7 @@
import ProjectMenu from '@/components/project/view/menu/ProjectMenu'
import ProjectTable from '@/components/project/view/table/ProjectTable'
import { mapFields } from 'vuex-map-fields'
import { mapGetters } from 'vuex'
import { mapGetters, mapActions } from 'vuex'
import types from '@/store/modules/project/types'
export default {
@@ -42,6 +45,7 @@ export default {
...mapFields('project', [
'lockMode',
'projectList',
'deviceConnectList',
'projectSelectIndex',
]),
},
@@ -59,6 +63,34 @@ export default {
save: function () {
this.$emit('save_project', this.getSelectProject)
},
...mapActions('project',
[
types.project.update,
types.project.addDevice,
],
),
},
watch: {
projectSelectIndex: {
handler: async function () {
for (const device of this.deviceConnectList) {
var newDevice = {
uuid: this.GLOBAL.getUUID(),
name: device.mac_address,
product: device.device_name,
library: device.library_name,
connectDevice: device,
isSelect: [],
}
await this.addDeviceProject({ device: newDevice })
}
},
},
},
async mounted () {
// console.log('mounted')
// console.log(this.deviceConnectList)
// console.log(this.deviceConnectList.length)
},
}
</script>
@@ -36,13 +36,13 @@
{{ task.name }}
</td>
<td align="center">
<va-button :flat="true" @click="openConfig(1, taskIndex)" small>Device</va-button>
<va-button :flat="true" @click="openConfig(1, taskIndex)" small>Add Device</va-button>
</td>
<td align="center">
<va-button :flat="true" @click="openConfig(3, taskIndex)" small>Add event</va-button>
<va-button :flat="true" @click="openConfig(3, taskIndex)" small>+ New Action/Condition</va-button>
</td>
<td align="center">
<va-button :flat="true" @click="openConfig(4, taskIndex)" small>ParameterSet</va-button>
<va-button :flat="true" @click="openConfig(4, taskIndex)" small>Add Parameter</va-button>
</td>
<td align="center">
<va-icon class="fa fa-close" @click.native="() => deleteTask({ index: taskIndex})"></va-icon>
@@ -71,32 +71,63 @@
{{ task.name }}
</div>
</td>
<td align="center" @click="openConfig(1, taskIndex, deviceUUID)">
<div >
<span>{{ getDeviceProject(deviceUUID) && getDeviceProject(deviceUUID).name }}</span>
<!-- device -->
<td align="center">
<div v-if="task.device.length === 0">
<va-button :flat="true" @click="openConfig(1, taskIndex, deviceUUID)" small>
Add device
</va-button>
</div>
<div v-else>
<va-button :flat="true" @click="openConfig(1, taskIndex, deviceUUID)" small>
<span>{{ getDeviceProject(deviceUUID) && getDeviceProject(deviceUUID).name }}</span>
</va-button>
</div>
</td>
<td align="center" @click="openConfig(3, taskIndex, deviceUUID)">
<div class="flex">
<!-- device end -->
<!-- action -->
<td align="center">
<div v-if="Object.keys(task.action).length === 0">
<va-button :flat="true" @click="openConfig(3, taskIndex, deviceUUID)" small>
Add event
</va-button>
</div>
<div v-else class="flex">
<div v-for="(action, actionKey) in task.action" :key="actionKey">
<div v-if="action.target === deviceUUID">
<div v-for="conditionKey in action.condition" :key="conditionKey">
{{ action.type }} {{ task.condition[conditionKey].type }} {{ task.condition[conditionKey].value }}
<div small>
{{ action.type }} {{ task.condition[conditionKey].type }} {{ task.condition[conditionKey].value }}
<va-icon class="fa fa-close" @click.native="delAction(task, actionKey, conditionKey)"/>
</div>
</div>
</div>
</div>
<va-button :flat="true" @click="openConfig(3, taskIndex, deviceUUID)" small>
+ New Action/Condition
</va-button>
</div>
</td>
<td align="center" @click="openConfig(4, taskIndex, deviceUUID)">
<div class="flex d-flex">
<div class="flex">
<!-- action end -->
<td align="center">
<div v-if="Object.keys(task.parameter_set).length === 0">
<va-button :flat="true" @click="openConfig(4, taskIndex, deviceUUID)" small>
Add Parameter
</va-button>
</div>
<va-button :flat="true" @click="openConfig(4, taskIndex, deviceUUID)" v-else class="flex d-flex">
<div class="flex" small>
<div v-for="(parameterSet, parameterSetKey) in getParameterSetTask(taskIndex, deviceUUID)" :key="parameterSetKey">
<div v-for="(parameter, parameterKey) in parameterSet" :key="parameterKey">
<span v-if="parameterKey !== 'target'"> {{ parameterName(parameterKey) }} : {{ parameterValue(parameterKey, parameter) }} </span>
<span v-if="parameterKey !== 'target'">
<div small>
{{ parameterName(parameterKey) }} : {{ parameterValue(parameterKey, parameter) }}
</div>
</span>
</div>
</div>
</div>
</div>
</va-button>
</td>
<td align="center" v-if="lockMode === false">
<va-icon class="fa fa-close" @click.native="() => deleteTask({ index: taskIndex})"></va-icon>
@@ -160,6 +191,30 @@ export default {
}
},
methods: {
delAction: function (task, actionKey, conditionKey) {
// console.log(action)
// console.log(conditionKey)
// console.log(action.condition[0])
// console.log(action.condition.length)
// for (let i = 0; i < action.condition.length; i++) {
// if (String(action.condition[i]) === String(conditionKey)) {
// delete action.condition[i]
// break
// }
// }
const _action = JSON.parse(JSON.stringify(task.action))
const _condition = JSON.parse(JSON.stringify(task.condition))
// console.log(Object.keys(_task.action))
delete _action[actionKey]
delete _condition[conditionKey]
// delete _task.action[actionKey]
// delete _task.condition[conditionKey]
// console.log(Object.keys(_task.action))
task.action = _action
task.condition = _condition
console.log('task', task)
// delete action.condition[0]
},
switchInput: function (tag, index) {
this.tableColumn[tag] >= 0
? this.tableColumn[tag] = -1
@@ -177,7 +232,7 @@ export default {
openConfig (type, taskIndex, deviceKey) {
console.log(type, taskIndex, deviceKey, this.taskViewPanel.type, this.taskSelectKey, this.deviceSelectKey)
if (!this.lockMode) {
if (this.taskViewPanel.type === type && this.taskSelectKey === taskIndex && this.deviceSelectKey === deviceKey) {
if (this.taskViewPanel.type === type && this.taskSelectKey === taskIndex && this.deviceSelectKey === deviceKey && this.taskViewPanel.show === true) {
this.taskSelectKey = ''
this.taskViewPanel.type = -1
this.taskViewPanel.show = false
+3 -2
View File
@@ -364,7 +364,7 @@ export default {
continue
}
// device is running refresh chart
if (device.status === 1 && this.chartData[chart].captured !== true) {
if (this.chartData[chart].captured !== true) {
this.taskContentChartRefreshData({
chartID: chart,
deviceList: this.deviceListNew,
@@ -591,6 +591,7 @@ export default {
})
},
switchMode: function () {
console.log('switch mode', this.developerMode)
this.developerMode = !this.developerMode
},
@@ -618,7 +619,7 @@ export default {
this.pageMqttSub(taskInfo.getTaskInfo().controllerID)
await this.pageInit()
this.dataRefreshTimer = setInterval(this.refreshData, 1000)
this.dataRefreshTimer = setInterval(this.refreshData, 100)
var switchModeHander = function (switchMode, e) {
if (e.shiftKey && e.metaKey && e.keyCode === 83) {
@@ -3,10 +3,13 @@
<va-card>
<template slot="header">
<div class="row flex sm12 xl12 md12 xs12 align--center my-0 py-0">
<div class="flex sm5 xl5 md5 xs5 px-0 mx-0">
<h5 class="mt-0 mb-0"><va-icon name="fa fa-area-chart mr-3" color="primary"/>{{ nameCard }}</h5>
<div class="flex sm1 xl1 md1 xs1 px-0 mx-0">
<h5 class="mt-0 mb-0" style="">{{ nameCard }}</h5>
</div>
<div class="flex sm7 xl7 md7 xs7 pa-0 ma-0" style="text-align: right;">
<div class="flex sm9 xl9 md9 xs9 px-0 " style="margin-left: -5px; color: #9aa4af;">
<p class="mt-0 mb-0">{{ chartInfo }}</p>
</div>
<div class="flex sm2 xl2 md2 xs2 pa-0 ma-0" style="text-align: right;">
<va-button class="pa-0 ma-0 circle-button" small color="dark" @click="remove()">
<va-icon
name="fa fa-times"
@@ -14,14 +17,6 @@
/>
</va-button>
</div>
<div class="flex xl10">
<canvas-chart-real-time-calculation :chartID="chartID" @refreshData="refreshData" @switchModeButton="switchModeButton" @getClicked="getClicked" ref="'cal_ref'" />
</div>
<div class="flex xl2">
<va-button :disabled="calClicked" color="#f5aa3b" @click="captureChart" small>
CAPTURE
</va-button>
</div>
</div>
</template>
<va-tabs v-model="tabValue" class="mb-3" style="width: 100%; min-width: 100px;">
@@ -34,9 +29,18 @@
</va-tabs>
<div v-if="tabValue == 0" >
<div v-if="chartData[chartID].legend.data.length != 0">
<canvas-chart-real-time-display
:chartID="chartID" ref="CanvasChartRealTimeDisplay"
/>
<div class="row flex xl12 lg12 sm12 xs12 ma-0 pa-0">
<div class="flex xl1 lg1 sm0 xs0 ma-0 pa-0">
</div>
<div class="flex xl7 lg7 sm7 xs7 my-0 py-0">
<canvas-chart-real-time-display
:chartID="chartID" ref="CanvasChartRealTimeDisplay"
/>
</div>
<div class="flex xl4 lg4 sm5 xs5 my-0 py-0 mt-2">
<canvas-chart-real-time-calculation :chartID="chartID" @refreshData="refreshData" @switchModeButton="switchModeButton" @getClicked="getClicked" @captureChart="captureChart" ref="'cal_ref'" />
</div>
</div>
<div class="flex" v-if="developerMode">
<div v-for="(data, device) in dataStreamBuffer.getByChartID(chartID)" :key="device">
<div v-for="(i, channel) in data" :key="channel">
@@ -44,6 +48,55 @@
</div>
</div>
</div>
<!-- <div class="row flex align--left ma-0 pa-0">
<va-input
v-if="chartData[chartID].chartXMode === 'time'"
class="mx-1"
@keyup.enter="timeIntervalChange(timeIntervalInput)"
@blur="timeIntervalChange(timeIntervalInput)"
v-model="timeIntervalInput"
:label="'time-grid'"
>
<p slot="append" style="margin-right: 0;" small>
ms
</p>
</va-input>
<va-input
v-if="chartData[chartID].chartXMode === 'value'"
class="mx-1"
@keyup.enter="xIntervalChange(xIntervalInput)"
@blur="xIntervalChange(xIntervalInput)"
v-model="xIntervalInput"
:label="'x-grid'"
>
<p slot="append" style="margin-right: 0;" small>
{{chartData[chartID].chartXUnit}}
</p>
</va-input>
<va-input
class="mx-1"
@keyup.enter="yIntervalChange(yIntervalInput)"
@blur="yIntervalChange(yIntervalInput)"
v-model="yIntervalInput"
:label="'y-grid'"
>
<p slot="append" style="margin-right: 0;" small>
{{chartData[chartID].chartYUnit}}
</p>
</va-input>
<va-input
v-if="chartData[chartID].chartDevice === 'neulive'"
class="mx-1"
@keyup.enter="threeAxisIntervalChange(threeAxisIntervalInput)"
@blur="threeAxisIntervalChange(threeAxisIntervalInput)"
v-model="threeAxisIntervalInput"
:label="'3axis-grid'"
>
<p slot="append" style="margin-right: 0;" small>
g
</p>
</va-input>
</div> -->
<!-- chart -->
<chart :key="taskContentChartKey" :ref="'chart_ref'" :style="'width: '+ cardwidth + '; height: ' + cardheight + ';'" :option="data" @dataZoom="updateZoom" :auto-resize="true"></chart>
</div>
@@ -131,6 +184,7 @@ import { mapActions } from 'vuex'
import taskTypes from '@/store/modules/task/content/types'
import CanvasChartRealTimeCalculation from './CanvasChartRealTimeCalculation.vue'
import { dataStreamBuffer } from '@/data/task/DataStreamBuffer'
import configTable from '@/data/config-table/index.js'
export default {
name: 'CanvasChart',
@@ -163,6 +217,13 @@ export default {
},
},
computed: {
chartInfo () {
if (this.data === undefined || this.data === null) return ''
if (this.data.mappingID === undefined || this.data.mappingID === '-1') return ''
const device = this.deviceListNew.find(ele => String(ele.memory_board) === String(this.data.mappingID))
const deviceMode = configTable.getModeConfig(device.library_name, device.configuration.MODE).name
return `${device.name}_[${device.memory_board}] | MAC_${device.mac_address.toUpperCase()} | ${this.data.createdBy} chart: ${deviceMode}`
},
...mapFields('', [
'developerMode',
]),
@@ -208,8 +269,14 @@ export default {
// console.log(this.chartData[String(newData.chartID) + '-1'])
},
updateZoom: function (e) {
this.dataZoomStart = e.batch[0].start
this.dataZoomEnd = e.batch[0].end
// console.log(e)
if (e.batch !== undefined && e.dataZoomId !== '\u0000series\u00002\u00000') {
this.dataZoomStart = e.batch[0].start
this.dataZoomEnd = e.batch[0].end
} else if (e.dataZoomId !== '\u0000series\u00002\u00000') {
this.dataZoomStart = e.start
this.dataZoomEnd = e.end
}
},
timeIntervalChange: function (val) {
if (!isNaN(parseInt(val))) {
@@ -376,6 +443,9 @@ export default {
// save the start & end of previous dataZoom setting to avoid reset dataZoom
this.data.dataZoom[0].start = this.dataZoomStart
this.data.dataZoom[0].end = this.dataZoomEnd
this.data.dataZoom[1].start = this.data.dataZoom[0].start
this.data.dataZoom[1].end = this.data.dataZoom[0].end
// console.log(this.data.dataZoom)
this.$refs.CanvasChartRealTimeDisplay.matchData(this.data)
},
switchModeButton: function (dataMode, gridIndex, channelIndex) {
@@ -1,29 +1,42 @@
<template>
<div>
<div class="row xs12 sm12 lg10 xl10 pa-2">
<va-button v-if="integralClicked && (mode_name==='Chronoamperometric' || mode_name==='I-T Graph' || mode_name==='I-V Curve')" color="danger" class="mb-2" @click="clickIntegral" small>
To Raw Mode
<div class="xs12 sm12 lg12 xl12 mr-4" style="text-align: end;">
<!-- <img v-if="!integralClicked && (mode_name==='Chronoamperometric' || mode_name==='I-T Graph' || mode_name==='I-V Curve')" src='@/assets/img/toolbox/integral.svg' @click="clickIntegral"> -->
<va-button :flat="true" class="pa-0 ma-0 mr-2" v-if="xlogClicked && (mode_name==='Linear Sweep Voltammetry' || mode_name==='I-V Curve')" color="danger" @click="clickXLog" small>
<!-- To Raw Mode -->
<img src='@/assets/img/toolbox/LogX_clicked.svg'>
</va-button>
<va-button :disabled="disableInt" v-if="!integralClicked && (mode_name==='Chronoamperometric' || mode_name==='I-T Graph' || mode_name==='I-V Curve')" color="primary" class="mb-2" @click="clickIntegral" small>
To Integral Mode
<va-button :flat="true" class="pa-0 ma-0 mr-2" :disabled="disableLog" v-if="!xlogClicked && (mode_name==='Linear Sweep Voltammetry' || mode_name==='I-V Curve')" color="#ffffff" @click="clickXLog" small>
<!-- To log Mode (x-axis) -->
<img src='@/assets/img/toolbox/LogX.svg'>
</va-button>
<va-button v-if="xlogClicked && (mode_name==='Linear Sweep Voltammetry' || mode_name==='I-V Curve')" color="danger" class="mb-2" @click="clickXLog" small>
To Raw Mode
<va-button :flat="true" class="pa-0 ma-0 mr-2" v-if="ylogClicked && (mode_name==='Linear Sweep Voltammetry' || mode_name==='I-V Curve')" color="danger" @click="clickYLog" small>
<!-- To Raw Mode -->
<img src='@/assets/img/toolbox/LogY_clicked.svg'>
</va-button>
<va-button :disabled="disableLog" v-if="!xlogClicked && (mode_name==='Linear Sweep Voltammetry' || mode_name==='I-V Curve')" color="primary" class="mb-2" @click="clickXLog" small>
To log Mode (x-axis)
<va-button :flat="true" :disabled="disableLog" class="pa-0 ma-0 mr-2" v-if="!ylogClicked && (mode_name==='Linear Sweep Voltammetry' || mode_name==='I-V Curve')" color="#ffffff" @click="clickYLog" small>
<!-- To log Mode (y-axis) -->
<img src='@/assets/img/toolbox/LogY.svg'>
</va-button>
<va-button v-if="ylogClicked && (mode_name==='Linear Sweep Voltammetry' || mode_name==='I-V Curve')" color="danger" class="mb-2" @click="clickYLog" small>
To Raw Mode
<va-button :flat="true" class="pa-0 ma-0 mr-2" v-if="integralClicked && (mode_name==='Chronoamperometric' || mode_name==='I-T Graph' || mode_name==='I-V Curve')" color="danger" @click="clickIntegral" small>
<!-- To Raw Mode -->
<img src='@/assets/img/toolbox/integral_clicked.svg'>
</va-button>
<va-button :disabled="disableLog" v-if="!ylogClicked && (mode_name==='Linear Sweep Voltammetry' || mode_name==='I-V Curve')" color="primary" class="mb-2" @click="clickYLog" small>
To log Mode (y-axis)
<va-button class="pa-0 ma-0 mr-2" :flat="true" :disabled="disableInt" v-if="!integralClicked && (mode_name==='Chronoamperometric' || mode_name==='I-T Graph' || mode_name==='I-V Curve')" color="#ffffff" @click="clickIntegral" small>
<!-- To Integral Mode -->
<img src='@/assets/img/toolbox/integral.svg'>
</va-button>
<va-button v-if="diffClicked && (mode_name==='Linear Sweep Voltammetry' || mode_name==='I-V Curve')" color="danger" class="mb-2" @click="clickDiff" small>
To Raw Mode
<va-button :flat="true" class="pa-0 ma-0 mr-2" v-if="diffClicked && (mode_name==='Linear Sweep Voltammetry' || mode_name==='I-V Curve')" color="danger" @click="clickDiff" small>
<!-- To Raw Mode -->
<img src='@/assets/img/toolbox/dx_clicked.svg'>
</va-button>
<va-button :disabled="disableDiff" v-if="!diffClicked && (mode_name==='Linear Sweep Voltammetry' || mode_name==='I-V Curve')" color="primary" class="mb-2" @click="clickDiff" small>
To Differential Mode
<va-button :flat="true" :disabled="disableDiff" class="pa-0 ma-0 mr-2" v-if="!diffClicked && (mode_name==='Linear Sweep Voltammetry' || mode_name==='I-V Curve')" color="#ffffff" @click="clickDiff" small>
<!-- To Differential Mode -->
<img src='@/assets/img/toolbox/dx.svg'>
</va-button>
<va-button :flat="true" :disabled="calClicked" class="pa-0 ma-0" color="#ffffff" @click="captureChart" small>
<!-- CAPTURE -->
<img src='@/assets/img/toolbox/capture.svg'>
</va-button>
</div>
<div class="row xs12 sm12 lg6 xl6 pa-2" v-if="diffClicked">
@@ -68,7 +81,7 @@ export default {
]),
...mapFields('taskContent', [
'chartData',
'taskContentChartKey',
'taskContentChartPanelKey',
'deviceListNew',
]),
},
@@ -88,6 +101,7 @@ export default {
disableDiff: false,
disableLog: false,
disableInt: false,
calClicked: false,
sgFilterArgument: {
windowSize: 5,
polynomial: 3,
@@ -107,6 +121,12 @@ export default {
},
},
methods: {
captureChart: function () {
this.$emit('captureChart')
},
getClicked: function (clicked) {
this.calClicked = clicked
},
// Do arithmetic operations triggered by button(raw, integral, log)
watchHandler: function () {
// this.data need to be deep copy from rawData, since we don't want to modify the source(chartData[])
@@ -221,19 +241,24 @@ export default {
const dataX = []
const dataY = []
const time = []
for (index = 0; index < dataLength; index++) {
const dsample = 1
const m = parseInt((this.sgFilterArgument.windowSize - 1) / 2)
for (index = 0; index < dataLength; index += dsample) {
dataX.push(seriesData[index][0])
dataY.push(seriesData[index][1])
dataY.push(seriesData[index][1] * 1e-9)
time.push(seriesData[index][2])
}
// console.log(time[time.length - 1], time[0])
// console.log(dataX.length, time[time.length - 1] - time[0], dataX.length * 1e6 / (time[time.length - 1] - time[0]))
// console.log('dataX', dataX)
// console.log('dataY', dataY)
// console.log('time', time)
const filteredData = sgFilter(dataY, this.sgFilterArgument.windowSize, this.sgFilterArgument.polynomial)
// console.log('filterdData', filteredData)
const filteredData = sgFilter(dataY, this.sgFilterArgument.windowSize, this.sgFilterArgument.polynomial, parseInt(dataX.length * 1e6 / (time[time.length - 1] - time[0])))
console.log('filterdData', filteredData)
for (index = 0; index < dataLength; index++) {
_data.push([dataX[index], filteredData[index], time[index]])
for (index = 0; index < filteredData.length; index++) {
_data.push([dataX[index + m], filteredData[index], time[index + m]])
}
// for (index = 0; index < dataLength; index++) {
@@ -261,29 +286,26 @@ export default {
const dataRaw = this.data.series[0].data
if (this.integralClicked || this.xlogClicked || this.ylogClicked || this.diffClicked) {
this.data.series[0].data = _data
this.$emit('getClicked', true)
this.getClicked(true)
// console.log(this.data.series[0].data[this.data.series[0].data.length - 1])
} else {
this.$emit('getClicked', false)
this.getClicked(false)
}
this.data.xAxis[0].type = 'value'
if (this.xName !== 'TIME') {
// console.log('not time')
this.data.xAxis[0].max = (value) => {
if (value.max < 0) {
return value.max - 0.1 * value.max
return value.max - 0.05 * value.max
}
if (value.max + 0.1 * value.max > 5e6) {
return 5e6
}
return value.max + 0.1 * value.max
return value.max + 0.05 * value.max
}
this.data.yAxis[0].max = (value) => {
if (value.max < 0) {
return value.max - 0.1 * value.max
return value.max - 0.05 * value.max
}
return value.max + 0.1 * value.max
return value.max + 0.05 * value.max
}
}
if (this.integralClicked) {
@@ -407,6 +429,8 @@ export default {
},
async mounted () {
this.rawData = this.chartData[this.chartID]
// const test = [3.0, 12.9, 22.6, 32.10000000000001, 41.4, 50.5, 59.400000000000006, 68.1, 76.6, 84.9, 93.0, 100.9, 108.60000000000001, 116.1, 123.39999999999999, 130.5, 137.4, 144.10000000000002, 150.6, 156.9, 163.0, 168.9, 174.60000000000002, 180.10000000000002, 185.4, 190.5, 195.39999999999998, 200.1, 204.59999999999997, 208.90000000000003, 213.0, 216.89999999999998, 220.59999999999997, 224.09999999999997, 227.40000000000003, 230.5, 233.39999999999998, 236.1, 238.6, 240.90000000000003, 243.0, 244.9, 246.6, 248.10000000000002, 249.40000000000003, 250.5, 251.40000000000003, 252.09999999999997, 252.6, 252.9, 253.0, 252.90000000000003, 252.59999999999997, 252.10000000000002, 251.39999999999998, 250.5, 249.39999999999992, 248.09999999999997, 246.60000000000002, 244.89999999999998, 243.0, 240.89999999999992, 238.59999999999997, 236.10000000000002, 233.39999999999992, 230.5, 227.39999999999992, 224.10000000000002, 220.60000000000002, 216.89999999999992, 213.0, 208.89999999999986, 204.5999999999999, 200.10000000000002, 195.39999999999998, 190.5, 185.39999999999998, 180.0999999999999, 174.60000000000002, 168.89999999999998, 163.0, 156.89999999999998, 150.5999999999999, 144.10000000000002, 137.39999999999998, 130.5, 123.40000000000009, 116.10000000000002, 108.60000000000002, 100.89999999999986, 93.0, 84.90000000000009, 76.60000000000002, 68.10000000000002, 59.399999999999864, 50.5, 41.399999999999864, 32.09999999999991, 22.59999999999991, 12.899999999999977]
// console.log('sgFilter', sgFilter(test, 5, 2, 10))
// console.log('x', this.rawData.xAxis.length)
// if (this.mode_name === 'I-V Curve') {
// this.rawData.xAxis[0].boundaryGap = [0, '5%']
@@ -1,37 +1,20 @@
<template>
<div>
<!-- cycle display -->
<div v-if="data !== null && data.cycle > 0" class="row flex sm12 xl12 md12 xs12 align--center my-0 py-0">
<div style="text-align: right;">
<h1 style="color: #707ee7;"> cycle <span style="color: white; background-color: #707ee7; border-radius: 40%;" class="pa-2">{{ data.cycle }}</span></h1>
</div>
</div>
<div v-for="(chart, chartIndex) in realTime" :key="'c'+chartIndex">
<div v-for="(grid, gridIndex) in chart" :key="'s'+gridIndex" class="row ma-0 pa-0">
<div class="col flex xs0 sm0 lg0 md0 xl0 xxl1"/>
<div class="col flex xs2 sm2 lg2 md2 xl2 xxl1" pa-0 ma-0>
<p color="primary" style="text-align: right;">{{ grid.name }}</p>
</div>
<!-- value (y-axis) -->
<div class="col flex sm2 xl2 md2 xs2">
<!-- cycle -->
<div class="ma-1" style="width: 75px;"
v-show="data !== null && data.cycle > 0"
>
<va-input
label="y-value"
disable="disable"
v-model="grid.yValue"
/>
</div>
<!-- unit (y-axis) -->
<div class="col flex sm2 xl2 md2 xs2">
<va-select
label="y-unit"
v-model="grid.yUnit"
:options="grid.yUnitOption"
label="cycle no."
v-model="data.cycle"
:options="grid.xUnitOption"
noClear
/>
</div>
<div class="col flex sm1 xl1 md1 xs1"></div>
<!-- value (x-axis) -->
<div class="col flex sm2 xl2 md2 xs2">
<div class="ma-1" style="width: 100px;">
<va-input
label="x-value"
disable="disable"
@@ -39,7 +22,7 @@
/>
</div>
<!-- unit (x-axis) -->
<div class="col flex sm2 xl2 md2 xs2">
<div class="ma-1" style="width: 75px;">
<va-select
label="x-unit"
v-model="grid.xUnit"
@@ -47,6 +30,23 @@
noClear
/>
</div>
<!-- value (y-axis) -->
<div class="ma-1" style="width: 100px;">
<va-input
label="y-value"
disable="disable"
v-model="grid.yValue"
/>
</div>
<!-- unit (y-axis) -->
<div class="ma-1" style="width: 75px;">
<va-select
label="y-unit"
v-model="grid.yUnit"
:options="grid.yUnitOption"
noClear
/>
</div>
</div>
</div>
</div>
@@ -81,6 +81,11 @@ export default {
}
},
methods: {
getDeviceMode: function () {
const device = this.deviceListNew.find(ele => String(ele.memory_board) === String(this.chartData[this.chartID].mappingID))
if (device === undefined) return
return device.configuration.MODE
},
// for user to choose wanted unit
setUnit: function (gridIndex, channelIndex) {
// construct realTime object, i.e., record the coressponding value and unit
@@ -94,15 +99,18 @@ export default {
// set name, sourceIndex in data.series
_newChannel.name = this.data.gridSource[gridIndex][channelIndex].name
_newChannel.seriesSource = this.data.series.findIndex((ele) => ele.name === _newChannel.name)
// add device mode condition
// set x-axis
_newChannel.xValue = 0
_newChannel.xUnit = _xAxis.default.defaultUnit
_newChannel.xUnit = (typeof _xAxis.default.defaultUnit === 'function') ? _xAxis.default.defaultUnit(this.getDeviceMode()) : _xAxis.default.defaultUnit
_newChannel.xScale = _xAxis.default.unit
_newChannel.xUnitOption = Object.keys(_xAxis.default.unit)
_newChannel.xName = _xAxis.default.name
// set y-axis
_newChannel.yValue = 0
_newChannel.yUnit = _yAxis.default.defaultUnit
_newChannel.yUnit = (typeof _yAxis.default.defaultUnit === 'function') ? _yAxis.default.defaultUnit(this.getDeviceMode()) : _yAxis.default.defaultUnit
_newChannel.yScale = _yAxis.default.unit
_newChannel.yUnitOption = Object.keys(_yAxis.default.unit)
_newChannel.yName = _yAxis.default.name
@@ -171,7 +179,7 @@ export default {
this.data.xAxis[gridIndex].axisLabel.formatter = this.timeFormatter
} else {
this.data.xAxis[gridIndex].axisLabel.formatter = function (val) {
return parseFloat(val / _xScale).toFixed(2) + _xUnit
return parseFloat(val / _xScale).toFixed(3) + _xUnit
}
}
// update yAxis.formatter
@@ -179,7 +187,7 @@ export default {
this.data.yAxis[gridIndex].axisLabel.formatter = this.timeFormatter
} else {
this.data.yAxis[gridIndex].axisLabel.formatter = function (val) {
return parseFloat(val / _yScale).toFixed(2) + _yUnit
return parseFloat(val / _yScale).toFixed(3) + _yUnit
}
}
// update tooltip.formatter
@@ -203,12 +211,12 @@ export default {
_currChannel.functional = newFunctional
// set x-axis
_currChannel.xUnit = _xAxis.default.defaultUnit
_currChannel.xUnit = (typeof _xAxis.default.defaultUnit === 'function') ? _xAxis.default.defaultUnit(this.getDeviceMode()) : _xAxis.default.defaultUnit
_currChannel.xScale = _xAxis.default.unit
_currChannel.xUnitOption = Object.keys(_xAxis.default.unit)
_currChannel.xName = _xAxis.default.name
// set y-axis
_currChannel.yUnit = _yAxis[newFunctional].defaultUnit
_currChannel.yUnit = (typeof _yAxis[newFunctional].defaultUnit === 'function') ? _yAxis[newFunctional].defaultUnit(this.getDeviceMode()) : _yAxis[newFunctional].defaultUnit
_currChannel.yScale = _yAxis[newFunctional].unit
_currChannel.yUnitOption = Object.keys(_yAxis[newFunctional].unit)
_currChannel.yName = _yAxis[newFunctional].name
@@ -252,6 +260,7 @@ export default {
},
realTime: {
handler: function () {
this.updateValue()
this.matchFormatter()
},
deep: true,
@@ -57,7 +57,7 @@ const chartTable = {
mA: 1e6,
A: 1e9,
},
defaultUnit: 'mA',
defaultUnit: (Mode) => { return (Mode === 10) ? 'nA' : 'mA' },
downloadUnit: 'mA',
},
// Q = ∫ I dt
@@ -93,7 +93,7 @@ const chartTable = {
// 1
{
default: {
name: 'Resistor',
name: 'Resistance',
unit: {
: 1,
Ω: 1e3,
@@ -152,16 +152,16 @@ const chartTable = {
mA: 1e6,
A: 1e9,
},
defaultUnit: 'mA',
defaultUnit: (Mode) => { return (Mode === 10) ? 'nA' : 'mA' },
downloadUnit: 'mA',
},
// Gm = dI/dV
differential: {
name: 'Transconductance',
unit: {
'mA/V': 1,
'A/V': 1e3,
'kA/V': 1e6,
'mA/V': 1e-3,
'A/V': 1,
'kA/V': 1e3,
},
defaultUnit: 'A/V',
downloadUnit: 'A/V',
@@ -25,7 +25,7 @@
{{ `[${device.memory_board}]` }} {{ device.name }}
</va-item-label>
<va-item-label caption>
{{ device.mac_address }}
{{ device.mac_address.toUpperCase() }}
</va-item-label>
</va-item-section>
</va-item>
+12 -11
View File
@@ -75,7 +75,7 @@ function sgFilter (data, windowSize, k) {
// return list
}
function sgFilterGetDifferential (data, windowSize, polynomial) {
function sgFilterGetDifferential (data, windowSize, polynomial, sampleRate = 1) {
// self
const arr = []
const m = parseInt((windowSize - 1) / 2)
@@ -96,23 +96,24 @@ function sgFilterGetDifferential (data, windowSize, polynomial) {
// use index 1 row in matrix
const rowOneInB = row(B, 1)._data[0]
const start = []
const end = []
// const start = []
// const end = []
const list = []
// eslint-disable-next-line no-unused-vars
for (const _ of range(0, m)) {
start.push(data[0])
end.push(data[data.length - 1])
}
const _data = [...start, ...data, ...end]
// for (const _ of range(0, m)) {
// start.push(data[0])
// end.push(data[data.length - 1])
// }
// const _data = [...start, ...data, ...end]
// const _data = [...data]
// m ... data_length - m - 1
for (const i of range(m, _data.length - m)) {
for (const i of range(m, data.length - m)) {
const arra = []
// -m ... 0 ... m
for (const j of range(-m, m + 1)) {
arra.push(_data[i.value + j.value])
arra.push(data[i.value + j.value])
}
let sum = 0
@@ -120,7 +121,7 @@ function sgFilterGetDifferential (data, windowSize, polynomial) {
sum += (arra[index] * rowOneInB[index])
}
list.push(sum)
list.push(sum * sampleRate)
}
return list
}
+40
View File
@@ -4,6 +4,25 @@ import DevMode from './DevMode'
import Chronoamperometry from './Chronoamperometry'
const EliteEIS = {
VOLT_VSCAN: {
type: 'number',
showName: 'Volt (v.s. ref)',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 25000,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
ADC_VALUE_I: {
type: 'none',
showName: 'Instruction',
@@ -227,6 +246,27 @@ const EliteEIS = {
return voltageInRangeArr[parseInt(idx)]
},
},
TIME_DURATION: {
type: 'number',
showName: 'Time duration',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 86400 }), // UI上能輸入的最大最小值
defaultValue: 0,
defaultUnit: 's',
downloadUnit: 's',
unit: {
ms: 1e-3,
s: 1,
m: 60,
h: 3600,
},
outputRawData: (val) => {
return parseInt(parseFloat(val))
},
outputReadabilityData: (val) => {
return parseInt(parseFloat(val))
},
},
CTRL_HIGH_Z_15: {
type: 'array',
showName: 'HighZ',
+9
View File
@@ -1,5 +1,6 @@
import EliteEDC from './EliteEDC/index'
import EliteEIS from './EliteEIS/index'
import store from '@/store/index'
// object saving library name mapping table
const libraryNameMappingTable = {
@@ -58,6 +59,14 @@ const serialNumberMappingTable = {
* @returns {Object} : config
*/
function getConfig (type) {
if (typeof type === 'number') {
const deviceList = store.getters.getField('taskContent').deviceListNew
if (deviceList === undefined) return
const device = deviceList.find(ele => ele.memory_board === type)
if (device === undefined) return
return libraryNameMappingTable[device.library_name]
}
// library name
if (typeof type === 'string') {
return libraryNameMappingTable[type]
+2 -1
View File
@@ -47,7 +47,8 @@ const getDefaultChartTypeByMode = (mode, lib) => {
const settings = {}
settings[0] = ['EliteEIS', 6, 'EliteEIS', 5]
settings[1] = ['Elite', 2, 'Elite', 1]
settings[2] = ['Time', 2, 'Elite', 2]
settings[2] = ['Time', 2, 'Elite', 1]
settings[3] = ['Time', 2, 'Elite', 2]
return settings[mode]
} else if (lib === 'Elite_TRI') {
// const settings = {}
+1 -1
View File
@@ -8,7 +8,7 @@ function newChart (chartID, numOfCharts) {
chartYUnit: '',
chartXMode: 'value', // value or time
chartYMode: 'value', // value or time
cardName: 'chart' + String(numOfCharts),
cardName: 'Chart' + String(numOfCharts),
cardHeight: '500px',
cardWidth: 'auto',
mappingID: '-1',
+32 -85
View File
@@ -1,3 +1,5 @@
import { tableRouter } from '@/components/analysis/replay/toolbox/EliteReplayTable'
function getTime (val) {
let label = ''
const hour = Math.floor(val / 3.6e9)
@@ -23,7 +25,7 @@ function getTime (val) {
return label
}
function newTooltip (chartID) {
function newTooltip (controlPanel) {
return {
hideDelay: 5000,
trigger: 'axis',
@@ -32,92 +34,37 @@ function newTooltip (chartID) {
borderWidth: 1,
borderRadius: 0,
padding: 10,
// axisPointer: {
// type: 'cross',
// animation: false,
// label: {
// backgroundColor: '#505765',
// },
// },
formatter: function (params) {
if (params.length) {
if (params[0].seriesName.split('_')[0] === 'T' && params[0].seriesName.split('_')[1] !== 'T') {
params.unshift({ seriesName: 'Time', value: [null, getTime(parseFloat(params[0].value[0]))], color: '#5193f2' })
} else if (params[0].seriesName.split('_')[0] !== 'T' && params[0].seriesName.split('_')[1] === 'T') {
params.unshift({ seriesName: 'Time', value: [null, getTime(parseFloat(params[0].value[1]))], color: '#5193f2' })
} else {
params.unshift({ seriesName: 'Time', value: [null, getTime(parseFloat(params[0].value[2]))], color: '#5193f2' })
}
let tip = ''
for (var i = 0; i < params.length; i++) {
const param = params[i]
const style = 'color: ' + param.color
let value
// console.log(param.value)
if (param.seriesName === 'Time') {
value = param.value[1]
} else if (param.seriesName.split('_')[1] === 'T' && param.seriesName.split('_')[0] !== 'T') {
const physicalQuantity = param.seriesName.split('_')[0][param.seriesName.split('_')[0].length - 1]
if (physicalQuantity === 'V') {
value = parseFloat(param.value[0]).toFixed(3) + ' μV'
} else if (physicalQuantity === 'I') {
value = parseFloat(param.value[0]).toFixed(3) + ' nA'
} else if (physicalQuantity === 'R') {
value = parseFloat(param.value[0]).toFixed(3) + ' mΩ'
} else if (physicalQuantity === 'X' || physicalQuantity === 'Y' || physicalQuantity === 'Z' || physicalQuantity === 'M') {
value = (parseFloat(param.value[0]) / 100).toFixed(3) + ' (g)'
} else if (!isNaN(physicalQuantity)) {
value = (parseFloat(param.value[0]) / 1000).toFixed(3) + ' (mV)'
} else {
value = parseFloat(param.value[0]).toFixed(3)
}
} else if (param.seriesName.split('_')[1] !== 'T' && param.seriesName.split('_')[0] === 'T') {
const physicalQuantity = param.seriesName.split('_')[1][param.seriesName.split('_')[1].length - 1]
if (physicalQuantity === 'V') {
value = parseFloat(param.value[1]).toFixed(3) + ' μV'
} else if (physicalQuantity === 'I') {
value = parseFloat(param.value[1]).toFixed(3) + ' nA'
} else if (physicalQuantity === 'R') {
value = parseFloat(param.value[1]).toFixed(3) + ' mΩ'
} else if (physicalQuantity === 'X' || physicalQuantity === 'Y' || physicalQuantity === 'Z' || physicalQuantity === 'M') {
value = (parseFloat(param.value[1]) / 100).toFixed(3) + ' (g)'
} else if (!isNaN(physicalQuantity)) {
value = (parseFloat(param.value[1]) / 1000).toFixed(3) + ' (mV)'
} else {
value = parseFloat(param.value[1]).toFixed(3)
}
} else {
let value1
let value2
if (param.seriesName.split('_')[0][param.seriesName.split('_')[0].length - 1] === 'V') {
value1 = parseFloat(param.value[0]).toFixed(3) + ' μV'
} else if (param.seriesName.split('_')[0][param.seriesName.split('_')[0].length - 1] === 'I') {
value1 = parseFloat(param.value[0]).toFixed(3) + ' nA'
} else if (param.seriesName.split('_')[0][param.seriesName.split('_')[0].length - 1] === 'R') {
value1 = parseFloat(param.value[0]).toFixed(3) + ' mΩ'
} else {
value1 = parseFloat(param.value[0]).toFixed(3)
}
if (param.seriesName.split('_')[1][param.seriesName.split('_')[1].length - 1] === 'V') {
value2 = parseFloat(param.value[1]).toFixed(3) + ' μV'
} else if (param.seriesName.split('_')[1][param.seriesName.split('_')[1].length - 1] === 'I') {
value2 = parseFloat(param.value[1]).toFixed(3) + ' nA'
} else if (param.seriesName.split('_')[1][param.seriesName.split('_')[1].length - 1] === 'R') {
value2 = parseFloat(param.value[1]).toFixed(3) + ' mΩ'
} else {
value2 = parseFloat(param.value[1]).toFixed(3)
}
value = value1 + ', ' + value2
}
tip += '<span style="' + style + '">' +
param.seriesName +
'</span><span style="' +
style + '">' + value + '</span><br>'
}
return tip
// params is empty
if (!params.length) return params
// else return params
// params is unempty
let tip = ''
let value // value on cursor
const param = params[0]// find coressonding parameter to the channel
const style = 'color: ' + param.color
const [xTable, yTable] = tableRouter.getTable(controlPanel.x.type, controlPanel.x.funct, controlPanel.y.type, controlPanel.y.funct) // unit is store in this object
// (Default) Time
if (controlPanel.x.type === 'Time') {
value = getTime(parseFloat(param.value[0]))
} else {
value = getTime(parseFloat(param.value[2]))
}
tip += '<span style="color: #000000">' + 'Time: ' + value + '</span><br>'
// (Manual) Voltage, Current, Resistance
tip += '<span style="' + style + '">' + param.seriesName + ':<ul style = "list-style-type: disc; list-style-position: inside">'
if (controlPanel.x.type !== 'Time') {
value = parseFloat(param.value[0] / xTable.option[controlPanel.x.unit]).toFixed(3) + ' ' + controlPanel.x.unit
tip += '<li>' + xTable.name + ' = ' + value + '</li>'
}
if (controlPanel.y.type !== 'Time') {
value = parseFloat(param.value[1] / yTable.option[controlPanel.y.unit]).toFixed(3) + ' ' + controlPanel.y.unit
tip += '<li>' + yTable.name + ' = ' + value + '</li>'
}
tip += '</ul></span>'
return tip
},
}
}
+2 -2
View File
@@ -50,7 +50,7 @@ function newTooltip (realTime, dataMode) {
} else {
value = getTime(parseFloat(params[0].value[timeIndex]))
}
tip += '<span style="color: #5193f2">' + 'Time: ' + value + '</span><br>'
tip += '<span style="color: #000000">' + 'Time: ' + value + '</span><br>'
// (Manual) Voltage, Current, Impedance
for (let gridIndex = 0; gridIndex < realTime.length; gridIndex++) {
for (let channelIndex = 0; channelIndex < realTime[gridIndex].length; channelIndex++) {
@@ -60,7 +60,7 @@ function newTooltip (realTime, dataMode) {
unitTable = realTime[gridIndex][channelIndex]
style = 'color: ' + param.color
tip += '<span style="' + style + '">' + param.seriesName + ':<ul style = "list-style-type: disc; list-style-position: inside">'
tip += '<span style="' + style + '">' + param.seriesName + ':<ul style = "list-style-type: disc; list-style-position: inside">'
if (unitTable.xName !== 'Time') {
value = parseFloat(param.value[0] / unitTable.xScale[unitTable.xUnit]).toFixed(3) + unitTable.xUnit
tip += '<li>' + unitTable.xName + ' = ' + value + '</li>'
@@ -113,16 +113,16 @@ function getLegendName (sourceList) {
case 'Elite':
switch (source.channel) {
case 1:
legendName += '' + source.id + '-I'
legendName += '' + source.id + 'I'
break
case 2:
legendName += '' + source.id + '-V'
legendName += '' + source.id + 'V'
break
case 3:
legendName += '' + source.id + '-R'
legendName += '' + source.id + 'R'
break
case 4:
legendName += '' + source.id + '-Cycle'
legendName += '' + source.id + 'Cycle'
break
default:
legendName += '' + source.id + 'CH' + source.channel
@@ -132,28 +132,28 @@ function getLegendName (sourceList) {
case 'EliteEIS':
switch (source.channel) {
case 3:
legendName += '' + source.id + '-Frequency'
legendName += '' + source.id + 'Frequency'
break
case 4:
legendName += '' + source.id + '-Cycle'
legendName += '' + source.id + 'Cycle'
break
case 5:
legendName += '' + source.id + '-Z_imag'
legendName += '' + source.id + 'Z-imag'
break
case 6:
legendName += '' + source.id + '-Z_real'
legendName += '' + source.id + 'Z-real'
break
case 7:
legendName += '' + source.id + '-Impedance'
legendName += '' + source.id + 'Impedance'
break
case 8:
legendName += '' + source.id + '-Phase'
legendName += '' + source.id + 'Phase'
break
case 9:
legendName += '' + source.id + '-Current'
legendName += '' + source.id + 'Current'
break
case 10:
legendName += '' + source.id + '-Gain Level'
legendName += '' + source.id + 'Gain Level'
break
default:
legendName += '' + source.id + 'CH' + source.channel
@@ -210,7 +210,7 @@ const actions = {
if (payload.chartAllData[payload.chartID] == null) {
payload.chartAllData[payload.chartID] = newChart(payload.chartID)
if (payload.type !== 'overview') {
payload.chartAllData[payload.chartID].tooltip = newTooltip()
payload.chartAllData[payload.chartID].tooltip = newTooltip(state.controlPanel)
}
payload.chartAllData[payload.chartID].chartType = payload.type
payload.chartAllData[payload.chartID].chartDevice = payload.device
@@ -375,7 +375,7 @@ const actions = {
switch (sourceList[0].name) {
case 'Time':
xAxisType = 'time'
xAxisType = 'value'
xAxisSource = [-1, -1]
break
default:
@@ -1,4 +1,5 @@
import types from '@/store/modules/analysis/replay/types'
import { tableRouter } from '@/components/analysis/replay/toolbox/EliteReplayTable'
const typePath = types.chart
@@ -33,16 +34,16 @@ function getLegendName (sourceList) {
case 'Elite':
switch (source.channel) {
case 1:
legendName += '' + source.id + '-I'
legendName += '' + source.id + 'I'
break
case 2:
legendName += '' + source.id + '-V'
legendName += '' + source.id + 'V'
break
case 3:
legendName += '' + source.id + '-R'
legendName += '' + source.id + 'R'
break
case 4:
legendName += '' + source.id + '-Cycle'
legendName += '' + source.id + 'Cycle'
break
default:
legendName += '' + source.id + 'CH' + source.channel
@@ -52,28 +53,28 @@ function getLegendName (sourceList) {
case 'EliteEIS':
switch (source.channel) {
case 3:
legendName += '' + source.id + '-Frequency'
legendName += '' + source.id + 'Frequency'
break
case 4:
legendName += '' + source.id + '-Cycle'
legendName += '' + source.id + 'Cycle'
break
case 5:
legendName += '' + source.id + '-Z_imag'
legendName += '' + source.id + 'Z-imag'
break
case 6:
legendName += '' + source.id + '-Z_real'
legendName += '' + source.id + 'Z-real'
break
case 7:
legendName += '' + source.id + '-Impedance'
legendName += '' + source.id + 'Impedance'
break
case 8:
legendName += '' + source.id + '-Phase'
legendName += '' + source.id + 'Phase'
break
case 9:
legendName += '' + source.id + '-Current'
legendName += '' + source.id + 'Current'
break
case 10:
legendName += '' + source.id + '-Gain Level'
legendName += '' + source.id + 'Gain-Level'
break
default:
legendName += '' + source.id + 'CH' + source.channel
@@ -99,71 +100,99 @@ const chartMutations = {
* @param {int} axisIndex
* @param {int} channel // use for checking whether it is 3-axis
*/
// [typePath.updateAxisLabel]: (state, payload) => {
// let unit // string
// let unitScale // int
// let axisLabel
// if (payload.axis === 'x') {
// unit = state.valueFormatX.unit
// unitScale = state.valueFormatX.unitScale
// axisLabel = state.chartData[payload.chartID].xAxis[payload.axisIndex].axisLabel
// } else if (payload.axis === 'y') {
// unit = state.valueFormatY.unit
// unitScale = state.valueFormatY.unitScale
// axisLabel = state.chartData[payload.chartID].yAxis[payload.axisIndex].axisLabel
// }
// if (payload.channel < 256) {
// axisLabel.formatter = function (val) {
// let label = ''
// if (unit === 'auto') { // time
// const hour = parseInt(val / 3.6e9)
// const minute = parseInt((val % 3.6e9) / 1000000 / 60)
// const second = parseInt((val % 6e7) / 1000000)
// const millisecond = parseInt((val % 1e6) / 1000)
// if (hour > 0) {
// label += hour + ' h '
// }
// if (minute > 0) {
// label += minute + ' m '
// }
// if (second > 0) {
// label += second + ' s '
// }
// if (millisecond > 0) {
// label += millisecond + ' ms '
// }
// } else { // not time, e.g. I, V, R
// const num = String(val / unitScale)
// label = num + unit
// }
// return label
// }
// } else { // 256: x, 257: y, 258: z, 259: mag
// axisLabel.formatter = function (val) {
// let label = ''
// if (unit === 'auto') { // time
// const hour = parseInt(val / 3.6e9)
// const minute = parseInt((val % 3.6e9) / 1000000 / 60)
// const second = parseInt((val % 6e7) / 1000000)
// const millisecond = parseInt((val % 1e6) / 1000)
// if (hour > 0) {
// label += hour + ' h '
// }
// if (minute > 0) {
// label += minute + ' m '
// }
// if (second > 0) {
// label += second + ' s '
// }
// if (millisecond > 0) {
// label += millisecond + ' ms '
// }
// } else {
// label = val.toFixed(3)
// }
// return label
// }
// }
// tang: try here
[typePath.updateAxisLabel]: (state, payload) => {
let unit // string
let unitScale // int
let axisLabel
let unitScale
const unit = state.controlPanel[payload.axis].unit
const [xTable, yTable] = tableRouter.getTable(state.controlPanel.x.type, state.controlPanel.x.funct, state.controlPanel.y.type, state.controlPanel.y.funct)
if (payload.axis === 'x') {
unit = state.valueFormatX.unit
unitScale = state.valueFormatX.unitScale
axisLabel = state.chartData[payload.chartID].xAxis[payload.axisIndex].axisLabel
} else if (payload.axis === 'y') {
unit = state.valueFormatY.unit
unitScale = state.valueFormatY.unitScale
unitScale = xTable.option[unit]
} else {
axisLabel = state.chartData[payload.chartID].yAxis[payload.axisIndex].axisLabel
unitScale = yTable.option[unit]
}
if (payload.channel < 256) {
axisLabel.formatter = function (val) {
let label = ''
if (unit === 'auto') { // time
const hour = parseInt(val / 3.6e9)
const minute = parseInt((val % 3.6e9) / 1000000 / 60)
const second = parseInt((val % 6e7) / 1000000)
const millisecond = parseInt((val % 1e6) / 1000)
if (hour > 0) {
label += hour + ' h '
}
if (minute > 0) {
label += minute + ' m '
}
if (second > 0) {
label += second + ' s '
}
if (millisecond > 0) {
label += millisecond + ' ms '
}
} else { // not time, e.g. I, V, R
const num = String(val / unitScale)
label = num + unit
}
return label
}
} else { // 256: x, 257: y, 258: z, 259: mag
axisLabel.formatter = function (val) {
let label = ''
if (unit === 'auto') { // time
const hour = parseInt(val / 3.6e9)
const minute = parseInt((val % 3.6e9) / 1000000 / 60)
const second = parseInt((val % 6e7) / 1000000)
const millisecond = parseInt((val % 1e6) / 1000)
if (hour > 0) {
label += hour + ' h '
}
if (minute > 0) {
label += minute + ' m '
}
if (second > 0) {
label += second + ' s '
}
if (millisecond > 0) {
label += millisecond + ' ms '
}
} else {
label = val.toFixed(3)
}
const _axisLabel = JSON.parse(JSON.stringify(axisLabel))
if (unit === 'auto') {
_axisLabel.formatter = tableRouter.autoTimeFormatter
} else {
_axisLabel.formatter = function (val) {
const label = (val / unitScale).toFixed(3) + unit
return label
}
}
if (payload.axis === 'x') {
state.chartData[payload.chartID].xAxis[payload.axisIndex].axisLabel = _axisLabel
} else {
state.chartData[payload.chartID].yAxis[payload.axisIndex].axisLabel = _axisLabel
}
},
/**
@@ -35,6 +35,20 @@ function newState () {
showWhichCycles: '1',
useSdCardData: false,
isLockDataZoom: false,
controlPanel: {
x: {
type: null,
channel: null,
unit: null,
funct: null,
},
y: {
type: null,
channel: null,
unit: null,
funct: null,
},
},
}
}
@@ -80,6 +80,7 @@ const projectActs = {
await api.project.update(project.id, { deleted: true })
await api.project.del()
state.projectList.splice(index, 1)
state.projectSelectIndex = -1
return true
},
@@ -90,7 +91,15 @@ const projectActs = {
*/
[typePath.addDevice]: async ({ state, getters, commit }, payload) => {
const { device } = payload
getters.getSelectProject.device.push(device)
// console.log(getters.getSelectProject.device)
let flag = false
for (const eachDevice of getters.getSelectProject.device) {
if (device.connectDevice.mac_address === eachDevice.connectDevice.mac_address) {
flag = true
break
}
}
if (!flag) getters.getSelectProject.device.push(device)
},
/**
@@ -1046,7 +1046,7 @@ const chartActs = {
state.chartData[chartID].mappingID = '-1'
}
if (cardName == null) {
state.chartData[chartID].cardName = 'chart' + String(chartID)
state.chartData[chartID].cardName = 'Chart' + String(chartID)
}
state.chartData[chartID].dataZoom = null
dispatch(typePath.updateGridList, { chartID: chartID, length: 1 })
@@ -1061,10 +1061,24 @@ const chartActs = {
*/
[typePath.resetSeriesData]: ({ state, getters, commit, dispatch }, payload) => {
const { chartID, mappingID } = payload
// check chart need to reset or not
if (String(mappingID) === String(state.chartData[chartID].mappingID)) {
// reset series data
for (const i in state.chartData[chartID].series) {
state.chartData[chartID].series[i].data.length = 0
}
// reset databuffer
const databuffer = dataStreamBuffer.getByChartID(chartID)
if (databuffer) {
for (const device in databuffer) {
// console.log('device', device)
for (const channel in databuffer[device]) {
// console.log('channel', channel, databuffer[device][channel])
databuffer[device][channel].length = 0
}
}
}
}
},
/**