config.js 22 KB

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