config.js 22 KB

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