完成程序设计和运行

main
JayChou 2 months ago
parent 54664b5459
commit 89c63b9606
  1. 11
      package.json
  2. 204
      pnpm-lock.yaml
  3. BIN
      src/assets/images/TCP.png
  4. BIN
      src/assets/images/boolean.png
  5. BIN
      src/assets/images/dianchizu.png
  6. BIN
      src/assets/images/error.png
  7. BIN
      src/assets/images/fuwuqiIP.png
  8. BIN
      src/assets/images/fuwuqiProt.png
  9. BIN
      src/assets/images/guanxitu.png
  10. BIN
      src/assets/images/openTCP.png
  11. BIN
      src/assets/images/setTCP.png
  12. BIN
      src/assets/images/setzijie.png
  13. BIN
      src/assets/images/swatch.png
  14. BIN
      src/assets/images/thermometer.png
  15. BIN
      src/assets/images/valueSetting.png
  16. 1
      src/assets/images/vue.svg
  17. BIN
      src/assets/images/wenduyibiao.png
  18. BIN
      src/assets/images/zhuanhuanqi.png
  19. 47
      src/router/index.ts
  20. 59
      src/store/modules/setting.ts
  21. 21
      src/views/designRoute/components/RH.vue
  22. 23
      src/views/designRoute/components/TCP.vue
  23. 32
      src/views/designRoute/components/booleanCopm.vue
  24. 23
      src/views/designRoute/components/dianchizu.vue
  25. 21
      src/views/designRoute/components/du.vue
  26. 32
      src/views/designRoute/components/error.vue
  27. 32
      src/views/designRoute/components/fuwiqiIP.vue
  28. 32
      src/views/designRoute/components/fuwuqiProt.vue
  29. 24
      src/views/designRoute/components/i.vue
  30. 26
      src/views/designRoute/components/number10.vue
  31. 23
      src/views/designRoute/components/number2.vue
  32. 32
      src/views/designRoute/components/openTCP.vue
  33. 26
      src/views/designRoute/components/sanjiao.vue
  34. 32
      src/views/designRoute/components/setTCP.vue
  35. 32
      src/views/designRoute/components/setzijie.vue
  36. 21
      src/views/designRoute/components/shidu.vue
  37. 32
      src/views/designRoute/components/shiduNumber.vue
  38. 32
      src/views/designRoute/components/shiduValueSetting.vue
  39. 47
      src/views/designRoute/components/shiduZK.vue
  40. 23
      src/views/designRoute/components/swatch.vue
  41. 249
      src/views/designRoute/components/test.vue
  42. 72
      src/views/designRoute/components/wenBenYu.vue
  43. 72
      src/views/designRoute/components/wenBenYu2.vue
  44. 21
      src/views/designRoute/components/wendu.vue
  45. 32
      src/views/designRoute/components/wenduNumber.vue
  46. 32
      src/views/designRoute/components/wenduValueSetting.vue
  47. 32
      src/views/designRoute/components/wenduYibiao.vue
  48. 47
      src/views/designRoute/components/wenduZK.vue
  49. 32
      src/views/designRoute/components/wenduji.vue
  50. 23
      src/views/designRoute/components/zhuanhuanqi.vue
  51. 1037
      src/views/designRoute/index.vue
  52. 4
      src/views/largeDataScreen/home.vue
  53. 250
      src/views/program/components/test.vue
  54. 282
      src/views/program/components/yibiao.vue
  55. 1188
      src/views/program/index.vue

@ -9,9 +9,20 @@
"preview": "vite preview"
},
"dependencies": {
"@antv/x6": "^2.18.1",
"@antv/x6-plugin-clipboard": "^2.1.6",
"@antv/x6-plugin-history": "^2.2.4",
"@antv/x6-plugin-keyboard": "^2.2.3",
"@antv/x6-plugin-selection": "^2.2.2",
"@antv/x6-plugin-snapline": "^2.1.7",
"@antv/x6-plugin-stencil": "^2.1.5",
"@antv/x6-plugin-transform": "^2.1.8",
"@antv/x6-vue-shape": "^2.1.2",
"@kjgl77/datav-vue3": "^1.7.3",
"axios": "^1.7.2",
"echarts": "^5.6.0",
"element-plus": "^2.9.5",
"insert-css": "^2.0.0",
"lib-flexible": "^0.3.2",
"pinia": "^2.1.7",
"postcss-plugin-px2rem": "^0.8.1",

@ -8,15 +8,48 @@ importers:
.:
dependencies:
'@antv/x6':
specifier: ^2.18.1
version: 2.18.1
'@antv/x6-plugin-clipboard':
specifier: ^2.1.6
version: 2.1.6(@antv/x6@2.18.1)
'@antv/x6-plugin-history':
specifier: ^2.2.4
version: 2.2.4(@antv/x6@2.18.1)
'@antv/x6-plugin-keyboard':
specifier: ^2.2.3
version: 2.2.3(@antv/x6@2.18.1)
'@antv/x6-plugin-selection':
specifier: ^2.2.2
version: 2.2.2(@antv/x6@2.18.1)
'@antv/x6-plugin-snapline':
specifier: ^2.1.7
version: 2.1.7(@antv/x6@2.18.1)
'@antv/x6-plugin-stencil':
specifier: ^2.1.5
version: 2.1.5(@antv/x6@2.18.1)
'@antv/x6-plugin-transform':
specifier: ^2.1.8
version: 2.1.8(@antv/x6@2.18.1)
'@antv/x6-vue-shape':
specifier: ^2.1.2
version: 2.1.2(@antv/x6@2.18.1)(vue@3.4.29(typescript@5.2.2))
'@kjgl77/datav-vue3':
specifier: ^1.7.3
version: 1.7.3(vue@3.4.29(typescript@5.2.2))
axios:
specifier: ^1.7.2
version: 1.7.2
echarts:
specifier: ^5.6.0
version: 5.6.0
element-plus:
specifier: ^2.9.5
version: 2.9.5(vue@3.4.29(typescript@5.2.2))
insert-css:
specifier: ^2.0.0
version: 2.0.0
lib-flexible:
specifier: ^0.3.2
version: 0.3.2
@ -69,6 +102,65 @@ importers:
packages:
'@antv/x6-common@2.0.17':
resolution: {integrity: sha512-37g7vmRkNdYzZPdwjaMSZEGv/MMH0S4r70/Jwoab1mioycmuIBN73iyziX8m56BvJSDucZ3J/6DU07otWqzS6A==}
'@antv/x6-geometry@2.0.5':
resolution: {integrity: sha512-MId6riEQkxphBpVeTcL4ZNXL4lScyvDEPLyIafvWMcWNTGK0jgkK7N20XSzqt8ltJb0mGUso5s56mrk8ysHu2A==}
'@antv/x6-plugin-clipboard@2.1.6':
resolution: {integrity: sha512-roZPLnZx6PK8MBvee0QMo90fz/TXeF0WNe4EGin2NBq5M1I5XTWrYvA6N2XVIiWAAI67gjQeEE8TpkL7f8QdqA==}
peerDependencies:
'@antv/x6': ^2.x
'@antv/x6-plugin-dnd@2.1.1':
resolution: {integrity: sha512-v0szzik1RkadPDn4Qi5mOSaB2AeI78D40/YuCYbPVzplG+HydGsHwO3MLTgJPQ+R5n0eM0W5F850p1VfTOHR7g==}
peerDependencies:
'@antv/x6': ^2.x
'@antv/x6-plugin-history@2.2.4':
resolution: {integrity: sha512-9gHHvEW4Fla+1hxUV49zNgJyIMoV9CjVM52MrFgAJcvyRn1Kvxz4MfxiKlG+DEZUs+/zvfjl9pS6gJOd8laRkg==}
peerDependencies:
'@antv/x6': ^2.x
'@antv/x6-plugin-keyboard@2.2.3':
resolution: {integrity: sha512-pnCIC+mDyKKfkcDyLePfGxKVIqXBcldTgannITkHC1kc0IafRS1GMvzpvuDGrM5haRYd6Nwz8kjkJyHkJE4GPA==}
peerDependencies:
'@antv/x6': ^2.x
'@antv/x6-plugin-selection@2.2.2':
resolution: {integrity: sha512-s2gtR9Onlhr7HOHqyqg0d+4sG76JCcQEbvrZZ64XmSChlvieIPlC3YtH4dg1KMNhYIuBmBmpSum6S0eVTEiPQw==}
peerDependencies:
'@antv/x6': ^2.x
'@antv/x6-plugin-snapline@2.1.7':
resolution: {integrity: sha512-AsysoCb9vES0U2USNhEpYuO/W8I0aYfkhlbee5Kt4NYiMfQfZKQyqW/YjDVaS2pm38C1NKu1LdPVk/BBr4CasA==}
peerDependencies:
'@antv/x6': ^2.x
'@antv/x6-plugin-stencil@2.1.5':
resolution: {integrity: sha512-q7wx7XRMFkUKPv3WsHkvZda6O1GW+6q6H/+c1lcrwlQoEKOFv1Djc4Hu2J4SGhV2z98P2JLfVJiT5m7YoOoCHw==}
peerDependencies:
'@antv/x6': ^2.x
'@antv/x6-plugin-transform@2.1.8':
resolution: {integrity: sha512-GvJuiJ4BKp0H7+qx3R1I+Vzbw5gXp9+oByXo/WyVxE3urOC7LC5sqnaDfIjyYMN6ROLPYPZraLSeSyYBgMgcDw==}
peerDependencies:
'@antv/x6': ^2.x
'@antv/x6-vue-shape@2.1.2':
resolution: {integrity: sha512-lfLNJ2ztK8NP2JBAWTD6m5Wol0u6tOqj2KdOhWZoT8EtEw9rMmAdxsr8uTi9MRJO9pDMM0nbsR3cidnMh7VeDQ==}
peerDependencies:
'@antv/x6': ^2.x
'@vue/composition-api': ^1.0.0-rc.1
vue: ^2.0.0 || >=3.0.0
peerDependenciesMeta:
'@vue/composition-api':
optional: true
'@antv/x6@2.18.1':
resolution: {integrity: sha512-FkWdbLOpN9J7dfJ+kiBxzowSx2N6syBily13NMVdMs+wqC6Eo5sLXWCZjQHateTFWgFw7ZGi2y9o3Pmdov1sXw==}
'@babel/helper-string-parser@7.24.7':
resolution: {integrity: sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==}
engines: {node: '>=6.9.0'}
@ -573,6 +665,9 @@ packages:
domutils@3.1.0:
resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==}
echarts@5.6.0:
resolution: {integrity: sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==}
element-plus@2.9.5:
resolution: {integrity: sha512-r+X79oogLbYq8p9L5f9fHSHhUFNM0AL72aikqiZVxSc2/08mK6m/PotiB9e/D90QmWTIHIaFnFmW65AcXmneig==}
peerDependencies:
@ -677,6 +772,9 @@ packages:
inherits@2.0.4:
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
insert-css@2.0.0:
resolution: {integrity: sha512-xGq5ISgcUP5cvGkS2MMFLtPDBtrtQPSFfC6gA6U8wHKqfjTIMZLZNxOItQnoSjdOzlXOLU/yD32RKC4SvjNbtA==}
is-binary-path@2.1.0:
resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
engines: {node: '>=8'}
@ -750,6 +848,9 @@ packages:
minimist@1.2.8:
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
mousetrap@1.6.5:
resolution: {integrity: sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA==}
nanoid@3.3.7:
resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
@ -937,6 +1038,9 @@ packages:
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
engines: {node: '>=8.0'}
tslib@2.3.0:
resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==}
typescript@5.2.2:
resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==}
engines: {node: '>=14.17'}
@ -949,6 +1053,10 @@ packages:
resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==}
deprecated: Please see https://github.com/lydell/urix#deprecated
utility-types@3.11.0:
resolution: {integrity: sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==}
engines: {node: '>= 4'}
vite@5.3.1:
resolution: {integrity: sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==}
engines: {node: ^18.0.0 || >=20.0.0}
@ -980,6 +1088,17 @@ packages:
vscode-uri@3.0.8:
resolution: {integrity: sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==}
vue-demi@0.14.10:
resolution: {integrity: sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==}
engines: {node: '>=12'}
hasBin: true
peerDependencies:
'@vue/composition-api': ^1.0.0-rc.1
vue: ^3.0.0-0 || ^2.6.0
peerDependenciesMeta:
'@vue/composition-api':
optional: true
vue-demi@0.14.8:
resolution: {integrity: sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==}
engines: {node: '>=12'}
@ -1016,8 +1135,64 @@ packages:
wrappy@1.0.2:
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
zrender@5.6.1:
resolution: {integrity: sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==}
snapshots:
'@antv/x6-common@2.0.17':
dependencies:
lodash-es: 4.17.21
utility-types: 3.11.0
'@antv/x6-geometry@2.0.5': {}
'@antv/x6-plugin-clipboard@2.1.6(@antv/x6@2.18.1)':
dependencies:
'@antv/x6': 2.18.1
'@antv/x6-plugin-dnd@2.1.1(@antv/x6@2.18.1)':
dependencies:
'@antv/x6': 2.18.1
'@antv/x6-plugin-history@2.2.4(@antv/x6@2.18.1)':
dependencies:
'@antv/x6': 2.18.1
'@antv/x6-plugin-keyboard@2.2.3(@antv/x6@2.18.1)':
dependencies:
'@antv/x6': 2.18.1
mousetrap: 1.6.5
'@antv/x6-plugin-selection@2.2.2(@antv/x6@2.18.1)':
dependencies:
'@antv/x6': 2.18.1
'@antv/x6-plugin-snapline@2.1.7(@antv/x6@2.18.1)':
dependencies:
'@antv/x6': 2.18.1
'@antv/x6-plugin-stencil@2.1.5(@antv/x6@2.18.1)':
dependencies:
'@antv/x6': 2.18.1
'@antv/x6-plugin-dnd': 2.1.1(@antv/x6@2.18.1)
'@antv/x6-plugin-transform@2.1.8(@antv/x6@2.18.1)':
dependencies:
'@antv/x6': 2.18.1
'@antv/x6-vue-shape@2.1.2(@antv/x6@2.18.1)(vue@3.4.29(typescript@5.2.2))':
dependencies:
'@antv/x6': 2.18.1
vue: 3.4.29(typescript@5.2.2)
vue-demi: 0.14.10(vue@3.4.29(typescript@5.2.2))
'@antv/x6@2.18.1':
dependencies:
'@antv/x6-common': 2.0.17
'@antv/x6-geometry': 2.0.5
utility-types: 3.11.0
'@babel/helper-string-parser@7.24.7': {}
'@babel/helper-validator-identifier@7.24.7': {}
@ -1327,7 +1502,7 @@ snapshots:
'@types/web-bluetooth': 0.0.20
'@vueuse/metadata': 10.11.0
'@vueuse/shared': 10.11.0(vue@3.4.29(typescript@5.2.2))
vue-demi: 0.14.8(vue@3.4.29(typescript@5.2.2))
vue-demi: 0.14.10(vue@3.4.29(typescript@5.2.2))
transitivePeerDependencies:
- '@vue/composition-api'
- vue
@ -1337,7 +1512,7 @@ snapshots:
'@types/web-bluetooth': 0.0.16
'@vueuse/metadata': 9.13.0
'@vueuse/shared': 9.13.0(vue@3.4.29(typescript@5.2.2))
vue-demi: 0.14.8(vue@3.4.29(typescript@5.2.2))
vue-demi: 0.14.10(vue@3.4.29(typescript@5.2.2))
transitivePeerDependencies:
- '@vue/composition-api'
- vue
@ -1348,14 +1523,14 @@ snapshots:
'@vueuse/shared@10.11.0(vue@3.4.29(typescript@5.2.2))':
dependencies:
vue-demi: 0.14.8(vue@3.4.29(typescript@5.2.2))
vue-demi: 0.14.10(vue@3.4.29(typescript@5.2.2))
transitivePeerDependencies:
- '@vue/composition-api'
- vue
'@vueuse/shared@9.13.0(vue@3.4.29(typescript@5.2.2))':
dependencies:
vue-demi: 0.14.8(vue@3.4.29(typescript@5.2.2))
vue-demi: 0.14.10(vue@3.4.29(typescript@5.2.2))
transitivePeerDependencies:
- '@vue/composition-api'
- vue
@ -1479,6 +1654,11 @@ snapshots:
domelementtype: 2.3.0
domhandler: 5.0.3
echarts@5.6.0:
dependencies:
tslib: 2.3.0
zrender: 5.6.1
element-plus@2.9.5(vue@3.4.29(typescript@5.2.2)):
dependencies:
'@ctrl/tinycolor': 3.6.1
@ -1609,6 +1789,8 @@ snapshots:
inherits@2.0.4: {}
insert-css@2.0.0: {}
is-binary-path@2.1.0:
dependencies:
binary-extensions: 2.3.0
@ -1673,6 +1855,8 @@ snapshots:
minimist@1.2.8: {}
mousetrap@1.6.5: {}
nanoid@3.3.7: {}
natives@1.1.6: {}
@ -1836,12 +2020,16 @@ snapshots:
dependencies:
is-number: 7.0.0
tslib@2.3.0: {}
typescript@5.2.2: {}
undici-types@5.26.5: {}
urix@0.1.0: {}
utility-types@3.11.0: {}
vite@5.3.1(@types/node@20.14.9)(sass@1.77.6):
dependencies:
esbuild: 0.21.5
@ -1854,6 +2042,10 @@ snapshots:
vscode-uri@3.0.8: {}
vue-demi@0.14.10(vue@3.4.29(typescript@5.2.2)):
dependencies:
vue: 3.4.29(typescript@5.2.2)
vue-demi@0.14.8(vue@3.4.29(typescript@5.2.2)):
dependencies:
vue: 3.4.29(typescript@5.2.2)
@ -1886,3 +2078,7 @@ snapshots:
typescript: 5.2.2
wrappy@1.0.2: {}
zrender@5.6.1:
dependencies:
tslib: 2.3.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -1,27 +1,36 @@
import { createRouter, createWebHashHistory } from "vue-router";
import layout from '@/layout/index.vue'
const routerList :any = [
import layout from "@/layout/index.vue";
const routerList: any = [
{
path: "/",
component: layout,
children:[
children: [
{
path:'',
name:'Home',
component:() => import('@/views/largeDataScreen/home.vue')
path: "",
name: "Home",
component: () => import("@/views/largeDataScreen/home.vue"),
},
]
{
path: "designRoute",
name: "DesignRoute",
component: () => import("@/views/designRoute/index.vue"),
},
{
path: "program",
name: "Program",
component: () => import("@/views/program/index.vue"),
}
],
},
];
const router :any = createRouter({
history: createWebHashHistory(),
routes: routerList,
scrollBehavior() {
return {
left: 0,
top: 0,
}
},
})
export default router
const router: any = createRouter({
history: createWebHashHistory(),
routes: routerList,
scrollBehavior() {
return {
left: 0,
top: 0,
};
},
});
export default router;

@ -1,14 +1,69 @@
import { defineStore } from "pinia"
import { defineStore } from "pinia";
const settingStore = defineStore("settingStore", {
state: ():any => {
state: (): any => {
return {
title: "虚拟仿真实验项目",
qw: 0, // 气温
zl: 0, // 质量
srmj: 0, // 散热面积
jrgl: 0, // 加热功率
wdsz: 0, // 温度数值
ip: "", // ip
port: "", // 端口
cssd: 0, // 初始湿度
jsgl: 0, // 加湿功率
jsmj: 0, // 加湿面积
sdsz: 0, // 湿度数值
falg: false,
timer: null,
};
},
actions: {
setTitle(name: any) {
this.title = name;
},
setQw(value: number) {
console.log(value);
this.qw = value;
},
setValue(value: number, name: string) {
this[name] = value;
},
openHeating() {
this.flag = !this.flag; // 切换状态
if (this.flag) {
// 开启加热
this.timer = setInterval(() => {
this.qw++;
if (this.qw >= 100) {
clearInterval(this.timer);
}
}, 500);
} else {
// 关闭加热
clearInterval(this.timer);
}
},
calculateTemperature() {
this.qw >= 0 ? this.qw=1 : this.qw;
const a = (100000 * this.zl * this.srmj) / this.jrgl;
let time = 0;
let currentTemp = this.qw;
const interval = setInterval(() => {
currentTemp = (1 - Math.exp(-time / a)) * 100 + this.qw;
console.log(`时间: ${time}s, 温度: ${currentTemp.toFixed(2)}°C`);
this.qw = currentTemp >= 100 ? 100 : currentTemp;
if (currentTemp >= 100) {
console.log("温度达到 100°C, 停止加热!");
clearInterval(interval);
}
time += 1; // 每秒增加 1s
}, 1000);
},
},
});

@ -0,0 +1,21 @@
<template>
<div class="main">
%RH
</div>
</template>
<script setup>
</script>
<style scoped >
.main{
width: 40px;
height: 20px;
color: #fff;
border: 1px solid #d83fce;
border-left: 3px solid #d83fce;
line-height: 20px;
}
</style>

@ -0,0 +1,23 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/TCP.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
}
</style>

@ -0,0 +1,32 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/boolean.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
}
.main::after{
content: "布尔";
display: block;
position: absolute;
width: 120px;
top: -35px;
left: -40px;
font-size: 12px;
color: #fff;
}
</style>

@ -0,0 +1,23 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/dianchizu.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 70px;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
}
</style>

@ -0,0 +1,21 @@
<template>
<div class="main">
</div>
</template>
<script setup>
</script>
<style scoped >
.main{
width: 20px;
height: 20px;
color: #fff;
border: 1px solid #d83fce;
border-left: 3px solid #d83fce;
line-height: 20px;
}
</style>

@ -0,0 +1,32 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/error.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
}
.main::after{
content: "错误输出";
display: block;
position: absolute;
width: 120px;
top: -35px;
left: -40px;
font-size: 12px;
color: #fff;
}
</style>

@ -0,0 +1,32 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/fuwuqiIP.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
}
.main::after{
content: "服务器IP地址";
display: block;
position: absolute;
width: 120px;
top: -35px;
left: -40px;
font-size: 12px;
color: #fff;
}
</style>

@ -0,0 +1,32 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/fuwuqiProt.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
}
.main::after{
content: "服务器端口号";
display: block;
position: absolute;
width: 120px;
top: -35px;
left: -40px;
font-size: 12px;
color: #fff;
}
</style>

@ -0,0 +1,24 @@
<template>
<div class="main">
i
</div>
</template>
<script setup>
import { ref, computed, nextTick, watch, onMounted } from "vue"
</script>
<style scoped >
.main{
width: 40px;
height: 40px;
border: 2px solid #0712ca;
text-align: center;
font-size: 20px;
line-height: 40px;
font-weight: 700;
color: #0712ca;
}
</style>

@ -0,0 +1,26 @@
<template>
<div class="main">
10
</div>
</template>
<script setup>
import { ref, computed, nextTick, watch, onMounted } from "vue"
</script>
<style scoped >
.main{
width: 40px;
height: 40px;
border: 2px solid #0712ca;
text-align: center;
font-size: 20px;
line-height: 40px;
font-weight: 700;
color: #0712ca;
}
</style>

@ -0,0 +1,23 @@
<template>
<div class="main">
2
</div>
</template>
<script setup>
</script>
<style scoped>
.main{
width: 20px;
height: 30px;
border: 2px solid #0712ca;
text-align: center;
font-size: 20px;
line-height: 30px;
font-weight: 700;
color: #0712ca;
}
</style>

@ -0,0 +1,32 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/openTCP.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
}
.main::after{
content: "打开TCP连接";
display: block;
position: absolute;
width: 120px;
top: -35px;
left: -40px;
font-size: 12px;
color: #fff;
}
</style>

@ -0,0 +1,26 @@
<template>
<div class="main"></div>
</template>
<script setup>
import { ref, computed, nextTick, watch, onMounted } from "vue";
</script>
<style scoped>
.main {
position: relative;
width: 0;
height: 0;
border-style: solid;
border-width: 20px 0 20px 34.6px;
border-color: transparent transparent transparent #c5d646;
}
.main::after {
content: "÷";
display: block;
position: absolute;
top: -15px;
left: -30px;
font-size: 22px;
}
</style>

@ -0,0 +1,32 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/setTCP.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
}
.main::after{
content: "写入TCP数据";
display: block;
position: absolute;
width: 120px;
top: -35px;
left: -40px;
font-size: 12px;
color: #fff;
}
</style>

@ -0,0 +1,32 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/setzijie.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
}
.main::after{
content: "写入的字节";
display: block;
position: absolute;
width: 120px;
top: -35px;
left: -40px;
font-size: 12px;
color: #fff;
}
</style>

@ -0,0 +1,21 @@
<template>
<div class="main">
湿度
</div>
</template>
<script setup>
</script>
<style scoped >
.main{
width: 60px;
height: 20px;
color: #fff;
border: 1px solid #d83fce;
border-left: 3px solid #d83fce;
line-height: 20px;
}
</style>

@ -0,0 +1,32 @@
<template>
<div class="main">
1.23
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
border: 2px solid #e5bc87;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
color: #e5bc87;
}
.main::after{
content: "湿度显示数值%RH";
display: block;
position: absolute;
width: 120px;
top: -35px;
left: -30px;
font-size: 12px;
color: #fff;
}
</style>

@ -0,0 +1,32 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/valueSetting.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
}
.main::after{
content: "湿度参数基本设置";
display: block;
position: absolute;
width: 120px;
top: -35px;
left: -40px;
font-size: 12px;
color: #fff;
}
</style>

@ -0,0 +1,47 @@
<template>
<div class="box">
<div class="left">
</div>
<div class="right">
<div class="item">初始湿度</div>
<div class="item">加湿功率W</div>
<div class="item">加湿面积</div>
</div>
</div>
</template>
<script setup>
import { ref, computed, nextTick, watch, onMounted } from "vue"
</script>
<style scoped >
.box{
width: 120px;
height: 84px;
display: flex;
}
.left{
width: 20px;
border: 1px solid #8f8f8f;
}
.right{
width: 84px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
}
.item{
width: 100%;
border: 1px solid #8f8f8f;
color: #fff;
}
</style>

@ -0,0 +1,23 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/swatch.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 20px;
height: 20px;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
}
</style>

@ -0,0 +1,249 @@
<template>
<div class="aaa">
<div id="main"></div>
</div>
</template>
<script setup>
import { onMounted, watch } from "vue";
import * as echarts from "echarts";
import settingStore from "../store/setting";
const useSettingStore = settingStore();
var value = useSettingStore.temperature;
var kd = [];
// 使35
for (var i = 0, len = 130; i <= len; i++) {
if (i > 100 || i < 30) {
kd.push("0");
} else {
if (i % 5 === 0) {
kd.push("5");
} else {
kd.push("3");
}
}
}
console.log(kd);
// 00-1000-1300-30
function getData(value) {
return [value + 30];
}
var myChart = null;
const initChart = () => {
var data = getData(value);
var mercuryColor = "#fd4d49";
var borderColor = "#fd4d49";
var option;
option = {
title: {
text: "温度计",
show: false,
},
yAxis: [
{
show: false,
min: 0,
max: 130,
},
{
show: false,
data: [],
min: 0,
max: 130,
},
],
xAxis: [
{
show: false,
data: [],
},
{
show: false,
data: [],
},
{
show: false,
data: [],
},
{
show: false,
min: -110,
max: 100,
},
],
series: [
{
name: "条",
type: "bar",
// XAxis
xAxisIndex: 0,
data: data,
barWidth: 18,
itemStyle: {
normal: {
color: mercuryColor,
barBorderRadius: 0,
},
},
label: {
normal: {
show: true,
position: "top",
formatter: function (param) {
// 00-1000-1300-30
return param.value - 30 + "°C";
},
textStyle: {
color: "#ccc",
fontSize: "10",
},
},
},
z: 2,
},
{
name: "白框",
type: "bar",
xAxisIndex: 1,
barGap: "-100%",
data: [129],
barWidth: 28,
itemStyle: {
normal: {
color: "#ffffff",
barBorderRadius: 50,
},
},
z: 1,
},
{
name: "外框",
type: "bar",
xAxisIndex: 2,
barGap: "-100%",
data: [130],
barWidth: 38,
itemStyle: {
normal: {
color: borderColor,
barBorderRadius: 50,
},
},
z: 0,
},
{
name: "圆",
type: "scatter",
hoverAnimation: false,
data: [0],
xAxisIndex: 0,
symbolSize: 48,
itemStyle: {
normal: {
color: mercuryColor,
opacity: 1,
},
},
z: 2,
},
{
name: "白圆",
type: "scatter",
hoverAnimation: false,
data: [0],
xAxisIndex: 1,
symbolSize: 60,
itemStyle: {
normal: {
color: "#ffffff",
opacity: 1,
},
},
z: 1,
},
{
name: "外圆",
type: "scatter",
hoverAnimation: false,
data: [0],
xAxisIndex: 2,
symbolSize: 70,
itemStyle: {
normal: {
color: borderColor,
opacity: 1,
},
},
z: 0,
},
{
name: "刻度",
type: "bar",
yAxisIndex: 1,
xAxisIndex: 3,
label: {
normal: {
show: true,
position: "right",
distance: 5,
color: "#525252",
fontSize: 10,
formatter: function (params) {
// 00-1000-1300-30
if (params.dataIndex > 100 || params.dataIndex < 30) {
return "";
} else {
if (params.dataIndex % 5 === 0) {
return params.dataIndex - 30;
} else {
return "";
}
}
},
},
},
barGap: "-100%",
data: kd,
barWidth: 1,
itemStyle: {
normal: {
color: borderColor,
barBorderRadius: 10,
},
},
z: 0,
},
],
};
var chartDom = document.getElementById("main");
myChart = echarts.init(chartDom);
option && myChart.setOption(option);
};
onMounted(() => {
initChart();
});
watch(
() => useSettingStore.temperature,
(newValue) => {
value=newValue
setTimeout(() => {
initChart();
}, 100);
}
);
</script>
<style scoped>
.aaa {
width: 320px;
height: 500px;
/* background-color: pink; */
}
#main {
width: 100%;
height: 100%;
}
</style>

@ -0,0 +1,72 @@
<template>
<div class="main">
<div class="t0">T0</div>
<div class="M">M</div>
<div class="S">S</div>
<div class="W">W</div>
<div class="t">t</div>
<div class="T">T</div>
<textarea type="textarea" style="width: 100%;height: 100%;border: none;font-size: 14px;line-height: 30px;" />
</div>
</template>
<script setup>
import { ref, computed, nextTick, watch, onMounted } from "vue";
</script>
<style scoped>
.main {
position: relative;
width: 200px;
height: 300px;
border: 5px solid #ccc;
}
.t0 {
position: absolute;
/* top: 5px; */
left: -25px;
border: 1px solid #ccc;
color: #fff;
}
.M {
position: absolute;
top: 55px;
left: -25px;
border: 1px solid #ccc;
color: #fff;
}
.S {
position: absolute;
top: 120px;
left: -17px;
border: 1px solid #ccc;
color: #fff;
}
.W{
position: absolute;
top: 180px;
left: -17px;
border: 1px solid #ccc;
color: #fff;
}
.t{
position: absolute;
top: 240px;
left: -17px;
border: 1px solid #ccc;
color: #fff;
}
.T{
position: absolute;
top: 50%;
right: -17px;
border: 1px solid #ccc;
color: #fff;
}
</style>

@ -0,0 +1,72 @@
<template>
<div class="main">
<div class="t0">R0</div>
<div class="M">S0</div>
<div class="S">W1</div>
<!-- <div class="W">W</div> -->
<div class="t">t1</div>
<div class="T">R</div>
<textarea type="textarea" style="width: 100%;height: 100%;border: none;font-size: 14px;line-height: 30px;" />
</div>
</template>
<script setup>
import { ref, computed, nextTick, watch, onMounted } from "vue";
</script>
<style scoped>
.main {
position: relative;
width: 200px;
height: 300px;
border: 5px solid #ccc;
}
.t0 {
position: absolute;
top: 5px;
left: -25px;
border: 1px solid #ccc;
color: #fff;
}
.M {
position: absolute;
top: 75px;
left: -25px;
border: 1px solid #ccc;
color: #fff;
}
.S {
position: absolute;
top: 150px;
left: -29px;
border: 1px solid #ccc;
color: #fff;
}
.W{
position: absolute;
top: 180px;
left: -17px;
border: 1px solid #ccc;
color: #fff;
}
.t{
position: absolute;
top: 230px;
left: -17px;
border: 1px solid #ccc;
color: #fff;
}
.T{
position: absolute;
top: 50%;
right: -17px;
border: 1px solid #ccc;
color: #fff;
}
</style>

@ -0,0 +1,21 @@
<template>
<div class="main">
温度
</div>
</template>
<script setup>
</script>
<style scoped >
.main{
width: 60px;
height: 20px;
color: #fff;
border: 1px solid #d83fce;
border-left: 3px solid #d83fce;
line-height: 20px;
}
</style>

@ -0,0 +1,32 @@
<template>
<div class="main">
1.23
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
border: 2px solid #e5bc87;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
color: #e5bc87;
}
.main::after{
content: "温度显示数值";
display: block;
position: absolute;
width: 120px;
top: -35px;
left: -30px;
font-size: 12px;
color: #fff;
}
</style>

@ -0,0 +1,32 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/valueSetting.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
}
.main::after{
content: "温度参数基本设置";
display: block;
position: absolute;
width: 120px;
top: -35px;
left: -40px;
font-size: 12px;
color: #fff;
}
</style>

@ -0,0 +1,32 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/wenduyibiao.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
}
.main::after{
content: "湿度仪表";
display: block;
position: absolute;
width: 120px;
top: -35px;
left: -40px;
font-size: 12px;
color: #fff;
}
</style>

@ -0,0 +1,47 @@
<template>
<div class="box">
<div class="left">
</div>
<div class="right">
<div class="item">初始温度</div>
<div class="item">质量Kg</div>
<div class="item">散热面积</div>
<div class="item">加热功率W</div>
</div>
</div>
</template>
<script setup>
import { ref, computed, nextTick, watch, onMounted } from "vue"
</script>
<style scoped >
.box{
width: 120px;
height: 100px;
display: flex;
}
.left{
width: 20px;
border: 1px solid #8f8f8f;
}
.right{
width: 100px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
}
.item{
width: 100%;
border: 1px solid #8f8f8f;
color: #fff;
}
</style>

@ -0,0 +1,32 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/thermometer.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
border: 2px solid #e5bc87;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
color: #e5bc87;
}
.main::after{
content: "温度计";
display: block;
position: absolute;
width: 120px;
top: -35px;
left: -40px;
font-size: 12px;
color: #fff;
}
</style>

@ -0,0 +1,23 @@
<template>
<div class="main">
<img style="width: 100%;height: 100%;" src="../../../assets/images/zhuanhuanqi.png" alt="" srcset="">
</div>
</template>
<script setup >
</script>
<style scoped >
.main{
position: relative;
width: 40px;
height: 40px;
text-align: center;
font-size: 16px;
line-height: 40px;
font-weight: 700;
}
</style>

File diff suppressed because it is too large Load Diff

@ -260,7 +260,7 @@
<div class="dialog-footer">
<el-button
@click="Installation = false"
style="background-color: #f3f3f3; color: #000; border-color: #ccc"
style="background-color: #f3f3f3; color: #fff; border-color: #ccc"
>上一步</el-button
>
<el-button
@ -273,7 +273,7 @@
<el-button
type="primary"
@click="Installation = false"
style="background-color: #f3f3f3; color: #000; border-color: #ccc"
style="background-color: #f3f3f3; color: #fff; border-color: #ccc"
>
取消
</el-button>

@ -0,0 +1,250 @@
<template>
<div class="aaa">
<div id="main"></div>
</div>
</template>
<script setup>
import { onMounted, watch } from "vue";
import * as echarts from "echarts";
import settingStore from "@/store/modules/setting";
const useSettingStore = settingStore();
var value = useSettingStore.qw;
var kd = [];
// 使35
for (var i = 0, len = 130; i <= len; i++) {
if (i > 130 || i < 30) {
kd.push("0");
} else {
if (i % 5 === 0) {
kd.push("5");
} else {
kd.push("3");
}
}
}
console.log(kd);
// 00-1000-1300-30
function getData(value) {
return [value + 30];
}
var myChart = null;
const initChart = () => {
var data = getData(value);
var mercuryColor = "#fd4d49";
var borderColor = "#fd4d49";
var option;
option = {
title: {
text: "温度计",
show: false,
},
yAxis: [
{
show: false,
min: 0,
max: 130,
},
{
show: false,
data: [],
min: 0,
max: 130,
},
],
xAxis: [
{
show: false,
data: [],
},
{
show: false,
data: [],
},
{
show: false,
data: [],
},
{
show: false,
min: -110,
max: 80,
},
],
series: [
{
name: "条",
type: "bar",
// XAxis
xAxisIndex: 0,
data: data,
barWidth: 18,
itemStyle: {
normal: {
color: mercuryColor,
barBorderRadius: 0,
},
},
// label: {
// normal: {
// show: true,
// position: "top",
// formatter: function (param) {
// // 00-1000-1300-30
// return param.value - 30 + "°C";
// },
// textStyle: {
// color: "#000",
// fontSize: "10",
// },
// },
// },
z: 2,
},
{
name: "白框",
type: "bar",
xAxisIndex: 1,
barGap: "-100%",
data: [129],
barWidth: 28,
itemStyle: {
normal: {
color: "#ffffff",
barBorderRadius: 50,
},
},
z: 1,
},
{
name: "外框",
type: "bar",
xAxisIndex: 2,
barGap: "-100%",
data: [130],
barWidth: 38,
itemStyle: {
normal: {
color: borderColor,
barBorderRadius: 50,
},
},
z: 0,
},
{
name: "圆",
type: "scatter",
hoverAnimation: false,
data: [0],
xAxisIndex: 0,
symbolSize: 48,
itemStyle: {
normal: {
color: mercuryColor,
opacity: 1,
},
},
z: 2,
},
{
name: "白圆",
type: "scatter",
hoverAnimation: false,
data: [0],
xAxisIndex: 1,
symbolSize: 60,
itemStyle: {
normal: {
color: "#ffffff",
opacity: 1,
},
},
z: 1,
},
{
name: "外圆",
type: "scatter",
hoverAnimation: false,
data: [0],
xAxisIndex: 2,
symbolSize: 70,
itemStyle: {
normal: {
color: borderColor,
opacity: 1,
},
},
z: 0,
},
{
name: "刻度",
type: "bar",
yAxisIndex: 1,
xAxisIndex: 3,
label: {
normal: {
show: true,
position: "right",
distance: 5,
color: "#fff",
fontSize: 10,
formatter: function (params) {
// 00-1000-1300-30
if (params.dataIndex > 130 || params.dataIndex < 30) {
return "";
} else {
if (params.dataIndex % 5 === 0) {
return params.dataIndex - 30;
} else {
return "";
}
}
},
},
},
barGap: "-100%",
data: kd,
barWidth: 1,
itemStyle: {
normal: {
color: borderColor,
barBorderRadius: 10,
},
},
z: 0,
},
],
};
var chartDom = document.getElementById("main");
myChart = echarts.init(chartDom);
option && myChart.setOption(option);
};
onMounted(() => {
initChart();
});
watch(
() => useSettingStore.qw,
(newValue) => {
value=newValue;
setTimeout(() => {
initChart();
}, 100);
}
);
</script>
<style scoped>
.aaa {
width: 350px;
height: 400px;
/* background-color: pink; */
}
#main {
width: 100%;
height: 100%;
}
</style>

@ -0,0 +1,282 @@
<template>
<div class="aaa">
<div id="chart"></div>
</div>
</template>
<script setup>
import { onMounted, watch } from "vue";
import * as echarts from "echarts";
import settingStore from "@/store/modules/setting";
const useSettingStore = settingStore();
var value = useSettingStore.cssd * 100;
var myChart = null;
const initChart = () => {
const option = {
backgroundColor: "transparent",
tooltip: {
formatter: "{b}{c}",
},
series: [
{
tooltip: {
show: false,
},
name: "wrap",
type: "pie",
hoverAnimation: false,
legendHoverLink: false,
center: ["50%", "60%"],
radius: ["0%", "7%"],
z: 5,
label: {
normal: {
show: false,
position: "center",
},
emphasis: {
show: false,
},
},
labelLine: {
normal: {
show: false,
},
},
data: [
{
value: 100,
itemStyle: {
normal: {
color: "#f2ee00",
},
emphasis: {
color: "#072B79",
},
},
},
],
},
{
tooltip: {
show: false,
},
name: "wrap",
type: "pie",
hoverAnimation: false,
legendHoverLink: false,
center: ["50%", "60%"],
radius: ["6%", "8%"],
z: 5,
label: {
normal: {
show: false,
position: "center",
},
emphasis: {
show: false,
},
},
labelLine: {
normal: {
show: false,
},
},
data: [
{
value: 100,
itemStyle: {
normal: {
color: "#eaed00",
},
emphasis: {
color: "#8ee700",
},
},
},
],
},
{
tooltip: {
show: false,
},
name: "刻度",
type: "gauge",
radius: "83%",
z: 1,
min: 0,
max: 100,
center: ["50%", "60%"],
splitNumber: 5, //
startAngle: 180,
endAngle: 0,
axisLine: {
show: true,
lineStyle: {
width: 5,
color: [
[0, "#00d900"],
[0.2, "#55e400"],
[0.4, "#cfee00"],
[0.6, "#ffab00"],
[0.8, "#ff1700"],
[1, "#ff1a00"],
],
},
}, //线
axisLabel: {
show: false,
}, //
axisTick: {
show: true,
lineStyle: {
color: "auto",
width: 0,
},
length: -15,
}, //
splitLine: {
show: true,
length: 0,
lineStyle: {
color: "auto",
width: 2,
},
}, //线
detail: {
show: false,
},
pointer: {
show: false,
},
},
{
name: "",
type: "gauge",
radius: "80%",
min: 0,
max: 100,
center: ["50%", "60%"],
data: [
{
value: value,
name: "",
},
],
splitNumber: 10, //
startAngle: 180,
endAngle: 0,
z: 5,
axisLine: {
show: true,
lineStyle: {
width: 0,
color: [
[0, "#00d900"],
[0.2, "#55e400"],
[0.4, "#cfee00"],
[0.6, "#ffab00"],
[0.8, "#ff1700"],
[1, "#ff1a00"],
],
},
}, //线
axisLabel: {
show: true,
color: "#fff",
fontSize: 20,
distance: -70,
formatter: function (params) {
var value = params.toFixed(0);
if (value == 0.0) {
return "0";
} else if (value == 20) {
return "2";
} else if (value == 40) {
return "4";
} else if (value == 60) {
return "6";
} else if (value == 80) {
return "8";
} else if (value == 100) {
return "10";
} else {
return " ";
}
},
}, //
axisTick: {
splitNumber: 10,
show: true,
lineStyle: {
color: "auto",
width: 2,
},
length: 20,
}, //
splitLine: {
show: true,
length: 25,
lineStyle: {
color: "auto",
width: 5,
},
}, //线
itemStyle: {
normal: {
color: "#ff1d04", //
},
},
pointer: {
width: 10,
length: "80%",
},
detail: {
formatter: function (params) {
return params / 100;
},
fontSize: 30,
color: "#fff",
offsetCenter: ["0%", "-35%"],
},
title: {
offsetCenter: ["0", "-60%"],
fontSize: 40,
color: "#fff",
show: true,
},
},
],
};
var chartDom = document.getElementById("chart");
myChart = echarts.init(chartDom);
option && myChart.setOption(option);
};
onMounted(() => {
initChart();
});
watch(
() => useSettingStore.cssd,
(newValue) => {
value=newValue * 100
setTimeout(() => {
initChart();
}, 100);
}
);
</script>
<style scoped>
.aaa {
width: 350px;
height: 300px;
/* background-color: pink; */
}
#chart {
width: 100%;
height: 100%;
}
</style>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save