config.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  1. const RND = Math.random()
  2. /**
  3. * 接口地址
  4. */
  5. const BASE_URL = '/yapi' //开发接口代理
  6. /**
  7. * 界面配置
  8. */
  9. const HOME_DATA = {
  10. startDate: '2024-11-27',
  11. curStation: '都匀',
  12. }
  13. /**
  14. * 场站配置
  15. */
  16. const STATION_LIST = [
  17. {
  18. name: '都匀',
  19. configUrl: '/json/glyConfig.json',
  20. cameraUrl: '/json/glyCamera.json',
  21. },
  22. ]
  23. //以下内容为新版本所需要的配置,未来持续迭代
  24. /**
  25. * 页面内标题 已生效
  26. */
  27. const SYSTEM_TITLE = '都匀作业区智慧融合平台'
  28. /**
  29. * 设置浏览器标题 已生效
  30. */
  31. document.title = SYSTEM_TITLE
  32. /**
  33. * 模块启用状态 部分生效
  34. */
  35. const MODULE_ENABLED = {
  36. /**
  37. * 定位系统
  38. */
  39. positioning: {
  40. /**
  41. * 定位启用状态
  42. */
  43. enabled: false,
  44. /**
  45. * 人员报警启用状态
  46. */
  47. personAlarm: false,
  48. /**
  49. * 围栏报警启用状态
  50. */
  51. railAlarm: false,
  52. /**
  53. * 区域报警启用状态
  54. */
  55. areaAlarm: false,
  56. /**
  57. * 聚集报警
  58. */
  59. gatherAlarm: false,
  60. },
  61. }
  62. /**
  63. * 地图配置 Cesium.UrlTemplateImageryProvider实例 已生效
  64. * * key1:9a5079c684abb9ab2cae02119587ca18  原有
  65. * key2:c7074dacd421b3e1ba311392c4b6923f  后台管理
  66. * key3:f3ddf0996b8f5b1c876094cdcb35faab  自己的
  67. */
  68. const MAP_CONFIG = {
  69. url: 'http://t{s}.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=tiles&tk=c7074dacd421b3e1ba311392c4b6923f',
  70. // url: 'static/tkt/{z}/{x}/{y}.png',
  71. maximumLevel: 18,
  72. subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
  73. }
  74. /**
  75. * 模型配置 目前仅为3dtiles的设置,未来遇到其他类型再重构
  76. */
  77. const MODEL_CONFIG = {
  78. /**
  79. * 是否启用模型
  80. */
  81. enabled: true,
  82. /**
  83. * 是否启用分层模型,enabled=true为前提
  84. */
  85. floorEnabled: true,
  86. location: {
  87. longitude: 0, //经度
  88. latitude: 0, //纬度
  89. },
  90. scale: 1,
  91. map: {},
  92. }
  93. /**
  94. * 视频播放地址 已生效
  95. */
  96. const VIDEO_PLAYER_CONFIG = 'http://[ip]:5000/NVRPlayer/Play?id='
  97. /**
  98. * MQTT配置 已启用
  99. */
  100. const MQTT_CONFIG = {
  101. /**
  102. * ws主机地址 ws://ip:port/endpoint
  103. */
  104. host: '/MQTTOverWebSocket', //"ws://127.0.0.1:18908/MQTTOverWebSocket",
  105. /**
  106. * client名称前缀
  107. */
  108. clientIdPrefix: 'mapclient',
  109. /**
  110. * 用户名
  111. */
  112. username: 'client',
  113. /**
  114. * 密码
  115. */
  116. password: '19c9547ad2029be96774fce5f1b9f099',
  117. /**
  118. * 订阅主题 单字符串or字符串数组
  119. */
  120. topic: [
  121. // 'Positioning/#',
  122. 'Alarm/List',
  123. 'Message/New',
  124. // 'Fire/#',
  125. 'Perimeter/#',
  126. 'LaserPtz/#',
  127. 'Risk/New',
  128. 'dashboard/risk/drawrisktime',
  129. 'Visualization/DataComm/NewAlarm',
  130. 'Visualization/Number/RecentlyLevelByDate'
  131. ],
  132. }
  133. //后台管理根路径
  134. const ISMSAdminWeb = {
  135. path: "http://localhost:9528/#/",
  136. // path: "http://11.100.46.218:8080/#/",
  137. // path: `http://192.168.195.134:8080/#/`,
  138. // path: `http://${window.location.hostname}:8080/#/`,
  139. }
  140. //都匀调度系统access_key配置
  141. ACCESS_KEY = ''
  142. SECRET_KEY = ''
  143. //房顶配置
  144. const MODEL_ROOF_LIST = [{ model: 'JHFSZ', part: ['门卫室-顶', '办公区屋顶'] }]
  145. const MODEL_ROOF_LIST2 = [
  146. {
  147. name: '办公楼二层',
  148. model: '济北综合站',
  149. part: ['主建楼顶'],
  150. insideModel: [
  151. '屏幕墙1',
  152. '屏幕墙2',
  153. '屏风02',
  154. '屏风01',
  155. '墙面01',
  156. '控制台',
  157. '控制柜01',
  158. 'UPS',
  159. '控制柜2',
  160. '可燃气体泄漏报警器2',
  161. '控制柜02',
  162. '室内灭火器F2-01',
  163. '室内灭火器F2-02',
  164. '室内灭火器F2-03',
  165. '室内灭火器F2-04',
  166. ],
  167. perspective: {
  168. destination: {
  169. x: -2327723.6131185642,
  170. y: 4537783.489307582,
  171. z: 3817482.431748076,
  172. },
  173. orientation: {
  174. pitch: -0.9984824373999865,
  175. heading: 1.1162388807802497,
  176. roll: 6.283185145946305,
  177. },
  178. },
  179. },
  180. {
  181. name: '办公楼一层',
  182. model: '济北综合站',
  183. part: [
  184. '主建楼顶',
  185. '主楼2层',
  186. '主楼2层地面',
  187. '屏幕墙1',
  188. '屏幕墙2',
  189. '屏风02',
  190. '屏风01',
  191. '墙面01',
  192. '控制台',
  193. '控制柜01',
  194. 'UPS',
  195. '控制柜2',
  196. '可燃气体泄漏报警器2',
  197. '控制柜02',
  198. '室内灭火器F2-01',
  199. '室内灭火器F2-02',
  200. '室内灭火器F2-03',
  201. '室内灭火器F2-04',
  202. ],
  203. judgePart: ['主楼2层', '主楼2层地面'],
  204. insideModel: [
  205. '电动球阀控制柜',
  206. '恒电位仪柜',
  207. '配电柜',
  208. '工业电视柜',
  209. '燃气加臭控制柜',
  210. '网络柜',
  211. '文件柜',
  212. '主楼1层地面',
  213. '主楼1层',
  214. '微型消防箱01',
  215. '微型消防箱02',
  216. '消防应急物资',
  217. '设备电箱',
  218. '提示板001',
  219. '提示板002',
  220. '室内灭火器F1-01',
  221. '室内灭火器F1-02',
  222. '室内灭火器F1-03',
  223. '室内灭火器F1-04',
  224. ],
  225. perspective: {
  226. destination: {
  227. x: -2327723.6131185642,
  228. y: 4537783.489307582,
  229. z: 3817482.431748076,
  230. },
  231. orientation: {
  232. pitch: -0.9984824373999865,
  233. heading: 1.1162388807802497,
  234. roll: 6.283185145946305,
  235. },
  236. },
  237. },
  238. {
  239. name: '锅炉房',
  240. model: '济北综合站',
  241. part: ['锅炉房屋顶'],
  242. insideModel: [
  243. '锅炉房-设备03',
  244. '锅炉房-设备08',
  245. '锅炉房-设备17',
  246. '锅炉房-设备02',
  247. '锅炉房',
  248. '锅炉房屋顶',
  249. '锅炉房灭火器',
  250. '锅炉房-管道03',
  251. '锅炉房-管道04',
  252. '锅炉房-设备24',
  253. '锅炉房-管道02',
  254. '锅炉房-管道01',
  255. '锅炉房-管道05',
  256. '锅炉房-设备01',
  257. '锅炉房-设备25',
  258. '锅炉房-设备26',
  259. '锅炉房-设备11',
  260. '锅炉房-设备04',
  261. '锅炉房-设备16',
  262. '锅炉房-设备12',
  263. '锅炉房-设备14',
  264. '锅炉房-设备13',
  265. '锅炉房-设备10',
  266. '锅炉房-设备27',
  267. '锅炉房-设备06',
  268. '锅炉房-设备19',
  269. '锅炉房-设备20',
  270. '锅炉房-设备09',
  271. '锅炉房-设备18',
  272. '锅炉房-设备15',
  273. '锅炉房-设备21',
  274. '锅炉房-设备07',
  275. '锅炉房-设备22',
  276. '锅炉房-设备23',
  277. '锅炉房-设备05',
  278. ],
  279. perspective: {
  280. destination: {
  281. x: -2327732.5099475486,
  282. y: 4537763.562118137,
  283. z: 3817457.9111556276,
  284. },
  285. orientation: {
  286. pitch: -1.1831669555873963,
  287. heading: 0.5905378634399421,
  288. roll: 0.000001351263233750899,
  289. },
  290. },
  291. },
  292. {
  293. name: '水源泵房',
  294. model: '济北综合站',
  295. part: ['水源泵房', '水源泵房屋顶'],
  296. hiddenBaseImage: true,
  297. insideModel: [
  298. '水源泵房-设备32',
  299. '水源泵房-设备23',
  300. '水源泵房-设备05',
  301. '水源泵房-设备03',
  302. '水源泵房-设备11',
  303. '水源泵房-设备12',
  304. '水源泵房-设备36',
  305. '水源泵房-设备27',
  306. '水源泵房-设备04',
  307. '水源泵房-设备06',
  308. '水源泵房-设备14',
  309. '水源泵房-设备13',
  310. '水源泵房-设备10',
  311. '水源泵房-设备31',
  312. '水源泵房-设备08',
  313. '水源泵房-设备29',
  314. '水源泵房-设备09',
  315. '水源泵房-设备07',
  316. '水源泵房-设备42',
  317. '水源泵房-管道',
  318. '水源泵房灭火器',
  319. '水源泵房-设备01',
  320. '水源泵房下地面',
  321. '水源泵房-设备02',
  322. '水源泵房-设备18',
  323. '水源泵房-设备20',
  324. '水源泵房-设备17',
  325. '水源泵房-设备19',
  326. '水源泵房-设备37',
  327. '水源泵房-设备38',
  328. '水源泵房-设备34',
  329. '水源泵房-设备25',
  330. '水源泵房-设备21',
  331. '水源泵房-设备16',
  332. '水源泵房-设备22',
  333. '水源泵房-设备15',
  334. '水源泵房-设备33',
  335. '水源泵房-设备24',
  336. '水源泵房-设备35',
  337. '水源泵房-设备26',
  338. '水源泵房-设备30',
  339. '水源泵房-设备28',
  340. '水源泵房-设备43',
  341. '水源泵房-设备41',
  342. '水源泵房-设备40',
  343. '水源泵房-设备39',
  344. ],
  345. perspective: {
  346. destination: {
  347. x: -2327690.382139521,
  348. y: 4537738.290871575,
  349. z: 3817505.2988075344,
  350. },
  351. orientation: {
  352. pitch: -0.9538980489654696,
  353. heading: 3.567193990984463,
  354. roll: 6.283184750030382,
  355. },
  356. },
  357. },
  358. {
  359. name: '箱变',
  360. model: '济北综合站',
  361. part: ['箱变'],
  362. insideModel: ['配电箱柜组', '灭火器001', '灭火器002'],
  363. perspective: {
  364. destination: {
  365. x: -2327700.7983310865,
  366. y: 4537740.687203836,
  367. z: 3817490.048991262,
  368. },
  369. orientation: {
  370. pitch: -0.555329858028367,
  371. heading: 6.27814800108144,
  372. roll: 1.5945679532336499e-7,
  373. },
  374. },
  375. },
  376. {
  377. name: '柴油发电房',
  378. model: '济北综合站',
  379. part: ['柴油发电房', '柴油发电机操作规程', '危险化学品安全周至卡', '柴油职业危害告知牌'],
  380. insideModel: ['柴油发电机'],
  381. perspective: {
  382. destination: {
  383. x: -2327706.7316303723,
  384. y: 4537738.270258039,
  385. z: 3817489.454492963,
  386. },
  387. orientation: {
  388. pitch: -0.582277053325126,
  389. heading: 6.260514133391248,
  390. roll: 4.218192959370981e-7,
  391. },
  392. },
  393. },
  394. ]
  395. const UNDER_PIPELINE = {
  396. hiddenList: [
  397. '揭工艺区地面1',
  398. '揭地面1',
  399. '揭工艺区地面2',
  400. '揭地面2',
  401. '揭草地',
  402. '揭出站双阀区',
  403. '工艺区01',
  404. '工艺区02',
  405. '围墙',
  406. '外围围墙',
  407. '可控型加臭机',
  408. '工艺区贴砖台06',
  409. ],
  410. pipelines: [
  411. {
  412. name: '地下管道-入站1',
  413. tags: [],
  414. color: '',
  415. points: [
  416. 117.1558884654605, 37.00053689773706, -2.01, 117.15592013724724, 37.00053684750127, -2.01, 117.15592087743856,
  417. 37.00053690747516, -1.89, 117.15592087743856, 37.00053690747516, 0.56, 117.15592195101559, 37.00053686291131,
  418. 0.7, 117.15594477210436, 37.0005367884524, 0.7, 117.15594568994398, 37.00053689649499, 0.56, 117.15594568994398,
  419. 37.00053689649499, -2.01, 117.15617353814059, 37.000536849977536, -2.01, 117.15617482140199, 37.00053785886714,
  420. -2.01, 117.15617486264294, 37.00061023747043, -2.01, 117.15617486264294, 37.00061023747043, 0.85,
  421. 117.15617470534518, 37.00062817346, 0.85,
  422. ],
  423. },
  424. {
  425. name: '地下管道-入站2',
  426. tags: [],
  427. color: '',
  428. points: [
  429. 117.15588844762797, 37.00054770351777, -2.01, 117.15592018542893, 37.000547747669444, -2.01, 117.15592109814965,
  430. 37.0005477484362, -1.89, 117.15592075018931, 37.00054773225912, 0.56, 117.15592200732209, 37.00054768158184,
  431. 0.7, 117.15594431420939, 37.000547779021105, 0.7, 117.15594555663316, 37.00054787562466, 0.56,
  432. 117.15594555663316, 37.00054787562466, -2.01, 117.15608136871472, 37.00054781247141, -2.01, 117.15608147776291,
  433. 37.000612644913744, -2.01, 117.15608147776291, 37.000612644913744, 0.85, 117.15608165380127, 37.00061479377705,
  434. 0.91,
  435. ],
  436. },
  437. {
  438. name: '工艺区管道02-下-左',
  439. tags: [],
  440. color: '',
  441. points: [
  442. 117.15608159310072, 37.00061693838703, 0.91, 117.15608211288371, 37.000626075950564, 0.91, 117.15606627752426,
  443. 37.00062624618931, 0.91, 117.15606602714327, 37.00070569400565, 0.91,
  444. ],
  445. },
  446. {
  447. name: '工艺区管道02-下-右',
  448. tags: [],
  449. color: '',
  450. points: [117.15608159310072, 37.00061693838703, 0.91, 117.1560816395163, 37.00070569765638, 0.91],
  451. },
  452. {
  453. name: '工艺区管道03-左',
  454. tags: [],
  455. color: '',
  456. points: [117.15610212545893, 37.00075483212911, 0.89, 117.15610198124256, 37.0007106752246, 0.89],
  457. },
  458. {
  459. name: '工艺区管道03-右',
  460. tags: [],
  461. color: '',
  462. points: [
  463. 117.15611329627278, 37.00075484442566, 0.89, 117.15611285174879, 37.00071899388258, 0.89, 117.1561019192058,
  464. 37.00071897392638, 0.89, 117.15610198124256, 37.0007106752246, 0.89,
  465. ],
  466. },
  467. {
  468. name: '工艺区管道04-左',
  469. tags: [],
  470. color: '',
  471. points: [117.15613345776718, 37.00075492228591, 0.89, 117.15613337129263, 37.00070434658455, 0.89],
  472. },
  473. {
  474. name: '工艺区管道04-右',
  475. tags: [],
  476. color: '',
  477. points: [
  478. 117.1561446203325, 37.00075493465728, 0.89, 117.15614432464992, 37.00071164383694, 0.89, 117.15613334351812,
  479. 37.000711541108, 0.89, 117.15613337129263, 37.00070434658455, 0.89,
  480. ],
  481. },
  482. {
  483. name: '工艺区管道05-左',
  484. tags: [],
  485. color: '',
  486. points: [
  487. 117.1561746970257, 37.000627994119434, 0.89, 117.1561747996243, 37.00063438490229, 0.89, 117.15616271948913,
  488. 37.000634677286044, 0.89, 117.15616237191766, 37.000754869008624, 0.89,
  489. ],
  490. },
  491. {
  492. name: '工艺区管道05-右-左',
  493. tags: [],
  494. color: '',
  495. points: [
  496. 117.1561746970257, 37.000627994119434, 0.89, 117.15617487551941, 37.00067147000967, 0.89, 117.15617485244624,
  497. 37.000672342344444, 1.48, 117.1561748782843, 37.00068436744248, 1.48, 117.15617524727374, 37.000684991814666,
  498. 0.89, 117.15617491130706, 37.00075492428077, 0.89,
  499. ],
  500. },
  501. {
  502. name: '工艺区管道05-右-右',
  503. tags: [],
  504. color: '',
  505. points: [
  506. 117.1561746970257, 37.000627994119434, 0.89, 117.15617474808313, 37.00065961166106, 0.89, 117.15618116159716,
  507. 37.00065957785025, 0.89, 117.15618130800128, 37.0006970541465, 0.89, 117.15617492244108, 37.00069723684851,
  508. 0.89, 117.15617491130706, 37.00075492428077, 0.89,
  509. ],
  510. },
  511. {
  512. name: '地下管道-出站1',
  513. tags: [],
  514. color: '',
  515. points: [
  516. 117.15613337129263, 37.00070434658455, 0.89, 117.15613353610726, 37.00069733612314, 0.89, 117.15613353610726,
  517. 37.00069733612314, -1.38, 117.15613333756814, 37.000537131350114, -1.38, 117.15635818903677, 37.00053686938121,
  518. -1.38, 117.15635818903677, 37.00053686938121, 0.7, 117.15638286970857, 37.00053687903658, 0.7,
  519. 117.15638286970857, 37.00053687903658, -0.98, 117.15651761152432, 37.000536864259104, -0.98,
  520. ],
  521. },
  522. {
  523. name: '地下管道-出站2',
  524. tags: [],
  525. color: '',
  526. points: [
  527. 117.1561018838438, 37.000714669797624, 0.89, 117.15610186917172, 37.000704466169545, 0.89, 117.15610186917172,
  528. 37.000704466169545, -1.16, 117.15610187873084, 37.00054786974231, -1.16, 117.15635818971452, 37.00054771917987,
  529. -1.16, 117.15635818971452, 37.00054771917987, 0.7, 117.15638258544303, 37.00054773239913, 0.7,
  530. 117.15638258544303, 37.00054773239913, -0.98, 117.15651760881931, 37.00054767154145, -0.98,
  531. ],
  532. },
  533. ],
  534. }
  535. const CURRENT_STATION = {
  536. name: '济阳门站',
  537. code: 'JYMZ',
  538. center: [117.16449326547945, 36.98251852781648, 0],
  539. perspective: {
  540. destination: {
  541. x: -2328921.7606462426,
  542. y: 4538563.992673427,
  543. z: 3815788.2687797816,
  544. },
  545. orientation: {
  546. pitch: -0.29113542476570187,
  547. heading: 0.605754941690825,
  548. roll: 0.0000010315360015056285,
  549. },
  550. },
  551. }
  552. const LAYER_CONFIG = {
  553. name: '济南管道',
  554. code: 'JNGD',
  555. type: 'pipeline',
  556. visible: true,
  557. layerList: [
  558. {
  559. id: 'areaLayer',
  560. code: 'areaLayer',
  561. name: '区域图层',
  562. children: [],
  563. },
  564. {
  565. id: 'lineLayer',
  566. code: 'lineLayer',
  567. name: '管道图层',
  568. children: [],
  569. },
  570. {
  571. id: 'personLayer',
  572. code: 'personLayer',
  573. name: '人员图层',
  574. children: [],
  575. },
  576. ],
  577. }
  578. const GY_STATIONS = [
  579. // {
  580. // id: '591282080239853568',
  581. // name: '贵阳输气站',
  582. // code: 'GYSQZ',
  583. // direction: 'left',
  584. // buildId: '594099860043472896',
  585. // positioningBuildId: '001001',
  586. // position: [106.62629510834513, 26.65059748734631, 1.4679041606626673],
  587. // layers: ['周界', '泄漏', '摄像头'],
  588. // },
  589. // {
  590. // id: '655065301053874176',
  591. // name: '白云输气站',
  592. // code: 'BYSQZ',
  593. // direction: 'right',
  594. // buildId: '639402700261302272', //用于跳转模型
  595. // positioningBuildId: '001002', //用于跳转模型判断
  596. // position: [106.62629633504537, 26.65060908351062, 1.4819172693521345],
  597. // layers: ['风险区域', '周界', '泄漏', '摄像头'],
  598. // },
  599. {
  600. id: '657316479015854080',
  601. name: '都匀输气站',
  602. code: 'DYSQZ',
  603. buildId: '657317980832538625',
  604. positioningBuildId: '002001',
  605. direction: 'right',
  606. position: [106.62632139900707, 26.650595691076745, 1.4650695463064403],
  607. layers: ['周界', '泄漏', '摄像头'],
  608. },
  609. {
  610. id: '657316634284793856',
  611. name: '云雾首站',
  612. code: 'YWSZ',
  613. buildId: '657319107443564544',
  614. positioningBuildId: '002004',
  615. direction: 'left',
  616. position: [106.62630660166043, 26.650596074566966, 1.4660467809229363],
  617. layers: ['周界', '泄漏', '摄像头'],
  618. },
  619. {
  620. id: '657316533462114304',
  621. name: '凯口清管站',
  622. code: 'KKQGZ',
  623. buildId: '657318695416111104',
  624. positioningBuildId: '002002',
  625. direction: 'right',
  626. position: [106.62631864686837, 26.650589347228493, 1.4654720522226603],
  627. layers: ['周界', '泄漏', '摄像头'],
  628. },
  629. {
  630. id: '657316587124039680',
  631. name: '独山首站',
  632. code: 'DSSZ',
  633. buildId: '657318879332147200',
  634. positioningBuildId: '002003',
  635. direction: 'right',
  636. position: [106.6263209022603, 26.650585399041464, 1.4657059185197159],
  637. layers: ['周界', '泄漏', '摄像头'],
  638. },
  639. {
  640. name: '荔波首站',
  641. code: 'LBSZ',
  642. buildId: '',
  643. positioningBuildId: '',
  644. direction: 'right',
  645. position: [106.6263329708765, 26.65057999393088, 1.4648986180330343],
  646. layers: ['周界', '泄漏', '摄像头'],
  647. },
  648. // {
  649. // id: '784104499768729600',
  650. // name: '托克托',
  651. // code: 'TKT',
  652. // buildId: '784102618438836224',
  653. // positioningBuildId: '100001',
  654. // direction: 'right',
  655. // position: [106.6263209022603, 26.650585399041464, 1.4657059185197159],
  656. // layers: ['周界', '泄漏', '摄像头'],
  657. // },
  658. // {
  659. // id: '784131093203787776',
  660. // name: '托克托压气站',
  661. // code: 'TKT',
  662. // buildId: '784102618438836224',
  663. // positioningBuildId: '100001',
  664. // direction: 'right',
  665. // position: [106.6263209022603, 26.650585399041464, 1.4657059185197159],
  666. // layers: ['周界', '泄漏', '摄像头'],
  667. // },
  668. ]
  669. const GY_ZYQS = [
  670. // {
  671. // id: '784131018197049344',
  672. // name: '托克托作业区',
  673. // code: 'TKTZYQ',
  674. // buildId: '654044537953460225',
  675. // },
  676. {
  677. id: '657316430240292865',
  678. name: '都匀作业区',
  679. code: 'DYSQZ',
  680. buildId: '654044537953460225',
  681. },
  682. // {
  683. // id: '591281556996235264',
  684. // name: '贵阳作业区',
  685. // code: 'GYSQZ',
  686. // buildId: '654044537953460224',
  687. // },
  688. ]
  689. /**
  690. * 首页展示激光云台视频窗口配置
  691. * 已启用
  692. * 后续改成接口获取
  693. */
  694. // const GY_JGYT_CONFIG = [
  695. // {
  696. // id: '1',
  697. // name: '托克托作业区',
  698. // children: [
  699. // {
  700. // id: '101',
  701. // name: '托克托压气站',
  702. // children: [
  703. // {
  704. // id: '1',
  705. // // id: '660856349529219072',
  706. // name: '云台1',
  707. // ndTag: 'DY_Leak_PTZ_Concn',
  708. // },
  709. // ],
  710. // },]
  711. // }]
  712. const GY_JGYT_CONFIG = [
  713. {
  714. id: '1',
  715. name: '都匀作业区',
  716. children: [
  717. {
  718. id: '101',
  719. name: '都匀站',
  720. children: [
  721. {
  722. id: '1',
  723. // id: '660856349529219072',
  724. name: '云台1',
  725. ndTag: 'DY_Leak_PTZ_Concn',
  726. },
  727. ],
  728. },
  729. {
  730. id: '102',
  731. name: '独山首站',
  732. children: [
  733. {
  734. id: '2',
  735. // id: '660856349529219074',
  736. name: '云台1',
  737. ndTag: 'DS_JGYT_01_DATA_ND',
  738. },
  739. {
  740. id: '3',
  741. // id: '660856349529219076',
  742. name: '云台2',
  743. ndTag: 'DS_JGYT_02_DATA_ND',
  744. },
  745. ],
  746. },
  747. {
  748. id: '103',
  749. name: '凯口站',
  750. children: [
  751. {
  752. id: '4',
  753. // id: '660856349529219073',
  754. name: '云台1',
  755. ndTag: 'KK_Leak_PTZ_Concn',
  756. },
  757. ],
  758. },
  759. {
  760. id: '104',
  761. name: '云雾首站',
  762. children: [
  763. {
  764. id: '5',
  765. // id: '660856349529219075',
  766. name: '云台1',
  767. ndTag: 'YW_Leak_PTZ_Concn',
  768. },
  769. ],
  770. },
  771. ],
  772. },
  773. ]
  774. /**
  775. * mqtt地址
  776. * 判断是否被iframe嵌套
  777. * 判断是否https
  778. */
  779. const VUE_APP_BASE_WS = () => {
  780. // 暂时没有https需求,强制写死
  781. // return "ws://" + window.location.host + BASE_URL;
  782. if (window.self !== window.top) {
  783. // 在iframe中,使用iframe的地址
  784. const str = window.self.location.protocol === 'https:' ? 'wss://' : 'ws://'
  785. return str + window.self.location.host + BASE_URL
  786. } else {
  787. // 不在iframe中,使用当前地址
  788. const str = window.location.protocol === 'https:' ? 'wss://' : 'ws://'
  789. return str + window.location.host + BASE_URL
  790. }
  791. }