label.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import Bus from "@/utils/bus";
  2. /**
  3. * 测站标签展示
  4. * 测站主页:显示站房雨量场等图标;仪器运维:显示仪器图标
  5. * @param type 展示标签类型(测站主页:显示站房雨量场等图标;仪器运维:显示仪器图标;水质检验:显示屋内仪器图标,ADCP弹框)
  6. */
  7. export function setStationLabel(stcd: any, type = "测站主页", show = true) {
  8. let descriptor = {
  9. "command": "SetPOI",
  10. "data": {
  11. "ID": stcd,
  12. "type": type,
  13. "display": show ? "True" : "False"
  14. }
  15. }
  16. Bus.emit('emitUIInteraction', descriptor)
  17. console.log("-- 测站标签展示", JSON.stringify(descriptor));
  18. }
  19. export function closeStationLabel(stcd: any) {
  20. ['测站主页', '仪器运维'].forEach(item => setStationLabel(stcd, item, false))
  21. }
  22. export function adcpfx(stcd: any, show = true) {
  23. let descriptor = {
  24. "command": "ADCPFX",
  25. "data": {
  26. "Type": show ? "True" : "False",
  27. "ID": stcd
  28. }
  29. }
  30. Bus.emit('emitUIInteraction', descriptor)
  31. console.log("-- H-ADCP特效与标签显隐", JSON.stringify(descriptor));
  32. }
  33. export function setLED(data: any) {
  34. let descriptor = {
  35. "command": "SetLED",
  36. "data": data
  37. }
  38. Bus.emit('emitUIInteraction', descriptor)
  39. console.log("-- 修改LED大屏内容", JSON.stringify(descriptor));
  40. }