const RND = Math.random() /** * 接口地址 */ const BASE_URL = '/yapi' //开发接口代理 /** * 界面配置 */ const HOME_DATA = { startDate: '2024-11-27', group: '国家管网集团北京管道有限公司', company: '内蒙古输油气分公司', curStation: '托克托压气站', } /** * 场站配置 */ const STATION_LIST = [ { name: '托克托', configUrl: '/json/glyConfig.json', cameraUrl: '/json/glyCamera.json', }, ] //以下内容为新版本所需要的配置,未来持续迭代 /** * 页面内标题 已生效 */ const SYSTEM_TITLE = '托克托压气站综合安防平台' /** * 设置浏览器标题 已生效 */ document.title = SYSTEM_TITLE /** * 模块启用状态 部分生效 */ const MODULE_ENABLED = { /** * 定位系统 */ positioning: { /** * 定位启用状态 */ enabled: false, /** * 人员报警启用状态 */ personAlarm: false, /** * 围栏报警启用状态 */ railAlarm: false, /** * 区域报警启用状态 */ areaAlarm: false, /** * 聚集报警 */ gatherAlarm: false, }, } /** * 地图配置 Cesium.UrlTemplateImageryProvider实例 已生效 * * key1:9a5079c684abb9ab2cae02119587ca18  原有 * key2:c7074dacd421b3e1ba311392c4b6923f  后台管理 * key3:f3ddf0996b8f5b1c876094cdcb35faab  自己的 */ const MAP_CONFIG = { // 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', url: 'static/tkt/{z}/{x}/{y}.png', maximumLevel: 18, subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'], } /** * 模型配置 目前仅为3dtiles的设置,未来遇到其他类型再重构 */ const MODEL_CONFIG = { /** * 是否启用模型 */ enabled: true, /** * 是否启用分层模型,enabled=true为前提 */ floorEnabled: true, location: { longitude: 0, //经度 latitude: 0, //纬度 }, scale: 1, map: {}, } /** * 视频播放地址 已生效 */ const VIDEO_PLAYER_CONFIG = 'http://[ip]:5000/NVRPlayer/Play?id=' /** * MQTT配置 已启用 */ const MQTT_CONFIG = { /** * ws主机地址 ws://ip:port/endpoint */ host: '/MQTTOverWebSocket', //"ws://127.0.0.1:18908/MQTTOverWebSocket", /** * client名称前缀 */ clientIdPrefix: 'mapclient', /** * 用户名 */ username: 'client', /** * 密码 */ password: '19c9547ad2029be96774fce5f1b9f099', /** * 订阅主题 单字符串or字符串数组 */ topic: [ // 'Positioning/#', 'Alarm/List', 'Message/New', 'Fire/#', 'Perimeter/#', 'LaserPtz/#', 'Risk/New', 'AccessControl/Log/#', 'dashboard/risk/drawrisktime', 'Visualization/DataComm/NewAlarm', 'Visualization/Number/RecentlyLevelByDate', ], } //后台管理根路径 const ISMSAdminWeb = { // path: "http://localhost:9528/#/", // path: `http://192.168.195.136:8080/#/`, path: `https://10.0.0.201:8080/#/`, // path: `http://${window.location.hostname}:8080/#/`, } //都匀调度系统access_key配置 ACCESS_KEY = 'kczzol9ws3bk8gc1p0mx' SECRET_KEY = 'fakj8yw61ocot5uvub0o' //房顶配置 const MODEL_ROOF_LIST = [{ model: 'JHFSZ', part: ['门卫室-顶', '办公区屋顶'] }] const MODEL_ROOF_LIST2 = [ { name: '办公楼二层', model: '济北综合站', part: ['主建楼顶'], insideModel: [ '屏幕墙1', '屏幕墙2', '屏风02', '屏风01', '墙面01', '控制台', '控制柜01', 'UPS', '控制柜2', '可燃气体泄漏报警器2', '控制柜02', '室内灭火器F2-01', '室内灭火器F2-02', '室内灭火器F2-03', '室内灭火器F2-04', ], perspective: { destination: { x: -2327723.6131185642, y: 4537783.489307582, z: 3817482.431748076, }, orientation: { pitch: -0.9984824373999865, heading: 1.1162388807802497, roll: 6.283185145946305, }, }, }, { name: '办公楼一层', model: '济北综合站', part: [ '主建楼顶', '主楼2层', '主楼2层地面', '屏幕墙1', '屏幕墙2', '屏风02', '屏风01', '墙面01', '控制台', '控制柜01', 'UPS', '控制柜2', '可燃气体泄漏报警器2', '控制柜02', '室内灭火器F2-01', '室内灭火器F2-02', '室内灭火器F2-03', '室内灭火器F2-04', ], judgePart: ['主楼2层', '主楼2层地面'], insideModel: [ '电动球阀控制柜', '恒电位仪柜', '配电柜', '工业电视柜', '燃气加臭控制柜', '网络柜', '文件柜', '主楼1层地面', '主楼1层', '微型消防箱01', '微型消防箱02', '消防应急物资', '设备电箱', '提示板001', '提示板002', '室内灭火器F1-01', '室内灭火器F1-02', '室内灭火器F1-03', '室内灭火器F1-04', ], perspective: { destination: { x: -2327723.6131185642, y: 4537783.489307582, z: 3817482.431748076, }, orientation: { pitch: -0.9984824373999865, heading: 1.1162388807802497, roll: 6.283185145946305, }, }, }, { name: '锅炉房', model: '济北综合站', part: ['锅炉房屋顶'], insideModel: [ '锅炉房-设备03', '锅炉房-设备08', '锅炉房-设备17', '锅炉房-设备02', '锅炉房', '锅炉房屋顶', '锅炉房灭火器', '锅炉房-管道03', '锅炉房-管道04', '锅炉房-设备24', '锅炉房-管道02', '锅炉房-管道01', '锅炉房-管道05', '锅炉房-设备01', '锅炉房-设备25', '锅炉房-设备26', '锅炉房-设备11', '锅炉房-设备04', '锅炉房-设备16', '锅炉房-设备12', '锅炉房-设备14', '锅炉房-设备13', '锅炉房-设备10', '锅炉房-设备27', '锅炉房-设备06', '锅炉房-设备19', '锅炉房-设备20', '锅炉房-设备09', '锅炉房-设备18', '锅炉房-设备15', '锅炉房-设备21', '锅炉房-设备07', '锅炉房-设备22', '锅炉房-设备23', '锅炉房-设备05', ], perspective: { destination: { x: -2327732.5099475486, y: 4537763.562118137, z: 3817457.9111556276, }, orientation: { pitch: -1.1831669555873963, heading: 0.5905378634399421, roll: 0.000001351263233750899, }, }, }, { name: '水源泵房', model: '济北综合站', part: ['水源泵房', '水源泵房屋顶'], hiddenBaseImage: true, insideModel: [ '水源泵房-设备32', '水源泵房-设备23', '水源泵房-设备05', '水源泵房-设备03', '水源泵房-设备11', '水源泵房-设备12', '水源泵房-设备36', '水源泵房-设备27', '水源泵房-设备04', '水源泵房-设备06', '水源泵房-设备14', '水源泵房-设备13', '水源泵房-设备10', '水源泵房-设备31', '水源泵房-设备08', '水源泵房-设备29', '水源泵房-设备09', '水源泵房-设备07', '水源泵房-设备42', '水源泵房-管道', '水源泵房灭火器', '水源泵房-设备01', '水源泵房下地面', '水源泵房-设备02', '水源泵房-设备18', '水源泵房-设备20', '水源泵房-设备17', '水源泵房-设备19', '水源泵房-设备37', '水源泵房-设备38', '水源泵房-设备34', '水源泵房-设备25', '水源泵房-设备21', '水源泵房-设备16', '水源泵房-设备22', '水源泵房-设备15', '水源泵房-设备33', '水源泵房-设备24', '水源泵房-设备35', '水源泵房-设备26', '水源泵房-设备30', '水源泵房-设备28', '水源泵房-设备43', '水源泵房-设备41', '水源泵房-设备40', '水源泵房-设备39', ], perspective: { destination: { x: -2327690.382139521, y: 4537738.290871575, z: 3817505.2988075344, }, orientation: { pitch: -0.9538980489654696, heading: 3.567193990984463, roll: 6.283184750030382, }, }, }, { name: '箱变', model: '济北综合站', part: ['箱变'], insideModel: ['配电箱柜组', '灭火器001', '灭火器002'], perspective: { destination: { x: -2327700.7983310865, y: 4537740.687203836, z: 3817490.048991262, }, orientation: { pitch: -0.555329858028367, heading: 6.27814800108144, roll: 1.5945679532336499e-7, }, }, }, { name: '柴油发电房', model: '济北综合站', part: ['柴油发电房', '柴油发电机操作规程', '危险化学品安全周至卡', '柴油职业危害告知牌'], insideModel: ['柴油发电机'], perspective: { destination: { x: -2327706.7316303723, y: 4537738.270258039, z: 3817489.454492963, }, orientation: { pitch: -0.582277053325126, heading: 6.260514133391248, roll: 4.218192959370981e-7, }, }, }, ] const UNDER_PIPELINE = { hiddenList: [ '揭工艺区地面1', '揭地面1', '揭工艺区地面2', '揭地面2', '揭草地', '揭出站双阀区', '工艺区01', '工艺区02', '围墙', '外围围墙', '可控型加臭机', '工艺区贴砖台06', ], pipelines: [ { name: '地下管道-入站1', tags: [], color: '', points: [ 117.1558884654605, 37.00053689773706, -2.01, 117.15592013724724, 37.00053684750127, -2.01, 117.15592087743856, 37.00053690747516, -1.89, 117.15592087743856, 37.00053690747516, 0.56, 117.15592195101559, 37.00053686291131, 0.7, 117.15594477210436, 37.0005367884524, 0.7, 117.15594568994398, 37.00053689649499, 0.56, 117.15594568994398, 37.00053689649499, -2.01, 117.15617353814059, 37.000536849977536, -2.01, 117.15617482140199, 37.00053785886714, -2.01, 117.15617486264294, 37.00061023747043, -2.01, 117.15617486264294, 37.00061023747043, 0.85, 117.15617470534518, 37.00062817346, 0.85, ], }, { name: '地下管道-入站2', tags: [], color: '', points: [ 117.15588844762797, 37.00054770351777, -2.01, 117.15592018542893, 37.000547747669444, -2.01, 117.15592109814965, 37.0005477484362, -1.89, 117.15592075018931, 37.00054773225912, 0.56, 117.15592200732209, 37.00054768158184, 0.7, 117.15594431420939, 37.000547779021105, 0.7, 117.15594555663316, 37.00054787562466, 0.56, 117.15594555663316, 37.00054787562466, -2.01, 117.15608136871472, 37.00054781247141, -2.01, 117.15608147776291, 37.000612644913744, -2.01, 117.15608147776291, 37.000612644913744, 0.85, 117.15608165380127, 37.00061479377705, 0.91, ], }, { name: '工艺区管道02-下-左', tags: [], color: '', points: [ 117.15608159310072, 37.00061693838703, 0.91, 117.15608211288371, 37.000626075950564, 0.91, 117.15606627752426, 37.00062624618931, 0.91, 117.15606602714327, 37.00070569400565, 0.91, ], }, { name: '工艺区管道02-下-右', tags: [], color: '', points: [117.15608159310072, 37.00061693838703, 0.91, 117.1560816395163, 37.00070569765638, 0.91], }, { name: '工艺区管道03-左', tags: [], color: '', points: [117.15610212545893, 37.00075483212911, 0.89, 117.15610198124256, 37.0007106752246, 0.89], }, { name: '工艺区管道03-右', tags: [], color: '', points: [ 117.15611329627278, 37.00075484442566, 0.89, 117.15611285174879, 37.00071899388258, 0.89, 117.1561019192058, 37.00071897392638, 0.89, 117.15610198124256, 37.0007106752246, 0.89, ], }, { name: '工艺区管道04-左', tags: [], color: '', points: [117.15613345776718, 37.00075492228591, 0.89, 117.15613337129263, 37.00070434658455, 0.89], }, { name: '工艺区管道04-右', tags: [], color: '', points: [ 117.1561446203325, 37.00075493465728, 0.89, 117.15614432464992, 37.00071164383694, 0.89, 117.15613334351812, 37.000711541108, 0.89, 117.15613337129263, 37.00070434658455, 0.89, ], }, { name: '工艺区管道05-左', tags: [], color: '', points: [ 117.1561746970257, 37.000627994119434, 0.89, 117.1561747996243, 37.00063438490229, 0.89, 117.15616271948913, 37.000634677286044, 0.89, 117.15616237191766, 37.000754869008624, 0.89, ], }, { name: '工艺区管道05-右-左', tags: [], color: '', points: [ 117.1561746970257, 37.000627994119434, 0.89, 117.15617487551941, 37.00067147000967, 0.89, 117.15617485244624, 37.000672342344444, 1.48, 117.1561748782843, 37.00068436744248, 1.48, 117.15617524727374, 37.000684991814666, 0.89, 117.15617491130706, 37.00075492428077, 0.89, ], }, { name: '工艺区管道05-右-右', tags: [], color: '', points: [ 117.1561746970257, 37.000627994119434, 0.89, 117.15617474808313, 37.00065961166106, 0.89, 117.15618116159716, 37.00065957785025, 0.89, 117.15618130800128, 37.0006970541465, 0.89, 117.15617492244108, 37.00069723684851, 0.89, 117.15617491130706, 37.00075492428077, 0.89, ], }, { name: '地下管道-出站1', tags: [], color: '', points: [ 117.15613337129263, 37.00070434658455, 0.89, 117.15613353610726, 37.00069733612314, 0.89, 117.15613353610726, 37.00069733612314, -1.38, 117.15613333756814, 37.000537131350114, -1.38, 117.15635818903677, 37.00053686938121, -1.38, 117.15635818903677, 37.00053686938121, 0.7, 117.15638286970857, 37.00053687903658, 0.7, 117.15638286970857, 37.00053687903658, -0.98, 117.15651761152432, 37.000536864259104, -0.98, ], }, { name: '地下管道-出站2', tags: [], color: '', points: [ 117.1561018838438, 37.000714669797624, 0.89, 117.15610186917172, 37.000704466169545, 0.89, 117.15610186917172, 37.000704466169545, -1.16, 117.15610187873084, 37.00054786974231, -1.16, 117.15635818971452, 37.00054771917987, -1.16, 117.15635818971452, 37.00054771917987, 0.7, 117.15638258544303, 37.00054773239913, 0.7, 117.15638258544303, 37.00054773239913, -0.98, 117.15651760881931, 37.00054767154145, -0.98, ], }, ], } const CURRENT_STATION = { name: '济阳门站', code: 'JYMZ', center: [117.16449326547945, 36.98251852781648, 0], perspective: { destination: { x: -2328921.7606462426, y: 4538563.992673427, z: 3815788.2687797816, }, orientation: { pitch: -0.29113542476570187, heading: 0.605754941690825, roll: 0.0000010315360015056285, }, }, } const LAYER_CONFIG = { name: '济南管道', code: 'JNGD', type: 'pipeline', visible: true, layerList: [ { id: 'areaLayer', code: 'areaLayer', name: '区域图层', children: [], }, { id: 'lineLayer', code: 'lineLayer', name: '管道图层', children: [], }, { id: 'personLayer', code: 'personLayer', name: '人员图层', children: [], }, ], } const GY_STATIONS = [ { id: '784104499768729600', name: '托克托作业区', code: 'TKT', buildId: '784102618438836224', positioningBuildId: '100001', direction: 'right', position: [106.6263209022603, 26.650585399041464, 1.4657059185197159], layers: ['周界', '泄漏', '摄像头'], }, { id: '784131093203787776', name: '托克托压气站', code: 'TKT', buildId: '784102618438836224', positioningBuildId: '100001', direction: 'right', position: [106.6263209022603, 26.650585399041464, 1.4657059185197159], layers: ['周界', '泄漏', '摄像头'], // webRTCUrl: "wss://dispatcher:1443/webrtc", // admin: "8889", // password: "123456", } ] const GY_ZYQS = [ { id: '784131018197049344', name: '托克托作业区', code: 'TKTZYQ', buildId: '654044537953460225', }, ] /** * 首页展示激光云台视频窗口配置 * 已启用 * 后续改成接口获取 */ const GY_JGYT_CONFIG = [ { id: '1', name: '托克托作业区', children: [ { id: '101', name: '托克托压气站', children: [ { id: '786542179467141120', name: '激光检测1', ndTag: 'JGYT1_ND', }, { id: '786542180738015232', name: '激光检测2', ndTag: 'JGYT2_ND', }, ], },] } ] /** * mqtt地址 * 判断是否被iframe嵌套 * 判断是否https */ const VUE_APP_BASE_WS = () => { // 暂时没有https需求,强制写死 // return "ws://" + window.location.host + BASE_URL; if (window.self !== window.top) { // 在iframe中,使用iframe的地址 const str = window.self.location.protocol === 'https:' ? 'wss://' : 'ws://' return str + window.self.location.host + BASE_URL } else { // 不在iframe中,使用当前地址 const str = window.location.protocol === 'https:' ? 'wss://' : 'ws://' return str + window.location.host + BASE_URL } }