commit 8d6e72a8ad1188d28a58950ecf59c2923dc0ebb1 Author: guangyin Date: Tue May 16 13:37:15 2023 +0800 初始化页面搭建 diff --git a/README.md b/README.md new file mode 100644 index 0000000..cbd65ca --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# hbt-template-ui + +## Project setup +``` +npm install +``` + +### Compiles and hot-reloads for development +``` +npm run serve +``` + +### 本框架采用ts与法 具体依赖vue-property-decorator +``` +see vue-property-decorator用法详解 (https://blog.csdn.net/weixin_44116302/article/details/111225763#PropSync_141) +``` + +### 采用模块联邦 +``` +远程引用需要先在global.d.ts中注册 +例:如需使用远程地图 +1.在global.d.ts中注册 declare module 'common/map'; +2.在页面中引用 +@Component({ + components:{MapComponent:()=>import("common/map") } +}) +3.在html中应用 +``` diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..e955840 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,5 @@ +module.exports = { + presets: [ + '@vue/cli-plugin-babel/preset' + ] +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..de07ef4 --- /dev/null +++ b/package.json @@ -0,0 +1,83 @@ +{ + "name": "test", + "version": "0.1.0", + "private": true, + "scripts": { + "serve": "vue-cli-service serve --mode development", + "build": "vue-cli-service build --mode production", + "test": "vue-cli-service build --mode test", + "lint": "vue-cli-service lint" + }, + "dependencies": { + "@turf/turf": "^6.5.0", + "@types/webpack-env": "^1.18.0", + "animate.css": "^4.1.1", + "axios": "^1.3.4", + "core-js": "^3.8.3", + "echarts": "^5.4.2", + "echarts-wordcloud": "^2.1.0", + "element-ui": "^2.15.13", + "file-saver": "^2.0.5", + "hbt-common": "0.0.3", + "jquery": "^3.6.4", + "layui-layer": "^1.0.9", + "mockjs": "^1.1.0", + "moment": "^2.29.4", + "screenfull": "^6.0.2", + "vue": "^2.6.14", + "vue-class-component": "^7.2.3", + "vue-property-decorator": "^9.1.2", + "vue-router": "^3.5.1", + "vuex": "^3.6.2" + }, + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^5.4.0", + "@typescript-eslint/parser": "^5.4.0", + "@vue/cli-plugin-babel": "~5.0.0", + "@vue/cli-plugin-eslint": "~5.0.0", + "@vue/cli-plugin-router": "~5.0.0", + "@vue/cli-plugin-typescript": "~5.0.0", + "@vue/cli-plugin-vuex": "~5.0.0", + "@vue/cli-service": "~5.0.0", + "@vue/eslint-config-typescript": "^9.1.0", + "compression-webpack-plugin": "^5.0.2", + "eslint": "^7.32.0", + "eslint-plugin-vue": "^8.0.3", + "html-loader": "^4.2.0", + "sass": "^1.32.7", + "sass-loader": "^12.0.0", + "svg-sprite-loader": "^6.0.11", + "typescript": "~4.5.5", + "vue-template-compiler": "^2.6.14" + }, + "eslintConfig": { + "root": true, + "env": { + "node": true + }, + "extends": [ + "plugin:vue/essential", + "eslint:recommended", + "@vue/typescript/recommended" + ], + "parserOptions": { + "ecmaVersion": 2020 + }, + "rules": { + "@typescript-eslint/no-explicit-any": [ + "off" + ], + "vue/no-unused-components": "off", + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": "off" + } + }, + "globals": { + "ue": true + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not dead" + ] +} diff --git a/public/ac.min.js b/public/ac.min.js new file mode 100644 index 0000000..9661997 --- /dev/null +++ b/public/ac.min.js @@ -0,0 +1,513 @@ +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(v){var D=0;return function(){return D>>0,$jscomp.propertyToPolyfillSymbol[O]=$jscomp.IS_SYMBOL_NATIVE? +$jscomp.global.Symbol(O):$jscomp.POLYFILL_PREFIX+I+"$"+O),$jscomp.defineProperty(E,$jscomp.propertyToPolyfillSymbol[O],{configurable:!0,writable:!0,value:D})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(v){v={next:v};v[Symbol.iterator]=function(){return this};return v};$jscomp.underscoreProtoCanBeSet=function(){var v={a:!0},D={};try{return D.__proto__=v,D.a}catch(I){}return!1}; +$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(v,D){v.__proto__=D;if(v.__proto__!==D)throw new TypeError(v+" is not extensible");return v}:null;$jscomp.makeIterator=function(v){var D="undefined"!=typeof Symbol&&Symbol.iterator&&v[Symbol.iterator];return D?D.call(v):$jscomp.arrayIterator(v)};$jscomp.generator={}; +$jscomp.generator.ensureIteratorResultIsObject_=function(v){if(!(v instanceof Object))throw new TypeError("Iterator result "+v+" is not an object");};$jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null}; +$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1};$jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(v){this.yieldResult=v}; +$jscomp.generator.Context.prototype.throw_=function(v){this.abruptCompletion_={exception:v,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype.return=function(v){this.abruptCompletion_={return:v};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(v){this.abruptCompletion_={jumpTo:v};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(v,D){this.nextAddress=D;return{value:v}}; +$jscomp.generator.Context.prototype.yieldAll=function(v,D){v=$jscomp.makeIterator(v);var I=v.next();$jscomp.generator.ensureIteratorResultIsObject_(I);if(I.done)this.yieldResult=I.value,this.nextAddress=D;else return this.yieldAllIterator_=v,this.yield(I.value,D)};$jscomp.generator.Context.prototype.jumpTo=function(v){this.nextAddress=v};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0}; +$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(v,D){this.catchAddress_=v;void 0!=D&&(this.finallyAddress_=D)};$jscomp.generator.Context.prototype.setFinallyBlock=function(v){this.catchAddress_=0;this.finallyAddress_=v||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(v,D){this.nextAddress=v;this.catchAddress_=D||0}; +$jscomp.generator.Context.prototype.enterCatchBlock=function(v){this.catchAddress_=v||0;v=this.abruptCompletion_.exception;this.abruptCompletion_=null;return v};$jscomp.generator.Context.prototype.enterFinallyBlock=function(v,D,I){I?this.finallyContexts_[I]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=v||0;this.finallyAddress_=D||0}; +$jscomp.generator.Context.prototype.leaveFinallyBlock=function(v,D){D=this.finallyContexts_.splice(D||0)[0];if(D=this.abruptCompletion_=this.abruptCompletion_||D){if(D.isException)return this.jumpToErrorHandler_();void 0!=D.jumpTo&&this.finallyAddress_I&&(I=Math.max(I+O,0));Id?g:d},e)}return b(a,1)}function I(a){let b=a.length,c=Array(b),e;for(let d=0;de?e-48:(e&223)-65+10,c[d]=e;return c.reduce((d,h)=>16*d+h,0)}function E(a){if(void 0!=a){var b=[];if(/^(rgb|RGB)/.test(a)){a=a.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",");for(let c of a)b.push(Number((Number(c)/255).toFixed(1)))}else if(/^#/.test(a)){if(/^#[0-9A-F]{3}$/i.test(a)){let c= +"#";a.replace(/[0-9A-F]/ig,function(e){c+=e+e});a=c}/^#[0-9A-F]{6}$/i.test(a)&&a.replace(/[0-9A-F]{2}/ig,function(c){c=I(c);b.push(Number((c/255).toFixed(1)))})}else a instanceof Array&&(b=a);3==b.length&&b.push(1);return b}}function O(a){if(void 0!=a){var b,c=D(a);2==c?b=[[a]]:3==c?b=[a]:4==c&&(b=a);if(b)for(let e of b)for(let d of e)for(let h of d)2==h.length&&h.push(0);return b}}function T(a){if(void 0!=a)return 1==D(a)?[a]:a}function F(a){return a instanceof Array?a:[a]}function K(a){let b=[]; +if(a instanceof Array)for(let c in a)b[c]=a[c].toString();else b=[a.toString()];return b}function S(a){switch(typeof a){case "undefined":return!0;case "string":if(0===a.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g,"").length)return!0;break;case "boolean":if(!a)return!0;break;case "number":if(isNaN(a))return!0;break;case "object":if(null===a||0===a.length)return!0;for(var b in a)return!1;return!0}return!1}function pa(a,b){for(a=a.toString();a.length=q?(e=g,a.apply(h,d),c&&(clearTimeout(c),c=null)):c||(c=setTimeout(()=>{e=+new Date;c=null;a.apply(h,d)},q))}}function Ha(a){switch(a){case da.StartingProcess:return"starting process...";case da.CheckingBusy:return"checking...";case da.ProcessStartFailed:return"process start failed!";case da.ProcessStarted:return"process started";case da.LoadingProject:return"loading project...";case da.ProjectLoaded:return"project loaded"}}function wa(a){"string"===typeof a&&(a=document.getElementById(a)); +return a}function Ia(a){return R.isIOSDevice&&R.isInWeixinBrowser?!1:a==sa.abnormal||a==sa.instance_disconnected}function aa(a,b){return void 0!==a&&null!==a?a:b}function xa(a){return a.keyCode===ea.Shift&&"ShiftRight"===a.code?ea.RightShift:a.keyCode===ea.Control&&"ControlRight"===a.code?ea.RightControl:a.keyCode===ea.Alt&&"AltRight"===a.code?ea.RightAlt:a.keyCode}var p={None:0,Camera_PlayAnimation:1,Camera_StopAnimation:2,Misc_EnterReportMode:3,Misc_ExitReportMode:4,Misc_SetDateTime:5,Camera_GetCamera:6, +Camera_SetState:7,Camera_Set:8,Camera_LookAtBBox:9,Coord_World2Screen:10,Coord_Screen2World:11,InfoTree_SetVisibility:12,InfoTree_Show:13,InfoTree_Hide:14,InfoTree_EnableXRay:15,InfoTree_DisableXRay:16,TileLayer_Add:17,HeatMap_Add:18,HeatMap_Update:19,HeatMap_AddPoints:20,HeatMap_RemovePoints:21,HeatMap_Delete:22,HeatMap_Show:23,HeatMap_Hide:24,HeatMap_Focus:25,HighlightArea_Add:26,HighlightArea_Delete:27,HighlightArea_Update:28,Polygon3D_Add:29,Polygon3D_Delete:30,Misc_AddImageButton:31,Misc_DeleteImageButton:32, +Misc_AddAnimatedImageButton:33,Settings_SetMainUIVisibility:34,Settings_SetMousePickMask:35,Tag_Add:36,Tag_Delete:37,Tag_Update:38,Tag_Clear:39,Tag_Focus:40,Beam_Add:41,Beam_Update:42,Beam_Delete:43,Beam_Clear:44,Beam_Focus:45,Beam_Show:350,Beam_Hide:351,Beam_ShowAll:352,Beam_HideAll:353,RadiationPoint_Add:46,RadiationPoint_Update:47,RadiationPoint_Delete:48,RadiationPoint_Clear:49,Polygon_Add:50,Polygon_Update:51,Polygon_Delete:52,Polygon_Clear:53,Polygon_Highlight:54,Polygon_StopHighlight:325,Polygon_Glow:55, +Polygon_Focus:56,Tag_FocusAll:57,Tag_Show:58,Tag_Hide:59,Tag_ShowAll:60,Tag_HideAll:61,RadiationPoint_Focus:62,RadiationPoint_FocusAll:63,RadiationPoint_Show:64,RadiationPoint_Hide:65,RadiationPoint_ShowAll:66,RadiationPoint_HideAll:67,Polygon_Show:68,Polygon_Hide:69,Polygon3D_Update:70,Polygon3D_Clear:71,Polygon3D_Focus:72,Polygon3D_Show:73,Polygon3D_Hide:74,Polygon3D_Highlight:75,Polygon3D_Glow:76,Polygon3D_StopGlow:77,HighlightArea_Clear:78,HighlightArea_Focus:79,HighlightArea_Show:80,HighlightArea_Hide:81, +Misc_GetVersion:82,TileLayer_Update:83,TileLayer_Delete:84,TileLayer_Focus:85,TileLayer_EnableXRay:86,TileLayer_DisableXRay:87,TileLayer_Show:88,TileLayer_Hide:89,Tag_Get:90,RadiationPoint_Get:91,Polygon_Get:92,Polygon3D_Get:93,HighlightArea_Get:94,TileLayer_Get:95,Beam_Get:96,HeatMap_Get:97,Settings_GetMapMode:98,Settings_SetMapMode:99,Settings_SetMapURL:100,Settings_SetWMTSLayerVisible:320,TileLayer_Actor_Show:101,TileLayer_Actor_Hide:102,TileLayer_Actor_Focus:103,TileLayer_Actor_Highlight:104, +TileLayer_Actor_StopHightlight:105,CustomObject_Add:106,CustomObject_Update:107,CustomObject_Delete:108,CustomObject_Get:109,CustomObject_Focus:110,CustomObject_Show:111,CustomObject_Hide:112,CustomObject_SetTintColor:326,HeatMap_Clear:113,CustomTag_Clear:39,CustomTag_Delete:37,CustomTag_Focus:40,CustomTag_FocusAll:57,CustomTag_Show:58,CustomTag_Hide:59,CustomTag_ShowAll:60,CustomTag_HideAll:61,CustomTag_Add:114,CustomTag_Update:115,CustomTag_Get:116,Polyline_Add:117,Polyline_Update:118,Polyline_Delete:119, +Polyline_Clear:120,Polyline_Focus:121,Polyline_Get:122,Polyline_Show:123,Polyline_Hide:124,Polyline_ShowAll:125,Polyline_HideAll:126,VideoProjection_Add:127,VideoProjection_Update:128,VideoProjection_Delete:129,VideoProjection_Show:130,VideoProjection_Hide:131,VideoProjection_Get:132,VideoProjection_Focus:133,Misc_PlayVideo:134,Misc_StopPlayVideo:135,Weather_SetParams:136,Weather_GetParams:137,Weather_SetDate:138,Weather_GetDate:139,ODLine_Add:140,ODLine_Update:141,ODLine_Delete:142,ODLine_Clear:143, +ODLine_Focus:144,ODLine_Get:145,ODLine_Show:146,ODLine_Hide:147,ODLine_ShowAll:148,ODLine_HideAll:149,Misc_SetWindowResolution:150,Misc_CallBPFunction:151,Settings_SetHighlightColor:152,InfoTree_ShowByGroupId:153,InfoTree_HideByGroupId:154,InfoTree_HighlightByGroupId:155,InfoTree_DeleteByGroupId:156,EditHelper_Start:157,EditHelper_Quit:158,EditHelper_Finish:159,EditHelper_SetParam:160,Settings_SetFovX:161,TileLayer_Actor_ShowAll:162,TileLayer_Actor_HideAll:163,CameraTour_Add:164,CameraTour_Update:165, +CameraTour_Play:166,CameraTour_Stop:167,CameraTour_Delete:168,Tag_PopupWindow_Show:169,Tag_PopupWindow_Hide:170,Tag_PopupWindow_ShowAll:171,Tag_PopupWindow_HideAll:172,Settings_SetOceanColor:173,Misc_ShowAllFoliages:174,Misc_HideAllFoliages:175,Tools_StartPolygonClip:176,Tools_StopClip:177,TileLayer_SetAllowClip:178,Panorama_Add:179,Panorama_Update:180,Panorama_Delete:181,Panorama_Clear:182,Panorama_Focus:183,Panorama_Get:184,Decal_Add:185,Decal_Update:186,Decal_Delete:187,Decal_Clear:188,Decal_Focus:189, +Decal_FocusAll:190,Decal_Get:191,Misc_PlayMovie:192,Misc_StopMovie:193,Tools_SetMeasurement:194,Tools_StartMeasurement:195,Tools_StopMeasurement:196,Viewshed_Add:197,Viewshed_Update:198,Viewshed_Focus:199,Viewshed_Delete:200,Viewshed_Clear:201,Viewshed_Get:202,TileLayer_SetStyle:203,Tools_LineIntersect:204,Coord_PCS2GCS:205,Coord_GCS2PCS:206,DynamicWater_Add:207,DynamicWater_Update:208,DynamicWater_Focus:209,DynamicWater_Delete:210,DynamicWater_Clear:211,DynamicWater_Get:212,DynamicWater_Show:213, +DynamicWater_Hide:214,Quit:215,TileLayer_Actor_Unhighlight:216,InfoTree_Get:217,Reset:218,SaveProject:225,CustomObject_Clear:219,CustomObject_Highlight:220,CustomObject_Unhighlight:221,CustomObject_StopHighlight:222,CustomObject_CallFunction:223,CustomObject_AddByTileLayer:224,Tools_StartPlaneClip:226,Tools_StopPlaneClip:228,Tools_StartVolumeClip:229,Tools_UpdateVolumeClip:230,Tools_StopVolumeClip:231,Tools_StartSkylineAnalysis:232,Tools_StopSkylineAnalysis:233,Tools_ExportSkyline:234,Tools_StartViewshedAnalysis:235, +Tools_StopViewshedAnalysis:236,Camera_Move:237,TileLayer_SetCollision:238,TileLayer_Modifier_Add:239,TileLayer_Modifier_Update:240,TileLayer_Modifier_Delete:241,TileLayer_Modifier_Clear:242,Misc_StartProcess:243,Settings_SetCampassVisible:244,Tools_StartGeometryEdit:245,Tools_StopGeometryEdit:246,Settings_SetEnableInteract:247,Camera_PauseAnimation:248,Camera_ResumeAnimation:249,Settings_SetInteractiveMode:250,CameraTour_Pause:251,CameraTour_Resume:252,Settings_SetTerrainAlpha:253,CustomMesh_Add:254, +CustomMesh_Delete:255,CustomMesh_Clear:256,CustomMesh_Update:257,CustomMesh_Get:258,CustomMesh_Focus:259,CustomMesh_Show:260,CustomMesh_Hide:261,CustomMesh_ShowAll:262,CustomMesh_HideAll:263,Settings_EnableCameraMovingEvent:264,Marker_Add:265,Marker_Update:266,Marker_Get:267,Marker_Delete:268,Marker_Clear:269,Marker_Focus:270,Marker_FocusAll:271,Marker_Show:272,Marker_Hide:273,Marker_ShowAll:274,Marker_HideAll:275,Marker_ShowPopupWindow:276,Marker_HidePopupWindow:277,Marker_ShowAllPopupWindow:278, +Marker_HideAllPopupWindow:279,TileLayer_SetViewportVisible:280,TileLayer_GetObjectIDs:281,Polygon3D_StopHighlight:282,Tools_StartFloodFill:283,Tools_StopFloodFill:284,FloodFill_Add:285,FloodFill_Delete:286,FloodFill_Clear:287,FloodFill_Update:288,FloodFill_Get:289,FloodFill_Focus:290,FloodFill_Show:291,FloodFill_Hide:292,FloodFill_ShowAll:293,FloodFill_HideAll:294,Cesium3DTile_Add:295,Cesium3DTile_Delete:296,Cesium3DTile_Clear:297,Cesium3DTile_Update:298,Cesium3DTile_Get:299,Cesium3DTile_Focus:300, +Cesium3DTile_Show:301,Cesium3DTile_Hide:302,Cesium3DTile_ShowAll:303,Cesium3DTile_HideAll:304,TileLayer_GetActorInfoFromDB:305,ShapeFileLayer_Add:306,ShapeFileLayer_Delete:307,ShapeFileLayer_Clear:308,ShapeFileLayer_Update:309,ShapeFileLayer_Get:310,ShapeFileLayer_Focus:311,ShapeFileLayer_Show:312,ShapeFileLayer_Hide:313,ShapeFileLayer_ShowAll:314,ShapeFileLayer_HideAll:315,ShapeFileLayer_OpenShapeFileLayer:316,Weather_SimulateTime:317,TileLayer_Actor_GetInfo:318,Camera_GetAnimationList:319,TileLayer_CutPolygon_Add:321, +TileLayer_CutPolygon_Update:322,TileLayer_CutPolygon_Delete:323,TileLayer_CutPolygon_Clear:324,Marker3D_Add:327,Marker3D_Delete:328,Marker3D_Clear:329,Marker3D_Update:330,Marker3D_Get:331,Marker3D_Focus:332,Marker3D_Show:333,Marker3D_Hide:334,Marker3D_ShowAll:335,Marker3D_HideAll:336,Camera_GetAnimationImage:337,Tools_ReplaceTexture:338,Tools_RestoreTexture:339,Light_Add:340,Light_Delete:341,Light_Update:343,Light_Get:344,Light_Clear:342,Light_Focus:345,Light_Show:346,Light_Hide:347,Light_ShowAll:348, +Light_HideAll:349,WaterMesh_Add:354,WaterMesh_Update:355,WaterMesh_Delete:356,WaterMesh_Clear:357,WaterMesh_Get:358,WaterMesh_Focus:359,WaterMesh_Show:360,WaterMesh_Hide:361,WaterMesh_ShowAll:362,WaterMesh_HideAll:363,CustomObject_StartMove:364,CustomObject_StopMove:365,CustomObject_OverrideMaterial:366,CustomObject_RestoreMaterial:367,Settings_SetReport:368,Settings_GetReport:369,Settings_SetControl:370,Settings_GetControl:371,Settings_SetPostProcess:372,Settings_GetPostProcess:373,Settings_SetCamera:374, +Settings_GetCamera:375,CustomObject_SetViewportVisible:376,WaterFlowField_Add:377,WaterFlowField_Update:378,WaterFlowField_Delete:379,WaterFlowField_Clear:380,WaterFlowField_Get:381,WaterFlowField_Focus:382,WaterFlowField_Show:383,WaterFlowField_Hide:384,TileLayer_SetViewHeightRange:385,Tools_StartVisiblityAnalysis:386,Tools_StopVisiblityAnalysis:387,Tools_StartViewDomeAnalysis:388,Tools_StopViewDomeAnalysis:389,Tools_StartCutFillAnalysis:390,Tools_StopCutFillAnalysis:391,Tools_StartSunshineAnalysis:392, +Tools_StopSunshineAnalysis:393,Tools_StartTerrainSlopeAnalysis:394,Tools_StopTerrainSlopeAnalysis:395,Tools_StartContourLineAnalysis:396,Tools_StopContourLineAnalysis:397,TileLayer_GetAllFlattenData:398,Marker_SetupPOIAttachment:399,HeatMap3D_Add:400,HeatMap3D_Update:401,HeatMap3D_Focus:402,HeatMap3D_Delete:403,HeatMap3D_Show:404,HeatMap3D_Hide:405,HeatMap3D_Get:406,HeatMap3D_Clear:407,ShapeFileLayer_HighlightFeature:408,ShapeFileLayer_UnHighlightFeature:409,ShapeFileLayer_FocusFeature:410,ShapeFileLayer_GetFeatureInfo:411, +Misc_EnterMultiViewport:412,Misc_ExitMultiViewport:413,Misc_SetActivateMultiViewport:414,Misc_GetActivateMultiViewport:415,Panorama_Enter:416,Panorama_Exit:417,Panorama_Switch:418,VTPKService_Get:419,VTPKService_Set:420,SimulateTest__:421,Settings_CursorAutoSync:422,InfoTree_Focus:423,Marker_ShowByGroupId:424,Marker_HideByGroupId:425,Marker_DeleteByGroupId:426,ImageryLayer_Init:427,ImageryLayer_Add:428,Camera_LockBBox:429,Camera_UnLockBBox:430,Settings_SetWMTSLayerOpacity:431,Camera_EnterEarthCapture:432, +Camera_ExitEarthCapture:433,Tools_AnalysisPopupAttributes:434,Tools_AnalysisCloseAttributes:435,ImageryLayer_Show:436,ImageryLayer_Hide:437,ImageryLayer_Delete:438,Settings_GetInteractiveMode:439,VideoProjection_Clear:440,Misc_UpdateMultiViewport:441,Misc_downloadPakFiles:442,Settings_SetCampassPosition:443,Polygon3D_ShowAll:444,Polygon3D_HideAll:445,GeoJSONLayer_Add:446,GeoJSONLayer_Show:447,GeoJSONLayer_Hide:448,GeoJSONLayer_Delete:449,Vehicle_Add:450,Vehicle_Update:451,Vehicle_AddWayPoints:452, +Vehicle_ClearWayPoints:453,Vehicle_Focus:454,Vehicle_Show:455,Vehicle_Hide:456,Vehicle_Get:457,Vehicle_Delete:458,Vehicle_Clear:459,Vehicle_MoveTo:460,Misc_ConvexHull2D:461,HeatMap_AddVoxels:462,TileLayer_GetCollision:463,TileLayer_SetPointSize:464,Misc_QueryActorOrMaterial:465,CustomObject_StartGlow:466,CustomObject_StopGlow:467,Coord_Transform:468,RegisterJsCommunication:469,UnRegisterJsCommunication:470,Vehicle_CallBatchFunction:471,Camera_FlyAround:472,Marker3D_ShowByGroupId:473,Marker3D_HideByGroupId:474, +Marker3D_DeleteByGroupId:475,Camera_EnterWorldAnimation:476,Camera_ExitWorldAnimation:477,TileLayer_SetDecalAttach:478,Command_End:1E4},ya=!1;(()=>{if(!ya){ya=!0;for(let a in p)p[p[a]]=a}})();const qa={MouseClick:1,MouseMove:2,MouseHover:4},ba={V1:1,V2:2,V3:4,V4:8,All:255};class Ja{constructor(a,b){this.id=a;this.visible=b}}class Ka{constructor(a,b,c,e){this.id=a.toString();this.coordinate=b;this.radius=c;this.heatValue=e}}class La{constructor(a,b,c,e,d,h,g,q,k,f,l,t,w,r){this.id=a.toString();this.coordinate= +b;this.imagePath=c;this.imageSize=e;this.url=d;this.text=h;this.range=g||[1,1E5];this.showLine=!!q;this.textColor=k||[0,0,0,1];this.textBackgroundColor=f||[1,1,1,.85];this.textBorderColor=l||[0,0,0,0];this.textRange=t||1E5;this.hoverImagePath=w;this.autoHidePopupWindow=r||!0}}class Ma{constructor(a,b,c){this.url=a;this.width=b;this.height=c}}class Na{constructor(a,b,c,e,d,h,g,q){this.id=a.toString();this.coordinate=b;this.contentURL=c.url;this.contentSize=[c.width,c.height];this.popupURL=e.url;this.popupSize= +[e.width,e.height];this.pivot=d;this.range=h;this.autoHidePopupWindow=g||!0;this.popupPos=q}}class Oa{constructor(a,b,c,e,d,h){this.id=a.toString();this.coordinates=O(b);this.color=E(c);this.heightRange=e;this.intensity=d;this.depthTest=h||!0}}class Pa{constructor(a,b,c,e,d,h,g,q){this.id=a.toString();this.x=b;this.y=c;this.width=e;this.height=d;this.normalImage=h;this.hoverImage=g;this.tooltip=q}}class Qa{constructor(a,b,c,e,d,h,g,q,k){this.id=a.toString();this.x=b;this.y=c;this.width=e;this.height= +d;this.imageSequecePath=h;this.imageSequeceLength=g;this.loop=!!q;this.interactable=!!k}}class Ra{constructor(a,b,c,e,d,h,g){this.id=a.toString();this.duration=b;this.thickness=c;this.interval=e;this.velocity=d;this.color=E(h);this.coordinates=g}}class Sa{constructor(a,b,c,e,d,h){this.id=a.toString();this.coordinate=b;this.radius=c;this.rippleNumber=e;this.color=E(d);this.brightness=h}}class Ta{constructor(a,b,c,e,d,h,g,q){this.id=a.toString();this.style=b;this.coordinates=O(c);this.color=E(e);this.height= +d;this.intensity=h;this.tillingX=g;this.tillingY=q}}class Ua{constructor(a,b,c,e,d,h,g,q,k,f){this.id=a.toString();this.color=E(b);this.coordinates=c;this.style=void 0==e?0:e;if(0>this.style||5this.style||10{this.isMainThreadBusy? +this._callNextForTimeout(5E3):this.callNext()},a)}}class Q{constructor(a,b,c){this.int=a;this.type=b;this.colorProps=c;this._useBatchUpdate=!1;this._tempUpdateData=[]}_checkCommand(a){a=this.type+a;let b=p[a];void 0==b&&this.int.logWithColor("red",`Invalid command: ${a}`);return b}_convertFilePath(a){return this.int.resourcesPath?a.replace("@path:",this.int.resourcesPath+"/"):a}_processProps(a){a=F(a);for(var b of a)for(let e in b)"string"==typeof b[e]&&b[e].startsWith("@path:")&&(b[e]=this._convertFilePath(b[e])); +for(let e of a)"string"!=typeof e.id&&(e.id=e.id.toString());if(this.colorProps){b=this.colorProps.split("|");for(var c of a)for(let e of b)c.hasOwnProperty(e)&&(c[e]=E(c[e]))}if(-1!=["Polygon","Polygon3D","HighlightArea","DynamicWater"].indexOf(this.type))for(let e of a)e.coordinates=O(e.coordinates);for(let e of a)e.hasOwnProperty("userData")&&(c=e.userData,this._isJsonString(c)&&(e.userData=c.replace(/"/g,"~!@~!@~!@")))}_isJsonString(a){try{return"string"===typeof a?(JSON.parse(a),!0):!1}catch(b){return!1}}_add(a, +b){this._processProps(a);return this.int.call({command:this._checkCommand("_Add"),data:F(a)},b)}_update(a,b){this._processProps(a);return this.int.call({command:this._checkCommand("_Update"),data:F(a)},b)}_delete(a,b){return this.int.call({command:this._checkCommand("_Delete"),ids:K(a)},b)}_clear(a){return this.int.call0(this._checkCommand("_Clear"),a)}_get(a,b){return this.int.call({command:this._checkCommand("_Get"),ids:K(a)},b)}_focus(a,b,c,e,d){"function"==typeof c&&(d=c,c=void 0);"function"== +typeof e&&(d=e,e=null);return this.int.call({command:this._checkCommand("_Focus"),ids:K(a),distance:b||0,flyTime:c,rotation:e},d)}_focusAll(a,b,c,e){"function"==typeof b&&(e=b,b=void 0);"function"==typeof c&&(e=c,c=null);return this.int.call({command:this._checkCommand("_FocusAll"),ids:[],distance:a||0,flyTime:b,rotation:c},e)}_show(a,b){return this.int.call({command:this._checkCommand("_Show"),ids:K(a)},b)}_showAll(a){return this.int.call0(this._checkCommand("_ShowAll"),a)}_hide(a,b){return this.int.call({command:this._checkCommand("_Hide"), +ids:K(a)},b)}_hideAll(a){return this.int.call0(this._checkCommand("_HideAll"),a)}_updateOneProp(a,b,c,e){if(this._useBatchUpdate){e=!1;for(var d of this._tempUpdateData)if(d.id==a.toString()){e=!0;d[b]=c;break}e||(e={},e.id=a.toString(),e[b]=c,this._tempUpdateData.push(e))}else return d={},d.id=a.toString(),d[b]=c,this.update(d,e)}updateBegin(){this._useBatchUpdate=!0;this._tempUpdateData=[]}updateEnd(a){a=this.update(this._tempUpdateData,a);this._tempUpdateData=null;this._useBatchUpdate=!1;return a}test(){alert("test")}} +class ib extends Q{constructor(a){super(a,"Beam","color")}add(a,b){return super._add(a,b)}update(a,b){return super._update(a,b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}showAll(a){return super._showAll(a)}hideAll(a){return super._hideAll(a)}get(a,b){return super._get(a,b)}setDuration(a,b,c){return super._updateOneProp(a,"duration",b,c)}setThickness(a,b,c){return super._updateOneProp(a, +"thickness",b,c)}setInterval(a,b,c){return super._updateOneProp(a,"interval",b,c)}setVelocity(a,b,c){return super._updateOneProp(a,"velocity",b,c)}setColor(a,b,c){return super._updateOneProp(a,"color",E(b),c)}setCoordinates(a,b,c){return super._updateOneProp(a,"coordinates",b,c)}}class jb extends Q{constructor(a){super(a,"CameraTour")}add(a,b){return super._add(a,b)}update(a,b){return super._update(a,b)}delete(a,b){return super._delete(a,b)}play(a,b){return this.int.call({command:p.CameraTour_Play, +ids:K(a)},b)}pause(a){return this.int.call0(p.CameraTour_Pause,a)}resume(a){return this.int.call0(p.CameraTour_Resume,a)}stop(a){return this.int.call({command:p.CameraTour_Stop},a)}setUserData(a,b,c){return super._updateOneProp(a,"userData",b,c)}setDuration(a,b,c){return super._updateOneProp(a,"duration",b,c)}setKeyFrames(a,b,c){return super._updateOneProp(a,"keyFrames",b,c)}setName(a,b,c){return super._updateOneProp(a,"name",b,c)}}class kb extends Q{constructor(a){super(a,"Cesium3DTile")}add(a,b){return super._add(a, +b)}update(a,b){return super._update(a,b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}showAll(a){return super._showAll(a)}hide(a,b){return super._hide(a,b)}hideAll(a){return super._hideAll(a)}get(a,b){return super._get(a,b)}setTileURL(a,b,c){return super._updateOneProp(a,"tileURL",b,c)}}class lb extends Q{constructor(a){super(a,"CustomMesh","color")}add(a,b){return super._add(a,b)}update(a,b){return super._update(a, +b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}get(a,b){return super._get(a,b)}setCoordinates(a,b,c){return super._updateOneProp(a,"coordinates",b,c)}setIndices(a,b,c){return super._updateOneProp(a,"indices",b,c)}setColor(a,b,c){return super._updateOneProp(a,"color",b,c)}}class mb extends Q{constructor(a){super(a,"CustomObject")}add(a,b){return super._add(a, +b)}update(a,b){return super._update(a,b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d,h){"function"==typeof c&&(h=c,c=void 0);"function"==typeof e&&(h=e,e=null);"function"==typeof d&&(h=d,d=0);1a[3]||a[1]>a[4]||a[2]>a[5])return!1}else return!1;return!0}add(a,b,c,e,d,h,g,q,k,f,l){return this._checkBBox(b)? +"undefined"==typeof d||"function"==typeof d?this.int.call({command:p.HeatMap_Add,id:a.toString(),bbox:b,range:c,data:F(e),style:-1},l):0==d?this.int.call({command:p.HeatMap_Add,id:a.toString(),bbox:b,range:c,data:F(e),style:0,textureSize:h,opacityMode:g,opacityRange:q,blur:k,colors:f},l):this.int.call({command:p.HeatMap_Add,id:a.toString(),bbox:b,range:c,data:F(e),style:-1},l):(this.int.logWithColor("red","Invalid bbox value"),!1)}update(a,b,c,e,d){a={command:p.HeatMap_Update,id:a.toString()};if(b){if(!this._checkBBox(b))return this.int.logWithColor("red", +"Invalid bbox value"),!1;a.bbox=b}c&&(a.range=c);e&&(a.data=F(e));return this.int.call(a,d)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}get(a,b){return super._get(a,b)}addPoints(a,b,c){return this.int.call({command:p.HeatMap_AddPoints,id:a,data:F(b)},c)}removePoints(a,b,c){return this.int.call({command:p.HeatMap_RemovePoints,id:a,pointIds:F(b)},c)}setRange(a, +b,c){return this.int.call({command:p.HeatMap_Update,id:a,range:b},c)}setBBox(a,b,c){return this._checkBBox(b)?this.int.call({command:p.HeatMap_Update,id:a,bbox:b},c):(this.int.logWithColor("red","Invalid bbox value"),!1)}}class tb extends Q{constructor(a){super(a,"HeatMap3D")}_checkBBox(a){if(a instanceof Array){if(6!=a.length||a[0]>a[3]||a[1]>a[4]||a[2]>a[5])return!1}else return!1;return!0}add(a,b){return this.int.call({command:p.HeatMap3D_Add,data:F(a)},b)}addVoxels(a,b){return this.int.call({command:p.HeatMap_AddVoxels, +data:F(a)},b)}update(a,b){return this.int.call({command:p.HeatMap3D_Update,data:F(a)},b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}get(a,b){return super._get(a,b)}setDisplayMode(a,b,c){return this.int.call({command:p.HeatMap3D_Update,id:a,displayMode:b},c)}}class ub extends Q{constructor(a){super(a,"HighlightArea","color")}add(a,b){return super._add(a,b)}update(a, +b){return super._update(a,b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}get(a,b){return super._get(a,b)}setColor(a,b,c){return super._updateOneProp(a,"color",E(b),c)}setCoordinates(a,b,c){return super._updateOneProp(a,"coordinates",b,c)}setHeightRange(a,b,c){return super._updateOneProp(a,"heightRange",b,c)}setIntensity(a,b,c){return super._updateOneProp(a, +"intensity",b,c)}setDepthTest(a,b,c){return super._updateOneProp(a,"depthTest",b,c)}}class vb extends Q{constructor(a){super(a,"ImageryLayer")}init(a,b){return this.int.call({command:p.ImageryLayer_Init,xmlPath:a.xmlUrl,layerName:a.layerName,tileMatrixName:a.tileMatrixName,ogcEPSG:a.ogcEPSG,cachePath:a.cachePath,mapMode:a.mapMode,renderMode:a.renderMode},b)}add(a,b){const c=this;return $jscomp.asyncExecutePromiseGeneratorFunction(function*(){return a instanceof Array?new Promise(e=>$jscomp.asyncExecutePromiseGeneratorFunction(function*(){let d; +for(let h of a)if(d=yield c.addOne(h,b),0!=d.result){e(d);break}e(d)})):c.addOne(a,b)})}addOne(a,b){return this.int.call({command:p.ImageryLayer_Add,id:a.id,url:a.url,xmlPath:a.xmlPath,layerName:a.layerName,tileMatrixName:a.tileMatrixName,ogcEPSG:a.ogcEPSG},b)}show(a,b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}delete(a,b){return super._delete(a,b)}}class wb extends Q{constructor(a){super(a,"Light","color")}add(a,b){return super._add(a,b)}update(a,b){return super._update(a,b)}delete(a, +b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}showAll(a){return super._showAll(a)}hide(a,b){return super._hide(a,b)}hideAll(a){return super._hideAll(a)}get(a,b){return super._get(a,b)}}class xb extends Q{constructor(a){super(a,"Marker","fontColor|fontOutlineColor|textBackgroundColor|lineColor")}add(a,b){this._fixMarkerData(a);return super._add(a,b)}_fixMarkerProperty(a){a.textColor&&(a.fontColor=a.textColor); +a.url&&(a.popupURL=a.url);a.dispalyMode&&(a.displayMode=a.dispalyMode);S(a.displayMode)&&(a.displayMode=4);a.popupURL&&!a.popupSize&&(a.popupSize=[600,400]);0==a.showLine&&(a.lineSize=[0,0]);1!=a.showLine||null!=a.lineSize&&void 0!=a.lineSize||(a.lineSize=[2,100]);4==a.displayMode&&0{za="zh"===a?"zh":"en";ta={};a="zh"==za;for(let b in Aa){let c=Aa[b];ta[b]=a?c[0]:c[1]}for(let b of H.onLanguageChangedCallbacks)"function"==typeof b&&b()};H.getString=a=>ta[a];class Mb{constructor(a){this.int=a;this._useOldDataFormat=!1}useOldDataFormat(a){this._useOldDataFormat=a||!0}get(a){return this.int.call0(p.Camera_GetCamera,a)}_setByArray(a,b,c){return this.set(a[0],a[1],a[2],a[3],a[4],b,c)}_setByObject(a,b,c){return this.set(a.x,a.y,a.z,a.pitch,a.yaw,b,c)}set(a,b,c,e,d, +h,g){if(a instanceof Array&&5<=a.length)return this._setByArray(a,b,c);if("object"==typeof a&&a.hasOwnProperty("x"))return this._setByObject(a,b,c);"function"==typeof h&&(g=h,h=void 0);if(this._useOldDataFormat){let q=e;e=d;d=q}return this.int.call({command:p.Camera_Set,coordinate:[a,b,c],pitch:e||0,yaw:d||0,flyTime:h},g)}lookAt(a,b,c,e,d,h,g,q){"function"==typeof g&&(q=g,g=void 0);if(this._useOldDataFormat){let k=d;d=h;h=k}return this.int.call({command:p.Camera_Set,coordinate:[a,b,c],distance:e, +pitch:d||0,yaw:h||0,flyTime:g},q)}lookAtBBox(a,b,c,e,d){"function"==typeof e&&(d=e,e=void 0);if(this._useOldDataFormat){let h=b;b=c;c=h}return this.int.call({command:p.Camera_LookAtBBox,bbox:a,pitch:b||0,yaw:c||0,flyTime:e},d)}playAnimation(a,b){return this.int.call({command:p.Camera_PlayAnimation,id:a},b)}stopAnimation(a){return this.int.call0(p.Camera_StopAnimation,a)}pauseAnimation(a){return this.int.call0(p.Camera_PauseAnimation,a)}resumeAnimation(a){return this.int.call0(p.Camera_ResumeAnimation, +a)}getAnimationList(a){return this.int.call0(p.Camera_GetAnimationList,a)}getAnimationImage(a,b){return this.int.call({command:p.Camera_GetAnimationImage,name:a},b)}moveForward(a){return this.int.call({command:p.Camera_Move,moveForward:!0},a)}moveBackward(a){return this.int.call({command:p.Camera_Move,moveBackward:!0},a)}moveLeft(a){return this.int.call({command:p.Camera_Move,moveLeft:!0},a)}moveRight(a){return this.int.call({command:p.Camera_Move,moveRight:!0},a)}moveUp(a){return this.int.call({command:p.Camera_Move, +moveUp:!0},a)}moveDown(a){return this.int.call({command:p.Camera_Move,moveDown:!0},a)}turnLeft(a){return this.int.call({command:p.Camera_Move,turnLeft:!0},a)}turnRight(a){return this.int.call({command:p.Camera_Move,turnRight:!0},a)}turnUp(a){return this.int.call({command:p.Camera_Move,turnUp:!0},a)}turnDown(a){return this.int.call({command:p.Camera_Move,turnDown:!0},a)}stop(a){return this.int.call({command:p.Camera_Move,stop:!0},a)}getEulerAngle(a,b){const c=360/(2*Math.PI);let e=b[0]-a[0],d=b[1]- +a[1];return[Math.atan2(b[2]-a[2],Math.sqrt(e*e+d*d))*c,Math.atan2(e,d)*c-90,0]}lockByBBox(a,b){return this.int.call({command:p.Camera_LockBBox,bbox:a},b)}unlock(a){return this.int.call({command:p.Camera_UnLockBBox},a)}flyAround(a,b,c,e,d){return this.int.call({command:p.Camera_FlyAround,coordinate:a,rotation:b||[0,90,0],distance:c||1E3,time:e||10},d)}enterWorld(a){return this.int.call({command:p.Camera_ExitWorldAnimation},a)}exitWorld(a){return this.int.call({command:p.Camera_EnterWorldAnimation}, +a)}}class Nb{constructor(a){this.int=a}screen2World(a,b,c){return this.int.call({command:p.Coord_Screen2World,screenPosition:[a,b]},c)}world2Screen(a,b,c,e){return this.int.call({command:p.Coord_World2Screen,worldlocation:[a,b,c]},e)}gcs2pcs(a,b,c){"function"==typeof b&&(c=b);S(b)&&(b=1);if(1==b)return this.int.call({command:p.Coord_GCS2PCS,coordinates:T(a)},c);2==b?this.transform(T(a),2,0,c):3==b?this.transform(T(a),3,0,c):console.error("\u672a\u77e5\u5750\u6807\u7cfb\u7c7b\u578b")}pcs2gcs(a,b,c){"function"== +typeof b&&(c=b);S(b)&&(b=1);if(1==b)return this.int.call({command:p.Coord_PCS2GCS,coordinates:T(a)},c);2==b?this.transform(T(a),0,2,c):3==b?this.transform(T(a),0,3,c):console.error("\u672a\u77e5\u5750\u6807\u7cfb\u7c7b\u578b")}transform(a,b,c,e){return this.int.call({command:p.Coord_Transform,coordinates:T(a),src:b,dest:c},e)}}class Ob{constructor(a){this.int=a}start(a){return this.int.call0(p.EditHelper_Start,a)}cancel(a){return this.int.call0(p.EditHelper_Quit,a)}finish(a,b){return this.int.call({command:p.EditHelper_Finish, +withOffset:a||!0},b)}setParam(a,b,c,e){return this.int.call({command:p.EditHelper_SetParam,lineType:a,buildType:b,color:E(c)},e)}}class Pb{constructor(a){this.int=a}setVisibility(a,b){return this.int.call({command:p.InfoTree_SetVisibility,layers:F(a)},b)}show(a,b){return this.int.call({command:p.InfoTree_Show,ids:K(a)},b)}hide(a,b){return this.int.call({command:p.InfoTree_Hide,ids:K(a)},b)}enableXRay(a,b,c){return this.int.call({command:p.InfoTree_EnableXRay,ids:F(a),color:E(b)},c)}disableXRay(a, +b){return this.int.call({command:p.InfoTree_DisableXRay,ids:F(a)},b)}showByGroupId(a,b){return this.int.call({command:p.InfoTree_ShowByGroupId,ids:K(a)},b)}hideByGroupId(a,b){return this.int.call({command:p.InfoTree_HideByGroupId,ids:K(a)},b)}highlightByGroupId(a,b){return this.int.call({command:p.InfoTree_HighlightByGroupId,ids:K(a)},b)}deleteByGroupId(a,b){return this.int.call({command:p.InfoTree_DeleteByGroupId,ids:K(a)},b)}get(a){return this.int.call0(p.InfoTree_Get,a)}focus(a,b){return this.int.call({command:p.InfoTree_Focus, +ids:K(a)},b)}}class Qb{constructor(a){this.int=a;this.apiVersion="5.4";this.apiVersionServer=""}isApiVersionMatched(){return"5.4"==this.apiVersionServer}addImageButtons(a,b){return this.int.call({command:p.Misc_AddImageButton,data:F(a)},b)}deleteImageButtons(a,b){return this.int.call({command:p.Misc_DeleteImageButton,ids:K(a)},b)}addAnimatedImageButtons(a,b){return this.int.call({command:p.Misc_AddAnimatedImageButton,data:F(a)},b)}setApiVersionReceived(a){this.int.onApiVersionReceived=a}playVideo(a, +b,c,e,d,h,g){return this.int.call({command:p.Misc_PlayVideo,data:[{id:a.toString(),position:[b,c],size:[e,d],url:h}]},g)}stopPlayVideo(a,b){return this.int.call({command:p.Misc_StopPlayVideo,ids:K(a)},b)}playMovie(a,b,c){"function"==typeof b&&(c=b,b=!1);return this.int.call({command:p.Misc_PlayMovie,loop:b,url:a},c)}stopMovie(a){return this.int.call({command:p.Misc_StopMovie},a)}setWindowResolution(a,b,c){return this.int.call({command:p.Misc_SetWindowResolution,cx:a,cy:b,mode:0},c)}callBPFunction(a, +b){return this.int.call({command:p.Misc_CallBPFunction,data:F(a)},b)}enterReportMode(a){return this.int.call0(p.Misc_EnterReportMode)}exitReportMode(a){return this.int.call0(p.Misc_ExitReportMode,a)}showAllFoliages(a){return this.int.call0(p.Misc_ShowAllFoliages,a)}hideAllFoliages(a){return this.int.call0(p.Misc_HideAllFoliages,a)}startProcess(a,b,c,e){"function"==typeof c&&(e=c,c=!0);return this.int.call({command:p.Misc_StartProcess,appName:a,commandLine:b,visible:c},e)}enterMultiViewportMode(a, +b,c,e){if(null==b||void 0==b)b="#DEA309";if(null==c||void 0==c)c=2;return this.int.call({command:p.Misc_EnterMultiViewport,type:a,lineColor:E(b),lineThickness:c},e)}exitMultiViewportMode(a){return this.int.call({command:p.Misc_ExitMultiViewport},a)}setActiveViewport(a,b){return this.int.call({command:p.Misc_SetActivateMultiViewport,viewIndex:F(a)},b)}getActiveViewport(a){return this.int.call({command:p.Misc_GetActivateMultiViewport},a)}setMultiviewportInteractSync(a,b){this.setCameraFollow4Viewport(a, +b)}setCameraFollow4Viewport(a,b){return this.int.call({command:p.Misc_UpdateMultiViewport,moverTogether:a},b)}downloadPakFiles(a,b){return this.int.call({command:p.Misc_downloadPakFiles,ids:F(a)},b)}getConvexPolygon(a,b){return this.int.call({command:p.Misc_ConvexHull2D,data:F(a)},b)}getMaterial(a,b){return this.int.call({command:p.Misc_QueryActorOrMaterial,idOrPaths:F(a)},b)}getBPFunction(a,b){return this.int.call({command:p.Misc_QueryActorOrMaterial,idOrPaths:F(a)},b)}startPolygonClip(a,b,c){return this.int.tools.startPolygonClip(a, +b,c)}stopClip(a){return this.int.tools.stopClip(a)}playAnimation(a,b){return this.int.camera.playAnimation(a,b)}stopAnimation(a){return this.int.camera.stopAnimation(a)}setDateTime(a,b,c,e,d,h,g){return this.int.weather.setDateTime(a,b,c,e,d,h,g)}setQueryToolState(a,b){return this.int.call({"c.ommand":p.Settings_SetMousePickMask,mouseClick:a},b)}setCampassVisible(a,b){return this.int.settings.setCampassVisible(a,b)}setMainUIVisibility(a,b){return this.int.settings.setMainUIVisibility(a,b)}setMousePickMask(a, +b){return this.int.settings.setMousePickMask(a,b)}}class Rb{constructor(a){this.int=a}setMapMode(a,b,c){b=b||{};return this.int.call({command:p.Settings_SetMapMode,mode:a,serviceType:b.serviceType||0,coordType:b.coordType||0,mapPoint:b.mapPoint||[0,0],longitude:b.longitude||0,latitude:b.latitude||0,cache:b.cache||":memory:",style:b.style||"mapbox://styles/mapbox/streets-v10",groundHeight:b.groundHeight||0,renderMode:b.renderMode||0,decalMode:b.decalMode||1,serverURL:b.serverURL,coordOrder:b.coordOrder, +maxLevel:b.maxLevel},c)}getMapMode(a){return this.int.call0(p.Settings_GetMapMode,a)}setWMTSLayerVisible(a,b){this.setwmtsLayerVisible(a,b)}setwmtsLayerVisible(a,b){return this.int.call({command:p.Settings_SetWMTSLayerVisible,data:F(a)},b)}setWMTSLayerOpacity(a,b){return this.int.call({command:p.Settings_SetWMTSLayerOpacity,data:F(a)},b)}setMapURL(a,b){return this.int.call({command:p.Settings_SetMapURL,url:a},b)}highlightColor(a,b){return this.setHighlightColor(a,b)}setHighlightColor(a,b){return this.int.call({command:p.Settings_SetHighlightColor, +color:E(a)},b)}setFovX(a,b){return this.int.call({command:p.Settings_SetFovX,value:a},b)}setOceanColor(a,b){return this.int.call({command:p.Settings_SetOceanColor,color:E(a)},b)}setEnableInteract(a,b){return this.int.call({command:p.Settings_SetEnableInteract,enableInteract:a},b)}setInteractiveMode(a,b){return this.int.call({command:p.Settings_SetInteractiveMode,mode:a},b)}getInteractiveMode(a){return this.int.call({command:p.Settings_GetInteractiveMode},a)}setCampassVisible(a,b){return this.int.call({command:p.Settings_SetCampassVisible, +visible:a},b)}setCampassPosition(a,b,c){return this.int.call({command:p.Settings_SetCampassPosition,position:[a,b]},c)}restoreCampassPosition(a){this.setCampassPosition(-1,-1)}setMainUIVisibility(a,b){return this.int.call({command:p.Settings_SetMainUIVisibility,visible:a},b)}setMousePickMask(a,b){let c=!1,e=!1,d=!1;a&qa.MouseClick&&(c=!0);a&qa.MouseMove&&(e=!0);a&qa.MouseHover&&(d=!0);return this.int.call({command:p.Settings_SetMousePickMask,mouseClick:c,mouseMove:e,mouseHover:d},b)}setTerrainAlpha(a, +b){return this.int.call({command:p.Settings_SetTerrainAlpha,alpha:a},b)}setEnableCameraMovingEvent(a,b,c){return this.int.call({command:p.Settings_EnableCameraMovingEvent,bEnable:a,monitorThreshold:b},c)}setLabelLayer(a,b){return this.int.call({command:p.VTPKService_Set,vtpk:a},b)}getLabelLayer(a){return this.int.call({command:p.VTPKService_Get},a)}removeLabelLayer(a){return this.int.call({command:p.VTPKService_Set,vtpk:""},a)}setRenderedCursorVisible(a,b){this.setCursorAutoSync(a,b)}setCursorAutoSync(a, +b){return this.int.call({command:p.Settings_CursorAutoSync,useSoftwareCursor:a},b)}}class Sb{constructor(a){this.int=a}setReportMode(a,b,c,e){return this.int.call({command:p.Settings_SetReport,alignment:a,playMode:b,moveInOtherView:c},e)}getReportMode(a){return this.int.call({command:p.Settings_GetReport},a)}setControlMode(a,b,c,e,d){return this.int.call({command:p.Settings_SetControl,speed:a,yawSpeed:b,rotateSelf:c,useFemale:e},d)}getControlMode(a){return this.int.call({command:p.Settings_GetControl}, +a)}setPostProcessMode(a,b){let c=1E3,e=1E3;0<=a.terrainGlobalAlpha&&1>=a.terrainGlobalAlpha&&(c=1E3*a.terrainGlobalAlpha);0<=a.osgbGlobalAlpha&&1>=a.osgbGlobalAlpha&&(e=1E3*a.osgbGlobalAlpha);return this.int.call({command:p.Settings_SetPostProcess,contrast:a.contrast,saturation:a.saturation,lensFlareIntensity:a.lensFlareIntensity,ambientIntensity:a.ambientIntensity,bloomIntensity:a.bloomIntensity,lutMode:a.lutMode,lutIntensity:a.lutIntensity,darkCorner:a.darkCorner,screenPercentage:a.screenPercentage, +terrainGlobalAlpha:c,terrainGlobalLitStatus:a.terrainGlobalLitStatus,osgbGlobalLitStatus:a.osgbGlobalLitStatus,osgbGlobalAlpha:e,antiAliasing:a.antiAliasing,tonemapper:a.tonemapper,postProcessEffects:a.postProcessEffects,dofMode:a.dofMode,wireThickness:a.wireThickness,receiveDecalMode:a.receiveDecalMode},b)}getPostProcessMode(a){return this.int.call({command:p.Settings_GetPostProcess},a)}setCameraMode(a,b,c,e,d){e&&"function"==typeof e&&(d=e);return this.int.call({command:p.Settings_SetCamera,nearClipPlane:a, +fovH:b,minCamHeight:c,maxCamHeight:e},d)}getCameraMode(a){return this.int.call({command:p.Settings_GetCamera},a)}setMapMode(a,b,c){b=b||{};return this.int.call({command:p.Settings_SetMapMode,mode:a,serviceType:b.serviceType||0,coordType:b.coordType||0,mapPoint:b.mapPoint||[0,0],longitude:b.longitude||0,latitude:b.latitude||0,cache:b.cache||":memory:",style:b.style||"mapbox://styles/mapbox/streets-v10",groundHeight:b.groundHeight||0,renderMode:b.renderMode||0,decalMode:b.decalMode||1,serverURL:b.serverURL, +coordOrder:b.coordOrder,maxLevel:b.maxLevel},c)}getMapMode(a){return this.int.call0(p.Settings_GetMapMode,a)}}class Tb{constructor(a){this.int=a}startPolygonClip(a,b,c){return this.int.call({command:p.Tools_StartPolygonClip,data:F({id:"0",coordinates:O(a),toggleImageCut:b})},c)}startPlaneClip(a,b,c,e,d){return this.int.call({command:p.Tools_StartPlaneClip,location:a,rotation:b,isShowPlane:c,isEdit:e},d)}startVolumeClip(a,b,c,e,d,h){return this.int.call({command:p.Tools_StartVolumeClip,bbox:a,rotation:d, +value:b,isShowPlane:c,isEdit:e},h)}updateVolumeClip(a,b,c,e,d,h){return this.int.call({command:p.Tools_UpdateVolumeClip,bbox:a,rotation:d,value:b,isShowPlane:c,isEdit:e},h)}stopClip(a){return this.stopPolygonClip(a)}stopPolygonClip(a){return this.int.call0(p.Tools_StopClip,a)}stopPlaneClip(a){return this.int.call({command:p.Tools_StopPlaneClip},a)}stopVolumeClip(a){return this.int.call({command:p.Tools_StopVolumeClip},a)}setMeasurement(a,b,c){b=b||{};return this.int.call({command:p.Tools_SetMeasurement, +type:a,pointSize:b.pointSize,textSize:b.textSize,textColor:E(b.textColor),pointColor:E(b.pointColor),lineColor:E(b.lineColor),areaColor:E(b.areaColor),showCoordinateText:b.showCoordinateText},c)}startMeasurement(a){return this.int.call0(p.Tools_StartMeasurement,a)}stopMeasurement(a){return this.int.call0(p.Tools_StopMeasurement,a)}lineIntersect(a,b,c){return this.int.call({command:p.Tools_LineIntersect,data:[{start:a,end:b}],highPrecision:!1,returnDetails:!0},c)}linesIntersect(a,b,c,e){return this.int.call({command:p.Tools_LineIntersect, +data:F(a),highPrecision:b,returnDetails:c},e)}startGeometryEdit(a,b,c){return this.int.call({command:p.Tools_StartGeometryEdit,id:a,type:b},c)}stopGeometryEdit(a){return this.int.call0(p.Tools_StopGeometryEdit,a)}startSkylineAnalysis(a,b){a=a||{};a.outlineColor&&(a.outlineColor=E(a.outlineColor));a.sceneColor&&(a.sceneColor=E(a.sceneColor));a.skylineColor&&(a.skylineColor=E(a.skylineColor));a.backgroundColor&&(a.backgroundColor=E(a.backgroundColor));if(a.tileLayers){a.tileLayers=F(a.tileLayers);for(let c of a.tileLayers)c.hasOwnProperty("color")&& +(c.color=E(c.color))}a.command=p.Tools_StartSkylineAnalysis;return this.int.call(a,b)}stopSkylineAnalysis(a){return this.int.call0(p.Tools_StopSkylineAnalysis,a)}exportSkyline(a,b,c,e){c=c||{};c.skylineColor&&(c.skylineColor=E(c.skylineColor));c.backgroundColor&&(c.backgroundColor=E(c.backgroundColor));if(c.tileLayers){c.tileLayers=F(c.tileLayers);for(let d of c.tileLayer)d.hasOwnProperty("color")&&(d.color=E(d.color))}return this.int.call({command:p.Tools_ExportSkyline,path:a,size:b,skylineColor:c.skylineColor, +backgroundColor:c.backgroundColor},e)}startViewshedAnalysis(a,b){a=a||{};a.visibleColor&&(a.visibleColor=E(a.visibleColor));a.invisibleColor&&(a.invisibleColor=E(a.invisibleColor));a.command=p.Tools_StartViewshedAnalysis;return this.int.call(a,b)}stopViewshedAnalysis(a){return this.int.call0(p.Tools_StopViewshedAnalysis,a)}startVisiblityAnalysis(a,b){a=a||{};a.visibleColor&&(a.visibleColor=E(a.visibleColor));a.invisibleColor&&(a.invisibleColor=E(a.invisibleColor));a.command=p.Tools_StartVisiblityAnalysis; +return this.int.call(a,b)}stopVisiblityAnalysis(a){return this.int.call0(p.Tools_StopVisiblityAnalysis,a)}startViewDomeAnalysis(a,b){a=a||{};a.visibleColor&&(a.visibleColor=E(a.visibleColor));a.invisibleColor&&(a.invisibleColor=E(a.invisibleColor));a.command=p.Tools_StartViewDomeAnalysis;return this.int.call(a,b)}stopViewDomeAnalysis(a){return this.int.call0(p.Tools_StopViewDomeAnalysis,a)}startCutFillAnalysis(a,b){a=a||{};a.cutLineColor&&(a.cutLineColor=E(a.cutLineColor));a.fillLineColor&&(a.fillLineColor= +E(a.fillLineColor));a.cutPointColor&&(a.cutPointColor=E(a.cutPointColor));a.fillPointColor&&(a.fillPointColor=E(a.fillPointColor));a.gridColor&&(a.gridColor=E(a.gridColor));a.command=p.Tools_StartCutFillAnalysis;return this.int.call(a,b)}stopCutFillAnalysis(a){return this.int.call0(p.Tools_StopCutFillAnalysis,a)}startSunshineAnalysis(a,b){var c=/^(0?[0-9]|1[0-9]|[2][0-3]):(0?[0-9]|[1-5][0-9])$/;if(null==a||void 0==a)console.error("\u53c2\u6570\u4e0d\u80fd\u4e3a\u7a7a");else{let e=a.startTime,d=a.endTime; +if(null==e||""==e||null==d||""==d)console.error("\u65f6\u95f4\u53c2\u6570\u683c\u5f0f\u4e0d\u6b63\u786e");else if(e.match(c)&&d.match(c))if(e.split(":"))if(a.startHour=parseInt(e.split(":")[0]),a.startMinute=parseInt(e.split(":")[1]),d.split(":"))if(a.endHour=parseInt(d.split(":")[0]),a.endMinute=parseInt(d.split(":")[1]),a.startHour>a.endHour)console.error("\u5f00\u59cb\u65f6\u95f4\u4e0d\u80fd\u5927\u4e8e\u7ed3\u675f\u65f6\u95f4");else{if(a.startHour==a.endHour){if(a.startMinute==a.endMinute){console.error("\u5f00\u59cb\u65f6\u95f4\u4e0d\u80fd\u7b49\u4e8e\u7ed3\u675f\u65f6\u95f4"); +return}if(a.startMinute>a.endMinute){console.error("\u5f00\u59cb\u65f6\u95f4\u4e0d\u80fd\u5927\u4e8e\u7ed3\u675f\u65f6\u95f4");return}}S(a.groundElevation)||(c=a.groundElevation,!isNaN(parseFloat(c))&&isFinite(c)&&(a.undersideHeight=a.groundElevation,delete a.groundElevation));a.command=p.Tools_StartSunshineAnalysis;return this.int.call(a,b)}else console.error("\u53c2\u6570endTime\u65f6\u95f4\u683c\u5f0f\u4e0d\u6b63\u786e");else console.error("\u53c2\u6570startTime\u65f6\u95f4\u683c\u5f0f\u4e0d\u6b63\u786e"); +else console.error("\u65f6\u95f4\u53c2\u6570\u683c\u5f0f\u4e0d\u6b63\u786e")}}stopSunshineAnalysis(a){return this.int.call0(p.Tools_StopSunshineAnalysis,a)}startTerrainSlopeAnalysis(a,b){a.command=p.Tools_StartTerrainSlopeAnalysis;return this.int.call(a,b)}stopTerrainSlopeAnalysis(a){return this.int.call0(p.Tools_StopTerrainSlopeAnalysis,a)}startContourLineAnalysis(a,b){a.command=p.Tools_StartContourLineAnalysis;return this.int.call(a,b)}stopContourLineAnalysis(a){return this.int.call0(p.Tools_StopContourLineAnalysis, +a)}startFloodFill(a,b){a=a||{};a.color&&(a.color=E(a.color));a.command=p.Tools_StartFloodFill;return this.int.call(a,b)}stopFloodFill(a){return this.int.call0(p.Tools_StopFloodFill,a)}replaceTextureByVideo(a,b,c){return this.int.call({command:p.Tools_ReplaceTexture,texturePackage:a,newTexture:b,type:1},c)}replaceTextureByImage(a,b,c){return this.int.call({command:p.Tools_ReplaceTexture,texturePackage:a,newTexture:b,type:2},c)}replaceTextureByUrl(a,b,c){return this.int.call({command:p.Tools_ReplaceTexture, +texturePackage:a,newTexture:b,type:3},c)}restoreTexture(a,b){return this.int.call({command:p.Tools_RestoreTexture,ids:F(a)},b)}showPanel(a,b,c){this.showAnalysisPanel(a,b,c)}hidePanel(a){this.hideAnalysisPanel(a)}showAnalysisPanel(a,b,c){return this.int.call({command:p.Tools_AnalysisPopupAttributes,type:a,position:b},c)}hideAnalysisPanel(a){return this.int.call({command:p.Tools_AnalysisCloseAttributes},a)}}class Ub{constructor(a){this.int=a}getParams(a){return this.int.call0(p.Weather_GetParams,a)}_setParam(a, +b){return this.int.call({command:p.Weather_SetParams,data:a},b)}setDateTime(a,b,c,e,d,h,g){return this.int.call({command:p.Weather_SetDate,year:a,month:b,day:c,hour:e,minute:d,daynightLoop:h},g)}getDateTime(a){return this.int.call0(p.Weather_GetDate,a)}simulateTime(a,b,c,e){let d=0,h=0,g=0,q=0;a instanceof Array?(0this.sendApi(c))}setHost(a,b){this.url=`ws://${a}:${b}`}connectWebSocket(){if(!this.player){this.log(`Connecting: ${this.url}`);if("undefined"==typeof window)this.websocket=new (require("ws"))(this.url);else{if(!("WebSocket"in window)){console.error("Not Support WebSocket!");return}this.websocket=new WebSocket(this.url)}this.websocket.onopen= +()=>this.onConnectionOpen();this.websocket.onmessage=a=>this.onConnectionMessage(a.data);this.websocket.onclose=a=>this.onConnectionClose(a);this.websocket.onerror=a=>this.onConnectionError(a)}}setEventCallback(a){this.options.onEvent=a}destroy(){this.isDestroyed=!0;this.player&&this.player.destroy();this.websocket&&(this.websocket.close(),this.websocket=null)}reset(a){return this.call0(p.Reset,a)}saveProject(a){return this.call0(p.SaveProject,a)}registerTick(a,b,c){b=b||{};"__execute__"!=a&&(b.func= +"tick");this.call({command:p.RegisterJsCommunication,id:this.tickMarkerId,url:a,func:b.func,x:b.x||4,y:b.y||4,width:b.width||400,height:b.height||300,visible:b.visible||!1},c)}removeTick(a){this.call({command:p.UnRegisterJsCommunication,ids:[this.tickMarkerId]},a)}showTickWindow(a,b){this.isCalledInCEF?ue.dtspoi.showtickwindow(a):a?this.registerTick("__show__",{},b):this.registerTick("",{},b)}executeJsInTickPage(a,b){this.registerTick("__execute__",{func:a},b)}getVersion(){return"5.4.0508"}initInterface(){this.camera= +new Mb(this);this.coord=new Nb(this);this.layers=this.infoTree=new Pb(this);this.ct=this.cameraTour=new jb(this);this.tl=this.tileLayer=new Hb(this);this.tag=new Gb(this);this.marker=new xb(this);this.marker3d=new yb(this);this.ctag=this.customTag=new nb(this);this.rp=this.radiationPoint=new Eb(this);this.cm=this.customMesh=new lb(this);this.wm=this.waterMesh=new Lb(this);this.waterFlowField=new Kb(this);this.wff=this.WaterFlowField;this.line=this.polyline=new Db(this);this.ol=this.odline=new zb(this); +this.p3d=this.polygon3d=new Cb(this);this.polygon=new Bb(this);this.hm=this.heatmap=new sb(this);this.hm3d=this.heatmap3d=new tb(this);this.beam=new ib(this);this.ha=this.highlightArea=new ub(this);this.co=this.customObject=new mb(this);this.vp=this.videoProjection=new Jb(this);this.panorama=new Ab(this);this.decal=new ob(this);this.dw=this.dynamicWater=new pb(this);this.ff=this.floodFill=new qb(this);this.c3d=this.cesium3DTileset=new kb(this);this.shapeFile=this.shp=this.shapeFileLayer=new Fb(this); +this.light=new wb(this);this.imagery=this.imageryLayer=new vb(this);this.geoJSON=this.geoJSONLayer=new rb(this);this.vc=this.vehicle=new Ib(this);this.misc=new Qb(this);this.tools=new Tb(this);this.settings=new Rb(this);this.weather=new Ub(this);this.eh=this.editHelper=new Ob(this);this.sp=this.settingsPanel=new Sb(this)}_getCallbackIndex(){return++this.callbackIndex}call0(a,b){return this.call({command:a},b)}call(a,b){if(!this.isConnected)return this.logWithColor("red","Not connected!"),b?void 0: +Promise.reject("Not connected!");if(void 0==a.command||a.command==p.None)return this.logWithColor("red","command is undefined or None"),b?void 0:Promise.reject("command is undefined or None");a.timestamp=Date.now();a.callbackIndex=this._getCallbackIndex();a.__command=p[a.command]||"Unknown";a.__version=this.getVersion();null===b&&(a.__noResponse=!0);let c=a.command+"_"+a.callbackIndex;b&&"function"==typeof b&&(this.callbackMap[c]=b);if(this.isCalledInCEF&&null===b)return delete a.__noResponse,this.callbackMap[c]= +null,this.sendApi(a),a;let e=JSON.stringify(a);this.log("");this.logWithColor("RoyalBlue",`Request: ${p[a.command]||"Unknown"}`,!0);this.logWithColor("green","\uff08"+(new Date(a.timestamp)).toLocaleTimeString()+"\uff09");this.logWithColor("gray",`${e}`);if(b||null===b)this.apiQueue.push(a);else return new Promise(d=>{this.callbackMap[c]=d;this.apiQueue.push(a)})}sendApi(a){this.isCalledInCEF?ue.dtspoi.execute(JSON.stringify(a)):this.player?this.player.sendApi(a):this.sendStringByWS(a)}sendStringByWS(a){if(a){a= +JSON.stringify(a);var b=a.length;if(16777216>=b)this.websocket.send(a);else{var c=Math.ceil(b/16777216),e=[];for(let d=0;dthis.savedCamera=b.camera)}}onReady(){if("function"==typeof this.options.onReady)this.options.onReady();this.call({command:p.Misc_GetVersion});if(this.player)this.player.onApiReady()}log(a,b,c){if("function"==typeof this.options.onLog)this.options.onLog(a,b,c)}logWithColor(a,b,c){this.log(b,c,a)}onConnectionOpen(){this.isConnected=!0;this.logWithColor("blue","Connected!")}onConnectionClose(a){this.isConnected=!1;this.logWithColor("red",`Connection closed! code: ${a.code|| +"-"}, reason: ${1006==a.code?H.getString("Disconnect"):a.reason||a.message||"-"}`);this.log("");this.logWithColor("SpringGreen","Reconnecting...");this.isDestroyed||this.player||this.connectWebSocket()}onConnectionError(a){console.error("WebSocket error observed")}onConnectionMessage(a,b){a=a.replace(/~!@~!@~!@/g,'\\"');this.log("");let c=null;try{c=JSON.parse(a)}catch(d){this.isCalledInCEF?(document.writeln(d.message),document.writeln("
"),document.writeln(a)):(console.error(d.message),this.log("Response: [Unknown]")); +return}if(c.command==p.Misc_GetVersion){this.misc.apiVersionServer=c.version||c.versionType;if("5.4"!=this.misc.apiVersionServer){var e=H.getString("VersionMismatch").format("5.4",this.misc.apiVersionServer);console.warn(e);"undefined"!=typeof window&&alert(e)}if("function"==typeof this.options.onApiVersion)this.options.onApiVersion(this.misc.apiVersionServer)}if(c.command)this.apiQueue.callNext(c.callbackIndex),e=Date.now()-c.timestamp,this.logWithColor("RoyalBlue",`Response: ${p[c.command]||"Unknown"}`, +!0),this.logWithColor("green",` (${H.getString("TimeConsuming")}${e}ms)`),this.logWithColor("gray",`${H.getString("RequestTime")}${(new Date(c.timestamp)).toLocaleTimeString()}`,!0),this.logWithColor("gray",` ${H.getString("ResponseTime")}${(new Date(Date.now())).toLocaleTimeString()}`,!0),this.logWithColor("gray",` ${H.getString("MessageLength")}${a.length}`),a=c.command+"_"+c.callbackIndex,(e=this.callbackMap[a])?(e(c),delete this.callbackMap[a]):null===e&&"function"===typeof tick_next&&tick_next(c, +b);else if(c.eventtype)if(this.log("Response: Event"),"CompleteInitialization"==c.eventtype)this.log("The initialization is complete, now you can call the interfaces in onReady callback function."),this.initialCameraPosition=c.InitialCamera,c.ResourcesPath&&(this.resourcesPath=c.ResourcesPath,this.log("ResourcesPath:"+this.resourcesPath)),this.onReady();else if("NodeConfiguration"==c.eventtype)this.resourcesPath=c.ResourcesPath,this.log("ResourcesPath:"+this.resourcesPath);else if("MainThreadBusy"== +c.eventtype)this.apiQueue.onMainThreadBusy(c),this.player&&this.player.onMainThreadBusy(c);else{if("function"==typeof this.options.onEvent)this.options.onEvent(c)}else this.log("Response: [Unknown]");b=JSON.stringify(c,(d,h)=>h instanceof Array?JSON.stringify(h):h,"\t").replace(/"\[/g,"[").replace(/\]"/g,"]").replace(/\\"/g,'"').replace(/""/g,'"');this.logWithColor("gray",b)}quit(){return this.call0(p.Quit)}test(a,b,c){return this.call({command:p.SimulateTest__,type:a,int32Val:b},c)}}const V={WS_Disconnected:0, +WS_Connecting:1,WS_Connected:2,RTC_Opened:3,Video_LoadedMetaData:4,OnReady:5},da={StartingProcess:0,CheckingBusy:1,ConfirmBusy:2,ProcessStartFailed:3,ProcessStarted:4,LoadingProject:5,ProjectLoaded:6};class Vb{constructor(){"undefined"!=typeof navigator&&(this.isUnix="Mac68K"==navigator.platform||"MacPPC"==navigator.platform||"Macintosh"==navigator.platform||"MacIntel"==navigator.platform||-1!=navigator.platform.indexOf("Linux"),this.isChrome=-1!=navigator.userAgent.indexOf("Chrome"),this.isMobileDevice= +/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent),this.isIOSDevice=/iPhone|iPad|iPod/i.test(navigator.userAgent),this.isSafari=/Safari/i.test(navigator.userAgent),this.isAndroidDevice=/Android/i.test(navigator.userAgent),this.isInWeixinBrowser)}fullscreen(a){a&&(a.requestFullscreen?a.requestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.msRequestFullscreen?a.msRequestFullscreen:a.webkitRequestFullscreen&&a.webkitRequestFullscreen())}exitFullscreen(){document.exitFullscreen? +document.exitFullscreen():document.msExitFullscreen||(document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen())}isFullscreen(){return document.fullscreen||document.mozFullScreen||document.webkitIsFullScreen}isFunction(a){return"function"==typeof a}}var R=new Vb;const sa={abnormal:1006,invalid_message:1008,no_free_instance:1013,out_of_control:4E3,instance_disconnected:4001,instance_not_found:4002,instance_start_failed:4003,webrtc_connection_error:4004, +one_client_allowed:4005,timeout:4006,iid_required:4007,locked:4008,invalid_project:4009,kicked:4100,syncing_data:4101,instance_killed_by_user:4102,invalid_password:4103,nodeservice_stopped:4105,instance_is_busy:4107,ip_not_authorized:4108,invalid_token:4109};aa.EMPTY_OBJECT=Object.freeze({});class ka{}ka.doParamsCompatibility=a=>{a.apiOptions=a.apiOptions||{};a.events=a.events||{};a.ui=a.ui||{};"undefined"!=typeof a.showMarker&&(a.showStatus=a.showMarker,delete a.showMarker);"undefined"!=typeof a.actionEventHander&& +(a.onaction=a.actionEventHander,delete a.actionEventHander);"undefined"!=typeof a.useBuiltinCursor&&(a.useBuiltinCursors=a.useBuiltinCursor,delete a.useBuiltinCursor);"undefined"!=typeof a.keyEventReceiver&&(a.keyEventTarget=a.keyEventReceiver,delete a.keyEventReceiver);"undefined"!=typeof a.ui.debugTouchPanel&&(a.ui.debugEventsPanel=a.ui.debugTouchPanel,delete a.ui.debugTouchPanel);var b=(c,e)=>{let d=a[c];d&&(a.events[e]=d,delete a[c])};b("onclose","onConnClose");b("onloaded","onVideoLoaded");b("onvideostatus", +"onRtcStatsReport");b("onaction","mouseKeyListener");b=(c,e)=>{let d=a.events.mouseKeyListener[c];d&&(a.events.mouseKeyListener[e]=d,delete a.events.mouseKeyListener[c])};a.events.mouseKeyListener&&(b("onmouseenter","onMouseEnter"),b("onmouseleave","onMouseLeave"),b("onmousemove","onMouseMove"),b("onmousedown","onMouseDown"),b("onmouseup","onMouseUp"),b("onkeydown","onKeyDown"),b("onkeyup","onKeyUp"),b("onkeypress","onKeyPress"));b=(c,e)=>{"undefined"!=typeof a[c]&&(a.ui[e]=a[c],delete a[c])};b("showStartupInfo", +"startupInfo");b("showStatus","statusButton");b("showFullscreenButton","fullscreenButton");b("showHomeButton","homeButton");b("showTaskList","taskListBar")};ka.setDefaultParamValues=a=>{a.keyEventTarget=aa(a.keyEventTarget,"video");a.useBuiltinCursors=aa(a.useBuiltinCursors,!0);a.ui.startupInfo=aa(a.ui.startupInfo,!0);a.ui.statusIndicator=aa(a.ui.statusIndicator,!0);a.ui.statusButton=aa(a.ui.statusButton,!1);a.ui.fullscreenButton=aa(a.ui.fullscreenButton,!1);a.ui.homeButton=aa(a.ui.homeButton,!1); +a.ui.taskListBar=aa(a.ui.taskListBar,1);a.ui.debugEventsPanel=aa(a.ui.debugEventsPanel,!1);a.offer=1};ka.processParams=a=>{ka.doParamsCompatibility(a);ka.setDefaultParamValues(a)};class Wb{constructor(a){this.options=a;this.checkParamsMap=new Map}resetInteractTimestamp(a){this.timeOfLastInteraction=a}connect(a){window.WebSocket=window.WebSocket||window.MozWebSocket;window.WebSocket?(this.websocket=new WebSocket(a),this.websocket.onopen=()=>{if(this.options.onopen)this.options.onopen();setInterval(()=> +{this.timeOfLastInteraction&&this.send({type:"ping",time:this.timeOfLastInteraction})},3E3)},this.websocket.onmessage=b=>{if(b=JSON.parse(b.data)){switch(b.type){case "checkParamsResult":this.onCheckParamsResponse(b);return;case "detectResponse":this.send(b);return}if(this.options.onmessage)this.options.onmessage(b)}},this.websocket.onerror=b=>{if(this.options.onerror)this.options.onerror(b)},this.websocket.onclose=b=>{this.websocket=void 0;if(this.options.onclose)this.options.onclose(b)}):alert("Your browser does not support WebSocket")}isOpened(){return this.websocket&& +1===this.websocket.readyState}send(a){a&&this.isOpened()&&this.websocket.send(JSON.stringify(a))}close(a){console.log(`call SignallingConnection.close: ${a||" "}`);this.isOpened()&&(this.websocket.close(a),this.websocket=null)}sendReady(){this.send({type:"ready"})}sendCandidate(a){a.candidate&&a.candidate.candidate&&this.send({type:"iceCandidate",candidate:a.candidate})}sendOffer(a,b){this.send({type:"offer",sdp:a,hasVideo:b})}updateParams(a){this.send({type:"updateParams",data:a})}checkParams(a){a.timestamp= +Date.now();return new Promise(b=>{this.checkParamsMap[a.timestamp]=b;this.send({type:"checkParams",data:a});this.timerOfCheckParams=setTimeout(()=>{let c=this.checkParamsMap[a.timestamp];c&&(delete this.checkParamsMap[a.timestamp],c(null))},1E3)})}onCheckParamsResponse(a){let b=this.checkParamsMap[a.timestamp];b&&(clearTimeout(this.timerOfCheckParams),delete this.checkParamsMap[a.timestamp],b(a))}}(function(a){"object"===typeof v&&"undefined"!==typeof module?module.exports=a():"function"===typeof define&& +define.amd?define([],a):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).adapter=a()})(function(){return function(){function a(b,c,e){function d(q,k){if(!c[q]){if(!b[q]){var f="function"==typeof require&&require;if(!k&&f)return f(q,!0);if(h)return h(q,!0);k=Error("Cannot find module '"+q+"'");throw k.code="MODULE_NOT_FOUND",k;}k=c[q]={exports:{}};b[q][0].call(k.exports,function(l){return d(b[q][1][l]||l)},k,k.exports,a,b,c,e)}return c[q].exports} +for(var h="function"==typeof require&&require,g=0;gl.version&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(r){var y=f.RTCPeerConnection.prototype[r],u=e({},r,function(){arguments[0]=new ("addIceCandidate"=== +r?f.RTCIceCandidate:f.RTCSessionDescription)(arguments[0]);return y.apply(this,arguments)});f.RTCPeerConnection.prototype[r]=u[r]});var w=f.RTCPeerConnection.prototype.addIceCandidate;f.RTCPeerConnection.prototype.addIceCandidate=function(){return t||arguments[0]?78>l.version&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():w.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}};c.fixNegotiationNeeded=function(f){var l=k.detectBrowser(f);k.wrapPeerConnectionEvent(f, +"negotiationneeded",function(t){var w=t.target;if(!(72>l.version||w.getConfiguration&&"plan-b"===w.getConfiguration().sdpSemantics)||"stable"===w.signalingState)return t})};var k=function(f){if(f&&f.__esModule)return f;var l={};if(null!=f)for(var t in f)Object.prototype.hasOwnProperty.call(f,t)&&(l[t]=f[t]);l.default=f;return l}(a("../utils.js"))},{"../utils.js":15,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia= +function(e,d){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||!e.navigator.mediaDevices||("function"!==typeof d?console.error("shimGetDisplayMedia: getSourceId argument is not a function"):e.navigator.mediaDevices.getDisplayMedia=function(h){return d(h).then(function(g){var q=h.video&&h.video.width,k=h.video&&h.video.height;h.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:g,maxFrameRate:h.video&&h.video.frameRate||3}};q&&(h.video.mandatory.maxWidth=q);k&& +(h.video.mandatory.maxHeight=k);return e.navigator.mediaDevices.getUserMedia(h)})})}},{}],5:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});var e="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(g){return typeof g}:function(g){return g&&"function"===typeof Symbol&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g};c.shimGetUserMedia=function(g){var q=g&&g.navigator;if(q.mediaDevices){var k=d.detectBrowser(g),f=function(r){if("object"!==("undefined"=== +typeof r?"undefined":e(r))||r.mandatory||r.optional)return r;var y={};Object.keys(r).forEach(function(u){if("require"!==u&&"advanced"!==u&&"mediaSource"!==u){var A="object"===e(r[u])?r[u]:{ideal:r[u]};void 0!==A.exact&&"number"===typeof A.exact&&(A.min=A.max=A.exact);var m=function(x,z){return x?x+z.charAt(0).toUpperCase()+z.slice(1):"deviceId"===z?"sourceId":z};if(void 0!==A.ideal){y.optional=y.optional||[];var n={};"number"===typeof A.ideal?(n[m("min",u)]=A.ideal,y.optional.push(n),n={},n[m("max", +u)]=A.ideal):n[m("",u)]=A.ideal;y.optional.push(n)}void 0!==A.exact&&"number"!==typeof A.exact?(y.mandatory=y.mandatory||{},y.mandatory[m("",u)]=A.exact):["min","max"].forEach(function(x){void 0!==A[x]&&(y.mandatory=y.mandatory||{},y.mandatory[m(x,u)]=A[x])})}});r.advanced&&(y.optional=(y.optional||[]).concat(r.advanced));return y},l=function(r,y){if(61<=k.version)return y(r);if((r=JSON.parse(JSON.stringify(r)))&&"object"===e(r.audio)){var u=function(n,x,z){x in n&&!(z in n)&&(n[z]=n[x],delete n[x])}; +r=JSON.parse(JSON.stringify(r));u(r.audio,"autoGainControl","googAutoGainControl");u(r.audio,"noiseSuppression","googNoiseSuppression");r.audio=f(r.audio)}if(r&&"object"===e(r.video)){var A=r.video.facingMode;A=A&&("object"===("undefined"===typeof A?"undefined":e(A))?A:{ideal:A});u=66>k.version;if(!(!A||"user"!==A.exact&&"environment"!==A.exact&&"user"!==A.ideal&&"environment"!==A.ideal||q.mediaDevices.getSupportedConstraints&&q.mediaDevices.getSupportedConstraints().facingMode&&!u)){delete r.video.facingMode; +var m=void 0;if("environment"===A.exact||"environment"===A.ideal)m=["back","rear"];else if("user"===A.exact||"user"===A.ideal)m=["front"];if(m)return q.mediaDevices.enumerateDevices().then(function(n){n=n.filter(function(z){return"videoinput"===z.kind});var x=n.find(function(z){return m.some(function(B){return z.label.toLowerCase().includes(B)})});!x&&n.length&&m.includes("back")&&(x=n[n.length-1]);x&&(r.video.deviceId=A.exact?{exact:x.deviceId}:{ideal:x.deviceId});r.video=f(r.video);h("chrome: "+ +JSON.stringify(r));return y(r)})}r.video=f(r.video)}h("chrome: "+JSON.stringify(r));return y(r)},t=function(r){return 64<=k.version?r:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError", +ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[r.name]||r.name,message:r.message,constraint:r.constraint||r.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};q.getUserMedia=function(r,y,u){l(r,function(A){q.webkitGetUserMedia(A,y,function(m){u&&u(t(m))})})}.bind(q);if(q.mediaDevices.getUserMedia){var w=q.mediaDevices.getUserMedia.bind(q.mediaDevices);q.mediaDevices.getUserMedia=function(r){return l(r,function(y){return w(y).then(function(u){if(y.audio&& +!u.getAudioTracks().length||y.video&&!u.getVideoTracks().length)throw u.getTracks().forEach(function(A){A.stop()}),new DOMException("","NotFoundError");return u},function(u){return Promise.reject(t(u))})})}}}};var d=function(g){if(g&&g.__esModule)return g;var q={};if(null!=g)for(var k in g)Object.prototype.hasOwnProperty.call(g,k)&&(q[k]=g[k]);q.default=g;return q}(a("../utils.js")),h=d.log},{"../utils.js":15}],6:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});var e="function"=== +typeof Symbol&&"symbol"===typeof Symbol.iterator?function(g){return typeof g}:function(g){return g&&"function"===typeof Symbol&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g};c.shimRTCIceCandidate=function(g){if(g.RTCIceCandidate&&!(g.RTCIceCandidate&&"foundation"in g.RTCIceCandidate.prototype)){var q=g.RTCIceCandidate;g.RTCIceCandidate=function(k){"object"===("undefined"===typeof k?"undefined":e(k))&&k.candidate&&0===k.candidate.indexOf("a=")&&(k=JSON.parse(JSON.stringify(k)),k.candidate= +k.candidate.substr(2));if(k.candidate&&k.candidate.length){var f=new q(k);k=d.default.parseCandidate(k.candidate);var l=Object.assign(f,k);l.toJSON=function(){return{candidate:l.candidate,sdpMid:l.sdpMid,sdpMLineIndex:l.sdpMLineIndex,usernameFragment:l.usernameFragment}};return l}return new q(k)};g.RTCIceCandidate.prototype=q.prototype;h.wrapPeerConnectionEvent(g,"icecandidate",function(k){k.candidate&&Object.defineProperty(k,"candidate",{value:new g.RTCIceCandidate(k.candidate),writable:"false"}); +return k})}};c.shimMaxMessageSize=function(g){if(g.RTCPeerConnection){var q=h.detectBrowser(g);"sctp"in g.RTCPeerConnection.prototype||Object.defineProperty(g.RTCPeerConnection.prototype,"sctp",{get:function(){return"undefined"===typeof this._sctp?null:this._sctp}});var k=function(r){if(!r||!r.sdp)return!1;r=d.default.splitSections(r.sdp);r.shift();return r.some(function(y){return(y=d.default.parseMLine(y))&&"application"===y.kind&&-1!==y.protocol.indexOf("SCTP")})},f=function(r){r=r.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/); +if(null===r||2>r.length)return-1;r=parseInt(r[1],10);return r!==r?-1:r},l=function(r){var y=65536;"firefox"===q.browser&&(y=57>q.version?-1===r?16384:2147483637:60>q.version?57===q.version?65535:65536:2147483637);return y},t=function(r,y){var u=65536;"firefox"===q.browser&&57===q.version&&(u=65535);r=d.default.matchPrefix(r.sdp,"a=max-message-size:");0l.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+l.sctp.maxMessageSize+" bytes)");return t.apply(f,arguments)}}if(g.RTCPeerConnection&&"createDataChannel"in g.RTCPeerConnection.prototype){var k=g.RTCPeerConnection.prototype.createDataChannel; +g.RTCPeerConnection.prototype.createDataChannel=function(){var f=k.apply(this,arguments);q(f,this);return f};h.wrapPeerConnectionEvent(g,"datachannel",function(f){q(f.channel,f.target);return f})}};c.shimConnectionState=function(g){if(g.RTCPeerConnection&&!("connectionState"in g.RTCPeerConnection.prototype)){var q=g.RTCPeerConnection.prototype;Object.defineProperty(q,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState}, +enumerable:!0,configurable:!0});Object.defineProperty(q,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(k){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange);k&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=k)},enumerable:!0,configurable:!0});["setLocalDescription","setRemoteDescription"].forEach(function(k){var f=q[k]; +q[k]=function(){this._connectionstatechangepoly||(this._connectionstatechangepoly=function(l){var t=l.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;var w=new Event("connectionstatechange",l);t.dispatchEvent(w)}return l},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly));return f.apply(this,arguments)}})}};c.removeAllowExtmapMixed=function(g){if(g.RTCPeerConnection){var q=h.detectBrowser(g);if(!("chrome"===q.browser&& +71<=q.version||"safari"===q.browser&&605<=q.version)){var k=g.RTCPeerConnection.prototype.setRemoteDescription;g.RTCPeerConnection.prototype.setRemoteDescription=function(f){f&&f.sdp&&-1!==f.sdp.indexOf("\na=extmap-allow-mixed")&&(f.sdp=f.sdp.split("\n").filter(function(l){return"a=extmap-allow-mixed"!==l.trim()}).join("\n"));return k.apply(this,arguments)}}}};var d=(b=a("sdp"))&&b.__esModule?b:{default:b},h=function(g){if(g&&g.__esModule)return g;var q={};if(null!=g)for(var k in g)Object.prototype.hasOwnProperty.call(g, +k)&&(q[k]=g[k]);q.default=g;return q}(a("./utils"))},{"./utils":15,sdp:17}],7:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia=c.shimGetUserMedia=void 0;var e=a("./getusermedia");Object.defineProperty(c,"shimGetUserMedia",{enumerable:!0,get:function(){return e.shimGetUserMedia}});var d=a("./getdisplaymedia");Object.defineProperty(c,"shimGetDisplayMedia",{enumerable:!0,get:function(){return d.shimGetDisplayMedia}});c.shimPeerConnection=function(k){var f=h.detectBrowser(k); +if(k.RTCIceGatherer&&(k.RTCIceCandidate||(k.RTCIceCandidate=function(w){return w}),k.RTCSessionDescription||(k.RTCSessionDescription=function(w){return w}),15025>f.version)){var l=Object.getOwnPropertyDescriptor(k.MediaStreamTrack.prototype,"enabled");Object.defineProperty(k.MediaStreamTrack.prototype,"enabled",{set:function(w){l.set.call(this,w);var r=new Event("enabled");r.enabled=w;this.dispatchEvent(r)}})}!k.RTCRtpSender||"dtmf"in k.RTCRtpSender.prototype||Object.defineProperty(k.RTCRtpSender.prototype, +"dtmf",{get:function(){void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new k.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null));return this._dtmf}});k.RTCDtmfSender&&!k.RTCDTMFSender&&(k.RTCDTMFSender=k.RTCDtmfSender);var t=(0,q.default)(k,f.version);k.RTCPeerConnection=function(w){w&&w.iceServers&&(w.iceServers=(0,g.filterIceServers)(w.iceServers,f.version),h.log("ICE servers after filtering:",w.iceServers));return new t(w)};k.RTCPeerConnection.prototype=t.prototype};c.shimReplaceTrack= +function(k){!k.RTCRtpSender||"replaceTrack"in k.RTCRtpSender.prototype||(k.RTCRtpSender.prototype.replaceTrack=k.RTCRtpSender.prototype.setTrack)};var h=function(k){if(k&&k.__esModule)return k;var f={};if(null!=k)for(var l in k)Object.prototype.hasOwnProperty.call(k,l)&&(f[l]=k[l]);f.default=k;return f}(a("../utils")),g=a("./filtericeservers"),q=(a=a("rtcpeerconnection-shim"))&&a.__esModule?a:{default:a}},{"../utils":15,"./filtericeservers":8,"./getdisplaymedia":9,"./getusermedia":10,"rtcpeerconnection-shim":16}], +8:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.filterIceServers=function(d,h){var g=!1;d=JSON.parse(JSON.stringify(d));return d.filter(function(q){if(q&&(q.urls||q.url)){var k=q.urls||q.url;q.url&&!q.urls&&e.deprecated("RTCIceServer.url","RTCIceServer.urls");var f="string"===typeof k;f&&(k=[k]);k=k.filter(function(l){return 0===l.indexOf("stun:")?!1:(l=l.startsWith("turn")&&!l.startsWith("turn:[")&&l.includes("transport=udp"))&&!g?g=!0:l&&!g});delete q.url;q.urls=f?k[0]:k;return!!k.length}})}; +var e=function(d){if(d&&d.__esModule)return d;var h={};if(null!=d)for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(h[g]=d[g]);h.default=d;return h}(a("../utils"))},{"../utils":15}],9:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia=function(e){"getDisplayMedia"in e.navigator&&e.navigator.mediaDevices&&!(e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices)&&(e.navigator.mediaDevices.getDisplayMedia=e.navigator.getDisplayMedia.bind(e.navigator))}}, +{}],10:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetUserMedia=function(e){e=e&&e.navigator;var d=function(g){return{name:{PermissionDeniedError:"NotAllowedError"}[g.name]||g.name,message:g.message,constraint:g.constraint,toString:function(){return this.name}}},h=e.mediaDevices.getUserMedia.bind(e.mediaDevices);e.mediaDevices.getUserMedia=function(g){return h(g).catch(function(q){return Promise.reject(d(q))})}}},{}],11:[function(a,b,c){function e(k,f,l){f in k?Object.defineProperty(k, +f,{value:l,enumerable:!0,configurable:!0,writable:!0}):k[f]=l;return k}Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia=c.shimGetUserMedia=void 0;var d="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(k){return typeof k}:function(k){return k&&"function"===typeof Symbol&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},h=a("./getusermedia");Object.defineProperty(c,"shimGetUserMedia",{enumerable:!0,get:function(){return h.shimGetUserMedia}}); +var g=a("./getdisplaymedia");Object.defineProperty(c,"shimGetDisplayMedia",{enumerable:!0,get:function(){return g.shimGetDisplayMedia}});c.shimOnTrack=function(k){"object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCTrackEvent&&"receiver"in k.RTCTrackEvent.prototype&&!("transceiver"in k.RTCTrackEvent.prototype)&&Object.defineProperty(k.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})};c.shimPeerConnection=function(k){var f=q.detectBrowser(k);if("object"=== +("undefined"===typeof k?"undefined":d(k))&&(k.RTCPeerConnection||k.mozRTCPeerConnection)){!k.RTCPeerConnection&&k.mozRTCPeerConnection&&(k.RTCPeerConnection=k.mozRTCPeerConnection);53>f.version&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(r){var y=k.RTCPeerConnection.prototype[r],u=e({},r,function(){arguments[0]=new ("addIceCandidate"===r?k.RTCIceCandidate:k.RTCSessionDescription)(arguments[0]);return y.apply(this,arguments)});k.RTCPeerConnection.prototype[r]= +u[r]});if(68>f.version){var l=k.RTCPeerConnection.prototype.addIceCandidate;k.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&""===arguments[0].candidate?Promise.resolve():l.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}var t={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},w=k.RTCPeerConnection.prototype.getStats;k.RTCPeerConnection.prototype.getStats= +function(){var r=Array.prototype.slice.call(arguments),y=r[1],u=r[2];return w.apply(this,[r[0]||null]).then(function(A){if(53>f.version&&!y)try{A.forEach(function(m){m.type=t[m.type]||m.type})}catch(m){if("TypeError"!==m.name)throw m;A.forEach(function(n,x){A.set(x,Object.assign({},n,{type:t[n.type]||n.type}))})}return A}).then(y,u)}}};c.shimSenderGetStats=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCPeerConnection&&k.RTCRtpSender&&!(k.RTCRtpSender&&"getStats"in k.RTCRtpSender.prototype)){var f= +k.RTCPeerConnection.prototype.getSenders;f&&(k.RTCPeerConnection.prototype.getSenders=function(){var t=this,w=f.apply(this,[]);w.forEach(function(r){return r._pc=t});return w});var l=k.RTCPeerConnection.prototype.addTrack;l&&(k.RTCPeerConnection.prototype.addTrack=function(){var t=l.apply(this,arguments);t._pc=this;return t});k.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}};c.shimReceiverGetStats=function(k){if("object"===("undefined"=== +typeof k?"undefined":d(k))&&k.RTCPeerConnection&&k.RTCRtpSender&&!(k.RTCRtpSender&&"getStats"in k.RTCRtpReceiver.prototype)){var f=k.RTCPeerConnection.prototype.getReceivers;f&&(k.RTCPeerConnection.prototype.getReceivers=function(){var l=this,t=f.apply(this,[]);t.forEach(function(w){return w._pc=l});return t});q.wrapPeerConnectionEvent(k,"track",function(l){l.receiver._pc=l.srcElement;return l});k.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}};c.shimRemoveStream= +function(k){!k.RTCPeerConnection||"removeStream"in k.RTCPeerConnection.prototype||(k.RTCPeerConnection.prototype.removeStream=function(f){var l=this;q.deprecated("removeStream","removeTrack");this.getSenders().forEach(function(t){t.track&&f.getTracks().includes(t.track)&&l.removeTrack(t)})})};c.shimRTCDataChannel=function(k){k.DataChannel&&!k.RTCDataChannel&&(k.RTCDataChannel=k.DataChannel)};c.shimAddTransceiver=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCPeerConnection){var f= +k.RTCPeerConnection.prototype.addTransceiver;f&&(k.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var l=arguments[1],t=l&&"sendEncodings"in l;t&&l.sendEncodings.forEach(function(y){if("rid"in y&&!/^[a-z0-9]{0,16}$/i.test(y.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in y&&!(1<=parseFloat(y.scaleResolutionDownBy)))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in y&&!(0<=parseFloat(y.maxFramerate)))throw new RangeError("max_framerate must be >= 0.0"); +});var w=f.apply(this,arguments);if(t){var r=w.sender;t=r.getParameters();"encodings"in t||(t.encodings=l.sendEncodings,r.sendEncodings=l.sendEncodings,this.setParametersPromises.push(r.setParameters(t).then(function(){delete r.sendEncodings}).catch(function(){delete r.sendEncodings})))}return w})}};c.shimGetParameters=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCRtpSender){var f=k.RTCRtpSender.prototype.getParameters;f&&(k.RTCRtpSender.prototype.getParameters=function(){var l= +f.apply(this,arguments);return"sendEncodings"in this?Object.assign({},{encodings:this.sendEncodings},l):l})}};c.shimCreateOffer=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCPeerConnection){var f=k.RTCPeerConnection.prototype.createOffer;k.RTCPeerConnection.prototype.createOffer=function(){var l=this,t=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return f.apply(l,t)}).finally(function(){l.setParametersPromises= +[]}):f.apply(this,arguments)}}};c.shimCreateAnswer=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCPeerConnection){var f=k.RTCPeerConnection.prototype.createAnswer;k.RTCPeerConnection.prototype.createAnswer=function(){var l=this,t=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return f.apply(l,t)}).finally(function(){l.setParametersPromises=[]}):f.apply(this,arguments)}}};var q=function(k){if(k&& +k.__esModule)return k;var f={};if(null!=k)for(var l in k)Object.prototype.hasOwnProperty.call(k,l)&&(f[l]=k[l]);f.default=k;return f}(a("../utils"))},{"../utils":15,"./getdisplaymedia":12,"./getusermedia":13}],12:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia=function(e,d){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||!e.navigator.mediaDevices||(e.navigator.mediaDevices.getDisplayMedia=function(h){if(!h||!h.video)return h=new DOMException("getDisplayMedia without video constraints is undefined"), +h.name="NotFoundError",h.code=8,Promise.reject(h);!0===h.video?h.video={mediaSource:d}:h.video.mediaSource=d;return e.navigator.mediaDevices.getUserMedia(h)})}},{}],13:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});var e="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(h){return typeof h}:function(h){return h&&"function"===typeof Symbol&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h};c.shimGetUserMedia=function(h){var g=d.detectBrowser(h), +q=h&&h.navigator;h=h&&h.MediaStreamTrack;q.getUserMedia=function(w,r,y){d.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia");q.mediaDevices.getUserMedia(w).then(r,y)};if(!(55=t&&parseInt(f[t],10)}function d(f){return"[object Object]"!==Object.prototype.toString.call(f)? +f:Object.keys(f).reduce(function(l,t){var w="[object Object]"===Object.prototype.toString.call(f[t]),r=w?d(f[t]):f[t];w=w&&!Object.keys(r).length;if(void 0===r||w)return l;w=Object;var y=w.assign,u={};t in u?Object.defineProperty(u,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):u[t]=r;return y.call(w,l,u)},{})}function h(f,l,t){l&&!t.has(l.id)&&(t.set(l.id,l),Object.keys(l).forEach(function(w){w.endsWith("Id")?h(f,f.get(l[w]),t):w.endsWith("Ids")&&l[w].forEach(function(r){h(f,f.get(r),t)})}))} +Object.defineProperty(c,"__esModule",{value:!0});var g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&"function"===typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};c.extractVersion=e;c.wrapPeerConnectionEvent=function(f,l,t){if(f.RTCPeerConnection){f=f.RTCPeerConnection.prototype;var w=f.addEventListener;f.addEventListener=function(y,u){if(y!==l)return w.apply(this,arguments);var A=function(m){(m=t(m))&& +(u.handleEvent?u.handleEvent(m):u(m))};this._eventMap=this._eventMap||{};this._eventMap[l]||(this._eventMap[l]=new Map);this._eventMap[l].set(u,A);return w.apply(this,[y,A])};var r=f.removeEventListener;f.removeEventListener=function(y,u){if(y!==l||!this._eventMap||!this._eventMap[l]||!this._eventMap[l].has(u))return r.apply(this,arguments);var A=this._eventMap[l].get(u);this._eventMap[l].delete(u);0===this._eventMap[l].size&&delete this._eventMap[l];0===Object.keys(this._eventMap).length&&delete this._eventMap; +return r.apply(this,[y,A])};Object.defineProperty(f,"on"+l,{get:function(){return this["_on"+l]},set:function(y){this["_on"+l]&&(this.removeEventListener(l,this["_on"+l]),delete this["_on"+l]);y&&this.addEventListener(l,this["_on"+l]=y)},enumerable:!0,configurable:!0})}};c.disableLog=function(f){return"boolean"!==typeof f?Error("Argument type: "+("undefined"===typeof f?"undefined":g(f))+". Please use a boolean."):(q=f)?"adapter.js logging disabled":"adapter.js logging enabled"};c.disableWarnings= +function(f){if("boolean"!==typeof f)return Error("Argument type: "+("undefined"===typeof f?"undefined":g(f))+". Please use a boolean.");k=!f;return"adapter.js deprecation warnings "+(f?"disabled":"enabled")};c.log=function(){"object"!==("undefined"===typeof window?"undefined":g(window))||q||"undefined"!==typeof console&&"function"===typeof console.log&&console.log.apply(console,arguments)};c.deprecated=function(f,l){k&&console.warn(f+" is deprecated, please use "+l+" instead.")};c.detectBrowser=function(f){var l= +f.navigator,t={browser:null,version:null};if("undefined"===typeof f||!f.navigator)return t.browser="Not a browser.",t;l.mozGetUserMedia?(t.browser="firefox",t.version=e(l.userAgent,/Firefox\/(\d+)\./,1)):l.webkitGetUserMedia||!1===f.isSecureContext&&f.webkitRTCPeerConnection&&!f.RTCIceGatherer?(t.browser="chrome",t.version=e(l.userAgent,/Chrom(e|ium)\/(\d+)\./,2)):l.mediaDevices&&l.userAgent.match(/Edge\/(\d+).(\d+)$/)?(t.browser="edge",t.version=e(l.userAgent,/Edge\/(\d+).(\d+)$/,2)):f.RTCPeerConnection&& +l.userAgent.match(/AppleWebKit\/(\d+)\./)?(t.browser="safari",t.version=e(l.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=f.RTCRtpTransceiver&&"currentDirection"in f.RTCRtpTransceiver.prototype):t.browser="Not a supported browser.";return t};c.compactObject=d;c.walkStats=h;c.filterStats=function(f,l,t){var w=t?"outbound-rtp":"inbound-rtp",r=new Map;if(null===l)return r;var y=[];f.forEach(function(u){"track"===u.type&&u.trackIdentifier===l.id&&y.push(u)});y.forEach(function(u){f.forEach(function(A){A.type=== +w&&A.trackId===u.id&&h(f,A,r)})});return r};var q=!0,k=!0},{}],16:[function(a,b,c){function e(l,t,w,r,y){t=f.writeRtpDescription(l.kind,t);t+=f.writeIceParameters(l.iceGatherer.getLocalParameters());t+=f.writeDtlsParameters(l.dtlsTransport.getLocalParameters(),"offer"===w?"actpass":y||"active");t+="a=mid:"+l.mid+"\r\n";t=l.rtpSender&&l.rtpReceiver?t+"a=sendrecv\r\n":l.rtpSender?t+"a=sendonly\r\n":l.rtpReceiver?t+"a=recvonly\r\n":t+"a=inactive\r\n";l.rtpSender&&(w=l.rtpSender._initialTrackId||l.rtpSender.track.id, +l.rtpSender._initialTrackId=w,r="msid:"+(r?r.id:"-")+" "+w+"\r\n",t=t+("a="+r)+("a=ssrc:"+l.sendEncodingParameters[0].ssrc+" "+r),l.sendEncodingParameters[0].rtx&&(t+="a=ssrc:"+l.sendEncodingParameters[0].rtx.ssrc+" "+r,t+="a=ssrc-group:FID "+l.sendEncodingParameters[0].ssrc+" "+l.sendEncodingParameters[0].rtx.ssrc+"\r\n"));t+="a=ssrc:"+l.sendEncodingParameters[0].ssrc+" cname:"+f.localCName+"\r\n";l.rtpSender&&l.sendEncodingParameters[0].rtx&&(t+="a=ssrc:"+l.sendEncodingParameters[0].rtx.ssrc+" cname:"+ +f.localCName+"\r\n");return t}function d(l,t){var w=!1;l=JSON.parse(JSON.stringify(l));return l.filter(function(r){if(r&&(r.urls||r.url)){var y=r.urls||r.url;r.url&&!r.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var u="string"===typeof y;u&&(y=[y]);y=y.filter(function(A){return 0!==A.indexOf("turn:")||-1===A.indexOf("transport=udp")||-1!==A.indexOf("turn:[")||w?0===A.indexOf("stun:")&&14393<=t&&-1===A.indexOf("?transport=udp"):w=!0});delete r.url;r.urls=u?y[0]:y;return!!y.length}})} +function h(l,t){var w={codecs:[],headerExtensions:[],fecMechanisms:[]},r=function(u,A){u=parseInt(u,10);for(var m=0;mt&&m.recvEncodingParameters.forEach(function(B){delete B.rtx}), +z.encodings=m.recvEncodingParameters.length?m.recvEncodingParameters:[{}],z.rtcp={compound:m.rtcpParameters.compound},m.rtcpParameters.cname&&(z.rtcp.cname=m.rtcpParameters.cname),m.sendEncodingParameters.length&&(z.rtcp.ssrc=m.sendEncodingParameters[0].ssrc),m.rtpReceiver.receive(z))};u.prototype.setLocalDescription=function(m){var n=this;if(-1===["offer","answer"].indexOf(m.type))return Promise.reject(k("TypeError",'Unsupported type "'+m.type+'"'));if(!g("setLocalDescription",m.type,n.signalingState)|| +n._isClosed)return Promise.reject(k("InvalidStateError","Can not set local "+m.type+" in state "+n.signalingState));if("offer"===m.type){var x=f.splitSections(m.sdp);var z=x.shift();x.forEach(function(C,G){C=f.parseRtpParameters(C);n.transceivers[G].localCapabilities=C});n.transceivers.forEach(function(C,G){n._gather(C.mid,G)})}else if("answer"===m.type){x=f.splitSections(n._remoteDescription.sdp);z=x.shift();var B=0t&&(L.codecs=L.codecs.filter(function(X){return"rtx"!==X.name}));Z=N.sendEncodingParameters||[{ssrc:1001*(2*J+2)}];oa=!1;if("sendrecv"===P||"sendonly"===P){oa=!N.rtpReceiver;var ha=N.rtpReceiver|| +new l.RTCRtpReceiver(N.dtlsTransport,U);if(oa){P=ha.track;if(!W||"-"!==W.stream)if(W){x[W.stream]||(x[W.stream]=new l.MediaStream,Object.defineProperty(x[W.stream],"id",{get:function(){return W.stream}}));Object.defineProperty(P,"id",{get:function(){return W.track}});var ja=x[W.stream]}else x.default||(x.default=new l.MediaStream),ja=x.default;ja&&(w(P,ja),N.associatedRemoteMediaStreams.push(ja));z.push([P,ha,ja])}}else N.rtpReceiver&&N.rtpReceiver.track&&(N.associatedRemoteMediaStreams.forEach(function(X){var Fa= +X.getTracks().find(function(Xb){return Xb.id===N.rtpReceiver.track.id});Fa&&r(Fa,X)}),N.associatedRemoteMediaStreams=[]);N.localCapabilities=L;N.remoteCapabilities=Ba;N.rtpReceiver=ha;N.rtcpParameters=Da;N.sendEncodingParameters=Z;N.recvEncodingParameters=la;n._transceive(n.transceivers[J],!1,oa)}}});void 0===n._dtlsRole&&(n._dtlsRole="offer"===m.type?"active":"passive");n._remoteDescription={type:m.type,sdp:m.sdp};"offer"===m.type?n._updateSignalingState("have-remote-offer"):n._updateSignalingState("stable"); +Object.keys(x).forEach(function(L){var J=x[L];if(J.getTracks().length){if(-1===n.remoteStreams.indexOf(J)){n.remoteStreams.push(J);var P=new Event("addstream");P.stream=J;l.setTimeout(function(){n._dispatchEvent("addstream",P)})}z.forEach(function(U){J.id===U[2].id&&y(n,U[0],U[1],[J])})}});z.forEach(function(L){L[2]||y(n,L[0],L[1],[])});l.setTimeout(function(){n&&n.transceivers&&n.transceivers.forEach(function(L){L.iceTransport&&"new"===L.iceTransport.state&&0x&&(C.wantReceive=!1)):"video"===C.kind&&(z--,0>z&&(C.wantReceive=!1))});0t&&(L.codecs=L.codecs.filter(function(J){return"rtx"!==J.name}));L.codecs.forEach(function(J){"H264"===J.name&&void 0===J.parameters["level-asymmetry-allowed"]&&(J.parameters["level-asymmetry-allowed"]="1");C.remoteCapabilities&&C.remoteCapabilities.codecs&&C.remoteCapabilities.codecs.forEach(function(P){J.name.toLowerCase()===P.name.toLowerCase()&&J.clockRate===P.clockRate&&(J.preferredPayloadType=P.payloadType)})}); +L.headerExtensions.forEach(function(J){(C.remoteCapabilities&&C.remoteCapabilities.headerExtensions||[]).forEach(function(P){J.uri===P.uri&&(J.id=P.id)})});G=C.sendEncodingParameters||[{ssrc:1001*(2*G+1)}];M&&15019<=t&&"video"===Y&&!G[0].rtx&&(G[0].rtx={ssrc:G[0].ssrc+1});C.wantReceive&&(C.rtpReceiver=new l.RTCRtpReceiver(C.dtlsTransport,Y));C.localCapabilities=L;C.sendEncodingParameters=G});"max-compat"!==n._config.bundlePolicy&&(B+="a=group:BUNDLE "+n.transceivers.map(function(C){return C.mid}).join(" ")+ +"\r\n");B+="a=ice-options:trickle\r\n";n.transceivers.forEach(function(C,G){B+=e(C,C.localCapabilities,"offer",C.stream,n._dtlsRole);B+="a=rtcp-rsize\r\n";!C.iceGatherer||"new"===n.iceGatheringState||0!==G&&n.usingBundle||(C.iceGatherer.getLocalCandidates().forEach(function(M){M.component=1;B+="a="+f.writeCandidate(M)+"\r\n"}),"completed"===C.iceGatherer.state&&(B+="a=end-of-candidates\r\n"))});m=new l.RTCSessionDescription({type:"offer",sdp:B});return Promise.resolve(m)};u.prototype.createAnswer= +function(){var m=this;if(m._isClosed)return Promise.reject(k("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==m.signalingState&&"have-local-pranswer"!==m.signalingState)return Promise.reject(k("InvalidStateError","Can not call createAnswer in signalingState "+m.signalingState));var n=f.writeSessionBoilerplate(m._sdpSessionId,m._sdpSessionVersion++);m.usingBundle&&(n+="a=group:BUNDLE "+m.transceivers.map(function(B){return B.mid}).join(" ")+"\r\n");n+="a=ice-options:trickle\r\n"; +var x=f.getMediaSections(m._remoteDescription.sdp).length;m.transceivers.forEach(function(B,C){if(!(C+1>x))if(B.rejected)"application"===B.kind?n="DTLS/SCTP"===B.protocol?n+"m=application 0 DTLS/SCTP 5000\r\n":n+("m=application 0 "+B.protocol+" webrtc-datachannel\r\n"):"audio"===B.kind?n+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===B.kind&&(n+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),n+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+B.mid+"\r\n";else{if(B.stream){var G; +"audio"===B.kind?G=B.stream.getAudioTracks()[0]:"video"===B.kind&&(G=B.stream.getVideoTracks()[0]);G&&15019<=t&&"video"===B.kind&&!B.sendEncodingParameters[0].rtx&&(B.sendEncodingParameters[0].rtx={ssrc:B.sendEncodingParameters[0].ssrc+1})}C=h(B.localCapabilities,B.remoteCapabilities);!C.codecs.filter(function(M){return"rtx"===M.name.toLowerCase()}).length&&B.sendEncodingParameters[0].rtx&&delete B.sendEncodingParameters[0].rtx;n+=e(B,C,"answer",B.stream,m._dtlsRole);B.rtcpParameters&&B.rtcpParameters.reducedSize&& +(n+="a=rtcp-rsize\r\n")}});var z=new l.RTCSessionDescription({type:"answer",sdp:n});return Promise.resolve(z)};u.prototype.addIceCandidate=function(m){var n=this,x;return m&&void 0===m.sdpMLineIndex&&!m.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise(function(z,B){if(n._remoteDescription)if(m&&""!==m.candidate){var C=m.sdpMLineIndex;if(m.sdpMid)for(var G=0;Gq&&(q=k.maxptime)});0d[h].length||"="!==d[h].charAt(1))return!1;return!0};"object"===typeof b&&(b.exports=e)},{}]},{},[1])(1)});class Yb{constructor(a){this.FrameDisplayDeltaTimeMs=this.BrowserReceiptTimeMs=this.UETransmissionTimeMs= +this.UECaptureToSendMs=this.UEEncodeMs=this.UEReceiptTimeMs=this.TestStartTimeMs=null;this.onReady=a}reset(){this.FrameDisplayDeltaTimeMs=this.BrowserReceiptTimeMs=this.UETransmissionTimeMs=this.UEEncodeMs=this.UECaptureToSendMs=this.UEReceiptTimeMs=this.TestStartTimeMs=null}start(){this.reset();this.TestStartTimeMs=Date.now();if(this.onReady)this.onReady()}setUETimings(a){this.UEReceiptTimeMs=a.ReceiptTimeMs;this.UEEncodeMs=a.EncodeMs;this.UECaptureToSendMs=a.CaptureToSendMs;this.UETransmissionTimeMs= +a.TransmissionTimeMs;this.BrowserReceiptTimeMs=Date.now();this.latencyTimingsReady()}setFrameDisplayDeltaTime(a){null==this.FrameDisplayDeltaTimeMs&&(this.FrameDisplayDeltaTimeMs=Math.round(a),this.latencyTimingsReady())}latencyTimingsReady(){if(this.BrowserReceiptTimeMs){var a=this.BrowserReceiptTimeMs-this.TestStartTimeMs,b=this.UECaptureToSendMs,c=this.UETransmissionTimeMs-this.UEReceiptTimeMs,e=a-c,d={latencyExcludingDecode:a,encodeLatency:this.UEEncodeMs.toFixed(1),uePixelStreamLatency:b.toFixed(1), +ueTestDuration:c.toFixed(1),networkLatency:e.toFixed(1)};this.FrameDisplayDeltaTimeMs&&this.BrowserReceiptTimeMs&&(d.endToEndLatency=this.FrameDisplayDeltaTimeMs+e+("string"===typeof b?0:b),d.browserSideLatency=this.FrameDisplayDeltaTimeMs+(a-e-c),d.endToEndLatency=d.endToEndLatency.toFixed(1),d.browserSideLatency=d.browserSideLatency.toFixed(1));if(this.onReady)this.onReady(d)}}}class Zb{constructor(a){this.useStats=a.useStats;this.events=a.events;this.webRtcConfig=a.peerConnectionOptions||{};this.webRtcConfig.sdpSemantics= +"unified-plan";this.tnClient=this.dcClient=this.pcClient=null;this.sdpConstraints={offerToReceiveAudio:0,offerToReceiveVideo:1,voiceActivityDetection:!1};this.dataChannelOptions={ordered:!0};this.lastStats={};this.playerId=0;this.latencyTestTimings=new Yb(this.events.onLatencyTimingsReady);this._bSendingAPI=!1;this._apiSendingQueue=[]}setVideo(a){this.video=a}logStartupInfo(a){if(this.events.onlog)this.events.onlog(a)}setupPeerConnection(){this.pcClient||(this.pcClient=new RTCPeerConnection(this.webRtcConfig), +this.pcClient.addTransceiver("video",{direction:"recvonly"}),this.pcClient.onsignalingstatechange=a=>this.onStateChanged(a),this.pcClient.oniceconnectionstatechange=a=>this.onStateChanged(a),this.pcClient.onicegatheringstatechange=a=>this.onStateChanged(a),this.pcClient.ontrack=a=>this.events.ontrack(a),this.pcClient.onicecandidate=a=>this.events.onicecandidate(a),this.pcClient.ondatachannel=a=>{this.dcClient=a.channel;this.setupDataChannelCallbacks()})}close(){this.dcClient&&"open"==this.dcClient.readyState&& +(this.dcClient.close(),this.dcClient=null);this.pcClient&&(this.pcClient.close(),this.pcClient=null);this.clearStatsTimer()}setupDataChannelCallbacks(){this.dcClient.binaryType="arraybuffer";this.dcClient.onopen=a=>{this.isDatachannelOpened=!0;if(this.events&&this.events.ondatachannelopen)this.events.ondatachannelopen(a);this.logStartupInfo("video: loading...")};this.dcClient.onclose=a=>{this.isDatachannelOpened=!1;this.clearStatsTimer();if(this.events&&this.events.ondatachannelclose)this.events.ondatachannelclose(a)}; +this.dcClient.onerror=a=>{this.isDatachannelOpened=!1;this.logStartupInfo("channel error");if(this.events&&this.events.ondatachannelerror)this.events.ondatachannelerror(a)};this.dcClient.onmessage=a=>this.onDatachannelMessage(a)}createOffer(){this.close();this.setupPeerConnection();try{this.dcClient=this.pcClient.createDataChannel("cirrus",this.dataChannelOptions),this.setupDataChannelCallbacks(),this.logStartupInfo("channel created")}catch(a){this.logStartupInfo("no channel"),this.dcClient=null}this.pcClient.createOffer(this.sdpConstraints).then(a=> +{a.sdp=a.sdp.replace("useinbandfec=1","useinbandfec=1;stereo=1;sprop-maxcapturerate=48000");this.pcClient.setLocalDescription(a);this.events.onOfferCreated(a)},()=>{this.logStartupInfo("couldn't create offer")})}onReceiveOffer(a){a=new RTCSessionDescription(a);this.setupPeerConnection();this.pcClient.setRemoteDescription(a).then(()=>{this.pcClient.createAnswer().then(b=>this.pcClient.setLocalDescription(b)).then(()=>{if(this.events.onAnswerCreated)this.events.onAnswerCreated(this.pcClient.currentLocalDescription)}).then(()=> +{let b=this.pcClient.getReceivers();for(let c of b)c.playoutDelayHint=0}).catch(b=>console.error("createAnswer() failed:",b))});this.setupLiveStats()}onIceCandidate(a){a=new RTCIceCandidate(a);this.pcClient.addIceCandidate(a).then(b=>{this.logStartupInfo("candidate added")})}onReceiveAnswer(a){this.playerId=a.playerId;this.logStartupInfo(`received answer: ${this.playerId}`);a=new RTCSessionDescription(a);this.pcClient.setRemoteDescription(a);a=this.pcClient.getReceivers();for(let b of a)b.playoutDelayHint= +0;this.setupLiveStats()}setupLiveStats(){this.clearStatsTimer();this.useStats&&!this.aggregateStatsIntervalId&&(this.aggregateStatsIntervalId=setInterval(()=>{this.pcClient&&this.pcClient.getStats(null).then(a=>this.processLiveStats(a))},1E3))}onStateChanged(a){this.signalingState!=this.pcClient.signalingState&&(this.signalingState=this.pcClient.signalingState,this.logStartupInfo(`__signaling: ${this.signalingState}`));this.iceConnectionState!=this.pcClient.iceConnectionState&&(this.iceConnectionState= +this.pcClient.iceConnectionState,this.logStartupInfo(`__ice_connection: ${this.iceConnectionState}`),"disconnected"!=this.iceConnectionState||this.isDatachannelOpened||this.logStartupInfo("\u8fde\u63a5\u5efa\u7acb\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u670d\u52a1\u5668\u7aef\u53e3\u8bbe\u7f6e"),"failed"!=this.iceConnectionState||this.isDatachannelOpened||this.logStartupInfo("\u8fde\u63a5\u5efa\u7acb\u5931\u8d25\uff0c\u65e0\u53ef\u7528\u7684\u5019\u9009\u8fde\u63a5"));this.iceGatheringState!=this.pcClient.iceGatheringState&& +(this.iceGatheringState=this.pcClient.iceGatheringState,this.logStartupInfo(`__ice_gathering: ${this.iceGatheringState}`))}clearStatsTimer(){this.aggregateStatsIntervalId&&(clearInterval(this.aggregateStatsIntervalId),this.aggregateStatsIntervalId=void 0)}send(a){return this.dcClient&&"open"==this.dcClient.readyState?(this.dcClient.send(a),!0):!1}requestInitialSettings(){this.send((new Uint8Array([7])).buffer)}requestQualityControl(){this.send((new Uint8Array([1])).buffer)}sendEnableIntervalSendQP(a){this.send((new Uint8Array([11, +a?1:0])).buffer)}_continueSendAPI(){if(0d){this.numOfEventCalls=0;let g=Math.ceil(c/d),q=[];for(var h=0;h{for(t=this.dcClient.bufferedAmount;kthis._continueSendAPI(),100);else if(t>l)break}},l=Math.max(8*e,1048576);this.dcClient.bufferedAmountLowThreshold=e;this.dcClient.onbufferedamountlow=t=>{this.numOfEventCalls++;f()};console.log(`sending api(command: ${a.command}) slices, count: ${g}`);f()}else{e=new DataView(new ArrayBuffer(4+2*c));d=0;e.setUint8(d,52);d++;e.setUint8(d,0);d++;e.setUint16(d,c,!0);d+=2;for(h=0;h{"inbound-rtp"!=c.type||c.isRemote||"video"!=c.mediaType&&!c.id.toLowerCase().includes("video")||(b.timestamp=c.timestamp,b.timestampStart=this.lastStats&&this.lastStats.timestampStart?this.lastStats.timestampStart:c.timestamp,b.bytesReceived=c.bytesReceived,b.packetsLost= +c.packetsLost,b.framesDropped=c.framesDropped,b.framesPerSecond=c.framesPerSecond,b.framesReceived=c.framesReceived,b.framesDecoded=c.framesDecoded,b.keyFramesDecoded=c.keyFramesDecoded,b.frameWidth=c.frameWidth,b.frameHeight=c.frameHeight,this.lastStats&&(b.bitrate=8*(b.bytesReceived-this.lastStats.bytesReceived)/(b.timestamp-this.lastStats.timestamp)));"track"==c.type&&c.frameWidth&&(c.framesDropped&&(b.framesDropped=c.framesDropped),c.framesReceived&&(b.framesReceived=c.framesReceived),b.frameWidth= +c.frameWidth,b.frameHeight=c.frameHeight);"candidate-pair"==c.type&&c.hasOwnProperty("currentRoundTripTime")&&0!=c.currentRoundTripTime&&(b.currentRoundTripTime=c.currentRoundTripTime)});this.lastStats.receiveToCompositeMs&&(b.receiveToCompositeMs=this.lastStats.receiveToCompositeMs,this.latencyTestTimings.setFrameDisplayDeltaTime(this.lastStats.receiveToCompositeMs));this.lastStats=b;this.events.onstats(this.lastStats)}onDatachannelMessage(a){var b=new Uint8Array(a.data);switch(b[0]){case 0:this.events.ondatachannelmessage("QualityControlOwnership", +1==b[1]);break;case 1:if((a=(new TextDecoder("utf-16")).decode(a.data.slice(1)))&&""!=a)this.events.ondatachannelmessage("ResponseAPI",a);break;case 101:b=b[1];a=(new TextDecoder("utf-8")).decode(a.data.slice(2));switch(b){case 0:this.events.ondatachannelmessage("ResponseAPI",a);break;case 1:this.reponse_api_json_string=a;break;case 2:this.reponse_api_json_string+=a;break;case 3:this.reponse_api_json_string+=a,this.events.ondatachannelmessage("ResponseAPI",this.reponse_api_json_string)}break;case 6:a= +(new TextDecoder("utf-16")).decode(a.data.slice(1));a=JSON.parse(a);this.latencyTestTimings.setUETimings(a);break;case 7:a=(new TextDecoder("utf-16")).decode(a.data.slice(1));a=JSON.parse(a);if(a.Encoder)this.events.ondatachannelmessage("InitialSettings",a);break;case 5:this.events.ondatachannelmessage("VideoEncoderAvgQP",a)}}startLatencyTest(){this.video&&(this.latencyTestTimings.start(),this.sendDescriptor(6,{StartTime:this.latencyTestTimings.TestStartTimeMs}))}}class ia{constructor(a){this.player= +a;this.uid=a.uid;this.container=a.container}appendElement(a){this.container.appendChild(a);this.setNeedReposUI()}removeElement(a){this.container.removeChild(a)}get(a){return wa(a+"_"+this.uid)}getValue(a){let b;return null==(b=this.get(a))?void 0:b.value}setValue(a,b){(a=this.get(a))&&(a.value=b)}setText(a,b){(a=this.get(a))&&(a.innerText=b)}setHtml(a,b){(a=this.get(a))&&(a.innerHTML=b)}resize(){this.player.resize()}setNeedReposUI(){this.player.bNeedReposUI=!0}}class $b extends ia{constructor(a){super(a); +this.el=document.createElement("pre");this.el.id=`eventsPanel_${this.uid}`;this.el.className="__eventsPanel";this.el.oncontextmenu=new Function("return false");this.el.onselectstart=new Function("return false");this.appendElement(this.el)}destroy(){this.el&&(this.removeElement(this.el),this.el=null)}appendText(a){if(this.el){let b=this.el.innerText;b+=a+"\n";this.el.innerText=b;this.el.scrollTop=this.el.scrollHeight+100}}setPosition(a){a||(a=this.container.getBoundingClientRect());this.el&&(this.el.style.width= +`${a.width}px`)}}class ca{}ca.Information='';ca.FullScreenEnter= +''; +ca.FullScreenExit=''; +ca.InitialCamera=''; +class ac extends ia{constructor(a){super(a);this.create()}create(){if(!this.el){this.el=document.createElement("button");this.el.id=`fullscreeButton_${this.uid}`;this.el.className="__fullscreeButton";if(R.isIOSDevice||R.isSafari)this.el.style.backgroundSize="cover";this.el.innerHTML=ca.FullScreenEnter;this.el.title=H.getString("EnterFullscreen");this.el.oncontextmenu=new Function("return false");this.el.onselectstart=new Function("return false");this.el.onclick=()=>this.player.fullscreen=!this.player.fullscreen; +this.el.onmousedown=a=>{1==a.button&&a.preventDefault()};this.appendElement(this.el);document.addEventListener("fullscreenchange",()=>{this.el.title=H.getString("ExitFullscreen");this.el.innerHTML=R.isFullscreen()?ca.FullScreenExit:ca.FullScreenEnter;this.player.resize()})}}destroy(){this.el&&(this.removeElement(this.el),this.el=null)}setPosition(a,b){a||(a=this.container.getBoundingClientRect());this.el&&(this.el.style.left=`${b?38:5}px`,this.el.style.top=`${a.height-32}px`)}}const ea={BackSpace:8, +Shift:16,Control:17,Alt:18,RightShift:253,RightControl:254,RightAlt:255};class bc extends ia{constructor(a,b){super(a);this.video=null;this.useBuiltinCursors=b.useBuiltinCursors;this.keyEventTargetStr=b.keyEventTarget;this.keyEventTarget="document"==b.keyEventTarget?document:"none"==b.keyEventTarget?null:"video";this.callOnUserInteraction=()=>this.player.resetInteractTimestamp();this.fakeMouseWithTouches=!1;this.onMButtonDoubleClick=b.onMButtonDoubleClick;this.mouseKeyListener=b.mouseKeyListener; +this.onActionEnable=!0;this.onEvents=b.onEvents;this.onVideoLoaded=b.onVideoLoaded;document.addEventListener("WeixinJSBridgeReady",()=>{R.isInWeixinBrowser=!0;this.video.play()});this.create()}isVideoLoaded(){return!!this._isVideoLoaded}create(){this.video&&this.destroy();this.video||(this.video=document.createElement("video"),this.video.id=`streamingVideo_${this.uid}`,this.video.style="position:absolute;",this.video.playsInline=!0,this.video.muted=!0,this.video.autoplay=!0,this.video.disablepictureinpicture= +!0,"video"===this.keyEventTarget&&(this.video.tabIndex=1,this.keyEventTarget=this.video),this.appendElement(this.video),this.player.logStartupInfo("video element created"),this._isVideoLoaded=!1,this.video.addEventListener("loadedmetadata",()=>{this._isVideoLoaded=!0;this.video.onmouseenter({button:0,x:0,y:0});this.onVideoLoaded()},!0),this.setCursor());if("requestVideoFrameCallback"in HTMLVideoElement.prototype){const a=(b,c)=>{c.receiveTime&&c.expectedDisplayTime&&(this.rtc.lastStats.receiveToCompositeMs= +c.presentationTime-c.receiveTime);this.video&&this.video.requestVideoFrameCallback(a)};this.video.requestVideoFrameCallback(a)}}setWebRtcPlayer(a){(!this.video||R.isAndroidDevice||R.isIOSDevice&&!R.isInWeixinBrowser)&&this.create();this.rtc=a;this.rtc.setVideo(this.video)}setActionEventEnabled(a){this.onActionEnable=a}destroy(){this.video&&(this.removeElement(this.video),this.video=null)}valid(){return!!this.video}videoWidth(){let a;return null==(a=this.video)?void 0:a.videoWidth}videoHeight(){let a; +return null==(a=this.video)?void 0:a.videoHeight}clientWidth(){let a;return null==(a=this.video)?void 0:a.clientWidth}clientHeight(){let a;return null==(a=this.video)?void 0:a.clientHeight}setTrack(a){let b=a.streams[0];this.player.logStartupInfo("track: "+a.track.kind);"audio"==a.track.kind?(a=document.createElement("Audio"),a.autoplay=!0,a.srcObject=b,a.play(),this.player.logStartupInfo("audio element created")):"video"==a.track.kind&&this.video.srcObject!==b&&(this.video.srcObject=b)}setKeyEventTarget(a){this.keyEventTargetStr!= +a&&(this.clearKeyboardEvents(),"video"==a?(this.video&&(this.video.tabIndex=1),this.keyEventTarget=this.video,this.video.focus()):"document"==a?(this.keyEventTarget=document,this.video.focus()):this.keyEventTarget&&(this.keyEventTarget=null),this.keyEventTargetStr=a,this.registerKeyboardEvents())}clearKeyboardEvents(){this.keyEventTarget&&(this.keyEventTarget.onkeydown=null,this.keyEventTarget.onkeyup=null,this.keyEventTarget.onkeypress=null)}registerKeyboardEvents(){this.keyEventTarget&&(this.keyEventTarget.onkeydown= +a=>{112<=a.keyCode&&123>=a.keyCode||a.ctrlKey||this.sendKeydown(a);if(a.keyCode===ea.BackSpace)this.keyEventTarget.onkeypress({charCode:ea.BackSpace});this.callActionEventHander(5,a)},this.keyEventTarget.onkeyup=a=>{112<=a.keyCode&&123>=a.keyCode||a.ctrlKey||this.sendKeyup(a);this.callActionEventHander(6,a)},this.keyEventTarget.onkeypress=a=>{112<=a.keyCode&&123>=a.keyCode||this.sendKeypress(a);this.callActionEventHander(7,a)})}setCursor(){if(this.video)if(this.useBuiltinCursors)switch(this.mouseDownButton){case 0:this.video.setAttribute("class", +"streamingVideoCursorPan");break;case 1:this.video.setAttribute("class","streamingVideoCursorMove");break;case 2:this.video.setAttribute("class","streamingVideoCursorRotate");break;default:this.video.setAttribute("class","streamingVideoCursorPointer")}else this.video.setAttribute("class","streamingVideoNoCursor")}callActionEventHander(a,b){if(this.mouseKeyListener&&this.onActionEnable)switch(a){case 0:if(R.isFunction(this.mouseKeyListener.onMouseEnter))this.mouseKeyListener.onMouseEnter(b);break; +case 1:if(R.isFunction(this.mouseKeyListener.onMouseLeave))this.mouseKeyListener.onMouseLeave(b);break;case 2:if(R.isFunction(this.mouseKeyListener.onMouseMove))this.mouseKeyListener.onMouseMove(b);break;case 3:if(R.isFunction(this.mouseKeyListener.onMouseDown))this.mouseKeyListener.onMouseDown(b);break;case 4:if(R.isFunction(this.mouseKeyListener.onMouseUp))this.mouseKeyListener.onMouseUp(b);break;case 5:if(R.isFunction(this.mouseKeyListener.onKeyDown))this.mouseKeyListener.onKeyDown(b);break;case 6:if(R.isFunction(this.mouseKeyListener.onKeyUp))this.mouseKeyListener.onKeyUp(b); +break;case 7:if(R.isFunction(this.mouseKeyListener.onKeyPress))this.mouseKeyListener.onKeyPress(b)}}isMiddleDoubleClick(a){if(1==a.button){if(this.lastMClickTimestamp&&200>a.timeStamp-this.lastMClickTimestamp)return!0;this.lastMClickTimestamp=a.timeStamp}else this.lastMClickTimestamp=void 0;return!1}registerMouseEvents(){this.video.onmouseenter=a=>{this.sendMouseEnter();a.buttons&1&&this.sendMouseDown(0,a.offsetX,a.offsetY);a.buttons&2&&this.sendMouseDown(2,a.offsetX,a.offsetY);a.buttons&4&&this.sendMouseDown(1, +a.offsetX,a.offsetY);a.buttons&8&&this.sendMouseDown(3,a.offsetX,a.offsetY);a.buttons&16&&this.sendMouseDown(4,a.offsetX,a.offsetY);this.callActionEventHander(0,a)};this.video.onmouseleave=a=>{this.sendMouseLeave();a.buttons&1&&this.sendMouseUp(0,a.offsetX,a.offsetY);a.buttons&2&&this.sendMouseUp(2,a.offsetX,a.offsetY);a.buttons&4&&this.sendMouseUp(1,a.offsetX,a.offsetY);a.buttons&8&&this.sendMouseUp(3,a.offsetX,a.offsetYy);a.buttons&16&&this.sendMouseUp(4,a.offsetX,a.offsetY);this.callActionEventHander(1, +a)};this.video.onmousemove=a=>{this.sendMouseMove(a.offsetX,a.offsetY,a.movementX,a.movementY);a.preventDefault();if(0==this.mouseDownButton||2==this.mouseDownButton)this.setCursor(),this.mouseDownButton=void 0;this.callActionEventHander(2,a)};this.video.onmousedown=a=>{this.keyEventTarget==this.video&&this.video.focus();this.sendMouseEnter();this.isMiddleDoubleClick(a)&&this.onMButtonDoubleClick?(this.onMButtonDoubleClick(a.offsetX,a.offsetY),a.preventDefault()):(this.mouseDownButton=a.button,this.sendMouseDown(a.button, +a.offsetX,a.offsetY),a.preventDefault(),0!=a.button&&2!=a.button&&this.setCursor(),this.callActionEventHander(3,a))};this.video.onmouseup=a=>{this.mouseDownButton=void 0;this.sendMouseUp(a.button,a.offsetX,a.offsetY);a.preventDefault();this.setCursor();this.callActionEventHander(4,a)};this.video.oncontextmenu=a=>{a.preventDefault()};"onmousewheel"in this.video?this.video.addEventListener("mousewheel",a=>{this.sendMouseWheel(a.wheelDelta,a.offsetX,a.offsetY);a.preventDefault()},{passive:!1}):this.video.addEventListener("DOMMouseScroll", +a=>{this.sendMouseWheel(-120*a.detail,a.offsetX,a.offsetY);a.preventDefault()},!1)}registerTouchEvents(){this.ongoingTouches=[];this.copyTouch=({identifier:b,clientX:c,clientY:e,force:d})=>({identifier:b,clientX:c,clientY:e,force:d});this.ongoingTouchIndexById=b=>{for(let c=0;c{let c=this.container.getBoundingClientRect(); +if(void 0===a){let e=b.changedTouches[0];a={id:e.identifier,x:e.clientX-c.left,y:e.clientY-c.top};this.video.onmouseenter(b);this.sendMouseDown(0,a.x,a.y)}b.preventDefault()},{passive:!1});this.video.addEventListener("touchend",b=>{let c=this.container.getBoundingClientRect();for(let e=0;e{var c=this.container.getBoundingClientRect();for(var e=0;e{b.preventDefault();null==this||this.onEvents(`ongoingTouches: ${this.ongoingTouches.length}, touches: ${b.touches.length}, changedTouches: ${b.changedTouches.length}`);this.ongoingTouches.length>b.touches.length- +b.changedTouches.length&&(this.onEvents&&this.onEvents(H.getString("TriggerSysTouch")),this.sendTouch(81,this.ongoingTouches),this.ongoingTouches=[]);b=b.changedTouches;for(let c=0;c{b.preventDefault();b=b.changedTouches;this.sendTouch(81,b);for(let c=0;c{b.preventDefault();this.sendTouch(82,b.touches)},{passive:!1})}resize(a){this.playerAspectRatio=this.container.clientHeight/this.container.clientWidth;this.videoAspectRatio=a?this.playerAspectRatio:this.videoHeight()/this.videoWidth()}normalizeAndQuantizeUnsigned(a,b){if(this.playerAspectRatio>this.videoAspectRatio){let c=this.playerAspectRatio/this.videoAspectRatio;a/=this.container.clientWidth;b=c*(b/this.container.clientHeight-.5)+.5}else a=this.videoAspectRatio/ +this.playerAspectRatio*(a/this.container.clientWidth-.5)+.5,b/=this.container.clientHeight;return 0>a||1b||1this.videoAspectRatio){let c=this.playerAspectRatio/this.videoAspectRatio;a/=.5*this.container.clientWidth;b=c*b/(.5*this.container.clientHeight);return{x:32767*a,y:32767*b}}return{x:this.videoAspectRatio/this.playerAspectRatio*a/(.5*this.container.clientWidth)*32767, +y:b/(.5*this.container.clientHeight)*32767}}sendTouch(a,b){this.callOnUserInteraction();var c=new DataView(new ArrayBuffer(2+10*b.length));c.setUint8(0,a);c.setUint8(1,b.length);let e=2,d=[];for(let h=0;hl?null==this||this.onEvents("can't figure out which touch to continue"):(c.setUint16(e,f.x,!0),e+=2,c.setUint16(e,f.y, +!0),e+=2,c.setInt32(e,l,!0),e+=4,c.setUint8(e,255*g.force,!0),e+=1,c.setUint8(e,f.inRange?1:0,!0),e+=1,this.onEvents&&d.push(`{${l} (${parseInt(q)},${parseInt(k)})->(${parseInt(f.x)},${parseInt(f.y)}) ${255*g.force} ${f.inRange?1:0}}`))}this.rtc.send(c.buffer);this.onEvents&&(c="",80==a?c="start":82==a?c="move":81==a&&(c="end"),a=`[${c}] N${b.length} ${d.join(",")}}`,this.onEvents(a))}sendKeydown(a){this.callOnUserInteraction();let b=xa(a),c;null==(c=this.onEvents)||c.call(this,`Send KeyDown, Code:${b}, Repeat:${a.repeat}`); +this.rtc.send((new Uint8Array([60,b,a.repeat])).buffer)}sendKeyup(a){this.callOnUserInteraction();a=xa(a);let b;null==(b=this.onEvents)||b.call(this,`Send KeyUp:${a}`);this.rtc.send((new Uint8Array([61,a])).buffer)}sendKeypress(a){this.callOnUserInteraction();var b;null==(b=this.onEvents)||b.call(this,`Send KeyPress:${a.charCode}`);b=new DataView(new ArrayBuffer(3));b.setUint8(0,62);b.setUint16(1,a.charCode,!0);this.rtc.send(b.buffer)}sendMouseEnter(){this.callOnUserInteraction();var a;null==(a=this.onEvents)|| +a.call(this,"Send MouseEnter");a=new DataView(new ArrayBuffer(1));a.setUint8(0,70);this.rtc.send(a.buffer)}sendMouseLeave(){this.callOnUserInteraction();var a;null==(a=this.onEvents)||a.call(this,"Send MouseLeave");a=new DataView(new ArrayBuffer(1));a.setUint8(0,71);this.rtc.send(a.buffer)}sendMouseMove(a,b,c,e){this.callOnUserInteraction();if(this.normalizeAndQuantizeUnsigned){var d;null==(d=this.onEvents)||d.call(this,`Send MouseMove, X:${a}, Y:${b}, DeltaX:${c}, DeltaY:${e}`);a=this.normalizeAndQuantizeUnsigned(a, +b);c=this.normalizeAndQuantizeSigned(c,e);e=new DataView(new ArrayBuffer(9));e.setUint8(0,74);e.setUint16(1,a.x,!0);e.setUint16(3,a.y,!0);e.setInt16(5,c.x,!0);e.setInt16(7,c.y,!0);this.rtc.send(e.buffer)}}sendMouseDown(a,b,c){this.callOnUserInteraction();if(this.normalizeAndQuantizeUnsigned){var e;null==(e=this.onEvents)||e.call(this,`Send MouseDown, Button:${a}, X:${b}, Y:${c}`);b=this.normalizeAndQuantizeUnsigned(b,c);c=new DataView(new ArrayBuffer(6));c.setUint8(0,72);c.setUint8(1,a);c.setUint16(2, +b.x,!0);c.setUint16(4,b.y,!0);this.rtc.send(c.buffer)}}sendMouseUp(a,b,c){if(this.normalizeAndQuantizeUnsigned){var e;null==(e=this.onEvents)||e.call(this,`Send MouseUp, Button:${a}, X:${b}, Y:${c}`);b=this.normalizeAndQuantizeUnsigned(b,c);c=new DataView(new ArrayBuffer(6));c.setUint8(0,73);c.setUint8(1,a);c.setUint16(2,b.x,!0);c.setUint16(4,b.y,!0);this.rtc.send(c.buffer)}}sendMouseWheel(a,b,c){this.callOnUserInteraction();if(this.normalizeAndQuantizeUnsigned){var e;null==(e=this.onEvents)||e.call(this, +`Send MouseWheel, Delta:${a}, X:${b}, Y:${c}`);b=this.normalizeAndQuantizeUnsigned(b,c);c=new DataView(new ArrayBuffer(7));c.setUint8(0,75);c.setInt16(1,a,!0);c.setUint16(3,b.x,!0);c.setUint16(5,b.y,!0);this.rtc.send(c.buffer)}}}class cc extends ia{constructor(a,b,c){super(a);this.updateConnectionCount(b);this.createButton(c)}createButton(a){if(!this.elButton){this.elButton=document.createElement("button");this.elButton.id=`liveStatusSwitchButton_${this.uid}`;this.elButton.innerHTML=ca.Information; +this.elButton.title=a;this.elButton.className="__liveStatusSwitchButton";if(R.isIOSDevice||R.isSafari)this.elButton.style.backgroundSize="cover";this.elButton.oncontextmenu=new Function("return false");this.elButton.onselectstart=new Function("return false");this.elButton.onclick=()=>this.setPanelVisible();this.elButton.onmousedown=b=>{1==b.button&&b.preventDefault()};this.appendElement(this.elButton)}}createPanel(){if(!this.elPanel){var a=''+ +``+``+``+ +``+``+``+``+ +``+``+``+ +``+``+``+"
${H.getString("ConnInfo")}1-1${H.getString("Close")}
${H.getString("Duration")}00:00:00
${H.getString("Resolution")}1920 x 1080
${H.getString("Received")}0 kB
${H.getString("ReceivedFrames")}0
${H.getString("Dropped")}0 / 0
${H.getString("DecodingTime")}
${H.getString("DecodeFrames")}0 / 0
${H.getString("Bitrate")}-
${H.getString("FPS")}- / -
${H.getString("QP")}0
${H.getString("MaxQP")}
${H.getString("MaxBitrate")}
"; +this.elPanel=document.createElement("div");this.elPanel.innerHTML=a;this.elPanel.id=`liveStatusPanel_${this.uid}`;this.elPanel.className="__liveStatusPanel __fadeinComp";this.elPanel.oncontextmenu=new Function("return false");this.elPanel.onselectstart=new Function("return false");this.appendElement(this.elPanel);this.get("i_hide_panel").onclick=()=>this.setPanelVisible();for(a=29;40>=a;a++)this.get("i_settings_maxQP").add(new Option(a,a));this.get("i_settings_maxQP").onchange=()=>{let b={encodeMaxQP:this.getValue("i_settings_maxQP")}; +this.player.rtc.updateParams(b);this.player.signallingConnection.updateParams(b);this.get("i_settings_maxQP").blur()};for(a=10;100>=a;a+=5)this.get("i_settings_maxBitrate").add(new Option(a,a));this.get("i_settings_maxBitrate").onchange=()=>{let b={maxBitrate:this.getValue("i_settings_maxBitrate")};this.player.rtc.updateParams(b);this.player.signallingConnection.updateParams(b);this.get("i_settings_maxBitrate").blur()}}}setPosition(a){a||(a=this.container.getBoundingClientRect());this.elButton&&(this.elButton.style.top= +`${a.height-32}px`);if(this.elPanel)if(this.customPosX&&this.customPosY)this.elPanel.style.left=this.customPosX+"px",this.elPanel.style.top=this.customPosY+"px";else{let b=this.elPanel.getBoundingClientRect();this.elPanel.style.left="5px";this.elPanel.style.top=`${a.height-b.height-42}px`}}destroy(){this.updateLatencyTestUI=!1;this.visible&&this.setPanelVisible();this.elPanel&&(this.removeElement(this.elPanel),this.elPanel=null);this.elButton&&(this.removeElement(this.elButton),this.elButton=null)}setPanelVisible(a, +b){this.customPosX=a;this.customPosY=b;if(this.elPanel)if("none"==this.elPanel.style.display)this.updateConnectionCount(),this.elPanel.style.display="block",this.elPanel.className="__liveStatusPanel __fadeinComp",this.visible=!0,this.player.rtc.sendEnableIntervalSendQP(!0);else{this.elPanel.className="__liveStatusPanel __fadeoutComp";setTimeout(()=>{this.visible=!1;this.elPanel.style.display="none";this.player.rtc.sendEnableIntervalSendQP(!1);this.setNeedReposUI();this.resize()},500);return}else this.createPanel(), +this.visible=!0,this.resize(),this.updateConnectionCount(),this.player.rtc.requestInitialSettings(),this.player.rtc.sendEnableIntervalSendQP(!0);this.setNeedReposUI();this.resize()}adjustMaxQP(a){return 18==a?(this.get("i_settings_maxQP")&&this.get("i_settings_maxQP").add(new Option(18,18)),18):0>a?40:0<=a&&29>a?29:40a?10:100e);d++)e/=1E3,c=b[d];this.setText("i_bytesReceived", +this.formatNumber(e)+" "+c);this.setText("i_framesReceived",this.processValue(a.framesReceived));this.setText("i_framesDecoded",a.framesDecoded);this.setText("i_keyframesDecoded",this.processValue(a.keyFramesDecoded));this.updateVideoFramerate(this.formatNumber(a.framesPerSecond));this.updateBitrate(a.bitrate);this.setText("i_packetsLost",this.processValue(a.packetsLost));this.setText("i_frameDropped",this.processValue(a.framesDropped));this.setText("i_compositeTime",this.formatNumber(a.receiveToCompositeMs, +1))}}updateVideoFramerate(a){let b=this.get("i_framerateVideo");b.style.color=10>a?"red":20>a?"orange":"rgb(128,255,0)";b.innerText=a}updateBitrate(a){let b=this.get("i_bitrate");a?1E3a?"red":1E3>a?"orange":"rgb(128,255,0)",b.innerText=this.formatNumber(a)+" kbps"):b.innerText="-"}updateInitialSettings(a){let b=this.adjustMaxQP(a.Encoder.MaxQP);this.setValue("i_settings_maxQP",b);a=this.adjustMaxBitrate(a.WebRTC.MaxBitrate/ +1E3/1E3);this.setValue("i_settings_maxBitrate",a)}updateQPAndRenderFPS(a,b){let c=this.get("i_qp");c.style.color=35this.setVisible(!1),500)}setDelayClear(a){this.bDelayClear= +a}log(a){if(this.el){if(this.bDelayClear)this.bDelayClear=!1,this.el.innerText=a+"\n";else{let b=this.el.innerText;b+=a+"\n";this.el.innerText=b}this.el.scrollTop=this.el.scrollHeight+100}}setPosition(a){a||(a=this.container.getBoundingClientRect());this.el&&(this.el.style.height=`${a.height-20}px`)}}class ec extends ia{constructor(a){super(a);this.create()}create(){this.el||(this.el=document.createElement("i"),this.el.id=`statusIndicator_${this.uid}`,this.el.className="__statusIndicator",this.appendElement(this.el))}destroy(){this.el&& +(this.removeElement(this.el),this.el=null)}setStatus(a){let b="Red",c=this.get("statusIndicator");switch(a){case V.WS_Disconnected:b="Red";c&&(c.style.display="inline-block");break;case V.WS_Connecting:b="RGB(200,200,200)";break;case V.WS_Connected:b="Yellow";break;case V.RTC_Opened:b="RGB(0,128,255)";break;case V.OnReady:b="RGB(0,255,0)",this.hide()}this.lastStatus=a;c&&(c.style.backgroundColor=b)}hide(){let a=this.get("statusIndicator");a&&(a.style.display="none")}}class fc{constructor(){this.css("@keyframes __fadeoutframes {0%{opacity:1;} 100%{opacity:0;}}.__fadeoutComp {animation-duration:600ms; animation-name:__fadeoutframes;}@keyframes __fadeinframes {0%{opacity:0;} 100%{opacity:0.65;}}.__fadeinComp {animation-duration:100ms; animation-name:__fadeinframes;}@keyframes twinkling{0%{opacity:0;}100%{opacity:1;}}.__statusIndicator {position:absolute;display:block;left:5px;top:5px;width:6px;height:6px;border-radius:50%;background-color:red;animation:twinkling 0.25s infinite ease-in-out;}.__startupInfoPanel { position:absolute;left:3px;top:0px;width:400px;background-color:transparent !important;text-shadow:black 0.1em 0.1em 0.2em;color:white;font-family:Verdana;font-size:12px !important;overflow:auto;}.__liveStatusPanel {position:absolute;left:5px;top:10px;width:164px;height:300px;background-color:rgba(50,50,50,0.8);color:#00FF00;font-family:Verdana;font-size:10px;box-shadow:0px 0px 5px 5px rgba(200,200,200,0.5);-moz-border-radius:8px;-webkit-border-radius:8px;}.__liveStatusPanel a:link { color: rgb(0,255,128); text-decoration: none; }.__liveStatusPanel a:hover { color: yellow; background:transparent; }.__liveStatusPanel input {background:transparent; border:1px solid gray; color: #00FF00;}.__liveStatusPanel select {background:transparent; border:1px solid gray; color: #00FF00;}.__liveStatusPanel option {background:#333; color: #00FF00;}.__liveStatusSwitchButton{position:absolute;padding:0;left:6px;width:26px;height:26px;opacity:0.65;cursor:pointer;background-size:conver;}.__fullscreeButton {position:absolute;padding:0;left:38px;width:26px;height:26px;opacity:0.65;cursor:pointer;background-size:conver;}.__viewHomeButton {position:absolute;padding:0;left:70px;width:26px;height:26px;opacity:0.65;cursor:pointer;background-size:conver;}.__taskWaiting {position:absolute;z-index:30;text-align:center;padding-left:5px;text-shadow:black 0.1em 0.1em 0.2em;color:lime;font-family:Verdana;font-size:12px !important;overflow:hidden;display:none;}.__eventsPanel {position:absolute;left:3px;top:0px;width:600px;height:200px;background-color:rgba(64,64,64,0.5) !important;text-shadow:black 0.1em 0.1em 0.2em;color:white;font-family:Verdana;font-size:12px !important;overflow:auto;}.streamingVideoNoCursor {width:100%;height:100%;}.streamingVideoCursorMove {width:100%;height:100%;cursor:move;}.streamingVideoCursorPan {width:100%;height:100%;cursor:url(data:application/octet-stream;base64,AAACAAEAICAAAA8ADwCoDAAAFgAAACgAAAAgAAAAQAAAAAEAGAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////8AAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////////////////////////////////////////////4B///+Af///AH///gA///wAP//8AB///gAf//8AH//+AB///gA///8k///////////////////////////////////////////////////////////////////////w==),auto;}.streamingVideoCursorPointer {width:100%;height:100%;cursor:url(data:application/octet-stream;base64,AAACAAEAICAAAA0ACACoDAAAFgAAACgAAAAgAAAAQAAAAAEAGAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////////////////////////////////////////////4B///+Af///AH///gA///wAP//8AB//+AAf//AAD//wAA//+AAP//4AD//+AF///gT///4f///+H////h////8////////////////////////////////////////w==),auto;}.streamingVideoCursorRotate {width:100%;height:100%;cursor:url(data:application/octet-stream;base64,AAACAAEAICAAAA8ADwCoDAAAFgAAACgAAAAgAAAAQAAAAAEAGAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAD///////////////////////////////////////8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////8AAAD///8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////////////////////////////////////////////4B///+Af///AH//hgAh/wwAMP4cABh+HgAYfh8AGH4eABh+HgA4eAck4BwP//A+H//4fz///P/////////////////////////////////////////////////////w==),auto;}")}css(a){let b= +document.createElement("style");try{b.appendChild(document.createTextNode(a))}catch(c){b.styleSheet.cssText=a}(a=document.getElementsByTagName("head")[0])?a.appendChild(b):console.error("[Cloud] No head element found, cannot create css.")}}class gc extends ia{constructor(a){super(a);this.elContainer=document.createElement("div");this.elContainer.id=`taskWaiting_${this.uid}`;this.elContainer.className="__taskWaiting";this.elContainer.oncontextmenu=new Function("return false");this.elContainer.onselectstart= +new Function("return false");this.appendElement(this.elContainer);this.elText=document.createElement("div");this.elText.style.marginBottom="15px";this.elText.innerText="dddd";this.elContainer.appendChild(this.elText);this.elButton=document.createElement("input");this.elButton.type="button";this.elButton.value=H.getString("RestartInstNow");this.elButton.onclick=()=>{this.player.setInstanceOptions({iid:this.player.options.iid,reset:!0})};this.elContainer.appendChild(this.elButton);H.onLanguageChangedCallbacks.push(()=> +{this.elButton.value=H.getString("RestartInstNow")});this.setMode(0)}setMode(a){this._mode=a;0===a?this.elContainer.style.background="transparent":(this.elContainer.style.background="rgba(64,64,64,0.5)",this.elContainer.style.height="26px",this.elContainer.style.lineHeight="26px")}destroy(){this.elContainer&&(this.removeElement(this.elContainer),this.elContainer=null)}updateText(a){this.elText&&(this.elText.innerText=a,this.show())}show(){this.elContainer.className="__taskWaiting";this.elContainer.style.display= +"block"}hide(){this.elContainer.className="__taskWaiting __fadeoutComp";setTimeout(()=>this.elContainer.style.display="none",500)}setPosition(a,b,c,e){if(this.elContainer)if(a||(a=this.container.getBoundingClientRect()),0==this._mode){var d=a.width/2-150;0>d&&(d=10);this.elContainer.style.left=d+"px";this.elContainer.style.top=a.height/2+"px"}else d=0,b&&d++,c&&d++,e&&d++,a=a.height-32,this.elContainer.style.left=(0==d?5:1==d?38:2==d?70:102)+"px",this.elContainer.style.top=a+"px"}}class hc extends ia{constructor(a){super(a); +this.create()}create(){if(!this.el){var a=[];a.push(H.getString("LeftClickTip"));a.push(H.getString("RightClickTip"));a.push(H.getString("MiddleClickTip"));a=a.join("\n");this.el=document.createElement("button");this.el.id=`viewHomeButton_${this.uid}`;this.el.className="__viewHomeButton";if(R.isIOSDevice||R.isSafari)this.el.style.backgroundSize="cover";this.el.innerHTML=ca.InitialCamera;this.el.title=a;this.el.oncontextmenu=new Function("return false");this.el.onselectstart=new Function("return false"); +this.el.onclick=b=>this.player.viewHome(0);this.el.onmousedown=b=>{0!=b.button&&this.player.viewHome(b.button);b.preventDefault()};this.appendElement(this.el)}}destroy(){this.el&&(this.removeElement(this.el),this.el=null)}setPosition(a,b,c){a||(a=this.container.getBoundingClientRect());if(this.el){let e=5;if(b&&c)e=70;else if(b||c)e=38;this.el.style.left=e+"px";this.el.style.top=`${a.height-32}px`}}}var va=0;class ic{constructor(a,b){if(a){this.host=a;this.options=b;ka.processParams(this.options); +H.setLanguage();this.uid=++va;this.options.apiOptions.player=this;this.api=new ra(null,this.options.apiOptions);if(this.options.domId)if(a=wa(this.options.domId))this.container=document.createElement("div"),this.container.style="position:relative;width:100%;height:100%;",a.innerHTML="",a.appendChild(this.container);else if("loading"==document.readyState){console.error(H.getString("DomLoading"));return}if(this.hasVideo=!!this.container)this.styleManager=new fc,this.createWidgetsInConstructor(),this.canAdaptiveResolution= +!1,this.lastResizeTime=Date.now(),this.orientationChangeTimeout=void 0;this.constructUrlAndConnect();this.resetInteractTimestamp()}else console.error("[DigitalTwinPlayer] The parameter `host` cannot be empty!")}constructUrlAndConnect(){this.logStartupInfo(`host: ${this.host}`);this.useHttps="https:"==location.protocol||this.options.useHttps;this.url=`${this.useHttps?"wss":"ws"}://${this.host}/player?hasVideo=${this.hasVideo}`;this.options.offer&&(this.url+="&offer=1");this.options.iid&&(this.url+= +"&iid="+this.options.iid);this.options.pid&&(this.url+="&pid="+this.options.pid);this.options.password&&(this.url+="&password="+this.options.password);if("object"==typeof this.options.urlExtraInfo)for(let a in this.options.urlExtraInfo)this.url+="&"+a+"="+this.options.urlExtraInfo[a];this.options.reset&&(this.url+="&reset=1",this.options.reset=!1);setTimeout(()=>this.connectSignallingServer(),200)}callEvent(a,b,c){a=this.options.events[a];"function"==typeof a&&a(b,c)}getHost(){return this.host}getAPI(){return this.api}getInstanceInfo(){return this.paramInfo}getVideoElement(){let a; +return null==(a=this.htmlVideo)?void 0:a.video}getVideoElementSize(){let a=this.getVideoElement();return{width:null==a?void 0:a.clientWidth,height:null==a?void 0:a.clientHeight}}getVideoStreamSize(){return{width:this.htmlVideo.videoWidth(),height:this.htmlVideo.videoHeight()}}getVideoSize(){return this.getVideoStreamSize()}screen2World(a,b,c){let e=this.getVideoElementSize(),d=this.getVideoStreamSize(),h=0,g=0,q=d.height/d.width;e.height/e.width>q?g=-(e.width*q-e.height)/2:h=-(e.height/q-e.width)/ +2;a=d.width/(e.width-2*h)*(a-h);b=d.height/(e.height-2*g)*(b-g);return this.getAPI().coord.screen2World(a,b,c)}world2Screen(a,b,c,e){const d=this;return $jscomp.asyncExecutePromiseGeneratorFunction(function*(){let h=yield __g.coord.world2Screen(a,b,c,e),g=d.getVideoElementSize(),q=d.getVideoStreamSize(),k=0,f=0,l=q.height/q.width;g.height/g.width>l?f=-(g.width*l-g.height)/2:k=-(g.height/l-g.width)/2;h.screenPosition=[h.screenPosition[0]/(q.width/(g.width-2*k))+k,h.screenPosition[1]/(q.height/(g.height- +2*f))+f];return h})}setResolution(a,b){if(this.streamerAdaptive){window.devicePixelRatio&&(a*=window.devicePixelRatio,b*=window.devicePixelRatio);if(4096this.streamerResX||b>this.streamerResY)&&(b=a/b,b>=this.streamerResX/this.streamerResY?(a=this.streamerResX,b=this.streamerResX/b):(a=this.streamerResY*b,b=this.streamerResY));a=Math.floor(a);b=Math.floor(b);var c=this.htmlVideo.videoWidth(), +e=this.htmlVideo.videoHeight();if(a!=c&&a+1!=c&&a-1!=c||b!=e&&b+1!=e&&b-1!=e){if(this.lastWidth&&this.lastHeight&&(c=Math.abs(this.lastWidth-a),e=Math.abs(this.lastHeight-b),(0!=c||0!=e)&&4>c&&4>e))return;this.lastWidth=a;this.lastHeight=b;this.rtc&&this.rtc.updateRenderResolution(a,b);return[a,b]}}}destroy(a){console.log(`call DigitalTwinPlayer.destroy: ${a||" "}`);if(!this.isDestroyed){va--;this.isDestroyed=!0;this.destroyReason=a;var b;null==(b=this.rtc)||b.close();var c;null==(c=this.signallingConnection)|| +c.close()}}setKeyEventTarget(a){let b;null==(b=this.htmlVideo)||b.setKeyEventTarget(a)}setKeyEventReceiver(a){this.setKeyEventTarget(a)}resize(){if(this.container){this.rect=this.container.getBoundingClientRect();if(this.bNeedReposUI||!this.oldRect||this.oldRect.width!=this.rect.width||this.oldRect.height!=this.rect.height){this.bNeedReposUI=!1;this.oldRect=this.rect;let b;null==(b=this.startupInfo)||b.setPosition(this.rect);let c;null==(c=this.liveStatus)||c.setPosition(this.rect);let e;null==(e= +this.fullscreenButton)||e.setPosition(this.rect,this.options.ui.statusButton);let d;null==(d=this.homeButton)||d.setPosition(this.rect,this.options.ui.statusButton,this.options.ui.fullscreenButton);let h;null==(h=this.taskListBar)||h.setPosition(this.rect,this.options.ui.statusButton,this.options.ui.fullscreenButton,this.options.ui.homeButton)}if(this.htmlVideo.valid()){this.canAdaptiveResolution&&(console.warn("set res..."),this.setResolution(this.htmlVideo.clientWidth(),this.htmlVideo.clientHeight())); +var a;null==(a=this.htmlVideo)||a.resize(this.streamerAdaptive&&this.canAdaptiveResolution)}}}setInstanceOptions(a){const b=this;return $jscomp.asyncExecutePromiseGeneratorFunction(function*(){var c=a.pid==b.options.pid&&a.iid==b.options.iid||!a.pid&&a.iid==b.options.iid||!a.iid&&a.pid==b.options.pid;if(c&&!a.reset)b.api.log("setInstanceOptions: no change.");else{if(!c){c=(!a.iid||a.iid==b.options.iid)&&a.pid!=b.options.pid;if(b.streamerLocked&&c){b.api.log(H.getString("CannotChangeProject"));return}c= +yield b.signallingConnection.checkParams(a);if(null!==c){if(!1===c.iid){b.api.log(`iid(${a.iid})${H.getString("InstanceNotExist")}`);return}if(!1===c.pid){b.api.log(`pid(${a.pid})${H.getString("ProjectNotExist")}`);return}}}b.destroy();b.options.iid=a.iid;b.options.pid=a.pid;b.options.reset=a.reset;b.constructUrlAndConnect()}})}set fullscreen(a){a?R.fullscreen(this.container):R.exitFullscreen()}get fullscreen(){return!!document.fullscreenElement}setActionEventEnabled(a){let b;null==(b=this.htmlVideo)|| +b.setActionEventEnabled(a)}onApiReady(){this.setStatus(V.OnReady);let a;null==(a=this.signallingConnection)||a.sendReady();1==this.options.ui.mainUI?this.api.settings.setMainUIVisibility(!0):0==this.options.ui.mainUI&&this.api.settings.setMainUIVisibility(!1);1==this.options.ui.campass?this.api.settings.setCampassVisible(!0):0==this.options.ui.campass&&this.api.settings.setCampassVisible(!1)}sendApi(a){if(a){let b;null==(b=this.rtc)||b.sendApi(a)}}onMainThreadBusy(a){if(1===a.busy){let b="BUSY! ", +c=this.api.apiQueue.queueSize(),e=this.api.apiQueue.dataSize();0{if(Date.now()-this.timeOfLastInteraction> +6E4*this.kickOutInMinutes){let g=H.getString("DisconnectForIdle");this.destroy(g);console.warn(g);clearInterval(h)}},2E4)}this.nodeInfoArray=[`${H.getString("NodeInfo")}`];e&&this.nodeInfoArray.push(`\t${H.getString("Host")}`+e);c&&this.nodeInfoArray.push(`\t${H.getString("HostAddress")}`+c);b&&this.nodeInfoArray.push(`\t\u3000${H.getString("Project")}`+b);this.options.pid&&this.nodeInfoArray.push(`\t${H.getString("ProjectId")}`+this.options.pid);this.nodeInfoArray.push(`\t${H.getString("IID")}`+ +this.options.iid);this.nodeInfoArray.push(`\t${H.getString("Adaptive")}`+this.streamerAdaptive);this.nodeInfoArray.push(`\t${H.getString("LimitMaxRes")}`+this.streamerLimitMaxResolution);this.nodeInfoArray.push(`\t${H.getString("Resolution")}${this.streamerResX}x${this.streamerResY}`);let d;null==(d=this.liveStatus)||d.updateButtonTip(this.nodeInfoArray.join("\n"));this.api.log(this.nodeInfoArray.join("\n\t"))}logStartupInfo(a){if(a){var b=new Date;a=`[${pa(b.getHours(),2)+":"+pa(b.getMinutes(),2)+ +":"+pa(b.getSeconds(),2)+"."+pa(b.getMilliseconds(),3)}] ${a}`;var c;null==(c=this.startupInfo)||c.log(a);1{let b;return null==(b=this.eventsPanel)? +void 0:b.appendText(a)},onVideoLoaded:()=>{this.logStartupInfo("video: loadedmetadata");this.createWidgets();this.callEvent("onVideoLoaded");this.resize()},onMButtonDoubleClick:(a,b)=>{let c;null==(c=this.liveStatus)||c.setPanelVisible(a,b)}});this.options.ui.statusIndicator&&(this.statusIndicator=new ec(this));this.options.ui.startupInfo&&(this.startupInfo=new dc(this),this.logStartupInfo("sdk version: "+this.api.getVersion()),this.logStartupInfo("uid: "+this.uid));this.resizeObserver=new ResizeObserver(Ga(()=> +this.resize(),500));this.resizeObserver.observe(this.container)}createWidgets(){this.options.ui.statusButton&&(this.liveStatus=new cc(this,this.playerCount,this.nodeInfoArray.join("\n")));this.options.ui.fullscreenButton&&(this.fullscreenButton=new ac(this));this.options.ui.homeButton&&(this.homeButton=new hc(this));this.taskListBar&&this.taskListBar.setMode(1)}destroyWidgets(){this.liveStatus&&(this.liveStatus.destroy(),this.liveStatus=null);this.fullscreenButton&&(this.fullscreenButton.destroy(), +this.fullscreenButton=null);this.homeButton&&(this.homeButton.destroy(),this.homeButton=null);this.eventsPanel&&(this.eventsPanel.destroy(),this.eventsPanel=null);this.taskListBar&&(this.taskListBar.destroy(),this.taskListBar=null)}isQualityController(){return this.bQualityController}initWebRtcPlayer(a){H.setLanguage(a.language);this.rtc=new Zb({useStats:this.hasVideo&&(this.options.ui.statusButton||this.options.events.onRtcStatsReport),peerConnectionOptions:a.peerConnectionOptions,events:{onlog:b=> +this.logStartupInfo(b),ontrack:b=>{let c;null==(c=this.htmlVideo)||c.setTrack(b)},onicecandidate:b=>{let c;return null==(c=this.signallingConnection)?void 0:c.sendCandidate(b)},onOfferCreated:b=>{let c;return null==(c=this.signallingConnection)?void 0:c.sendOffer(b.sdp,this.hasVideo)},onAnswerCreated:b=>{let c;return null==(c=this.signallingConnection)?void 0:c.send(b)},onstats:b=>{let c;null==(c=this.liveStatus)||c.updateWebRtcStats(b);this.callEvent("onRtcStatsReport",b)},ondatachannelopen:()=> +{this.setStatus(V.RTC_Opened);this.hasVideo&&(this.rtc.requestQualityControl(),this.liveStatus&&this.rtc.requestInitialSettings());this.api.onConnectionOpen()},ondatachannelclose:b=>this.api.onConnectionClose(b),ondatachannelerror:b=>this.api.onConnectionClose(b.error),ondatachannelmessage:(b,c)=>{switch(b){case "ResponseAPI":this.api.onConnectionMessage(c);break;case "InitialSettings":let e;null==(e=this.liveStatus)||e.updateInitialSettings(c);break;case "VideoEncoderAvgQP":let d;if(null==(d=this.liveStatus)? +0:d.visible)b=(new TextDecoder("utf-16")).decode(c.data.slice(1)),(b=JSON.parse(b))&&this.liveStatus.updateQPAndRenderFPS(b.qp,b.renderFPS);break;case "QualityControlOwnership":this.bQualityController=c;let h;null==(h=this.liveStatus)||h.updatePlayerId()}}}});this.hasVideo&&this.htmlVideo.setWebRtcPlayer(this.rtc);this.logStartupInfo("setting up...");this.options.offer&&this.rtc.createOffer();this.hasVideo&&(this.htmlVideo.registerKeyboardEvents(),this.htmlVideo.registerMouseEvents(),this.htmlVideo.registerTouchEvents())}connectSignallingServer(){this.setStatus(V.WS_Connecting); +this.signallingConnection=new Wb({onopen:()=>this.setStatus(V.WS_Connected),onclose:a=>this.handleSignallingClose(a),onerror:()=>{this.setStatus(V.WS_Disconnected)},onmessage:a=>{switch(a.type){case "config":this.initWebRtcPlayer(a);break;case "answer":this.playerId=a.playerId;this.rtc&&this.rtc.onReceiveAnswer(a);break;case "offer":this.playerId=a.playerId;this.rtc&&this.rtc.onReceiveOffer(a);break;case "iceCandidate":this.rtc&&this.rtc.onIceCandidate(a.candidate);break;case "paramInfo":this.receiveParamInfo(a); +break;case "status":this.handleSignallingMessage_Status(a);break;case "playerCount":this.handleSignallingMessage_PlayerCount(a)}}});this.signallingConnection.connect(this.url)}handleSignallingClose(a){this.destroyWidgets();this.callEvent("onConnClose",a);this.startupInfo&&this.startupInfo.setVisible(!0);this.api.onConnectionClose(a);this.rtc&&this.rtc.close();let b="";this.isDestroyed?(b=H.getString("Destroyed"),b=this.destroyReason?b+(": "+this.destroyReason):b+"."):(b="closed: ",a.code&&(b+=a.code), +a.reason?b+=" "+a.reason:1006==a.code&&(b+=" "+H.getString("Disconnect")));this.setStatus(V.WS_Disconnected,b);Ia(a.code)||this.destroy();this.isDestroyed||(this.logStartupInfo(H.getString("Reconnect5s")),this.startupInfo.setDelayClear(!0),setTimeout(()=>this.connectSignallingServer(),5E3));a.code==sa.instance_is_busy&&confirm(H.getString("RestartAndRetry"))&&this.setInstanceOptions({iid:this.busyIId,reset:!0})}handleSignallingMessage_Status(a){let b=Ha(a.state);b&&this.logStartupInfo(b);a.state=== +da.StartFailed?(console.error(a.info),this.options.ui.startupInfo&&setTimeout(()=>alert(a.info),500)):a.state==da.ConfirmBusy&&(this.busyIId=a.info)}handleSignallingMessage_PlayerCount(a){this.playerCount=a.count;let b;null==(b=this.liveStatus)||b.updateConnectionCount(this.playerCount);(this.canAdaptiveResolution=1===a.count)&&this.resize()}}v.APIErrorCode={OK:0,InvalidParameters:1,InternalError:2,ResourceNotFound:3,AcpProjWKTNotSet:4,CoordinateConversionFailed:5,IDExists:6,InvalidRequestType:7, +InvalidRequestString:8,NoCommand:9,DataTypeNotSupport:10,InvalidOperation:11,ProjectNotOpened:12,CodeMax:65535};v.ActionMode={None:0,Follow:1,FollowBehindAndAbove:2,FollowBehind:3,FollowAbove:4,FollowBellow:5,FollowLeft:6,FollowRight:7};v.AnimatedImageButtonData=Qa;v.BPFuncParamType={Bool:0,UInt8:1,Int32:2,Float:3,Double:4,String:5,Color:6,Vector2D:7,Vector:8,Rotator:9,IntArray:10,StringArray:11,VectorArray:12,Coordinate:13,CoordinateArray:14,FloatArray:15};v.BPFunctionData=db;v.BeamData=Ra;v.CameraTourData= +fb;v.CameraTourKeyFrame=eb;v.CloudStatus=V;v.Color={LightPink:"RGB(255,182,193)",Pink:"RGB(255,192,203)",Crimson:"RGB(220,20,60)",LavenderBlush:"RGB(255,240,245)",PaleVioletRed:"RGB(219,112,147)",HotPink:"RGB(255,105,180)",DeepPink:"RGB(255,20,147)",MediumVioletRed:"RGB(199,21,133)",Orchid:"RGB(218,112,214)",Thistle:"RGB(216,191,216)",plum:"RGB(221,160,221)",Violet:"RGB(238,130,238)",Magenta:"RGB(255,0,255)",Fuchsia:"RGB(255,0,255)",DarkMagenta:"RGB(139,0,139)",Purple:"RGB(128,0,128)",MediumOrchid:"RGB(186,85,211)", +DarkVoilet:"RGB(148,0,211)",DarkOrchid:"RGB(153,50,204)",Indigo:"RGB(75,0,130)",BlueViolet:"RGB(138,43,226)",MediumPurple:"RGB(147,112,219)",MediumSlateBlue:"RGB(123,104,238)",SlateBlue:"RGB(106,90,205)",DarkSlateBlue:"RGB(72,61,139)",Lavender:"RGB(230,230,250)",GhostWhite:"RGB(248,248,255)",Blue:"RGB(0,0,255)",MediumBlue:"RGB(0,0,205)",MidnightBlue:"RGB(25,25,112)",DarkBlue:"RGB(0,0,139)",Navy:"RGB(0,0,128)",RoyalBlue:"RGB(65,105,225)",CornflowerBlue:"RGB(100,149,237)",LightSteelBlue:"RGB(176,196,222)", +LightSlateGray:"RGB(119,136,153)",SlateGray:"RGB(112,128,144)",DoderBlue:"RGB(30,144,255)",AliceBlue:"RGB(240,248,255)",SteelBlue:"RGB(70,130,180)",LightSkyBlue:"RGB(135,206,250)",SkyBlue:"RGB(135,206,235)",DeepSkyBlue:"RGB(0,191,255)",LightBLue:"RGB(173,216,230)",PowDerBlue:"RGB(176,224,230)",CadetBlue:"RGB(95,158,160)",Azure:"RGB(240,255,255)",LightCyan:"RGB(225,255,255)",PaleTurquoise:"RGB(175,238,238)",Cyan:"RGB(0,255,255)",Aqua:"RGB(212,242,231)",DarkTurquoise:"RGB(0,206,209)",DarkSlateGray:"RGB(47,79,79)", +DarkCyan:"RGB(0,139,139)",Teal:"RGB(0,128,128)",MediumTurquoise:"RGB(72,209,204)",LightSeaGreen:"RGB(32,178,170)",Turquoise:"RGB(64,224,208)",Auqamarin:"RGB(127,255,170)",MediumAquamarine:"RGB(0,250,154)",MediumSpringGreen:"RGB(0,255,127)",MintCream:"RGB(245,255,250)",SpringGreen:"RGB(60,179,113)",SeaGreen:"RGB(46,139,87)",Honeydew:"RGB(240,255,240)",LightGreen:"RGB(144,238,144)",PaleGreen:"RGB(152,251,152)",DarkSeaGreen:"RGB(143,188,143)",LimeGreen:"RGB(50,205,50)",Lime:"RGB(0,255,0)",ForestGreen:"RGB(34,139,34)", +Green:"RGB(0,128,0)",DarkGreen:"RGB(0,100,0)",Chartreuse:"RGB(127,255,0)",LawnGreen:"RGB(124,252,0)",GreenYellow:"RGB(173,255,47)",OliveDrab:"RGB(85,107,47)",Beige:"RGB(245,245,220)",LightGoldenrodYellow:"RGB(250,250,210)",Ivory:"RGB(255,255,240)",LightYellow:"RGB(255,255,224)",Yellow:"RGB(255,255,0)",Olive:"RGB(128,128,0)",DarkKhaki:"RGB(189,183,107)",LemonChiffon:"RGB(255,250,205)",PaleGodenrod:"RGB(238,232,170)",Khaki:"RGB(240,230,140)",Gold:"RGB(255,215,0)",Cornislk:"RGB(255,248,220)",GoldEnrod:"RGB(218,165,32)", +FloralWhite:"RGB(255,250,240)",OldLace:"RGB(253,245,230)",Wheat:"RGB(245,222,179)",Moccasin:"RGB(255,228,181)",Orange:"RGB(255,165,0)",PapayaWhip:"RGB(255,239,213)",BlanchedAlmond:"RGB(255,235,205)",NavajoWhite:"RGB(255,222,173)",AntiqueWhite:"RGB(250,235,215)",Tan:"RGB(210,180,140)",BrulyWood:"RGB(222,184,135)",Bisque:"RGB(255,228,196)",DarkOrange:"RGB(255,140,0)",Linen:"RGB(250,240,230)",Peru:"RGB(205,133,63)",PeachPuff:"RGB(255,218,185)",SandyBrown:"RGB(244,164,96)",Chocolate:"RGB(210,105,30)", +SaddleBrown:"RGB(139,69,19)",SeaShell:"RGB(255,245,238)",Sienna:"RGB(160,82,45)",LightSalmon:"RGB(255,160,122)",Coral:"RGB(255,127,80)",OrangeRed:"RGB(255,69,0)",DarkSalmon:"RGB(233,150,122)",Tomato:"RGB(255,99,71)",MistyRose:"RGB(255,228,225)",Salmon:"RGB(250,128,114)",Snow:"RGB(255,250,250)",LightCoral:"RGB(240,128,128)",RosyBrown:"RGB(188,143,143)",IndianRed:"RGB(205,92,92)",Red:"RGB(255,0,0)",Brown:"RGB(165,42,42)",FireBrick:"RGB(178,34,34)",DarkRed:"RGB(139,0,0)",Maroon:"RGB(128,0,0)",White:"RGB(255,255,255)", +WhiteSmoke:"RGB(245,245,245)",Gainsboro:"RGB(220,220,220)",LightGrey:"RGB(211,211,211)",Silver:"RGB(192,192,192)",DarkGray:"RGB(169,169,169)",Gray:"RGB(128,128,128)",DimGray:"RGB(105,105,105)",Black:"RGB(0,0,0)"};v.CommandType=p;v.CustomObjectData=$a;v.CustomObjectData2=ab;v.CustomTagData=Na;v.DecalData=Ya;v.DigitalTwinAPI=ra;v.DigitalTwinPlayer=ic;v.DynamicWaterData=cb;v.HeatMapPointData=Ka;v.HighlightAreaData=Oa;v.ImageButtonData=Pa;v.LayerVisibleData=Ja;v.MapMode={Campass:0,SmallMap:1,BigMap:2}; +v.MeasurementMode={Coordinate:1,Linear:2,Horizontal:3,Vertical:4,MultiPoint:5,TerrainArea:6};v.MousePickMask=qa;v.ODLineData=Va;v.PanelType={ViewshedAnalysis:0,SkylineAnalysis:1,ViewDomeAnalysis:2,VisiblityAnalysis:3,FloodFillAnalysis:4,SolarAnalysis:5,CutFillAnalysis:6,TerrainSlopeAnalysi:7,ContourLineAnalysis:8};v.PanoramaData=Xa;v.Polygon3DData=Ta;v.Polygon3DStyle={Wave:0,LoopLine:1,Gradual:2,DynamicGradual:3,WaveTransparent:4,WideWave:5,RotateArrow:6,RotateLine:7,RotateGradual:8,SingleColor:9, +SingleColorWithLight:10};v.PolygonData=Wa;v.PolygonStyle={SingleColor:0,CirclePoint:1,Volumn:2,Gradual:3,DynamicGradual:4,WaveTransparent:5,WideWave:6,RotateArrow:7,RotateLine:8,RotateGradual:9,OnTerrain:10};v.PolylineData=Ua;v.PolylineStyle={Arrow:0,Arrow1:1,Flow:2,Beam:3,Normal:4,OnTerrain:5,DottedNormal:6,DottedCircle:7};v.RadiationPointData=Sa;v.RendererType={SimpleRenderer:0,UniqueValueRenderer:1,ClassBreaksRenderer:2};v.TagData=La;v.TileLayerActorData=fa;v.TileLayerData=Za;v.VERSION="5.4";v.VehicleViewMode= +{FirstPerson:0,ThirdPerson:1};v.VideoProjectionData=bb;v.Viewport=ba;v.WaterFlowFieldStyle={HeatMap:0,Water:1};v.WebUIData=Ma;v.__onCefResponse=function(a,b){if(ua)ua.onConnectionMessage(a,b)};Object.defineProperty(v,"__esModule",{value:!0});return v}({}); +(()=>{if("undefined"!=typeof module&&module.exports)module.exports=acapi;else if("function"==typeof define&&define.amd)define(function(){return acapi});else{window.AcApiVersion=acapi.VERSION;acapi.AirCityAPI=acapi.DigitalTwinAPI;acapi.AirCityPlayer=acapi.DigitalTwinPlayer;for(let v in acapi)"VERSION"!=v&&(window[v]=acapi[v]);acapi.DigitalTwinAPI.__onApiConstructed=v=>window.__g=v}})(); diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..74859eb Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..488e080 --- /dev/null +++ b/public/index.html @@ -0,0 +1,18 @@ + + + + + + + + + + + + +
+ + + diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..07d2c4f --- /dev/null +++ b/src/App.vue @@ -0,0 +1,71 @@ + + + diff --git a/src/assets/ac.min.js b/src/assets/ac.min.js new file mode 100644 index 0000000..9661997 --- /dev/null +++ b/src/assets/ac.min.js @@ -0,0 +1,513 @@ +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(v){var D=0;return function(){return D>>0,$jscomp.propertyToPolyfillSymbol[O]=$jscomp.IS_SYMBOL_NATIVE? +$jscomp.global.Symbol(O):$jscomp.POLYFILL_PREFIX+I+"$"+O),$jscomp.defineProperty(E,$jscomp.propertyToPolyfillSymbol[O],{configurable:!0,writable:!0,value:D})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(v){v={next:v};v[Symbol.iterator]=function(){return this};return v};$jscomp.underscoreProtoCanBeSet=function(){var v={a:!0},D={};try{return D.__proto__=v,D.a}catch(I){}return!1}; +$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(v,D){v.__proto__=D;if(v.__proto__!==D)throw new TypeError(v+" is not extensible");return v}:null;$jscomp.makeIterator=function(v){var D="undefined"!=typeof Symbol&&Symbol.iterator&&v[Symbol.iterator];return D?D.call(v):$jscomp.arrayIterator(v)};$jscomp.generator={}; +$jscomp.generator.ensureIteratorResultIsObject_=function(v){if(!(v instanceof Object))throw new TypeError("Iterator result "+v+" is not an object");};$jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null}; +$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1};$jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(v){this.yieldResult=v}; +$jscomp.generator.Context.prototype.throw_=function(v){this.abruptCompletion_={exception:v,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype.return=function(v){this.abruptCompletion_={return:v};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(v){this.abruptCompletion_={jumpTo:v};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(v,D){this.nextAddress=D;return{value:v}}; +$jscomp.generator.Context.prototype.yieldAll=function(v,D){v=$jscomp.makeIterator(v);var I=v.next();$jscomp.generator.ensureIteratorResultIsObject_(I);if(I.done)this.yieldResult=I.value,this.nextAddress=D;else return this.yieldAllIterator_=v,this.yield(I.value,D)};$jscomp.generator.Context.prototype.jumpTo=function(v){this.nextAddress=v};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0}; +$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(v,D){this.catchAddress_=v;void 0!=D&&(this.finallyAddress_=D)};$jscomp.generator.Context.prototype.setFinallyBlock=function(v){this.catchAddress_=0;this.finallyAddress_=v||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(v,D){this.nextAddress=v;this.catchAddress_=D||0}; +$jscomp.generator.Context.prototype.enterCatchBlock=function(v){this.catchAddress_=v||0;v=this.abruptCompletion_.exception;this.abruptCompletion_=null;return v};$jscomp.generator.Context.prototype.enterFinallyBlock=function(v,D,I){I?this.finallyContexts_[I]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=v||0;this.finallyAddress_=D||0}; +$jscomp.generator.Context.prototype.leaveFinallyBlock=function(v,D){D=this.finallyContexts_.splice(D||0)[0];if(D=this.abruptCompletion_=this.abruptCompletion_||D){if(D.isException)return this.jumpToErrorHandler_();void 0!=D.jumpTo&&this.finallyAddress_I&&(I=Math.max(I+O,0));Id?g:d},e)}return b(a,1)}function I(a){let b=a.length,c=Array(b),e;for(let d=0;de?e-48:(e&223)-65+10,c[d]=e;return c.reduce((d,h)=>16*d+h,0)}function E(a){if(void 0!=a){var b=[];if(/^(rgb|RGB)/.test(a)){a=a.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",");for(let c of a)b.push(Number((Number(c)/255).toFixed(1)))}else if(/^#/.test(a)){if(/^#[0-9A-F]{3}$/i.test(a)){let c= +"#";a.replace(/[0-9A-F]/ig,function(e){c+=e+e});a=c}/^#[0-9A-F]{6}$/i.test(a)&&a.replace(/[0-9A-F]{2}/ig,function(c){c=I(c);b.push(Number((c/255).toFixed(1)))})}else a instanceof Array&&(b=a);3==b.length&&b.push(1);return b}}function O(a){if(void 0!=a){var b,c=D(a);2==c?b=[[a]]:3==c?b=[a]:4==c&&(b=a);if(b)for(let e of b)for(let d of e)for(let h of d)2==h.length&&h.push(0);return b}}function T(a){if(void 0!=a)return 1==D(a)?[a]:a}function F(a){return a instanceof Array?a:[a]}function K(a){let b=[]; +if(a instanceof Array)for(let c in a)b[c]=a[c].toString();else b=[a.toString()];return b}function S(a){switch(typeof a){case "undefined":return!0;case "string":if(0===a.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g,"").length)return!0;break;case "boolean":if(!a)return!0;break;case "number":if(isNaN(a))return!0;break;case "object":if(null===a||0===a.length)return!0;for(var b in a)return!1;return!0}return!1}function pa(a,b){for(a=a.toString();a.length=q?(e=g,a.apply(h,d),c&&(clearTimeout(c),c=null)):c||(c=setTimeout(()=>{e=+new Date;c=null;a.apply(h,d)},q))}}function Ha(a){switch(a){case da.StartingProcess:return"starting process...";case da.CheckingBusy:return"checking...";case da.ProcessStartFailed:return"process start failed!";case da.ProcessStarted:return"process started";case da.LoadingProject:return"loading project...";case da.ProjectLoaded:return"project loaded"}}function wa(a){"string"===typeof a&&(a=document.getElementById(a)); +return a}function Ia(a){return R.isIOSDevice&&R.isInWeixinBrowser?!1:a==sa.abnormal||a==sa.instance_disconnected}function aa(a,b){return void 0!==a&&null!==a?a:b}function xa(a){return a.keyCode===ea.Shift&&"ShiftRight"===a.code?ea.RightShift:a.keyCode===ea.Control&&"ControlRight"===a.code?ea.RightControl:a.keyCode===ea.Alt&&"AltRight"===a.code?ea.RightAlt:a.keyCode}var p={None:0,Camera_PlayAnimation:1,Camera_StopAnimation:2,Misc_EnterReportMode:3,Misc_ExitReportMode:4,Misc_SetDateTime:5,Camera_GetCamera:6, +Camera_SetState:7,Camera_Set:8,Camera_LookAtBBox:9,Coord_World2Screen:10,Coord_Screen2World:11,InfoTree_SetVisibility:12,InfoTree_Show:13,InfoTree_Hide:14,InfoTree_EnableXRay:15,InfoTree_DisableXRay:16,TileLayer_Add:17,HeatMap_Add:18,HeatMap_Update:19,HeatMap_AddPoints:20,HeatMap_RemovePoints:21,HeatMap_Delete:22,HeatMap_Show:23,HeatMap_Hide:24,HeatMap_Focus:25,HighlightArea_Add:26,HighlightArea_Delete:27,HighlightArea_Update:28,Polygon3D_Add:29,Polygon3D_Delete:30,Misc_AddImageButton:31,Misc_DeleteImageButton:32, +Misc_AddAnimatedImageButton:33,Settings_SetMainUIVisibility:34,Settings_SetMousePickMask:35,Tag_Add:36,Tag_Delete:37,Tag_Update:38,Tag_Clear:39,Tag_Focus:40,Beam_Add:41,Beam_Update:42,Beam_Delete:43,Beam_Clear:44,Beam_Focus:45,Beam_Show:350,Beam_Hide:351,Beam_ShowAll:352,Beam_HideAll:353,RadiationPoint_Add:46,RadiationPoint_Update:47,RadiationPoint_Delete:48,RadiationPoint_Clear:49,Polygon_Add:50,Polygon_Update:51,Polygon_Delete:52,Polygon_Clear:53,Polygon_Highlight:54,Polygon_StopHighlight:325,Polygon_Glow:55, +Polygon_Focus:56,Tag_FocusAll:57,Tag_Show:58,Tag_Hide:59,Tag_ShowAll:60,Tag_HideAll:61,RadiationPoint_Focus:62,RadiationPoint_FocusAll:63,RadiationPoint_Show:64,RadiationPoint_Hide:65,RadiationPoint_ShowAll:66,RadiationPoint_HideAll:67,Polygon_Show:68,Polygon_Hide:69,Polygon3D_Update:70,Polygon3D_Clear:71,Polygon3D_Focus:72,Polygon3D_Show:73,Polygon3D_Hide:74,Polygon3D_Highlight:75,Polygon3D_Glow:76,Polygon3D_StopGlow:77,HighlightArea_Clear:78,HighlightArea_Focus:79,HighlightArea_Show:80,HighlightArea_Hide:81, +Misc_GetVersion:82,TileLayer_Update:83,TileLayer_Delete:84,TileLayer_Focus:85,TileLayer_EnableXRay:86,TileLayer_DisableXRay:87,TileLayer_Show:88,TileLayer_Hide:89,Tag_Get:90,RadiationPoint_Get:91,Polygon_Get:92,Polygon3D_Get:93,HighlightArea_Get:94,TileLayer_Get:95,Beam_Get:96,HeatMap_Get:97,Settings_GetMapMode:98,Settings_SetMapMode:99,Settings_SetMapURL:100,Settings_SetWMTSLayerVisible:320,TileLayer_Actor_Show:101,TileLayer_Actor_Hide:102,TileLayer_Actor_Focus:103,TileLayer_Actor_Highlight:104, +TileLayer_Actor_StopHightlight:105,CustomObject_Add:106,CustomObject_Update:107,CustomObject_Delete:108,CustomObject_Get:109,CustomObject_Focus:110,CustomObject_Show:111,CustomObject_Hide:112,CustomObject_SetTintColor:326,HeatMap_Clear:113,CustomTag_Clear:39,CustomTag_Delete:37,CustomTag_Focus:40,CustomTag_FocusAll:57,CustomTag_Show:58,CustomTag_Hide:59,CustomTag_ShowAll:60,CustomTag_HideAll:61,CustomTag_Add:114,CustomTag_Update:115,CustomTag_Get:116,Polyline_Add:117,Polyline_Update:118,Polyline_Delete:119, +Polyline_Clear:120,Polyline_Focus:121,Polyline_Get:122,Polyline_Show:123,Polyline_Hide:124,Polyline_ShowAll:125,Polyline_HideAll:126,VideoProjection_Add:127,VideoProjection_Update:128,VideoProjection_Delete:129,VideoProjection_Show:130,VideoProjection_Hide:131,VideoProjection_Get:132,VideoProjection_Focus:133,Misc_PlayVideo:134,Misc_StopPlayVideo:135,Weather_SetParams:136,Weather_GetParams:137,Weather_SetDate:138,Weather_GetDate:139,ODLine_Add:140,ODLine_Update:141,ODLine_Delete:142,ODLine_Clear:143, +ODLine_Focus:144,ODLine_Get:145,ODLine_Show:146,ODLine_Hide:147,ODLine_ShowAll:148,ODLine_HideAll:149,Misc_SetWindowResolution:150,Misc_CallBPFunction:151,Settings_SetHighlightColor:152,InfoTree_ShowByGroupId:153,InfoTree_HideByGroupId:154,InfoTree_HighlightByGroupId:155,InfoTree_DeleteByGroupId:156,EditHelper_Start:157,EditHelper_Quit:158,EditHelper_Finish:159,EditHelper_SetParam:160,Settings_SetFovX:161,TileLayer_Actor_ShowAll:162,TileLayer_Actor_HideAll:163,CameraTour_Add:164,CameraTour_Update:165, +CameraTour_Play:166,CameraTour_Stop:167,CameraTour_Delete:168,Tag_PopupWindow_Show:169,Tag_PopupWindow_Hide:170,Tag_PopupWindow_ShowAll:171,Tag_PopupWindow_HideAll:172,Settings_SetOceanColor:173,Misc_ShowAllFoliages:174,Misc_HideAllFoliages:175,Tools_StartPolygonClip:176,Tools_StopClip:177,TileLayer_SetAllowClip:178,Panorama_Add:179,Panorama_Update:180,Panorama_Delete:181,Panorama_Clear:182,Panorama_Focus:183,Panorama_Get:184,Decal_Add:185,Decal_Update:186,Decal_Delete:187,Decal_Clear:188,Decal_Focus:189, +Decal_FocusAll:190,Decal_Get:191,Misc_PlayMovie:192,Misc_StopMovie:193,Tools_SetMeasurement:194,Tools_StartMeasurement:195,Tools_StopMeasurement:196,Viewshed_Add:197,Viewshed_Update:198,Viewshed_Focus:199,Viewshed_Delete:200,Viewshed_Clear:201,Viewshed_Get:202,TileLayer_SetStyle:203,Tools_LineIntersect:204,Coord_PCS2GCS:205,Coord_GCS2PCS:206,DynamicWater_Add:207,DynamicWater_Update:208,DynamicWater_Focus:209,DynamicWater_Delete:210,DynamicWater_Clear:211,DynamicWater_Get:212,DynamicWater_Show:213, +DynamicWater_Hide:214,Quit:215,TileLayer_Actor_Unhighlight:216,InfoTree_Get:217,Reset:218,SaveProject:225,CustomObject_Clear:219,CustomObject_Highlight:220,CustomObject_Unhighlight:221,CustomObject_StopHighlight:222,CustomObject_CallFunction:223,CustomObject_AddByTileLayer:224,Tools_StartPlaneClip:226,Tools_StopPlaneClip:228,Tools_StartVolumeClip:229,Tools_UpdateVolumeClip:230,Tools_StopVolumeClip:231,Tools_StartSkylineAnalysis:232,Tools_StopSkylineAnalysis:233,Tools_ExportSkyline:234,Tools_StartViewshedAnalysis:235, +Tools_StopViewshedAnalysis:236,Camera_Move:237,TileLayer_SetCollision:238,TileLayer_Modifier_Add:239,TileLayer_Modifier_Update:240,TileLayer_Modifier_Delete:241,TileLayer_Modifier_Clear:242,Misc_StartProcess:243,Settings_SetCampassVisible:244,Tools_StartGeometryEdit:245,Tools_StopGeometryEdit:246,Settings_SetEnableInteract:247,Camera_PauseAnimation:248,Camera_ResumeAnimation:249,Settings_SetInteractiveMode:250,CameraTour_Pause:251,CameraTour_Resume:252,Settings_SetTerrainAlpha:253,CustomMesh_Add:254, +CustomMesh_Delete:255,CustomMesh_Clear:256,CustomMesh_Update:257,CustomMesh_Get:258,CustomMesh_Focus:259,CustomMesh_Show:260,CustomMesh_Hide:261,CustomMesh_ShowAll:262,CustomMesh_HideAll:263,Settings_EnableCameraMovingEvent:264,Marker_Add:265,Marker_Update:266,Marker_Get:267,Marker_Delete:268,Marker_Clear:269,Marker_Focus:270,Marker_FocusAll:271,Marker_Show:272,Marker_Hide:273,Marker_ShowAll:274,Marker_HideAll:275,Marker_ShowPopupWindow:276,Marker_HidePopupWindow:277,Marker_ShowAllPopupWindow:278, +Marker_HideAllPopupWindow:279,TileLayer_SetViewportVisible:280,TileLayer_GetObjectIDs:281,Polygon3D_StopHighlight:282,Tools_StartFloodFill:283,Tools_StopFloodFill:284,FloodFill_Add:285,FloodFill_Delete:286,FloodFill_Clear:287,FloodFill_Update:288,FloodFill_Get:289,FloodFill_Focus:290,FloodFill_Show:291,FloodFill_Hide:292,FloodFill_ShowAll:293,FloodFill_HideAll:294,Cesium3DTile_Add:295,Cesium3DTile_Delete:296,Cesium3DTile_Clear:297,Cesium3DTile_Update:298,Cesium3DTile_Get:299,Cesium3DTile_Focus:300, +Cesium3DTile_Show:301,Cesium3DTile_Hide:302,Cesium3DTile_ShowAll:303,Cesium3DTile_HideAll:304,TileLayer_GetActorInfoFromDB:305,ShapeFileLayer_Add:306,ShapeFileLayer_Delete:307,ShapeFileLayer_Clear:308,ShapeFileLayer_Update:309,ShapeFileLayer_Get:310,ShapeFileLayer_Focus:311,ShapeFileLayer_Show:312,ShapeFileLayer_Hide:313,ShapeFileLayer_ShowAll:314,ShapeFileLayer_HideAll:315,ShapeFileLayer_OpenShapeFileLayer:316,Weather_SimulateTime:317,TileLayer_Actor_GetInfo:318,Camera_GetAnimationList:319,TileLayer_CutPolygon_Add:321, +TileLayer_CutPolygon_Update:322,TileLayer_CutPolygon_Delete:323,TileLayer_CutPolygon_Clear:324,Marker3D_Add:327,Marker3D_Delete:328,Marker3D_Clear:329,Marker3D_Update:330,Marker3D_Get:331,Marker3D_Focus:332,Marker3D_Show:333,Marker3D_Hide:334,Marker3D_ShowAll:335,Marker3D_HideAll:336,Camera_GetAnimationImage:337,Tools_ReplaceTexture:338,Tools_RestoreTexture:339,Light_Add:340,Light_Delete:341,Light_Update:343,Light_Get:344,Light_Clear:342,Light_Focus:345,Light_Show:346,Light_Hide:347,Light_ShowAll:348, +Light_HideAll:349,WaterMesh_Add:354,WaterMesh_Update:355,WaterMesh_Delete:356,WaterMesh_Clear:357,WaterMesh_Get:358,WaterMesh_Focus:359,WaterMesh_Show:360,WaterMesh_Hide:361,WaterMesh_ShowAll:362,WaterMesh_HideAll:363,CustomObject_StartMove:364,CustomObject_StopMove:365,CustomObject_OverrideMaterial:366,CustomObject_RestoreMaterial:367,Settings_SetReport:368,Settings_GetReport:369,Settings_SetControl:370,Settings_GetControl:371,Settings_SetPostProcess:372,Settings_GetPostProcess:373,Settings_SetCamera:374, +Settings_GetCamera:375,CustomObject_SetViewportVisible:376,WaterFlowField_Add:377,WaterFlowField_Update:378,WaterFlowField_Delete:379,WaterFlowField_Clear:380,WaterFlowField_Get:381,WaterFlowField_Focus:382,WaterFlowField_Show:383,WaterFlowField_Hide:384,TileLayer_SetViewHeightRange:385,Tools_StartVisiblityAnalysis:386,Tools_StopVisiblityAnalysis:387,Tools_StartViewDomeAnalysis:388,Tools_StopViewDomeAnalysis:389,Tools_StartCutFillAnalysis:390,Tools_StopCutFillAnalysis:391,Tools_StartSunshineAnalysis:392, +Tools_StopSunshineAnalysis:393,Tools_StartTerrainSlopeAnalysis:394,Tools_StopTerrainSlopeAnalysis:395,Tools_StartContourLineAnalysis:396,Tools_StopContourLineAnalysis:397,TileLayer_GetAllFlattenData:398,Marker_SetupPOIAttachment:399,HeatMap3D_Add:400,HeatMap3D_Update:401,HeatMap3D_Focus:402,HeatMap3D_Delete:403,HeatMap3D_Show:404,HeatMap3D_Hide:405,HeatMap3D_Get:406,HeatMap3D_Clear:407,ShapeFileLayer_HighlightFeature:408,ShapeFileLayer_UnHighlightFeature:409,ShapeFileLayer_FocusFeature:410,ShapeFileLayer_GetFeatureInfo:411, +Misc_EnterMultiViewport:412,Misc_ExitMultiViewport:413,Misc_SetActivateMultiViewport:414,Misc_GetActivateMultiViewport:415,Panorama_Enter:416,Panorama_Exit:417,Panorama_Switch:418,VTPKService_Get:419,VTPKService_Set:420,SimulateTest__:421,Settings_CursorAutoSync:422,InfoTree_Focus:423,Marker_ShowByGroupId:424,Marker_HideByGroupId:425,Marker_DeleteByGroupId:426,ImageryLayer_Init:427,ImageryLayer_Add:428,Camera_LockBBox:429,Camera_UnLockBBox:430,Settings_SetWMTSLayerOpacity:431,Camera_EnterEarthCapture:432, +Camera_ExitEarthCapture:433,Tools_AnalysisPopupAttributes:434,Tools_AnalysisCloseAttributes:435,ImageryLayer_Show:436,ImageryLayer_Hide:437,ImageryLayer_Delete:438,Settings_GetInteractiveMode:439,VideoProjection_Clear:440,Misc_UpdateMultiViewport:441,Misc_downloadPakFiles:442,Settings_SetCampassPosition:443,Polygon3D_ShowAll:444,Polygon3D_HideAll:445,GeoJSONLayer_Add:446,GeoJSONLayer_Show:447,GeoJSONLayer_Hide:448,GeoJSONLayer_Delete:449,Vehicle_Add:450,Vehicle_Update:451,Vehicle_AddWayPoints:452, +Vehicle_ClearWayPoints:453,Vehicle_Focus:454,Vehicle_Show:455,Vehicle_Hide:456,Vehicle_Get:457,Vehicle_Delete:458,Vehicle_Clear:459,Vehicle_MoveTo:460,Misc_ConvexHull2D:461,HeatMap_AddVoxels:462,TileLayer_GetCollision:463,TileLayer_SetPointSize:464,Misc_QueryActorOrMaterial:465,CustomObject_StartGlow:466,CustomObject_StopGlow:467,Coord_Transform:468,RegisterJsCommunication:469,UnRegisterJsCommunication:470,Vehicle_CallBatchFunction:471,Camera_FlyAround:472,Marker3D_ShowByGroupId:473,Marker3D_HideByGroupId:474, +Marker3D_DeleteByGroupId:475,Camera_EnterWorldAnimation:476,Camera_ExitWorldAnimation:477,TileLayer_SetDecalAttach:478,Command_End:1E4},ya=!1;(()=>{if(!ya){ya=!0;for(let a in p)p[p[a]]=a}})();const qa={MouseClick:1,MouseMove:2,MouseHover:4},ba={V1:1,V2:2,V3:4,V4:8,All:255};class Ja{constructor(a,b){this.id=a;this.visible=b}}class Ka{constructor(a,b,c,e){this.id=a.toString();this.coordinate=b;this.radius=c;this.heatValue=e}}class La{constructor(a,b,c,e,d,h,g,q,k,f,l,t,w,r){this.id=a.toString();this.coordinate= +b;this.imagePath=c;this.imageSize=e;this.url=d;this.text=h;this.range=g||[1,1E5];this.showLine=!!q;this.textColor=k||[0,0,0,1];this.textBackgroundColor=f||[1,1,1,.85];this.textBorderColor=l||[0,0,0,0];this.textRange=t||1E5;this.hoverImagePath=w;this.autoHidePopupWindow=r||!0}}class Ma{constructor(a,b,c){this.url=a;this.width=b;this.height=c}}class Na{constructor(a,b,c,e,d,h,g,q){this.id=a.toString();this.coordinate=b;this.contentURL=c.url;this.contentSize=[c.width,c.height];this.popupURL=e.url;this.popupSize= +[e.width,e.height];this.pivot=d;this.range=h;this.autoHidePopupWindow=g||!0;this.popupPos=q}}class Oa{constructor(a,b,c,e,d,h){this.id=a.toString();this.coordinates=O(b);this.color=E(c);this.heightRange=e;this.intensity=d;this.depthTest=h||!0}}class Pa{constructor(a,b,c,e,d,h,g,q){this.id=a.toString();this.x=b;this.y=c;this.width=e;this.height=d;this.normalImage=h;this.hoverImage=g;this.tooltip=q}}class Qa{constructor(a,b,c,e,d,h,g,q,k){this.id=a.toString();this.x=b;this.y=c;this.width=e;this.height= +d;this.imageSequecePath=h;this.imageSequeceLength=g;this.loop=!!q;this.interactable=!!k}}class Ra{constructor(a,b,c,e,d,h,g){this.id=a.toString();this.duration=b;this.thickness=c;this.interval=e;this.velocity=d;this.color=E(h);this.coordinates=g}}class Sa{constructor(a,b,c,e,d,h){this.id=a.toString();this.coordinate=b;this.radius=c;this.rippleNumber=e;this.color=E(d);this.brightness=h}}class Ta{constructor(a,b,c,e,d,h,g,q){this.id=a.toString();this.style=b;this.coordinates=O(c);this.color=E(e);this.height= +d;this.intensity=h;this.tillingX=g;this.tillingY=q}}class Ua{constructor(a,b,c,e,d,h,g,q,k,f){this.id=a.toString();this.color=E(b);this.coordinates=c;this.style=void 0==e?0:e;if(0>this.style||5this.style||10{this.isMainThreadBusy? +this._callNextForTimeout(5E3):this.callNext()},a)}}class Q{constructor(a,b,c){this.int=a;this.type=b;this.colorProps=c;this._useBatchUpdate=!1;this._tempUpdateData=[]}_checkCommand(a){a=this.type+a;let b=p[a];void 0==b&&this.int.logWithColor("red",`Invalid command: ${a}`);return b}_convertFilePath(a){return this.int.resourcesPath?a.replace("@path:",this.int.resourcesPath+"/"):a}_processProps(a){a=F(a);for(var b of a)for(let e in b)"string"==typeof b[e]&&b[e].startsWith("@path:")&&(b[e]=this._convertFilePath(b[e])); +for(let e of a)"string"!=typeof e.id&&(e.id=e.id.toString());if(this.colorProps){b=this.colorProps.split("|");for(var c of a)for(let e of b)c.hasOwnProperty(e)&&(c[e]=E(c[e]))}if(-1!=["Polygon","Polygon3D","HighlightArea","DynamicWater"].indexOf(this.type))for(let e of a)e.coordinates=O(e.coordinates);for(let e of a)e.hasOwnProperty("userData")&&(c=e.userData,this._isJsonString(c)&&(e.userData=c.replace(/"/g,"~!@~!@~!@")))}_isJsonString(a){try{return"string"===typeof a?(JSON.parse(a),!0):!1}catch(b){return!1}}_add(a, +b){this._processProps(a);return this.int.call({command:this._checkCommand("_Add"),data:F(a)},b)}_update(a,b){this._processProps(a);return this.int.call({command:this._checkCommand("_Update"),data:F(a)},b)}_delete(a,b){return this.int.call({command:this._checkCommand("_Delete"),ids:K(a)},b)}_clear(a){return this.int.call0(this._checkCommand("_Clear"),a)}_get(a,b){return this.int.call({command:this._checkCommand("_Get"),ids:K(a)},b)}_focus(a,b,c,e,d){"function"==typeof c&&(d=c,c=void 0);"function"== +typeof e&&(d=e,e=null);return this.int.call({command:this._checkCommand("_Focus"),ids:K(a),distance:b||0,flyTime:c,rotation:e},d)}_focusAll(a,b,c,e){"function"==typeof b&&(e=b,b=void 0);"function"==typeof c&&(e=c,c=null);return this.int.call({command:this._checkCommand("_FocusAll"),ids:[],distance:a||0,flyTime:b,rotation:c},e)}_show(a,b){return this.int.call({command:this._checkCommand("_Show"),ids:K(a)},b)}_showAll(a){return this.int.call0(this._checkCommand("_ShowAll"),a)}_hide(a,b){return this.int.call({command:this._checkCommand("_Hide"), +ids:K(a)},b)}_hideAll(a){return this.int.call0(this._checkCommand("_HideAll"),a)}_updateOneProp(a,b,c,e){if(this._useBatchUpdate){e=!1;for(var d of this._tempUpdateData)if(d.id==a.toString()){e=!0;d[b]=c;break}e||(e={},e.id=a.toString(),e[b]=c,this._tempUpdateData.push(e))}else return d={},d.id=a.toString(),d[b]=c,this.update(d,e)}updateBegin(){this._useBatchUpdate=!0;this._tempUpdateData=[]}updateEnd(a){a=this.update(this._tempUpdateData,a);this._tempUpdateData=null;this._useBatchUpdate=!1;return a}test(){alert("test")}} +class ib extends Q{constructor(a){super(a,"Beam","color")}add(a,b){return super._add(a,b)}update(a,b){return super._update(a,b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}showAll(a){return super._showAll(a)}hideAll(a){return super._hideAll(a)}get(a,b){return super._get(a,b)}setDuration(a,b,c){return super._updateOneProp(a,"duration",b,c)}setThickness(a,b,c){return super._updateOneProp(a, +"thickness",b,c)}setInterval(a,b,c){return super._updateOneProp(a,"interval",b,c)}setVelocity(a,b,c){return super._updateOneProp(a,"velocity",b,c)}setColor(a,b,c){return super._updateOneProp(a,"color",E(b),c)}setCoordinates(a,b,c){return super._updateOneProp(a,"coordinates",b,c)}}class jb extends Q{constructor(a){super(a,"CameraTour")}add(a,b){return super._add(a,b)}update(a,b){return super._update(a,b)}delete(a,b){return super._delete(a,b)}play(a,b){return this.int.call({command:p.CameraTour_Play, +ids:K(a)},b)}pause(a){return this.int.call0(p.CameraTour_Pause,a)}resume(a){return this.int.call0(p.CameraTour_Resume,a)}stop(a){return this.int.call({command:p.CameraTour_Stop},a)}setUserData(a,b,c){return super._updateOneProp(a,"userData",b,c)}setDuration(a,b,c){return super._updateOneProp(a,"duration",b,c)}setKeyFrames(a,b,c){return super._updateOneProp(a,"keyFrames",b,c)}setName(a,b,c){return super._updateOneProp(a,"name",b,c)}}class kb extends Q{constructor(a){super(a,"Cesium3DTile")}add(a,b){return super._add(a, +b)}update(a,b){return super._update(a,b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}showAll(a){return super._showAll(a)}hide(a,b){return super._hide(a,b)}hideAll(a){return super._hideAll(a)}get(a,b){return super._get(a,b)}setTileURL(a,b,c){return super._updateOneProp(a,"tileURL",b,c)}}class lb extends Q{constructor(a){super(a,"CustomMesh","color")}add(a,b){return super._add(a,b)}update(a,b){return super._update(a, +b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}get(a,b){return super._get(a,b)}setCoordinates(a,b,c){return super._updateOneProp(a,"coordinates",b,c)}setIndices(a,b,c){return super._updateOneProp(a,"indices",b,c)}setColor(a,b,c){return super._updateOneProp(a,"color",b,c)}}class mb extends Q{constructor(a){super(a,"CustomObject")}add(a,b){return super._add(a, +b)}update(a,b){return super._update(a,b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d,h){"function"==typeof c&&(h=c,c=void 0);"function"==typeof e&&(h=e,e=null);"function"==typeof d&&(h=d,d=0);1a[3]||a[1]>a[4]||a[2]>a[5])return!1}else return!1;return!0}add(a,b,c,e,d,h,g,q,k,f,l){return this._checkBBox(b)? +"undefined"==typeof d||"function"==typeof d?this.int.call({command:p.HeatMap_Add,id:a.toString(),bbox:b,range:c,data:F(e),style:-1},l):0==d?this.int.call({command:p.HeatMap_Add,id:a.toString(),bbox:b,range:c,data:F(e),style:0,textureSize:h,opacityMode:g,opacityRange:q,blur:k,colors:f},l):this.int.call({command:p.HeatMap_Add,id:a.toString(),bbox:b,range:c,data:F(e),style:-1},l):(this.int.logWithColor("red","Invalid bbox value"),!1)}update(a,b,c,e,d){a={command:p.HeatMap_Update,id:a.toString()};if(b){if(!this._checkBBox(b))return this.int.logWithColor("red", +"Invalid bbox value"),!1;a.bbox=b}c&&(a.range=c);e&&(a.data=F(e));return this.int.call(a,d)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}get(a,b){return super._get(a,b)}addPoints(a,b,c){return this.int.call({command:p.HeatMap_AddPoints,id:a,data:F(b)},c)}removePoints(a,b,c){return this.int.call({command:p.HeatMap_RemovePoints,id:a,pointIds:F(b)},c)}setRange(a, +b,c){return this.int.call({command:p.HeatMap_Update,id:a,range:b},c)}setBBox(a,b,c){return this._checkBBox(b)?this.int.call({command:p.HeatMap_Update,id:a,bbox:b},c):(this.int.logWithColor("red","Invalid bbox value"),!1)}}class tb extends Q{constructor(a){super(a,"HeatMap3D")}_checkBBox(a){if(a instanceof Array){if(6!=a.length||a[0]>a[3]||a[1]>a[4]||a[2]>a[5])return!1}else return!1;return!0}add(a,b){return this.int.call({command:p.HeatMap3D_Add,data:F(a)},b)}addVoxels(a,b){return this.int.call({command:p.HeatMap_AddVoxels, +data:F(a)},b)}update(a,b){return this.int.call({command:p.HeatMap3D_Update,data:F(a)},b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}get(a,b){return super._get(a,b)}setDisplayMode(a,b,c){return this.int.call({command:p.HeatMap3D_Update,id:a,displayMode:b},c)}}class ub extends Q{constructor(a){super(a,"HighlightArea","color")}add(a,b){return super._add(a,b)}update(a, +b){return super._update(a,b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}get(a,b){return super._get(a,b)}setColor(a,b,c){return super._updateOneProp(a,"color",E(b),c)}setCoordinates(a,b,c){return super._updateOneProp(a,"coordinates",b,c)}setHeightRange(a,b,c){return super._updateOneProp(a,"heightRange",b,c)}setIntensity(a,b,c){return super._updateOneProp(a, +"intensity",b,c)}setDepthTest(a,b,c){return super._updateOneProp(a,"depthTest",b,c)}}class vb extends Q{constructor(a){super(a,"ImageryLayer")}init(a,b){return this.int.call({command:p.ImageryLayer_Init,xmlPath:a.xmlUrl,layerName:a.layerName,tileMatrixName:a.tileMatrixName,ogcEPSG:a.ogcEPSG,cachePath:a.cachePath,mapMode:a.mapMode,renderMode:a.renderMode},b)}add(a,b){const c=this;return $jscomp.asyncExecutePromiseGeneratorFunction(function*(){return a instanceof Array?new Promise(e=>$jscomp.asyncExecutePromiseGeneratorFunction(function*(){let d; +for(let h of a)if(d=yield c.addOne(h,b),0!=d.result){e(d);break}e(d)})):c.addOne(a,b)})}addOne(a,b){return this.int.call({command:p.ImageryLayer_Add,id:a.id,url:a.url,xmlPath:a.xmlPath,layerName:a.layerName,tileMatrixName:a.tileMatrixName,ogcEPSG:a.ogcEPSG},b)}show(a,b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}delete(a,b){return super._delete(a,b)}}class wb extends Q{constructor(a){super(a,"Light","color")}add(a,b){return super._add(a,b)}update(a,b){return super._update(a,b)}delete(a, +b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}showAll(a){return super._showAll(a)}hide(a,b){return super._hide(a,b)}hideAll(a){return super._hideAll(a)}get(a,b){return super._get(a,b)}}class xb extends Q{constructor(a){super(a,"Marker","fontColor|fontOutlineColor|textBackgroundColor|lineColor")}add(a,b){this._fixMarkerData(a);return super._add(a,b)}_fixMarkerProperty(a){a.textColor&&(a.fontColor=a.textColor); +a.url&&(a.popupURL=a.url);a.dispalyMode&&(a.displayMode=a.dispalyMode);S(a.displayMode)&&(a.displayMode=4);a.popupURL&&!a.popupSize&&(a.popupSize=[600,400]);0==a.showLine&&(a.lineSize=[0,0]);1!=a.showLine||null!=a.lineSize&&void 0!=a.lineSize||(a.lineSize=[2,100]);4==a.displayMode&&0{za="zh"===a?"zh":"en";ta={};a="zh"==za;for(let b in Aa){let c=Aa[b];ta[b]=a?c[0]:c[1]}for(let b of H.onLanguageChangedCallbacks)"function"==typeof b&&b()};H.getString=a=>ta[a];class Mb{constructor(a){this.int=a;this._useOldDataFormat=!1}useOldDataFormat(a){this._useOldDataFormat=a||!0}get(a){return this.int.call0(p.Camera_GetCamera,a)}_setByArray(a,b,c){return this.set(a[0],a[1],a[2],a[3],a[4],b,c)}_setByObject(a,b,c){return this.set(a.x,a.y,a.z,a.pitch,a.yaw,b,c)}set(a,b,c,e,d, +h,g){if(a instanceof Array&&5<=a.length)return this._setByArray(a,b,c);if("object"==typeof a&&a.hasOwnProperty("x"))return this._setByObject(a,b,c);"function"==typeof h&&(g=h,h=void 0);if(this._useOldDataFormat){let q=e;e=d;d=q}return this.int.call({command:p.Camera_Set,coordinate:[a,b,c],pitch:e||0,yaw:d||0,flyTime:h},g)}lookAt(a,b,c,e,d,h,g,q){"function"==typeof g&&(q=g,g=void 0);if(this._useOldDataFormat){let k=d;d=h;h=k}return this.int.call({command:p.Camera_Set,coordinate:[a,b,c],distance:e, +pitch:d||0,yaw:h||0,flyTime:g},q)}lookAtBBox(a,b,c,e,d){"function"==typeof e&&(d=e,e=void 0);if(this._useOldDataFormat){let h=b;b=c;c=h}return this.int.call({command:p.Camera_LookAtBBox,bbox:a,pitch:b||0,yaw:c||0,flyTime:e},d)}playAnimation(a,b){return this.int.call({command:p.Camera_PlayAnimation,id:a},b)}stopAnimation(a){return this.int.call0(p.Camera_StopAnimation,a)}pauseAnimation(a){return this.int.call0(p.Camera_PauseAnimation,a)}resumeAnimation(a){return this.int.call0(p.Camera_ResumeAnimation, +a)}getAnimationList(a){return this.int.call0(p.Camera_GetAnimationList,a)}getAnimationImage(a,b){return this.int.call({command:p.Camera_GetAnimationImage,name:a},b)}moveForward(a){return this.int.call({command:p.Camera_Move,moveForward:!0},a)}moveBackward(a){return this.int.call({command:p.Camera_Move,moveBackward:!0},a)}moveLeft(a){return this.int.call({command:p.Camera_Move,moveLeft:!0},a)}moveRight(a){return this.int.call({command:p.Camera_Move,moveRight:!0},a)}moveUp(a){return this.int.call({command:p.Camera_Move, +moveUp:!0},a)}moveDown(a){return this.int.call({command:p.Camera_Move,moveDown:!0},a)}turnLeft(a){return this.int.call({command:p.Camera_Move,turnLeft:!0},a)}turnRight(a){return this.int.call({command:p.Camera_Move,turnRight:!0},a)}turnUp(a){return this.int.call({command:p.Camera_Move,turnUp:!0},a)}turnDown(a){return this.int.call({command:p.Camera_Move,turnDown:!0},a)}stop(a){return this.int.call({command:p.Camera_Move,stop:!0},a)}getEulerAngle(a,b){const c=360/(2*Math.PI);let e=b[0]-a[0],d=b[1]- +a[1];return[Math.atan2(b[2]-a[2],Math.sqrt(e*e+d*d))*c,Math.atan2(e,d)*c-90,0]}lockByBBox(a,b){return this.int.call({command:p.Camera_LockBBox,bbox:a},b)}unlock(a){return this.int.call({command:p.Camera_UnLockBBox},a)}flyAround(a,b,c,e,d){return this.int.call({command:p.Camera_FlyAround,coordinate:a,rotation:b||[0,90,0],distance:c||1E3,time:e||10},d)}enterWorld(a){return this.int.call({command:p.Camera_ExitWorldAnimation},a)}exitWorld(a){return this.int.call({command:p.Camera_EnterWorldAnimation}, +a)}}class Nb{constructor(a){this.int=a}screen2World(a,b,c){return this.int.call({command:p.Coord_Screen2World,screenPosition:[a,b]},c)}world2Screen(a,b,c,e){return this.int.call({command:p.Coord_World2Screen,worldlocation:[a,b,c]},e)}gcs2pcs(a,b,c){"function"==typeof b&&(c=b);S(b)&&(b=1);if(1==b)return this.int.call({command:p.Coord_GCS2PCS,coordinates:T(a)},c);2==b?this.transform(T(a),2,0,c):3==b?this.transform(T(a),3,0,c):console.error("\u672a\u77e5\u5750\u6807\u7cfb\u7c7b\u578b")}pcs2gcs(a,b,c){"function"== +typeof b&&(c=b);S(b)&&(b=1);if(1==b)return this.int.call({command:p.Coord_PCS2GCS,coordinates:T(a)},c);2==b?this.transform(T(a),0,2,c):3==b?this.transform(T(a),0,3,c):console.error("\u672a\u77e5\u5750\u6807\u7cfb\u7c7b\u578b")}transform(a,b,c,e){return this.int.call({command:p.Coord_Transform,coordinates:T(a),src:b,dest:c},e)}}class Ob{constructor(a){this.int=a}start(a){return this.int.call0(p.EditHelper_Start,a)}cancel(a){return this.int.call0(p.EditHelper_Quit,a)}finish(a,b){return this.int.call({command:p.EditHelper_Finish, +withOffset:a||!0},b)}setParam(a,b,c,e){return this.int.call({command:p.EditHelper_SetParam,lineType:a,buildType:b,color:E(c)},e)}}class Pb{constructor(a){this.int=a}setVisibility(a,b){return this.int.call({command:p.InfoTree_SetVisibility,layers:F(a)},b)}show(a,b){return this.int.call({command:p.InfoTree_Show,ids:K(a)},b)}hide(a,b){return this.int.call({command:p.InfoTree_Hide,ids:K(a)},b)}enableXRay(a,b,c){return this.int.call({command:p.InfoTree_EnableXRay,ids:F(a),color:E(b)},c)}disableXRay(a, +b){return this.int.call({command:p.InfoTree_DisableXRay,ids:F(a)},b)}showByGroupId(a,b){return this.int.call({command:p.InfoTree_ShowByGroupId,ids:K(a)},b)}hideByGroupId(a,b){return this.int.call({command:p.InfoTree_HideByGroupId,ids:K(a)},b)}highlightByGroupId(a,b){return this.int.call({command:p.InfoTree_HighlightByGroupId,ids:K(a)},b)}deleteByGroupId(a,b){return this.int.call({command:p.InfoTree_DeleteByGroupId,ids:K(a)},b)}get(a){return this.int.call0(p.InfoTree_Get,a)}focus(a,b){return this.int.call({command:p.InfoTree_Focus, +ids:K(a)},b)}}class Qb{constructor(a){this.int=a;this.apiVersion="5.4";this.apiVersionServer=""}isApiVersionMatched(){return"5.4"==this.apiVersionServer}addImageButtons(a,b){return this.int.call({command:p.Misc_AddImageButton,data:F(a)},b)}deleteImageButtons(a,b){return this.int.call({command:p.Misc_DeleteImageButton,ids:K(a)},b)}addAnimatedImageButtons(a,b){return this.int.call({command:p.Misc_AddAnimatedImageButton,data:F(a)},b)}setApiVersionReceived(a){this.int.onApiVersionReceived=a}playVideo(a, +b,c,e,d,h,g){return this.int.call({command:p.Misc_PlayVideo,data:[{id:a.toString(),position:[b,c],size:[e,d],url:h}]},g)}stopPlayVideo(a,b){return this.int.call({command:p.Misc_StopPlayVideo,ids:K(a)},b)}playMovie(a,b,c){"function"==typeof b&&(c=b,b=!1);return this.int.call({command:p.Misc_PlayMovie,loop:b,url:a},c)}stopMovie(a){return this.int.call({command:p.Misc_StopMovie},a)}setWindowResolution(a,b,c){return this.int.call({command:p.Misc_SetWindowResolution,cx:a,cy:b,mode:0},c)}callBPFunction(a, +b){return this.int.call({command:p.Misc_CallBPFunction,data:F(a)},b)}enterReportMode(a){return this.int.call0(p.Misc_EnterReportMode)}exitReportMode(a){return this.int.call0(p.Misc_ExitReportMode,a)}showAllFoliages(a){return this.int.call0(p.Misc_ShowAllFoliages,a)}hideAllFoliages(a){return this.int.call0(p.Misc_HideAllFoliages,a)}startProcess(a,b,c,e){"function"==typeof c&&(e=c,c=!0);return this.int.call({command:p.Misc_StartProcess,appName:a,commandLine:b,visible:c},e)}enterMultiViewportMode(a, +b,c,e){if(null==b||void 0==b)b="#DEA309";if(null==c||void 0==c)c=2;return this.int.call({command:p.Misc_EnterMultiViewport,type:a,lineColor:E(b),lineThickness:c},e)}exitMultiViewportMode(a){return this.int.call({command:p.Misc_ExitMultiViewport},a)}setActiveViewport(a,b){return this.int.call({command:p.Misc_SetActivateMultiViewport,viewIndex:F(a)},b)}getActiveViewport(a){return this.int.call({command:p.Misc_GetActivateMultiViewport},a)}setMultiviewportInteractSync(a,b){this.setCameraFollow4Viewport(a, +b)}setCameraFollow4Viewport(a,b){return this.int.call({command:p.Misc_UpdateMultiViewport,moverTogether:a},b)}downloadPakFiles(a,b){return this.int.call({command:p.Misc_downloadPakFiles,ids:F(a)},b)}getConvexPolygon(a,b){return this.int.call({command:p.Misc_ConvexHull2D,data:F(a)},b)}getMaterial(a,b){return this.int.call({command:p.Misc_QueryActorOrMaterial,idOrPaths:F(a)},b)}getBPFunction(a,b){return this.int.call({command:p.Misc_QueryActorOrMaterial,idOrPaths:F(a)},b)}startPolygonClip(a,b,c){return this.int.tools.startPolygonClip(a, +b,c)}stopClip(a){return this.int.tools.stopClip(a)}playAnimation(a,b){return this.int.camera.playAnimation(a,b)}stopAnimation(a){return this.int.camera.stopAnimation(a)}setDateTime(a,b,c,e,d,h,g){return this.int.weather.setDateTime(a,b,c,e,d,h,g)}setQueryToolState(a,b){return this.int.call({"c.ommand":p.Settings_SetMousePickMask,mouseClick:a},b)}setCampassVisible(a,b){return this.int.settings.setCampassVisible(a,b)}setMainUIVisibility(a,b){return this.int.settings.setMainUIVisibility(a,b)}setMousePickMask(a, +b){return this.int.settings.setMousePickMask(a,b)}}class Rb{constructor(a){this.int=a}setMapMode(a,b,c){b=b||{};return this.int.call({command:p.Settings_SetMapMode,mode:a,serviceType:b.serviceType||0,coordType:b.coordType||0,mapPoint:b.mapPoint||[0,0],longitude:b.longitude||0,latitude:b.latitude||0,cache:b.cache||":memory:",style:b.style||"mapbox://styles/mapbox/streets-v10",groundHeight:b.groundHeight||0,renderMode:b.renderMode||0,decalMode:b.decalMode||1,serverURL:b.serverURL,coordOrder:b.coordOrder, +maxLevel:b.maxLevel},c)}getMapMode(a){return this.int.call0(p.Settings_GetMapMode,a)}setWMTSLayerVisible(a,b){this.setwmtsLayerVisible(a,b)}setwmtsLayerVisible(a,b){return this.int.call({command:p.Settings_SetWMTSLayerVisible,data:F(a)},b)}setWMTSLayerOpacity(a,b){return this.int.call({command:p.Settings_SetWMTSLayerOpacity,data:F(a)},b)}setMapURL(a,b){return this.int.call({command:p.Settings_SetMapURL,url:a},b)}highlightColor(a,b){return this.setHighlightColor(a,b)}setHighlightColor(a,b){return this.int.call({command:p.Settings_SetHighlightColor, +color:E(a)},b)}setFovX(a,b){return this.int.call({command:p.Settings_SetFovX,value:a},b)}setOceanColor(a,b){return this.int.call({command:p.Settings_SetOceanColor,color:E(a)},b)}setEnableInteract(a,b){return this.int.call({command:p.Settings_SetEnableInteract,enableInteract:a},b)}setInteractiveMode(a,b){return this.int.call({command:p.Settings_SetInteractiveMode,mode:a},b)}getInteractiveMode(a){return this.int.call({command:p.Settings_GetInteractiveMode},a)}setCampassVisible(a,b){return this.int.call({command:p.Settings_SetCampassVisible, +visible:a},b)}setCampassPosition(a,b,c){return this.int.call({command:p.Settings_SetCampassPosition,position:[a,b]},c)}restoreCampassPosition(a){this.setCampassPosition(-1,-1)}setMainUIVisibility(a,b){return this.int.call({command:p.Settings_SetMainUIVisibility,visible:a},b)}setMousePickMask(a,b){let c=!1,e=!1,d=!1;a&qa.MouseClick&&(c=!0);a&qa.MouseMove&&(e=!0);a&qa.MouseHover&&(d=!0);return this.int.call({command:p.Settings_SetMousePickMask,mouseClick:c,mouseMove:e,mouseHover:d},b)}setTerrainAlpha(a, +b){return this.int.call({command:p.Settings_SetTerrainAlpha,alpha:a},b)}setEnableCameraMovingEvent(a,b,c){return this.int.call({command:p.Settings_EnableCameraMovingEvent,bEnable:a,monitorThreshold:b},c)}setLabelLayer(a,b){return this.int.call({command:p.VTPKService_Set,vtpk:a},b)}getLabelLayer(a){return this.int.call({command:p.VTPKService_Get},a)}removeLabelLayer(a){return this.int.call({command:p.VTPKService_Set,vtpk:""},a)}setRenderedCursorVisible(a,b){this.setCursorAutoSync(a,b)}setCursorAutoSync(a, +b){return this.int.call({command:p.Settings_CursorAutoSync,useSoftwareCursor:a},b)}}class Sb{constructor(a){this.int=a}setReportMode(a,b,c,e){return this.int.call({command:p.Settings_SetReport,alignment:a,playMode:b,moveInOtherView:c},e)}getReportMode(a){return this.int.call({command:p.Settings_GetReport},a)}setControlMode(a,b,c,e,d){return this.int.call({command:p.Settings_SetControl,speed:a,yawSpeed:b,rotateSelf:c,useFemale:e},d)}getControlMode(a){return this.int.call({command:p.Settings_GetControl}, +a)}setPostProcessMode(a,b){let c=1E3,e=1E3;0<=a.terrainGlobalAlpha&&1>=a.terrainGlobalAlpha&&(c=1E3*a.terrainGlobalAlpha);0<=a.osgbGlobalAlpha&&1>=a.osgbGlobalAlpha&&(e=1E3*a.osgbGlobalAlpha);return this.int.call({command:p.Settings_SetPostProcess,contrast:a.contrast,saturation:a.saturation,lensFlareIntensity:a.lensFlareIntensity,ambientIntensity:a.ambientIntensity,bloomIntensity:a.bloomIntensity,lutMode:a.lutMode,lutIntensity:a.lutIntensity,darkCorner:a.darkCorner,screenPercentage:a.screenPercentage, +terrainGlobalAlpha:c,terrainGlobalLitStatus:a.terrainGlobalLitStatus,osgbGlobalLitStatus:a.osgbGlobalLitStatus,osgbGlobalAlpha:e,antiAliasing:a.antiAliasing,tonemapper:a.tonemapper,postProcessEffects:a.postProcessEffects,dofMode:a.dofMode,wireThickness:a.wireThickness,receiveDecalMode:a.receiveDecalMode},b)}getPostProcessMode(a){return this.int.call({command:p.Settings_GetPostProcess},a)}setCameraMode(a,b,c,e,d){e&&"function"==typeof e&&(d=e);return this.int.call({command:p.Settings_SetCamera,nearClipPlane:a, +fovH:b,minCamHeight:c,maxCamHeight:e},d)}getCameraMode(a){return this.int.call({command:p.Settings_GetCamera},a)}setMapMode(a,b,c){b=b||{};return this.int.call({command:p.Settings_SetMapMode,mode:a,serviceType:b.serviceType||0,coordType:b.coordType||0,mapPoint:b.mapPoint||[0,0],longitude:b.longitude||0,latitude:b.latitude||0,cache:b.cache||":memory:",style:b.style||"mapbox://styles/mapbox/streets-v10",groundHeight:b.groundHeight||0,renderMode:b.renderMode||0,decalMode:b.decalMode||1,serverURL:b.serverURL, +coordOrder:b.coordOrder,maxLevel:b.maxLevel},c)}getMapMode(a){return this.int.call0(p.Settings_GetMapMode,a)}}class Tb{constructor(a){this.int=a}startPolygonClip(a,b,c){return this.int.call({command:p.Tools_StartPolygonClip,data:F({id:"0",coordinates:O(a),toggleImageCut:b})},c)}startPlaneClip(a,b,c,e,d){return this.int.call({command:p.Tools_StartPlaneClip,location:a,rotation:b,isShowPlane:c,isEdit:e},d)}startVolumeClip(a,b,c,e,d,h){return this.int.call({command:p.Tools_StartVolumeClip,bbox:a,rotation:d, +value:b,isShowPlane:c,isEdit:e},h)}updateVolumeClip(a,b,c,e,d,h){return this.int.call({command:p.Tools_UpdateVolumeClip,bbox:a,rotation:d,value:b,isShowPlane:c,isEdit:e},h)}stopClip(a){return this.stopPolygonClip(a)}stopPolygonClip(a){return this.int.call0(p.Tools_StopClip,a)}stopPlaneClip(a){return this.int.call({command:p.Tools_StopPlaneClip},a)}stopVolumeClip(a){return this.int.call({command:p.Tools_StopVolumeClip},a)}setMeasurement(a,b,c){b=b||{};return this.int.call({command:p.Tools_SetMeasurement, +type:a,pointSize:b.pointSize,textSize:b.textSize,textColor:E(b.textColor),pointColor:E(b.pointColor),lineColor:E(b.lineColor),areaColor:E(b.areaColor),showCoordinateText:b.showCoordinateText},c)}startMeasurement(a){return this.int.call0(p.Tools_StartMeasurement,a)}stopMeasurement(a){return this.int.call0(p.Tools_StopMeasurement,a)}lineIntersect(a,b,c){return this.int.call({command:p.Tools_LineIntersect,data:[{start:a,end:b}],highPrecision:!1,returnDetails:!0},c)}linesIntersect(a,b,c,e){return this.int.call({command:p.Tools_LineIntersect, +data:F(a),highPrecision:b,returnDetails:c},e)}startGeometryEdit(a,b,c){return this.int.call({command:p.Tools_StartGeometryEdit,id:a,type:b},c)}stopGeometryEdit(a){return this.int.call0(p.Tools_StopGeometryEdit,a)}startSkylineAnalysis(a,b){a=a||{};a.outlineColor&&(a.outlineColor=E(a.outlineColor));a.sceneColor&&(a.sceneColor=E(a.sceneColor));a.skylineColor&&(a.skylineColor=E(a.skylineColor));a.backgroundColor&&(a.backgroundColor=E(a.backgroundColor));if(a.tileLayers){a.tileLayers=F(a.tileLayers);for(let c of a.tileLayers)c.hasOwnProperty("color")&& +(c.color=E(c.color))}a.command=p.Tools_StartSkylineAnalysis;return this.int.call(a,b)}stopSkylineAnalysis(a){return this.int.call0(p.Tools_StopSkylineAnalysis,a)}exportSkyline(a,b,c,e){c=c||{};c.skylineColor&&(c.skylineColor=E(c.skylineColor));c.backgroundColor&&(c.backgroundColor=E(c.backgroundColor));if(c.tileLayers){c.tileLayers=F(c.tileLayers);for(let d of c.tileLayer)d.hasOwnProperty("color")&&(d.color=E(d.color))}return this.int.call({command:p.Tools_ExportSkyline,path:a,size:b,skylineColor:c.skylineColor, +backgroundColor:c.backgroundColor},e)}startViewshedAnalysis(a,b){a=a||{};a.visibleColor&&(a.visibleColor=E(a.visibleColor));a.invisibleColor&&(a.invisibleColor=E(a.invisibleColor));a.command=p.Tools_StartViewshedAnalysis;return this.int.call(a,b)}stopViewshedAnalysis(a){return this.int.call0(p.Tools_StopViewshedAnalysis,a)}startVisiblityAnalysis(a,b){a=a||{};a.visibleColor&&(a.visibleColor=E(a.visibleColor));a.invisibleColor&&(a.invisibleColor=E(a.invisibleColor));a.command=p.Tools_StartVisiblityAnalysis; +return this.int.call(a,b)}stopVisiblityAnalysis(a){return this.int.call0(p.Tools_StopVisiblityAnalysis,a)}startViewDomeAnalysis(a,b){a=a||{};a.visibleColor&&(a.visibleColor=E(a.visibleColor));a.invisibleColor&&(a.invisibleColor=E(a.invisibleColor));a.command=p.Tools_StartViewDomeAnalysis;return this.int.call(a,b)}stopViewDomeAnalysis(a){return this.int.call0(p.Tools_StopViewDomeAnalysis,a)}startCutFillAnalysis(a,b){a=a||{};a.cutLineColor&&(a.cutLineColor=E(a.cutLineColor));a.fillLineColor&&(a.fillLineColor= +E(a.fillLineColor));a.cutPointColor&&(a.cutPointColor=E(a.cutPointColor));a.fillPointColor&&(a.fillPointColor=E(a.fillPointColor));a.gridColor&&(a.gridColor=E(a.gridColor));a.command=p.Tools_StartCutFillAnalysis;return this.int.call(a,b)}stopCutFillAnalysis(a){return this.int.call0(p.Tools_StopCutFillAnalysis,a)}startSunshineAnalysis(a,b){var c=/^(0?[0-9]|1[0-9]|[2][0-3]):(0?[0-9]|[1-5][0-9])$/;if(null==a||void 0==a)console.error("\u53c2\u6570\u4e0d\u80fd\u4e3a\u7a7a");else{let e=a.startTime,d=a.endTime; +if(null==e||""==e||null==d||""==d)console.error("\u65f6\u95f4\u53c2\u6570\u683c\u5f0f\u4e0d\u6b63\u786e");else if(e.match(c)&&d.match(c))if(e.split(":"))if(a.startHour=parseInt(e.split(":")[0]),a.startMinute=parseInt(e.split(":")[1]),d.split(":"))if(a.endHour=parseInt(d.split(":")[0]),a.endMinute=parseInt(d.split(":")[1]),a.startHour>a.endHour)console.error("\u5f00\u59cb\u65f6\u95f4\u4e0d\u80fd\u5927\u4e8e\u7ed3\u675f\u65f6\u95f4");else{if(a.startHour==a.endHour){if(a.startMinute==a.endMinute){console.error("\u5f00\u59cb\u65f6\u95f4\u4e0d\u80fd\u7b49\u4e8e\u7ed3\u675f\u65f6\u95f4"); +return}if(a.startMinute>a.endMinute){console.error("\u5f00\u59cb\u65f6\u95f4\u4e0d\u80fd\u5927\u4e8e\u7ed3\u675f\u65f6\u95f4");return}}S(a.groundElevation)||(c=a.groundElevation,!isNaN(parseFloat(c))&&isFinite(c)&&(a.undersideHeight=a.groundElevation,delete a.groundElevation));a.command=p.Tools_StartSunshineAnalysis;return this.int.call(a,b)}else console.error("\u53c2\u6570endTime\u65f6\u95f4\u683c\u5f0f\u4e0d\u6b63\u786e");else console.error("\u53c2\u6570startTime\u65f6\u95f4\u683c\u5f0f\u4e0d\u6b63\u786e"); +else console.error("\u65f6\u95f4\u53c2\u6570\u683c\u5f0f\u4e0d\u6b63\u786e")}}stopSunshineAnalysis(a){return this.int.call0(p.Tools_StopSunshineAnalysis,a)}startTerrainSlopeAnalysis(a,b){a.command=p.Tools_StartTerrainSlopeAnalysis;return this.int.call(a,b)}stopTerrainSlopeAnalysis(a){return this.int.call0(p.Tools_StopTerrainSlopeAnalysis,a)}startContourLineAnalysis(a,b){a.command=p.Tools_StartContourLineAnalysis;return this.int.call(a,b)}stopContourLineAnalysis(a){return this.int.call0(p.Tools_StopContourLineAnalysis, +a)}startFloodFill(a,b){a=a||{};a.color&&(a.color=E(a.color));a.command=p.Tools_StartFloodFill;return this.int.call(a,b)}stopFloodFill(a){return this.int.call0(p.Tools_StopFloodFill,a)}replaceTextureByVideo(a,b,c){return this.int.call({command:p.Tools_ReplaceTexture,texturePackage:a,newTexture:b,type:1},c)}replaceTextureByImage(a,b,c){return this.int.call({command:p.Tools_ReplaceTexture,texturePackage:a,newTexture:b,type:2},c)}replaceTextureByUrl(a,b,c){return this.int.call({command:p.Tools_ReplaceTexture, +texturePackage:a,newTexture:b,type:3},c)}restoreTexture(a,b){return this.int.call({command:p.Tools_RestoreTexture,ids:F(a)},b)}showPanel(a,b,c){this.showAnalysisPanel(a,b,c)}hidePanel(a){this.hideAnalysisPanel(a)}showAnalysisPanel(a,b,c){return this.int.call({command:p.Tools_AnalysisPopupAttributes,type:a,position:b},c)}hideAnalysisPanel(a){return this.int.call({command:p.Tools_AnalysisCloseAttributes},a)}}class Ub{constructor(a){this.int=a}getParams(a){return this.int.call0(p.Weather_GetParams,a)}_setParam(a, +b){return this.int.call({command:p.Weather_SetParams,data:a},b)}setDateTime(a,b,c,e,d,h,g){return this.int.call({command:p.Weather_SetDate,year:a,month:b,day:c,hour:e,minute:d,daynightLoop:h},g)}getDateTime(a){return this.int.call0(p.Weather_GetDate,a)}simulateTime(a,b,c,e){let d=0,h=0,g=0,q=0;a instanceof Array?(0this.sendApi(c))}setHost(a,b){this.url=`ws://${a}:${b}`}connectWebSocket(){if(!this.player){this.log(`Connecting: ${this.url}`);if("undefined"==typeof window)this.websocket=new (require("ws"))(this.url);else{if(!("WebSocket"in window)){console.error("Not Support WebSocket!");return}this.websocket=new WebSocket(this.url)}this.websocket.onopen= +()=>this.onConnectionOpen();this.websocket.onmessage=a=>this.onConnectionMessage(a.data);this.websocket.onclose=a=>this.onConnectionClose(a);this.websocket.onerror=a=>this.onConnectionError(a)}}setEventCallback(a){this.options.onEvent=a}destroy(){this.isDestroyed=!0;this.player&&this.player.destroy();this.websocket&&(this.websocket.close(),this.websocket=null)}reset(a){return this.call0(p.Reset,a)}saveProject(a){return this.call0(p.SaveProject,a)}registerTick(a,b,c){b=b||{};"__execute__"!=a&&(b.func= +"tick");this.call({command:p.RegisterJsCommunication,id:this.tickMarkerId,url:a,func:b.func,x:b.x||4,y:b.y||4,width:b.width||400,height:b.height||300,visible:b.visible||!1},c)}removeTick(a){this.call({command:p.UnRegisterJsCommunication,ids:[this.tickMarkerId]},a)}showTickWindow(a,b){this.isCalledInCEF?ue.dtspoi.showtickwindow(a):a?this.registerTick("__show__",{},b):this.registerTick("",{},b)}executeJsInTickPage(a,b){this.registerTick("__execute__",{func:a},b)}getVersion(){return"5.4.0508"}initInterface(){this.camera= +new Mb(this);this.coord=new Nb(this);this.layers=this.infoTree=new Pb(this);this.ct=this.cameraTour=new jb(this);this.tl=this.tileLayer=new Hb(this);this.tag=new Gb(this);this.marker=new xb(this);this.marker3d=new yb(this);this.ctag=this.customTag=new nb(this);this.rp=this.radiationPoint=new Eb(this);this.cm=this.customMesh=new lb(this);this.wm=this.waterMesh=new Lb(this);this.waterFlowField=new Kb(this);this.wff=this.WaterFlowField;this.line=this.polyline=new Db(this);this.ol=this.odline=new zb(this); +this.p3d=this.polygon3d=new Cb(this);this.polygon=new Bb(this);this.hm=this.heatmap=new sb(this);this.hm3d=this.heatmap3d=new tb(this);this.beam=new ib(this);this.ha=this.highlightArea=new ub(this);this.co=this.customObject=new mb(this);this.vp=this.videoProjection=new Jb(this);this.panorama=new Ab(this);this.decal=new ob(this);this.dw=this.dynamicWater=new pb(this);this.ff=this.floodFill=new qb(this);this.c3d=this.cesium3DTileset=new kb(this);this.shapeFile=this.shp=this.shapeFileLayer=new Fb(this); +this.light=new wb(this);this.imagery=this.imageryLayer=new vb(this);this.geoJSON=this.geoJSONLayer=new rb(this);this.vc=this.vehicle=new Ib(this);this.misc=new Qb(this);this.tools=new Tb(this);this.settings=new Rb(this);this.weather=new Ub(this);this.eh=this.editHelper=new Ob(this);this.sp=this.settingsPanel=new Sb(this)}_getCallbackIndex(){return++this.callbackIndex}call0(a,b){return this.call({command:a},b)}call(a,b){if(!this.isConnected)return this.logWithColor("red","Not connected!"),b?void 0: +Promise.reject("Not connected!");if(void 0==a.command||a.command==p.None)return this.logWithColor("red","command is undefined or None"),b?void 0:Promise.reject("command is undefined or None");a.timestamp=Date.now();a.callbackIndex=this._getCallbackIndex();a.__command=p[a.command]||"Unknown";a.__version=this.getVersion();null===b&&(a.__noResponse=!0);let c=a.command+"_"+a.callbackIndex;b&&"function"==typeof b&&(this.callbackMap[c]=b);if(this.isCalledInCEF&&null===b)return delete a.__noResponse,this.callbackMap[c]= +null,this.sendApi(a),a;let e=JSON.stringify(a);this.log("");this.logWithColor("RoyalBlue",`Request: ${p[a.command]||"Unknown"}`,!0);this.logWithColor("green","\uff08"+(new Date(a.timestamp)).toLocaleTimeString()+"\uff09");this.logWithColor("gray",`${e}`);if(b||null===b)this.apiQueue.push(a);else return new Promise(d=>{this.callbackMap[c]=d;this.apiQueue.push(a)})}sendApi(a){this.isCalledInCEF?ue.dtspoi.execute(JSON.stringify(a)):this.player?this.player.sendApi(a):this.sendStringByWS(a)}sendStringByWS(a){if(a){a= +JSON.stringify(a);var b=a.length;if(16777216>=b)this.websocket.send(a);else{var c=Math.ceil(b/16777216),e=[];for(let d=0;dthis.savedCamera=b.camera)}}onReady(){if("function"==typeof this.options.onReady)this.options.onReady();this.call({command:p.Misc_GetVersion});if(this.player)this.player.onApiReady()}log(a,b,c){if("function"==typeof this.options.onLog)this.options.onLog(a,b,c)}logWithColor(a,b,c){this.log(b,c,a)}onConnectionOpen(){this.isConnected=!0;this.logWithColor("blue","Connected!")}onConnectionClose(a){this.isConnected=!1;this.logWithColor("red",`Connection closed! code: ${a.code|| +"-"}, reason: ${1006==a.code?H.getString("Disconnect"):a.reason||a.message||"-"}`);this.log("");this.logWithColor("SpringGreen","Reconnecting...");this.isDestroyed||this.player||this.connectWebSocket()}onConnectionError(a){console.error("WebSocket error observed")}onConnectionMessage(a,b){a=a.replace(/~!@~!@~!@/g,'\\"');this.log("");let c=null;try{c=JSON.parse(a)}catch(d){this.isCalledInCEF?(document.writeln(d.message),document.writeln("
"),document.writeln(a)):(console.error(d.message),this.log("Response: [Unknown]")); +return}if(c.command==p.Misc_GetVersion){this.misc.apiVersionServer=c.version||c.versionType;if("5.4"!=this.misc.apiVersionServer){var e=H.getString("VersionMismatch").format("5.4",this.misc.apiVersionServer);console.warn(e);"undefined"!=typeof window&&alert(e)}if("function"==typeof this.options.onApiVersion)this.options.onApiVersion(this.misc.apiVersionServer)}if(c.command)this.apiQueue.callNext(c.callbackIndex),e=Date.now()-c.timestamp,this.logWithColor("RoyalBlue",`Response: ${p[c.command]||"Unknown"}`, +!0),this.logWithColor("green",` (${H.getString("TimeConsuming")}${e}ms)`),this.logWithColor("gray",`${H.getString("RequestTime")}${(new Date(c.timestamp)).toLocaleTimeString()}`,!0),this.logWithColor("gray",` ${H.getString("ResponseTime")}${(new Date(Date.now())).toLocaleTimeString()}`,!0),this.logWithColor("gray",` ${H.getString("MessageLength")}${a.length}`),a=c.command+"_"+c.callbackIndex,(e=this.callbackMap[a])?(e(c),delete this.callbackMap[a]):null===e&&"function"===typeof tick_next&&tick_next(c, +b);else if(c.eventtype)if(this.log("Response: Event"),"CompleteInitialization"==c.eventtype)this.log("The initialization is complete, now you can call the interfaces in onReady callback function."),this.initialCameraPosition=c.InitialCamera,c.ResourcesPath&&(this.resourcesPath=c.ResourcesPath,this.log("ResourcesPath:"+this.resourcesPath)),this.onReady();else if("NodeConfiguration"==c.eventtype)this.resourcesPath=c.ResourcesPath,this.log("ResourcesPath:"+this.resourcesPath);else if("MainThreadBusy"== +c.eventtype)this.apiQueue.onMainThreadBusy(c),this.player&&this.player.onMainThreadBusy(c);else{if("function"==typeof this.options.onEvent)this.options.onEvent(c)}else this.log("Response: [Unknown]");b=JSON.stringify(c,(d,h)=>h instanceof Array?JSON.stringify(h):h,"\t").replace(/"\[/g,"[").replace(/\]"/g,"]").replace(/\\"/g,'"').replace(/""/g,'"');this.logWithColor("gray",b)}quit(){return this.call0(p.Quit)}test(a,b,c){return this.call({command:p.SimulateTest__,type:a,int32Val:b},c)}}const V={WS_Disconnected:0, +WS_Connecting:1,WS_Connected:2,RTC_Opened:3,Video_LoadedMetaData:4,OnReady:5},da={StartingProcess:0,CheckingBusy:1,ConfirmBusy:2,ProcessStartFailed:3,ProcessStarted:4,LoadingProject:5,ProjectLoaded:6};class Vb{constructor(){"undefined"!=typeof navigator&&(this.isUnix="Mac68K"==navigator.platform||"MacPPC"==navigator.platform||"Macintosh"==navigator.platform||"MacIntel"==navigator.platform||-1!=navigator.platform.indexOf("Linux"),this.isChrome=-1!=navigator.userAgent.indexOf("Chrome"),this.isMobileDevice= +/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent),this.isIOSDevice=/iPhone|iPad|iPod/i.test(navigator.userAgent),this.isSafari=/Safari/i.test(navigator.userAgent),this.isAndroidDevice=/Android/i.test(navigator.userAgent),this.isInWeixinBrowser)}fullscreen(a){a&&(a.requestFullscreen?a.requestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.msRequestFullscreen?a.msRequestFullscreen:a.webkitRequestFullscreen&&a.webkitRequestFullscreen())}exitFullscreen(){document.exitFullscreen? +document.exitFullscreen():document.msExitFullscreen||(document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen())}isFullscreen(){return document.fullscreen||document.mozFullScreen||document.webkitIsFullScreen}isFunction(a){return"function"==typeof a}}var R=new Vb;const sa={abnormal:1006,invalid_message:1008,no_free_instance:1013,out_of_control:4E3,instance_disconnected:4001,instance_not_found:4002,instance_start_failed:4003,webrtc_connection_error:4004, +one_client_allowed:4005,timeout:4006,iid_required:4007,locked:4008,invalid_project:4009,kicked:4100,syncing_data:4101,instance_killed_by_user:4102,invalid_password:4103,nodeservice_stopped:4105,instance_is_busy:4107,ip_not_authorized:4108,invalid_token:4109};aa.EMPTY_OBJECT=Object.freeze({});class ka{}ka.doParamsCompatibility=a=>{a.apiOptions=a.apiOptions||{};a.events=a.events||{};a.ui=a.ui||{};"undefined"!=typeof a.showMarker&&(a.showStatus=a.showMarker,delete a.showMarker);"undefined"!=typeof a.actionEventHander&& +(a.onaction=a.actionEventHander,delete a.actionEventHander);"undefined"!=typeof a.useBuiltinCursor&&(a.useBuiltinCursors=a.useBuiltinCursor,delete a.useBuiltinCursor);"undefined"!=typeof a.keyEventReceiver&&(a.keyEventTarget=a.keyEventReceiver,delete a.keyEventReceiver);"undefined"!=typeof a.ui.debugTouchPanel&&(a.ui.debugEventsPanel=a.ui.debugTouchPanel,delete a.ui.debugTouchPanel);var b=(c,e)=>{let d=a[c];d&&(a.events[e]=d,delete a[c])};b("onclose","onConnClose");b("onloaded","onVideoLoaded");b("onvideostatus", +"onRtcStatsReport");b("onaction","mouseKeyListener");b=(c,e)=>{let d=a.events.mouseKeyListener[c];d&&(a.events.mouseKeyListener[e]=d,delete a.events.mouseKeyListener[c])};a.events.mouseKeyListener&&(b("onmouseenter","onMouseEnter"),b("onmouseleave","onMouseLeave"),b("onmousemove","onMouseMove"),b("onmousedown","onMouseDown"),b("onmouseup","onMouseUp"),b("onkeydown","onKeyDown"),b("onkeyup","onKeyUp"),b("onkeypress","onKeyPress"));b=(c,e)=>{"undefined"!=typeof a[c]&&(a.ui[e]=a[c],delete a[c])};b("showStartupInfo", +"startupInfo");b("showStatus","statusButton");b("showFullscreenButton","fullscreenButton");b("showHomeButton","homeButton");b("showTaskList","taskListBar")};ka.setDefaultParamValues=a=>{a.keyEventTarget=aa(a.keyEventTarget,"video");a.useBuiltinCursors=aa(a.useBuiltinCursors,!0);a.ui.startupInfo=aa(a.ui.startupInfo,!0);a.ui.statusIndicator=aa(a.ui.statusIndicator,!0);a.ui.statusButton=aa(a.ui.statusButton,!1);a.ui.fullscreenButton=aa(a.ui.fullscreenButton,!1);a.ui.homeButton=aa(a.ui.homeButton,!1); +a.ui.taskListBar=aa(a.ui.taskListBar,1);a.ui.debugEventsPanel=aa(a.ui.debugEventsPanel,!1);a.offer=1};ka.processParams=a=>{ka.doParamsCompatibility(a);ka.setDefaultParamValues(a)};class Wb{constructor(a){this.options=a;this.checkParamsMap=new Map}resetInteractTimestamp(a){this.timeOfLastInteraction=a}connect(a){window.WebSocket=window.WebSocket||window.MozWebSocket;window.WebSocket?(this.websocket=new WebSocket(a),this.websocket.onopen=()=>{if(this.options.onopen)this.options.onopen();setInterval(()=> +{this.timeOfLastInteraction&&this.send({type:"ping",time:this.timeOfLastInteraction})},3E3)},this.websocket.onmessage=b=>{if(b=JSON.parse(b.data)){switch(b.type){case "checkParamsResult":this.onCheckParamsResponse(b);return;case "detectResponse":this.send(b);return}if(this.options.onmessage)this.options.onmessage(b)}},this.websocket.onerror=b=>{if(this.options.onerror)this.options.onerror(b)},this.websocket.onclose=b=>{this.websocket=void 0;if(this.options.onclose)this.options.onclose(b)}):alert("Your browser does not support WebSocket")}isOpened(){return this.websocket&& +1===this.websocket.readyState}send(a){a&&this.isOpened()&&this.websocket.send(JSON.stringify(a))}close(a){console.log(`call SignallingConnection.close: ${a||" "}`);this.isOpened()&&(this.websocket.close(a),this.websocket=null)}sendReady(){this.send({type:"ready"})}sendCandidate(a){a.candidate&&a.candidate.candidate&&this.send({type:"iceCandidate",candidate:a.candidate})}sendOffer(a,b){this.send({type:"offer",sdp:a,hasVideo:b})}updateParams(a){this.send({type:"updateParams",data:a})}checkParams(a){a.timestamp= +Date.now();return new Promise(b=>{this.checkParamsMap[a.timestamp]=b;this.send({type:"checkParams",data:a});this.timerOfCheckParams=setTimeout(()=>{let c=this.checkParamsMap[a.timestamp];c&&(delete this.checkParamsMap[a.timestamp],c(null))},1E3)})}onCheckParamsResponse(a){let b=this.checkParamsMap[a.timestamp];b&&(clearTimeout(this.timerOfCheckParams),delete this.checkParamsMap[a.timestamp],b(a))}}(function(a){"object"===typeof v&&"undefined"!==typeof module?module.exports=a():"function"===typeof define&& +define.amd?define([],a):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).adapter=a()})(function(){return function(){function a(b,c,e){function d(q,k){if(!c[q]){if(!b[q]){var f="function"==typeof require&&require;if(!k&&f)return f(q,!0);if(h)return h(q,!0);k=Error("Cannot find module '"+q+"'");throw k.code="MODULE_NOT_FOUND",k;}k=c[q]={exports:{}};b[q][0].call(k.exports,function(l){return d(b[q][1][l]||l)},k,k.exports,a,b,c,e)}return c[q].exports} +for(var h="function"==typeof require&&require,g=0;gl.version&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(r){var y=f.RTCPeerConnection.prototype[r],u=e({},r,function(){arguments[0]=new ("addIceCandidate"=== +r?f.RTCIceCandidate:f.RTCSessionDescription)(arguments[0]);return y.apply(this,arguments)});f.RTCPeerConnection.prototype[r]=u[r]});var w=f.RTCPeerConnection.prototype.addIceCandidate;f.RTCPeerConnection.prototype.addIceCandidate=function(){return t||arguments[0]?78>l.version&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():w.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}};c.fixNegotiationNeeded=function(f){var l=k.detectBrowser(f);k.wrapPeerConnectionEvent(f, +"negotiationneeded",function(t){var w=t.target;if(!(72>l.version||w.getConfiguration&&"plan-b"===w.getConfiguration().sdpSemantics)||"stable"===w.signalingState)return t})};var k=function(f){if(f&&f.__esModule)return f;var l={};if(null!=f)for(var t in f)Object.prototype.hasOwnProperty.call(f,t)&&(l[t]=f[t]);l.default=f;return l}(a("../utils.js"))},{"../utils.js":15,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia= +function(e,d){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||!e.navigator.mediaDevices||("function"!==typeof d?console.error("shimGetDisplayMedia: getSourceId argument is not a function"):e.navigator.mediaDevices.getDisplayMedia=function(h){return d(h).then(function(g){var q=h.video&&h.video.width,k=h.video&&h.video.height;h.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:g,maxFrameRate:h.video&&h.video.frameRate||3}};q&&(h.video.mandatory.maxWidth=q);k&& +(h.video.mandatory.maxHeight=k);return e.navigator.mediaDevices.getUserMedia(h)})})}},{}],5:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});var e="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(g){return typeof g}:function(g){return g&&"function"===typeof Symbol&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g};c.shimGetUserMedia=function(g){var q=g&&g.navigator;if(q.mediaDevices){var k=d.detectBrowser(g),f=function(r){if("object"!==("undefined"=== +typeof r?"undefined":e(r))||r.mandatory||r.optional)return r;var y={};Object.keys(r).forEach(function(u){if("require"!==u&&"advanced"!==u&&"mediaSource"!==u){var A="object"===e(r[u])?r[u]:{ideal:r[u]};void 0!==A.exact&&"number"===typeof A.exact&&(A.min=A.max=A.exact);var m=function(x,z){return x?x+z.charAt(0).toUpperCase()+z.slice(1):"deviceId"===z?"sourceId":z};if(void 0!==A.ideal){y.optional=y.optional||[];var n={};"number"===typeof A.ideal?(n[m("min",u)]=A.ideal,y.optional.push(n),n={},n[m("max", +u)]=A.ideal):n[m("",u)]=A.ideal;y.optional.push(n)}void 0!==A.exact&&"number"!==typeof A.exact?(y.mandatory=y.mandatory||{},y.mandatory[m("",u)]=A.exact):["min","max"].forEach(function(x){void 0!==A[x]&&(y.mandatory=y.mandatory||{},y.mandatory[m(x,u)]=A[x])})}});r.advanced&&(y.optional=(y.optional||[]).concat(r.advanced));return y},l=function(r,y){if(61<=k.version)return y(r);if((r=JSON.parse(JSON.stringify(r)))&&"object"===e(r.audio)){var u=function(n,x,z){x in n&&!(z in n)&&(n[z]=n[x],delete n[x])}; +r=JSON.parse(JSON.stringify(r));u(r.audio,"autoGainControl","googAutoGainControl");u(r.audio,"noiseSuppression","googNoiseSuppression");r.audio=f(r.audio)}if(r&&"object"===e(r.video)){var A=r.video.facingMode;A=A&&("object"===("undefined"===typeof A?"undefined":e(A))?A:{ideal:A});u=66>k.version;if(!(!A||"user"!==A.exact&&"environment"!==A.exact&&"user"!==A.ideal&&"environment"!==A.ideal||q.mediaDevices.getSupportedConstraints&&q.mediaDevices.getSupportedConstraints().facingMode&&!u)){delete r.video.facingMode; +var m=void 0;if("environment"===A.exact||"environment"===A.ideal)m=["back","rear"];else if("user"===A.exact||"user"===A.ideal)m=["front"];if(m)return q.mediaDevices.enumerateDevices().then(function(n){n=n.filter(function(z){return"videoinput"===z.kind});var x=n.find(function(z){return m.some(function(B){return z.label.toLowerCase().includes(B)})});!x&&n.length&&m.includes("back")&&(x=n[n.length-1]);x&&(r.video.deviceId=A.exact?{exact:x.deviceId}:{ideal:x.deviceId});r.video=f(r.video);h("chrome: "+ +JSON.stringify(r));return y(r)})}r.video=f(r.video)}h("chrome: "+JSON.stringify(r));return y(r)},t=function(r){return 64<=k.version?r:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError", +ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[r.name]||r.name,message:r.message,constraint:r.constraint||r.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};q.getUserMedia=function(r,y,u){l(r,function(A){q.webkitGetUserMedia(A,y,function(m){u&&u(t(m))})})}.bind(q);if(q.mediaDevices.getUserMedia){var w=q.mediaDevices.getUserMedia.bind(q.mediaDevices);q.mediaDevices.getUserMedia=function(r){return l(r,function(y){return w(y).then(function(u){if(y.audio&& +!u.getAudioTracks().length||y.video&&!u.getVideoTracks().length)throw u.getTracks().forEach(function(A){A.stop()}),new DOMException("","NotFoundError");return u},function(u){return Promise.reject(t(u))})})}}}};var d=function(g){if(g&&g.__esModule)return g;var q={};if(null!=g)for(var k in g)Object.prototype.hasOwnProperty.call(g,k)&&(q[k]=g[k]);q.default=g;return q}(a("../utils.js")),h=d.log},{"../utils.js":15}],6:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});var e="function"=== +typeof Symbol&&"symbol"===typeof Symbol.iterator?function(g){return typeof g}:function(g){return g&&"function"===typeof Symbol&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g};c.shimRTCIceCandidate=function(g){if(g.RTCIceCandidate&&!(g.RTCIceCandidate&&"foundation"in g.RTCIceCandidate.prototype)){var q=g.RTCIceCandidate;g.RTCIceCandidate=function(k){"object"===("undefined"===typeof k?"undefined":e(k))&&k.candidate&&0===k.candidate.indexOf("a=")&&(k=JSON.parse(JSON.stringify(k)),k.candidate= +k.candidate.substr(2));if(k.candidate&&k.candidate.length){var f=new q(k);k=d.default.parseCandidate(k.candidate);var l=Object.assign(f,k);l.toJSON=function(){return{candidate:l.candidate,sdpMid:l.sdpMid,sdpMLineIndex:l.sdpMLineIndex,usernameFragment:l.usernameFragment}};return l}return new q(k)};g.RTCIceCandidate.prototype=q.prototype;h.wrapPeerConnectionEvent(g,"icecandidate",function(k){k.candidate&&Object.defineProperty(k,"candidate",{value:new g.RTCIceCandidate(k.candidate),writable:"false"}); +return k})}};c.shimMaxMessageSize=function(g){if(g.RTCPeerConnection){var q=h.detectBrowser(g);"sctp"in g.RTCPeerConnection.prototype||Object.defineProperty(g.RTCPeerConnection.prototype,"sctp",{get:function(){return"undefined"===typeof this._sctp?null:this._sctp}});var k=function(r){if(!r||!r.sdp)return!1;r=d.default.splitSections(r.sdp);r.shift();return r.some(function(y){return(y=d.default.parseMLine(y))&&"application"===y.kind&&-1!==y.protocol.indexOf("SCTP")})},f=function(r){r=r.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/); +if(null===r||2>r.length)return-1;r=parseInt(r[1],10);return r!==r?-1:r},l=function(r){var y=65536;"firefox"===q.browser&&(y=57>q.version?-1===r?16384:2147483637:60>q.version?57===q.version?65535:65536:2147483637);return y},t=function(r,y){var u=65536;"firefox"===q.browser&&57===q.version&&(u=65535);r=d.default.matchPrefix(r.sdp,"a=max-message-size:");0l.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+l.sctp.maxMessageSize+" bytes)");return t.apply(f,arguments)}}if(g.RTCPeerConnection&&"createDataChannel"in g.RTCPeerConnection.prototype){var k=g.RTCPeerConnection.prototype.createDataChannel; +g.RTCPeerConnection.prototype.createDataChannel=function(){var f=k.apply(this,arguments);q(f,this);return f};h.wrapPeerConnectionEvent(g,"datachannel",function(f){q(f.channel,f.target);return f})}};c.shimConnectionState=function(g){if(g.RTCPeerConnection&&!("connectionState"in g.RTCPeerConnection.prototype)){var q=g.RTCPeerConnection.prototype;Object.defineProperty(q,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState}, +enumerable:!0,configurable:!0});Object.defineProperty(q,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(k){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange);k&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=k)},enumerable:!0,configurable:!0});["setLocalDescription","setRemoteDescription"].forEach(function(k){var f=q[k]; +q[k]=function(){this._connectionstatechangepoly||(this._connectionstatechangepoly=function(l){var t=l.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;var w=new Event("connectionstatechange",l);t.dispatchEvent(w)}return l},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly));return f.apply(this,arguments)}})}};c.removeAllowExtmapMixed=function(g){if(g.RTCPeerConnection){var q=h.detectBrowser(g);if(!("chrome"===q.browser&& +71<=q.version||"safari"===q.browser&&605<=q.version)){var k=g.RTCPeerConnection.prototype.setRemoteDescription;g.RTCPeerConnection.prototype.setRemoteDescription=function(f){f&&f.sdp&&-1!==f.sdp.indexOf("\na=extmap-allow-mixed")&&(f.sdp=f.sdp.split("\n").filter(function(l){return"a=extmap-allow-mixed"!==l.trim()}).join("\n"));return k.apply(this,arguments)}}}};var d=(b=a("sdp"))&&b.__esModule?b:{default:b},h=function(g){if(g&&g.__esModule)return g;var q={};if(null!=g)for(var k in g)Object.prototype.hasOwnProperty.call(g, +k)&&(q[k]=g[k]);q.default=g;return q}(a("./utils"))},{"./utils":15,sdp:17}],7:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia=c.shimGetUserMedia=void 0;var e=a("./getusermedia");Object.defineProperty(c,"shimGetUserMedia",{enumerable:!0,get:function(){return e.shimGetUserMedia}});var d=a("./getdisplaymedia");Object.defineProperty(c,"shimGetDisplayMedia",{enumerable:!0,get:function(){return d.shimGetDisplayMedia}});c.shimPeerConnection=function(k){var f=h.detectBrowser(k); +if(k.RTCIceGatherer&&(k.RTCIceCandidate||(k.RTCIceCandidate=function(w){return w}),k.RTCSessionDescription||(k.RTCSessionDescription=function(w){return w}),15025>f.version)){var l=Object.getOwnPropertyDescriptor(k.MediaStreamTrack.prototype,"enabled");Object.defineProperty(k.MediaStreamTrack.prototype,"enabled",{set:function(w){l.set.call(this,w);var r=new Event("enabled");r.enabled=w;this.dispatchEvent(r)}})}!k.RTCRtpSender||"dtmf"in k.RTCRtpSender.prototype||Object.defineProperty(k.RTCRtpSender.prototype, +"dtmf",{get:function(){void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new k.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null));return this._dtmf}});k.RTCDtmfSender&&!k.RTCDTMFSender&&(k.RTCDTMFSender=k.RTCDtmfSender);var t=(0,q.default)(k,f.version);k.RTCPeerConnection=function(w){w&&w.iceServers&&(w.iceServers=(0,g.filterIceServers)(w.iceServers,f.version),h.log("ICE servers after filtering:",w.iceServers));return new t(w)};k.RTCPeerConnection.prototype=t.prototype};c.shimReplaceTrack= +function(k){!k.RTCRtpSender||"replaceTrack"in k.RTCRtpSender.prototype||(k.RTCRtpSender.prototype.replaceTrack=k.RTCRtpSender.prototype.setTrack)};var h=function(k){if(k&&k.__esModule)return k;var f={};if(null!=k)for(var l in k)Object.prototype.hasOwnProperty.call(k,l)&&(f[l]=k[l]);f.default=k;return f}(a("../utils")),g=a("./filtericeservers"),q=(a=a("rtcpeerconnection-shim"))&&a.__esModule?a:{default:a}},{"../utils":15,"./filtericeservers":8,"./getdisplaymedia":9,"./getusermedia":10,"rtcpeerconnection-shim":16}], +8:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.filterIceServers=function(d,h){var g=!1;d=JSON.parse(JSON.stringify(d));return d.filter(function(q){if(q&&(q.urls||q.url)){var k=q.urls||q.url;q.url&&!q.urls&&e.deprecated("RTCIceServer.url","RTCIceServer.urls");var f="string"===typeof k;f&&(k=[k]);k=k.filter(function(l){return 0===l.indexOf("stun:")?!1:(l=l.startsWith("turn")&&!l.startsWith("turn:[")&&l.includes("transport=udp"))&&!g?g=!0:l&&!g});delete q.url;q.urls=f?k[0]:k;return!!k.length}})}; +var e=function(d){if(d&&d.__esModule)return d;var h={};if(null!=d)for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(h[g]=d[g]);h.default=d;return h}(a("../utils"))},{"../utils":15}],9:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia=function(e){"getDisplayMedia"in e.navigator&&e.navigator.mediaDevices&&!(e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices)&&(e.navigator.mediaDevices.getDisplayMedia=e.navigator.getDisplayMedia.bind(e.navigator))}}, +{}],10:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetUserMedia=function(e){e=e&&e.navigator;var d=function(g){return{name:{PermissionDeniedError:"NotAllowedError"}[g.name]||g.name,message:g.message,constraint:g.constraint,toString:function(){return this.name}}},h=e.mediaDevices.getUserMedia.bind(e.mediaDevices);e.mediaDevices.getUserMedia=function(g){return h(g).catch(function(q){return Promise.reject(d(q))})}}},{}],11:[function(a,b,c){function e(k,f,l){f in k?Object.defineProperty(k, +f,{value:l,enumerable:!0,configurable:!0,writable:!0}):k[f]=l;return k}Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia=c.shimGetUserMedia=void 0;var d="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(k){return typeof k}:function(k){return k&&"function"===typeof Symbol&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},h=a("./getusermedia");Object.defineProperty(c,"shimGetUserMedia",{enumerable:!0,get:function(){return h.shimGetUserMedia}}); +var g=a("./getdisplaymedia");Object.defineProperty(c,"shimGetDisplayMedia",{enumerable:!0,get:function(){return g.shimGetDisplayMedia}});c.shimOnTrack=function(k){"object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCTrackEvent&&"receiver"in k.RTCTrackEvent.prototype&&!("transceiver"in k.RTCTrackEvent.prototype)&&Object.defineProperty(k.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})};c.shimPeerConnection=function(k){var f=q.detectBrowser(k);if("object"=== +("undefined"===typeof k?"undefined":d(k))&&(k.RTCPeerConnection||k.mozRTCPeerConnection)){!k.RTCPeerConnection&&k.mozRTCPeerConnection&&(k.RTCPeerConnection=k.mozRTCPeerConnection);53>f.version&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(r){var y=k.RTCPeerConnection.prototype[r],u=e({},r,function(){arguments[0]=new ("addIceCandidate"===r?k.RTCIceCandidate:k.RTCSessionDescription)(arguments[0]);return y.apply(this,arguments)});k.RTCPeerConnection.prototype[r]= +u[r]});if(68>f.version){var l=k.RTCPeerConnection.prototype.addIceCandidate;k.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&""===arguments[0].candidate?Promise.resolve():l.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}var t={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},w=k.RTCPeerConnection.prototype.getStats;k.RTCPeerConnection.prototype.getStats= +function(){var r=Array.prototype.slice.call(arguments),y=r[1],u=r[2];return w.apply(this,[r[0]||null]).then(function(A){if(53>f.version&&!y)try{A.forEach(function(m){m.type=t[m.type]||m.type})}catch(m){if("TypeError"!==m.name)throw m;A.forEach(function(n,x){A.set(x,Object.assign({},n,{type:t[n.type]||n.type}))})}return A}).then(y,u)}}};c.shimSenderGetStats=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCPeerConnection&&k.RTCRtpSender&&!(k.RTCRtpSender&&"getStats"in k.RTCRtpSender.prototype)){var f= +k.RTCPeerConnection.prototype.getSenders;f&&(k.RTCPeerConnection.prototype.getSenders=function(){var t=this,w=f.apply(this,[]);w.forEach(function(r){return r._pc=t});return w});var l=k.RTCPeerConnection.prototype.addTrack;l&&(k.RTCPeerConnection.prototype.addTrack=function(){var t=l.apply(this,arguments);t._pc=this;return t});k.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}};c.shimReceiverGetStats=function(k){if("object"===("undefined"=== +typeof k?"undefined":d(k))&&k.RTCPeerConnection&&k.RTCRtpSender&&!(k.RTCRtpSender&&"getStats"in k.RTCRtpReceiver.prototype)){var f=k.RTCPeerConnection.prototype.getReceivers;f&&(k.RTCPeerConnection.prototype.getReceivers=function(){var l=this,t=f.apply(this,[]);t.forEach(function(w){return w._pc=l});return t});q.wrapPeerConnectionEvent(k,"track",function(l){l.receiver._pc=l.srcElement;return l});k.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}};c.shimRemoveStream= +function(k){!k.RTCPeerConnection||"removeStream"in k.RTCPeerConnection.prototype||(k.RTCPeerConnection.prototype.removeStream=function(f){var l=this;q.deprecated("removeStream","removeTrack");this.getSenders().forEach(function(t){t.track&&f.getTracks().includes(t.track)&&l.removeTrack(t)})})};c.shimRTCDataChannel=function(k){k.DataChannel&&!k.RTCDataChannel&&(k.RTCDataChannel=k.DataChannel)};c.shimAddTransceiver=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCPeerConnection){var f= +k.RTCPeerConnection.prototype.addTransceiver;f&&(k.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var l=arguments[1],t=l&&"sendEncodings"in l;t&&l.sendEncodings.forEach(function(y){if("rid"in y&&!/^[a-z0-9]{0,16}$/i.test(y.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in y&&!(1<=parseFloat(y.scaleResolutionDownBy)))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in y&&!(0<=parseFloat(y.maxFramerate)))throw new RangeError("max_framerate must be >= 0.0"); +});var w=f.apply(this,arguments);if(t){var r=w.sender;t=r.getParameters();"encodings"in t||(t.encodings=l.sendEncodings,r.sendEncodings=l.sendEncodings,this.setParametersPromises.push(r.setParameters(t).then(function(){delete r.sendEncodings}).catch(function(){delete r.sendEncodings})))}return w})}};c.shimGetParameters=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCRtpSender){var f=k.RTCRtpSender.prototype.getParameters;f&&(k.RTCRtpSender.prototype.getParameters=function(){var l= +f.apply(this,arguments);return"sendEncodings"in this?Object.assign({},{encodings:this.sendEncodings},l):l})}};c.shimCreateOffer=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCPeerConnection){var f=k.RTCPeerConnection.prototype.createOffer;k.RTCPeerConnection.prototype.createOffer=function(){var l=this,t=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return f.apply(l,t)}).finally(function(){l.setParametersPromises= +[]}):f.apply(this,arguments)}}};c.shimCreateAnswer=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCPeerConnection){var f=k.RTCPeerConnection.prototype.createAnswer;k.RTCPeerConnection.prototype.createAnswer=function(){var l=this,t=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return f.apply(l,t)}).finally(function(){l.setParametersPromises=[]}):f.apply(this,arguments)}}};var q=function(k){if(k&& +k.__esModule)return k;var f={};if(null!=k)for(var l in k)Object.prototype.hasOwnProperty.call(k,l)&&(f[l]=k[l]);f.default=k;return f}(a("../utils"))},{"../utils":15,"./getdisplaymedia":12,"./getusermedia":13}],12:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia=function(e,d){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||!e.navigator.mediaDevices||(e.navigator.mediaDevices.getDisplayMedia=function(h){if(!h||!h.video)return h=new DOMException("getDisplayMedia without video constraints is undefined"), +h.name="NotFoundError",h.code=8,Promise.reject(h);!0===h.video?h.video={mediaSource:d}:h.video.mediaSource=d;return e.navigator.mediaDevices.getUserMedia(h)})}},{}],13:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});var e="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(h){return typeof h}:function(h){return h&&"function"===typeof Symbol&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h};c.shimGetUserMedia=function(h){var g=d.detectBrowser(h), +q=h&&h.navigator;h=h&&h.MediaStreamTrack;q.getUserMedia=function(w,r,y){d.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia");q.mediaDevices.getUserMedia(w).then(r,y)};if(!(55=t&&parseInt(f[t],10)}function d(f){return"[object Object]"!==Object.prototype.toString.call(f)? +f:Object.keys(f).reduce(function(l,t){var w="[object Object]"===Object.prototype.toString.call(f[t]),r=w?d(f[t]):f[t];w=w&&!Object.keys(r).length;if(void 0===r||w)return l;w=Object;var y=w.assign,u={};t in u?Object.defineProperty(u,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):u[t]=r;return y.call(w,l,u)},{})}function h(f,l,t){l&&!t.has(l.id)&&(t.set(l.id,l),Object.keys(l).forEach(function(w){w.endsWith("Id")?h(f,f.get(l[w]),t):w.endsWith("Ids")&&l[w].forEach(function(r){h(f,f.get(r),t)})}))} +Object.defineProperty(c,"__esModule",{value:!0});var g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&"function"===typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};c.extractVersion=e;c.wrapPeerConnectionEvent=function(f,l,t){if(f.RTCPeerConnection){f=f.RTCPeerConnection.prototype;var w=f.addEventListener;f.addEventListener=function(y,u){if(y!==l)return w.apply(this,arguments);var A=function(m){(m=t(m))&& +(u.handleEvent?u.handleEvent(m):u(m))};this._eventMap=this._eventMap||{};this._eventMap[l]||(this._eventMap[l]=new Map);this._eventMap[l].set(u,A);return w.apply(this,[y,A])};var r=f.removeEventListener;f.removeEventListener=function(y,u){if(y!==l||!this._eventMap||!this._eventMap[l]||!this._eventMap[l].has(u))return r.apply(this,arguments);var A=this._eventMap[l].get(u);this._eventMap[l].delete(u);0===this._eventMap[l].size&&delete this._eventMap[l];0===Object.keys(this._eventMap).length&&delete this._eventMap; +return r.apply(this,[y,A])};Object.defineProperty(f,"on"+l,{get:function(){return this["_on"+l]},set:function(y){this["_on"+l]&&(this.removeEventListener(l,this["_on"+l]),delete this["_on"+l]);y&&this.addEventListener(l,this["_on"+l]=y)},enumerable:!0,configurable:!0})}};c.disableLog=function(f){return"boolean"!==typeof f?Error("Argument type: "+("undefined"===typeof f?"undefined":g(f))+". Please use a boolean."):(q=f)?"adapter.js logging disabled":"adapter.js logging enabled"};c.disableWarnings= +function(f){if("boolean"!==typeof f)return Error("Argument type: "+("undefined"===typeof f?"undefined":g(f))+". Please use a boolean.");k=!f;return"adapter.js deprecation warnings "+(f?"disabled":"enabled")};c.log=function(){"object"!==("undefined"===typeof window?"undefined":g(window))||q||"undefined"!==typeof console&&"function"===typeof console.log&&console.log.apply(console,arguments)};c.deprecated=function(f,l){k&&console.warn(f+" is deprecated, please use "+l+" instead.")};c.detectBrowser=function(f){var l= +f.navigator,t={browser:null,version:null};if("undefined"===typeof f||!f.navigator)return t.browser="Not a browser.",t;l.mozGetUserMedia?(t.browser="firefox",t.version=e(l.userAgent,/Firefox\/(\d+)\./,1)):l.webkitGetUserMedia||!1===f.isSecureContext&&f.webkitRTCPeerConnection&&!f.RTCIceGatherer?(t.browser="chrome",t.version=e(l.userAgent,/Chrom(e|ium)\/(\d+)\./,2)):l.mediaDevices&&l.userAgent.match(/Edge\/(\d+).(\d+)$/)?(t.browser="edge",t.version=e(l.userAgent,/Edge\/(\d+).(\d+)$/,2)):f.RTCPeerConnection&& +l.userAgent.match(/AppleWebKit\/(\d+)\./)?(t.browser="safari",t.version=e(l.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=f.RTCRtpTransceiver&&"currentDirection"in f.RTCRtpTransceiver.prototype):t.browser="Not a supported browser.";return t};c.compactObject=d;c.walkStats=h;c.filterStats=function(f,l,t){var w=t?"outbound-rtp":"inbound-rtp",r=new Map;if(null===l)return r;var y=[];f.forEach(function(u){"track"===u.type&&u.trackIdentifier===l.id&&y.push(u)});y.forEach(function(u){f.forEach(function(A){A.type=== +w&&A.trackId===u.id&&h(f,A,r)})});return r};var q=!0,k=!0},{}],16:[function(a,b,c){function e(l,t,w,r,y){t=f.writeRtpDescription(l.kind,t);t+=f.writeIceParameters(l.iceGatherer.getLocalParameters());t+=f.writeDtlsParameters(l.dtlsTransport.getLocalParameters(),"offer"===w?"actpass":y||"active");t+="a=mid:"+l.mid+"\r\n";t=l.rtpSender&&l.rtpReceiver?t+"a=sendrecv\r\n":l.rtpSender?t+"a=sendonly\r\n":l.rtpReceiver?t+"a=recvonly\r\n":t+"a=inactive\r\n";l.rtpSender&&(w=l.rtpSender._initialTrackId||l.rtpSender.track.id, +l.rtpSender._initialTrackId=w,r="msid:"+(r?r.id:"-")+" "+w+"\r\n",t=t+("a="+r)+("a=ssrc:"+l.sendEncodingParameters[0].ssrc+" "+r),l.sendEncodingParameters[0].rtx&&(t+="a=ssrc:"+l.sendEncodingParameters[0].rtx.ssrc+" "+r,t+="a=ssrc-group:FID "+l.sendEncodingParameters[0].ssrc+" "+l.sendEncodingParameters[0].rtx.ssrc+"\r\n"));t+="a=ssrc:"+l.sendEncodingParameters[0].ssrc+" cname:"+f.localCName+"\r\n";l.rtpSender&&l.sendEncodingParameters[0].rtx&&(t+="a=ssrc:"+l.sendEncodingParameters[0].rtx.ssrc+" cname:"+ +f.localCName+"\r\n");return t}function d(l,t){var w=!1;l=JSON.parse(JSON.stringify(l));return l.filter(function(r){if(r&&(r.urls||r.url)){var y=r.urls||r.url;r.url&&!r.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var u="string"===typeof y;u&&(y=[y]);y=y.filter(function(A){return 0!==A.indexOf("turn:")||-1===A.indexOf("transport=udp")||-1!==A.indexOf("turn:[")||w?0===A.indexOf("stun:")&&14393<=t&&-1===A.indexOf("?transport=udp"):w=!0});delete r.url;r.urls=u?y[0]:y;return!!y.length}})} +function h(l,t){var w={codecs:[],headerExtensions:[],fecMechanisms:[]},r=function(u,A){u=parseInt(u,10);for(var m=0;mt&&m.recvEncodingParameters.forEach(function(B){delete B.rtx}), +z.encodings=m.recvEncodingParameters.length?m.recvEncodingParameters:[{}],z.rtcp={compound:m.rtcpParameters.compound},m.rtcpParameters.cname&&(z.rtcp.cname=m.rtcpParameters.cname),m.sendEncodingParameters.length&&(z.rtcp.ssrc=m.sendEncodingParameters[0].ssrc),m.rtpReceiver.receive(z))};u.prototype.setLocalDescription=function(m){var n=this;if(-1===["offer","answer"].indexOf(m.type))return Promise.reject(k("TypeError",'Unsupported type "'+m.type+'"'));if(!g("setLocalDescription",m.type,n.signalingState)|| +n._isClosed)return Promise.reject(k("InvalidStateError","Can not set local "+m.type+" in state "+n.signalingState));if("offer"===m.type){var x=f.splitSections(m.sdp);var z=x.shift();x.forEach(function(C,G){C=f.parseRtpParameters(C);n.transceivers[G].localCapabilities=C});n.transceivers.forEach(function(C,G){n._gather(C.mid,G)})}else if("answer"===m.type){x=f.splitSections(n._remoteDescription.sdp);z=x.shift();var B=0t&&(L.codecs=L.codecs.filter(function(X){return"rtx"!==X.name}));Z=N.sendEncodingParameters||[{ssrc:1001*(2*J+2)}];oa=!1;if("sendrecv"===P||"sendonly"===P){oa=!N.rtpReceiver;var ha=N.rtpReceiver|| +new l.RTCRtpReceiver(N.dtlsTransport,U);if(oa){P=ha.track;if(!W||"-"!==W.stream)if(W){x[W.stream]||(x[W.stream]=new l.MediaStream,Object.defineProperty(x[W.stream],"id",{get:function(){return W.stream}}));Object.defineProperty(P,"id",{get:function(){return W.track}});var ja=x[W.stream]}else x.default||(x.default=new l.MediaStream),ja=x.default;ja&&(w(P,ja),N.associatedRemoteMediaStreams.push(ja));z.push([P,ha,ja])}}else N.rtpReceiver&&N.rtpReceiver.track&&(N.associatedRemoteMediaStreams.forEach(function(X){var Fa= +X.getTracks().find(function(Xb){return Xb.id===N.rtpReceiver.track.id});Fa&&r(Fa,X)}),N.associatedRemoteMediaStreams=[]);N.localCapabilities=L;N.remoteCapabilities=Ba;N.rtpReceiver=ha;N.rtcpParameters=Da;N.sendEncodingParameters=Z;N.recvEncodingParameters=la;n._transceive(n.transceivers[J],!1,oa)}}});void 0===n._dtlsRole&&(n._dtlsRole="offer"===m.type?"active":"passive");n._remoteDescription={type:m.type,sdp:m.sdp};"offer"===m.type?n._updateSignalingState("have-remote-offer"):n._updateSignalingState("stable"); +Object.keys(x).forEach(function(L){var J=x[L];if(J.getTracks().length){if(-1===n.remoteStreams.indexOf(J)){n.remoteStreams.push(J);var P=new Event("addstream");P.stream=J;l.setTimeout(function(){n._dispatchEvent("addstream",P)})}z.forEach(function(U){J.id===U[2].id&&y(n,U[0],U[1],[J])})}});z.forEach(function(L){L[2]||y(n,L[0],L[1],[])});l.setTimeout(function(){n&&n.transceivers&&n.transceivers.forEach(function(L){L.iceTransport&&"new"===L.iceTransport.state&&0x&&(C.wantReceive=!1)):"video"===C.kind&&(z--,0>z&&(C.wantReceive=!1))});0t&&(L.codecs=L.codecs.filter(function(J){return"rtx"!==J.name}));L.codecs.forEach(function(J){"H264"===J.name&&void 0===J.parameters["level-asymmetry-allowed"]&&(J.parameters["level-asymmetry-allowed"]="1");C.remoteCapabilities&&C.remoteCapabilities.codecs&&C.remoteCapabilities.codecs.forEach(function(P){J.name.toLowerCase()===P.name.toLowerCase()&&J.clockRate===P.clockRate&&(J.preferredPayloadType=P.payloadType)})}); +L.headerExtensions.forEach(function(J){(C.remoteCapabilities&&C.remoteCapabilities.headerExtensions||[]).forEach(function(P){J.uri===P.uri&&(J.id=P.id)})});G=C.sendEncodingParameters||[{ssrc:1001*(2*G+1)}];M&&15019<=t&&"video"===Y&&!G[0].rtx&&(G[0].rtx={ssrc:G[0].ssrc+1});C.wantReceive&&(C.rtpReceiver=new l.RTCRtpReceiver(C.dtlsTransport,Y));C.localCapabilities=L;C.sendEncodingParameters=G});"max-compat"!==n._config.bundlePolicy&&(B+="a=group:BUNDLE "+n.transceivers.map(function(C){return C.mid}).join(" ")+ +"\r\n");B+="a=ice-options:trickle\r\n";n.transceivers.forEach(function(C,G){B+=e(C,C.localCapabilities,"offer",C.stream,n._dtlsRole);B+="a=rtcp-rsize\r\n";!C.iceGatherer||"new"===n.iceGatheringState||0!==G&&n.usingBundle||(C.iceGatherer.getLocalCandidates().forEach(function(M){M.component=1;B+="a="+f.writeCandidate(M)+"\r\n"}),"completed"===C.iceGatherer.state&&(B+="a=end-of-candidates\r\n"))});m=new l.RTCSessionDescription({type:"offer",sdp:B});return Promise.resolve(m)};u.prototype.createAnswer= +function(){var m=this;if(m._isClosed)return Promise.reject(k("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==m.signalingState&&"have-local-pranswer"!==m.signalingState)return Promise.reject(k("InvalidStateError","Can not call createAnswer in signalingState "+m.signalingState));var n=f.writeSessionBoilerplate(m._sdpSessionId,m._sdpSessionVersion++);m.usingBundle&&(n+="a=group:BUNDLE "+m.transceivers.map(function(B){return B.mid}).join(" ")+"\r\n");n+="a=ice-options:trickle\r\n"; +var x=f.getMediaSections(m._remoteDescription.sdp).length;m.transceivers.forEach(function(B,C){if(!(C+1>x))if(B.rejected)"application"===B.kind?n="DTLS/SCTP"===B.protocol?n+"m=application 0 DTLS/SCTP 5000\r\n":n+("m=application 0 "+B.protocol+" webrtc-datachannel\r\n"):"audio"===B.kind?n+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===B.kind&&(n+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),n+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+B.mid+"\r\n";else{if(B.stream){var G; +"audio"===B.kind?G=B.stream.getAudioTracks()[0]:"video"===B.kind&&(G=B.stream.getVideoTracks()[0]);G&&15019<=t&&"video"===B.kind&&!B.sendEncodingParameters[0].rtx&&(B.sendEncodingParameters[0].rtx={ssrc:B.sendEncodingParameters[0].ssrc+1})}C=h(B.localCapabilities,B.remoteCapabilities);!C.codecs.filter(function(M){return"rtx"===M.name.toLowerCase()}).length&&B.sendEncodingParameters[0].rtx&&delete B.sendEncodingParameters[0].rtx;n+=e(B,C,"answer",B.stream,m._dtlsRole);B.rtcpParameters&&B.rtcpParameters.reducedSize&& +(n+="a=rtcp-rsize\r\n")}});var z=new l.RTCSessionDescription({type:"answer",sdp:n});return Promise.resolve(z)};u.prototype.addIceCandidate=function(m){var n=this,x;return m&&void 0===m.sdpMLineIndex&&!m.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise(function(z,B){if(n._remoteDescription)if(m&&""!==m.candidate){var C=m.sdpMLineIndex;if(m.sdpMid)for(var G=0;Gq&&(q=k.maxptime)});0d[h].length||"="!==d[h].charAt(1))return!1;return!0};"object"===typeof b&&(b.exports=e)},{}]},{},[1])(1)});class Yb{constructor(a){this.FrameDisplayDeltaTimeMs=this.BrowserReceiptTimeMs=this.UETransmissionTimeMs= +this.UECaptureToSendMs=this.UEEncodeMs=this.UEReceiptTimeMs=this.TestStartTimeMs=null;this.onReady=a}reset(){this.FrameDisplayDeltaTimeMs=this.BrowserReceiptTimeMs=this.UETransmissionTimeMs=this.UEEncodeMs=this.UECaptureToSendMs=this.UEReceiptTimeMs=this.TestStartTimeMs=null}start(){this.reset();this.TestStartTimeMs=Date.now();if(this.onReady)this.onReady()}setUETimings(a){this.UEReceiptTimeMs=a.ReceiptTimeMs;this.UEEncodeMs=a.EncodeMs;this.UECaptureToSendMs=a.CaptureToSendMs;this.UETransmissionTimeMs= +a.TransmissionTimeMs;this.BrowserReceiptTimeMs=Date.now();this.latencyTimingsReady()}setFrameDisplayDeltaTime(a){null==this.FrameDisplayDeltaTimeMs&&(this.FrameDisplayDeltaTimeMs=Math.round(a),this.latencyTimingsReady())}latencyTimingsReady(){if(this.BrowserReceiptTimeMs){var a=this.BrowserReceiptTimeMs-this.TestStartTimeMs,b=this.UECaptureToSendMs,c=this.UETransmissionTimeMs-this.UEReceiptTimeMs,e=a-c,d={latencyExcludingDecode:a,encodeLatency:this.UEEncodeMs.toFixed(1),uePixelStreamLatency:b.toFixed(1), +ueTestDuration:c.toFixed(1),networkLatency:e.toFixed(1)};this.FrameDisplayDeltaTimeMs&&this.BrowserReceiptTimeMs&&(d.endToEndLatency=this.FrameDisplayDeltaTimeMs+e+("string"===typeof b?0:b),d.browserSideLatency=this.FrameDisplayDeltaTimeMs+(a-e-c),d.endToEndLatency=d.endToEndLatency.toFixed(1),d.browserSideLatency=d.browserSideLatency.toFixed(1));if(this.onReady)this.onReady(d)}}}class Zb{constructor(a){this.useStats=a.useStats;this.events=a.events;this.webRtcConfig=a.peerConnectionOptions||{};this.webRtcConfig.sdpSemantics= +"unified-plan";this.tnClient=this.dcClient=this.pcClient=null;this.sdpConstraints={offerToReceiveAudio:0,offerToReceiveVideo:1,voiceActivityDetection:!1};this.dataChannelOptions={ordered:!0};this.lastStats={};this.playerId=0;this.latencyTestTimings=new Yb(this.events.onLatencyTimingsReady);this._bSendingAPI=!1;this._apiSendingQueue=[]}setVideo(a){this.video=a}logStartupInfo(a){if(this.events.onlog)this.events.onlog(a)}setupPeerConnection(){this.pcClient||(this.pcClient=new RTCPeerConnection(this.webRtcConfig), +this.pcClient.addTransceiver("video",{direction:"recvonly"}),this.pcClient.onsignalingstatechange=a=>this.onStateChanged(a),this.pcClient.oniceconnectionstatechange=a=>this.onStateChanged(a),this.pcClient.onicegatheringstatechange=a=>this.onStateChanged(a),this.pcClient.ontrack=a=>this.events.ontrack(a),this.pcClient.onicecandidate=a=>this.events.onicecandidate(a),this.pcClient.ondatachannel=a=>{this.dcClient=a.channel;this.setupDataChannelCallbacks()})}close(){this.dcClient&&"open"==this.dcClient.readyState&& +(this.dcClient.close(),this.dcClient=null);this.pcClient&&(this.pcClient.close(),this.pcClient=null);this.clearStatsTimer()}setupDataChannelCallbacks(){this.dcClient.binaryType="arraybuffer";this.dcClient.onopen=a=>{this.isDatachannelOpened=!0;if(this.events&&this.events.ondatachannelopen)this.events.ondatachannelopen(a);this.logStartupInfo("video: loading...")};this.dcClient.onclose=a=>{this.isDatachannelOpened=!1;this.clearStatsTimer();if(this.events&&this.events.ondatachannelclose)this.events.ondatachannelclose(a)}; +this.dcClient.onerror=a=>{this.isDatachannelOpened=!1;this.logStartupInfo("channel error");if(this.events&&this.events.ondatachannelerror)this.events.ondatachannelerror(a)};this.dcClient.onmessage=a=>this.onDatachannelMessage(a)}createOffer(){this.close();this.setupPeerConnection();try{this.dcClient=this.pcClient.createDataChannel("cirrus",this.dataChannelOptions),this.setupDataChannelCallbacks(),this.logStartupInfo("channel created")}catch(a){this.logStartupInfo("no channel"),this.dcClient=null}this.pcClient.createOffer(this.sdpConstraints).then(a=> +{a.sdp=a.sdp.replace("useinbandfec=1","useinbandfec=1;stereo=1;sprop-maxcapturerate=48000");this.pcClient.setLocalDescription(a);this.events.onOfferCreated(a)},()=>{this.logStartupInfo("couldn't create offer")})}onReceiveOffer(a){a=new RTCSessionDescription(a);this.setupPeerConnection();this.pcClient.setRemoteDescription(a).then(()=>{this.pcClient.createAnswer().then(b=>this.pcClient.setLocalDescription(b)).then(()=>{if(this.events.onAnswerCreated)this.events.onAnswerCreated(this.pcClient.currentLocalDescription)}).then(()=> +{let b=this.pcClient.getReceivers();for(let c of b)c.playoutDelayHint=0}).catch(b=>console.error("createAnswer() failed:",b))});this.setupLiveStats()}onIceCandidate(a){a=new RTCIceCandidate(a);this.pcClient.addIceCandidate(a).then(b=>{this.logStartupInfo("candidate added")})}onReceiveAnswer(a){this.playerId=a.playerId;this.logStartupInfo(`received answer: ${this.playerId}`);a=new RTCSessionDescription(a);this.pcClient.setRemoteDescription(a);a=this.pcClient.getReceivers();for(let b of a)b.playoutDelayHint= +0;this.setupLiveStats()}setupLiveStats(){this.clearStatsTimer();this.useStats&&!this.aggregateStatsIntervalId&&(this.aggregateStatsIntervalId=setInterval(()=>{this.pcClient&&this.pcClient.getStats(null).then(a=>this.processLiveStats(a))},1E3))}onStateChanged(a){this.signalingState!=this.pcClient.signalingState&&(this.signalingState=this.pcClient.signalingState,this.logStartupInfo(`__signaling: ${this.signalingState}`));this.iceConnectionState!=this.pcClient.iceConnectionState&&(this.iceConnectionState= +this.pcClient.iceConnectionState,this.logStartupInfo(`__ice_connection: ${this.iceConnectionState}`),"disconnected"!=this.iceConnectionState||this.isDatachannelOpened||this.logStartupInfo("\u8fde\u63a5\u5efa\u7acb\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u670d\u52a1\u5668\u7aef\u53e3\u8bbe\u7f6e"),"failed"!=this.iceConnectionState||this.isDatachannelOpened||this.logStartupInfo("\u8fde\u63a5\u5efa\u7acb\u5931\u8d25\uff0c\u65e0\u53ef\u7528\u7684\u5019\u9009\u8fde\u63a5"));this.iceGatheringState!=this.pcClient.iceGatheringState&& +(this.iceGatheringState=this.pcClient.iceGatheringState,this.logStartupInfo(`__ice_gathering: ${this.iceGatheringState}`))}clearStatsTimer(){this.aggregateStatsIntervalId&&(clearInterval(this.aggregateStatsIntervalId),this.aggregateStatsIntervalId=void 0)}send(a){return this.dcClient&&"open"==this.dcClient.readyState?(this.dcClient.send(a),!0):!1}requestInitialSettings(){this.send((new Uint8Array([7])).buffer)}requestQualityControl(){this.send((new Uint8Array([1])).buffer)}sendEnableIntervalSendQP(a){this.send((new Uint8Array([11, +a?1:0])).buffer)}_continueSendAPI(){if(0d){this.numOfEventCalls=0;let g=Math.ceil(c/d),q=[];for(var h=0;h{for(t=this.dcClient.bufferedAmount;kthis._continueSendAPI(),100);else if(t>l)break}},l=Math.max(8*e,1048576);this.dcClient.bufferedAmountLowThreshold=e;this.dcClient.onbufferedamountlow=t=>{this.numOfEventCalls++;f()};console.log(`sending api(command: ${a.command}) slices, count: ${g}`);f()}else{e=new DataView(new ArrayBuffer(4+2*c));d=0;e.setUint8(d,52);d++;e.setUint8(d,0);d++;e.setUint16(d,c,!0);d+=2;for(h=0;h{"inbound-rtp"!=c.type||c.isRemote||"video"!=c.mediaType&&!c.id.toLowerCase().includes("video")||(b.timestamp=c.timestamp,b.timestampStart=this.lastStats&&this.lastStats.timestampStart?this.lastStats.timestampStart:c.timestamp,b.bytesReceived=c.bytesReceived,b.packetsLost= +c.packetsLost,b.framesDropped=c.framesDropped,b.framesPerSecond=c.framesPerSecond,b.framesReceived=c.framesReceived,b.framesDecoded=c.framesDecoded,b.keyFramesDecoded=c.keyFramesDecoded,b.frameWidth=c.frameWidth,b.frameHeight=c.frameHeight,this.lastStats&&(b.bitrate=8*(b.bytesReceived-this.lastStats.bytesReceived)/(b.timestamp-this.lastStats.timestamp)));"track"==c.type&&c.frameWidth&&(c.framesDropped&&(b.framesDropped=c.framesDropped),c.framesReceived&&(b.framesReceived=c.framesReceived),b.frameWidth= +c.frameWidth,b.frameHeight=c.frameHeight);"candidate-pair"==c.type&&c.hasOwnProperty("currentRoundTripTime")&&0!=c.currentRoundTripTime&&(b.currentRoundTripTime=c.currentRoundTripTime)});this.lastStats.receiveToCompositeMs&&(b.receiveToCompositeMs=this.lastStats.receiveToCompositeMs,this.latencyTestTimings.setFrameDisplayDeltaTime(this.lastStats.receiveToCompositeMs));this.lastStats=b;this.events.onstats(this.lastStats)}onDatachannelMessage(a){var b=new Uint8Array(a.data);switch(b[0]){case 0:this.events.ondatachannelmessage("QualityControlOwnership", +1==b[1]);break;case 1:if((a=(new TextDecoder("utf-16")).decode(a.data.slice(1)))&&""!=a)this.events.ondatachannelmessage("ResponseAPI",a);break;case 101:b=b[1];a=(new TextDecoder("utf-8")).decode(a.data.slice(2));switch(b){case 0:this.events.ondatachannelmessage("ResponseAPI",a);break;case 1:this.reponse_api_json_string=a;break;case 2:this.reponse_api_json_string+=a;break;case 3:this.reponse_api_json_string+=a,this.events.ondatachannelmessage("ResponseAPI",this.reponse_api_json_string)}break;case 6:a= +(new TextDecoder("utf-16")).decode(a.data.slice(1));a=JSON.parse(a);this.latencyTestTimings.setUETimings(a);break;case 7:a=(new TextDecoder("utf-16")).decode(a.data.slice(1));a=JSON.parse(a);if(a.Encoder)this.events.ondatachannelmessage("InitialSettings",a);break;case 5:this.events.ondatachannelmessage("VideoEncoderAvgQP",a)}}startLatencyTest(){this.video&&(this.latencyTestTimings.start(),this.sendDescriptor(6,{StartTime:this.latencyTestTimings.TestStartTimeMs}))}}class ia{constructor(a){this.player= +a;this.uid=a.uid;this.container=a.container}appendElement(a){this.container.appendChild(a);this.setNeedReposUI()}removeElement(a){this.container.removeChild(a)}get(a){return wa(a+"_"+this.uid)}getValue(a){let b;return null==(b=this.get(a))?void 0:b.value}setValue(a,b){(a=this.get(a))&&(a.value=b)}setText(a,b){(a=this.get(a))&&(a.innerText=b)}setHtml(a,b){(a=this.get(a))&&(a.innerHTML=b)}resize(){this.player.resize()}setNeedReposUI(){this.player.bNeedReposUI=!0}}class $b extends ia{constructor(a){super(a); +this.el=document.createElement("pre");this.el.id=`eventsPanel_${this.uid}`;this.el.className="__eventsPanel";this.el.oncontextmenu=new Function("return false");this.el.onselectstart=new Function("return false");this.appendElement(this.el)}destroy(){this.el&&(this.removeElement(this.el),this.el=null)}appendText(a){if(this.el){let b=this.el.innerText;b+=a+"\n";this.el.innerText=b;this.el.scrollTop=this.el.scrollHeight+100}}setPosition(a){a||(a=this.container.getBoundingClientRect());this.el&&(this.el.style.width= +`${a.width}px`)}}class ca{}ca.Information='';ca.FullScreenEnter= +''; +ca.FullScreenExit=''; +ca.InitialCamera=''; +class ac extends ia{constructor(a){super(a);this.create()}create(){if(!this.el){this.el=document.createElement("button");this.el.id=`fullscreeButton_${this.uid}`;this.el.className="__fullscreeButton";if(R.isIOSDevice||R.isSafari)this.el.style.backgroundSize="cover";this.el.innerHTML=ca.FullScreenEnter;this.el.title=H.getString("EnterFullscreen");this.el.oncontextmenu=new Function("return false");this.el.onselectstart=new Function("return false");this.el.onclick=()=>this.player.fullscreen=!this.player.fullscreen; +this.el.onmousedown=a=>{1==a.button&&a.preventDefault()};this.appendElement(this.el);document.addEventListener("fullscreenchange",()=>{this.el.title=H.getString("ExitFullscreen");this.el.innerHTML=R.isFullscreen()?ca.FullScreenExit:ca.FullScreenEnter;this.player.resize()})}}destroy(){this.el&&(this.removeElement(this.el),this.el=null)}setPosition(a,b){a||(a=this.container.getBoundingClientRect());this.el&&(this.el.style.left=`${b?38:5}px`,this.el.style.top=`${a.height-32}px`)}}const ea={BackSpace:8, +Shift:16,Control:17,Alt:18,RightShift:253,RightControl:254,RightAlt:255};class bc extends ia{constructor(a,b){super(a);this.video=null;this.useBuiltinCursors=b.useBuiltinCursors;this.keyEventTargetStr=b.keyEventTarget;this.keyEventTarget="document"==b.keyEventTarget?document:"none"==b.keyEventTarget?null:"video";this.callOnUserInteraction=()=>this.player.resetInteractTimestamp();this.fakeMouseWithTouches=!1;this.onMButtonDoubleClick=b.onMButtonDoubleClick;this.mouseKeyListener=b.mouseKeyListener; +this.onActionEnable=!0;this.onEvents=b.onEvents;this.onVideoLoaded=b.onVideoLoaded;document.addEventListener("WeixinJSBridgeReady",()=>{R.isInWeixinBrowser=!0;this.video.play()});this.create()}isVideoLoaded(){return!!this._isVideoLoaded}create(){this.video&&this.destroy();this.video||(this.video=document.createElement("video"),this.video.id=`streamingVideo_${this.uid}`,this.video.style="position:absolute;",this.video.playsInline=!0,this.video.muted=!0,this.video.autoplay=!0,this.video.disablepictureinpicture= +!0,"video"===this.keyEventTarget&&(this.video.tabIndex=1,this.keyEventTarget=this.video),this.appendElement(this.video),this.player.logStartupInfo("video element created"),this._isVideoLoaded=!1,this.video.addEventListener("loadedmetadata",()=>{this._isVideoLoaded=!0;this.video.onmouseenter({button:0,x:0,y:0});this.onVideoLoaded()},!0),this.setCursor());if("requestVideoFrameCallback"in HTMLVideoElement.prototype){const a=(b,c)=>{c.receiveTime&&c.expectedDisplayTime&&(this.rtc.lastStats.receiveToCompositeMs= +c.presentationTime-c.receiveTime);this.video&&this.video.requestVideoFrameCallback(a)};this.video.requestVideoFrameCallback(a)}}setWebRtcPlayer(a){(!this.video||R.isAndroidDevice||R.isIOSDevice&&!R.isInWeixinBrowser)&&this.create();this.rtc=a;this.rtc.setVideo(this.video)}setActionEventEnabled(a){this.onActionEnable=a}destroy(){this.video&&(this.removeElement(this.video),this.video=null)}valid(){return!!this.video}videoWidth(){let a;return null==(a=this.video)?void 0:a.videoWidth}videoHeight(){let a; +return null==(a=this.video)?void 0:a.videoHeight}clientWidth(){let a;return null==(a=this.video)?void 0:a.clientWidth}clientHeight(){let a;return null==(a=this.video)?void 0:a.clientHeight}setTrack(a){let b=a.streams[0];this.player.logStartupInfo("track: "+a.track.kind);"audio"==a.track.kind?(a=document.createElement("Audio"),a.autoplay=!0,a.srcObject=b,a.play(),this.player.logStartupInfo("audio element created")):"video"==a.track.kind&&this.video.srcObject!==b&&(this.video.srcObject=b)}setKeyEventTarget(a){this.keyEventTargetStr!= +a&&(this.clearKeyboardEvents(),"video"==a?(this.video&&(this.video.tabIndex=1),this.keyEventTarget=this.video,this.video.focus()):"document"==a?(this.keyEventTarget=document,this.video.focus()):this.keyEventTarget&&(this.keyEventTarget=null),this.keyEventTargetStr=a,this.registerKeyboardEvents())}clearKeyboardEvents(){this.keyEventTarget&&(this.keyEventTarget.onkeydown=null,this.keyEventTarget.onkeyup=null,this.keyEventTarget.onkeypress=null)}registerKeyboardEvents(){this.keyEventTarget&&(this.keyEventTarget.onkeydown= +a=>{112<=a.keyCode&&123>=a.keyCode||a.ctrlKey||this.sendKeydown(a);if(a.keyCode===ea.BackSpace)this.keyEventTarget.onkeypress({charCode:ea.BackSpace});this.callActionEventHander(5,a)},this.keyEventTarget.onkeyup=a=>{112<=a.keyCode&&123>=a.keyCode||a.ctrlKey||this.sendKeyup(a);this.callActionEventHander(6,a)},this.keyEventTarget.onkeypress=a=>{112<=a.keyCode&&123>=a.keyCode||this.sendKeypress(a);this.callActionEventHander(7,a)})}setCursor(){if(this.video)if(this.useBuiltinCursors)switch(this.mouseDownButton){case 0:this.video.setAttribute("class", +"streamingVideoCursorPan");break;case 1:this.video.setAttribute("class","streamingVideoCursorMove");break;case 2:this.video.setAttribute("class","streamingVideoCursorRotate");break;default:this.video.setAttribute("class","streamingVideoCursorPointer")}else this.video.setAttribute("class","streamingVideoNoCursor")}callActionEventHander(a,b){if(this.mouseKeyListener&&this.onActionEnable)switch(a){case 0:if(R.isFunction(this.mouseKeyListener.onMouseEnter))this.mouseKeyListener.onMouseEnter(b);break; +case 1:if(R.isFunction(this.mouseKeyListener.onMouseLeave))this.mouseKeyListener.onMouseLeave(b);break;case 2:if(R.isFunction(this.mouseKeyListener.onMouseMove))this.mouseKeyListener.onMouseMove(b);break;case 3:if(R.isFunction(this.mouseKeyListener.onMouseDown))this.mouseKeyListener.onMouseDown(b);break;case 4:if(R.isFunction(this.mouseKeyListener.onMouseUp))this.mouseKeyListener.onMouseUp(b);break;case 5:if(R.isFunction(this.mouseKeyListener.onKeyDown))this.mouseKeyListener.onKeyDown(b);break;case 6:if(R.isFunction(this.mouseKeyListener.onKeyUp))this.mouseKeyListener.onKeyUp(b); +break;case 7:if(R.isFunction(this.mouseKeyListener.onKeyPress))this.mouseKeyListener.onKeyPress(b)}}isMiddleDoubleClick(a){if(1==a.button){if(this.lastMClickTimestamp&&200>a.timeStamp-this.lastMClickTimestamp)return!0;this.lastMClickTimestamp=a.timeStamp}else this.lastMClickTimestamp=void 0;return!1}registerMouseEvents(){this.video.onmouseenter=a=>{this.sendMouseEnter();a.buttons&1&&this.sendMouseDown(0,a.offsetX,a.offsetY);a.buttons&2&&this.sendMouseDown(2,a.offsetX,a.offsetY);a.buttons&4&&this.sendMouseDown(1, +a.offsetX,a.offsetY);a.buttons&8&&this.sendMouseDown(3,a.offsetX,a.offsetY);a.buttons&16&&this.sendMouseDown(4,a.offsetX,a.offsetY);this.callActionEventHander(0,a)};this.video.onmouseleave=a=>{this.sendMouseLeave();a.buttons&1&&this.sendMouseUp(0,a.offsetX,a.offsetY);a.buttons&2&&this.sendMouseUp(2,a.offsetX,a.offsetY);a.buttons&4&&this.sendMouseUp(1,a.offsetX,a.offsetY);a.buttons&8&&this.sendMouseUp(3,a.offsetX,a.offsetYy);a.buttons&16&&this.sendMouseUp(4,a.offsetX,a.offsetY);this.callActionEventHander(1, +a)};this.video.onmousemove=a=>{this.sendMouseMove(a.offsetX,a.offsetY,a.movementX,a.movementY);a.preventDefault();if(0==this.mouseDownButton||2==this.mouseDownButton)this.setCursor(),this.mouseDownButton=void 0;this.callActionEventHander(2,a)};this.video.onmousedown=a=>{this.keyEventTarget==this.video&&this.video.focus();this.sendMouseEnter();this.isMiddleDoubleClick(a)&&this.onMButtonDoubleClick?(this.onMButtonDoubleClick(a.offsetX,a.offsetY),a.preventDefault()):(this.mouseDownButton=a.button,this.sendMouseDown(a.button, +a.offsetX,a.offsetY),a.preventDefault(),0!=a.button&&2!=a.button&&this.setCursor(),this.callActionEventHander(3,a))};this.video.onmouseup=a=>{this.mouseDownButton=void 0;this.sendMouseUp(a.button,a.offsetX,a.offsetY);a.preventDefault();this.setCursor();this.callActionEventHander(4,a)};this.video.oncontextmenu=a=>{a.preventDefault()};"onmousewheel"in this.video?this.video.addEventListener("mousewheel",a=>{this.sendMouseWheel(a.wheelDelta,a.offsetX,a.offsetY);a.preventDefault()},{passive:!1}):this.video.addEventListener("DOMMouseScroll", +a=>{this.sendMouseWheel(-120*a.detail,a.offsetX,a.offsetY);a.preventDefault()},!1)}registerTouchEvents(){this.ongoingTouches=[];this.copyTouch=({identifier:b,clientX:c,clientY:e,force:d})=>({identifier:b,clientX:c,clientY:e,force:d});this.ongoingTouchIndexById=b=>{for(let c=0;c{let c=this.container.getBoundingClientRect(); +if(void 0===a){let e=b.changedTouches[0];a={id:e.identifier,x:e.clientX-c.left,y:e.clientY-c.top};this.video.onmouseenter(b);this.sendMouseDown(0,a.x,a.y)}b.preventDefault()},{passive:!1});this.video.addEventListener("touchend",b=>{let c=this.container.getBoundingClientRect();for(let e=0;e{var c=this.container.getBoundingClientRect();for(var e=0;e{b.preventDefault();null==this||this.onEvents(`ongoingTouches: ${this.ongoingTouches.length}, touches: ${b.touches.length}, changedTouches: ${b.changedTouches.length}`);this.ongoingTouches.length>b.touches.length- +b.changedTouches.length&&(this.onEvents&&this.onEvents(H.getString("TriggerSysTouch")),this.sendTouch(81,this.ongoingTouches),this.ongoingTouches=[]);b=b.changedTouches;for(let c=0;c{b.preventDefault();b=b.changedTouches;this.sendTouch(81,b);for(let c=0;c{b.preventDefault();this.sendTouch(82,b.touches)},{passive:!1})}resize(a){this.playerAspectRatio=this.container.clientHeight/this.container.clientWidth;this.videoAspectRatio=a?this.playerAspectRatio:this.videoHeight()/this.videoWidth()}normalizeAndQuantizeUnsigned(a,b){if(this.playerAspectRatio>this.videoAspectRatio){let c=this.playerAspectRatio/this.videoAspectRatio;a/=this.container.clientWidth;b=c*(b/this.container.clientHeight-.5)+.5}else a=this.videoAspectRatio/ +this.playerAspectRatio*(a/this.container.clientWidth-.5)+.5,b/=this.container.clientHeight;return 0>a||1b||1this.videoAspectRatio){let c=this.playerAspectRatio/this.videoAspectRatio;a/=.5*this.container.clientWidth;b=c*b/(.5*this.container.clientHeight);return{x:32767*a,y:32767*b}}return{x:this.videoAspectRatio/this.playerAspectRatio*a/(.5*this.container.clientWidth)*32767, +y:b/(.5*this.container.clientHeight)*32767}}sendTouch(a,b){this.callOnUserInteraction();var c=new DataView(new ArrayBuffer(2+10*b.length));c.setUint8(0,a);c.setUint8(1,b.length);let e=2,d=[];for(let h=0;hl?null==this||this.onEvents("can't figure out which touch to continue"):(c.setUint16(e,f.x,!0),e+=2,c.setUint16(e,f.y, +!0),e+=2,c.setInt32(e,l,!0),e+=4,c.setUint8(e,255*g.force,!0),e+=1,c.setUint8(e,f.inRange?1:0,!0),e+=1,this.onEvents&&d.push(`{${l} (${parseInt(q)},${parseInt(k)})->(${parseInt(f.x)},${parseInt(f.y)}) ${255*g.force} ${f.inRange?1:0}}`))}this.rtc.send(c.buffer);this.onEvents&&(c="",80==a?c="start":82==a?c="move":81==a&&(c="end"),a=`[${c}] N${b.length} ${d.join(",")}}`,this.onEvents(a))}sendKeydown(a){this.callOnUserInteraction();let b=xa(a),c;null==(c=this.onEvents)||c.call(this,`Send KeyDown, Code:${b}, Repeat:${a.repeat}`); +this.rtc.send((new Uint8Array([60,b,a.repeat])).buffer)}sendKeyup(a){this.callOnUserInteraction();a=xa(a);let b;null==(b=this.onEvents)||b.call(this,`Send KeyUp:${a}`);this.rtc.send((new Uint8Array([61,a])).buffer)}sendKeypress(a){this.callOnUserInteraction();var b;null==(b=this.onEvents)||b.call(this,`Send KeyPress:${a.charCode}`);b=new DataView(new ArrayBuffer(3));b.setUint8(0,62);b.setUint16(1,a.charCode,!0);this.rtc.send(b.buffer)}sendMouseEnter(){this.callOnUserInteraction();var a;null==(a=this.onEvents)|| +a.call(this,"Send MouseEnter");a=new DataView(new ArrayBuffer(1));a.setUint8(0,70);this.rtc.send(a.buffer)}sendMouseLeave(){this.callOnUserInteraction();var a;null==(a=this.onEvents)||a.call(this,"Send MouseLeave");a=new DataView(new ArrayBuffer(1));a.setUint8(0,71);this.rtc.send(a.buffer)}sendMouseMove(a,b,c,e){this.callOnUserInteraction();if(this.normalizeAndQuantizeUnsigned){var d;null==(d=this.onEvents)||d.call(this,`Send MouseMove, X:${a}, Y:${b}, DeltaX:${c}, DeltaY:${e}`);a=this.normalizeAndQuantizeUnsigned(a, +b);c=this.normalizeAndQuantizeSigned(c,e);e=new DataView(new ArrayBuffer(9));e.setUint8(0,74);e.setUint16(1,a.x,!0);e.setUint16(3,a.y,!0);e.setInt16(5,c.x,!0);e.setInt16(7,c.y,!0);this.rtc.send(e.buffer)}}sendMouseDown(a,b,c){this.callOnUserInteraction();if(this.normalizeAndQuantizeUnsigned){var e;null==(e=this.onEvents)||e.call(this,`Send MouseDown, Button:${a}, X:${b}, Y:${c}`);b=this.normalizeAndQuantizeUnsigned(b,c);c=new DataView(new ArrayBuffer(6));c.setUint8(0,72);c.setUint8(1,a);c.setUint16(2, +b.x,!0);c.setUint16(4,b.y,!0);this.rtc.send(c.buffer)}}sendMouseUp(a,b,c){if(this.normalizeAndQuantizeUnsigned){var e;null==(e=this.onEvents)||e.call(this,`Send MouseUp, Button:${a}, X:${b}, Y:${c}`);b=this.normalizeAndQuantizeUnsigned(b,c);c=new DataView(new ArrayBuffer(6));c.setUint8(0,73);c.setUint8(1,a);c.setUint16(2,b.x,!0);c.setUint16(4,b.y,!0);this.rtc.send(c.buffer)}}sendMouseWheel(a,b,c){this.callOnUserInteraction();if(this.normalizeAndQuantizeUnsigned){var e;null==(e=this.onEvents)||e.call(this, +`Send MouseWheel, Delta:${a}, X:${b}, Y:${c}`);b=this.normalizeAndQuantizeUnsigned(b,c);c=new DataView(new ArrayBuffer(7));c.setUint8(0,75);c.setInt16(1,a,!0);c.setUint16(3,b.x,!0);c.setUint16(5,b.y,!0);this.rtc.send(c.buffer)}}}class cc extends ia{constructor(a,b,c){super(a);this.updateConnectionCount(b);this.createButton(c)}createButton(a){if(!this.elButton){this.elButton=document.createElement("button");this.elButton.id=`liveStatusSwitchButton_${this.uid}`;this.elButton.innerHTML=ca.Information; +this.elButton.title=a;this.elButton.className="__liveStatusSwitchButton";if(R.isIOSDevice||R.isSafari)this.elButton.style.backgroundSize="cover";this.elButton.oncontextmenu=new Function("return false");this.elButton.onselectstart=new Function("return false");this.elButton.onclick=()=>this.setPanelVisible();this.elButton.onmousedown=b=>{1==b.button&&b.preventDefault()};this.appendElement(this.elButton)}}createPanel(){if(!this.elPanel){var a=''+ +``+``+``+ +``+``+``+``+ +``+``+``+ +``+``+``+"
${H.getString("ConnInfo")}1-1${H.getString("Close")}
${H.getString("Duration")}00:00:00
${H.getString("Resolution")}1920 x 1080
${H.getString("Received")}0 kB
${H.getString("ReceivedFrames")}0
${H.getString("Dropped")}0 / 0
${H.getString("DecodingTime")}
${H.getString("DecodeFrames")}0 / 0
${H.getString("Bitrate")}-
${H.getString("FPS")}- / -
${H.getString("QP")}0
${H.getString("MaxQP")}
${H.getString("MaxBitrate")}
"; +this.elPanel=document.createElement("div");this.elPanel.innerHTML=a;this.elPanel.id=`liveStatusPanel_${this.uid}`;this.elPanel.className="__liveStatusPanel __fadeinComp";this.elPanel.oncontextmenu=new Function("return false");this.elPanel.onselectstart=new Function("return false");this.appendElement(this.elPanel);this.get("i_hide_panel").onclick=()=>this.setPanelVisible();for(a=29;40>=a;a++)this.get("i_settings_maxQP").add(new Option(a,a));this.get("i_settings_maxQP").onchange=()=>{let b={encodeMaxQP:this.getValue("i_settings_maxQP")}; +this.player.rtc.updateParams(b);this.player.signallingConnection.updateParams(b);this.get("i_settings_maxQP").blur()};for(a=10;100>=a;a+=5)this.get("i_settings_maxBitrate").add(new Option(a,a));this.get("i_settings_maxBitrate").onchange=()=>{let b={maxBitrate:this.getValue("i_settings_maxBitrate")};this.player.rtc.updateParams(b);this.player.signallingConnection.updateParams(b);this.get("i_settings_maxBitrate").blur()}}}setPosition(a){a||(a=this.container.getBoundingClientRect());this.elButton&&(this.elButton.style.top= +`${a.height-32}px`);if(this.elPanel)if(this.customPosX&&this.customPosY)this.elPanel.style.left=this.customPosX+"px",this.elPanel.style.top=this.customPosY+"px";else{let b=this.elPanel.getBoundingClientRect();this.elPanel.style.left="5px";this.elPanel.style.top=`${a.height-b.height-42}px`}}destroy(){this.updateLatencyTestUI=!1;this.visible&&this.setPanelVisible();this.elPanel&&(this.removeElement(this.elPanel),this.elPanel=null);this.elButton&&(this.removeElement(this.elButton),this.elButton=null)}setPanelVisible(a, +b){this.customPosX=a;this.customPosY=b;if(this.elPanel)if("none"==this.elPanel.style.display)this.updateConnectionCount(),this.elPanel.style.display="block",this.elPanel.className="__liveStatusPanel __fadeinComp",this.visible=!0,this.player.rtc.sendEnableIntervalSendQP(!0);else{this.elPanel.className="__liveStatusPanel __fadeoutComp";setTimeout(()=>{this.visible=!1;this.elPanel.style.display="none";this.player.rtc.sendEnableIntervalSendQP(!1);this.setNeedReposUI();this.resize()},500);return}else this.createPanel(), +this.visible=!0,this.resize(),this.updateConnectionCount(),this.player.rtc.requestInitialSettings(),this.player.rtc.sendEnableIntervalSendQP(!0);this.setNeedReposUI();this.resize()}adjustMaxQP(a){return 18==a?(this.get("i_settings_maxQP")&&this.get("i_settings_maxQP").add(new Option(18,18)),18):0>a?40:0<=a&&29>a?29:40a?10:100e);d++)e/=1E3,c=b[d];this.setText("i_bytesReceived", +this.formatNumber(e)+" "+c);this.setText("i_framesReceived",this.processValue(a.framesReceived));this.setText("i_framesDecoded",a.framesDecoded);this.setText("i_keyframesDecoded",this.processValue(a.keyFramesDecoded));this.updateVideoFramerate(this.formatNumber(a.framesPerSecond));this.updateBitrate(a.bitrate);this.setText("i_packetsLost",this.processValue(a.packetsLost));this.setText("i_frameDropped",this.processValue(a.framesDropped));this.setText("i_compositeTime",this.formatNumber(a.receiveToCompositeMs, +1))}}updateVideoFramerate(a){let b=this.get("i_framerateVideo");b.style.color=10>a?"red":20>a?"orange":"rgb(128,255,0)";b.innerText=a}updateBitrate(a){let b=this.get("i_bitrate");a?1E3a?"red":1E3>a?"orange":"rgb(128,255,0)",b.innerText=this.formatNumber(a)+" kbps"):b.innerText="-"}updateInitialSettings(a){let b=this.adjustMaxQP(a.Encoder.MaxQP);this.setValue("i_settings_maxQP",b);a=this.adjustMaxBitrate(a.WebRTC.MaxBitrate/ +1E3/1E3);this.setValue("i_settings_maxBitrate",a)}updateQPAndRenderFPS(a,b){let c=this.get("i_qp");c.style.color=35this.setVisible(!1),500)}setDelayClear(a){this.bDelayClear= +a}log(a){if(this.el){if(this.bDelayClear)this.bDelayClear=!1,this.el.innerText=a+"\n";else{let b=this.el.innerText;b+=a+"\n";this.el.innerText=b}this.el.scrollTop=this.el.scrollHeight+100}}setPosition(a){a||(a=this.container.getBoundingClientRect());this.el&&(this.el.style.height=`${a.height-20}px`)}}class ec extends ia{constructor(a){super(a);this.create()}create(){this.el||(this.el=document.createElement("i"),this.el.id=`statusIndicator_${this.uid}`,this.el.className="__statusIndicator",this.appendElement(this.el))}destroy(){this.el&& +(this.removeElement(this.el),this.el=null)}setStatus(a){let b="Red",c=this.get("statusIndicator");switch(a){case V.WS_Disconnected:b="Red";c&&(c.style.display="inline-block");break;case V.WS_Connecting:b="RGB(200,200,200)";break;case V.WS_Connected:b="Yellow";break;case V.RTC_Opened:b="RGB(0,128,255)";break;case V.OnReady:b="RGB(0,255,0)",this.hide()}this.lastStatus=a;c&&(c.style.backgroundColor=b)}hide(){let a=this.get("statusIndicator");a&&(a.style.display="none")}}class fc{constructor(){this.css("@keyframes __fadeoutframes {0%{opacity:1;} 100%{opacity:0;}}.__fadeoutComp {animation-duration:600ms; animation-name:__fadeoutframes;}@keyframes __fadeinframes {0%{opacity:0;} 100%{opacity:0.65;}}.__fadeinComp {animation-duration:100ms; animation-name:__fadeinframes;}@keyframes twinkling{0%{opacity:0;}100%{opacity:1;}}.__statusIndicator {position:absolute;display:block;left:5px;top:5px;width:6px;height:6px;border-radius:50%;background-color:red;animation:twinkling 0.25s infinite ease-in-out;}.__startupInfoPanel { position:absolute;left:3px;top:0px;width:400px;background-color:transparent !important;text-shadow:black 0.1em 0.1em 0.2em;color:white;font-family:Verdana;font-size:12px !important;overflow:auto;}.__liveStatusPanel {position:absolute;left:5px;top:10px;width:164px;height:300px;background-color:rgba(50,50,50,0.8);color:#00FF00;font-family:Verdana;font-size:10px;box-shadow:0px 0px 5px 5px rgba(200,200,200,0.5);-moz-border-radius:8px;-webkit-border-radius:8px;}.__liveStatusPanel a:link { color: rgb(0,255,128); text-decoration: none; }.__liveStatusPanel a:hover { color: yellow; background:transparent; }.__liveStatusPanel input {background:transparent; border:1px solid gray; color: #00FF00;}.__liveStatusPanel select {background:transparent; border:1px solid gray; color: #00FF00;}.__liveStatusPanel option {background:#333; color: #00FF00;}.__liveStatusSwitchButton{position:absolute;padding:0;left:6px;width:26px;height:26px;opacity:0.65;cursor:pointer;background-size:conver;}.__fullscreeButton {position:absolute;padding:0;left:38px;width:26px;height:26px;opacity:0.65;cursor:pointer;background-size:conver;}.__viewHomeButton {position:absolute;padding:0;left:70px;width:26px;height:26px;opacity:0.65;cursor:pointer;background-size:conver;}.__taskWaiting {position:absolute;z-index:30;text-align:center;padding-left:5px;text-shadow:black 0.1em 0.1em 0.2em;color:lime;font-family:Verdana;font-size:12px !important;overflow:hidden;display:none;}.__eventsPanel {position:absolute;left:3px;top:0px;width:600px;height:200px;background-color:rgba(64,64,64,0.5) !important;text-shadow:black 0.1em 0.1em 0.2em;color:white;font-family:Verdana;font-size:12px !important;overflow:auto;}.streamingVideoNoCursor {width:100%;height:100%;}.streamingVideoCursorMove {width:100%;height:100%;cursor:move;}.streamingVideoCursorPan {width:100%;height:100%;cursor:url(data:application/octet-stream;base64,AAACAAEAICAAAA8ADwCoDAAAFgAAACgAAAAgAAAAQAAAAAEAGAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////8AAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////////////////////////////////////////////4B///+Af///AH///gA///wAP//8AB///gAf//8AH//+AB///gA///8k///////////////////////////////////////////////////////////////////////w==),auto;}.streamingVideoCursorPointer {width:100%;height:100%;cursor:url(data:application/octet-stream;base64,AAACAAEAICAAAA0ACACoDAAAFgAAACgAAAAgAAAAQAAAAAEAGAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////////////////////////////////////////////4B///+Af///AH///gA///wAP//8AB//+AAf//AAD//wAA//+AAP//4AD//+AF///gT///4f///+H////h////8////////////////////////////////////////w==),auto;}.streamingVideoCursorRotate {width:100%;height:100%;cursor:url(data:application/octet-stream;base64,AAACAAEAICAAAA8ADwCoDAAAFgAAACgAAAAgAAAAQAAAAAEAGAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAD///////////////////////////////////////8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////8AAAD///8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////////////////////////////////////////////4B///+Af///AH//hgAh/wwAMP4cABh+HgAYfh8AGH4eABh+HgA4eAck4BwP//A+H//4fz///P/////////////////////////////////////////////////////w==),auto;}")}css(a){let b= +document.createElement("style");try{b.appendChild(document.createTextNode(a))}catch(c){b.styleSheet.cssText=a}(a=document.getElementsByTagName("head")[0])?a.appendChild(b):console.error("[Cloud] No head element found, cannot create css.")}}class gc extends ia{constructor(a){super(a);this.elContainer=document.createElement("div");this.elContainer.id=`taskWaiting_${this.uid}`;this.elContainer.className="__taskWaiting";this.elContainer.oncontextmenu=new Function("return false");this.elContainer.onselectstart= +new Function("return false");this.appendElement(this.elContainer);this.elText=document.createElement("div");this.elText.style.marginBottom="15px";this.elText.innerText="dddd";this.elContainer.appendChild(this.elText);this.elButton=document.createElement("input");this.elButton.type="button";this.elButton.value=H.getString("RestartInstNow");this.elButton.onclick=()=>{this.player.setInstanceOptions({iid:this.player.options.iid,reset:!0})};this.elContainer.appendChild(this.elButton);H.onLanguageChangedCallbacks.push(()=> +{this.elButton.value=H.getString("RestartInstNow")});this.setMode(0)}setMode(a){this._mode=a;0===a?this.elContainer.style.background="transparent":(this.elContainer.style.background="rgba(64,64,64,0.5)",this.elContainer.style.height="26px",this.elContainer.style.lineHeight="26px")}destroy(){this.elContainer&&(this.removeElement(this.elContainer),this.elContainer=null)}updateText(a){this.elText&&(this.elText.innerText=a,this.show())}show(){this.elContainer.className="__taskWaiting";this.elContainer.style.display= +"block"}hide(){this.elContainer.className="__taskWaiting __fadeoutComp";setTimeout(()=>this.elContainer.style.display="none",500)}setPosition(a,b,c,e){if(this.elContainer)if(a||(a=this.container.getBoundingClientRect()),0==this._mode){var d=a.width/2-150;0>d&&(d=10);this.elContainer.style.left=d+"px";this.elContainer.style.top=a.height/2+"px"}else d=0,b&&d++,c&&d++,e&&d++,a=a.height-32,this.elContainer.style.left=(0==d?5:1==d?38:2==d?70:102)+"px",this.elContainer.style.top=a+"px"}}class hc extends ia{constructor(a){super(a); +this.create()}create(){if(!this.el){var a=[];a.push(H.getString("LeftClickTip"));a.push(H.getString("RightClickTip"));a.push(H.getString("MiddleClickTip"));a=a.join("\n");this.el=document.createElement("button");this.el.id=`viewHomeButton_${this.uid}`;this.el.className="__viewHomeButton";if(R.isIOSDevice||R.isSafari)this.el.style.backgroundSize="cover";this.el.innerHTML=ca.InitialCamera;this.el.title=a;this.el.oncontextmenu=new Function("return false");this.el.onselectstart=new Function("return false"); +this.el.onclick=b=>this.player.viewHome(0);this.el.onmousedown=b=>{0!=b.button&&this.player.viewHome(b.button);b.preventDefault()};this.appendElement(this.el)}}destroy(){this.el&&(this.removeElement(this.el),this.el=null)}setPosition(a,b,c){a||(a=this.container.getBoundingClientRect());if(this.el){let e=5;if(b&&c)e=70;else if(b||c)e=38;this.el.style.left=e+"px";this.el.style.top=`${a.height-32}px`}}}var va=0;class ic{constructor(a,b){if(a){this.host=a;this.options=b;ka.processParams(this.options); +H.setLanguage();this.uid=++va;this.options.apiOptions.player=this;this.api=new ra(null,this.options.apiOptions);if(this.options.domId)if(a=wa(this.options.domId))this.container=document.createElement("div"),this.container.style="position:relative;width:100%;height:100%;",a.innerHTML="",a.appendChild(this.container);else if("loading"==document.readyState){console.error(H.getString("DomLoading"));return}if(this.hasVideo=!!this.container)this.styleManager=new fc,this.createWidgetsInConstructor(),this.canAdaptiveResolution= +!1,this.lastResizeTime=Date.now(),this.orientationChangeTimeout=void 0;this.constructUrlAndConnect();this.resetInteractTimestamp()}else console.error("[DigitalTwinPlayer] The parameter `host` cannot be empty!")}constructUrlAndConnect(){this.logStartupInfo(`host: ${this.host}`);this.useHttps="https:"==location.protocol||this.options.useHttps;this.url=`${this.useHttps?"wss":"ws"}://${this.host}/player?hasVideo=${this.hasVideo}`;this.options.offer&&(this.url+="&offer=1");this.options.iid&&(this.url+= +"&iid="+this.options.iid);this.options.pid&&(this.url+="&pid="+this.options.pid);this.options.password&&(this.url+="&password="+this.options.password);if("object"==typeof this.options.urlExtraInfo)for(let a in this.options.urlExtraInfo)this.url+="&"+a+"="+this.options.urlExtraInfo[a];this.options.reset&&(this.url+="&reset=1",this.options.reset=!1);setTimeout(()=>this.connectSignallingServer(),200)}callEvent(a,b,c){a=this.options.events[a];"function"==typeof a&&a(b,c)}getHost(){return this.host}getAPI(){return this.api}getInstanceInfo(){return this.paramInfo}getVideoElement(){let a; +return null==(a=this.htmlVideo)?void 0:a.video}getVideoElementSize(){let a=this.getVideoElement();return{width:null==a?void 0:a.clientWidth,height:null==a?void 0:a.clientHeight}}getVideoStreamSize(){return{width:this.htmlVideo.videoWidth(),height:this.htmlVideo.videoHeight()}}getVideoSize(){return this.getVideoStreamSize()}screen2World(a,b,c){let e=this.getVideoElementSize(),d=this.getVideoStreamSize(),h=0,g=0,q=d.height/d.width;e.height/e.width>q?g=-(e.width*q-e.height)/2:h=-(e.height/q-e.width)/ +2;a=d.width/(e.width-2*h)*(a-h);b=d.height/(e.height-2*g)*(b-g);return this.getAPI().coord.screen2World(a,b,c)}world2Screen(a,b,c,e){const d=this;return $jscomp.asyncExecutePromiseGeneratorFunction(function*(){let h=yield __g.coord.world2Screen(a,b,c,e),g=d.getVideoElementSize(),q=d.getVideoStreamSize(),k=0,f=0,l=q.height/q.width;g.height/g.width>l?f=-(g.width*l-g.height)/2:k=-(g.height/l-g.width)/2;h.screenPosition=[h.screenPosition[0]/(q.width/(g.width-2*k))+k,h.screenPosition[1]/(q.height/(g.height- +2*f))+f];return h})}setResolution(a,b){if(this.streamerAdaptive){window.devicePixelRatio&&(a*=window.devicePixelRatio,b*=window.devicePixelRatio);if(4096this.streamerResX||b>this.streamerResY)&&(b=a/b,b>=this.streamerResX/this.streamerResY?(a=this.streamerResX,b=this.streamerResX/b):(a=this.streamerResY*b,b=this.streamerResY));a=Math.floor(a);b=Math.floor(b);var c=this.htmlVideo.videoWidth(), +e=this.htmlVideo.videoHeight();if(a!=c&&a+1!=c&&a-1!=c||b!=e&&b+1!=e&&b-1!=e){if(this.lastWidth&&this.lastHeight&&(c=Math.abs(this.lastWidth-a),e=Math.abs(this.lastHeight-b),(0!=c||0!=e)&&4>c&&4>e))return;this.lastWidth=a;this.lastHeight=b;this.rtc&&this.rtc.updateRenderResolution(a,b);return[a,b]}}}destroy(a){console.log(`call DigitalTwinPlayer.destroy: ${a||" "}`);if(!this.isDestroyed){va--;this.isDestroyed=!0;this.destroyReason=a;var b;null==(b=this.rtc)||b.close();var c;null==(c=this.signallingConnection)|| +c.close()}}setKeyEventTarget(a){let b;null==(b=this.htmlVideo)||b.setKeyEventTarget(a)}setKeyEventReceiver(a){this.setKeyEventTarget(a)}resize(){if(this.container){this.rect=this.container.getBoundingClientRect();if(this.bNeedReposUI||!this.oldRect||this.oldRect.width!=this.rect.width||this.oldRect.height!=this.rect.height){this.bNeedReposUI=!1;this.oldRect=this.rect;let b;null==(b=this.startupInfo)||b.setPosition(this.rect);let c;null==(c=this.liveStatus)||c.setPosition(this.rect);let e;null==(e= +this.fullscreenButton)||e.setPosition(this.rect,this.options.ui.statusButton);let d;null==(d=this.homeButton)||d.setPosition(this.rect,this.options.ui.statusButton,this.options.ui.fullscreenButton);let h;null==(h=this.taskListBar)||h.setPosition(this.rect,this.options.ui.statusButton,this.options.ui.fullscreenButton,this.options.ui.homeButton)}if(this.htmlVideo.valid()){this.canAdaptiveResolution&&(console.warn("set res..."),this.setResolution(this.htmlVideo.clientWidth(),this.htmlVideo.clientHeight())); +var a;null==(a=this.htmlVideo)||a.resize(this.streamerAdaptive&&this.canAdaptiveResolution)}}}setInstanceOptions(a){const b=this;return $jscomp.asyncExecutePromiseGeneratorFunction(function*(){var c=a.pid==b.options.pid&&a.iid==b.options.iid||!a.pid&&a.iid==b.options.iid||!a.iid&&a.pid==b.options.pid;if(c&&!a.reset)b.api.log("setInstanceOptions: no change.");else{if(!c){c=(!a.iid||a.iid==b.options.iid)&&a.pid!=b.options.pid;if(b.streamerLocked&&c){b.api.log(H.getString("CannotChangeProject"));return}c= +yield b.signallingConnection.checkParams(a);if(null!==c){if(!1===c.iid){b.api.log(`iid(${a.iid})${H.getString("InstanceNotExist")}`);return}if(!1===c.pid){b.api.log(`pid(${a.pid})${H.getString("ProjectNotExist")}`);return}}}b.destroy();b.options.iid=a.iid;b.options.pid=a.pid;b.options.reset=a.reset;b.constructUrlAndConnect()}})}set fullscreen(a){a?R.fullscreen(this.container):R.exitFullscreen()}get fullscreen(){return!!document.fullscreenElement}setActionEventEnabled(a){let b;null==(b=this.htmlVideo)|| +b.setActionEventEnabled(a)}onApiReady(){this.setStatus(V.OnReady);let a;null==(a=this.signallingConnection)||a.sendReady();1==this.options.ui.mainUI?this.api.settings.setMainUIVisibility(!0):0==this.options.ui.mainUI&&this.api.settings.setMainUIVisibility(!1);1==this.options.ui.campass?this.api.settings.setCampassVisible(!0):0==this.options.ui.campass&&this.api.settings.setCampassVisible(!1)}sendApi(a){if(a){let b;null==(b=this.rtc)||b.sendApi(a)}}onMainThreadBusy(a){if(1===a.busy){let b="BUSY! ", +c=this.api.apiQueue.queueSize(),e=this.api.apiQueue.dataSize();0{if(Date.now()-this.timeOfLastInteraction> +6E4*this.kickOutInMinutes){let g=H.getString("DisconnectForIdle");this.destroy(g);console.warn(g);clearInterval(h)}},2E4)}this.nodeInfoArray=[`${H.getString("NodeInfo")}`];e&&this.nodeInfoArray.push(`\t${H.getString("Host")}`+e);c&&this.nodeInfoArray.push(`\t${H.getString("HostAddress")}`+c);b&&this.nodeInfoArray.push(`\t\u3000${H.getString("Project")}`+b);this.options.pid&&this.nodeInfoArray.push(`\t${H.getString("ProjectId")}`+this.options.pid);this.nodeInfoArray.push(`\t${H.getString("IID")}`+ +this.options.iid);this.nodeInfoArray.push(`\t${H.getString("Adaptive")}`+this.streamerAdaptive);this.nodeInfoArray.push(`\t${H.getString("LimitMaxRes")}`+this.streamerLimitMaxResolution);this.nodeInfoArray.push(`\t${H.getString("Resolution")}${this.streamerResX}x${this.streamerResY}`);let d;null==(d=this.liveStatus)||d.updateButtonTip(this.nodeInfoArray.join("\n"));this.api.log(this.nodeInfoArray.join("\n\t"))}logStartupInfo(a){if(a){var b=new Date;a=`[${pa(b.getHours(),2)+":"+pa(b.getMinutes(),2)+ +":"+pa(b.getSeconds(),2)+"."+pa(b.getMilliseconds(),3)}] ${a}`;var c;null==(c=this.startupInfo)||c.log(a);1{let b;return null==(b=this.eventsPanel)? +void 0:b.appendText(a)},onVideoLoaded:()=>{this.logStartupInfo("video: loadedmetadata");this.createWidgets();this.callEvent("onVideoLoaded");this.resize()},onMButtonDoubleClick:(a,b)=>{let c;null==(c=this.liveStatus)||c.setPanelVisible(a,b)}});this.options.ui.statusIndicator&&(this.statusIndicator=new ec(this));this.options.ui.startupInfo&&(this.startupInfo=new dc(this),this.logStartupInfo("sdk version: "+this.api.getVersion()),this.logStartupInfo("uid: "+this.uid));this.resizeObserver=new ResizeObserver(Ga(()=> +this.resize(),500));this.resizeObserver.observe(this.container)}createWidgets(){this.options.ui.statusButton&&(this.liveStatus=new cc(this,this.playerCount,this.nodeInfoArray.join("\n")));this.options.ui.fullscreenButton&&(this.fullscreenButton=new ac(this));this.options.ui.homeButton&&(this.homeButton=new hc(this));this.taskListBar&&this.taskListBar.setMode(1)}destroyWidgets(){this.liveStatus&&(this.liveStatus.destroy(),this.liveStatus=null);this.fullscreenButton&&(this.fullscreenButton.destroy(), +this.fullscreenButton=null);this.homeButton&&(this.homeButton.destroy(),this.homeButton=null);this.eventsPanel&&(this.eventsPanel.destroy(),this.eventsPanel=null);this.taskListBar&&(this.taskListBar.destroy(),this.taskListBar=null)}isQualityController(){return this.bQualityController}initWebRtcPlayer(a){H.setLanguage(a.language);this.rtc=new Zb({useStats:this.hasVideo&&(this.options.ui.statusButton||this.options.events.onRtcStatsReport),peerConnectionOptions:a.peerConnectionOptions,events:{onlog:b=> +this.logStartupInfo(b),ontrack:b=>{let c;null==(c=this.htmlVideo)||c.setTrack(b)},onicecandidate:b=>{let c;return null==(c=this.signallingConnection)?void 0:c.sendCandidate(b)},onOfferCreated:b=>{let c;return null==(c=this.signallingConnection)?void 0:c.sendOffer(b.sdp,this.hasVideo)},onAnswerCreated:b=>{let c;return null==(c=this.signallingConnection)?void 0:c.send(b)},onstats:b=>{let c;null==(c=this.liveStatus)||c.updateWebRtcStats(b);this.callEvent("onRtcStatsReport",b)},ondatachannelopen:()=> +{this.setStatus(V.RTC_Opened);this.hasVideo&&(this.rtc.requestQualityControl(),this.liveStatus&&this.rtc.requestInitialSettings());this.api.onConnectionOpen()},ondatachannelclose:b=>this.api.onConnectionClose(b),ondatachannelerror:b=>this.api.onConnectionClose(b.error),ondatachannelmessage:(b,c)=>{switch(b){case "ResponseAPI":this.api.onConnectionMessage(c);break;case "InitialSettings":let e;null==(e=this.liveStatus)||e.updateInitialSettings(c);break;case "VideoEncoderAvgQP":let d;if(null==(d=this.liveStatus)? +0:d.visible)b=(new TextDecoder("utf-16")).decode(c.data.slice(1)),(b=JSON.parse(b))&&this.liveStatus.updateQPAndRenderFPS(b.qp,b.renderFPS);break;case "QualityControlOwnership":this.bQualityController=c;let h;null==(h=this.liveStatus)||h.updatePlayerId()}}}});this.hasVideo&&this.htmlVideo.setWebRtcPlayer(this.rtc);this.logStartupInfo("setting up...");this.options.offer&&this.rtc.createOffer();this.hasVideo&&(this.htmlVideo.registerKeyboardEvents(),this.htmlVideo.registerMouseEvents(),this.htmlVideo.registerTouchEvents())}connectSignallingServer(){this.setStatus(V.WS_Connecting); +this.signallingConnection=new Wb({onopen:()=>this.setStatus(V.WS_Connected),onclose:a=>this.handleSignallingClose(a),onerror:()=>{this.setStatus(V.WS_Disconnected)},onmessage:a=>{switch(a.type){case "config":this.initWebRtcPlayer(a);break;case "answer":this.playerId=a.playerId;this.rtc&&this.rtc.onReceiveAnswer(a);break;case "offer":this.playerId=a.playerId;this.rtc&&this.rtc.onReceiveOffer(a);break;case "iceCandidate":this.rtc&&this.rtc.onIceCandidate(a.candidate);break;case "paramInfo":this.receiveParamInfo(a); +break;case "status":this.handleSignallingMessage_Status(a);break;case "playerCount":this.handleSignallingMessage_PlayerCount(a)}}});this.signallingConnection.connect(this.url)}handleSignallingClose(a){this.destroyWidgets();this.callEvent("onConnClose",a);this.startupInfo&&this.startupInfo.setVisible(!0);this.api.onConnectionClose(a);this.rtc&&this.rtc.close();let b="";this.isDestroyed?(b=H.getString("Destroyed"),b=this.destroyReason?b+(": "+this.destroyReason):b+"."):(b="closed: ",a.code&&(b+=a.code), +a.reason?b+=" "+a.reason:1006==a.code&&(b+=" "+H.getString("Disconnect")));this.setStatus(V.WS_Disconnected,b);Ia(a.code)||this.destroy();this.isDestroyed||(this.logStartupInfo(H.getString("Reconnect5s")),this.startupInfo.setDelayClear(!0),setTimeout(()=>this.connectSignallingServer(),5E3));a.code==sa.instance_is_busy&&confirm(H.getString("RestartAndRetry"))&&this.setInstanceOptions({iid:this.busyIId,reset:!0})}handleSignallingMessage_Status(a){let b=Ha(a.state);b&&this.logStartupInfo(b);a.state=== +da.StartFailed?(console.error(a.info),this.options.ui.startupInfo&&setTimeout(()=>alert(a.info),500)):a.state==da.ConfirmBusy&&(this.busyIId=a.info)}handleSignallingMessage_PlayerCount(a){this.playerCount=a.count;let b;null==(b=this.liveStatus)||b.updateConnectionCount(this.playerCount);(this.canAdaptiveResolution=1===a.count)&&this.resize()}}v.APIErrorCode={OK:0,InvalidParameters:1,InternalError:2,ResourceNotFound:3,AcpProjWKTNotSet:4,CoordinateConversionFailed:5,IDExists:6,InvalidRequestType:7, +InvalidRequestString:8,NoCommand:9,DataTypeNotSupport:10,InvalidOperation:11,ProjectNotOpened:12,CodeMax:65535};v.ActionMode={None:0,Follow:1,FollowBehindAndAbove:2,FollowBehind:3,FollowAbove:4,FollowBellow:5,FollowLeft:6,FollowRight:7};v.AnimatedImageButtonData=Qa;v.BPFuncParamType={Bool:0,UInt8:1,Int32:2,Float:3,Double:4,String:5,Color:6,Vector2D:7,Vector:8,Rotator:9,IntArray:10,StringArray:11,VectorArray:12,Coordinate:13,CoordinateArray:14,FloatArray:15};v.BPFunctionData=db;v.BeamData=Ra;v.CameraTourData= +fb;v.CameraTourKeyFrame=eb;v.CloudStatus=V;v.Color={LightPink:"RGB(255,182,193)",Pink:"RGB(255,192,203)",Crimson:"RGB(220,20,60)",LavenderBlush:"RGB(255,240,245)",PaleVioletRed:"RGB(219,112,147)",HotPink:"RGB(255,105,180)",DeepPink:"RGB(255,20,147)",MediumVioletRed:"RGB(199,21,133)",Orchid:"RGB(218,112,214)",Thistle:"RGB(216,191,216)",plum:"RGB(221,160,221)",Violet:"RGB(238,130,238)",Magenta:"RGB(255,0,255)",Fuchsia:"RGB(255,0,255)",DarkMagenta:"RGB(139,0,139)",Purple:"RGB(128,0,128)",MediumOrchid:"RGB(186,85,211)", +DarkVoilet:"RGB(148,0,211)",DarkOrchid:"RGB(153,50,204)",Indigo:"RGB(75,0,130)",BlueViolet:"RGB(138,43,226)",MediumPurple:"RGB(147,112,219)",MediumSlateBlue:"RGB(123,104,238)",SlateBlue:"RGB(106,90,205)",DarkSlateBlue:"RGB(72,61,139)",Lavender:"RGB(230,230,250)",GhostWhite:"RGB(248,248,255)",Blue:"RGB(0,0,255)",MediumBlue:"RGB(0,0,205)",MidnightBlue:"RGB(25,25,112)",DarkBlue:"RGB(0,0,139)",Navy:"RGB(0,0,128)",RoyalBlue:"RGB(65,105,225)",CornflowerBlue:"RGB(100,149,237)",LightSteelBlue:"RGB(176,196,222)", +LightSlateGray:"RGB(119,136,153)",SlateGray:"RGB(112,128,144)",DoderBlue:"RGB(30,144,255)",AliceBlue:"RGB(240,248,255)",SteelBlue:"RGB(70,130,180)",LightSkyBlue:"RGB(135,206,250)",SkyBlue:"RGB(135,206,235)",DeepSkyBlue:"RGB(0,191,255)",LightBLue:"RGB(173,216,230)",PowDerBlue:"RGB(176,224,230)",CadetBlue:"RGB(95,158,160)",Azure:"RGB(240,255,255)",LightCyan:"RGB(225,255,255)",PaleTurquoise:"RGB(175,238,238)",Cyan:"RGB(0,255,255)",Aqua:"RGB(212,242,231)",DarkTurquoise:"RGB(0,206,209)",DarkSlateGray:"RGB(47,79,79)", +DarkCyan:"RGB(0,139,139)",Teal:"RGB(0,128,128)",MediumTurquoise:"RGB(72,209,204)",LightSeaGreen:"RGB(32,178,170)",Turquoise:"RGB(64,224,208)",Auqamarin:"RGB(127,255,170)",MediumAquamarine:"RGB(0,250,154)",MediumSpringGreen:"RGB(0,255,127)",MintCream:"RGB(245,255,250)",SpringGreen:"RGB(60,179,113)",SeaGreen:"RGB(46,139,87)",Honeydew:"RGB(240,255,240)",LightGreen:"RGB(144,238,144)",PaleGreen:"RGB(152,251,152)",DarkSeaGreen:"RGB(143,188,143)",LimeGreen:"RGB(50,205,50)",Lime:"RGB(0,255,0)",ForestGreen:"RGB(34,139,34)", +Green:"RGB(0,128,0)",DarkGreen:"RGB(0,100,0)",Chartreuse:"RGB(127,255,0)",LawnGreen:"RGB(124,252,0)",GreenYellow:"RGB(173,255,47)",OliveDrab:"RGB(85,107,47)",Beige:"RGB(245,245,220)",LightGoldenrodYellow:"RGB(250,250,210)",Ivory:"RGB(255,255,240)",LightYellow:"RGB(255,255,224)",Yellow:"RGB(255,255,0)",Olive:"RGB(128,128,0)",DarkKhaki:"RGB(189,183,107)",LemonChiffon:"RGB(255,250,205)",PaleGodenrod:"RGB(238,232,170)",Khaki:"RGB(240,230,140)",Gold:"RGB(255,215,0)",Cornislk:"RGB(255,248,220)",GoldEnrod:"RGB(218,165,32)", +FloralWhite:"RGB(255,250,240)",OldLace:"RGB(253,245,230)",Wheat:"RGB(245,222,179)",Moccasin:"RGB(255,228,181)",Orange:"RGB(255,165,0)",PapayaWhip:"RGB(255,239,213)",BlanchedAlmond:"RGB(255,235,205)",NavajoWhite:"RGB(255,222,173)",AntiqueWhite:"RGB(250,235,215)",Tan:"RGB(210,180,140)",BrulyWood:"RGB(222,184,135)",Bisque:"RGB(255,228,196)",DarkOrange:"RGB(255,140,0)",Linen:"RGB(250,240,230)",Peru:"RGB(205,133,63)",PeachPuff:"RGB(255,218,185)",SandyBrown:"RGB(244,164,96)",Chocolate:"RGB(210,105,30)", +SaddleBrown:"RGB(139,69,19)",SeaShell:"RGB(255,245,238)",Sienna:"RGB(160,82,45)",LightSalmon:"RGB(255,160,122)",Coral:"RGB(255,127,80)",OrangeRed:"RGB(255,69,0)",DarkSalmon:"RGB(233,150,122)",Tomato:"RGB(255,99,71)",MistyRose:"RGB(255,228,225)",Salmon:"RGB(250,128,114)",Snow:"RGB(255,250,250)",LightCoral:"RGB(240,128,128)",RosyBrown:"RGB(188,143,143)",IndianRed:"RGB(205,92,92)",Red:"RGB(255,0,0)",Brown:"RGB(165,42,42)",FireBrick:"RGB(178,34,34)",DarkRed:"RGB(139,0,0)",Maroon:"RGB(128,0,0)",White:"RGB(255,255,255)", +WhiteSmoke:"RGB(245,245,245)",Gainsboro:"RGB(220,220,220)",LightGrey:"RGB(211,211,211)",Silver:"RGB(192,192,192)",DarkGray:"RGB(169,169,169)",Gray:"RGB(128,128,128)",DimGray:"RGB(105,105,105)",Black:"RGB(0,0,0)"};v.CommandType=p;v.CustomObjectData=$a;v.CustomObjectData2=ab;v.CustomTagData=Na;v.DecalData=Ya;v.DigitalTwinAPI=ra;v.DigitalTwinPlayer=ic;v.DynamicWaterData=cb;v.HeatMapPointData=Ka;v.HighlightAreaData=Oa;v.ImageButtonData=Pa;v.LayerVisibleData=Ja;v.MapMode={Campass:0,SmallMap:1,BigMap:2}; +v.MeasurementMode={Coordinate:1,Linear:2,Horizontal:3,Vertical:4,MultiPoint:5,TerrainArea:6};v.MousePickMask=qa;v.ODLineData=Va;v.PanelType={ViewshedAnalysis:0,SkylineAnalysis:1,ViewDomeAnalysis:2,VisiblityAnalysis:3,FloodFillAnalysis:4,SolarAnalysis:5,CutFillAnalysis:6,TerrainSlopeAnalysi:7,ContourLineAnalysis:8};v.PanoramaData=Xa;v.Polygon3DData=Ta;v.Polygon3DStyle={Wave:0,LoopLine:1,Gradual:2,DynamicGradual:3,WaveTransparent:4,WideWave:5,RotateArrow:6,RotateLine:7,RotateGradual:8,SingleColor:9, +SingleColorWithLight:10};v.PolygonData=Wa;v.PolygonStyle={SingleColor:0,CirclePoint:1,Volumn:2,Gradual:3,DynamicGradual:4,WaveTransparent:5,WideWave:6,RotateArrow:7,RotateLine:8,RotateGradual:9,OnTerrain:10};v.PolylineData=Ua;v.PolylineStyle={Arrow:0,Arrow1:1,Flow:2,Beam:3,Normal:4,OnTerrain:5,DottedNormal:6,DottedCircle:7};v.RadiationPointData=Sa;v.RendererType={SimpleRenderer:0,UniqueValueRenderer:1,ClassBreaksRenderer:2};v.TagData=La;v.TileLayerActorData=fa;v.TileLayerData=Za;v.VERSION="5.4";v.VehicleViewMode= +{FirstPerson:0,ThirdPerson:1};v.VideoProjectionData=bb;v.Viewport=ba;v.WaterFlowFieldStyle={HeatMap:0,Water:1};v.WebUIData=Ma;v.__onCefResponse=function(a,b){if(ua)ua.onConnectionMessage(a,b)};Object.defineProperty(v,"__esModule",{value:!0});return v}({}); +(()=>{if("undefined"!=typeof module&&module.exports)module.exports=acapi;else if("function"==typeof define&&define.amd)define(function(){return acapi});else{window.AcApiVersion=acapi.VERSION;acapi.AirCityAPI=acapi.DigitalTwinAPI;acapi.AirCityPlayer=acapi.DigitalTwinPlayer;for(let v in acapi)"VERSION"!=v&&(window[v]=acapi[v]);acapi.DigitalTwinAPI.__onApiConstructed=v=>window.__g=v}})(); diff --git a/src/assets/fonts/DIN-Regular.otf b/src/assets/fonts/DIN-Regular.otf new file mode 100644 index 0000000..cb5f1c5 Binary files /dev/null and b/src/assets/fonts/DIN-Regular.otf differ diff --git a/src/assets/fonts/三极韵律圆体.ttf b/src/assets/fonts/三极韵律圆体.ttf new file mode 100644 index 0000000..f5fe806 Binary files /dev/null and b/src/assets/fonts/三极韵律圆体.ttf differ diff --git a/src/assets/fonts/微软雅黑.ttf b/src/assets/fonts/微软雅黑.ttf new file mode 100644 index 0000000..ea3c090 Binary files /dev/null and b/src/assets/fonts/微软雅黑.ttf differ diff --git a/src/assets/icons/png/env/env-title-bg.png b/src/assets/icons/png/env/env-title-bg.png new file mode 100644 index 0000000..dfb6ba1 Binary files /dev/null and b/src/assets/icons/png/env/env-title-bg.png differ diff --git a/src/assets/icons/png/env/env-title-icon.png b/src/assets/icons/png/env/env-title-icon.png new file mode 100644 index 0000000..7356a7b Binary files /dev/null and b/src/assets/icons/png/env/env-title-icon.png differ diff --git a/src/assets/icons/png/logo.png b/src/assets/icons/png/logo.png new file mode 100644 index 0000000..f3d2503 Binary files /dev/null and b/src/assets/icons/png/logo.png differ diff --git a/src/assets/icons/png/point.png b/src/assets/icons/png/point.png new file mode 100644 index 0000000..be3aa15 Binary files /dev/null and b/src/assets/icons/png/point.png differ diff --git a/src/assets/icons/svg/404.svg b/src/assets/icons/svg/404.svg new file mode 100644 index 0000000..6df5019 --- /dev/null +++ b/src/assets/icons/svg/404.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/blind-plate.svg b/src/assets/icons/svg/blind-plate.svg new file mode 100644 index 0000000..6f2eaa6 --- /dev/null +++ b/src/assets/icons/svg/blind-plate.svg @@ -0,0 +1,15 @@ + + + icon/20px/层级图标/mangbanchoudu + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/bounds.svg b/src/assets/icons/svg/bounds.svg new file mode 100644 index 0000000..a917e66 --- /dev/null +++ b/src/assets/icons/svg/bounds.svg @@ -0,0 +1,29 @@ + + + icon/20px/层级图标/电子围栏 + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/break-road.svg b/src/assets/icons/svg/break-road.svg new file mode 100644 index 0000000..71d07cf --- /dev/null +++ b/src/assets/icons/svg/break-road.svg @@ -0,0 +1,15 @@ + + + icon/20px/层级图标/duanlu + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/car.svg b/src/assets/icons/svg/car.svg new file mode 100644 index 0000000..ae5bc2b --- /dev/null +++ b/src/assets/icons/svg/car.svg @@ -0,0 +1,18 @@ + + + icon/20px/层级图标/车辆定位 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/check-point.svg b/src/assets/icons/svg/check-point.svg new file mode 100644 index 0000000..bf8e8bb --- /dev/null +++ b/src/assets/icons/svg/check-point.svg @@ -0,0 +1,18 @@ + + + icon/20px/层级图标/卡口设施 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/company.svg b/src/assets/icons/svg/company.svg new file mode 100644 index 0000000..1e7d543 --- /dev/null +++ b/src/assets/icons/svg/company.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/dangrous.svg b/src/assets/icons/svg/dangrous.svg new file mode 100644 index 0000000..5a3df8c --- /dev/null +++ b/src/assets/icons/svg/dangrous.svg @@ -0,0 +1,20 @@ + + + icon/20px/层级图标/重大危险源 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/dangrousFile.svg b/src/assets/icons/svg/dangrousFile.svg new file mode 100644 index 0000000..3672f77 --- /dev/null +++ b/src/assets/icons/svg/dangrousFile.svg @@ -0,0 +1,25 @@ + + + icon/32/企业应急档案 + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/empty-car.svg b/src/assets/icons/svg/empty-car.svg new file mode 100644 index 0000000..8428e34 --- /dev/null +++ b/src/assets/icons/svg/empty-car.svg @@ -0,0 +1,19 @@ + + + icon/20px/层级图标/空载车辆 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/envFile.svg b/src/assets/icons/svg/envFile.svg new file mode 100644 index 0000000..049ccf5 --- /dev/null +++ b/src/assets/icons/svg/envFile.svg @@ -0,0 +1,28 @@ + + + icon/32/企业环保档案 + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/fixed.svg b/src/assets/icons/svg/fixed.svg new file mode 100644 index 0000000..d2e8012 --- /dev/null +++ b/src/assets/icons/svg/fixed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/forbid-space.svg b/src/assets/icons/svg/forbid-space.svg new file mode 100644 index 0000000..7d5bf8f --- /dev/null +++ b/src/assets/icons/svg/forbid-space.svg @@ -0,0 +1,15 @@ + + + icon/20px/层级图标/shouxiankongjian + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/four-color.svg b/src/assets/icons/svg/four-color.svg new file mode 100644 index 0000000..b3d39a5 --- /dev/null +++ b/src/assets/icons/svg/four-color.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/assets/icons/svg/four-color2.svg b/src/assets/icons/svg/four-color2.svg new file mode 100644 index 0000000..b3d39a5 --- /dev/null +++ b/src/assets/icons/svg/four-color2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/assets/icons/svg/fq-wrw.svg b/src/assets/icons/svg/fq-wrw.svg new file mode 100644 index 0000000..0960f2f --- /dev/null +++ b/src/assets/icons/svg/fq-wrw.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/fs-wrw.svg b/src/assets/icons/svg/fs-wrw.svg new file mode 100644 index 0000000..1c3c41d --- /dev/null +++ b/src/assets/icons/svg/fs-wrw.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/fullScreen.svg b/src/assets/icons/svg/fullScreen.svg new file mode 100644 index 0000000..70a0d53 --- /dev/null +++ b/src/assets/icons/svg/fullScreen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/gas-env.svg b/src/assets/icons/svg/gas-env.svg new file mode 100644 index 0000000..c70dd34 --- /dev/null +++ b/src/assets/icons/svg/gas-env.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/gas-monitor.svg b/src/assets/icons/svg/gas-monitor.svg new file mode 100644 index 0000000..fb2a254 --- /dev/null +++ b/src/assets/icons/svg/gas-monitor.svg @@ -0,0 +1,18 @@ + + + icon/20px/层级图标/气体监测 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/ground-env.svg b/src/assets/icons/svg/ground-env.svg new file mode 100644 index 0000000..329621c --- /dev/null +++ b/src/assets/icons/svg/ground-env.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/heatmap.svg b/src/assets/icons/svg/heatmap.svg new file mode 100644 index 0000000..65233cc --- /dev/null +++ b/src/assets/icons/svg/heatmap.svg @@ -0,0 +1,24 @@ + + + 切片 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/heavy-car.svg b/src/assets/icons/svg/heavy-car.svg new file mode 100644 index 0000000..feb835d --- /dev/null +++ b/src/assets/icons/svg/heavy-car.svg @@ -0,0 +1,18 @@ + + + icon/20px/层级图标/重载车辆 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/hidden-dangrous.svg b/src/assets/icons/svg/hidden-dangrous.svg new file mode 100644 index 0000000..b7d6002 --- /dev/null +++ b/src/assets/icons/svg/hidden-dangrous.svg @@ -0,0 +1,13 @@ + + + icon/20px/层级图标/ct_yinhuan + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/hide.svg b/src/assets/icons/svg/hide.svg new file mode 100644 index 0000000..e088914 --- /dev/null +++ b/src/assets/icons/svg/hide.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/high-sky.svg b/src/assets/icons/svg/high-sky.svg new file mode 100644 index 0000000..0825f9e --- /dev/null +++ b/src/assets/icons/svg/high-sky.svg @@ -0,0 +1,15 @@ + + + icon/20px/层级图标/gaokong + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/hoisting.svg b/src/assets/icons/svg/hoisting.svg new file mode 100644 index 0000000..85fff5f --- /dev/null +++ b/src/assets/icons/svg/hoisting.svg @@ -0,0 +1,15 @@ + + + icon/20px/层级图标/diaozhuang + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/icon_car_0.svg b/src/assets/icons/svg/icon_car_0.svg new file mode 100644 index 0000000..7dcc578 --- /dev/null +++ b/src/assets/icons/svg/icon_car_0.svg @@ -0,0 +1,34 @@ + + + icon/32/访客车辆 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/icon_car_1.svg b/src/assets/icons/svg/icon_car_1.svg new file mode 100644 index 0000000..86fe81d --- /dev/null +++ b/src/assets/icons/svg/icon_car_1.svg @@ -0,0 +1,31 @@ + + + icon/32/普通车辆 + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/icon_car_2.svg b/src/assets/icons/svg/icon_car_2.svg new file mode 100644 index 0000000..81d7e17 --- /dev/null +++ b/src/assets/icons/svg/icon_car_2.svg @@ -0,0 +1,30 @@ + + + icon/32/危化品车辆 + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/infoFile.svg b/src/assets/icons/svg/infoFile.svg new file mode 100644 index 0000000..9190e40 --- /dev/null +++ b/src/assets/icons/svg/infoFile.svg @@ -0,0 +1,23 @@ + + + icon/32/企业基本信息 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/layer.svg b/src/assets/icons/svg/layer.svg new file mode 100644 index 0000000..c0b2dda --- /dev/null +++ b/src/assets/icons/svg/layer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/make-ground.svg b/src/assets/icons/svg/make-ground.svg new file mode 100644 index 0000000..89d4944 --- /dev/null +++ b/src/assets/icons/svg/make-ground.svg @@ -0,0 +1,15 @@ + + + icon/20px/层级图标/dongtu + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/normal.svg b/src/assets/icons/svg/normal.svg new file mode 100644 index 0000000..28f1a38 --- /dev/null +++ b/src/assets/icons/svg/normal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/peo.svg b/src/assets/icons/svg/peo.svg new file mode 100644 index 0000000..65f4827 --- /dev/null +++ b/src/assets/icons/svg/peo.svg @@ -0,0 +1,20 @@ + + + 切片 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/plan-line.svg b/src/assets/icons/svg/plan-line.svg new file mode 100644 index 0000000..b75764b --- /dev/null +++ b/src/assets/icons/svg/plan-line.svg @@ -0,0 +1,18 @@ + + + icon/20px/层级图标/规划线 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/powerFile.svg b/src/assets/icons/svg/powerFile.svg new file mode 100644 index 0000000..7e23b57 --- /dev/null +++ b/src/assets/icons/svg/powerFile.svg @@ -0,0 +1,18 @@ + + + icon/32/企业能源档案 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/qxs-jk.svg b/src/assets/icons/svg/qxs-jk.svg new file mode 100644 index 0000000..ce2f33f --- /dev/null +++ b/src/assets/icons/svg/qxs-jk.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/real-line.svg b/src/assets/icons/svg/real-line.svg new file mode 100644 index 0000000..7735195 --- /dev/null +++ b/src/assets/icons/svg/real-line.svg @@ -0,0 +1,19 @@ + + + icon/20px/层级图标/实控线 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/safe-building.svg b/src/assets/icons/svg/safe-building.svg new file mode 100644 index 0000000..b05aef2 --- /dev/null +++ b/src/assets/icons/svg/safe-building.svg @@ -0,0 +1,16 @@ + + + icon/20px/层级图标/应急设施 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/safe-goods.svg b/src/assets/icons/svg/safe-goods.svg new file mode 100644 index 0000000..4e145d1 --- /dev/null +++ b/src/assets/icons/svg/safe-goods.svg @@ -0,0 +1,18 @@ + + + icon/20px/层级图标/应急物资 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/safe-line.svg b/src/assets/icons/svg/safe-line.svg new file mode 100644 index 0000000..451f0aa --- /dev/null +++ b/src/assets/icons/svg/safe-line.svg @@ -0,0 +1,16 @@ + + + icon/20px/层级图标/安全线 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/safe-route.svg b/src/assets/icons/svg/safe-route.svg new file mode 100644 index 0000000..81e6554 --- /dev/null +++ b/src/assets/icons/svg/safe-route.svg @@ -0,0 +1,18 @@ + + + icon/20px/层级图标/疏散路线 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/safeFile.svg b/src/assets/icons/svg/safeFile.svg new file mode 100644 index 0000000..2cd9527 --- /dev/null +++ b/src/assets/icons/svg/safeFile.svg @@ -0,0 +1,18 @@ + + + icon/32/企业安全档案 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/show.svg b/src/assets/icons/svg/show.svg new file mode 100644 index 0000000..1e12287 --- /dev/null +++ b/src/assets/icons/svg/show.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/speed.svg b/src/assets/icons/svg/speed.svg new file mode 100644 index 0000000..a7bfb79 --- /dev/null +++ b/src/assets/icons/svg/speed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/tail-spin.svg b/src/assets/icons/svg/tail-spin.svg new file mode 100644 index 0000000..423591f --- /dev/null +++ b/src/assets/icons/svg/tail-spin.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/icons/svg/tc_cheliang.svg b/src/assets/icons/svg/tc_cheliang.svg new file mode 100644 index 0000000..bd697cc --- /dev/null +++ b/src/assets/icons/svg/tc_cheliang.svg @@ -0,0 +1,9 @@ + + + icon/16/tc_cheliang + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/tc_ranliao.svg b/src/assets/icons/svg/tc_ranliao.svg new file mode 100644 index 0000000..6a04b20 --- /dev/null +++ b/src/assets/icons/svg/tc_ranliao.svg @@ -0,0 +1,7 @@ + + + icon/16/tc_ranliao + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/tc_renyuan.svg b/src/assets/icons/svg/tc_renyuan.svg new file mode 100644 index 0000000..14439ec --- /dev/null +++ b/src/assets/icons/svg/tc_renyuan.svg @@ -0,0 +1,9 @@ + + + icon/16/tc_renyuan + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/tc_yongdian.svg b/src/assets/icons/svg/tc_yongdian.svg new file mode 100644 index 0000000..ec16908 --- /dev/null +++ b/src/assets/icons/svg/tc_yongdian.svg @@ -0,0 +1,7 @@ + + + icon/16/tc_yongdian + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/tc_yongshui.svg b/src/assets/icons/svg/tc_yongshui.svg new file mode 100644 index 0000000..6ebe34e --- /dev/null +++ b/src/assets/icons/svg/tc_yongshui.svg @@ -0,0 +1,7 @@ + + + icon/16/tc_yongshui + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/tc_zhengqi.svg b/src/assets/icons/svg/tc_zhengqi.svg new file mode 100644 index 0000000..41c28c2 --- /dev/null +++ b/src/assets/icons/svg/tc_zhengqi.svg @@ -0,0 +1,7 @@ + + + icon/16/tc_zhengqi + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/tz-wrw.svg b/src/assets/icons/svg/tz-wrw.svg new file mode 100644 index 0000000..1fde56c --- /dev/null +++ b/src/assets/icons/svg/tz-wrw.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/use-e.svg b/src/assets/icons/svg/use-e.svg new file mode 100644 index 0000000..c960260 --- /dev/null +++ b/src/assets/icons/svg/use-e.svg @@ -0,0 +1,15 @@ + + + icon/20px/层级图标/linshiyongdian + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/use-fire.svg b/src/assets/icons/svg/use-fire.svg new file mode 100644 index 0000000..ab6eb7b --- /dev/null +++ b/src/assets/icons/svg/use-fire.svg @@ -0,0 +1,15 @@ + + + icon/20px/层级图标/donghuo + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/video.svg b/src/assets/icons/svg/video.svg new file mode 100644 index 0000000..96e8c3a --- /dev/null +++ b/src/assets/icons/svg/video.svg @@ -0,0 +1,18 @@ + + + icon/20px/层级图标/视频监控 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/water-env.svg b/src/assets/icons/svg/water-env.svg new file mode 100644 index 0000000..3256918 --- /dev/null +++ b/src/assets/icons/svg/water-env.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/angleMark.png b/src/assets/img/angleMark.png new file mode 100644 index 0000000..cdd33d2 Binary files /dev/null and b/src/assets/img/angleMark.png differ diff --git a/src/assets/img/avatar.jpg b/src/assets/img/avatar.jpg new file mode 100644 index 0000000..150c17b Binary files /dev/null and b/src/assets/img/avatar.jpg differ diff --git a/src/assets/img/bar_chart_bg.png b/src/assets/img/bar_chart_bg.png new file mode 100644 index 0000000..b47614f Binary files /dev/null and b/src/assets/img/bar_chart_bg.png differ diff --git a/src/assets/img/big_bg.png b/src/assets/img/big_bg.png new file mode 100644 index 0000000..2460421 Binary files /dev/null and b/src/assets/img/big_bg.png differ diff --git a/src/assets/img/blue-warning-bg.png b/src/assets/img/blue-warning-bg.png new file mode 100644 index 0000000..1baf6c9 Binary files /dev/null and b/src/assets/img/blue-warning-bg.png differ diff --git a/src/assets/img/close/bo.png b/src/assets/img/close/bo.png new file mode 100644 index 0000000..ebc689f Binary files /dev/null and b/src/assets/img/close/bo.png differ diff --git a/src/assets/img/code.jpg b/src/assets/img/code.jpg new file mode 100644 index 0000000..d4d1db5 Binary files /dev/null and b/src/assets/img/code.jpg differ diff --git a/src/assets/img/dealBg.png b/src/assets/img/dealBg.png new file mode 100644 index 0000000..c00b9c2 Binary files /dev/null and b/src/assets/img/dealBg.png differ diff --git a/src/assets/img/eme/eme_Fireaxe.png b/src/assets/img/eme/eme_Fireaxe.png new file mode 100644 index 0000000..7e91926 Binary files /dev/null and b/src/assets/img/eme/eme_Fireaxe.png differ diff --git a/src/assets/img/eme/eme_extinguisher.png b/src/assets/img/eme/eme_extinguisher.png new file mode 100644 index 0000000..9e91088 Binary files /dev/null and b/src/assets/img/eme/eme_extinguisher.png differ diff --git a/src/assets/img/eme/eme_medicinebag.png b/src/assets/img/eme/eme_medicinebag.png new file mode 100644 index 0000000..2336af2 Binary files /dev/null and b/src/assets/img/eme/eme_medicinebag.png differ diff --git a/src/assets/img/eme/fuzi.png b/src/assets/img/eme/fuzi.png new file mode 100644 index 0000000..9e04bb0 Binary files /dev/null and b/src/assets/img/eme/fuzi.png differ diff --git a/src/assets/img/eme/mhq.png b/src/assets/img/eme/mhq.png new file mode 100644 index 0000000..80358b9 Binary files /dev/null and b/src/assets/img/eme/mhq.png differ diff --git a/src/assets/img/eme/wz.png b/src/assets/img/eme/wz.png new file mode 100644 index 0000000..bf5a03a Binary files /dev/null and b/src/assets/img/eme/wz.png differ diff --git a/src/assets/img/eme/xfz-icon.png b/src/assets/img/eme/xfz-icon.png new file mode 100644 index 0000000..8a2d758 Binary files /dev/null and b/src/assets/img/eme/xfz-icon.png differ diff --git a/src/assets/img/energy/dian.png b/src/assets/img/energy/dian.png new file mode 100644 index 0000000..1fed5df Binary files /dev/null and b/src/assets/img/energy/dian.png differ diff --git a/src/assets/img/energy/energyCardBg.png b/src/assets/img/energy/energyCardBg.png new file mode 100644 index 0000000..37b0ff6 Binary files /dev/null and b/src/assets/img/energy/energyCardBg.png differ diff --git a/src/assets/img/energy/energyTitle.png b/src/assets/img/energy/energyTitle.png new file mode 100644 index 0000000..c23cbd8 Binary files /dev/null and b/src/assets/img/energy/energyTitle.png differ diff --git a/src/assets/img/energy/green-arr.png b/src/assets/img/energy/green-arr.png new file mode 100644 index 0000000..709dac3 Binary files /dev/null and b/src/assets/img/energy/green-arr.png differ diff --git a/src/assets/img/energy/mei.png b/src/assets/img/energy/mei.png new file mode 100644 index 0000000..402b05e Binary files /dev/null and b/src/assets/img/energy/mei.png differ diff --git a/src/assets/img/energy/red-arr.png b/src/assets/img/energy/red-arr.png new file mode 100644 index 0000000..27338f8 Binary files /dev/null and b/src/assets/img/energy/red-arr.png differ diff --git a/src/assets/img/energy/shui.png b/src/assets/img/energy/shui.png new file mode 100644 index 0000000..f0a40bc Binary files /dev/null and b/src/assets/img/energy/shui.png differ diff --git a/src/assets/img/energy/zq.png b/src/assets/img/energy/zq.png new file mode 100644 index 0000000..eaa99ab Binary files /dev/null and b/src/assets/img/energy/zq.png differ diff --git a/src/assets/img/env/BenzeneExceedance.png b/src/assets/img/env/BenzeneExceedance.png new file mode 100644 index 0000000..7082b14 Binary files /dev/null and b/src/assets/img/env/BenzeneExceedance.png differ diff --git a/src/assets/img/env/EthanolExceedance.png b/src/assets/img/env/EthanolExceedance.png new file mode 100644 index 0000000..ba7fe4a Binary files /dev/null and b/src/assets/img/env/EthanolExceedance.png differ diff --git a/src/assets/img/env/HCLExceedance.png b/src/assets/img/env/HCLExceedance.png new file mode 100644 index 0000000..1a7f1d9 Binary files /dev/null and b/src/assets/img/env/HCLExceedance.png differ diff --git a/src/assets/img/env/NOExceedance.png b/src/assets/img/env/NOExceedance.png new file mode 100644 index 0000000..a7a7530 Binary files /dev/null and b/src/assets/img/env/NOExceedance.png differ diff --git a/src/assets/img/env/clean-count.png b/src/assets/img/env/clean-count.png new file mode 100644 index 0000000..ef59223 Binary files /dev/null and b/src/assets/img/env/clean-count.png differ diff --git a/src/assets/img/env/clean-year.png b/src/assets/img/env/clean-year.png new file mode 100644 index 0000000..542eb7b Binary files /dev/null and b/src/assets/img/env/clean-year.png differ diff --git a/src/assets/img/env/clean.png b/src/assets/img/env/clean.png new file mode 100644 index 0000000..7ef15a5 Binary files /dev/null and b/src/assets/img/env/clean.png differ diff --git a/src/assets/img/env/count.png b/src/assets/img/env/count.png new file mode 100644 index 0000000..5575c7a Binary files /dev/null and b/src/assets/img/env/count.png differ diff --git a/src/assets/img/env/cycle-bg.png b/src/assets/img/env/cycle-bg.png new file mode 100644 index 0000000..2befa6e Binary files /dev/null and b/src/assets/img/env/cycle-bg.png differ diff --git a/src/assets/img/env/formaldehydeExcessRate.png b/src/assets/img/env/formaldehydeExcessRate.png new file mode 100644 index 0000000..b1863f8 Binary files /dev/null and b/src/assets/img/env/formaldehydeExcessRate.png differ diff --git a/src/assets/img/env/gas-year.png b/src/assets/img/env/gas-year.png new file mode 100644 index 0000000..fa14e6e Binary files /dev/null and b/src/assets/img/env/gas-year.png differ diff --git a/src/assets/img/env/gas.png b/src/assets/img/env/gas.png new file mode 100644 index 0000000..b95cd17 Binary files /dev/null and b/src/assets/img/env/gas.png differ diff --git a/src/assets/img/env/methanolExceedance.png b/src/assets/img/env/methanolExceedance.png new file mode 100644 index 0000000..9248362 Binary files /dev/null and b/src/assets/img/env/methanolExceedance.png differ diff --git a/src/assets/img/env/waste-year.png b/src/assets/img/env/waste-year.png new file mode 100644 index 0000000..487a4f3 Binary files /dev/null and b/src/assets/img/env/waste-year.png differ diff --git a/src/assets/img/env/waste.png b/src/assets/img/env/waste.png new file mode 100644 index 0000000..d0fb1da Binary files /dev/null and b/src/assets/img/env/waste.png differ diff --git a/src/assets/img/env/waterImg.png b/src/assets/img/env/waterImg.png new file mode 100644 index 0000000..15a6df2 Binary files /dev/null and b/src/assets/img/env/waterImg.png differ diff --git a/src/assets/img/heatmap.png b/src/assets/img/heatmap.png new file mode 100644 index 0000000..526d318 Binary files /dev/null and b/src/assets/img/heatmap.png differ diff --git a/src/assets/img/long_line.png b/src/assets/img/long_line.png new file mode 100644 index 0000000..a0c7564 Binary files /dev/null and b/src/assets/img/long_line.png differ diff --git a/src/assets/img/middle_line.png b/src/assets/img/middle_line.png new file mode 100644 index 0000000..0bccaf7 Binary files /dev/null and b/src/assets/img/middle_line.png differ diff --git a/src/assets/img/park/lighting-icon.png b/src/assets/img/park/lighting-icon.png new file mode 100644 index 0000000..addf052 Binary files /dev/null and b/src/assets/img/park/lighting-icon.png differ diff --git a/src/assets/img/park/yichuli.png b/src/assets/img/park/yichuli.png new file mode 100644 index 0000000..230d07d Binary files /dev/null and b/src/assets/img/park/yichuli.png differ diff --git a/src/assets/img/permitBg.png b/src/assets/img/permitBg.png new file mode 100644 index 0000000..9ef1d45 Binary files /dev/null and b/src/assets/img/permitBg.png differ diff --git a/src/assets/img/person.png b/src/assets/img/person.png new file mode 100644 index 0000000..8db5bc1 Binary files /dev/null and b/src/assets/img/person.png differ diff --git a/src/assets/img/phone-gray.png b/src/assets/img/phone-gray.png new file mode 100644 index 0000000..3924067 Binary files /dev/null and b/src/assets/img/phone-gray.png differ diff --git a/src/assets/img/phone.png b/src/assets/img/phone.png new file mode 100644 index 0000000..b3e7057 Binary files /dev/null and b/src/assets/img/phone.png differ diff --git a/src/assets/img/red-warning-bg.png b/src/assets/img/red-warning-bg.png new file mode 100644 index 0000000..239363d Binary files /dev/null and b/src/assets/img/red-warning-bg.png differ diff --git a/src/assets/img/safety/company.png b/src/assets/img/safety/company.png new file mode 100644 index 0000000..f263b6e Binary files /dev/null and b/src/assets/img/safety/company.png differ diff --git a/src/assets/img/safety/fxx.png b/src/assets/img/safety/fxx.png new file mode 100644 index 0000000..2a2ed5e Binary files /dev/null and b/src/assets/img/safety/fxx.png differ diff --git a/src/assets/img/safety/shigong.png b/src/assets/img/safety/shigong.png new file mode 100644 index 0000000..ef3edae Binary files /dev/null and b/src/assets/img/safety/shigong.png differ diff --git a/src/assets/img/safety/zdwxy.png b/src/assets/img/safety/zdwxy.png new file mode 100644 index 0000000..98cbb5a Binary files /dev/null and b/src/assets/img/safety/zdwxy.png differ diff --git a/src/assets/img/search-icon.png b/src/assets/img/search-icon.png new file mode 100644 index 0000000..8611db4 Binary files /dev/null and b/src/assets/img/search-icon.png differ diff --git a/src/assets/img/short_line.png b/src/assets/img/short_line.png new file mode 100644 index 0000000..dd318ee Binary files /dev/null and b/src/assets/img/short_line.png differ diff --git a/src/assets/img/subTitle.png b/src/assets/img/subTitle.png new file mode 100644 index 0000000..9105e61 Binary files /dev/null and b/src/assets/img/subTitle.png differ diff --git a/src/assets/img/yellow-warning-bg.png b/src/assets/img/yellow-warning-bg.png new file mode 100644 index 0000000..d1e7e73 Binary files /dev/null and b/src/assets/img/yellow-warning-bg.png differ diff --git a/src/assets/style/pageCommon.component.scss b/src/assets/style/pageCommon.component.scss new file mode 100644 index 0000000..879da04 --- /dev/null +++ b/src/assets/style/pageCommon.component.scss @@ -0,0 +1,2767 @@ +@mixin side-container { + display: flex; + flex-direction: column; + justify-content: space-between; + .margin-top-50 { + margin-top: 50px; + } + .margin-top-40 { + margin-top: 40px; + } + .content-block { + height: 170px; + } + width: 330px; + height: 100%; +} + +//滚动条样式 +@mixin scrollStyle($width) { + &::-webkit-scrollbar { + width: $width !important; + height: 100% !important; + } + &::-webkit-scrollbar-thumb { + border-radius: 2px; + box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); + background: rgba(255, 255, 255, 0.68); + } + &::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); + -webkit-border-radius: 2px; + background: transparent; + } +} + +.line-chart { + height: 100px; +} + +.env-left { + @include side-container; + +} + +.env-right { + @include side-container; + + .margin-top-20 { + margin-top: 20px; + } + + .right-top { + display: flex; + justify-content: space-between; + padding: 16px 0 10px 9px; + + &-item { + display: flex; + flex-direction: column; + cursor: pointer; + + .value { + color: #7FB0FF; + font-family: 'logo'; + } + + .level { + color: #e8e8e8; + font-family: 'logo'; + + .point { + width: 6px; + height: 6px; + border-radius: 50%; + display: inline-block; + margin-right: 4px; + position: relative; + top: -2px; + } + + .yellow { + background: #D0DE78; + } + + .green { + background: #88E29F; + } + + .blue { + background: #0646b5; + } + + .orange { + background-color: #ff7000 + } + + .red { + background-color: #b90303 + } + + .zi { + background-color: #ad22be + } + } + + .label { + color: #e8e8e8; + font-family: 'logo'; + font-size: 14px; + text-align: center; + } + + &-sub { + width: 104px; + background: url("~@/assets/img/middle_line.png") no-repeat 50% 50%; + background-position: bottom; + padding-bottom: 12px; + margin-bottom: 9px; + text-align: center; + } + } + } + + .right-middle { + display: flex; + flex-wrap: wrap; + + .square-box { + width: 110px; + height: 70px; + background-size: cover; + padding: 13px 0 13px 0; + text-align: left; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + margin-right: 7px; + + b { + font-size: 24px; + font-family: DINPro; + color: #ffffff; + } + + img { + margin-right: 10px; + width: 26px; + height: 26px; + } + + .text-style { + font-size: 12px; + width: 73px; + } + + .icon-style { + position: relative; + top: 4px; + } + + &:nth-child(3n) { + width: 88px; + margin-left: 0; + + .text-style { + font-size: 12px; + width: 50px; + } + } + } + } + + .cycle-box { + padding-top: 30px; + } + + .right-cycle-box-con { + margin-bottom: 30px; + + .right-cycle-box { + background: url("~@/assets/img/env/cycle-bg.png") 50% 50% no-repeat; + width: 65px; + height: 65px; + background-size: cover; + text-align: center; + margin-right: 67px; + margin-bottom: 14px; + + .con-style-top { + height: 50%; + line-height: 2.4; + font-size: 16px; + font-weight: bold; + } + + .con-style-bottom { + height: 50%; + line-height: 2; + color: #BBBBBB; + } + + } + + &:nth-child(3n) { + .right-cycle-box { + margin-right: 0; + } + } + + &:nth-child(n+4) { + margin-bottom: 0; + } + + .word-ellipsis { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 64px; + color: #BBBBBB; + font-size: 12px; + } + + } +} + +.box-content { + display: flex; + flex-direction: column; + height: 1px; + flex: 1.78; +} + + +.d-flex { + display: flex; +} + +.flex-1 { + flex: 1; +} + +.flex-wrap { + flex-wrap: wrap; +} + +.is-justify-start { + justify-content: start; +} + +.is-justify-space-between { + justify-content: space-between; +} + +.is-justify-space-around { + justify-content: space-around; +} + +.equipment-content { + padding: 30px 0 0 40px; +} + +.env-small-label { + font-family: "logo"; + font-size: 14px; +} + +.env-number-stlye { + font-family: number; + font-weight: bold; + font-size: 20px; +} + +.radio-style { + width: 240px; + margin: 10px auto 0; + + .el-radio-group { + display: flex; + justify-content: space-between; + } + + .el-radio-button__orig-radio + .el-radio-button__inner { + width: 70px; + height: 24px; + border-radius: 12px 12px 12px 12px; + font-size: 12px; + color: #ffffff; + border: 1px solid rgba(255, 255, 255, 0); + background: transparent; + text-align: center; + margin-bottom: 5px; + padding: 0; + line-height: 22px; + font-family: "logo"; + + &:focus { + border: none; + } + } + + .el-radio-button__orig-radio:checked + .el-radio-button__inner { + background: rgba(208, 208, 208, 0.4); + border: 1px solid #ffffff; + padding: 0; + } + + &-two-btns { + width: 170px; + } + + &-auto { + width: 100%; + } +} + +.tabs-style { + width: 100%; + margin: 10px auto 0; + + .el-radio-group { + display: flex; + justify-content: space-between; + } + + .el-radio-button__orig-radio + .el-radio-button__inner { + width: 78px; + height: 24px; + font-size: 12px; + color: #ffffff; + background: transparent; + border-radius: 4px 4px 0px 0px; + text-align: center; + margin-bottom: 5px; + padding: 0; + line-height: 22px; + border: none; + box-shadow: none; + + &:focus { + border: none; + box-shadow: none; + } + } + + .el-radio-button__orig-radio:checked + .el-radio-button__inner { + background: linear-gradient(180deg, #E8E8E8 0%, rgba(232, 232, 232, 0) 100%); + border: none; + box-shadow: none; + padding: 0; + } + +} + +@mixin imgStyle { + width: 28px; + height: 22px; + background-size: cover; + margin: 5px auto; +} + +.formaldehydeExcessRate { + background: url("~@/assets/img/env/formaldehydeExcessRate.png") 50% 50% no-repeat; + @include imgStyle +} + +.methanolExceedance { + background: url("~@/assets/img/env/methanolExceedance.png") 50% 50% no-repeat; + @include imgStyle +} + +.NOExceedance { + background: url("~@/assets/img/env/NOExceedance.png") 50% 50% no-repeat; + @include imgStyle +} + + +.HCLExceedance { + background: url("~@/assets/img/env/HCLExceedance.png") 50% 50% no-repeat; + @include imgStyle +} + +.BenzeneExceedance { + background: url("~@/assets/img/env/BenzeneExceedance.png") 50% 50% no-repeat; + @include imgStyle +} + +.EthanolExceedance { + background: url("~@/assets/img/env/EthanolExceedance.png") 50% 50% no-repeat; + @include imgStyle +} + +.env-left, .env-right { + .card-box { + display: flex; + flex-wrap: wrap; + padding-top: 40px; + @mixin commonItemStyle { + display: flex; + flex-direction: column; + text-align: center; + margin-bottom: 30px; + &-top { + padding-bottom: 7px; + font-family: 'logo'; + width: 50px; + background: url("~@/assets/img/short_line.png") 50% 50% no-repeat; + background-position: bottom; + margin-bottom: 7px; + } + &-top-long { + padding-bottom: 7px; + font-family: 'logo'; + width: 105px; + background: url("~@/assets/img/long_line.png") 50% 50% no-repeat; + background-position: bottom; + margin-bottom: 7px; + } + &-bottom { + font-family: 'logo'; + } + } + + &-item { + @include commonItemStyle; + margin-right: 80px; + + &:nth-child(3n) { + margin-right: 0; + } + + /* + &-top{ + padding-bottom: 7px; + font-family: 'logo'; + width: 50px; + background: url("~@/assets/img/short_line.png") 50% 50% no-repeat; + background-position: bottom; + margin-bottom: 7px; + } + &-bottom{ + font-family: 'logo'; + }*/ + + } + + &-item-2 { + @include commonItemStyle; + margin-right: 20px; + margin-bottom: 0; + + &:nth-child(2n) { + margin-right: 0; + } + } + + &-item-4 { + @include commonItemStyle; + margin-right: 40px; + + &:nth-child(4n) { + margin-right: 0; + } + } + + &-item-5 { + @include commonItemStyle; + margin-right: 20px; + + &:nth-child(5n) { + margin-right: 0; + } + } + } +} + + +.line-chart-air, .bar-chart-air { + height: 168px; + flex: 1; +} + +.right-pie-chart { + height: 230px; + background: url('~@/assets/img/bar_chart_bg.png') 35% 50% no-repeat; +} + +.right-pie-chart-water { + height: 230px; + background: url('~@/assets/img/bar_chart_bg.png') 35% 50% no-repeat; +} + +.margin-top-23 { + margin-top: 23px; +} + +.linear-gradient { + position: relative; + height: 16px; + flex: 1; + + .line { + position: absolute; + width: 100%; + height: 10px; + top: 3px; + background: linear-gradient(90deg, rgba(157, 213, 172, 1) 0%, rgba(106, 205, 132, 1) 20%, rgba(197, 195, 122, 1) 20%, rgba(204, 217, 117, 1) 40%, rgba(202, 147, 85, 1) 40%, rgba(209, 93, 93, 1) 60%, rgba(208, 83, 145, 1) 60%, rgba(78, 13, 88, 1) 80%, rgba(75, 43, 43, 1) 80%, rgba(46, 6, 6, 1) 100%); + } + + .shu { + width: 1px; + background: #FFFFFF; + height: 16px; + position: absolute; + left: 40%; + } + + .background { + position: absolute; + height: 10px; + top: 3px; + background: #979797; + left: 40%; + width: 60%; + + } +} + +.air-bar-style { + display: flex; +} + +.air-number-style { + font-family: 'DINPro'; + font-size: 12px; + color: #FFFFFF; + width: 30px; + padding-left: 8px; + flex: 0; +} + +.air-top5-content { + width: 100%; + margin-top: 20px; + cursor: pointer; + + p { + font-size: 12px; + margin-bottom: 6px; + } + +} + +.right-bar-chart { + height: 600px; + //flex: 1; +} + +.hidden-bar-chart-top { + height: 400px; + +} + +.d-flex { + position: relative; + + .chartPart { + flex: 1; + height: 200px; + position: relative; + + .charts-style { + height: 240px; + } + } + + .chart-bg-center { + position: absolute; + border-radius: 50%; + width: 90px; + height: 90px; + background-color: transparent; + left: 25.5%; + margin-top: 30.5%; + z-index: 10; + } + + + .cod { + background: #B8ECFF; + + &-border { + border: 5px solid #B8ECFF; + } + } + + .ph { + background: #07D1FF; + + &-border { + border: 5px solid #07D1FF; + } + } + + .rjy { + background: #3078EA; + + &-border { + border: 5px solid #3078EA; + } + } + + .gmsj { + background: #83D37B; + + &-border { + border: 5px solid #83D37B; + } + } + + .shxyl { + background: #E4E24F; + + &-border { + border: 5px solid #E4E24F; + } + } + + .ad { + background: #D3A83B; + + &-border { + border: 5px solid #D3A83B; + } + } + + .hff { + background: #FFC1C1; + + &-border { + border: 5px solid #FFC1C1; + } + } + + .hg { + background: #FF3D3D; + + &-border { + border: 5px solid #FF3D3D; + } + } + + .pb { + background: #E93AFF; + + &-border { + border: 5px solid #E93AFF; + } + } + + .oil { + background: #6800C4; + + &-border { + border: 5px solid #6800C4; + } + } +} + +.flex-1-1-0 { + flex: 1 1 0; +} + +.flex-0 { + flex: 0; +} + +.img-con { + position: relative; + padding: 8px; + margin-top: 30px; + @mixin angleMark { + position: absolute; + width: 8px; + height: 8px; + background: url("~@/assets/img/angleMark.png") no-repeat; + } + + .left-top-m { + @include angleMark; + top: 0; + left: 0; + transform: rotate(90deg); + } + + .left-bottom-m { + @include angleMark; + bottom: 4px; + left: 0; + } + + .right-top-m { + @include angleMark; + right: 0; + top: 0; + transform: rotate(-180deg); + } + + .right-bottom-m { + @include angleMark; + right: 0; + bottom: 4px; + transform: rotate(270deg); + } +} + +.typePart { + width: 30%; + margin-top: 32px; + + .el-radio-button__orig-radio + .el-radio-button__inner { + width: 124px; + height: 22px; + border-radius: 8px 8px 8px 8px; + opacity: 1; + font-size: 12px; + color: #ffffff; + border: 0; + line-height: 3px; + background: transparent; + text-align: left; + padding-left: 20px; + } + + .el-radio-button__orig-radio:checked + .el-radio-button__inner { + background: rgba(208, 208, 208, 0.4); + opacity: 1; + border: 1px solid #B8ECFF; + font-size: 12px; + color: #ffffff; + line-height: 4px; + + } + + .check-box-color { + width: 12px; + height: 8px; + border-radius: 4px; + display: inline-block; + margin-right: 10px; + } + + .check-box-text { + display: inline-block; + } + + +} + +.bar-chart-gas { + height: 412px; +} + +.gas-left-bar-con { + height: 700px; +} + +.margin-top-30 { + margin-top: 30px; +} + +.margin-bottom-30 { + margin-bottom: 30px; +} + +.height-auto { + height: auto; +} + +.padding-top-20 { + padding-top: 20px !important; +} + +.risk-box { + display: flex; + margin-top: 20px; + margin-bottom: 14px; + + .risk-item { + display: flex; + align-items: center; + + p:nth-child(2) { + font-size: 12px; + } + } +} + +.zdwxy { + width: 32px; + height: 32px; + background: url("~@/assets/img/safety/zdwxy.png") no-repeat; + margin-right: 18px; +} + +.fxx { + width: 32px; + height: 32px; + background: url("~@/assets/img/safety/fxx.png") no-repeat; + margin-right: 18px; +} + +.company-icon { + width: 32px; + height: 32px; + background: url("~@/assets/img/safety/company.png") no-repeat; + margin-right: 14px; +} + +.sg-icon { + width: 32px; + height: 32px; + background: url("~@/assets/img/safety/shigong.png") no-repeat; + margin-right: 14px; +} + +.font-size-16 { + font-size: 16px; +} + +.font-size-14 { + font-size: 14px; +} + +.risk-pie-chart { + width: 48%; + height: 146px; + flex: 1; +} + +.spe-bar-chart-top { + height: 276px; + flex: 1; +} + +.spe-bar-chart-bottom { + height: 300px; + flex: 1; +} + +.risk-line-chart { + height: 168px; + flex: 1; +} + +.risk-title { + display: flex; + background: rgba(128, 128, 128, 0.8); + margin-top: 20px; + + &-item { + width: 50%; + flex: 1; + padding-left: 30px; + height: 34px; + font-size: 14px; + color: #E8E8E8; + line-height: 34px; + } +} + +.risk-list { + height: 100%; + overflow-y: auto; + @include scrollStyle(2px); + + &-box { + display: flex; + background: none; + opacity: 0; + + &-item { + width: 50%; + padding-left: 30px; + flex: 1; + height: 34px; + font-size: 12px; + color: #E8E8E8; + line-height: 34px; + text-overflow: ellipsis; + overflow: hidden; + word-break: break-all; + white-space: nowrap; + cursor: pointer; + } + + &:nth-child(2n) { + background: rgba(128, 128, 128, 0.3); + } + } +} + +.risk-pie-chart-all { + width: 100%; + height: 1px; + flex: 1; +} + +.risk-line-chart-all { + height: 190px; + width: 100%; + flex: 1; +} + +.flex-15 { + flex: 1.5; +} + +.cycle-icon { + width: 13px; + height: 13px; + border-radius: 50%; + background: #FFFFFF; + margin-right: 14px; + margin-left: 8px; +} + +.level-1 { + background: #7FB0FF; +} + +.level-1-text { + color: #7FB0FF; +} + +.level-2 { + background: #FADFA4; +} + +.level-2-text { + color: #FADFA4; +} + +.level-3 { + background: #C9FFD7; +} + +.level-3-text { + color: #C9FFD7; +} + +.level-4 { + background: #FFFFFF; +} + +.level-4-text { + color: #FFFFFF; +} + +.align-items-center { + align-items: center; +} + +.risk-info { + font-size: 14px; + + .content-style { + margin-bottom: 20px; + display: flex; + + span { + &:first-child { + width: 40%; + } + + &:last-child { + width: 60%; + } + + } + + + .hazard-style { + cursor: pointer; + color: #7FB0FF; + } + + .bg-gray { + width: 100%; + height: 186px; + padding: 30px 20px; + background: rgba(255, 255, 255, 0.2); + + div:first-child { + margin-bottom: 23px; + } + + .inside-con { + display: flex; + justify-content: space-between; + align-items: center; + + ul { + flex: 1; + + li { + display: flex; + justify-content: space-between; + font-size: 14px; + margin-bottom: 20px; + + span:first-child { + width: 40%; + } + + span:last-child { + width: 70%; + } + + &:last-child { + margin-bottom: 0; + } + } + } + + } + } + } + + &.hidden { + .content-style { + span { + &:first-child { + width: 30%; + } + + &:last-child { + width: 70%; + } + + } + + &.col-3 { + .cycle-icon { + width: 10px; + height: 10px; + } + + .red { + color: #DD7171; + } + + .red-bg { + background: #DD7171; + } + + span { + display: flex; + align-items: center; + + &:first-child { + width: 30%; + } + + &:last-child { + width: 30%; + } + + &:nth-child(2) { + width: 40%; + } + } + } + + .link-style { + color: #7FB0FF; + cursor: pointer; + } + } + } +} + +.specification-card { + padding: 0 16px; + margin-top: 16px; + height: 710px; + @include scrollStyle(2px); + overflow-y: auto; + + .mgb10 { + margin-bottom: 10px; + color: #FFF; + display: flex; + flex-wrap: wrap; + + span { + align-self: flex-start; + width: 70px; + flex: none + } + + .el-button--small { + padding: 0; + color: #58BFFF; + } + } + + .inner-title { + position: relative; + font-size: 14px; + color: #FFF9E9; + padding-left: 4px; + margin: 20px 0 10px; + /* &::before{ + content: ""; + display: block; + width: 6px; + height: 8px; + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%); + background: #FFC001; + border-radius: 3px; + }*/ + } + + .label-group { + width: 100%; + border: 1px solid #E8E8E8; + color: #FFF9E9; + font-size: 12px; + display: flex; + + &.half { + width: 50%; + } + + &.third { + width: 33.3%; + } + + .label { + min-width: 130px; + padding: 0 20px; + border-right: 1px solid #E8E8E8; + background: rgba(128, 128, 128, 0.6); + display: flex; + align-items: center; + justify-content: center; + } + + .content-block { + width: 1px; + flex: 1; + //line-height: 100%; + padding: 10px 20px; + } + } +} + +.safe { + @mixin font-style { + font-size: 12px; + font-weight: 400; + cursor: default; + } + + .el-step__head.is-finish { + border-color: #7FB0FF; + } + + .el-step__title.is-finish { + color: #7FB0FF; + @include font-style; + } + + .is-finish { + .el-step__icon.is-text { + background: #7FB0FF; + } + + .el-step__icon-inner { + font-weight: bold; + color: rgb(34 34 34); + line-height: 14px; + background-clip: text; + text-fill-color: rgba(153, 153, 153, 0.55); + } + } + + .el-step__head.is-process { + border-color: #E8E8E8; + } + + .el-step__title.is-process { + color: #E8E8E8; + @include font-style; + } + + .is-process { + .el-step__icon.is-text { + background: #E8E8E8; + } + + .el-step__icon-inner { + font-weight: bold; + color: rgb(34 34 34); + line-height: 14px; + background-clip: text; + text-fill-color: rgba(153, 153, 153, 0.55); + } + } + + .el-step__head.is-wait { + border-color: #999999; + } + + .el-step__title.is-wait { + color: #999999; + @include font-style; + } + + .is-wait { + .el-step__icon.is-text { + background: transparent; + } + + .el-step__icon-inner { + font-weight: bold; + color: rgba(153, 153, 153, 1); + line-height: 14px; + background-clip: text; + text-fill-color: rgba(153, 153, 153, 0.55); + } + } + + .el-step.is-center .el-step__line { + left: 68%; + right: -33%; + top: 14px; + } + + .el-step__icon { + width: 30px; + height: 30px; + } +} + +.el-collapse { + border: none; + + .el-collapse-item__header, .el-collapse-item__wrap { + background: transparent; + color: #A5A6A8; + font-size: 16px; + + .el-collapse-item__content { + color: #A5A6A8; + } + } + + .el-collapse-item__header { + border-bottom: 1px solid #A5A6A8; + } + + .el-collapse-item__wrap { + border: none; + } + + .el-collapse-item__arrow { + margin: 0 8px; + } + + .el-icon-arrow-right:before { + content: "\e790"; + } + + .el-collapse-item__arrow.is-active { + transform: rotate(180deg); + } + + .avatar-style { + //width: 88px; + height: 132px; + margin-right: 16px; + } + + .item-content { + padding-top: 20px; + color: #FFFFFF; + align-items: center; + + .collapse-top { + display: flex; + align-items: center; + + span { + font-size: 14px; + + &:first-child { + font-size: 20px; + } + } + } + + .collapse-bottom { + margin-top: 40px; + display: flex; + flex-wrap: wrap; + + span { + width: 50%; + margin-bottom: 20px; + + &:nth-child(n+3) { + margin-bottom: 0; + } + } + } + } + + .info-content { + display: flex; + flex-wrap: wrap; + color: #FFFFFF; + margin-top: 20px; + + span { + width: 33%; + margin-bottom: 20px; + + &:nth-child(n+4) { + margin-bottom: 0; + } + } + } + + .order-content { + margin-top: 20px; + + h3 { + color: #FFFFFF; + font-size: 16px; + font-weight: 400; + margin-bottom: 20px; + } + + img.code { + width: 88px; + height: 88px; + border: 3px solid #ffffff; + border-radius: 5px; + margin-right: 20px; + } + + &-item { + border-bottom: 1px solid #D8D8D8; + margin-bottom: 20px; + + span { + width: 50%; + margin-bottom: 20px; + } + } + + .margin-bottom-10 { + margin-bottom: 10px; + } + } + + .card-info { + position: relative; + + &-book { + position: absolute; + top: 15px; + right: 0; + color: #7DAEFF; + display: flex; + align-items: center; + cursor: pointer; + + img { + position: relative; + top: 2px; + } + } + + .el-collapse-item__header { + font-size: 14px; + } + + .el-collapse .el-collapse-item__header { + border: none; + } + } + + .goods-info { + border: 1px solid rgba(212, 229, 255, 0.3); + margin-top: 6px; + padding: 20px; + + span { + width: 50%; + margin-bottom: 20px; + + &:nth-child(2n), &:last-child { + margin-bottom: 0; + } + } + + } + +} + +.margin-left-40 { + margin-left: 40px; +} + +.tabs-energy { + display: flex; + margin: 0 auto; + text-align: center; + font-size: 14px; + + &-item { + cursor: pointer; + + &-text { + padding: 5px 10px; + } + + .under-line { + width: 40%; + height: 1px; + border: 1px solid transparent; + margin: 0 auto; + } + + .active { + border: 1px solid #FFFFFF; + } + } + +} + +.subTitle { + width: 330px; + height: 50px; + background: url("~@/assets/img/subTitle.png") no-repeat bottom; + text-align: center; + line-height: 50px; + font-size: 18px; + +} + +.two-item-line { + width: 50%; + text-align: center; + color: #FFFFFF; + padding: 23px 26px 10px 26px; + + .num-style { + padding-bottom: 8px; + border-bottom: 1px solid #D8D8D8; + font-size: 20px; + } + + .text-style { + margin-top: 8px; + font-size: 14px; + color: rgba(255, 255, 255, 0.8); + } +} + +.sub-title-legend { + width: 100%; + text-align: center; + padding: 10px 0; + padding-bottom: 0; + font-size: 12px; + color: rgba(255, 255, 255, 0.8); + margin-top: 10px; +} + +.energyRightTitle { + width: 332px; + height: 42px; + background: url("~@/assets/img/energy/energyTitle.png") no-repeat 50% 50%; + line-height: 42px; + font-size: 14px; + padding: 0 12px; + +} + +.center-box { + position: absolute; + left: -300%; + display: flex; + top: 0; + + &-card-bg { + width: 264px; + height: 148px; + background: url("~@/assets/img/energy/energyCardBg.png") no-repeat 50% 50%; + padding: 8px 16px; + } + + &-card-title { + font-size: 14px; + text-align: center; + color: rgba(255, 255, 255, 0.73); + display: flex; + align-items: center; + justify-content: center; + + & > img { + margin-right: 4px; + } + } + + &-card-bottom { + font-size: 12px; + color: rgba(255, 255, 255, 0.73); + margin-top: 12px; + + > div { + display: flex; + align-items: center; + } + } + +} + +.center-box-park { + position: absolute; + left: -290%; + display: flex; + + &-card-title { + font-size: 20px; + text-align: center; + } + + &-card-bg-park { + width: 241px; + height: 120px; + background: rgba(0, 0, 0, 0.5); + border-radius: 4px 4px 4px 4px; + padding: 20px 30px; + margin-right: 20px; + + &:last-child { + margin-right: 0; + } + } + + &-card-bottom { + font-size: 12px; + color: rgba(255, 255, 255, 0.73); + margin-top: 12px; + + > div { + display: flex; + align-items: center; + + img { + width: 32px; + height: 32px; + margin-right: 13px; + } + + .num-style { + font-family: DINPro; + font-size: 20px; + color: #FFFFFF; + text-shadow: 1px 1px 2px #C2EDFF; + } + } + } +} + +.four-items { + left: -332%; +} + +.company-list { + height: 200px; + overflow-y: auto; + @include scrollStyle(2px); + +} + +.company-list-box { + border-left: 4px solid #ffffff; + background: rgba(255, 255, 255, 0.15); + width: 330px; + height: 72px; + padding: 12px 32px; + margin-top: 5px; + font-size: 14px; + + .top { + margin-bottom: 5px; + } +} + +.steam-right-chart { + height: 300px; +} + +.group-title { + margin-bottom: 12px; + font-size: 16px; +} + +.group-title-plan { + margin-bottom: 2px; + font-size: 16px; + margin-top: 20px; +} + + +.personList { + font-size: 14px; + + & > div { + display: flex; + + .has-border { + border: 1px solid #cccccc; + margin-right: -1px; + margin-bottom: -1px; + } + } + + .head-style { + background: rgba(255, 255, 255, 0.15); + width: 106px; + padding: 5px 20px; + } + + &-content { + padding: 5px 20px; + width: 79%; + } +} + +.env-right .right-top-item .value.white-color { + color: #FFFFFF; + font-size: 20px; +} + +.env-right .right-top-item .level .point.red.large { + background: #FF5959; + width: 8px; + height: 8px; + top: -14px; +} + +.line-chart-emergency { + height: 100%; +} + +.last-time { + font-size: 14px; + margin-top: 20px; + margin-bottom: 20px; +} + +.blue-button { + width: 328px; + height: 34px; + background: #7FB0FF; + border-radius: 18px; + color: #000000; + text-align: center; + line-height: 34px; + cursor: pointer; +} + +.emergency-part { + .charts-box { + width: 100%; + height: 1px; + flex: 1; + display: flex; + align-items: center; + justify-content: center; + position: relative; + + .text { + font-size: 16px; + font-weight: 500; + color: rgba($color: $font-color, $alpha: 0.9); + line-height: 22px; + text-align: center; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + + .count { + font-size: 32px; + color: $font-color; + line-height: 45px; + } + } + } + + .pop-box { + width: 450px; + border-radius: 4px 4px 4px 4px; + opacity: 1; + border: 1px solid #FFFFFF; + background: rgba($color: #000000, $alpha: 0.6); + color: #E8E8E8; + padding: 30px; + font-size: 14px; + position: absolute; + + top: 40%; + transform: translate(-50%, -50%); + + .border { + width: 8px; + height: 8px; + position: absolute; + border-left: 1px solid #FFF; + border-top: 1px solid #FFF; + + &.l-t { + top: 10px; + left: 10px; + } + + &.r-t { + top: 10px; + right: 10px; + transform: rotate(90deg); + } + + &.r-b { + bottom: 10px; + right: 10px; + transform: rotate(180deg); + } + + &.l-b { + bottom: 10px; + left: 10px; + transform: rotate(270deg); + } + } + + .title { + font-size: 16px; + border-bottom: 1px solid #B1B1B1; + padding-bottom: 8px; + } + + .close { + position: absolute; + cursor: pointer; + right: 20px; + top: 20px; + color: #FFF; + font-size: 26px; + } + + .item-radius-style { + .el-input__inner { + background: rgba(0, 0, 0, 0.5); + border-radius: 20px; + border: 1px solid rgba(255, 255, 255, 0.6); + color: #d7d7d7; + } + + .el-textarea__inner { + color: #d7d7d7; + background: rgba(0, 0, 0, 0.5); + border-radius: 5px; + border: 1px solid rgba(255, 255, 255, 0.6); + } + + } + + .item-radius-style.el-select { + width: 100%; + } + + .el-form-item__label { + color: #FFFFFF; + } + + .btn-group { + justify-content: space-evenly; + + .btn-style { + width: 96px; + height: 34px; + background: rgba(255, 255, 255, 0.15); + border-radius: 17px; + border: 1px solid #FFFFFF; + text-align: center; + line-height: 34px; + cursor: pointer; + } + + .cancel { + background: rgba(255, 255, 255, 0); + } + } + + @mixin commonTableStyle { + span { + padding: 10px; + + &:first-child, &:nth-child(3), &:nth-child(4), &:nth-child(5) { + width: 160px; + } + + &:nth-child(2) { + width: 320px; + } + + &:last-child { + width: 240px; + } + } + } + + .head { + margin-top: 20px; + display: flex; + @include commonTableStyle; + background: rgba(216, 216, 216, 0.3); + + span { + border: 1px solid #7B7974; + margin-left: -1px; + } + } + + .tbody { + max-height: 400px; + overflow-y: auto; + @include scrollStyle(2px); + + .tr { + cursor: pointer; + display: flex; + @include commonTableStyle; + + &:nth-child(2n) { + background: rgba(216, 216, 216, 0.1); + } + } + } + + .el-pagination { + text-align: right; + margin-top: 10px; + } + + .el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev, .el-pagination.is-background .el-pager li { + background-color: transparent; + border: 1px solid #ffffff; + color: #FFFFFF; + + &:hover { + color: #FFFFFF; + } + } + + .el-pagination.is-background .el-pager li:not(.disabled).active { + background-color: rgba(216, 216, 216, 0.3); + } + } + + .left-position { + left: 270%; + } + + .right-position { + width: 306px; + left: -170%; + } + + .right-log-position { + width: 1200px; + left: -170%; + } +} + +.plan-card { + width: 330px; + height: 290px; + position: relative; + border: 1px solid rgba(255, 255, 255, 0.7); + background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%); + border-radius: 6px; + padding: 28px 20px; + + .border { + width: 8px; + height: 8px; + position: absolute; + border-left: 1px solid #FFF; + border-top: 1px solid #FFF; + + &.l-t { + top: 10px; + left: 10px; + } + + &.r-t { + top: 10px; + right: 10px; + transform: rotate(90deg); + } + + &.r-b { + bottom: 10px; + right: 10px; + transform: rotate(180deg); + } + + &.l-b { + bottom: 10px; + left: 10px; + transform: rotate(270deg); + } + } + + ul.plan li { + display: flex; + align-items: center; + font-size: 14px; + margin-bottom: 20px; + + &:last-child { + margin-bottom: 0; + } + } + + .position-icon { + width: 16px; + height: 16px; + background: url("~@/assets/icons/png/point.png"); + margin-left: 8px; + } + + .plan-btn { + width: 64px; + height: 24px; + background: rgba(255, 255, 255, 0.15); + border-radius: 16px; + border: 1px solid #FFFFFF; + cursor: pointer; + text-align: center; + font-size: 14px; + margin-right: 8px; + } + + .phone-btn { + width: 90px; + height: 24px; + background: rgba(255, 255, 255, 0.15); + border-radius: 16px; + border: 1px solid #FFFFFF; + cursor: pointer; + text-align: center; + font-size: 14px; + margin-left: 8px; + } + + .el-timeline-item { + .el-timeline-item__content { + color: #FFFFFF; + } + + &:nth-child(n+2) { + .el-timeline-item__content { + color: #7B7974; + } + } + } + +} + + +.plan-head { + margin-top: 16px; + display: flex; + font-size: 14px; + + span.span-item { + padding: 10px; + + &:first-child { + width: 100px; + padding-left: 20px; + } + + &:nth-child(2) { + width: 130px; + } + } + + span.span-item-2 { + padding: 10px; + + &:first-child { + width: 130px; + padding-left: 20px; + } + + &:nth-child(2) { + width: auto; + } + } + + span.span-item-3 { + padding: 10px; + width: 80px; + + &:first-child { + width: 150px; + padding-left: 20px; + } + + } + span.span-item-half { + padding: 10px; + width: 50%; + } + + background: rgba(216, 216, 216, 0.3); +} + +.plan-head-tbody { + max-height: 400px; + overflow-y: auto; + font-size: 14px; + @include scrollStyle(2px); + + .tr { + display: flex; + cursor: pointer; + + span.span-item { + padding: 10px; + + &:first-child { + width: 100px; + padding-left: 20px; + } + + &:nth-child(2) { + width: 150px; + } + } + + span.span-item-2 { + padding: 10px; + + &:first-child { + width: 130px; + padding-left: 20px; + } + + &:nth-child(2) { + width: auto; + } + } + + span.span-item-3 { + padding: 10px; + width: 80px; + + &:first-child { + width: 150px; + padding-left: 20px; + } + + + } + span.span-item-half { + padding: 10px; + width: 50%; + } + &:nth-child(2n) { + background: rgba(216, 216, 216, 0.1); + } + } +} + +.green-check { + .el-checkbox__label { + color: #ffffff; + font-size: 14px; + } + + .el-checkbox__inner { + border-radius: 50%; + width: 14px; + height: 14px; + } + + .el-checkbox__input.is-checked .el-checkbox__inner { + background-color: #80ED30; + border-color: #80ED30; + } + + .el-checkbox__input.is-checked + .el-checkbox__label { + color: #80ED30; + } + + .el-checkbox__inner::after { + border-color: #000000; + } + + .el-checkbox__input.is-checked .el-checkbox__inner::after { + //border: 1px solid #000; + } +} + +.plan-center { + position: absolute; + left: 150%; + + .progress-center { + width: 840px; + height: 60px; + background: rgba(0, 0, 0, 0.7); + box-shadow: 0px 10px 20px -10px rgba(0, 0, 0, 0.5); + border-radius: 41px; + border: 2px solid #FFAA59; + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 20px; + + .middle { + width: 420px; + display: flex; + flex-direction: column; + align-items: center; + } + + .center-btn { + width: 92px; + height: 32px; + background: rgba(255, 169, 0, 0.15); + border-radius: 16px; + border: 1px solid #FFA900; + font-size: 14px; + text-align: center; + line-height: 32px; + color: #FFA900; + cursor: pointer; + justify-content: center; + + i.el-icon-switch-button { + margin-right: 5px; + } + } + + .orange { + background-color: #FFA900; + display: inline-block; + margin-right: 8px; + } + + .center-btn.white-color { + background-color: #FFA900; + } + + .cycle-box { + border: 2px solid rgba(255, 255, 255, 0.4); + border-radius: 50%; + width: 18px; + height: 18px; + display: flex; + align-items: center; + justify-content: center; + } + + .line { + width: 80px; + height: 1px; + border: 1px solid rgba(255, 255, 255, 0.4); + } + + .active { + border-color: #FFA900; + color: #FFA900; + + &.bg-orange { + background: #FFA900; + + i.el-icon-check { + color: rgba(0, 0, 0, 0.7); + font-weight: bold; + } + } + } + + .white-color { + i.el-icon-switch-button, span { + color: #FFFFFF; + } + } + + .progress-title { + font-size: 12px; + color: rgba(255, 255, 255, 0.4); + + span { + margin-top: 5px; + + &:nth-child(2) { + margin-left: 130px; + margin-right: 130px; + } + } + } + } +} + +svg.loading-icon { + width: 10px; + height: 10px; +} + +.person-icon { + width: 32px; + height: 32px; + background: url("~@/assets/img/env/count.png") no-repeat; + margin-right: 14px; +} + +.radio-box { + display: flex; + justify-content: center; + + span { + cursor: pointer; + width: 96px; + height: 24px; + border-radius: 12px; + border: 1px solid rgba(255, 255, 255, 0); + font-size: 12px; + text-align: center; + line-height: 22px; + } + + span.active { + border-color: #FFFFFF; + } +} + +.group-title-plan-search { + margin-bottom: 2px; + font-size: 16px; + margin-top: 20px; + display: flex; + justify-content: space-between; + align-items: center; + + & > span { + width: 150px; + } + + .item-radius-style { + .el-input__inner { + background: rgba(0, 0, 0, 0.5); + border-radius: 20px; + border: 1px solid rgba(255, 255, 255, 0.6); + color: #d7d7d7; + } + + .el-textarea__inner { + color: #d7d7d7; + background: rgba(0, 0, 0, 0.5); + border-radius: 5px; + border: 1px solid rgba(255, 255, 255, 0.6); + } + + .el-icon-search { + cursor: pointer; + } + + } + +} + +.short-report { + height: 22px; + font-size: 16px; + font-weight: bold; + color: #FFFFFF; + line-height: 22px; + text-align: center; + text-shadow: 0 0 2px #9EC3FF; + margin-bottom: 5px; +} + +.short-report-line { + width: 186px; + height: 3px; + margin: 2px auto; + background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 50%, rgba(255, 255, 255, 0) 100%); + +} + +.short-card { + position: relative; + + .border { + width: 8px; + height: 8px; + position: absolute; + border-left: 1px solid #FFF; + border-top: 1px solid #FFF; + + &.l-t { + top: -4px; + left: -4px; + } + + &.r-t { + top: -4px; + right: -4px; + transform: rotate(90deg); + } + + &.r-b { + bottom: -4px; + right: -4px; + transform: rotate(180deg); + } + + &.l-b { + bottom: -4px; + left: -4px; + transform: rotate(270deg); + } + } + + &-bg { + height: 36px; + background: rgba(255, 255, 255, 0.1); + padding: 0 15px; + + .orange { + background: #FFA900; + margin-left: 0; + } + + .text { + color: rgba(255, 255, 255, 0.8); + font-size: 14px; + } + + .count { + font-size: 14px; + } + } +} + +.margin-top-0 { + margin-top: 0; +} + +.margin-bottom-20 { + margin-bottom: 20px; +} + +.task-list { + height: 400px; + overflow-y: auto; + @include scrollStyle(2px); + + .task-item { + width: 330px; + height: 92px; + background: rgba(0, 0, 0, 0.5); + border-radius: 6px; + margin-bottom: 10px; + font-size: 14px; + padding: 8px 16px; + cursor: pointer; + + &-top { + align-items: start; + } + } +} + +.text-left { + text-align: right; +} + +.margin-top-16 { + margin-top: 16px; +} + +.link { + position: relative; + display: block; + padding: 1px; + font-size: 12px; + font-weight: bold; + text-decoration: none; + color: #7DAEFF; +} + +.link:after, +.link:before { + content: ""; + display: block; + position: absolute; + -webkit-transition: all 0.5s ease-in-out; + transition: all 0.5s ease-in-out; + left: 20px; +} + +.link:before { + top: -7px; + width: 0; + height: 0; + left: 56px; + border-width: 8px; + border-style: solid; + border-color: transparent transparent transparent #7DAEFF; +} + +.link:after { + top: 50%; + right: 1em; + width: 40px; + height: 0.2em; + -webkit-transform: translate(0, -0.1em); + transform: translate(0, -0.1em); + background-color: #7DAEFF; +} + +.goods-part { + .search-style { + .el-input__inner { + border-radius: 20px; + background: transparent; + color: #FFFFFF; + + &:focus { + border-color: #FFFFFF; + } + } + } + + .goods-item { + width: 48px; + height: 48px; + background-color: rgba(0, 0, 0, 0.5); + border-radius: 4px; + border: 1px solid #666666; + margin-right: 4px; + margin-bottom: 4px; + + &-inside { + width: 42px; + height: 42px; + background-color: rgba(255, 255, 255, 0.15); + + .bg { + position: absolute; + bottom: 2px; + width: 88%; + height: 4px; + padding: 1px; + margin: 0 5px; + border-radius: 4px; + background-color: #131313; + display: flex; + align-items: center; + } + + .bg-line { + background-color: #131313; + } + + .inner { + height: 100%; + border-radius: 4px; + transition: all 0.5s cubic-bezier(0, 0.64, 0.36, 1); + } + + .line { + width: 80%; + background-color: rgba(255, 255, 255, 0.4); + } + + + } + } + + .red { + background-color: rgba(255, 89, 89, 0.3) !important; + border-color: rgba(255, 89, 89, 0.3); + } + + .red-line { + background-color: rgba(255, 89, 89, 0.7) !important; + } + + .red-border { + border-color: rgba(255, 89, 89, 0.3); + } + + .orange { + background-color: rgba(255, 158, 55, 0.3); + border-color: rgba(255, 158, 55, 0.3); + } + + .orange-line { + background-color: rgba(255, 158, 55, 0.7) !important; + } + + .orange-border { + border-color: rgba(255, 158, 55, 0.3); + } + + .yellow { + background-color: rgba(255, 237, 98, 0.3); + border-color: rgba(255, 237, 98, 0.3); + } + + .yellow-line { + background-color: rgba(255, 237, 98, 0.7) !important; + } + + .yellow-border { + border-color: rgba(255, 237, 98, 0.3); + } + + .blue { + background-color: rgba(125, 174, 255, 0.3); + border-color: rgba(125, 174, 255, 0.3); + } + + .blue-line { + background-color: rgba(125, 174, 255, 0.7) !important; + } + + .blue-border { + border-color: rgba(125, 174, 255, 0.3); + } + +} + +.line-gray { + width: 40px; + height: 1px; + border: 1px solid rgba(255, 255, 255, 0.1); + position: relative; + right: -62px; +} + +.line-blue { + width: 80px; + height: 1px; + border: 1px solid #7DAEFF; + position: relative; + margin-left: 10px; +} + +.round-style { + width: 12px; + height: 12px; + border: 2px solid rgba(255, 255, 255, 0.4); + border-radius: 50%; + margin-left: 72px; + margin-right: 6px; +} + +.is-judgment { + margin-left: 0; +} + +.is-justify-space-center { + justify-content: center; +} + +.red-bag { + width: 40px; + height: 18px; + background: #FF5959; + border-radius: 9px; + color: #FFFFFF; + text-align: center; + line-height: 18px; + font-size: 12px; +} + +.tooltip { + .left-icon { + margin-right: 16px; + } + + .content { + width: 128px; + display: flex; + flex-direction: column; + justify-content: space-between; + + p { + font-size: 12px; + } + + .title { + font-size: 14px; + } + } +} +.el-tooltip__popper.is-dark{ + background: rgba(0, 0, 0, 0.8); + box-shadow: 0px 10px 10px -4px rgba(0,0,0,0.8); + border-radius: 4px; + border: 1px solid #666666; +} +.tooltip-line { + &.bg { + width: 100%; + height: 8px; + border-radius: 4px; + background-color: rgba(255, 255, 255, 0.15); + display: flex; + align-items: center; + margin-top: 8px; + } + + &.bg-line { + background-color: rgba(255, 255, 255, 0.15); + + .inner { + height: 100%; + border-radius: 4px; + transition: all 0.5s cubic-bezier(0, 0.64, 0.36, 1); + } + + .line { + width: 80%; + background-color: rgba(255, 255, 255, 0.4); + } + + .red-line { + background-color: rgba(255, 89, 89, 0.7) !important; + } + + .orange-line { + background-color: rgba(255, 158, 55, 0.7) !important; + } + + .yellow-line { + background-color: rgba(255, 237, 98, 0.7) !important; + } + + .blue-line { + background-color: rgba(125, 174, 255, 0.7) !important; + } + } + + +} +.text-right{ + text-align: right; +} +.padding-right{ + &-30{ + padding-right: 30px !important; + } +} +.is-justify-content-end{ + justify-content: flex-end; +} +.goods-part{ + .cycle-icon{ + background: rgba(255,255,255,0.7); + &.red { + background-color: rgba(255, 89, 89, 1); + } + &.orange { + background-color: rgba(255, 158, 55, 1); + } + &.yellow { + background-color: rgba(255, 237, 98, 1); + } + &.blue { + background-color: rgba(125, 174, 255, 1); + } + } +} +.statistics-item{ + width: 48.5%; + height: 40px; + background: rgba(255,255,255,0.1); + margin-bottom: 12px; + font-size: 14px; +} +.emergency-part .pop-box.left-list-position{ + width: 960px; + left: 280%; + z-index: 9999999; + & .head span:first-child, + & .head span:nth-child(4), + & .head span:nth-child(5){ + width: 250px; + } + & .tbody .tr span:first-child, + & .tbody .tr span:nth-child(4), + & .tbody .tr span:nth-child(5){ + width: 250px; + } + & .head span:nth-child(2),& .tbody .tr span:nth-child(2), + & .head span:nth-child(3), + & .tbody .tr span:nth-child(3){ + width: 150px; + } + .cycle-icon{ + background: rgba(255,255,255,0.7); + &.red { + background-color: rgba(255, 89, 89, 1); + } + &.orange { + background-color: rgba(255, 158, 55, 1); + } + &.yellow { + background-color: rgba(255, 237, 98, 1); + } + &.blue { + background-color: rgba(125, 174, 255, 1); + } + } + .pop-list-style{ + align-items: center; + } + .search-style { + width: 300px; + .el-input__inner { + border-radius: 20px; + background: transparent; + color: #FFFFFF; + + &:focus { + border-color: #FFFFFF; + } + } + } + .blue{ + color: #7DAEFF; + cursor: pointer; + } +} + + diff --git a/src/assets/video/camera.mp4 b/src/assets/video/camera.mp4 new file mode 100644 index 0000000..acb08b5 Binary files /dev/null and b/src/assets/video/camera.mp4 differ diff --git a/src/bootstrap.ts b/src/bootstrap.ts new file mode 100644 index 0000000..43cfa3c --- /dev/null +++ b/src/bootstrap.ts @@ -0,0 +1,120 @@ +import Vue from 'vue' +import App from './App.vue' +import router from './router' +import store from './store' +import ElementUI from 'element-ui'; +import 'element-ui/lib/theme-chalk/index.css'; +import SvgComponent from "hbt-common/components/svg.component.vue" +import EchartsComponent from "hbt-common/components/echarts.component.vue" +import "@/assets/common/icons"; +import 'animate.css'; +import Mock from "mockjs" +import { MockData } from './mock'; +import 'echarts-wordcloud'; + +Vue.config.productionTip = false; +document.title = process.env.VUE_APP_TITLE || '汉邦唐全真数字服务平台'; + +if(process.env.NODE_ENV==="development"){ + Mock.mock(/getPeopleList/, "get", MockData.getPeopleList()); + Mock.mock(/getExpertList/, "get", MockData.getPeopleList()); + Mock.mock(/getCarList/, "get", MockData.getCarList()); + Mock.mock(/getStopCarList/, "get", MockData.getStopCarList()); + Mock.mock(/getBlackCarList/, "get", MockData.getBlackCarList()); + Mock.mock(/getCameraList/, "get", MockData.getCameraList()); + Mock.mock(/getCompanyList/, "get", MockData.getCompanyList()); + Mock.mock(/getBounds/, "get", MockData.getBounds()); + Mock.mock(/getRealBounds/, "get", MockData.getRealBounds()); + Mock.mock(/getSafeBounds/, "get", MockData.getSafeBounds()); + Mock.mock(/getPlanBounds/, "get", MockData.getPlanBounds()); + Mock.mock(/getSafeLine/, "get", MockData.getSafeLine()); + Mock.mock(/getRiskList/, "get", MockData.getRiskList()); + Mock.mock(/getRiskDetail/, "post", (options)=>MockData.getRiskDetail(options)); + Mock.mock(/getSepList/, "get", MockData.getSepList()); + Mock.mock(/getHiddenList/, "get", MockData.hiddenList()); + Mock.mock(/getGasData/, "get", MockData.getRandomData()); + Mock.mock(/getRoilData/, "get", MockData.getRandomData()); + Mock.mock(/getBadGasData/, "get", MockData.getRandomData()); + Mock.mock(/getCleanWaterData/, "get", MockData.getRandomData()); + Mock.mock(/getWaterEnvData/, "get", MockData.getRandomData()); + Mock.mock(/getTzWrwData/, "get", MockData.getRandomData()); + Mock.mock(/getBadWaterData/, "get", MockData.getRandomData()); + Mock.mock(/getDangrousWorkData/, "get", MockData.getDangrousWork()); + Mock.mock(/getFourList/, "get", MockData.getFourList()); + Mock.mock(/getParkFourList/, "get", MockData.getFourList2()); + Mock.mock(/getCheckPoint/, "get", MockData.getCheckPoint()); + Mock.mock(/getStoreList/, "get", MockData.getStoreList()); + Mock.mock(/getBuildingList/, "get", MockData.getBuildingList()); + Mock.mock(/getDangrous/, "get", MockData.getDangrous()); + Mock.mock(/getWaringList/, "get", MockData.getWaringList()); + Mock.mock(/getHiddenDangrous/, "get", MockData.getHiddenDangrous()); + + +} + +// 批量引入本地svg +const svgs = require.context("./assets/icons/svg",false,/\.svg$/); +const requireAll = (requireContext:any) => { + requireContext.keys().map(requireContext); +} +requireAll(svgs) + +// 全局注册组件 +Vue.component("hbt-svg",SvgComponent) +Vue.component("hbt-echarts",EchartsComponent) +Vue.directive("runNumber",{ + bind:(el,binding)=>{ + const num = binding.value; + // 2s 加载完 + let step = 0; + const add = ()=>{ + el.innerText ="" + Math.round(Math.random() * num); + step++; + if(step<10){ + setTimeout(()=>{ + add(); + },50) + }else{ + el.innerText ="" + num; + step=0; + } + } + add(); + }, + update:(el,binding)=>{ + const num = binding.value; + // 2s 加载完 + let step = 0; + const add = ()=>{ + el.innerText ="" + Math.round(Math.random() * num); + step++; + if(step<10){ + setTimeout(()=>{ + add(); + },50) + }else{ + el.innerText ="" + num; + step=0; + } + } + add(); + }, + unbind:(el,binding)=>{ + // + } +}) +Vue.directive("list",{ + bind:(el,binding)=>{ + const timer = (binding.value+1)*100 + setTimeout(()=>{ + el.classList.add("animate__fadeInRight") + },timer) + }, +}) + +Vue.use(ElementUI); +new Vue({ + router, + store, + render: h => h(App) +}).$mount('#app') diff --git a/src/components/closePark/boundsManager/left.component.vue b/src/components/closePark/boundsManager/left.component.vue new file mode 100644 index 0000000..6a05097 --- /dev/null +++ b/src/components/closePark/boundsManager/left.component.vue @@ -0,0 +1,214 @@ + + + diff --git a/src/components/closePark/boundsManager/right.component.vue b/src/components/closePark/boundsManager/right.component.vue new file mode 100644 index 0000000..5337bb9 --- /dev/null +++ b/src/components/closePark/boundsManager/right.component.vue @@ -0,0 +1,160 @@ + + + diff --git a/src/components/closePark/dangrousCar/left.component.vue b/src/components/closePark/dangrousCar/left.component.vue new file mode 100644 index 0000000..9120ea4 --- /dev/null +++ b/src/components/closePark/dangrousCar/left.component.vue @@ -0,0 +1,309 @@ + + + \ No newline at end of file diff --git a/src/components/closePark/dangrousCar/right.component.vue b/src/components/closePark/dangrousCar/right.component.vue new file mode 100644 index 0000000..c11ec91 --- /dev/null +++ b/src/components/closePark/dangrousCar/right.component.vue @@ -0,0 +1,315 @@ + + + diff --git a/src/components/closePark/home/left.component.vue b/src/components/closePark/home/left.component.vue new file mode 100644 index 0000000..195be52 --- /dev/null +++ b/src/components/closePark/home/left.component.vue @@ -0,0 +1,171 @@ + + + diff --git a/src/components/closePark/home/right.component.vue b/src/components/closePark/home/right.component.vue new file mode 100644 index 0000000..eed6ca8 --- /dev/null +++ b/src/components/closePark/home/right.component.vue @@ -0,0 +1,292 @@ + + + \ No newline at end of file diff --git a/src/components/closePark/peopleCar/left.component.vue b/src/components/closePark/peopleCar/left.component.vue new file mode 100644 index 0000000..c63ba34 --- /dev/null +++ b/src/components/closePark/peopleCar/left.component.vue @@ -0,0 +1,473 @@ + + + diff --git a/src/components/closePark/peopleCar/right.component.vue b/src/components/closePark/peopleCar/right.component.vue new file mode 100644 index 0000000..1ccc989 --- /dev/null +++ b/src/components/closePark/peopleCar/right.component.vue @@ -0,0 +1,164 @@ + + + \ No newline at end of file diff --git a/src/components/companyFile/detail.component.vue b/src/components/companyFile/detail.component.vue new file mode 100644 index 0000000..b206322 --- /dev/null +++ b/src/components/companyFile/detail.component.vue @@ -0,0 +1,975 @@ + + + diff --git a/src/components/companyFile/echarts.ts b/src/components/companyFile/echarts.ts new file mode 100644 index 0000000..49ac376 --- /dev/null +++ b/src/components/companyFile/echarts.ts @@ -0,0 +1,104 @@ +const carOpt = { + series: [ + { + type: 'gauge', + startAngle: 180, + endAngle: 0, + center: ['50%', '75%'], + radius: '100%', + min: 0, + max: 1, + splitNumber: 8, + axisLine: { + lineStyle: { + width: 4, + color: [ + [0.25, '#FF6E76'], + [0.5, '#FDDD60'], + [0.75, '#58D9F9'], + [1, '#7CFFB2'] + ] + } + }, + pointer: { + icon: 'path://M12.8,0.7l12,40.1H0.7L12.8,0.7z', + length: '12%', + width: 20, + offsetCenter: [0, '-50%'], + itemStyle: { + color: 'inherit' + } + }, + axisTick: { + length: 6, + lineStyle: { + color: '#FFF', + width: 1 + } + }, + splitLine: { + length: 10, + lineStyle: { + color: '#FFF', + width: 3 + } + }, + axisLabel: { + color: '#FFF', + fontSize: 12, + distance: -30, + rotate: 'tangential', + }, + title: { + offsetCenter: [0, '-10%'], + fontSize: 12, + color:"#FFF" + }, + detail: { + fontSize: 16, + offsetCenter: [0, '-35%'], + valueAnimation: true, + color: 'inherit' + }, + data: [ + { + value: 0.7, + name: 'Grade Rating' + } + ] + } + ] +} + +const wordOpt = { + tooltip: { + show:false + }, + series: [{ + type: 'wordCloud', + gridSize: 20, + sizeRange: [12, 50], + rotationRange: [0, 0], + shape: 'circle', + textStyle: { + normal: { + color: function () { + return 'rgb(' + [ + Math.round(Math.random() * 255), + Math.round(Math.random() * 255), + Math.round(Math.random() * 255) + ].join(',') + ')'; + } + }, + emphasis: { + } + }, + data: [ + // ... + ] + }] +}; + export default{ + carOpt, + wordOpt + } \ No newline at end of file diff --git a/src/components/companyFile/left.component.vue b/src/components/companyFile/left.component.vue new file mode 100644 index 0000000..c4c2f0e --- /dev/null +++ b/src/components/companyFile/left.component.vue @@ -0,0 +1,272 @@ + + + \ No newline at end of file diff --git a/src/components/companyFile/pic.component.vue b/src/components/companyFile/pic.component.vue new file mode 100644 index 0000000..6a5b0c7 --- /dev/null +++ b/src/components/companyFile/pic.component.vue @@ -0,0 +1,442 @@ + + + diff --git a/src/components/companyFile/right.component.vue b/src/components/companyFile/right.component.vue new file mode 100644 index 0000000..467ca1b --- /dev/null +++ b/src/components/companyFile/right.component.vue @@ -0,0 +1,237 @@ + + + diff --git a/src/components/dealPopUp.component.vue b/src/components/dealPopUp.component.vue new file mode 100644 index 0000000..ea0336d --- /dev/null +++ b/src/components/dealPopUp.component.vue @@ -0,0 +1,155 @@ + + + + diff --git a/src/components/energy/electricity/left/chartData.js b/src/components/energy/electricity/left/chartData.js new file mode 100644 index 0000000..fc7d5c0 --- /dev/null +++ b/src/components/energy/electricity/left/chartData.js @@ -0,0 +1,447 @@ +export const lineChartData = function () { + let xLabel = ['Q1', 'Q2', 'Q3', 'Q4']; + let dataValue = [175, 90, 150, 75]; + let dataValue1 = [50, 75, 175, 50]; + return { + color: ['#ECFF7F', '#7FB0FF'], + legend: { + show: true, + top: '10%', + icon: "rect", + itemWidth: 10, // 图例标记的图形宽度。 + // itemGap: 20, // 图例每项之间的间隔。 + itemHeight: 10, // 图例标记的图形高度。 + textStyle: { + color: '#fff', + fontSize: 14, + padding: [0, 8, 0, 8] + } + }, + grid: { + top: '30%', + left: '10%', + right: '5%', + bottom: '20%', + }, + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + data: xLabel + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name: '单位产值能耗', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 3, + }, + }, + symbolSize: 8, //设定实心点的大小 + data: dataValue, + }, + { + name: '单位产值用水', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 3, + }, + }, + symbolSize: 8, //设定实心点的大小 + data: dataValue1, + } + ] + } +} +export const pieChartData = function () { + /* 数据 */ + let nameList = ["石油化工", "无机化工", "有机化工", "精细化工", '化肥农药', '塑料制品', '橡胶制品']; + let valueList = [70, 60, 50, 40, 30, 20, 10]; + + /* 整合 */ + let colorList = ["#FFFFFF", "#FADFA4", "#7FB0FF", "#ECFF7F", "#DD7171", "#C9FFD7", "#947FEA"]; + let data = []; + nameList.map((item, index) => { + data.push({ + name: item, + value: valueList[index] + }) + }) + + /* 函数 */ +// 数字分割:1653 => 1,653 + const formatNum = (value) => { + if (!value && value !== 0) return 0; + let str = value.toString(); + let reg = str.indexOf(".") > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g; + return str.replace(reg, "$1,"); + } + + return { + color: colorList, + legend: { + show: true, + top: 20, + right: 0, + orient: "vertical", //改变排列方式 + itemWidth: 10, + itemHeight: 10, + textStyle: { + color: '#fff', + fontSize: 12, + padding: [0, 8, 0, 8] + } + }, + tooltip: { + trigger: 'item', + axisPointer: { + type: 'none' + }, + position: function (point, params, dom, rect, size) { // 提示框位置 + let x = 0; + let y = 0; + //提示框定位 + if (point[0] + size.contentSize[0] < size.viewSize[0]) { + x = point[0] + } else if (point[0] > size.contentSize[0]) { + x = point[0] - size.contentSize[0] + } else { + x = "30%" + } + if (point[1] > size.contentSize[1]) { + y = point[1] - size.contentSize[1] + } else if (point[1] + size.contentSize[1] < size.viewSize[1]) { + y = point[1] + } else { + y = "30%" + } + return [x, y]; + }, + formatter: params => { + let pieColor = params["color"]; + return ` +
+
+ ${params.name} +
+
${formatNum(params.value)}kW·h${[params.percent]}%
+ ` + }, + extraCssText: 'opacity: 0.8;background-color:#050F1B;padding:16px;box-shadow: 1px 6px 15px 1px rgba(0,0,0,0.13);border-radius: 4px;filter: blur(undefinedpx);border:none;' + }, + series: [{ + type: 'pie', + roseType: true, + center: ['40%', '50%'], + radius: ["30%", "80%"], + label: { + show: false, + }, + itemStyle: { + borderRadius: 3 + }, + data: data + }] + }; +} + +/** + * 废气右侧折线图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const barChartData = function (data, xAxisData, legend, $echarts) { + + return { + color: ['#ECFF7F'], + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + }, + backgroundColor: 'rgba(0,0,0,0.4)', + textStyle: { + color: '#ffffff' + } + }, + legend: { + show: false, + textStyle: { + color: '#ffffff' + } + }, + grid: { + left: '3%', + top: '15%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学', '海利得', '榆林化工', + '联化科1', '立本作物1', '圣丰集团1', '茂盛生物1', '利尔化学1', '海利得1', '榆林化工1', + '联化科2', '立本作物2', '圣丰集团2', '茂盛生物2', '利尔化学2', '海利得2', '榆林化工2', + '联化科3', '立本作物3', '圣丰集团3', '茂盛生物3', '利尔化学3', '海利得3', '榆林化工3', + '联化科4', '立本作物4', '圣丰集团4', '茂盛生物4', '利尔化学4', '海利得4', '榆林化工4', + '联化科5', '立本作物5', '圣丰集团5', '茂盛生物5', '利尔化学5', '海利得5', '榆林化工5', + ], + + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//label旋转角度 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + dataZoom: { + type: "inside", + orient: "vertical", + startValue: 0, + endValue: 7 + }, + series: [ + { + name: '耗电量', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item => Math.floor(Math.random() * 100)) + } + ] + }; +} +/** + * 散点图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const pointChartData = function (data, xAxisData, legend, $echarts) { + + return { + tooltip: { + trigger: 'item', + backgroundColor: 'rgba(0,0,0,0.4)', + textStyle: { + color: '#ffffff' + } + }, + xAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学', '榆林化工'], + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'value', + name: '产值:单位万元', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + nameTextStyle: { + padding: [0, 0, 10, 30] + } + }, + color: ['#FF5959', '#FADFA4', '#C9FFD7'], + series: [ + { + name: '联化科', + data: [ + { + value: ['联化科', 200], + symbolSize: 28, + itemStyle: {color: '#FF5959'}, + } + ], + type: 'scatter' + }, { + name: '立本作物', + data: [ + { + value: ['立本作物', 150], + symbolSize: 16, + itemStyle: {color: '#FADFA4'}, + } + ], + type: 'scatter' + }, { + name: '圣丰集团', + data: [ + { + value: ['圣丰集团', 150], + symbolSize: 16, + itemStyle: {color: '#FADFA4'}, + + } + ], + type: 'scatter' + }, { + name: '茂盛生物', + data: [ + { + value: ['茂盛生物', 50], + symbolSize: 10, + itemStyle: {color: '#C9FFD7'}, + } + ], + type: 'scatter' + }, { + name: '利尔化学', + data: [ + { + value: ['利尔化学', 50], + symbolSize: 16, + itemStyle: {color: '#C9FFD7'}, + } + ], + type: 'scatter' + }, { + name: '榆林化工', + data: [ + { + value: ['榆林化工', 150], + symbolSize: 32, + itemStyle: {color: '#FF5959'}, + } + ], + type: 'scatter' + }, + /*{ + data: [ + { + value: [20, 200], + symbolSize:28, + itemStyle:{color:'#FF5959'}, + name:'联化科' + },{ + value: [40, 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + name:'立本作物' + },{ + value: [60, 150], + symbolSize:16, + itemStyle:{color:'#C9FFD7'}, + name:'圣丰集团' + },{ + value: [80, 50], + symbolSize:10, + itemStyle:{color:'#C9FFD7'}, + name:'茂盛生物' + },{ + value: [100, 50], + symbolSize:16, + name:'利尔化学' + },{ + value: [120, 150], + symbolSize:32, + name:'榆林化工' + } + ], + type: 'scatter' + },*/ + ] + } +} diff --git a/src/components/energy/electricity/left/electricityLeft.component.html b/src/components/energy/electricity/left/electricityLeft.component.html new file mode 100644 index 0000000..4481117 --- /dev/null +++ b/src/components/energy/electricity/left/electricityLeft.component.html @@ -0,0 +1,21 @@ +
+
+ + 企业实时耗电排行 + + +
+ 企业产值耗电分析 +
+
圆圈面积:耗能(tce)
+ +
+ 行业耗电分析 +
+ +
+ +
diff --git a/src/components/energy/electricity/left/electricityLeft.component.ts b/src/components/energy/electricity/left/electricityLeft.component.ts new file mode 100644 index 0000000..0af2b3a --- /dev/null +++ b/src/components/energy/electricity/left/electricityLeft.component.ts @@ -0,0 +1,112 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./electricityLeft.component.html" +import {pieChartData, barChartData,pointChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" + +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class ElectricityLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //散点图数据 + pointChartData: any = {}; + //叠加柱状图 + barChartData: any = {}; + //定时器 + timer: any = null; + // 排放达标率数据 + pieChartData: any = {} + //柱状图实例 + bar: any = {} + //折线图实例 + pie: any = {} + //散点图实例 + point: any = {} + + //获取图表实例 + getEcharts(e, type) { + this[type] = e + if (type === 'pie') { + this.pieChartData = pieChartData(); + } + if (type === 'bar') { + this.barChartData = barChartData([[90, 55, 80, 85, 25, 60, 60], [160, 80, 130, 133, 40, 95, 95]], this.xAxisData, this.legend, echarts) + this.bar.on('click', function (params) { + console.log(params); + }); + } + if (type === 'point') { + this.pointChartData = pointChartData([[90, 55, 80, 85, 25, 60, 60], [160, 80, 130, 133, 40, 95, 95]], this.xAxisData, this.legend, echarts) + } + } + + //折线图x轴坐标 + xAxisData = ['石油化工', '无机化工', '有机化工', '精细化工', '化肥农药', '塑料制品', '橡胶制品'] + //设置排放变化趋势默认选中项 + lineChartType = '排放量' + + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.pie.resize() + this.bar.resize() + }, 300) + } + autoRun(){ + if (this.barChartData.dataZoom.endValue === 42){ + this.barChartData.dataZoom.startValue = 0 + this.barChartData.dataZoom.endValue = 7; + }else{ + this.barChartData.dataZoom.startValue+=1; + this.barChartData.dataZoom.endValue+=1; + } + //最新出来的数据 + let selectDataE = this.barChartData.yAxis.data[this.barChartData.dataZoom.endValue] + + this.bar.setOption(this.barChartData) + } + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + + //图例 + legend = ["水 (吨)", + "标准煤 (吨)"] + + mounted() { + this.timer = setInterval(() => { + this.setChartData() + this.autoRun() + }, 6000) + + + window.addEventListener("resize", this.resize); + + } + + setChartData() { + this.pie.clear() + this.pie.setOption(this.pieChartData) + this.point.clear() + this.point.setOption(this.pointChartData) + } + + beforeDestroy() { + clearInterval(this.timer) + } + +} + diff --git a/src/components/energy/electricity/right/chartData.js b/src/components/energy/electricity/right/chartData.js new file mode 100644 index 0000000..cdfa236 --- /dev/null +++ b/src/components/energy/electricity/right/chartData.js @@ -0,0 +1,597 @@ +export const lineChartData = function () { + let xLabel = new Array(30).fill(0).map((item,i)=> i+1); + let dataValue = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + return { + color:['#ECFF7F'], + dataZoom : { + type:"inside", + // orient:"vertical", + startValue:0, + endValue:10 + }, + legend: { + show: false, + top: '10%', + icon: "rect", + itemWidth: 10, // 图例标记的图形宽度。 + // itemGap: 20, // 图例每项之间的间隔。 + itemHeight: 10, // 图例标记的图形高度。 + textStyle: { + color: '#fff', + fontSize: 14, + padding: [0, 8, 0, 8] + } + }, + grid: { + top: '5%', + left: '10%', + right: '5%', + bottom: '20%', + }, + xAxis: { + name:'日', + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + data: xLabel + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name: '单位产值能耗', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 2, + }, + }, + symbolSize: 4, //设定实心点的大小 + data: dataValue, + areaStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: 'rgba(236,255,127,0.4)' + }, { + offset: 1, color: 'rgba(236,255,127,0.3)' + }], + global: false + } + }, + }, + } + ] + } +} +export const lineChartData1 = function () { + let xLabel = new Array(30).fill(0).map((item,i)=> i+1); + let dataValue = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + return { + color:['#FADFA4'], + dataZoom : { + type:"inside", + // orient:"vertical", + startValue:0, + endValue:10 + }, + legend: { + show: false, + top: '10%', + icon: "rect", + itemWidth: 10, // 图例标记的图形宽度。 + // itemGap: 20, // 图例每项之间的间隔。 + itemHeight: 10, // 图例标记的图形高度。 + textStyle: { + color: '#fff', + fontSize: 14, + padding: [0, 8, 0, 8] + } + }, + grid: { + top: '5%', + left: '10%', + right: '5%', + bottom: '20%', + }, + xAxis: { + name:'日', + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + data: xLabel + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name: '单位产值能耗', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 2, + }, + }, + symbolSize: 4, //设定实心点的大小 + data: dataValue, + areaStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: 'rgba(250,223,164,0.5)' + }, { + offset: 1, color: 'rgba(250,223,164,0.3)' + }], + global: false + } + }, + }, + } + ] + } +} +export const pieChartData = function () { + return { + + title: { + text: `75%`, + subtext: '达成率', + left: 'center', + top: 'center', + itemGap: 0, + textStyle: { + fontSize: 28, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 10, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + angleAxis: { + max: 100, + // 隐藏刻度线 + show: false, + startAngle: 90 + }, + radiusAxis: { + type: 'category', + show: true, + axisLabel: { + show: false, + }, + axisLine: { + show: false, + }, + axisTick: { + show: false + }, + }, + polar: { + radius: '150%' //图形大小 + }, + series: [{ + type: 'bar', + data: ['75'], + showBackground: true, + roundCap: true, + backgroundStyle: { + color: 'rgba(64, 76, 76, 1)', + }, + coordinateSystem: 'polar', + barWidth: 20, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: '#ECFF7F' + }, { + offset: 1, color: '#ECFF7F' + }], + global: false + } + } + }, + }] + } +} + + + +// 修改弹框内容用到的方法 +function replaceHtmlWord(str) { + return str.replace("NO2", "NO2") + .replace("SO2", "SO2") + .replace("O3", "O3") + // .replace("PM10", "PM10") + // .replace("PM2.5", "PM2.5") + +} + +// 修改图例文字用到的方法 +function replaceWords(str) { + return str.replace("NO2", "NO{sub|2}") + .replace("SO2", "SO{sub|2}") + .replace("O3", "O{sub|3}") + // .replace("PM2.5", "PM{sub|2.5}") + // .replace("PM10", "PM{sub|10}"); +} + +/** + * 废气右侧折线图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const barChartData = function (data, xAxisData, legend,$echarts) { + + return { + color:['#FADFA4','#7FB0FF','#FFFFFF','#947FEA'], + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + }, + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + }, + legend: { + textStyle:{ + color:'#ffffff' + } + }, + grid: { + left: '3%', + top: '15%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学', '海利得','榆林化工', + '联化科1', '立本作物1', '圣丰集团1', '茂盛生物1', '利尔化学1', '海利得1','榆林化工1', + '联化科2', '立本作物2', '圣丰集团2', '茂盛生物2', '利尔化学2', '海利得2','榆林化工2', + '联化科3', '立本作物3', '圣丰集团3', '茂盛生物3', '利尔化学3', '海利得3','榆林化工3', + '联化科4', '立本作物4', '圣丰集团4', '茂盛生物4', '利尔化学4', '海利得4','榆林化工4', + '联化科5', '立本作物5', '圣丰集团5', '茂盛生物5', '利尔化学5', '海利得5','榆林化工5', + ], + + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//label旋转角度 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + dataZoom : { + type:"inside", + orient:"vertical", + startValue:0, + endValue:7 + }, + series: [ + { + name: '煤炭', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '石油', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '天然气', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '煤气', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + } + ] + }; +} +/** + * 散点图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const pointChartData = function (data, xAxisData, legend,$echarts) { + + return { + tooltip: { + trigger: 'item', + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + }, + xAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学','榆林化工'], + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'value', + name:'产值:单位万元', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + nameTextStyle: { + padding: [0, 0, 10, 30] + } + }, + color:['#FF5959','#FADFA4','#C9FFD7'], + series: [ + { + name:'联化科', + data: [ + { + value: ['联化科', 200], + symbolSize:28, + itemStyle:{color:'#FF5959'}, + } + ], + type: 'scatter' + },{ + name:'立本作物', + data: [ + { + value: ['立本作物', 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + } + ], + type: 'scatter' + },{ + name:'圣丰集团', + data: [ + { + value: ['圣丰集团', 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + + } + ], + type: 'scatter' + },{ + name:'茂盛生物', + data: [ + { + value: ['茂盛生物', 50], + symbolSize:10, + itemStyle:{color:'#C9FFD7'}, + } + ], + type: 'scatter' + },{ + name:'利尔化学', + data: [ + { + value: ['利尔化学', 50], + symbolSize:16, + itemStyle:{color:'#C9FFD7'}, + } + ], + type: 'scatter' + },{ + name:'榆林化工', + data: [ + { + value: ['榆林化工', 150], + symbolSize:32, + itemStyle:{color:'#FF5959'}, + } + ], + type: 'scatter' + }, + /*{ + data: [ + { + value: [20, 200], + symbolSize:28, + itemStyle:{color:'#FF5959'}, + name:'联化科' + },{ + value: [40, 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + name:'立本作物' + },{ + value: [60, 150], + symbolSize:16, + itemStyle:{color:'#C9FFD7'}, + name:'圣丰集团' + },{ + value: [80, 50], + symbolSize:10, + itemStyle:{color:'#C9FFD7'}, + name:'茂盛生物' + },{ + value: [100, 50], + symbolSize:16, + name:'利尔化学' + },{ + value: [120, 150], + symbolSize:32, + name:'榆林化工' + } + ], + type: 'scatter' + },*/ + ] + } +} diff --git a/src/components/energy/electricity/right/electricityRight.component.html b/src/components/energy/electricity/right/electricityRight.component.html new file mode 100644 index 0000000..741e99c --- /dev/null +++ b/src/components/energy/electricity/right/electricityRight.component.html @@ -0,0 +1,85 @@ +
+
+ + 节能减排 + +
+ 节能目标 (KW·h) + {{detail.target}} +
+ + + 单位产品耗能趋势分析 + +
单位:kgce/m³
+ + + 单位产值耗能趋势分析 + +
单位:kgce/万元
+ + +
+
+
+
+ + 今日用电量(kW·h) +
+ +
+
+ 同比: + + {{dayData.yoy}}% +
+
+ 环比: + + {{dayData.round}}% +
+
+
+
+
+ + 本周用电量(kW·h) +
+ +
+
+ 同比: + + {{weekData.yoy}}% +
+
+ 环比: + + {{weekData.round}}% +
+
+
+
+
+ + 本月用电量(kW·h) +
+ +
+
+ 同比: + + {{monthData.yoy}}% +
+
+ 环比: + + {{monthData.round}}% +
+
+
+
+
diff --git a/src/components/energy/electricity/right/electricityRight.component.ts b/src/components/energy/electricity/right/electricityRight.component.ts new file mode 100644 index 0000000..6ad3c35 --- /dev/null +++ b/src/components/energy/electricity/right/electricityRight.component.ts @@ -0,0 +1,166 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./electricityRight.component.html" +import {pieChartData, lineChartData,lineChartData1} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" +import ScrollNumberComponent from "@/components/scrollNumber.component.vue" + + +import {getRandNumBetween} from "@/utils/utils"; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + ScrollNumberComponent, + }, +}) +export default class ElectricityRightComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + // + lightningIcon = require("@/assets/img/energy/dian.png"); + green = require("@/assets/img/energy/green-arr.png"); + red = require("@/assets/img/energy/red-arr.png"); + //单位产品耗能趋势分析数据 + lineChartData: any = {}; + //单位产值耗能趋势分析数据 + lineChartData1: any = {}; + //定时器 + timer: any = null; + // 排放达标率数据 + pieChartData: any = {} + //柱状图实例 + bar: any = {} + //折线图实例 + pie: any = {} + //单位产品耗能趋势分析实例 + line: any = {} + //单位产值耗能趋势分析图实例 + line1: any = {} + //企业详情数据 + detail = { + target:130 + } + //日用燃料数据 + dayData = { + dayNum:1139.83, + yoy:11.2, + round:18 + } + //周用燃料数据 + weekData = { + dayNum:7978.81, + yoy:20.3, + round:14 + } + //月用燃料数据 + monthData = { + dayNum:34194.9, + yoy:18.3, + round:20 + } + changeCardData(type){ + const temp:any = { + dayNum:getRandNumBetween(1000,2000), + yoy:getRandNumBetween(10,20), + round:getRandNumBetween(10,20) + }; + + switch (type) { + case "dayData": + + break; + case "weekData": + temp.dayNum *= 7 + temp.yoy = getRandNumBetween(10,20) + temp.round = getRandNumBetween(10,20) + break; + case "monthData": + temp.dayNum *= 30 + temp.yoy = getRandNumBetween(10,20) + temp.round = getRandNumBetween(10,20) + break; + default: + break + } + temp.dayNum = Number(temp.dayNum.toFixed(2)) + this[type] = temp +} + //获取图表实例 + getEcharts(e, type) { + this[type] = e + if (type === 'pie') { + this.pieChartData = pieChartData(); + } + if (type === 'line1') { + this.lineChartData1 = lineChartData1() + } + if (type === 'line') { + this.lineChartData = lineChartData() + } + } + + //折线图x轴坐标 + xAxisData = ['石油化工', '无机化工', '有机化工', '精细化工', '化肥农药', '塑料制品', '橡胶制品'] + //设置排放变化趋势默认选中项 + lineChartType = '排放量' + + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.pie.resize() + this.line.resize() + this.line1.resize() + }, 300) + } + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + + //图例 + legend = ["水 (吨)", + "标准煤 (吨)"] + + mounted() { + this.timer = setInterval(() => { + this.setChartData() + // this.autoRun() + // this.dayNum = Math.floor(Math.random()*10000) + this.changeCardData('dayData') + this.changeCardData('weekData') + this.changeCardData('monthData') + }, 6000) + window.addEventListener("resize", this.resize); + } + + setChartData() { + this.pie.clear() + function getRandomIntInRange(min, max) { + return Math.floor(Math.random() * (max - min) + min); + } + const num = getRandomIntInRange(7,10)*10 + this.pieChartData.title.text = num+'%' + this.pieChartData.series.data =[num] + this.pie.setOption(this.pieChartData) + this.line.clear() + this.lineChartData.series[0].data = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + this.line.setOption(this.lineChartData) + this.line1.clear() + this.lineChartData1.series[0].data = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + this.line1.setOption(this.lineChartData1) + this.detail.target = parseInt(String(Math.random()*200)) + } + + beforeDestroy() { + clearInterval(this.timer) + } + +} + diff --git a/src/components/energy/gas/left/chartData.js b/src/components/energy/gas/left/chartData.js new file mode 100644 index 0000000..bb06c8f --- /dev/null +++ b/src/components/energy/gas/left/chartData.js @@ -0,0 +1,503 @@ +export const lineChartData = function () { + let xLabel = ['Q1', 'Q2', 'Q3', 'Q4']; + let dataValue = [175, 90, 150, 75]; + let dataValue1 = [50, 75, 175, 50]; + return { + color:['#ECFF7F','#7FB0FF'], + legend: { + show: true, + top: '10%', + icon: "rect", + itemWidth: 10, // 图例标记的图形宽度。 + // itemGap: 20, // 图例每项之间的间隔。 + itemHeight: 10, // 图例标记的图形高度。 + textStyle: { + color: '#fff', + fontSize: 14, + padding: [0, 8, 0, 8] + } + }, + grid: { + top: '30%', + left: '10%', + right: '5%', + bottom: '20%', + }, + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + data: xLabel + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name: '单位产值能耗', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 3, + }, + }, + symbolSize: 8, //设定实心点的大小 + data: dataValue, + }, + { + name: '单位产值用水', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 3, + }, + }, + symbolSize: 8, //设定实心点的大小 + data: dataValue1, + } + ] + } +} +export const pieChartData = function () { + /* 数据 */ + let nameList = ["石油化工", "无机化工", "有机化工", "精细化工",'化肥农药','塑料制品','橡胶制品']; + let valueList = [70,60,50, 40, 30, 20,10]; + + /* 整合 */ + let colorList = ["#FFFFFF", "#FADFA4", "#7FB0FF", "#ECFF7F", "#DD7171","#C9FFD7","#947FEA"]; + let data = []; + nameList.map((item,index) => { + data.push({ + name:item, + value:valueList[index] + }) + }) + + /* 函数 */ +// 数字分割:1653 => 1,653 + const formatNum = (value) => { + if (!value && value !== 0) return 0; + let str = value.toString(); + let reg = str.indexOf(".") > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g; + return str.replace(reg, "$1,"); + } + + return { + color: colorList, + legend:{ + show:true, + top:20, + right: 0, + orient: "vertical", //改变排列方式 + itemWidth: 10, + itemHeight: 10, + textStyle: { + color: '#fff', + fontSize: 12, + padding: [0, 8, 0, 8] + } + }, + tooltip: { + trigger: 'item', + axisPointer: { + type: 'none' + }, + position: function (point, params, dom, rect, size) { // 提示框位置 + let x = 0; + let y = 0; + //提示框定位 + if (point[0] + size.contentSize[0] < size.viewSize[0]) { + x = point[0] + } else if (point[0] > size.contentSize[0]) { + x = point[0] - size.contentSize[0] + } else { + x = "30%" + } + if (point[1] > size.contentSize[1]) { + y = point[1] - size.contentSize[1] + } else if (point[1] + size.contentSize[1] < size.viewSize[1]) { + y = point[1] + } else { + y = "30%" + } + return [x, y]; + }, + formatter: params => { + let pieColor = params["color"]; + return ` +
+
+ ${params.name} +
+
${formatNum(params.value)}kgce${[params.percent]}%
+ ` + }, + extraCssText: 'opacity: 0.8;background-color:#050F1B;padding:16px;box-shadow: 1px 6px 15px 1px rgba(0,0,0,0.13);border-radius: 4px;filter: blur(undefinedpx);border:none;' + }, + series: [{ + type: 'pie', + roseType: true, + center:['40%','50%'], + radius: ["30%", "80%"], + label: { + show: false, + }, + itemStyle:{ + borderRadius:3 + }, + data: data + }] + }; +} + + + +// 修改弹框内容用到的方法 +function replaceHtmlWord(str) { + return str.replace("NO2", "NO2") + .replace("SO2", "SO2") + .replace("O3", "O3") + // .replace("PM10", "PM10") + // .replace("PM2.5", "PM2.5") + +} + +// 修改图例文字用到的方法 +function replaceWords(str) { + return str.replace("NO2", "NO{sub|2}") + .replace("SO2", "SO{sub|2}") + .replace("O3", "O{sub|3}") + // .replace("PM2.5", "PM{sub|2.5}") + // .replace("PM10", "PM{sub|10}"); +} + +/** + * 废气右侧折线图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const barChartData = function (data, xAxisData, legend,$echarts) { + + return { + color:['#FADFA4','#7FB0FF','#C9FFD7','#947FEA'], + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + }, + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + }, + legend: { + textStyle:{ + color:'#ffffff' + } + }, + grid: { + left: '3%', + top: '15%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学', '海利得','榆林化工', + '联化科1', '立本作物1', '圣丰集团1', '茂盛生物1', '利尔化学1', '海利得1','榆林化工1', + '联化科2', '立本作物2', '圣丰集团2', '茂盛生物2', '利尔化学2', '海利得2','榆林化工2', + '联化科3', '立本作物3', '圣丰集团3', '茂盛生物3', '利尔化学3', '海利得3','榆林化工3', + '联化科4', '立本作物4', '圣丰集团4', '茂盛生物4', '利尔化学4', '海利得4','榆林化工4', + '联化科5', '立本作物5', '圣丰集团5', '茂盛生物5', '利尔化学5', '海利得5','榆林化工5', + ], + + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//label旋转角度 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + dataZoom : { + type:"inside", + orient:"vertical", + startValue:0, + endValue:7 + }, + series: [ + { + name: '煤炭', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '石油', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '天然气', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '煤气', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + } + ] + }; +} +/** + * 散点图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const pointChartData = function (data, xAxisData, legend,$echarts) { + + return { + tooltip: { + trigger: 'item', + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + }, + xAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学','榆林化工'], + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'value', + name:'产值:单位万元', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + nameTextStyle: { + padding: [0, 0, 10, 30] + } + }, + color:['#FF5959','#FADFA4','#C9FFD7'], + series: [ + { + name:'联化科', + data: [ + { + value: ['联化科', 200], + symbolSize:28, + itemStyle:{color:'#FF5959'}, + } + ], + type: 'scatter' + },{ + name:'立本作物', + data: [ + { + value: ['立本作物', 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + } + ], + type: 'scatter' + },{ + name:'圣丰集团', + data: [ + { + value: ['圣丰集团', 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + + } + ], + type: 'scatter' + },{ + name:'茂盛生物', + data: [ + { + value: ['茂盛生物', 50], + symbolSize:10, + itemStyle:{color:'#C9FFD7'}, + } + ], + type: 'scatter' + },{ + name:'利尔化学', + data: [ + { + value: ['利尔化学', 50], + symbolSize:16, + itemStyle:{color:'#C9FFD7'}, + } + ], + type: 'scatter' + },{ + name:'榆林化工', + data: [ + { + value: ['榆林化工', 150], + symbolSize:32, + itemStyle:{color:'#FF5959'}, + } + ], + type: 'scatter' + }, + /*{ + data: [ + { + value: [20, 200], + symbolSize:28, + itemStyle:{color:'#FF5959'}, + name:'联化科' + },{ + value: [40, 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + name:'立本作物' + },{ + value: [60, 150], + symbolSize:16, + itemStyle:{color:'#C9FFD7'}, + name:'圣丰集团' + },{ + value: [80, 50], + symbolSize:10, + itemStyle:{color:'#C9FFD7'}, + name:'茂盛生物' + },{ + value: [100, 50], + symbolSize:16, + name:'利尔化学' + },{ + value: [120, 150], + symbolSize:32, + name:'榆林化工' + } + ], + type: 'scatter' + },*/ + ] + } +} diff --git a/src/components/energy/gas/left/energyGasLeft.component.ts b/src/components/energy/gas/left/energyGasLeft.component.ts new file mode 100644 index 0000000..6739381 --- /dev/null +++ b/src/components/energy/gas/left/energyGasLeft.component.ts @@ -0,0 +1,112 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./gasLeft.component.html" +import {pieChartData, barChartData,pointChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" + +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class EnergyGasLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //散点图数据 + pointChartData: any = {}; + //叠加柱状图 + barChartData: any = {}; + //定时器 + timer: any = null; + // 排放达标率数据 + pieChartData: any = {} + //柱状图实例 + bar: any = {} + //折线图实例 + pie: any = {} + //散点图实例 + point: any = {} + + //获取图表实例 + getEcharts(e, type) { + this[type] = e + if (type === 'pie') { + this.pieChartData = pieChartData(); + } + if (type === 'bar') { + this.barChartData = barChartData([[90, 55, 80, 85, 25, 60, 60], [160, 80, 130, 133, 40, 95, 95]], this.xAxisData, this.legend, echarts) + this.bar.on('click', function (params) { + console.log(params); + }); + } + if (type === 'point') { + this.pointChartData = pointChartData([[90, 55, 80, 85, 25, 60, 60], [160, 80, 130, 133, 40, 95, 95]], this.xAxisData, this.legend, echarts) + } + } + + //折线图x轴坐标 + xAxisData = ['石油化工', '无机化工', '有机化工', '精细化工', '化肥农药', '塑料制品', '橡胶制品'] + //设置排放变化趋势默认选中项 + lineChartType = '排放量' + + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.pie.resize() + this.bar.resize() + }, 300) + } + autoRun(){ + if (this.barChartData.dataZoom.endValue === 42){ + this.barChartData.dataZoom.startValue = 0 + this.barChartData.dataZoom.endValue = 7; + }else{ + this.barChartData.dataZoom.startValue+=1; + this.barChartData.dataZoom.endValue+=1; + } + //最新出来的数据 + let selectDataE = this.barChartData.yAxis.data[this.barChartData.dataZoom.endValue] + + this.bar.setOption(this.barChartData) + } + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + + //图例 + legend = ["水 (吨)", + "标准煤 (吨)"] + + mounted() { + this.timer = setInterval(() => { + this.setChartData() + this.autoRun() + }, 6000) + + + window.addEventListener("resize", this.resize); + + } + + setChartData() { + this.pie.clear() + this.pie.setOption(this.pieChartData) + this.point.clear() + this.point.setOption(this.pointChartData) + } + + beforeDestroy() { + clearInterval(this.timer) + } + +} + diff --git a/src/components/energy/gas/left/gasLeft.component.html b/src/components/energy/gas/left/gasLeft.component.html new file mode 100644 index 0000000..8ae4210 --- /dev/null +++ b/src/components/energy/gas/left/gasLeft.component.html @@ -0,0 +1,21 @@ +
+
+ + 企业耗能排行 + + +
+ 行业耗能统计 +
+
圆圈面积:耗能(tce)
+ +
+ 产值能耗分析 +
+ +
+ +
diff --git a/src/components/energy/gas/right/chartData.js b/src/components/energy/gas/right/chartData.js new file mode 100644 index 0000000..2862060 --- /dev/null +++ b/src/components/energy/gas/right/chartData.js @@ -0,0 +1,599 @@ +export const lineChartData = function () { + let xLabel = new Array(30).fill(0).map((item,i)=> i+1); + let dataValue = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + return { + color:['#EA7F7F'], + dataZoom : { + type:"inside", + // orient:"vertical", + startValue:0, + endValue:10 + }, + legend: { + show: false, + top: '10%', + icon: "rect", + itemWidth: 10, // 图例标记的图形宽度。 + // itemGap: 20, // 图例每项之间的间隔。 + itemHeight: 10, // 图例标记的图形高度。 + textStyle: { + color: '#fff', + fontSize: 14, + padding: [0, 8, 0, 8] + } + }, + grid: { + top: '5%', + left: '10%', + right: '5%', + bottom: '20%', + }, + xAxis: { + name:'日', + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + data: xLabel + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name: '单位产值能耗', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 2, + }, + }, + symbolSize: 4, //设定实心点的大小 + data: dataValue, + areaStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: 'rgba(234,127,127,0.3)' + }, { + offset: 1, color: 'rgba(234,127,127,0.3)' + }], + global: false + } + }, + }, + } + ] + } +} +export const lineChartData1 = function () { + let xLabel = new Array(30).fill(0).map((item,i)=> i+1); + let dataValue = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + return { + color:['#FFA900'], + dataZoom : { + type:"inside", + // orient:"vertical", + startValue:0, + endValue:10 + }, + legend: { + show: false, + top: '10%', + icon: "rect", + itemWidth: 10, // 图例标记的图形宽度。 + // itemGap: 20, // 图例每项之间的间隔。 + itemHeight: 10, // 图例标记的图形高度。 + textStyle: { + color: '#fff', + fontSize: 14, + padding: [0, 8, 0, 8] + } + }, + grid: { + top: '5%', + left: '10%', + right: '5%', + bottom: '20%', + }, + xAxis: { + name:'日', + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + data: xLabel + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name: '单位产值能耗', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 2, + }, + }, + symbolSize: 4, //设定实心点的大小 + data: dataValue, + areaStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: 'rgba(255,169,0,0.5)' + }, { + offset: 1, color: 'rgba(255,169,0,0.3)' + }], + global: false + } + }, + }, + } + ] + } +} +export const pieChartData = function () { + + + return { + + title: { + text: `75%`, + subtext: '达成率', + left: 'center', + top: 'center', + itemGap: 0, + textStyle: { + fontSize: 28, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 10, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + angleAxis: { + max: 100, + // 隐藏刻度线 + show: false, + startAngle: 90 + }, + radiusAxis: { + type: 'category', + show: true, + axisLabel: { + show: false, + }, + axisLine: { + show: false, + }, + axisTick: { + show: false + }, + }, + polar: { + radius: '150%' //图形大小 + }, + series: [{ + type: 'bar', + data: ['75'], + showBackground: true, + roundCap: true, + backgroundStyle: { + color: 'rgba(64, 76, 76, 1)', + }, + coordinateSystem: 'polar', + barWidth: 20, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: '#EA7F7F' + }, { + offset: 1, color: '#EA7F7F' + }], + global: false + } + } + }, + }] + } +} + + + +// 修改弹框内容用到的方法 +function replaceHtmlWord(str) { + return str.replace("NO2", "NO2") + .replace("SO2", "SO2") + .replace("O3", "O3") + // .replace("PM10", "PM10") + // .replace("PM2.5", "PM2.5") + +} + +// 修改图例文字用到的方法 +function replaceWords(str) { + return str.replace("NO2", "NO{sub|2}") + .replace("SO2", "SO{sub|2}") + .replace("O3", "O{sub|3}") + // .replace("PM2.5", "PM{sub|2.5}") + // .replace("PM10", "PM{sub|10}"); +} + +/** + * 废气右侧折线图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const barChartData = function (data, xAxisData, legend,$echarts) { + + return { + color:['#FADFA4','#7FB0FF','#FFFFFF','#947FEA'], + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + }, + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + }, + legend: { + textStyle:{ + color:'#ffffff' + } + }, + grid: { + left: '3%', + top: '15%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学', '海利得','榆林化工', + '联化科1', '立本作物1', '圣丰集团1', '茂盛生物1', '利尔化学1', '海利得1','榆林化工1', + '联化科2', '立本作物2', '圣丰集团2', '茂盛生物2', '利尔化学2', '海利得2','榆林化工2', + '联化科3', '立本作物3', '圣丰集团3', '茂盛生物3', '利尔化学3', '海利得3','榆林化工3', + '联化科4', '立本作物4', '圣丰集团4', '茂盛生物4', '利尔化学4', '海利得4','榆林化工4', + '联化科5', '立本作物5', '圣丰集团5', '茂盛生物5', '利尔化学5', '海利得5','榆林化工5', + ], + + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//label旋转角度 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + dataZoom : { + type:"inside", + orient:"vertical", + startValue:0, + endValue:7 + }, + series: [ + { + name: '煤炭', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '石油', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '天然气', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '煤气', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + } + ] + }; +} +/** + * 散点图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const pointChartData = function (data, xAxisData, legend,$echarts) { + + return { + tooltip: { + trigger: 'item', + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + }, + xAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学','榆林化工'], + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'value', + name:'产值:单位万元', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + nameTextStyle: { + padding: [0, 0, 10, 30] + } + }, + color:['#FF5959','#FADFA4','#C9FFD7'], + series: [ + { + name:'联化科', + data: [ + { + value: ['联化科', 200], + symbolSize:28, + itemStyle:{color:'#FF5959'}, + } + ], + type: 'scatter' + },{ + name:'立本作物', + data: [ + { + value: ['立本作物', 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + } + ], + type: 'scatter' + },{ + name:'圣丰集团', + data: [ + { + value: ['圣丰集团', 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + + } + ], + type: 'scatter' + },{ + name:'茂盛生物', + data: [ + { + value: ['茂盛生物', 50], + symbolSize:10, + itemStyle:{color:'#C9FFD7'}, + } + ], + type: 'scatter' + },{ + name:'利尔化学', + data: [ + { + value: ['利尔化学', 50], + symbolSize:16, + itemStyle:{color:'#C9FFD7'}, + } + ], + type: 'scatter' + },{ + name:'榆林化工', + data: [ + { + value: ['榆林化工', 150], + symbolSize:32, + itemStyle:{color:'#FF5959'}, + } + ], + type: 'scatter' + }, + /*{ + data: [ + { + value: [20, 200], + symbolSize:28, + itemStyle:{color:'#FF5959'}, + name:'联化科' + },{ + value: [40, 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + name:'立本作物' + },{ + value: [60, 150], + symbolSize:16, + itemStyle:{color:'#C9FFD7'}, + name:'圣丰集团' + },{ + value: [80, 50], + symbolSize:10, + itemStyle:{color:'#C9FFD7'}, + name:'茂盛生物' + },{ + value: [100, 50], + symbolSize:16, + name:'利尔化学' + },{ + value: [120, 150], + symbolSize:32, + name:'榆林化工' + } + ], + type: 'scatter' + },*/ + ] + } +} diff --git a/src/components/energy/gas/right/energyGasRight.component.ts b/src/components/energy/gas/right/energyGasRight.component.ts new file mode 100644 index 0000000..0e4093f --- /dev/null +++ b/src/components/energy/gas/right/energyGasRight.component.ts @@ -0,0 +1,166 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./gasRight.component.html" +import {pieChartData, barChartData,lineChartData,lineChartData1} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" +import ScrollNumberComponent from "@/components/scrollNumber.component.vue" + +import * as echarts from 'echarts'; +import {getRandNumBetween} from "@/utils/utils"; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + ScrollNumberComponent, + }, +}) +export default class EnergyGasRightComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + // + gasIcon = require("@/assets/img/energy/mei.png"); + green = require("@/assets/img/energy/green-arr.png"); + red = require("@/assets/img/energy/red-arr.png"); + //单位产品耗能趋势分析数据 + lineChartData: any = {}; + //单位产值耗能趋势分析数据 + lineChartData1: any = {}; + //定时器 + timer: any = null; + // 排放达标率数据 + pieChartData: any = {} + //柱状图实例 + bar: any = {} + //折线图实例 + pie: any = {} + //单位产品耗能趋势分析实例 + line: any = {} + //单位产值耗能趋势分析图实例 + line1: any = {} + //企业详情数据 + detail = { + target:130 + } + //日用燃料数据 + dayData = { + dayNum:1139.83, + yoy:11.2, + round:18 + } + //周用燃料数据 + weekData = { + dayNum:7978.81, + yoy:20.3, + round:14 + } + //月用燃料数据 + monthData = { + dayNum:34194.9, + yoy:18.3, + round:20 + } + changeCardData(type){ + const temp:any = { + dayNum:getRandNumBetween(1000,2000), + yoy:getRandNumBetween(10,20), + round:getRandNumBetween(10,20) + }; + + switch (type) { + case "dayData": + + break; + case "weekData": + temp.dayNum *= 7 + temp.yoy = getRandNumBetween(10,20) + temp.round = getRandNumBetween(10,20) + break; + case "monthData": + temp.dayNum *= 30 + temp.yoy = getRandNumBetween(10,20) + temp.round = getRandNumBetween(10,20) + break; + default: + break + } + temp.dayNum = Number(temp.dayNum.toFixed(2)) + this[type] = temp +} + //获取图表实例 + getEcharts(e, type) { + this[type] = e + if (type === 'pie') { + this.pieChartData = pieChartData(); + } + if (type === 'line1') { + this.lineChartData1 = lineChartData1() + } + if (type === 'line') { + this.lineChartData = lineChartData() + } + } + + //折线图x轴坐标 + xAxisData = ['石油化工', '无机化工', '有机化工', '精细化工', '化肥农药', '塑料制品', '橡胶制品'] + //设置排放变化趋势默认选中项 + lineChartType = '排放量' + + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.pie.resize() + this.line.resize() + this.line1.resize() + }, 300) + } + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + + //图例 + legend = ["水 (吨)", + "标准煤 (吨)"] + + mounted() { + this.timer = setInterval(() => { + this.setChartData() + // this.autoRun() + // this.dayNum = Math.floor(Math.random()*10000) + this.changeCardData('dayData') + this.changeCardData('weekData') + this.changeCardData('monthData') + }, 6000) + window.addEventListener("resize", this.resize); + } + + setChartData() { + this.pie.clear() + function getRandomIntInRange(min, max) { + return Math.floor(Math.random() * (max - min) + min); + } + const num = getRandomIntInRange(7,10)*10 + this.pieChartData.title.text = num+'%' + this.pieChartData.series.data =[num] + this.pie.setOption(this.pieChartData) + this.line.clear() + this.lineChartData.series[0].data = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + this.line.setOption(this.lineChartData) + this.line1.clear() + this.lineChartData1.series[0].data = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + this.line1.setOption(this.lineChartData1) + this.detail.target = parseInt(String(Math.random()*200)) + } + + beforeDestroy() { + clearInterval(this.timer) + } + +} + diff --git a/src/components/energy/gas/right/gasRight.component.html b/src/components/energy/gas/right/gasRight.component.html new file mode 100644 index 0000000..9d0431f --- /dev/null +++ b/src/components/energy/gas/right/gasRight.component.html @@ -0,0 +1,85 @@ +
+
+ + 节能减排 + +
+ 节能目标 (kgce) + {{detail.target}} +
+ + + 单位产品耗能趋势分析 + +
单位:kgce/m³
+ + + 单位产值耗能趋势分析 + +
单位:kgce/万元
+ + +
+
+
+
+ + 今日用燃料量(标准煤) +
+ +
+
+ 同比: + + {{dayData.yoy}}% +
+
+ 环比: + + {{dayData.round}}% +
+
+
+
+
+ + 本周用燃料量(标准煤) +
+ +
+
+ 同比: + + {{weekData.yoy}}% +
+
+ 环比: + + {{weekData.round}}% +
+
+
+
+
+ + 本月用燃料量(标准煤) +
+ +
+
+ 同比: + + {{monthData.yoy}}% +
+
+ 环比: + + {{monthData.round}}% +
+
+
+
+
diff --git a/src/components/energy/index/left/chartData.js b/src/components/energy/index/left/chartData.js new file mode 100644 index 0000000..6305adf --- /dev/null +++ b/src/components/energy/index/left/chartData.js @@ -0,0 +1,98 @@ +export const lineChartData = function (data, xAxisData, legend) { + return { + color: ['#FFFFFF','#FADFA4','#C9FFD7', '#947FEA'], + xAxis: { + name:'日', + type: 'category', + nameGap:5, + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: xAxisData + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: data, + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 40, + y: 40, + x2: 32, + y2: 20, + }, + legend: { + data: legend, + top: 10, + padding: [2, 2], + icon: 'circle', + align: 'left', + itemGap: 10, + width: "100%", + itemWidth: 10, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 8, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + } + + } +} diff --git a/src/components/energy/index/left/energyIndexLeft.component.html b/src/components/energy/index/left/energyIndexLeft.component.html new file mode 100644 index 0000000..6ebd6c3 --- /dev/null +++ b/src/components/energy/index/left/energyIndexLeft.component.html @@ -0,0 +1,32 @@ +
+
+ + 预警列表 + + +
+
+ + 园区公辅工程能耗统计 + +
+ + + + + + +
+
+
+
日统计
+
+
+
+
月统计
+
+
+
+ +
+
diff --git a/src/components/energy/index/left/energyIndexLeft.component.ts b/src/components/energy/index/left/energyIndexLeft.component.ts new file mode 100644 index 0000000..ba25142 --- /dev/null +++ b/src/components/energy/index/left/energyIndexLeft.component.ts @@ -0,0 +1,152 @@ +import {Component, Emit, Vue} from 'vue-property-decorator'; +import template from "./energyIndexLeft.component.html" +import {lineChartData} from "./chartData"; +import {dataForEnergyIndex} from "@/dataDemo/mockData"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, +}) +export default class EnergyIndexLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //报警列表 + get dataList(){ + return this.$store.state.warningList + } + timer: any = null; + //折线图数据 + option: any = {} + //折线图实例 + line: any = {} + //当前选中的类别 + lineChartType = '燃料'; + //日统计月统计切换标记 + monthOrDay='日统计' + //类别切换 + changeData(val){ + console.log(val) + this.monthOrDay='日统计' + } + //日统计月统计切换 + clickTab(type){ + this.monthOrDay = type + } + //获取图表实例 + getEcharts(e) { + this.line = e + this.option = lineChartData(dataForEnergyIndex.data,[14,15,16,17,18,19,20,21,22,23,24,25]) + } + //展示告警信息 + showWaring(item){ + + const levelMap = { + 1:'一级', + 2:'二级', + 3:'三级', + } + const levelClassMap = { + 3:'blue', + 2:'yellow', + 1:'red', + } + console.log(item) + this.getItem(Object.assign(item,{ + type:'用电超标', + level:item.level, + levelClass:levelClassMap[item.level], + levelName:levelMap[item.level], + content:'用电量超过日阙值', + time:'2023年3月31日 05:03:45', + equipment:'1#气体探测仪', + tableHeader:[ + { + 'prop':'use', + 'label':'用电量', + 'width':'90px', + }, { + 'prop':'watch', + 'label':'监测值', + }, { + 'prop':'limit', + 'label':'限值', + }, + ], + tableData: [{ + 'use': '实时', + 'watch': '12 kW·h', + 'limit': '30 kW·h', + }, { + 'use': '日用', + 'watch': '512 kW·h', + 'limit': '500 kW·h', + }, { + 'use': '月用', + 'watch': '2344 kW·h', + 'limit': '15000 kW·h', + }, { + 'use': '环比', + 'watch': '12%', + 'limit': '20%', + }] + })) + } + //点击告警信息 + @Emit() + getItem(item) { + // console.log('item', item) + } + + + + count = 1 + + //监听页面变化重新绘制图表 + resize() { + setTimeout(() => { + this.line.resize(); + }, 300) + } + + mounted() { + + //动态插入数据 + this.timer = setInterval(() => { + this.line.clear(); + this.line.setOption(this.option) + }, 6000) + window.addEventListener("resize", this.resize); + } + + + + beforeDestroy() { + clearInterval(this.timer) + } + + destroyed() { + window.removeEventListener("resize", this.resize) + } + + changeMore() { + console.log(1) + } + + changeClose() { + console.log(1) + } + +} + diff --git a/src/components/energy/index/right/chartData.js b/src/components/energy/index/right/chartData.js new file mode 100644 index 0000000..73dc34e --- /dev/null +++ b/src/components/energy/index/right/chartData.js @@ -0,0 +1,255 @@ +export const lineChartData = function () { + let xLabel = ['Q1', 'Q2', 'Q3', 'Q4']; + let dataValue = [175, 90, 150, 75]; + let dataValue1 = [50, 75, 175, 50]; + return { + color:['#ECFF7F','#7FB0FF'], + legend: { + show: true, + top: '10%', + icon: "rect", + itemWidth: 10, // 图例标记的图形宽度。 + // itemGap: 20, // 图例每项之间的间隔。 + itemHeight: 10, // 图例标记的图形高度。 + textStyle: { + color: '#fff', + fontSize: 14, + padding: [0, 8, 0, 8] + } + }, + grid: { + top: '30%', + left: '10%', + right: '5%', + bottom: '20%', + }, + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: xLabel + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name: '单位产值能耗', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 3, + }, + }, + symbolSize: 8, //设定实心点的大小 + data: dataValue, + }, + { + name: '单位产值用水', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 3, + }, + }, + symbolSize: 8, //设定实心点的大小 + data: dataValue1, + } + ] + } +} + + + +// 修改弹框内容用到的方法 +function replaceHtmlWord(str) { + return str.replace("NO2", "NO2") + .replace("SO2", "SO2") + .replace("O3", "O3") + // .replace("PM10", "PM10") + // .replace("PM2.5", "PM2.5") + +} + +// 修改图例文字用到的方法 +function replaceWords(str) { + return str.replace("NO2", "NO{sub|2}") + .replace("SO2", "SO{sub|2}") + .replace("O3", "O{sub|3}") + // .replace("PM2.5", "PM{sub|2.5}") + // .replace("PM10", "PM{sub|10}"); +} + +/** + * 废气右侧折线图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const barChartData = function (data, xAxisData, legend,$echarts) { + const chartData = data.map((item,i)=>{ + let color = []; + if (i === 0){ + color = ['#BD7EFF','#947FEA'] + }else{ + color = ['#67D6FF','#7DAEFF'] + } + return { + 'data': item, + 'type': 'bar', + 'smooth': true, + "name": legend[i], + 'barWidth': 8, + 'itemStyle': { + 'borderRadius': [4, 4, 0, 0], + 'color': function (params) { + return new $echarts.graphic.LinearGradient( + 0, 0, 0, 1, + [{ + offset: 0, + color: color[0] + }, + { + offset: 1, + color: color[1] + } + ] + ) + }, + } + } + }) + return { + color: ['#947FEA','#7DAEFF'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate:30, + fontSize:10 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: xAxisData + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: chartData, + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 40, + x2: 22, + y2: 40, + }, + legend: { + data: legend, + top: 10, + padding: [2, 2], + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + align:'left', + itemGap:10, + width: "100%", + itemWidth:10, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 8, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + } + + } +} diff --git a/src/components/energy/index/right/energyRight.component.html b/src/components/energy/index/right/energyRight.component.html new file mode 100644 index 0000000..beb31c9 --- /dev/null +++ b/src/components/energy/index/right/energyRight.component.html @@ -0,0 +1,114 @@ +
+
+ + 碳排放 + +
+
+
75
+
节碳目标(吨)
+
+
+
120
+
碳排总量(吨)
+
+
+
1020
+
碳排放配额(吨)
+
+
+
75%
+
达成率
+
+
+
+ 行业耗能统计 +
+ +
+ 产值能耗分析 +
+ + +
+
+
+
+ + 今日用电量(kW·h) +
+ +
+
+ 同比: + + {{electricityDayData.yoy}}% +
+
+ 环比: + + {{electricityDayData.round}}% +
+
+
+
+
+ + 今日用水量(m³) +
+ +
+
+ 同比: + + {{waterDayData.yoy}}% +
+
+ 环比: + + {{waterDayData.round}}% +
+
+
+
+
+ + 今日用燃料量(标准煤) +
+ +
+
+ 同比: + + {{fuelDayData.yoy}}% +
+
+ 环比: + + {{fuelDayData.round}}% +
+
+
+
+
+ + 今日用蒸汽量(kg) +
+ +
+
+ 同比: + + {{steamDayData.yoy}}% +
+
+ 环比: + + {{steamDayData.round}}% +
+
+
+
+
diff --git a/src/components/energy/index/right/energyRight.component.ts b/src/components/energy/index/right/energyRight.component.ts new file mode 100644 index 0000000..58b374b --- /dev/null +++ b/src/components/energy/index/right/energyRight.component.ts @@ -0,0 +1,144 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./energyRight.component.html" +import {lineChartData, barChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" + +import * as echarts from 'echarts'; +import ScrollNumberComponent from "@/components/scrollNumber.component.vue" +import {getRandNumBetween} from "@/utils/utils"; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + ScrollNumberComponent, + }, +}) +export default class EnergyRightComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //柱状图数据 + barChartData: any = {}; + //定时器 + timer: any = null; + // 排放达标率数据 + lineChartData: any = {} + //柱状图实例 + bar: any = {} + //饼图实例 + line: any = {} + //图标 + gasIcon = require("@/assets/img/energy/mei.png"); + lightningIcon = require("@/assets/img/energy/dian.png"); + green = require("@/assets/img/energy/green-arr.png"); + red = require("@/assets/img/energy/red-arr.png"); + //日用电数据 + electricityDayData = { + dayNum: 1139.83, + yoy: 11.2, + round: 18 + } + //日用水数据 + waterDayData = { + dayNum: 1139.83, + yoy: 11.2, + round: 18 + } + //日用燃料数据 + fuelDayData = { + dayNum: 1139.83, + yoy: 11.2, + round: 18 + } + //日用蒸汽数据 + steamDayData = { + dayNum: 1139.83, + yoy: 11.2, + round: 18 + } + //初始化卡片数据 + changeCardData(type,isInit='') { + let temp: any = this[type] + if (isInit === 'init'){ + temp = { + dayNum: getRandNumBetween(1000, 2000), + yoy: getRandNumBetween(10, 20), + round: getRandNumBetween(10, 20) + }; + + }else{ + temp.dayNum += Math.random()*10 + } + temp.dayNum = Number(temp.dayNum.toFixed(2)) + this[type] = temp + } + + //获取图表实例 + getEcharts(e, type) { + this[type] = e + if (type === 'line') { + this.lineChartData = lineChartData(); + } + if (type === 'bar') { + this.barChartData = barChartData([[90, 55, 80, 85, 25, 60, 60], [160, 80, 130, 133, 40, 95, 95]], this.xAxisData, this.legend, echarts) + } + } + + //折线图x轴坐标 + xAxisData = ['石油化工', '无机化工', '有机化工', '精细化工', '化肥农药', '塑料制品', '橡胶制品'] + //设置排放变化趋势默认选中项 + lineChartType = '排放量' + + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.line.resize() + this.bar.resize() + }, 300) + } + + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + + //图例 + legend = ["水 (吨)", + "标准煤 (吨)"] + + mounted() { + this.timer = setInterval(() => { + this.setChartData() + this.changeCardData('electricityDayData') + this.changeCardData('waterDayData') + this.changeCardData('fuelDayData') + this.changeCardData('steamDayData') + }, 6000) + this.changeCardData('electricityDayData','init') + this.changeCardData('waterDayData','init') + this.changeCardData('fuelDayData','init') + this.changeCardData('steamDayData','init') + + window.addEventListener("resize", this.resize); + + } + + setChartData() { + this.line.clear() + this.line.setOption(this.lineChartData) + this.bar.clear() + this.bar.setOption(this.barChartData) + } + + beforeDestroy() { + clearInterval(this.timer) + } + +} + diff --git a/src/components/energy/steam/left/chartData.js b/src/components/energy/steam/left/chartData.js new file mode 100644 index 0000000..8b90ce7 --- /dev/null +++ b/src/components/energy/steam/left/chartData.js @@ -0,0 +1,472 @@ +export const lineChartData = function () { + let xLabel = ['Q1', 'Q2', 'Q3', 'Q4']; + let dataValue = [175, 90, 150, 75]; + let dataValue1 = [50, 75, 175, 50]; + return { + color:['#ECFF7F','#7FB0FF'], + legend: { + show: true, + top: '10%', + icon: "rect", + itemWidth: 10, // 图例标记的图形宽度。 + // itemGap: 20, // 图例每项之间的间隔。 + itemHeight: 10, // 图例标记的图形高度。 + textStyle: { + color: '#fff', + fontSize: 14, + padding: [0, 8, 0, 8] + } + }, + grid: { + top: '30%', + left: '10%', + right: '5%', + bottom: '20%', + }, + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + data: xLabel + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name: '单位产值能耗', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 3, + }, + }, + symbolSize: 8, //设定实心点的大小 + data: dataValue, + }, + { + name: '单位产值用水', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 3, + }, + }, + symbolSize: 8, //设定实心点的大小 + data: dataValue1, + } + ] + } +} +export const pieChartData = function () { + /* 数据 */ + let nameList = ["石油化工", "无机化工", "有机化工", "精细化工",'化肥农药','塑料制品','橡胶制品']; + let valueList = [70,60,50, 40, 30, 20,10]; + + /* 整合 */ + let colorList = ["#FFFFFF", "#FADFA4", "#7FB0FF", "#ECFF7F", "#DD7171","#C9FFD7","#947FEA"]; + let data = []; + nameList.map((item,index) => { + data.push({ + name:item, + value:valueList[index] + }) + }) + + /* 函数 */ +// 数字分割:1653 => 1,653 + const formatNum = (value) => { + if (!value && value !== 0) return 0; + let str = value.toString(); + let reg = str.indexOf(".") > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g; + return str.replace(reg, "$1,"); + } + + return { + color: colorList, + legend:{ + show:true, + top:20, + right: 0, + orient: "vertical", //改变排列方式 + itemWidth: 10, + itemHeight: 10, + textStyle: { + color: '#fff', + fontSize: 12, + padding: [0, 8, 0, 8] + } + }, + tooltip: { + trigger: 'item', + axisPointer: { + type: 'none' + }, + position: function (point, params, dom, rect, size) { // 提示框位置 + let x = 0; + let y = 0; + //提示框定位 + if (point[0] + size.contentSize[0] < size.viewSize[0]) { + x = point[0] + } else if (point[0] > size.contentSize[0]) { + x = point[0] - size.contentSize[0] + } else { + x = "30%" + } + if (point[1] > size.contentSize[1]) { + y = point[1] - size.contentSize[1] + } else if (point[1] + size.contentSize[1] < size.viewSize[1]) { + y = point[1] + } else { + y = "30%" + } + return [x, y]; + }, + formatter: params => { + let pieColor = params["color"]; + return ` +
+
+ ${params.name} +
+
${formatNum(params.value)}kgce${[params.percent]}%
+ ` + }, + extraCssText: 'opacity: 0.8;background-color:#050F1B;padding:16px;box-shadow: 1px 6px 15px 1px rgba(0,0,0,0.13);border-radius: 4px;filter: blur(undefinedpx);border:none;' + }, + series: [{ + type: 'pie', + roseType: true, + center:['40%','50%'], + radius: ["30%", "80%"], + label: { + show: false, + }, + itemStyle:{ + borderRadius:3 + }, + data: data + }] + }; +} + + + +/** + * 废气右侧折线图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const barChartData = function (data, xAxisData, legend,$echarts) { + + return { + color:['#947FEA','#684FCE','#422BA1'], + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + }, + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + }, + legend: { + textStyle:{ + color:'#ffffff' + } + }, + grid: { + left: '3%', + top: '15%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学', '海利得','榆林化工', + '联化科1', '立本作物1', '圣丰集团1', '茂盛生物1', '利尔化学1', '海利得1','榆林化工1', + '联化科2', '立本作物2', '圣丰集团2', '茂盛生物2', '利尔化学2', '海利得2','榆林化工2', + '联化科3', '立本作物3', '圣丰集团3', '茂盛生物3', '利尔化学3', '海利得3','榆林化工3', + '联化科4', '立本作物4', '圣丰集团4', '茂盛生物4', '利尔化学4', '海利得4','榆林化工4', + '联化科5', '立本作物5', '圣丰集团5', '茂盛生物5', '利尔化学5', '海利得5','榆林化工5', + ], + + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//label旋转角度 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + dataZoom : { + type:"inside", + orient:"vertical", + startValue:0, + endValue:7 + }, + series: [ + { + name: '低压', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100+100)) + }, + { + name: '中压', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100+100)) + }, + { + name: '高压', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100+100)) + } + ] + }; +} +/** + * 散点图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const pointChartData = function (data, xAxisData, legend,$echarts) { + + return { + tooltip: { + trigger: 'item', + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + }, + xAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学','榆林化工'], + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'value', + name:'产值:单位万元', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + nameTextStyle: { + padding: [0, 0, 10, 30] + } + }, + color:['#FF5959','#FADFA4','#C9FFD7'], + series: [ + { + name:'联化科', + data: [ + { + value: ['联化科', 200], + symbolSize:28, + itemStyle:{color:'#FF5959'}, + } + ], + type: 'scatter' + },{ + name:'立本作物', + data: [ + { + value: ['立本作物', 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + } + ], + type: 'scatter' + },{ + name:'圣丰集团', + data: [ + { + value: ['圣丰集团', 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + + } + ], + type: 'scatter' + },{ + name:'茂盛生物', + data: [ + { + value: ['茂盛生物', 50], + symbolSize:10, + itemStyle:{color:'#C9FFD7'}, + } + ], + type: 'scatter' + },{ + name:'利尔化学', + data: [ + { + value: ['利尔化学', 50], + symbolSize:16, + itemStyle:{color:'#C9FFD7'}, + } + ], + type: 'scatter' + },{ + name:'榆林化工', + data: [ + { + value: ['榆林化工', 150], + symbolSize:32, + itemStyle:{color:'#FF5959'}, + } + ], + type: 'scatter' + }, + /*{ + data: [ + { + value: [20, 200], + symbolSize:28, + itemStyle:{color:'#FF5959'}, + name:'联化科' + },{ + value: [40, 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + name:'立本作物' + },{ + value: [60, 150], + symbolSize:16, + itemStyle:{color:'#C9FFD7'}, + name:'圣丰集团' + },{ + value: [80, 50], + symbolSize:10, + itemStyle:{color:'#C9FFD7'}, + name:'茂盛生物' + },{ + value: [100, 50], + symbolSize:16, + name:'利尔化学' + },{ + value: [120, 150], + symbolSize:32, + name:'榆林化工' + } + ], + type: 'scatter' + },*/ + ] + } +} diff --git a/src/components/energy/steam/left/steamLeft.component.html b/src/components/energy/steam/left/steamLeft.component.html new file mode 100644 index 0000000..2d07dcf --- /dev/null +++ b/src/components/energy/steam/left/steamLeft.component.html @@ -0,0 +1,21 @@ +
+
+ + 企业蒸汽使用量排行 + + +
+ 企业产值耗能分析 +
+
圆圈面积:耗能(tce)
+ +
+ 行业耗能分析 +
+ +
+ +
diff --git a/src/components/energy/steam/left/steamLeft.component.ts b/src/components/energy/steam/left/steamLeft.component.ts new file mode 100644 index 0000000..fc51f4e --- /dev/null +++ b/src/components/energy/steam/left/steamLeft.component.ts @@ -0,0 +1,112 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./steamLeft.component.html" +import {pieChartData, barChartData,pointChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" + +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class SteamLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //散点图数据 + pointChartData: any = {}; + //叠加柱状图 + barChartData: any = {}; + //定时器 + timer: any = null; + // 排放达标率数据 + pieChartData: any = {} + //柱状图实例 + bar: any = {} + //折线图实例 + pie: any = {} + //散点图实例 + point: any = {} + + //获取图表实例 + getEcharts(e, type) { + this[type] = e + if (type === 'pie') { + this.pieChartData = pieChartData(); + } + if (type === 'bar') { + this.barChartData = barChartData([[90, 55, 80, 85, 25, 60, 60], [160, 80, 130, 133, 40, 95, 95]], this.xAxisData, this.legend, echarts) + this.bar.on('click', function (params) { + console.log(params); + }); + } + if (type === 'point') { + this.pointChartData = pointChartData([[90, 55, 80, 85, 25, 60, 60], [160, 80, 130, 133, 40, 95, 95]], this.xAxisData, this.legend, echarts) + } + } + + //折线图x轴坐标 + xAxisData = ['石油化工', '无机化工', '有机化工', '精细化工', '化肥农药', '塑料制品', '橡胶制品'] + //设置排放变化趋势默认选中项 + lineChartType = '排放量' + + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.pie.resize() + this.bar.resize() + }, 300) + } + autoRun(){ + if (this.barChartData.dataZoom.endValue === 42){ + this.barChartData.dataZoom.startValue = 0 + this.barChartData.dataZoom.endValue = 7; + }else{ + this.barChartData.dataZoom.startValue+=1; + this.barChartData.dataZoom.endValue+=1; + } + //最新出来的数据 + let selectDataE = this.barChartData.yAxis.data[this.barChartData.dataZoom.endValue] + + this.bar.setOption(this.barChartData) + } + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + + //图例 + legend = ["水 (吨)", + "标准煤 (吨)"] + + mounted() { + this.timer = setInterval(() => { + this.setChartData() + this.autoRun() + }, 6000) + + + window.addEventListener("resize", this.resize); + + } + + setChartData() { + this.pie.clear() + this.pie.setOption(this.pieChartData) + this.point.clear() + this.point.setOption(this.pointChartData) + } + + beforeDestroy() { + clearInterval(this.timer) + } + +} + diff --git a/src/components/energy/steam/right/chartData.js b/src/components/energy/steam/right/chartData.js new file mode 100644 index 0000000..2862060 --- /dev/null +++ b/src/components/energy/steam/right/chartData.js @@ -0,0 +1,599 @@ +export const lineChartData = function () { + let xLabel = new Array(30).fill(0).map((item,i)=> i+1); + let dataValue = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + return { + color:['#EA7F7F'], + dataZoom : { + type:"inside", + // orient:"vertical", + startValue:0, + endValue:10 + }, + legend: { + show: false, + top: '10%', + icon: "rect", + itemWidth: 10, // 图例标记的图形宽度。 + // itemGap: 20, // 图例每项之间的间隔。 + itemHeight: 10, // 图例标记的图形高度。 + textStyle: { + color: '#fff', + fontSize: 14, + padding: [0, 8, 0, 8] + } + }, + grid: { + top: '5%', + left: '10%', + right: '5%', + bottom: '20%', + }, + xAxis: { + name:'日', + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + data: xLabel + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name: '单位产值能耗', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 2, + }, + }, + symbolSize: 4, //设定实心点的大小 + data: dataValue, + areaStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: 'rgba(234,127,127,0.3)' + }, { + offset: 1, color: 'rgba(234,127,127,0.3)' + }], + global: false + } + }, + }, + } + ] + } +} +export const lineChartData1 = function () { + let xLabel = new Array(30).fill(0).map((item,i)=> i+1); + let dataValue = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + return { + color:['#FFA900'], + dataZoom : { + type:"inside", + // orient:"vertical", + startValue:0, + endValue:10 + }, + legend: { + show: false, + top: '10%', + icon: "rect", + itemWidth: 10, // 图例标记的图形宽度。 + // itemGap: 20, // 图例每项之间的间隔。 + itemHeight: 10, // 图例标记的图形高度。 + textStyle: { + color: '#fff', + fontSize: 14, + padding: [0, 8, 0, 8] + } + }, + grid: { + top: '5%', + left: '10%', + right: '5%', + bottom: '20%', + }, + xAxis: { + name:'日', + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + data: xLabel + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name: '单位产值能耗', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 2, + }, + }, + symbolSize: 4, //设定实心点的大小 + data: dataValue, + areaStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: 'rgba(255,169,0,0.5)' + }, { + offset: 1, color: 'rgba(255,169,0,0.3)' + }], + global: false + } + }, + }, + } + ] + } +} +export const pieChartData = function () { + + + return { + + title: { + text: `75%`, + subtext: '达成率', + left: 'center', + top: 'center', + itemGap: 0, + textStyle: { + fontSize: 28, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 10, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + angleAxis: { + max: 100, + // 隐藏刻度线 + show: false, + startAngle: 90 + }, + radiusAxis: { + type: 'category', + show: true, + axisLabel: { + show: false, + }, + axisLine: { + show: false, + }, + axisTick: { + show: false + }, + }, + polar: { + radius: '150%' //图形大小 + }, + series: [{ + type: 'bar', + data: ['75'], + showBackground: true, + roundCap: true, + backgroundStyle: { + color: 'rgba(64, 76, 76, 1)', + }, + coordinateSystem: 'polar', + barWidth: 20, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: '#EA7F7F' + }, { + offset: 1, color: '#EA7F7F' + }], + global: false + } + } + }, + }] + } +} + + + +// 修改弹框内容用到的方法 +function replaceHtmlWord(str) { + return str.replace("NO2", "NO2") + .replace("SO2", "SO2") + .replace("O3", "O3") + // .replace("PM10", "PM10") + // .replace("PM2.5", "PM2.5") + +} + +// 修改图例文字用到的方法 +function replaceWords(str) { + return str.replace("NO2", "NO{sub|2}") + .replace("SO2", "SO{sub|2}") + .replace("O3", "O{sub|3}") + // .replace("PM2.5", "PM{sub|2.5}") + // .replace("PM10", "PM{sub|10}"); +} + +/** + * 废气右侧折线图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const barChartData = function (data, xAxisData, legend,$echarts) { + + return { + color:['#FADFA4','#7FB0FF','#FFFFFF','#947FEA'], + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + }, + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + }, + legend: { + textStyle:{ + color:'#ffffff' + } + }, + grid: { + left: '3%', + top: '15%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学', '海利得','榆林化工', + '联化科1', '立本作物1', '圣丰集团1', '茂盛生物1', '利尔化学1', '海利得1','榆林化工1', + '联化科2', '立本作物2', '圣丰集团2', '茂盛生物2', '利尔化学2', '海利得2','榆林化工2', + '联化科3', '立本作物3', '圣丰集团3', '茂盛生物3', '利尔化学3', '海利得3','榆林化工3', + '联化科4', '立本作物4', '圣丰集团4', '茂盛生物4', '利尔化学4', '海利得4','榆林化工4', + '联化科5', '立本作物5', '圣丰集团5', '茂盛生物5', '利尔化学5', '海利得5','榆林化工5', + ], + + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//label旋转角度 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + dataZoom : { + type:"inside", + orient:"vertical", + startValue:0, + endValue:7 + }, + series: [ + { + name: '煤炭', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '石油', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '天然气', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '煤气', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + } + ] + }; +} +/** + * 散点图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const pointChartData = function (data, xAxisData, legend,$echarts) { + + return { + tooltip: { + trigger: 'item', + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + }, + xAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学','榆林化工'], + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'value', + name:'产值:单位万元', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + nameTextStyle: { + padding: [0, 0, 10, 30] + } + }, + color:['#FF5959','#FADFA4','#C9FFD7'], + series: [ + { + name:'联化科', + data: [ + { + value: ['联化科', 200], + symbolSize:28, + itemStyle:{color:'#FF5959'}, + } + ], + type: 'scatter' + },{ + name:'立本作物', + data: [ + { + value: ['立本作物', 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + } + ], + type: 'scatter' + },{ + name:'圣丰集团', + data: [ + { + value: ['圣丰集团', 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + + } + ], + type: 'scatter' + },{ + name:'茂盛生物', + data: [ + { + value: ['茂盛生物', 50], + symbolSize:10, + itemStyle:{color:'#C9FFD7'}, + } + ], + type: 'scatter' + },{ + name:'利尔化学', + data: [ + { + value: ['利尔化学', 50], + symbolSize:16, + itemStyle:{color:'#C9FFD7'}, + } + ], + type: 'scatter' + },{ + name:'榆林化工', + data: [ + { + value: ['榆林化工', 150], + symbolSize:32, + itemStyle:{color:'#FF5959'}, + } + ], + type: 'scatter' + }, + /*{ + data: [ + { + value: [20, 200], + symbolSize:28, + itemStyle:{color:'#FF5959'}, + name:'联化科' + },{ + value: [40, 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + name:'立本作物' + },{ + value: [60, 150], + symbolSize:16, + itemStyle:{color:'#C9FFD7'}, + name:'圣丰集团' + },{ + value: [80, 50], + symbolSize:10, + itemStyle:{color:'#C9FFD7'}, + name:'茂盛生物' + },{ + value: [100, 50], + symbolSize:16, + name:'利尔化学' + },{ + value: [120, 150], + symbolSize:32, + name:'榆林化工' + } + ], + type: 'scatter' + },*/ + ] + } +} diff --git a/src/components/energy/steam/right/steamRight.component.html b/src/components/energy/steam/right/steamRight.component.html new file mode 100644 index 0000000..6d3139b --- /dev/null +++ b/src/components/energy/steam/right/steamRight.component.html @@ -0,0 +1,93 @@ +
+
+ + 单位产品耗能趋势分析 + +
单位:kgce/m³
+ + + 单位产值耗能趋势分析 + +
单位:kgce/万元
+ + + 关联企业 + +
+
+
+ {{item.type}} +
+
+ {{item.name}} +
+
+
+ + +
+
+
+
+ + 今日用蒸汽量(kg) +
+ +
+
+ 同比: + + {{dayData.yoy}}% +
+
+ 环比: + + {{dayData.round}}% +
+
+
+
+
+ + 本周用蒸汽量(kg) +
+ +
+
+ 同比: + + {{weekData.yoy}}% +
+
+ 环比: + + {{weekData.round}}% +
+
+
+
+
+ + 本月用蒸汽量(kg) +
+ +
+
+ 同比: + + {{monthData.yoy}}% +
+
+ 环比: + + {{monthData.round}}% +
+
+
+
+
diff --git a/src/components/energy/steam/right/steamRight.component.ts b/src/components/energy/steam/right/steamRight.component.ts new file mode 100644 index 0000000..a5ae8b7 --- /dev/null +++ b/src/components/energy/steam/right/steamRight.component.ts @@ -0,0 +1,162 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./steamRight.component.html" +import {pieChartData, barChartData,lineChartData,lineChartData1} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" +import ScrollNumberComponent from "@/components/scrollNumber.component.vue" + +import * as echarts from 'echarts'; +import {getRandNumBetween} from "@/utils/utils"; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + ScrollNumberComponent, + }, +}) +export default class SteamRightComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + // + gasIcon = require("@/assets/img/energy/zq.png"); + green = require("@/assets/img/energy/green-arr.png"); + red = require("@/assets/img/energy/red-arr.png"); + //单位产品耗能趋势分析数据 + lineChartData: any = {}; + //单位产值耗能趋势分析数据 + lineChartData1: any = {}; + //定时器 + timer: any = null; + + //柱状图实例 + bar: any = {} + //单位产品耗能趋势分析实例 + line: any = {} + //单位产值耗能趋势分析图实例 + line1: any = {} + //企业详情数据 + detail = { + target:130 + } + //日用燃料数据 + dayData = { + dayNum:1139.83, + yoy:11.2, + round:18 + } + //周用燃料数据 + weekData = { + dayNum:7978.81, + yoy:20.3, + round:14 + } + //月用燃料数据 + monthData = { + dayNum:34194.9, + yoy:18.3, + round:20 + } + //关联企业 + companyList = [ + { + name:'协鑫能科',type:'上游企业' + },{ + name:'嘉化能源',type:'上游企业' + },{ + name:'福能股份',type:'上游企业' + }, + ] + changeCardData(type){ + const temp:any = { + dayNum:getRandNumBetween(1000,2000), + yoy:getRandNumBetween(10,20), + round:getRandNumBetween(10,20) + }; + + switch (type) { + case "dayData": + + break; + case "weekData": + temp.dayNum *= 7 + temp.yoy = getRandNumBetween(10,20) + temp.round = getRandNumBetween(10,20) + break; + case "monthData": + temp.dayNum *= 30 + temp.yoy = getRandNumBetween(10,20) + temp.round = getRandNumBetween(10,20) + break; + default: + break + } + temp.dayNum = Number(temp.dayNum.toFixed(2)) + this[type] = temp +} + //获取图表实例 + getEcharts(e, type) { + this[type] = e + if (type === 'line1') { + this.lineChartData1 = lineChartData1() + } + if (type === 'line') { + this.lineChartData = lineChartData() + } + } + + //折线图x轴坐标 + xAxisData = ['石油化工', '无机化工', '有机化工', '精细化工', '化肥农药', '塑料制品', '橡胶制品'] + //设置排放变化趋势默认选中项 + lineChartType = '排放量' + + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.line.resize() + this.line1.resize() + }, 300) + } + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + + //图例 + legend = ["水 (吨)", + "标准煤 (吨)"] + + mounted() { + this.timer = setInterval(() => { + this.setChartData() + // this.autoRun() + // this.dayNum = Math.floor(Math.random()*10000) + this.changeCardData('dayData') + this.changeCardData('weekData') + this.changeCardData('monthData') + }, 6000) + window.addEventListener("resize", this.resize); + } + + setChartData() { + + this.line.clear() + this.lineChartData.series[0].data = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + this.line.setOption(this.lineChartData) + this.line1.clear() + this.lineChartData1.series[0].data = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + this.line1.setOption(this.lineChartData1) + this.detail.target = parseInt(String(Math.random()*200)) + } + + beforeDestroy() { + clearInterval(this.timer) + } + +} + diff --git a/src/components/energy/water/left/chartData.js b/src/components/energy/water/left/chartData.js new file mode 100644 index 0000000..e530971 --- /dev/null +++ b/src/components/energy/water/left/chartData.js @@ -0,0 +1,447 @@ +export const lineChartData = function () { + let xLabel = ['Q1', 'Q2', 'Q3', 'Q4']; + let dataValue = [175, 90, 150, 75]; + let dataValue1 = [50, 75, 175, 50]; + return { + color: ['#ECFF7F', '#7FB0FF'], + legend: { + show: true, + top: '10%', + icon: "rect", + itemWidth: 10, // 图例标记的图形宽度。 + // itemGap: 20, // 图例每项之间的间隔。 + itemHeight: 10, // 图例标记的图形高度。 + textStyle: { + color: '#fff', + fontSize: 14, + padding: [0, 8, 0, 8] + } + }, + grid: { + top: '30%', + left: '10%', + right: '5%', + bottom: '20%', + }, + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + data: xLabel + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name: '单位产值能耗', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 3, + }, + }, + symbolSize: 8, //设定实心点的大小 + data: dataValue, + }, + { + name: '单位产值用水', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 3, + }, + }, + symbolSize: 8, //设定实心点的大小 + data: dataValue1, + } + ] + } +} +export const pieChartData = function () { + /* 数据 */ + let nameList = ["石油化工", "无机化工", "有机化工", "精细化工", '化肥农药', '塑料制品', '橡胶制品']; + let valueList = [70, 60, 50, 40, 30, 20, 10]; + + /* 整合 */ + let colorList = ["#FFFFFF", "#FADFA4", "#7FB0FF", "#ECFF7F", "#DD7171", "#C9FFD7", "#947FEA"]; + let data = []; + nameList.map((item, index) => { + data.push({ + name: item, + value: valueList[index] + }) + }) + + /* 函数 */ +// 数字分割:1653 => 1,653 + const formatNum = (value) => { + if (!value && value !== 0) return 0; + let str = value.toString(); + let reg = str.indexOf(".") > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g; + return str.replace(reg, "$1,"); + } + + return { + color: colorList, + legend: { + show: true, + top: 20, + right: 0, + orient: "vertical", //改变排列方式 + itemWidth: 10, + itemHeight: 10, + textStyle: { + color: '#fff', + fontSize: 12, + padding: [0, 8, 0, 8] + } + }, + tooltip: { + trigger: 'item', + axisPointer: { + type: 'none' + }, + position: function (point, params, dom, rect, size) { // 提示框位置 + let x = 0; + let y = 0; + //提示框定位 + if (point[0] + size.contentSize[0] < size.viewSize[0]) { + x = point[0] + } else if (point[0] > size.contentSize[0]) { + x = point[0] - size.contentSize[0] + } else { + x = "30%" + } + if (point[1] > size.contentSize[1]) { + y = point[1] - size.contentSize[1] + } else if (point[1] + size.contentSize[1] < size.viewSize[1]) { + y = point[1] + } else { + y = "30%" + } + return [x, y]; + }, + formatter: params => { + let pieColor = params["color"]; + return ` +
+
+ ${params.name} +
+
${formatNum(params.value)}kW·h${[params.percent]}%
+ ` + }, + extraCssText: 'opacity: 0.8;background-color:#050F1B;padding:16px;box-shadow: 1px 6px 15px 1px rgba(0,0,0,0.13);border-radius: 4px;filter: blur(undefinedpx);border:none;' + }, + series: [{ + type: 'pie', + roseType: true, + center: ['40%', '50%'], + radius: ["30%", "80%"], + label: { + show: false, + }, + itemStyle: { + borderRadius: 3 + }, + data: data + }] + }; +} + +/** + * 废气右侧折线图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const barChartData = function (data, xAxisData, legend, $echarts) { + + return { + color: ['#7FB0FF'], + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + }, + backgroundColor: 'rgba(0,0,0,0.4)', + textStyle: { + color: '#ffffff' + } + }, + legend: { + show: false, + textStyle: { + color: '#ffffff' + } + }, + grid: { + left: '3%', + top: '15%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学', '海利得', '榆林化工', + '联化科1', '立本作物1', '圣丰集团1', '茂盛生物1', '利尔化学1', '海利得1', '榆林化工1', + '联化科2', '立本作物2', '圣丰集团2', '茂盛生物2', '利尔化学2', '海利得2', '榆林化工2', + '联化科3', '立本作物3', '圣丰集团3', '茂盛生物3', '利尔化学3', '海利得3', '榆林化工3', + '联化科4', '立本作物4', '圣丰集团4', '茂盛生物4', '利尔化学4', '海利得4', '榆林化工4', + '联化科5', '立本作物5', '圣丰集团5', '茂盛生物5', '利尔化学5', '海利得5', '榆林化工5', + ], + + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//label旋转角度 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + dataZoom: { + type: "inside", + orient: "vertical", + startValue: 0, + endValue: 7 + }, + series: [ + { + name: '耗电量', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item => Math.floor(Math.random() * 100)) + } + ] + }; +} +/** + * 散点图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const pointChartData = function (data, xAxisData, legend, $echarts) { + + return { + tooltip: { + trigger: 'item', + backgroundColor: 'rgba(0,0,0,0.4)', + textStyle: { + color: '#ffffff' + } + }, + xAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学', '榆林化工'], + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'value', + name: '产值:单位万元', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + nameTextStyle: { + padding: [0, 0, 10, 30] + } + }, + color: ['#FF5959', '#FADFA4', '#C9FFD7'], + series: [ + { + name: '联化科', + data: [ + { + value: ['联化科', 200], + symbolSize: 28, + itemStyle: {color: '#FF5959'}, + } + ], + type: 'scatter' + }, { + name: '立本作物', + data: [ + { + value: ['立本作物', 150], + symbolSize: 16, + itemStyle: {color: '#FADFA4'}, + } + ], + type: 'scatter' + }, { + name: '圣丰集团', + data: [ + { + value: ['圣丰集团', 150], + symbolSize: 16, + itemStyle: {color: '#FADFA4'}, + + } + ], + type: 'scatter' + }, { + name: '茂盛生物', + data: [ + { + value: ['茂盛生物', 50], + symbolSize: 10, + itemStyle: {color: '#C9FFD7'}, + } + ], + type: 'scatter' + }, { + name: '利尔化学', + data: [ + { + value: ['利尔化学', 50], + symbolSize: 16, + itemStyle: {color: '#C9FFD7'}, + } + ], + type: 'scatter' + }, { + name: '榆林化工', + data: [ + { + value: ['榆林化工', 150], + symbolSize: 32, + itemStyle: {color: '#FF5959'}, + } + ], + type: 'scatter' + }, + /*{ + data: [ + { + value: [20, 200], + symbolSize:28, + itemStyle:{color:'#FF5959'}, + name:'联化科' + },{ + value: [40, 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + name:'立本作物' + },{ + value: [60, 150], + symbolSize:16, + itemStyle:{color:'#C9FFD7'}, + name:'圣丰集团' + },{ + value: [80, 50], + symbolSize:10, + itemStyle:{color:'#C9FFD7'}, + name:'茂盛生物' + },{ + value: [100, 50], + symbolSize:16, + name:'利尔化学' + },{ + value: [120, 150], + symbolSize:32, + name:'榆林化工' + } + ], + type: 'scatter' + },*/ + ] + } +} diff --git a/src/components/energy/water/left/energyWaterLeft.component.html b/src/components/energy/water/left/energyWaterLeft.component.html new file mode 100644 index 0000000..4509d50 --- /dev/null +++ b/src/components/energy/water/left/energyWaterLeft.component.html @@ -0,0 +1,21 @@ +
+
+ + 企业用水量 + + +
+ 企业产值耗水分析 +
+
圆圈面积:立方米(m³)
+ +
+ 行业耗水分析 +
+ +
+ +
diff --git a/src/components/energy/water/left/energyWaterLeft.component.ts b/src/components/energy/water/left/energyWaterLeft.component.ts new file mode 100644 index 0000000..32c1fdb --- /dev/null +++ b/src/components/energy/water/left/energyWaterLeft.component.ts @@ -0,0 +1,112 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./energyWaterLeft.component.html" +import {pieChartData, barChartData,pointChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" + +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class EnergyWaterLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //散点图数据 + pointChartData: any = {}; + //叠加柱状图 + barChartData: any = {}; + //定时器 + timer: any = null; + // 排放达标率数据 + pieChartData: any = {} + //柱状图实例 + bar: any = {} + //折线图实例 + pie: any = {} + //散点图实例 + point: any = {} + + //获取图表实例 + getEcharts(e, type) { + this[type] = e + if (type === 'pie') { + this.pieChartData = pieChartData(); + } + if (type === 'bar') { + this.barChartData = barChartData([[90, 55, 80, 85, 25, 60, 60], [160, 80, 130, 133, 40, 95, 95]], this.xAxisData, this.legend, echarts) + this.bar.on('click', function (params) { + console.log(params); + }); + } + if (type === 'point') { + this.pointChartData = pointChartData([[90, 55, 80, 85, 25, 60, 60], [160, 80, 130, 133, 40, 95, 95]], this.xAxisData, this.legend, echarts) + } + } + + //折线图x轴坐标 + xAxisData = ['石油化工', '无机化工', '有机化工', '精细化工', '化肥农药', '塑料制品', '橡胶制品'] + //设置排放变化趋势默认选中项 + lineChartType = '排放量' + + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.pie.resize() + this.bar.resize() + }, 300) + } + autoRun(){ + if (this.barChartData.dataZoom.endValue === 42){ + this.barChartData.dataZoom.startValue = 0 + this.barChartData.dataZoom.endValue = 7; + }else{ + this.barChartData.dataZoom.startValue+=1; + this.barChartData.dataZoom.endValue+=1; + } + //最新出来的数据 + let selectDataE = this.barChartData.yAxis.data[this.barChartData.dataZoom.endValue] + + this.bar.setOption(this.barChartData) + } + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + + //图例 + legend = ["水 (吨)", + "标准煤 (吨)"] + + mounted() { + this.timer = setInterval(() => { + this.setChartData() + this.autoRun() + }, 6000) + + + window.addEventListener("resize", this.resize); + + } + + setChartData() { + this.pie.clear() + this.pie.setOption(this.pieChartData) + this.point.clear() + this.point.setOption(this.pointChartData) + } + + beforeDestroy() { + clearInterval(this.timer) + } + +} + diff --git a/src/components/energy/water/right/chartData.js b/src/components/energy/water/right/chartData.js new file mode 100644 index 0000000..9eeb617 --- /dev/null +++ b/src/components/energy/water/right/chartData.js @@ -0,0 +1,597 @@ +export const lineChartData = function () { + let xLabel = new Array(30).fill(0).map((item,i)=> i+1); + let dataValue = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + return { + color:['#7FB0FF'], + dataZoom : { + type:"inside", + // orient:"vertical", + startValue:0, + endValue:10 + }, + legend: { + show: false, + top: '10%', + icon: "rect", + itemWidth: 10, // 图例标记的图形宽度。 + // itemGap: 20, // 图例每项之间的间隔。 + itemHeight: 10, // 图例标记的图形高度。 + textStyle: { + color: '#fff', + fontSize: 14, + padding: [0, 8, 0, 8] + } + }, + grid: { + top: '5%', + left: '10%', + right: '5%', + bottom: '20%', + }, + xAxis: { + name:'日', + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + data: xLabel + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name: '单位产值能耗', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 2, + }, + }, + symbolSize: 4, //设定实心点的大小 + data: dataValue, + areaStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: 'rgba(127,176,255,0.5)' + }, { + offset: 1, color: 'rgba(127,176,255,0.3)' + }], + global: false + } + }, + }, + } + ] + } +} +export const lineChartData1 = function () { + let xLabel = new Array(30).fill(0).map((item,i)=> i+1); + let dataValue = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + return { + color:['#947FEA'], + dataZoom : { + type:"inside", + // orient:"vertical", + startValue:0, + endValue:10 + }, + legend: { + show: false, + top: '10%', + icon: "rect", + itemWidth: 10, // 图例标记的图形宽度。 + // itemGap: 20, // 图例每项之间的间隔。 + itemHeight: 10, // 图例标记的图形高度。 + textStyle: { + color: '#fff', + fontSize: 14, + padding: [0, 8, 0, 8] + } + }, + grid: { + top: '5%', + left: '10%', + right: '5%', + bottom: '20%', + }, + xAxis: { + name:'日', + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + data: xLabel + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name: '单位产值能耗', + type: 'line', + symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 + smooth: true, + lineStyle: { + normal: { + width: 2, + }, + }, + symbolSize: 4, //设定实心点的大小 + data: dataValue, + areaStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: 'rgba(148,127,234,0.5)' + }, { + offset: 1, color: 'rgba(148,127,234,0.3)' + }], + global: false + } + }, + }, + } + ] + } +} +export const pieChartData = function () { + return { + + title: { + text: `75%`, + subtext: '达成率', + left: 'center', + top: 'center', + itemGap: 0, + textStyle: { + fontSize: 28, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 10, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + angleAxis: { + max: 100, + // 隐藏刻度线 + show: false, + startAngle: 90 + }, + radiusAxis: { + type: 'category', + show: true, + axisLabel: { + show: false, + }, + axisLine: { + show: false, + }, + axisTick: { + show: false + }, + }, + polar: { + radius: '150%' //图形大小 + }, + series: [{ + type: 'bar', + data: ['75'], + showBackground: true, + roundCap: true, + backgroundStyle: { + color: 'rgba(64, 76, 76, 1)', + }, + coordinateSystem: 'polar', + barWidth: 20, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: '#7FB0FF' + }, { + offset: 1, color: '#7FB0FF' + }], + global: false + } + } + }, + }] + } +} + + + +// 修改弹框内容用到的方法 +function replaceHtmlWord(str) { + return str.replace("NO2", "NO2") + .replace("SO2", "SO2") + .replace("O3", "O3") + // .replace("PM10", "PM10") + // .replace("PM2.5", "PM2.5") + +} + +// 修改图例文字用到的方法 +function replaceWords(str) { + return str.replace("NO2", "NO{sub|2}") + .replace("SO2", "SO{sub|2}") + .replace("O3", "O{sub|3}") + // .replace("PM2.5", "PM{sub|2.5}") + // .replace("PM10", "PM{sub|10}"); +} + +/** + * 废气右侧折线图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const barChartData = function (data, xAxisData, legend,$echarts) { + + return { + color:['#FADFA4','#7FB0FF','#FFFFFF','#947FEA'], + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + }, + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + }, + legend: { + textStyle:{ + color:'#ffffff' + } + }, + grid: { + left: '3%', + top: '15%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学', '海利得','榆林化工', + '联化科1', '立本作物1', '圣丰集团1', '茂盛生物1', '利尔化学1', '海利得1','榆林化工1', + '联化科2', '立本作物2', '圣丰集团2', '茂盛生物2', '利尔化学2', '海利得2','榆林化工2', + '联化科3', '立本作物3', '圣丰集团3', '茂盛生物3', '利尔化学3', '海利得3','榆林化工3', + '联化科4', '立本作物4', '圣丰集团4', '茂盛生物4', '利尔化学4', '海利得4','榆林化工4', + '联化科5', '立本作物5', '圣丰集团5', '茂盛生物5', '利尔化学5', '海利得5','榆林化工5', + ], + + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//label旋转角度 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + dataZoom : { + type:"inside", + orient:"vertical", + startValue:0, + endValue:7 + }, + series: [ + { + name: '煤炭', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '石油', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '天然气', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + }, + { + name: '煤气', + type: 'bar', + stack: 'total', + label: { + show: false + }, + emphasis: { + focus: 'series' + }, + data: new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)) + } + ] + }; +} +/** + * 散点图 + * @param data + * @param xAxisData + * @param legend + * @param $echarts + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const pointChartData = function (data, xAxisData, legend,$echarts) { + + return { + tooltip: { + trigger: 'item', + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + }, + xAxis: { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学','榆林化工'], + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + rotate: 30,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + yAxis: { + type: 'value', + name:'产值:单位万元', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + nameTextStyle: { + padding: [0, 0, 10, 30] + } + }, + color:['#FF5959','#FADFA4','#C9FFD7'], + series: [ + { + name:'联化科', + data: [ + { + value: ['联化科', 200], + symbolSize:28, + itemStyle:{color:'#FF5959'}, + } + ], + type: 'scatter' + },{ + name:'立本作物', + data: [ + { + value: ['立本作物', 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + } + ], + type: 'scatter' + },{ + name:'圣丰集团', + data: [ + { + value: ['圣丰集团', 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + + } + ], + type: 'scatter' + },{ + name:'茂盛生物', + data: [ + { + value: ['茂盛生物', 50], + symbolSize:10, + itemStyle:{color:'#C9FFD7'}, + } + ], + type: 'scatter' + },{ + name:'利尔化学', + data: [ + { + value: ['利尔化学', 50], + symbolSize:16, + itemStyle:{color:'#C9FFD7'}, + } + ], + type: 'scatter' + },{ + name:'榆林化工', + data: [ + { + value: ['榆林化工', 150], + symbolSize:32, + itemStyle:{color:'#FF5959'}, + } + ], + type: 'scatter' + }, + /*{ + data: [ + { + value: [20, 200], + symbolSize:28, + itemStyle:{color:'#FF5959'}, + name:'联化科' + },{ + value: [40, 150], + symbolSize:16, + itemStyle:{color:'#FADFA4'}, + name:'立本作物' + },{ + value: [60, 150], + symbolSize:16, + itemStyle:{color:'#C9FFD7'}, + name:'圣丰集团' + },{ + value: [80, 50], + symbolSize:10, + itemStyle:{color:'#C9FFD7'}, + name:'茂盛生物' + },{ + value: [100, 50], + symbolSize:16, + name:'利尔化学' + },{ + value: [120, 150], + symbolSize:32, + name:'榆林化工' + } + ], + type: 'scatter' + },*/ + ] + } +} diff --git a/src/components/energy/water/right/energyWaterRight.component.html b/src/components/energy/water/right/energyWaterRight.component.html new file mode 100644 index 0000000..687a6b1 --- /dev/null +++ b/src/components/energy/water/right/energyWaterRight.component.html @@ -0,0 +1,85 @@ +
+
+ + 节能减排 + +
+ 节水目标 (吨) + {{detail.target}} +
+ + + 单位产品耗能趋势分析 + +
单位:kg/m³
+ + + 单位产值耗能趋势分析 + +
单位:kg/万元
+ + +
+
+
+
+ + 今日用水量(m³) +
+ +
+
+ 同比: + + {{dayData.yoy}}% +
+
+ 环比: + + {{dayData.round}}% +
+
+
+
+
+ + 本周用水量(m³) +
+ +
+
+ 同比: + + {{weekData.yoy}}% +
+
+ 环比: + + {{weekData.round}}% +
+
+
+
+
+ + 本月用水量(m³) +
+ +
+
+ 同比: + + {{monthData.yoy}}% +
+
+ 环比: + + {{monthData.round}}% +
+
+
+
+
diff --git a/src/components/energy/water/right/energyWaterRight.component.ts b/src/components/energy/water/right/energyWaterRight.component.ts new file mode 100644 index 0000000..83a01c9 --- /dev/null +++ b/src/components/energy/water/right/energyWaterRight.component.ts @@ -0,0 +1,166 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./energyWaterRight.component.html" +import {pieChartData, lineChartData,lineChartData1} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" +import ScrollNumberComponent from "@/components/scrollNumber.component.vue" + +import * as echarts from 'echarts'; +import {getRandNumBetween} from "@/utils/utils"; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + ScrollNumberComponent, + }, +}) +export default class EnergyWaterRightComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + // + lightningIcon = require("@/assets/img/energy/shui.png"); + green = require("@/assets/img/energy/green-arr.png"); + red = require("@/assets/img/energy/red-arr.png"); + //单位产品耗能趋势分析数据 + lineChartData: any = {}; + //单位产值耗能趋势分析数据 + lineChartData1: any = {}; + //定时器 + timer: any = null; + // 排放达标率数据 + pieChartData: any = {} + //柱状图实例 + bar: any = {} + //折线图实例 + pie: any = {} + //单位产品耗能趋势分析实例 + line: any = {} + //单位产值耗能趋势分析图实例 + line1: any = {} + //企业详情数据 + detail = { + target:130 + } + //日用燃料数据 + dayData = { + dayNum:1139.83, + yoy:11.2, + round:18 + } + //周用燃料数据 + weekData = { + dayNum:7978.81, + yoy:20.3, + round:14 + } + //月用燃料数据 + monthData = { + dayNum:34194.9, + yoy:18.3, + round:20 + } + changeCardData(type){ + const temp:any = { + dayNum:getRandNumBetween(1000,2000), + yoy:getRandNumBetween(10,20), + round:getRandNumBetween(10,20) + }; + + switch (type) { + case "dayData": + + break; + case "weekData": + temp.dayNum *= 7 + temp.yoy = getRandNumBetween(10,20) + temp.round = getRandNumBetween(10,20) + break; + case "monthData": + temp.dayNum *= 30 + temp.yoy = getRandNumBetween(10,20) + temp.round = getRandNumBetween(10,20) + break; + default: + break + } + temp.dayNum = Number(temp.dayNum.toFixed(2)) + this[type] = temp +} + //获取图表实例 + getEcharts(e, type) { + this[type] = e + if (type === 'pie') { + this.pieChartData = pieChartData(); + } + if (type === 'line1') { + this.lineChartData1 = lineChartData1() + } + if (type === 'line') { + this.lineChartData = lineChartData() + } + } + + //折线图x轴坐标 + xAxisData = ['石油化工', '无机化工', '有机化工', '精细化工', '化肥农药', '塑料制品', '橡胶制品'] + //设置排放变化趋势默认选中项 + lineChartType = '排放量' + + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.pie.resize() + this.line.resize() + this.line1.resize() + }, 300) + } + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + + //图例 + legend = ["水 (吨)", + "标准煤 (吨)"] + + mounted() { + this.timer = setInterval(() => { + this.setChartData() + // this.autoRun() + // this.dayNum = Math.floor(Math.random()*10000) + this.changeCardData('dayData') + this.changeCardData('weekData') + this.changeCardData('monthData') + }, 6000) + window.addEventListener("resize", this.resize); + } + + setChartData() { + this.pie.clear() + function getRandomIntInRange(min, max) { + return Math.floor(Math.random() * (max - min) + min); + } + const num = getRandomIntInRange(7,10)*10 + this.pieChartData.title.text = num+'%' + this.pieChartData.series.data =[num] + this.pie.setOption(this.pieChartData) + this.line.clear() + this.lineChartData.series[0].data = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + this.line.setOption(this.lineChartData) + this.line1.clear() + this.lineChartData1.series[0].data = new Array(42).fill(0).map(item=>Math.floor(Math.random()*100)); + this.line1.setOption(this.lineChartData1) + this.detail.target = parseInt(String(Math.random()*200)) + } + + beforeDestroy() { + clearInterval(this.timer) + } + +} + diff --git a/src/components/env/air/left/airLeft.component.html b/src/components/env/air/left/airLeft.component.html new file mode 100644 index 0000000..036e252 --- /dev/null +++ b/src/components/env/air/left/airLeft.component.html @@ -0,0 +1,59 @@ +
+
+ + 污染物年平均指标 + +
+
+
62
+
+ CO +
+
+
75%
+
+ O3 +
+
+
45
+
+ SO2 +
+
+
42
+
+ NO2 +
+
+
69%
+
+ PM2.5 +
+
+
27
+
+ PM10 +
+
+
+
+
+ + 污染物数值变化趋势 + + +
+ + + + +
+ +
+
+ + 污染物超标次数 + + +
+
diff --git a/src/components/env/air/left/airLeft.component.ts b/src/components/env/air/left/airLeft.component.ts new file mode 100644 index 0000000..7acc3d2 --- /dev/null +++ b/src/components/env/air/left/airLeft.component.ts @@ -0,0 +1,200 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./airLeft.component.html" +import {pieChartData, airLineChartData, airBarChartData} from "./chartData"; +import * as echarts from "echarts"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" +import { + yearData, + dataForDay, + dataForHour, + dataForHour1, + top10, + data3ForAir, + dataForBar, + airDetail +} from '@/dataDemo/mockData'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, +}) +export default class AirLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //告警信息数据 + dataList: any[] = [ + { + title: '消防告警', + info: '区域发现黑名单人员了区域发现黑名人预', + time: '2021-05-19 16:03:28', + level: '1' + }, { + title: '消防告警', + info: '区域发现黑名单人员了区域发现黑名人预', + time: '2021-05-19 16:03:28', + level: '2' + }, { + title: '消防告警', + info: '区域发现黑名单人员了区域发现黑名人预', + time: '2021-05-19 16:03:28', + level: '3' + }, { + title: '消防告警', + info: '区域发现黑名单人员了区域发现黑名人预', + time: '2021-05-19 16:03:28', + level: '1' + }, { + title: '消防告警', + info: '区域发现黑名单人员了区域发现黑名人预', + time: '2021-05-19 16:03:28', + level: '3' + }, { + title: '消防告警', + info: '区域发现黑名单人员了区域发现黑名人预', + time: '2021-05-19 16:03:28', + level: '2' + }, { + title: '消防告警', + info: '区域发现黑名单人员了区域发现黑名人预', + time: '2021-05-19 16:03:28', + level: '1' + }, { + title: '消防告警', + info: '区域发现黑名单人员了区域发现黑名人预', + time: '2021-05-19 16:03:28', + level: '2' + }, + ] + //定时器 + timer: any = null; + //污染物数值变化趋势图表数据 + option: any = {} + //污染物超标次数图表数据 + barChart: any = {} + //污染物数值变化趋势图表实例 + line: any = {} + //污染物超标次数图表实例 + bar: any = {} + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.line.resize() + this.bar.resize() + }, 300) + } + //存储图表实例 + getEcharts(e,type){ + this[type] = e + } + //销毁页面操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + //污染物数值变化趋势当前显示值 + lineChartType = '小时平均' + //切换小时平均和日平均 + changeData(val) { + this.selectIndex = 0 + if (val === '小时平均') { + this.initLineData(dataForHour) + } else { + this.initLineData(dataForDay) + } + } + + initLineData(datas:any = '') { + let temp: any = [] + if (datas) { + temp = JSON.parse(JSON.stringify(datas)) + } else { + temp = JSON.parse(JSON.stringify(dataForHour)) + } + + const xAxisData = temp.data[0].dataList?.map(item => item.date); + const data = temp.data.map(item => { + item.data = item.dataList?.map(its => its.value) + return item + }); + const legend = temp.data.map(item => item.name) + const selected = {}; + legend.forEach((item, i) => { + selected[item] = i === 0; + }) + this.option = airLineChartData(data, xAxisData, legend, selected) + } + + iniBarData() { + const temp = JSON.parse(JSON.stringify(data3ForAir)) + const xAxisData = temp.data?.map(item => item.type); + // let data = temp.data?.map(item => item.value); + const data = temp.data; + const legend = temp.data?.map(item => item.type) + console.log(legend, 'legend') + console.log(temp.data, 'temp.data') + this.barChart = airBarChartData(data, xAxisData, legend, echarts) + } + + selectIndex = 0 + + autoRunLine() { + const datas = this.lineChartType === '小时平均' ? dataForHour : dataForDay; + const temp = JSON.parse(JSON.stringify(datas)) + const xAxisData = temp.data[0].dataList?.map(item => item.date); + const data = temp.data.map(item => { + item.data = item.dataList?.map(its => its.value) + return item + }); + const legend = temp.data.map(item => item.name) + const selected = {}; + legend.forEach((item, i) => { + selected[item] = i === this.selectIndex; + }) + this.option = airLineChartData(data, xAxisData, legend, selected) + } + + getRandomInt(min: number, max: number) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值 + } + + mounted() { + this.initLineData() + this.iniBarData() + this.timer = setInterval(() => { + if (this.selectIndex > 5) { + this.selectIndex = 0 + } + this.autoRunLine() + this.selectIndex++ + }, 3000) + window.addEventListener("resize", this.resize); + + /* this.timer = setInterval(()=>{ + this.dataList = [ { + title:'消防告警', + info:'区域发现黑名单人员了区域发现黑名人预', + time:'2021-05-19 16:03:28', + level:'1', + isNew:true, + },...this.dataList] + },2000)*/ + + } + + beforeDestroy() { + clearInterval(this.timer) + } +} + diff --git a/src/components/env/air/left/chartData.js b/src/components/env/air/left/chartData.js new file mode 100644 index 0000000..8582d70 --- /dev/null +++ b/src/components/env/air/left/chartData.js @@ -0,0 +1,433 @@ +export const pieChartData = { + title: { + text: '75%', + subtext: '优良率', + itemGap: 5, + x: 105, + y: '37%', + textStyle: { + fontSize: 30, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 17, + fontWeight: 'normal', + align: "center", + color: '#5998FB' + }, + }, + tooltip: { + trigger: 'item' + }, + legend: { + orient: 'vertical', + right: '0%', + top: 'bottom', + height: 100, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 25, name: '断路'}, + {value: 25, name: '动土'}, + {value: 15, name: '受限空间'}, + {value: 20, name: '高处'}, + {value: 15, name: '临时用电'} + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left: -50, + radius: [50, 75], + data: [ + {value: 25, name: '断路'}, + {value: 1, name: ''}, + {value: 25, name: '动土'}, + {value: 1, name: ''}, + {value: 15, name: '受限空间'}, + {value: 1, name: ''}, + {value: 20, name: '高处'}, + {value: 1, name: ''}, + {value: 15, name: '临时用电'}, + {value: 1, name: ''}, + ], + color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null], + emphasis: { + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false + }, + tooltip: { + backgroundColor: 'rgba(0,0,0,0.4)', + textStyle: { + color: '#ffffff' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' +} + +// 修改弹框内容用到的方法 +function replaceHtmlWord(str) { + return str.replace("NO2", "NO2") + .replace("SO2", "SO2") + .replace("O3", "O3") + // .replace("PM10", "PM10") + // .replace("PM2.5", "PM2.5") + +} + +// 修改图例文字用到的方法 +function replaceWords(str) { + return str.replace("NO2", "NO{sub|2}") + .replace("SO2", "SO{sub|2}") + .replace("O3", "O{sub|3}") + // .replace("PM2.5", "PM{sub|2.5}") + // .replace("PM10", "PM{sub|10}"); +} + +export const airLineChartData = function (data, xAxisData, legend,selected) { + return { + color: ['#7FB0FF', '#947FEA', '#C9FFD7', '#FADFA4', '#FFFFFF'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: xAxisData + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: data + /*[ + { + data: data, + type: 'line', + itemStyle:{ + color:'#E8E8E8', + }, + symbolSize: 7, + lineStyle:{ + color:'#E8E8E8', + width:3 + }, + smooth:true, + label: { + show: true, + position:'top', + color:'#ffffff', + borderWidth:0 + }, + } + ]*/ + , + + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 40, + x2: 22, + y2: 20, + }, + legend: { + data: legend, + top: 0, + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + itemGap:10, + itemWidth:10, + selected, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + }, + } +} +export const airBarChartData = function (data, xAxisData,legend,$echarts) { + + let barTopColor = [ + "#B8ECFF", + "#7FB0FF", + "#E8E8E8", + "#FADFA4", + '#F9BAFF', + '#FFB7B7' + ]; + let barBottomColor = [ + "#7DBBD2", + "#5485D5", + "#999999", + '#CFB376', + '#A576A9', + '#BF8888' + ]; + let data1 = [ + [30,0,0,0,0,0], + [0,30,0,0,0,0], + [0,0,40,0,0,0], + [0,0,0,52,0,0], + [0,0,0,0,40,0], + [0,0,0,0,0,21], + ] + + let seriseData = data.map((item,i)=>{ + return { + data: data1[i], + type: 'bar', + name:item.name, + itemStyle: { + borderRadius:4, + color: function (params) { + return new $echarts.graphic.LinearGradient( + 0, 0, 0, 1, + [{ + offset: 0, + color: barTopColor[i] + }, + { + offset: 1, + color: barBottomColor[i] + } + ] + ) + }, + }, + barWidth: 8, + barGap:'-100%', + } + }) + return { + color:[ + "#B8ECFF", + "#7FB0FF", + "#E8E8E8", + "#FADFA4", + '#F9BAFF', + '#FFB7B7' + ], + xAxis: { + name:"", + type: 'category', + data: xAxisData, + // 设置文本样式 + axisLabel:{ + show:true, + interval:0, + formatter:function(name){ + return replaceWords(name); + }, + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + margin: 14, + verticalAlign: "middle", + fontSize: 10, + color:"#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + }, + rotate: 0, + }, + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + nameTextStyle:{ + align:'left' + }, + nameGap:20 + }, + yAxis: { + type: 'value', + name:"", + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: seriseData, + label: { + // show: true + }, + tooltip: { + show: true, + alwaysShowContent: false, + trigger: 'item', + backgroundColor: 'rgba(0,0,0,0.4)', + textStyle: { + color: '#ffffff' + } + }, grid: { + x: 30, + y: 40, + x2: 22, + y2: 20, + }, + legend: { + show:true, + data: legend, + top: 0, + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + itemGap:10, + itemWidth:10, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + }, + } +} diff --git a/src/components/env/air/right/airRight.component.html b/src/components/env/air/right/airRight.component.html new file mode 100644 index 0000000..b2a5f88 --- /dev/null +++ b/src/components/env/air/right/airRight.component.html @@ -0,0 +1,69 @@ +
+
+ + 监测点空气质量最差TOP5 + +
+

{{item.name}}

+
+
+
+
+
+
+
{{item.value}}
+
+
+ +
+
+ + 监测点优良率 + + +
+ +
diff --git a/src/components/env/air/right/airRight.component.ts b/src/components/env/air/right/airRight.component.ts new file mode 100644 index 0000000..4137f78 --- /dev/null +++ b/src/components/env/air/right/airRight.component.ts @@ -0,0 +1,131 @@ +import {Component, Emit, Prop, Vue} from 'vue-property-decorator'; +import template from "./airRight.component.html" +import {pieChartData} from "./chartData"; +import {smartAndEnvironmentallyFriendlyData} from '@/dataDemo/smartAndEnvironmentallyFriendlyData'; +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class AirRightComponent extends Vue { + @Prop({default: []}) top5Data!: any; + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + totalEquipment = 1024; + onlineEquipment = 724; + timer: any = null; + option: any = {} + pieChart = {} + iconImg1 = require("@/assets/img/env/gas.png"); + iconImg2 = require("@/assets/img/env/gas-year.png"); + iconImg3 = require("@/assets/img/env/count.png"); + iconImg4 = require("@/assets/img/env/waste.png"); + iconImg5 = require("@/assets/img/env/waste-year.png"); + iconImg6 = require("@/assets/img/env/count.png"); + iconImg7 = require("@/assets/img/env/clean.png"); + iconImg8 = require("@/assets/img/env/clean-year.png"); + iconImg9 = require("@/assets/img/env/clean-count.png"); + smartAndEnvironmentallyFriendlyData = JSON.parse(JSON.stringify(smartAndEnvironmentallyFriendlyData)) + + getEcharts(e) { + this.pieChart = e + } + + nameMapping = { + "formaldehydeExcessRate": "甲醛超标率",//甲醛超标率 + "methanolExceedance": "甲醇超标率",//甲醇超标率 + // "chlorineGasExcessRate": "氯气超标率",//氯气超标率 + "NOExceedance": "一氧化氮超标率",//一氧化氮超标率 + // "HFExceedance": "氟化氢超标率",//氟化氢超标率 + "HCLExceedance": "氯化氢超标率",//氯化氢超标率 + "BenzeneExceedance": "苯系物超标率",//苯系物超标率 + "EthanolExceedance": "乙醇超标率",//乙醇超标率 + // "bromineGasExcessRate": "溴气超标率",//溴气超标率 + // "THFExceedance": "四氢呋喃超标率",//四氢呋喃超标率 + // "EpichlorohydrinExceedance": "环氧氯丙烷超标率",//环氧氯丙烷超标率 + // "HBRExceedance": "HBR超标率",//HBR超标率 + // "AcrylonitrileExceedance": "丙烯腈超标率",//丙烯腈超标率 + + } + + autoIndex = 0; + timerForLineData: any = null; + +//自动切换line图表数据 + /* autoChangeLineData() { + this.timerForLineData = setInterval(() => { + let arr: string[] = [ + '大气质量', + '水体质量', + '土壤质量' + ] + if (this.autoIndex > 2) { + this.autoIndex = 0 + } + this.lineChartType = arr[this.autoIndex]; + this.changeData(arr[this.autoIndex]) + this.autoIndex++ + }, 5000) + }*/ + + lineChartType = '大气质量'; + flag = ''; + flagName = '' + + +//随机加减数 + randomNum() { + const num = this.getRandomInt(4, 20) + + } + +//获取范围内随机数 + getRandomInt(min: number, max: number) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值 + } + + mounted() { + /* this.timer = setInterval(()=>{ + this.randomNum() + }, 10000)*/ + this.option = pieChartData() + + + } + + + beforeDestroy() { + clearInterval(this.timer) + clearInterval(this.timerForLineData) + } + + //改变污染物监测颜色 + changeColor(val) { + if (Number(val) <= 30) { + return '#88E29F' + } else if (Number(val) > 30 && Number(val) <= 50) { + return '#F2A183' + } else { + return '#DD7171' + } + + } + + @Emit('clickBar') + clickBar(item) { + // console.log(item) + } +} + diff --git a/src/components/env/air/right/chartData.js b/src/components/env/air/right/chartData.js new file mode 100644 index 0000000..2158e2f --- /dev/null +++ b/src/components/env/air/right/chartData.js @@ -0,0 +1,383 @@ +export const pieChartData = function () { + return { + title: { + text: '75%', + subtext: '优良率', + itemGap: 5, + x: '40%', + y: '40%', + textAlign:'center', + textStyle: { + fontSize: 28, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 10, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + trigger: 'item' + }, + legend: { + orient: 'vertical', + right: '0%', + top: 'bottom', + height:100, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 49, name: '优质量'}, + {value: 24, name: '良质量'}, + {value: 24, name: '其他质量'}, + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left:-50, + radius: [55, 65], + data: [ + {value: 49, name: '优质量'}, + {value: 1, name: ''}, + {value: 24, name: '良质量'}, + {value: 1, name: ''}, + {value: 24, name: '其他质量'}, + {value: 1, name: ''}, + ], + color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null], + emphasis: { + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' + } +} + +export const lineChartData = function (data,xAxisData,$echarts){ + return { + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'dashed' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine:{ + lineStyle:{ + color: '#999999', + } + }, + + data: xAxisData + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'dashed' + }, + }, + axisLine:{ + lineStyle:{ + color: '#999999', + } + }, + }, + series: [ + { + data: data, + type: 'line', + itemStyle:{ + color:'#E8E8E8', + }, + symbolSize: 7, + lineStyle:{ + color:'#E8E8E8', + width:3 + }, + smooth:true, + label: { + show: true, + position:'top', + color:'#ffffff', + borderWidth:0 + }, + } + ], + + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 22, + x2: 12, + y2: 20, + } + } +} +export const barChartData = function (data ={},xAxisData = [],$echarts = {}){ + const datas = [ + { name: "2018年", value: "264.9" }, + { name: "2019年", value: "241.5" }, + { name: "2020年", value: "312.5" }, + { name: "2021年", value: "447.9" }, + ] + const xData = datas.map((item) => item.name); + const yData = datas.map((item) => item.value); + const max = Math.ceil(Math.max(...yData) * 1.2); + const maxData = [max, max, max, max, max]; + return { + backgroundColor: '#313131', + grid: { + left: "5%", + right: "8%", + bottom: "5%", + top: "10%", + containLabel: false, + }, + xAxis: [ + { + show: false, + }, + { + show: false, + }, + ], + yAxis: [ + { + show: false, + inverse: true, + data: yData, + }, + { + show: true, + data: yData, + offset: -45, + position: "right", + axisLabel: { + show: false, + }, + axisLine: { + show: false, + }, + splitLine: { + show: false, + }, + axisTick: { + show: false, + }, + }, + ], + series: [ + { + name: "进度1", + show: true, + type: "bar", + // barGap: "-100%", + stack: 'all', + xAxisIndex: 1, + barWidth: 3, + itemStyle: { + borderRadius: 3, + color: (params) => { + return { + type: "linear", + x: 0, + y: 0, + x2: 1, + y2: 1, + colorStops: [ + { + offset: 0, + color: "#9DD5AC", + }, { + offset: 1, + color: "#6ACD84", + } + ], + }; + }, + }, + // max: 0, + labelLine: { + show: false, + }, + z: 2, + data: yData, + },{ + name: "进度2", + show: true, + type: "bar", + // barGap: "-100%", + stack: 'all', + xAxisIndex: 1, + barWidth: 3, + itemStyle: { + borderRadius: 3, + color: (params) => { + return { + type: "linear", + x: 0, + y: 0, + x2: 1, + y2: 1, + colorStops: [ + { + offset: 0, + color: "#C5C37A", + }, { + offset: 1, + color: "#CCD975", + } + ], + }; + }, + }, + // max: 0, + labelLine: { + show: false, + }, + z: 2, + data: yData, + },{ + name: "进度3", + show: true, + type: "bar", + // barGap: "-100%", + stack: 'all', + xAxisIndex: 1, + barWidth: 3, + itemStyle: { + borderRadius: 3, + color: (params) => { + return { + type: "linear", + x: 0, + y: 0, + x2: 1, + y2: 1, + colorStops: [ + { + offset: 0, + color: "#CA9355", + }, { + offset: 1, + color: "#D15D5D", + } + ], + }; + }, + }, + // max: 0, + labelLine: { + show: false, + }, + z: 2, + data: yData, + }, + { + name: "外圆", + type: "scatter", + stack: 'all', + emphasis: { + scale: false, + }, + xAxisIndex: 1, + symbolSize: [1,10], + symbol: 'rect', + itemStyle: { + color: (params) => { + return "#ffffff"; + }, + shadowColor: "rgba(255, 255, 255, 0.5)", + shadowBlur: 5, + borderWidth: 1, + opacity: 1, + }, + z: 2, + data: yData, + }, + { + name: "年份", + z: 1, + show: true, + type: "bar", + xAxisIndex: 1, + barGap: "-100%", + barWidth: 4, + itemStyle: { + borderRadius: 4, + color: "rgba(13, 55, 78, 1)", + }, + label: { + show: true, + position: [0, -25], + // rich: { + // //富文本 + // white: { + // //自定义颜色 + // color: "#fff", + // }, + // }, + fontSize: 14, + color: "#fff", + formatter: function (data) { + return xData[data.dataIndex]; + }, + }, + data: [0,0,0,0], + }, + ], + }; + +} diff --git a/src/components/env/clean/left/chartData.js b/src/components/env/clean/left/chartData.js new file mode 100644 index 0000000..a4787b0 --- /dev/null +++ b/src/components/env/clean/left/chartData.js @@ -0,0 +1,183 @@ + +export const gasBarChartData = function () { + const yData = [ + '榆林煤矿有限公司', + '榆林煤矿有限公司A', + '榆林煤矿有限公司B', + '榆林煤矿有限公司C', + '榆林煤矿有限公司D', + '榆林煤矿有限公司E', + '榆林煤矿有限公司F', + '榆林煤矿有限公司G' + ]; + let data = ['500', '400', '360', '300', '270', '200', '180', '150']; + data.sort((a, b) => b - a); + let max = Math.max.apply(null, data); + max = max + 200; + let getMax = []; + for (let i = 0; i < yData.length; i++) { + getMax.push(max); + } + + return { + tooltip: { + show:false, + trigger: 'axis', + axisPointer: { + type: 'none', + }, + formatter: function (params) { + return params[0].name + ' : ' + params[0].value; + }, + }, + legend: { + right: '25%', + top: '0%', + itemWidth: 10, + itemHeight: 10, + data: [ + '超标告警', + '其他报警' + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + xAxis: { + show: false, + type: 'value', + }, + grid: { + right: '12%', + left: '1%', + top: '6%', + bottom: '1%', + }, + yAxis: [ + { + type: 'category', + inverse: true, + offset: -8, + axisLabel: { + show: true, + align: 'left', + verticalAlign:'bottom', + lineHeight: 36, + textStyle: { + color: '#fff', + fontSize: '12', + }, + }, + splitLine: { + show: false, + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + }, + data: yData, + }, + { + type: 'category', + inverse: true, + offset: 0, + axisTick: 'none', + axisLine: 'none', + show: true, + axisLabel: { + textStyle: { + color: '#fff', + fontSize: '14', + }, + }, + data: data, + }, + ], + series: [ + { + name: '超标告警', + type: 'bar', + stack: 'user', + zlevel: 1, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 1, + y2: 0, + colorStops: [ + { + offset: 0, + color: '#7FB0FF', // 0% 处的颜色 + }, + { + offset: 1, + color: '#5485D5', // 100% 处的颜色 + }, + ], + global: false, // 缺省为 false + }, + }, + }, + barWidth: 10, + data: data.map((item,i)=>{ + return { + value:item, + name:yData[i] + } + }), + }, + { + name: '其他报警', + type: 'bar', + stack: 'user', + zlevel: 1, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 1, + y2: 0, + colorStops: [ + { + offset: 0, + color: '#ACACAC', // 0% 处的颜色 + }, + { + offset: 1, + color: '#ffffff', // 100% 处的颜色 + }, + ], + global: false, // 缺省为 false + }, + }, + }, + barWidth: 10, + data: [160,100,130,120,140,120,130,100].map((item,i)=>{ + return { + value:item, + name:yData[i] + } + }), + }, + { + name: '背景', + type: 'bar', + barWidth: 10, + barGap: '-100%', + data: getMax, + itemStyle: { + color: 'rgba(21,36,72,0.5)', + }, + }, + ], + }; + +} diff --git a/src/components/env/clean/left/cleanLeft.component.html b/src/components/env/clean/left/cleanLeft.component.html new file mode 100644 index 0000000..0c50e88 --- /dev/null +++ b/src/components/env/clean/left/cleanLeft.component.html @@ -0,0 +1,15 @@ +
+
+ + 企业告警排行 + + +
+
+ + 告警信息列表 + + +
+ +
diff --git a/src/components/env/clean/left/cleanLeft.component.ts b/src/components/env/clean/left/cleanLeft.component.ts new file mode 100644 index 0000000..ad62530 --- /dev/null +++ b/src/components/env/clean/left/cleanLeft.component.ts @@ -0,0 +1,100 @@ +import {Component, Emit, Vue} from 'vue-property-decorator'; +import template from "./cleanLeft.component.html" +import {gasBarChartData} from "./chartData"; +import * as echarts from "echarts"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" + + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, +}) +export default class CleanLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //企业告警排行图表实例 + bar: any = {} + //报警列表 + get dataList(){ + return this.$store.state.warningList + } + //企业告警排行图表数据 + private barChart: any = {}; + + //获取图表实例 + getEcharts(e, type) { + this[type] = e + const self = this; + // getZr() + this[type].on('click',function(params){ + console.log(params) + const company = self.$store.state.companyList + const index = Math.floor(Math.random()*10)%2 + const companyObj = company[index] + companyObj.name = params.data.name + self.getCompany(companyObj) + }) + } + //获取公司信息 + @Emit('getCompany') + getCompany(item) { + console.log('item', item) + } + + //初始化特征污染物超标次数图表数据 + iniBarData() { + this.barChart = gasBarChartData() + } + //点击告警信息 + @Emit() + getItem(item) { + console.log(item) + } + + timer: any = {} + + mounted() { + this.iniBarData() + //动态插入数据 + /* this.timer = setInterval(() => { + this.scrollList() + }, 6000)*/ + } + + count = 1 + + //告警信息列表滚动 + scrollList() { + this.dataList.unshift({ + title: '消防告警' + this.count, + info: '区域发现黑名单人员了区域发现黑名人预', + time: '2021-05-19 16:03:28', + level: this.count % 3, + id: Math.random(), + }) + this.count++; + /* this.$nextTick(() => { + const dom: any = document.querySelector('.warning-list-box') + dom.classList.remove('animate__fadeInLeft') + setTimeout(() => { + dom.classList.add('animate__fadeInLeft') + },) + })*/ + } + + beforeDestroy() { + clearInterval(this.timer) + } +} + diff --git a/src/components/env/clean/right/chartData.js b/src/components/env/clean/right/chartData.js new file mode 100644 index 0000000..0cb3e4e --- /dev/null +++ b/src/components/env/clean/right/chartData.js @@ -0,0 +1,264 @@ +export const pieChartData = function () { + return { + title: { + text: '75%', + subtext: '达标率', + itemGap: 5, + x: '40%', + y: '40%', + textAlign:'center', + textStyle: { + fontSize: 28, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 10, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + show:false, + trigger: 'item', + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + + }, + legend: { + orient:'vertical', + show: true, + itemStyle: { + opacity: 1, + }, + itemWidth: 12, + itemHeight: 8, + top: 'bottom', + right:0, + itemGap: 20, + textStyle: { + color: '#D4E5FF', + }, + + }, + color: ['#B8ECFF','#FADFA4'], + series: [ + { + type: 'pie', + radius: [60, 70], + center: ["42%", "50%"], + avoidLabelOverlap: false, + selectedOffset: 7, + label: { + show: false, + position: 'center' + }, + animation: true, + emphasis: { + disabled: true, + label: { + show: false, + } + }, + labelLine: { + show: false + }, + data: [ + { + name: '未超标数', + value: 75, + itemStyle: { + color: '#E8E8E8', + opacity: 1 + }, + }, + { + name: '超标数', + value: 25, + itemStyle: { + color: '#7FB0FF', + opacity: 0 + } + }, + ] + }, + { + type: 'pie', + radius: [55, 65], + center: ["42%", "50%"], + avoidLabelOverlap: false, + selectedOffset: 7, + label: { + show: false, + position: 'center' + }, + animation: false, + emphasis: { + disabled: true, + label: { + show: false, + } + }, + labelLine: { + show: false + }, + data: [ + { + name: '未超标数', + value: 75, + itemStyle: { + color: '#E8E8E8', + opacity: 0 + }, + }, + { + name: '超标数', + value: 25, + itemStyle: { + color: '#7FB0FF', + opacity: 1 + } + }, + ] + }, + + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' + } +} + + + +// 修改弹框内容用到的方法 +function replaceHtmlWord(str) { + return str.replace("NO2", "NO2") + .replace("SO2", "SO2") + .replace("O3", "O3") + // .replace("PM10", "PM10") + // .replace("PM2.5", "PM2.5") + +} + +// 修改图例文字用到的方法 +function replaceWords(str) { + return str.replace("NO2", "NO{sub|2}") + .replace("SO2", "SO{sub|2}") + .replace("O3", "O{sub|3}") + // .replace("PM2.5", "PM{sub|2.5}") + // .replace("PM10", "PM{sub|10}"); +} + +/** + * 废气右侧折线图 + * @param data + * @param xAxisData + * @param legend + * @param selected + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const cleanRightLineChartData = function (data, xAxisData, legend) { + return { + color: ['#7FB0FF','#E8E8E8','#B8ECFF','#C9FFD7'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: xAxisData + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: data, + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 40, + x2: 22, + y2: 20, + }, + legend: { + data: legend, + top: 10, + padding: [2, 2], + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + align:'left', + itemGap:10, + width: "100%", + itemWidth:10, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 8, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + } + + } +} diff --git a/src/components/env/clean/right/cleanRight.component.html b/src/components/env/clean/right/cleanRight.component.html new file mode 100644 index 0000000..19c52a8 --- /dev/null +++ b/src/components/env/clean/right/cleanRight.component.html @@ -0,0 +1,20 @@ +
+
+ + 排放变化趋势 + +
+ + + + +
+ +
+
+ + 排放达标率 + + +
+
diff --git a/src/components/env/clean/right/cleanRight.component.ts b/src/components/env/clean/right/cleanRight.component.ts new file mode 100644 index 0000000..cde82f8 --- /dev/null +++ b/src/components/env/clean/right/cleanRight.component.ts @@ -0,0 +1,101 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./cleanRight.component.html" +import {pieChartData, cleanRightLineChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" + +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") +import { + dataForClean1, + dataForClean2, +} from '@/dataDemo/mockData'; + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class CleanRightComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //柱状图数据 + lineChartData: any = {}; + //定时器 + timer: any = null; + // 排放达标率数据 + pieChartData: any = {} + //柱状图实例 + line: any = {} + //饼图实例 + pie: any = {} + + //获取图表实例 + getEcharts(e, type) { + this[type] = e + } + //排放量数据 + dataForEmissions = dataForClean1 + //排放浓度数据 + dataForEmissionConcentration = dataForClean2 + //折线图x轴坐标 + xAxisData = ['1月','2月','3月','4月','5月','6月'] + //设置排放变化趋势默认选中项 + lineChartType = '排放量' + //排放变化趋势切换排放量排放浓度 + changeData(val) { + if (val === '排放量') { + this.lineChartData = cleanRightLineChartData(this.dataForEmissions.data,this.xAxisData,this.legend) + } else { + this.lineChartData = cleanRightLineChartData(this.dataForEmissionConcentration.data,this.xAxisData,this.legend) + } + } + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.line.resize() + }, 300) + } + + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + //图例 + legend = ["COD", + "氨氮", + "VOS", + "石油类"] + mounted() { + /* this.timer = setInterval(()=>{ + this.randomNum() + }, 10000)*/ + this.pieChartData = pieChartData() + // data, xAxisData, legend + this.lineChartData = cleanRightLineChartData(this.dataForEmissions.data,this.xAxisData,this.legend) + window.addEventListener("resize", this.resize); + + } + + + beforeDestroy() { + clearInterval(this.timer) + } + + //改变污染物监测颜色 + changeColor(val) { + if (Number(val) <= 30) { + return '#88E29F' + } else if (Number(val) > 30 && Number(val) <= 50) { + return '#F2A183' + } else { + return '#DD7171' + } + + } +} + diff --git a/src/components/env/gas/left/chartData.js b/src/components/env/gas/left/chartData.js new file mode 100644 index 0000000..a4787b0 --- /dev/null +++ b/src/components/env/gas/left/chartData.js @@ -0,0 +1,183 @@ + +export const gasBarChartData = function () { + const yData = [ + '榆林煤矿有限公司', + '榆林煤矿有限公司A', + '榆林煤矿有限公司B', + '榆林煤矿有限公司C', + '榆林煤矿有限公司D', + '榆林煤矿有限公司E', + '榆林煤矿有限公司F', + '榆林煤矿有限公司G' + ]; + let data = ['500', '400', '360', '300', '270', '200', '180', '150']; + data.sort((a, b) => b - a); + let max = Math.max.apply(null, data); + max = max + 200; + let getMax = []; + for (let i = 0; i < yData.length; i++) { + getMax.push(max); + } + + return { + tooltip: { + show:false, + trigger: 'axis', + axisPointer: { + type: 'none', + }, + formatter: function (params) { + return params[0].name + ' : ' + params[0].value; + }, + }, + legend: { + right: '25%', + top: '0%', + itemWidth: 10, + itemHeight: 10, + data: [ + '超标告警', + '其他报警' + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + xAxis: { + show: false, + type: 'value', + }, + grid: { + right: '12%', + left: '1%', + top: '6%', + bottom: '1%', + }, + yAxis: [ + { + type: 'category', + inverse: true, + offset: -8, + axisLabel: { + show: true, + align: 'left', + verticalAlign:'bottom', + lineHeight: 36, + textStyle: { + color: '#fff', + fontSize: '12', + }, + }, + splitLine: { + show: false, + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + }, + data: yData, + }, + { + type: 'category', + inverse: true, + offset: 0, + axisTick: 'none', + axisLine: 'none', + show: true, + axisLabel: { + textStyle: { + color: '#fff', + fontSize: '14', + }, + }, + data: data, + }, + ], + series: [ + { + name: '超标告警', + type: 'bar', + stack: 'user', + zlevel: 1, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 1, + y2: 0, + colorStops: [ + { + offset: 0, + color: '#7FB0FF', // 0% 处的颜色 + }, + { + offset: 1, + color: '#5485D5', // 100% 处的颜色 + }, + ], + global: false, // 缺省为 false + }, + }, + }, + barWidth: 10, + data: data.map((item,i)=>{ + return { + value:item, + name:yData[i] + } + }), + }, + { + name: '其他报警', + type: 'bar', + stack: 'user', + zlevel: 1, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 1, + y2: 0, + colorStops: [ + { + offset: 0, + color: '#ACACAC', // 0% 处的颜色 + }, + { + offset: 1, + color: '#ffffff', // 100% 处的颜色 + }, + ], + global: false, // 缺省为 false + }, + }, + }, + barWidth: 10, + data: [160,100,130,120,140,120,130,100].map((item,i)=>{ + return { + value:item, + name:yData[i] + } + }), + }, + { + name: '背景', + type: 'bar', + barWidth: 10, + barGap: '-100%', + data: getMax, + itemStyle: { + color: 'rgba(21,36,72,0.5)', + }, + }, + ], + }; + +} diff --git a/src/components/env/gas/left/gasLeft.component.html b/src/components/env/gas/left/gasLeft.component.html new file mode 100644 index 0000000..3cef768 --- /dev/null +++ b/src/components/env/gas/left/gasLeft.component.html @@ -0,0 +1,15 @@ +
+
+ + 企业告警排行 + + +
+
+ + 告警信息列表 + + +
+ +
diff --git a/src/components/env/gas/left/gasLeft.component.ts b/src/components/env/gas/left/gasLeft.component.ts new file mode 100644 index 0000000..9f19448 --- /dev/null +++ b/src/components/env/gas/left/gasLeft.component.ts @@ -0,0 +1,103 @@ +import {Component, Emit, Vue} from 'vue-property-decorator'; +import template from "./gasLeft.component.html" +import {gasBarChartData} from "./chartData"; +import * as echarts from "echarts"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" + + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, +}) +export default class GasLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //企业告警排行图表实例 + bar: any = {} + //报警列表 + get dataList(){ + return this.$store.state.warningList + } + //企业告警排行图表数据 + private barChart: any = {}; + + //获取图表实例 + getEcharts(e, type) { + this[type] = e + const self = this; + // getZr() + this[type].on('click',function(params){ + console.log(params) + const company = self.$store.state.companyList + const index = Math.floor(Math.random()*10)%2 + const companyObj = company[index] + companyObj.name = params.data.name + self.getCompany(companyObj) + }) + } + //获取公司信息 + @Emit('getCompany') + getCompany(item) { + console.log('item', item) + } + //初始化特征污染物超标次数图表数据 + iniBarData() { + this.barChart = gasBarChartData() + } + getItemData(item){ + const map = { + "1":"一级", + "2":"二级", + "3":"三级", + } + item.levelName = map[item.level] + item.equipment = '4号监测点' + this.getItem(item) + } + //点击告警信息 + @Emit() + getItem(item){ + console.log(item) + } + timer:any = {} + mounted() { + this.iniBarData() + //动态插入数据 + /* this.timer = setInterval(() => { + this.scrollList() + }, 6000)*/ + } + count = 1 + //告警信息列表滚动 + scrollList() { + this.dataList.unshift({ + title: '消防告警' + this.count, + info: '区域发现黑名单人员了区域发现黑名人预', + time: '2021-05-19 16:03:28', + level: this.count % 3, + }) + this.count++; + this.$nextTick(() => { + const dom: any = document.querySelector('.warning-list-box') + dom.classList.remove('animate__fadeInLeft') + setTimeout(() => { + dom.classList.add('animate__fadeInLeft') + },) + }) + } + beforeDestroy() { + clearInterval(this.timer) + } +} + diff --git a/src/components/env/gas/right/chartData.js b/src/components/env/gas/right/chartData.js new file mode 100644 index 0000000..f95d9c8 --- /dev/null +++ b/src/components/env/gas/right/chartData.js @@ -0,0 +1,264 @@ +export const pieChartData = function () { + return { + title: { + text: '75%', + subtext: '达标率', + itemGap: 5, + x: '40%', + y: '40%', + textAlign:'center', + textStyle: { + fontSize: 28, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 10, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + show:false, + trigger: 'item', + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + + }, + legend: { + orient:'vertical', + show: true, + itemStyle: { + opacity: 1, + }, + itemWidth: 12, + itemHeight: 8, + top: 'bottom', + right:0, + itemGap: 20, + textStyle: { + color: '#D4E5FF', + }, + + }, + color: ['#B8ECFF','#FADFA4'], + series: [ + { + type: 'pie', + radius: [60, 70], + center: ["42%", "50%"], + avoidLabelOverlap: false, + selectedOffset: 7, + label: { + show: false, + position: 'center' + }, + animation: true, + emphasis: { + disabled: true, + label: { + show: false, + } + }, + labelLine: { + show: false + }, + data: [ + { + name: '未超标数', + value: 75, + itemStyle: { + color: '#E8E8E8', + opacity: 1 + }, + }, + { + name: '超标数', + value: 25, + itemStyle: { + color: '#7FB0FF', + opacity: 0 + } + }, + ] + }, + { + type: 'pie', + radius: [55, 65], + center: ["42%", "50%"], + avoidLabelOverlap: false, + selectedOffset: 7, + label: { + show: false, + position: 'center' + }, + animation: false, + emphasis: { + disabled: true, + label: { + show: false, + } + }, + labelLine: { + show: false + }, + data: [ + { + name: '未超标数', + value: 75, + itemStyle: { + color: '#E8E8E8', + opacity: 0 + }, + }, + { + name: '超标数', + value: 25, + itemStyle: { + color: '#7FB0FF', + opacity: 1 + } + }, + ] + }, + + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' + } +} + + + +// 修改弹框内容用到的方法 +function replaceHtmlWord(str) { + return str.replace("NO2", "NO2") + .replace("SO2", "SO2") + .replace("O3", "O3") + // .replace("PM10", "PM10") + // .replace("PM2.5", "PM2.5") + +} + +// 修改图例文字用到的方法 +function replaceWords(str) { + return str.replace("NO2", "NO{sub|2}") + .replace("SO2", "SO{sub|2}") + .replace("O3", "O{sub|3}") + // .replace("PM2.5", "PM{sub|2.5}") + // .replace("PM10", "PM{sub|10}"); +} + +/** + * 废气右侧折线图 + * @param data + * @param xAxisData + * @param legend + * @param selected + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const gasRightLineChartData = function (data, xAxisData, legend) { + return { + color: ['#7FB0FF','#E8E8E8'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: xAxisData + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: data, + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 40, + x2: 22, + y2: 20, + }, + legend: { + data: legend, + top: 10, + padding: [2, 2], + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + align:'left', + itemGap:10, + width: "100%", + itemWidth:10, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 8, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + } + + } +} diff --git a/src/components/env/gas/right/gasRight.component.html b/src/components/env/gas/right/gasRight.component.html new file mode 100644 index 0000000..19c52a8 --- /dev/null +++ b/src/components/env/gas/right/gasRight.component.html @@ -0,0 +1,20 @@ +
+
+ + 排放变化趋势 + +
+ + + + +
+ +
+
+ + 排放达标率 + + +
+
diff --git a/src/components/env/gas/right/gasRight.component.ts b/src/components/env/gas/right/gasRight.component.ts new file mode 100644 index 0000000..51f475a --- /dev/null +++ b/src/components/env/gas/right/gasRight.component.ts @@ -0,0 +1,99 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./gasRight.component.html" +import {pieChartData, gasRightLineChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" + +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") +import { + dataForGas1, + dataForGas2, +} from '@/dataDemo/mockData'; + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class GasRightComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //柱状图数据 + lineChartData: any = {}; + //定时器 + timer: any = null; + // 排放达标率数据 + pieChartData: any = {} + //柱状图实例 + line: any = {} + //饼图实例 + pie: any = {} + + //获取图表实例 + getEcharts(e, type) { + this[type] = e + } + //排放量数据 + dataForEmissions = dataForGas1 + //排放浓度数据 + dataForEmissionConcentration = dataForGas2 + //折线图x轴坐标 + xAxisData = ['1月','2月','3月','4月','5月','6月'] + //设置排放变化趋势默认选中项 + lineChartType = '排放量' + //排放变化趋势切换排放量排放浓度 + changeData(val) { + + if (val === '排放量') { + this.lineChartData = gasRightLineChartData(this.dataForEmissions.data,this.xAxisData,this.legend) + } else { + this.lineChartData = gasRightLineChartData(this.dataForEmissionConcentration.data,this.xAxisData,this.legend) + } + } + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.line.resize() + }, 300) + } + + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + //图例 + legend = ['COD','氨氮'] + mounted() { + /* this.timer = setInterval(()=>{ + this.randomNum() + }, 10000)*/ + this.pieChartData = pieChartData() + // data, xAxisData, legend + this.lineChartData = gasRightLineChartData(this.dataForEmissions.data,this.xAxisData,this.legend) + window.addEventListener("resize", this.resize); + + } + + + beforeDestroy() { + clearInterval(this.timer) + } + + //改变污染物监测颜色 + changeColor(val) { + if (Number(val) <= 30) { + return '#88E29F' + } else if (Number(val) > 30 && Number(val) <= 50) { + return '#F2A183' + } else { + return '#DD7171' + } + + } +} + diff --git a/src/components/env/index/left/chartData.js b/src/components/env/index/left/chartData.js new file mode 100644 index 0000000..efdb970 --- /dev/null +++ b/src/components/env/index/left/chartData.js @@ -0,0 +1,98 @@ +export const pieChartData = { + title: { + text: '90%', + subtext: '在线率', + itemGap: 5, + x: 105, + y: '37%', + textStyle: { + fontSize: 30, + fontWeight: '600', + fontStyle: 'italic', + color: '#E8E8E8', + }, + subtextStyle: { + fontSize: 17, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + trigger: 'item' + }, + legend: { + orient: 'vertical', + right: '0%', + top: 'bottom', + height:100, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 25, name: '气体'}, + {value: 25, name: '水质'}, + {value: 15, name: '特征污染物'}, + {value: 20, name: '废气'}, + {value: 15, name: '废水'} + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left:-50, + radius: [50, 75], + data: [ + {value: 25, name: '气体',num:90}, + {value: 1, name: '',num:0}, + {value: 25, name: '水质',num:95}, + {value: 1, name: '',num:0}, + {value: 15, name: '特征污染物',num:94}, + {value: 1, name: '',num:0}, + {value: 20, name: '废气',num:91}, + {value: 1, name: '',num:0}, + {value: 15, name: '废水',num:89}, + {value: 1, name: '',num:0}, + ], + color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null], + emphasis: { + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + }, + formatter:function (params) { + return params.data.name+' : '+ params.data.num+'%' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' +} diff --git a/src/components/env/index/left/envIndexLeft.component.html b/src/components/env/index/left/envIndexLeft.component.html new file mode 100644 index 0000000..dff22f8 --- /dev/null +++ b/src/components/env/index/left/envIndexLeft.component.html @@ -0,0 +1,18 @@ +
+
+ + 预警信息 + + +
+
+ + 设备监测信息 + +
+ 在线设备数 + {{onlineEquipment}}/{{totalEquipment}} +
+ +
+
diff --git a/src/components/env/index/left/envIndexLeft.component.ts b/src/components/env/index/left/envIndexLeft.component.ts new file mode 100644 index 0000000..38d26a9 --- /dev/null +++ b/src/components/env/index/left/envIndexLeft.component.ts @@ -0,0 +1,222 @@ +import {Component, Emit, Vue} from 'vue-property-decorator'; +import template from "./envIndexLeft.component.html" +import {pieChartData} from "./chartData"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, +}) +export default class EnvIndexLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //总设备数 + totalEquipment = 1024; + //在线设备 + onlineEquipment = 724; + timer: any = null; + //饼图数据 + option: any = pieChartData + //饼图实例 + pieChart: any = {} + activePieItem = 0; + + + get dataList(){ + return this.$store.state.warningList + } + + //切换饼图高亮区域 + changePieChange() { + + if (this.activePieItem > 8) { + this.activePieItem = 0 + } + const temp = JSON.parse(JSON.stringify(this.option)) + temp.series[0].data = temp.series[0].data.map(item => { + item.selected = false + return item + }) + const arr = [{value: 90, name: '气体监测'}, + {value: 1, name: ''}, + {value: 95, name: '水质监测'}, + {value: 1, name: ''}, + {value: 94, name: '特征污染物监测'}, + {value: 1, name: ''}, + {value: 91, name: '废气监测'}, + {value: 1, name: ''}, + {value: 89, name: '废水监测'}, + {value: 1, name: ''},] + if (arr[this.activePieItem].name){ + temp.title.text = arr[this.activePieItem].value+'%'; + this.pieChart.setOption(temp); + } + + //定时移除高亮选中区 + this.pieChart.dispatchAction({ + type: "downplay", + seriesIndex: 0, + }); + //定时加载选中高亮区 + this.pieChart.dispatchAction({ + type: "highlight", + dataIndex: this.activePieItem + }) + this.activePieItem += 2; + + } + + //获取图表实例 + getEcharts(e) { + this.pieChart = e + } + //展示告警信息 + showWaring(item){ + + const levelMap = { + 1:'一级', + 2:'二级', + 3:'三级', + } + const levelClassMap = { + 3:'blue', + 2:'yellow', + 1:'red', + } + console.log(item) + this.getItem(Object.assign(item,{ + type:'风险告警', + level:item.level, + levelClass:levelClassMap[item.level], + levelName:levelMap[item.level], + content:'监测数值异常', + time:'2023年1月20日 14:33:33', + equipment:'北区广场监测点', + tableHeader:[ + { + 'prop':'alarmSubject', + 'label':'告警主体', + 'width':'90px', + }, { + 'prop':'COD', + 'label':'COD', + }, { + 'prop':'standard', + 'label':'标准值', + }, + ], + tableData: [{ + 'alarmSubject': '排放量', + 'COD': '456m3', + 'standard': '466m3', + }, { + 'alarmSubject': '排放浓度', + 'COD': '2.6mg/L', + 'standard': '2.5mg/L', + }, { + 'alarmSubject': '排放时间', + 'COD': '2023.3.31 05:03:45', + 'standard': '8:00-22:00', + }, { + 'alarmSubject': '排放浓度', + 'COD': '2.6mg/L', + 'standard': '2.5mg/L', + }, { + 'alarmSubject': '排放时间', + 'COD': '2023.3.31 05:03:45', + 'standard': '8:00-22:00', + }] + })) + } + //点击告警信息 + @Emit() + getItem(item) { + // console.log('item', item) + } + + //生成随机数 + randomNum() { + const num = this.getRandomInt(4, 20) + if (num % 2 === 0) { + this.onlineEquipment += num + } else { + this.onlineEquipment -= num + } + + } + + //随机整数 + getRandomInt(min: number, max: number) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值 + } + + count = 1 + + //监听页面变化重新绘制图表 + resize() { + setTimeout(() => { + this.pieChart.resize(); + }, 300) + } + + mounted() { + this.timer = setInterval(() => { + this.changePieChange() + this.randomNum() + }, 3000) + + //动态插入数据 + /*this.timer = setInterval(() => { + this.scrollList() + }, 6000)*/ + window.addEventListener("resize", this.resize); + } + + //告警信息列表滚动 + scrollList() { + this.dataList.unshift({ + title: '消防告警' + this.count, + info: '区域发现黑名单人员了区域发现黑名人预', + time: '2021-05-19 16:03:28', + level: (this.count % 3)+1, + }) + this.count++; + /* this.$nextTick(() => { + const dom: any = document.querySelector('.warning-list-box') + dom.classList.remove('animate__fadeInLeft') + setTimeout(() => { + dom.classList.add('animate__fadeInLeft') + },) + })*/ + } + + beforeDestroy() { + clearInterval(this.timer) + } + + destroyed() { + window.removeEventListener("resize", this.resize) + } + + changeMore() { + console.log(1) + } + + changeClose() { + console.log(1) + } +} + diff --git a/src/components/env/index/right/chartData.js b/src/components/env/index/right/chartData.js new file mode 100644 index 0000000..3fb9cbb --- /dev/null +++ b/src/components/env/index/right/chartData.js @@ -0,0 +1,75 @@ + +export const lineChartData = function (data,xAxisData,$echarts){ + return { + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'dashed' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine:{ + lineStyle:{ + color: '#999999', + } + }, + + data: xAxisData + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'dashed' + }, + }, + axisLine:{ + lineStyle:{ + color: '#999999', + } + }, + }, + series: [ + { + data: data, + type: 'line', + itemStyle:{ + color:'#E8E8E8', + }, + symbolSize: 7, + lineStyle:{ + color:'#E8E8E8', + width:3 + }, + smooth:true, + label: { + show: true, + position:'top', + color:'#ffffff', + borderWidth:0 + }, + } + ], + + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 22, + x2: 12, + y2: 20, + } + } +} diff --git a/src/components/env/index/right/envIndexRight.component.html b/src/components/env/index/right/envIndexRight.component.html new file mode 100644 index 0000000..3757905 --- /dev/null +++ b/src/components/env/index/right/envIndexRight.component.html @@ -0,0 +1,205 @@ +
+
+ + 环境质量监测 + +
+
+
+ {{smartAndEnvironmentallyFriendlyData.atmosphericEnvironmentalQuality.aqi}} + {{degreeOfContamination}} +
+
空气质量指数
+
+
+
+ + {{ + smartAndEnvironmentallyFriendlyData.waterQuality.comprehensivePollutionIndex + }} + + {{waterFlag.name}} +
+
水体污染指数
+
+
+
+ + {{ smartAndEnvironmentallyFriendlyData.soilEnvironmentalQuality.CPIPollutionIndex }} + + {{soliFlag.name}} +
+
土壤质量指数
+
+
+
+ + + + + +
+ +
+
+ + 污染源监测 + +
+
+
+ +
+
+
+ + {{ + smartAndEnvironmentallyFriendlyData.contaminationSourceMonitoring.enterpriseExhaustEmissionMonitoring.exhaustGasPollutionSource + }} + +
+
废气污染源
+
+ +
+
+
+ +
+
+
+ + {{ + smartAndEnvironmentallyFriendlyData.contaminationSourceMonitoring.enterpriseExhaustEmissionMonitoring.totalExhaustEmissions + }} + +
+
年排放量(m³)
+
+
+
+
+ +
+
+
+ + {{ + smartAndEnvironmentallyFriendlyData.contaminationSourceMonitoring.enterpriseExhaustEmissionMonitoring.numberOfTimesEmissionsExceedStandards + }} + +
+
超标次数
+
+
+
+
+ +
+
+
+ + {{ + smartAndEnvironmentallyFriendlyData.contaminationSourceMonitoring.wastewaterWaterDischargeMonitoring.sourcesOfWastewaterPollution + }} + +
+
废水污染源
+
+
+
+
+ +
+
+
+ + {{ + smartAndEnvironmentallyFriendlyData.contaminationSourceMonitoring.wastewaterWaterDischargeMonitoring.totalEmissions + }} + +
+
年排放量(m³)
+
+
+
+
+ +
+
+
+ + {{ + smartAndEnvironmentallyFriendlyData.contaminationSourceMonitoring.wastewaterWaterDischargeMonitoring.numberOfTimesEmissionsExceedStandards + }} + +
+
超标次数
+
+
+
+
+ +
+
+
+ + {{ + smartAndEnvironmentallyFriendlyData.contaminationSourceMonitoring.cleanSewerDischargeMonitoring.pollutionSources + }} + +
+
清下水监测点
+
+
+
+
+ +
+
+
+ + {{ + smartAndEnvironmentallyFriendlyData.contaminationSourceMonitoring.cleanSewerDischargeMonitoring.totalEmissions + }} + +
+
年排放量(m³)
+
+
+
+
+ +
+
+
+ + {{ + smartAndEnvironmentallyFriendlyData.contaminationSourceMonitoring.cleanSewerDischargeMonitoring.numberOfTimesEmissionsExceedStandards + }} + +
+
超标次数
+
+
+
+
+
+ + 污染物监测 + +
+
+
+
{{ v }}% +
+
+
+
+
+
{{ nameMapping[k] }}
+
+
+
+
diff --git a/src/components/env/index/right/envIndexRight.component.ts b/src/components/env/index/right/envIndexRight.component.ts new file mode 100644 index 0000000..eee143a --- /dev/null +++ b/src/components/env/index/right/envIndexRight.component.ts @@ -0,0 +1,317 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./envIndexRight.component.html" +import {lineChartData} from "./chartData"; +import {smartAndEnvironmentallyFriendlyData} from '@/dataDemo/smartAndEnvironmentallyFriendlyData'; +import TitleComponent from "@/components/title.component.vue" +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class EnvIndexRightComponent extends Vue { + //标题图片 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //定时器 + timer: any = null; + //折线图数据 + option: any = {} + //折线图实例 + lineChart: any = {} + //右侧小图标 start + iconImg1 = require("@/assets/img/env/gas.png"); + iconImg2 = require("@/assets/img/env/gas-year.png"); + iconImg3 = require("@/assets/img/env/count.png"); + iconImg4 = require("@/assets/img/env/waste.png"); + iconImg5 = require("@/assets/img/env/waste-year.png"); + iconImg6 = require("@/assets/img/env/count.png"); + iconImg7 = require("@/assets/img/env/clean.png"); + iconImg8 = require("@/assets/img/env/clean-year.png"); + iconImg9 = require("@/assets/img/env/clean-count.png"); + //右侧图标 end + + //右侧mock数据 + smartAndEnvironmentallyFriendlyData = JSON.parse(JSON.stringify(smartAndEnvironmentallyFriendlyData)) + //获取图表实例 + getEcharts(e,type) { + this[type] = e + this.initLineData() + } + //图表自适应 + resize() { + setTimeout(() => { + this.lineChart.resize(); + }, 300) + } + //名称map表 + nameMapping = { + "formaldehydeExcessRate": "甲醛超标率",//甲醛超标率 + "methanolExceedance": "甲醇超标率",//甲醇超标率 + // "chlorineGasExcessRate": "氯气超标率",//氯气超标率 + "NOExceedance": "一氧化氮超标率",//一氧化氮超标率 + // "HFExceedance": "氟化氢超标率",//氟化氢超标率 + "HCLExceedance": "氯化氢超标率",//氯化氢超标率 + "BenzeneExceedance": "苯系物超标率",//苯系物超标率 + "EthanolExceedance": "乙醇超标率",//乙醇超标率 + // "bromineGasExcessRate": "溴气超标率",//溴气超标率 + // "THFExceedance": "四氢呋喃超标率",//四氢呋喃超标率 + // "EpichlorohydrinExceedance": "环氧氯丙烷超标率",//环氧氯丙烷超标率 + // "HBRExceedance": "HBR超标率",//HBR超标率 + // "AcrylonitrileExceedance": "丙烯腈超标率",//丙烯腈超标率 + + } + //点击radio换图表数据 + changeData(val) { + switch (val) { + case '大气质量': + this.initLineData(smartAndEnvironmentallyFriendlyData.atmosphericEnvironmentalQuality.data) + break; + case '水体质量': + this.initLineData(smartAndEnvironmentallyFriendlyData.waterQuality.data) + break; + case '土壤质量': + this.initLineData(smartAndEnvironmentallyFriendlyData.soilEnvironmentalQuality.data) + break; + default: + break + } + } + + autoIndex = 0; + timerForLineData: any = null; + + //自动切换line图表数据 + autoChangeLineData() { + this.timerForLineData = setInterval(() => { + const arr: string[] = [ + '大气质量', + '水体质量', + '土壤质量' + ] + if (this.autoIndex > 2) { + this.autoIndex = 0 + } + this.lineChartType = arr[this.autoIndex]; + this.changeData(arr[this.autoIndex]) + this.autoIndex++ + }, 5000) + } + + lineChartType = '大气质量'; + flag = ''; + flagName = '' + + //空气质量发生改变后更改样式 + changeFlag(aqi) { + if (aqi <= 50) { + this.flag = 'green' + this.flagName = '' + } else if (aqi >= 51 && aqi <= 100) { + + this.flag = 'yellow' + this.flagName = '' + } else if (aqi >= 101 && aqi <= 150) { + + this.flag = 'orange' + this.flagName = '' + } else if (aqi >= 151 && aqi <= 200) { + + this.flag = 'red' + this.flagName = '' + } else if (aqi >= 201 && aqi <= 300) { + + this.flag = 'blue' + this.flagName = '蓝色预警' + } else if (aqi >= 301 && aqi <= 400) { + + this.flag = 'yellow' + this.flagName = '黄色预警' + } else if (aqi >= 401 && aqi <= 500) { + this.flag = 'orange' + this.flagName = '橙色预警' + } else if (aqi >= 501) { + this.flag = 'red' + this.flagName = '红色预警' + } + } + + //空气质量判断显示样式 + get degreeOfContamination() { + // eslint-disable-next-line prefer-const + let msg = '', {aqi} = this.smartAndEnvironmentallyFriendlyData.atmosphericEnvironmentalQuality; + if (aqi <= 50) { + msg = "优" + this.changeFlag(aqi) + } else if (aqi >= 51 && aqi <= 100) { + msg = "良" + this.changeFlag(aqi) + } else if (aqi >= 101 && aqi <= 150) { + msg = "轻度污染" + this.changeFlag(aqi) + } else if (aqi >= 151 && aqi <= 200) { + msg = "中度污染" + this.changeFlag(aqi) + } else if (aqi >= 201 && aqi <= 300) { + msg = "重度污染" + this.changeFlag(aqi) + } else if (aqi >= 301 && aqi <= 400) { + msg = "严重污染" + this.changeFlag(aqi) + } else if (aqi >= 401 && aqi <= 500) { + msg = "严重污染" + this.changeFlag(aqi) + } else if (aqi >= 501) { + msg = "严重污染" + this.changeFlag(aqi) + } + return msg; + } + //水环境质量判断显示样式 + get waterFlag() { + const index = this.smartAndEnvironmentallyFriendlyData.waterQuality.comprehensivePollutionIndex; + let msg = {}; + if (index <= 0.2) { + msg = { + name: '好', + class: 'green' + } + } else if (index > 0.2 && index <= 0.4) { + msg = { + name: '较好', + class: 'green' + } + } else if (index > 0.41 && index <= 0.7) { + msg = { + name: '轻度污染', + class: 'orange' + } + } else if (index > 0.7 && index <= 1) { + msg = { + name: '中度污染', + class: 'orange' + } + } else if (index > 1.01 && index <= 2) { + msg = { + name: '重污染', + class: 'zi' + } + } else if (index > 2) { + msg = { + name: '严重污染', + class: 'red' + } + } + + return msg + } + //土壤质量变化判断显示样式 + get soliFlag() { + const index = this.smartAndEnvironmentallyFriendlyData.soilEnvironmentalQuality.NemeroPollutionIndex; + let msg = {}; + if (index <= 0.7) { + msg = { + name: '清洁', + class: 'green' + } + } else if (index > 0.7 && index <= 1.0) { + msg = { + name: '尚清洁', + class: 'yellow' + } + } else if (index > 1 && index <= 2) { + msg = { + name: '轻度污染', + class: 'orange' + } + } else if (index > 2 && index <= 3) { + msg = { + name: '中度污染', + class: 'zi' + } + } else if (index > 3) { + msg = { + name: '重污染', + class: 'red' + } + } + + return msg + } + //随机加减数 + randomNum() { + const num = this.getRandomInt(4, 20) + this.randomPulution(num) + + } + //随机计算污染源数值变动 + randomPulution(num){ + this.smartAndEnvironmentallyFriendlyData + .contaminationSourceMonitoring + .enterpriseExhaustEmissionMonitoring + .totalExhaustEmissions += num + this.smartAndEnvironmentallyFriendlyData + .contaminationSourceMonitoring + .wastewaterWaterDischargeMonitoring + .totalEmissions += num + this.smartAndEnvironmentallyFriendlyData + .contaminationSourceMonitoring + .cleanSewerDischargeMonitoring + .totalEmissions += num + } + //获取范围内随机数 + getRandomInt(min: number, max: number) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值 + } + + mounted() { + this.timer = setInterval(()=>{ + this.randomNum() + }, 10000) + this.autoChangeLineData() + window.addEventListener("resize", this.resize); + } + //初始化line图表 + initLineData(inData = []) { + let newData: any[] = [] + if (inData.length === 0) { + newData = smartAndEnvironmentallyFriendlyData.atmosphericEnvironmentalQuality.data + } else { + newData = inData + } + const xAxisData = (newData as any).data?.map(item => item.date); + xAxisData.splice(0, xAxisData.length - 7) + const data = (newData as any).data?.map(item => item.value); + data.splice(0, data.length - 7) + this.option = lineChartData(data, xAxisData, echarts) + } + + beforeDestroy() { + clearInterval(this.timer) + clearInterval(this.timerForLineData) + } + destroyed() { + window.removeEventListener("resize", this.resize) + } + //改变污染物监测颜色 + changeColor(val){ + if (Number(val)<=30){ + return '#ffffff' + }else if(Number(val)>30 && Number(val)<=50){ + return '#F2A183' + }else { + return '#DD7171' + } + + } +} + diff --git a/src/components/env/soil/left/chartData.js b/src/components/env/soil/left/chartData.js new file mode 100644 index 0000000..c4c7aae --- /dev/null +++ b/src/components/env/soil/left/chartData.js @@ -0,0 +1,514 @@ +export const pieChartData = { + title: { + text: '75%', + subtext: '优良率', + itemGap: 5, + x: 105, + y: '37%', + textStyle: { + fontSize: 30, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 17, + fontWeight: 'normal', + align: "center", + color: '#5998FB' + }, + }, + tooltip: { + trigger: 'item' + }, + legend: { + orient: 'vertical', + right: '0%', + top: 'bottom', + height: 100, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 25, name: '断路'}, + {value: 25, name: '动土'}, + {value: 15, name: '受限空间'}, + {value: 20, name: '高处'}, + {value: 15, name: '临时用电'} + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left: -50, + radius: [50, 75], + data: [ + {value: 25, name: '断路'}, + {value: 1, name: ''}, + {value: 25, name: '动土'}, + {value: 1, name: ''}, + {value: 15, name: '受限空间'}, + {value: 1, name: ''}, + {value: 20, name: '高处'}, + {value: 1, name: ''}, + {value: 15, name: '临时用电'}, + {value: 1, name: ''}, + ], + color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null], + emphasis: { + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false + }, + tooltip: { + backgroundColor: 'rgba(0,0,0,0.4)', + textStyle: { + color: '#ffffff' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' +} + +// 修改弹框内容用到的方法 +function replaceHtmlWord(str) { + return str.replace("NO2", "NO2") + .replace("SO2", "SO2") + .replace("O3", "O3") + // .replace("PM10", "PM10") + // .replace("PM2.5", "PM2.5") + +} + +// 修改图例文字用到的方法 +function replaceWords(str) { + return str.replace("NO2", "NO{sub|2}") + .replace("SO2", "SO{sub|2}") + .replace("O3", "O{sub|3}") + // .replace("PM2.5", "PM{sub|2.5}") + // .replace("PM10", "PM{sub|10}"); +} + +export const soilLineChartData = function (data, xAxisData, legend,selected) { + return { + color: ['#B8ECFF','#7FB0FF', '#FFFFFF','#FADFA4','#F9BAFF', '#FFB7B7', '#C9FFD7', '#947FEA'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: xAxisData + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: data, + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 40, + x2: 22, + y2: 20, + }, + legend: { + data: legend, + top: 0, + padding: [2, 2], + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + align:'left', + itemGap:10, + width: "100%", + itemWidth:10, + selected, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 8, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + } + /*[{ + data: legend.slice(0,4), + top: 0, + padding: [2, 2], + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + align:'left', + itemGap:20, + width: "100%", + itemWidth:10, + selected, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + },{ + data: legend.slice(3,legend.length), + top: 20, + padding: [2, 2], + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + align:'left', + itemGap:20, + width: "80%", + itemWidth:10, + selected, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + }]*/, + } +} +export const soilBarChartData = function (data, xAxisData,legend,$echarts) { + + let barTopColor = [ + "#B8ECFF", + "#7FB0FF", + "#E8E8E8", + "#FADFA4", + '#F9BAFF', + '#FFB7B7', + '#C9FFD7', + '#947FEA', + ]; + let barBottomColor = [ + "#7DBBD2", + "#5485D5", + "#999999", + '#CFB376', + '#A576A9', + '#BF8888', + '#82AF8E', + '#60519C', + ]; + let data1 = [ + [-0.75,0,0,0,0,0], + [0,0.4,0,0,0,0], + [0,0,-0.4,0,0,0], + [0,0,0,-0.6,0,0], + [0,0,0,0,0.6,0], + [0,0,0,0,0,0.8,0,0], + [0,0,0,0,0,0,-0.75,0], + [0,0,0,0,0,0,0,0.5], + ] + + let seriseData = data.map((item,i)=>{ + return { + data: data1[i], + type: 'bar', + name:item.name, + itemStyle: { + borderRadius:4, + color: function (params) { + return new $echarts.graphic.LinearGradient( + 0, 0, 0, 1, + [{ + offset: 0, + color: barTopColor[i] + }, + { + offset: 1, + color: barBottomColor[i] + } + ] + ) + }, + }, + barWidth: 8, + barGap:'-100%', + } + }) + return { + color:[ + "#B8ECFF", + "#7FB0FF", + "#E8E8E8", + "#FADFA4", + '#F9BAFF', + '#FFB7B7' + ], + xAxis: { + name:"", + type: 'category', + data: xAxisData, + // 设置文本样式 + axisLabel:{ + show:true, + interval:0, + formatter:function(name){ + return replaceWords(name); + }, + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + margin: 14, + verticalAlign: "middle", + fontSize: 10, + color:"#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + }, + rotate: 0, + }, + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + nameTextStyle:{ + align:'left' + }, + nameGap:20, + animationDuration: 300, + animationDurationUpdate: 300, + }, + yAxis: { + type: 'value', + name:"", + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: seriseData, + label: { + // show: true + }, + tooltip: { + show: true, + alwaysShowContent: false, + trigger: 'item', + backgroundColor: 'rgba(0,0,0,0.4)', + textStyle: { + color: '#ffffff' + } + }, grid: { + x: 30, + y: 40, + x2: 22, + y2: 20, + }, + legend: { + show:true, + data: legend, + top: 0, + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + itemGap:10, + itemWidth:10, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + }, + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' + } +} diff --git a/src/components/env/soil/left/soilLeft.component.html b/src/components/env/soil/left/soilLeft.component.html new file mode 100644 index 0000000..c729398 --- /dev/null +++ b/src/components/env/soil/left/soilLeft.component.html @@ -0,0 +1,68 @@ +
+
+ + 土壤污染物年平均指标 + +
+
+
62
+
+ PH +
+
+
75%
+
+ PAHs +
+
+
45
+
+ SVOC +
+
+
42
+
+ VOC +
+
+
69
+
+ 镉 +
+
+
27%
+
+ 汞 +
+
+
15
+
+ 砷 +
+
+
27
+
+ 铅 +
+
+
+
+
+ + 土壤污染物数值变化趋势 + +
+ + + + +
+ +
+
+ + 土壤污染指数环比 + + +
+
diff --git a/src/components/env/soil/left/soilLeft.component.ts b/src/components/env/soil/left/soilLeft.component.ts new file mode 100644 index 0000000..a480ff5 --- /dev/null +++ b/src/components/env/soil/left/soilLeft.component.ts @@ -0,0 +1,167 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./soilLeft.component.html" +import {pieChartData, soilLineChartData, soilBarChartData} from "./chartData"; +import * as echarts from "echarts"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" +import { + yearData, + dataForSoilDay, + dataForSoilHour, + dataForSoilHour1, + top10, + data3, + dataForBar, + airDetail +} from '@/dataDemo/mockData'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, +}) +export default class SoilLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //定时器设置 + timer: any = null; + //土壤污染物数值变化趋势图表数据项 + option: any = {} + //土壤污染指数环比图表数据项 + barChart: any = {} + //土壤污染物数值变化趋势图实例 + line: any = {} + //土壤污染指数环比实例 + bar: any = {} + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.line.resize() + this.bar.resize() + }, 300) + } + //获取图表实例 + getEcharts(e,type){ + this[type] = e + } + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + //设置土壤污染物数值变化趋势默认选中项 + lineChartType = '小时平均' + //土壤污染物数值变化趋势切换小时统计和日统计 + changeData(val) { + this.selectIndex = 0 + if (val === '小时平均') { + this.initLineData(dataForSoilHour) + } else { + this.initLineData(dataForSoilDay) + } + } + //初始化土壤污染物数值变化趋势图表数据 + initLineData(datas:any = '') { + let temp: any = [] + if (datas>0) { + temp = JSON.parse(JSON.stringify(datas)) + } else { + temp = JSON.parse(JSON.stringify(dataForSoilHour)) + } + + const xAxisData = temp.data[0].dataList?.map(item => item.date); + const data = temp.data.map(item => { + item.data = item.dataList?.map(its => its.value) + return item + }); + const legend = temp.data.map(item => item.name) + const selected = {}; + legend.forEach((item, i) => { + selected[item] = i === 0; + }) + this.option = soilLineChartData(data, xAxisData, legend, selected) + } + //初始化土壤污染指数环比图表数据 + iniBarData() { + const temp = JSON.parse(JSON.stringify(data3)) + const xAxisData = temp.data?.map(item => item.type); + const data = temp.data; + const legend = temp.data?.map(item => item.type) + this.barChart = soilBarChartData(data, xAxisData, legend, echarts) + } + run() { + const temp = JSON.parse(JSON.stringify(this.barChart)) + const data = temp.series; + for (var i = 0; i < data.length; ++i) { + for (let j = 0; j < data[i].data.length; j++) { + if (Math.random() > 0.5) { + data[i] += Math.round(Math.random())/10; + } else { + data[i] -= Math.round(Math.random())/10; + } + } + + } + this.bar.setOption({ + series: [ + { + type: 'bar', + data + } + ] + }); + } + //默认自动切换图例从第一个开始 + selectIndex = 0 + //定时器切换显示图例 + autoRunLine() { + const datas = this.lineChartType === '小时平均' ? dataForSoilHour : dataForSoilDay; + const temp = JSON.parse(JSON.stringify(datas)) + const xAxisData = temp.data[0].dataList?.map(item => item.date); + const data = temp.data.map(item => { + item.data = item.dataList?.map(its => its.value) + return item + }); + const legend = temp.data.map(item => item.name) + const selected = {}; + legend.forEach((item, i) => { + selected[item] = i === this.selectIndex; + }) + this.option = soilLineChartData(data, xAxisData, legend, selected) + } + //获取随机整数 + getRandomInt(min: number, max: number) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值 + } + + mounted() { + this.initLineData() + this.iniBarData() + this.timer = setInterval(() => { + if (this.selectIndex > 5) { + this.selectIndex = 0 + } + this.autoRunLine() + this.selectIndex++ + // this.run() + }, 3000) + window.addEventListener("resize", this.resize); + + + } + + beforeDestroy() { + clearInterval(this.timer) + } +} + diff --git a/src/components/env/soil/right/chartData.js b/src/components/env/soil/right/chartData.js new file mode 100644 index 0000000..413c780 --- /dev/null +++ b/src/components/env/soil/right/chartData.js @@ -0,0 +1,234 @@ +export const pieChartData = function () { + return { + title: { + text: '75%', + subtext: '优良率', + itemGap: 5, + x: '40%', + y: '40%', + textAlign:'center', + textStyle: { + fontSize: 28, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 10, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + trigger: 'item' + }, + legend: { + orient: 'vertical', + right: '0%', + top: 'bottom', + height:100, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 49, name: '优质量'}, + {value: 24, name: '良质量'}, + {value: 24, name: '其他质量'}, + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left:-50, + radius: [55, 65], + data: [ + {value: 49, name: '优质量'}, + {value: 1, name: ''}, + {value: 24, name: '良质量'}, + {value: 1, name: ''}, + {value: 24, name: '其他质量'}, + {value: 1, name: ''}, + ], + color: ['#B8ECFF', null, '#FADFA4', null, '#7FB0FF', null], + emphasis: { + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' + } +} + + +export const barChartData = function (datas,$echarts = {}){ + + const yData = datas.map(item=>item.name); + let data = datas; + data.sort((a, b) => b - a); + let bgData = datas.map(item=>item.value) + let max = Math.max.apply(null, bgData); + max = max + 30; + let getMax = []; + for (let i = 0; i < yData.length; i++) { + let temp = JSON.parse(JSON.stringify(datas[i])) + temp.value = max + getMax.push(temp); + } + + return { + tooltip: { + show:false, + trigger: 'axis', + axisPointer: { + type: 'none', + }, + formatter: function (params) { + return params[0].name + ' : ' + params[0].value; + }, + }, + legend: { + show:false, + right: '25%', + top: '0%', + itemWidth: 10, + itemHeight: 10, + data: [ + '超标告警', + '其他报警' + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + xAxis: { + show: false, + type: 'value', + }, + grid: { + right: '12%', + left: '1%', + top: '6%', + bottom: '1%', + }, + yAxis: [ + { + type: 'category', + inverse: true, + offset: -8, + axisLabel: { + show: true, + align: 'left', + verticalAlign:'bottom', + lineHeight: 36, + textStyle: { + color: '#fff', + fontSize: '12', + }, + }, + splitLine: { + show: false, + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + }, + data: yData, + }, + { + type: 'category', + inverse: true, + offset: 0, + axisTick: 'none', + axisLine: 'none', + show: true, + axisLabel: { + textStyle: { + color: '#fff', + fontSize: '14', + }, + }, + data: data, + }, + ], + series: [ + { + name: '', + type: 'bar', + stack: 'user', + zlevel: 1, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 1, + y2: 0, + colorStops: [ + { + offset: 0, + color: '#7FB0FF', // 0% 处的颜色 + }, + { + offset: 1, + color: '#5485D5', // 100% 处的颜色 + }, + ], + global: false, // 缺省为 false + }, + }, + }, + barWidth: 10, + data: data, + }, + { + name: '背景', + type: 'bar', + barWidth: 10, + barGap: '-100%', + data: getMax, + itemStyle: { + color: 'rgba(21,36,72,0.5)', + }, + }, + ], + }; + + + +} diff --git a/src/components/env/soil/right/soilRight.component.html b/src/components/env/soil/right/soilRight.component.html new file mode 100644 index 0000000..f830edd --- /dev/null +++ b/src/components/env/soil/right/soilRight.component.html @@ -0,0 +1,9 @@ +
+
+ + 污染指数排行 + + +
+ +
diff --git a/src/components/env/soil/right/soilRight.component.ts b/src/components/env/soil/right/soilRight.component.ts new file mode 100644 index 0000000..ff66b37 --- /dev/null +++ b/src/components/env/soil/right/soilRight.component.ts @@ -0,0 +1,90 @@ +import {Component, Emit, Vue} from 'vue-property-decorator'; +import template from "./soilRight.component.html" +import {pieChartData, barChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" + +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class SoilRightComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //柱状图数据 + barChartData: any = {}; + //定时器 + timer: any = null; + // 排放达标率数据 + option: any = {} + //柱状图实例 + bar: any = {} + //饼图实例 + pie: any = {} + + //获取图表实例 + getEcharts(e, type) { + this[type] = e + const _this = this; + if (type === 'bar'){ + this.bar.on('click', function (params) { + _this.clickBar(params.data) + }); + } + } + @Emit('clickBar') + clickBar(item){ + console.log(item) + } + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.bar.resize() + }, 300) + } + + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + + mounted() { + /* this.timer = setInterval(()=>{ + this.randomNum() + }, 10000)*/ + this.option = pieChartData() + this.barChartData = barChartData(this.groundEnvList,echarts) + window.addEventListener("resize", this.resize); + + } + get groundEnvList(){ + return this.$store.state.groundEnvList + } + + + beforeDestroy() { + clearInterval(this.timer) + } + + //改变污染物监测颜色 + changeColor(val) { + if (Number(val) <= 30) { + return '#88E29F' + } else if (Number(val) > 30 && Number(val) <= 50) { + return '#F2A183' + } else { + return '#DD7171' + } + + } +} + diff --git a/src/components/env/special/left/chartData.js b/src/components/env/special/left/chartData.js new file mode 100644 index 0000000..cf0bfdc --- /dev/null +++ b/src/components/env/special/left/chartData.js @@ -0,0 +1,508 @@ +export const pieChartData = { + title: { + text: '75%', + subtext: '优良率', + itemGap: 5, + x: 105, + y: '37%', + textStyle: { + fontSize: 30, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 17, + fontWeight: 'normal', + align: "center", + color: '#5998FB' + }, + }, + tooltip: { + trigger: 'item' + }, + legend: { + orient: 'vertical', + right: '0%', + top: 'bottom', + height: 100, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 25, name: '断路'}, + {value: 25, name: '动土'}, + {value: 15, name: '受限空间'}, + {value: 20, name: '高处'}, + {value: 15, name: '临时用电'} + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left: -50, + radius: [50, 75], + data: [ + {value: 25, name: '断路'}, + {value: 1, name: ''}, + {value: 25, name: '动土'}, + {value: 1, name: ''}, + {value: 15, name: '受限空间'}, + {value: 1, name: ''}, + {value: 20, name: '高处'}, + {value: 1, name: ''}, + {value: 15, name: '临时用电'}, + {value: 1, name: ''}, + ], + color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null], + emphasis: { + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false + }, + tooltip: { + backgroundColor: 'rgba(0,0,0,0.4)', + textStyle: { + color: '#ffffff' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' +} + +// 修改弹框内容用到的方法 +function replaceHtmlWord(str) { + return str.replace("NO2", "NO2") + .replace("SO2", "SO2") + .replace("O3", "O3") + // .replace("PM10", "PM10") + // .replace("PM2.5", "PM2.5") + +} + +// 修改图例文字用到的方法 +function replaceWords(str) { + return str.replace("NO2", "NO{sub|2}") + .replace("SO2", "SO{sub|2}") + .replace("O3", "O{sub|3}") + // .replace("PM2.5", "PM{sub|2.5}") + // .replace("PM10", "PM{sub|10}"); +} + +export const soilLineChartData = function (data, xAxisData, legend,selected) { + return { + color: ['#B8ECFF','#7FB0FF', '#FFFFFF','#FADFA4','#F9BAFF', '#FFB7B7', '#C9FFD7', '#947FEA'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: xAxisData + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: data, + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 40, + x2: 22, + y2: 20, + }, + legend: { + data: legend, + top: 0, + padding: [2, 2], + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + align:'left', + itemGap:5, + width: "100%", + itemWidth:10, + selected, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 8, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + } + /*[{ + data: legend.slice(0,4), + top: 0, + padding: [2, 2], + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + align:'left', + itemGap:20, + width: "100%", + itemWidth:10, + selected, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + },{ + data: legend.slice(3,legend.length), + top: 20, + padding: [2, 2], + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + align:'left', + itemGap:20, + width: "80%", + itemWidth:10, + selected, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + }]*/, + } +} +export const soilBarChartData = function (data, xAxisData,legend,$echarts) { + + let barTopColor = [ + "#B8ECFF", + "#7FB0FF", + "#E8E8E8", + "#FADFA4", + '#F9BAFF', + '#FFB7B7', + '#C9FFD7', + '#947FEA', + ]; + let barBottomColor = [ + "#7DBBD2", + "#5485D5", + "#999999", + '#CFB376', + '#A576A9', + '#BF8888', + '#82AF8E', + '#60519C', + ]; + let data1 = [ + [20,0,0,0,0,0], + [0,10,0,0,0,0], + [0,0,32,0,0,0], + [0,0,0,17,0,0], + [0,0,0,0,30,0], + [0,0,0,0,0,25,0,0], + [0,0,0,0,0,0,42,0], + [0,0,0,0,0,0,0,30], + ] + + let seriseData = data.map((item,i)=>{ + return { + data: data1[i], + type: 'bar', + name:item.name, + itemStyle: { + borderRadius:4, + color: function (params) { + return new $echarts.graphic.LinearGradient( + 0, 0, 0, 1, + [{ + offset: 0, + color: barTopColor[i] + }, + { + offset: 1, + color: barBottomColor[i] + } + ] + ) + }, + }, + barWidth: 8, + barGap:'-100%', + } + }) + return { + color:[ + "#B8ECFF", + "#7FB0FF", + "#E8E8E8", + "#FADFA4", + '#F9BAFF', + '#FFB7B7' + ], + xAxis: { + name:"", + type: 'category', + data: xAxisData, + // 设置文本样式 + axisLabel:{ + show:true, + interval:0, + formatter:function(name){ + return replaceWords(name); + }, + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + margin: 14, + verticalAlign: "middle", + fontSize: 10, + color:"#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + }, + rotate: 0, + }, + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + nameTextStyle:{ + align:'left' + }, + nameGap:20 + }, + yAxis: { + type: 'value', + name:"", + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: seriseData, + label: { + // show: true + }, + tooltip: { + show: true, + alwaysShowContent: false, + trigger: 'item', + backgroundColor: 'rgba(0,0,0,0.4)', + textStyle: { + color: '#ffffff' + } + }, grid: { + x: 30, + y: 40, + x2: 22, + y2: 20, + }, + legend: { + show:true, + data: legend, + top: 0, + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + itemGap:5, + itemWidth:10, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + }, + } +} diff --git a/src/components/env/special/left/specialLeft.component.html b/src/components/env/special/left/specialLeft.component.html new file mode 100644 index 0000000..759867a --- /dev/null +++ b/src/components/env/special/left/specialLeft.component.html @@ -0,0 +1,68 @@ +
+
+ + 污染物年平均指标 + +
+
+
62
+
+ 甲醛 +
+
+
75%
+
+ 甲醇 +
+
+
45
+
+ 氯气 +
+
+
42
+
+ NO +
+
+
69
+
+ HF +
+
+
27%
+
+ HCL +
+
+
15
+
+ 苯系物 +
+
+
27
+
+ 乙醇 +
+
+
+
+
+ + 污染物数值变化趋势 + +
+ + + + +
+ +
+
+ + 特征污染物超标次数 + + +
+
diff --git a/src/components/env/special/left/specialLeft.component.ts b/src/components/env/special/left/specialLeft.component.ts new file mode 100644 index 0000000..6fe5c80 --- /dev/null +++ b/src/components/env/special/left/specialLeft.component.ts @@ -0,0 +1,148 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./specialLeft.component.html" +import {pieChartData, soilLineChartData, soilBarChartData} from "./chartData"; +import * as echarts from "echarts"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" +import { + dataForSpecialDay, + dataForSpecialHour, + data3ForSpecial, +} from '@/dataDemo/mockData'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, +}) +export default class SpecialLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //定时器设置 + timer: any = null; + //污染物数值变化趋势图表数据项 + option: any = {} + //特征污染物超标次数图表数据项 + barChart: any = {} + //污染物数值变化趋势图实例 + line: any = {} + //特征污染物超标次数实例 + bar: any = {} + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.line.resize() + this.bar.resize() + }, 300) + } + //获取图表实例 + getEcharts(e,type){ + this[type] = e + } + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + //设置土壤污染物数值变化趋势默认选中项 + lineChartType = '小时平均' + //土壤污染物数值变化趋势切换小时统计和日统计 + changeData(val) { + this.selectIndex = 0 + if (val === '小时平均') { + this.initLineData(dataForSpecialHour) + } else { + this.initLineData(dataForSpecialDay) + } + } + //初始化污染物数值变化趋势图表数据 + initLineData(datas:any = '') { + let temp: any = [] + if (datas) { + temp = JSON.parse(JSON.stringify(datas)) + } else { + temp = JSON.parse(JSON.stringify(dataForSpecialHour)) + } + + const xAxisData = temp.data[0].dataList?.map(item => item.date); + const data = temp.data.map(item => { + item.data = item.dataList?.map(its => its.value) + return item + }); + const legend = temp.data.map(item => item.name) + const selected = {}; + legend.forEach((item, i) => { + selected[item] = i === 0; + }) + this.option = soilLineChartData(data, xAxisData, legend, selected) + } + //初始化特征污染物超标次数图表数据 + iniBarData() { + const temp = JSON.parse(JSON.stringify(data3ForSpecial)) + const xAxisData = temp.data?.map(item => item.type); + const data = temp.data; + const legend = temp.data?.map(item => item.type) + this.barChart = soilBarChartData(data, xAxisData, legend, echarts) + } + //默认自动切换图例从第一个开始 + selectIndex = 0 + //定时器切换显示图例 + autoRunLine() { + const datas = this.lineChartType === '小时平均' ? dataForSpecialHour : dataForSpecialDay; + const temp = JSON.parse(JSON.stringify(datas)) + const xAxisData = temp.data[0].dataList?.map(item => item.date); + const data = temp.data.map(item => { + item.data = item.dataList?.map(its => its.value) + return item + }); + const legend = temp.data.map(item => item.name) + const selected = {}; + legend.forEach((item, i) => { + selected[item] = i === this.selectIndex; + }) + this.option = soilLineChartData(data, xAxisData, legend, selected) + } + //获取随机整数 + getRandomInt(min: number, max: number) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值 + } + + mounted() { + this.initLineData() + this.iniBarData() + this.timer = setInterval(() => { + if (this.selectIndex > 5) { + this.selectIndex = 0 + } + this.autoRunLine() + this.selectIndex++ + }, 3000) + window.addEventListener("resize", this.resize); + + /* this.timer = setInterval(()=>{ + this.dataList = [ { + title:'消防告警', + info:'区域发现黑名单人员了区域发现黑名人预', + time:'2021-05-19 16:03:28', + level:'1', + isNew:true, + },...this.dataList] + },2000)*/ + + } + + beforeDestroy() { + clearInterval(this.timer) + } +} + diff --git a/src/components/env/special/right/chartData.js b/src/components/env/special/right/chartData.js new file mode 100644 index 0000000..413c780 --- /dev/null +++ b/src/components/env/special/right/chartData.js @@ -0,0 +1,234 @@ +export const pieChartData = function () { + return { + title: { + text: '75%', + subtext: '优良率', + itemGap: 5, + x: '40%', + y: '40%', + textAlign:'center', + textStyle: { + fontSize: 28, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 10, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + trigger: 'item' + }, + legend: { + orient: 'vertical', + right: '0%', + top: 'bottom', + height:100, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 49, name: '优质量'}, + {value: 24, name: '良质量'}, + {value: 24, name: '其他质量'}, + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left:-50, + radius: [55, 65], + data: [ + {value: 49, name: '优质量'}, + {value: 1, name: ''}, + {value: 24, name: '良质量'}, + {value: 1, name: ''}, + {value: 24, name: '其他质量'}, + {value: 1, name: ''}, + ], + color: ['#B8ECFF', null, '#FADFA4', null, '#7FB0FF', null], + emphasis: { + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' + } +} + + +export const barChartData = function (datas,$echarts = {}){ + + const yData = datas.map(item=>item.name); + let data = datas; + data.sort((a, b) => b - a); + let bgData = datas.map(item=>item.value) + let max = Math.max.apply(null, bgData); + max = max + 30; + let getMax = []; + for (let i = 0; i < yData.length; i++) { + let temp = JSON.parse(JSON.stringify(datas[i])) + temp.value = max + getMax.push(temp); + } + + return { + tooltip: { + show:false, + trigger: 'axis', + axisPointer: { + type: 'none', + }, + formatter: function (params) { + return params[0].name + ' : ' + params[0].value; + }, + }, + legend: { + show:false, + right: '25%', + top: '0%', + itemWidth: 10, + itemHeight: 10, + data: [ + '超标告警', + '其他报警' + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + xAxis: { + show: false, + type: 'value', + }, + grid: { + right: '12%', + left: '1%', + top: '6%', + bottom: '1%', + }, + yAxis: [ + { + type: 'category', + inverse: true, + offset: -8, + axisLabel: { + show: true, + align: 'left', + verticalAlign:'bottom', + lineHeight: 36, + textStyle: { + color: '#fff', + fontSize: '12', + }, + }, + splitLine: { + show: false, + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + }, + data: yData, + }, + { + type: 'category', + inverse: true, + offset: 0, + axisTick: 'none', + axisLine: 'none', + show: true, + axisLabel: { + textStyle: { + color: '#fff', + fontSize: '14', + }, + }, + data: data, + }, + ], + series: [ + { + name: '', + type: 'bar', + stack: 'user', + zlevel: 1, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 1, + y2: 0, + colorStops: [ + { + offset: 0, + color: '#7FB0FF', // 0% 处的颜色 + }, + { + offset: 1, + color: '#5485D5', // 100% 处的颜色 + }, + ], + global: false, // 缺省为 false + }, + }, + }, + barWidth: 10, + data: data, + }, + { + name: '背景', + type: 'bar', + barWidth: 10, + barGap: '-100%', + data: getMax, + itemStyle: { + color: 'rgba(21,36,72,0.5)', + }, + }, + ], + }; + + + +} diff --git a/src/components/env/special/right/specialRight.component.html b/src/components/env/special/right/specialRight.component.html new file mode 100644 index 0000000..264309f --- /dev/null +++ b/src/components/env/special/right/specialRight.component.html @@ -0,0 +1,9 @@ +
+
+ + 污染物监测点超标次数 + + +
+ +
diff --git a/src/components/env/special/right/specialRight.component.ts b/src/components/env/special/right/specialRight.component.ts new file mode 100644 index 0000000..bba4da8 --- /dev/null +++ b/src/components/env/special/right/specialRight.component.ts @@ -0,0 +1,90 @@ +import {Component, Emit, Vue} from 'vue-property-decorator'; +import template from "./specialRight.component.html" +import {pieChartData, barChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" + +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class SpecialRightComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //柱状图数据 + barChartData: any = {}; + //定时器 + timer: any = null; + // 排放达标率数据 + option: any = {} + //柱状图实例 + bar: any = {} + //饼图实例 + pie: any = {} + + //获取图表实例 + getEcharts(e, type) { + this[type] = e + const _this = this; + if (type === 'bar'){ + this.bar.on('click', function (params) { + _this.clickBar(params.data) + }); + } + } + @Emit('clickBar') + clickBar(item){ + console.log(item) + } + get specialEnvList(){ + return this.$store.state.specialEnvList + } + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.bar.resize() + }, 300) + } + + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + + mounted() { + /* this.timer = setInterval(()=>{ + this.randomNum() + }, 10000)*/ + this.option = pieChartData() + this.barChartData = barChartData(this.specialEnvList,echarts) + window.addEventListener("resize", this.resize); + + } + + + beforeDestroy() { + clearInterval(this.timer) + } + + //改变污染物监测颜色 + changeColor(val) { + if (Number(val) <= 30) { + return '#88E29F' + } else if (Number(val) > 30 && Number(val) <= 50) { + return '#F2A183' + } else { + return '#DD7171' + } + + } +} + diff --git a/src/components/env/waste/left/chartData.js b/src/components/env/waste/left/chartData.js new file mode 100644 index 0000000..a4787b0 --- /dev/null +++ b/src/components/env/waste/left/chartData.js @@ -0,0 +1,183 @@ + +export const gasBarChartData = function () { + const yData = [ + '榆林煤矿有限公司', + '榆林煤矿有限公司A', + '榆林煤矿有限公司B', + '榆林煤矿有限公司C', + '榆林煤矿有限公司D', + '榆林煤矿有限公司E', + '榆林煤矿有限公司F', + '榆林煤矿有限公司G' + ]; + let data = ['500', '400', '360', '300', '270', '200', '180', '150']; + data.sort((a, b) => b - a); + let max = Math.max.apply(null, data); + max = max + 200; + let getMax = []; + for (let i = 0; i < yData.length; i++) { + getMax.push(max); + } + + return { + tooltip: { + show:false, + trigger: 'axis', + axisPointer: { + type: 'none', + }, + formatter: function (params) { + return params[0].name + ' : ' + params[0].value; + }, + }, + legend: { + right: '25%', + top: '0%', + itemWidth: 10, + itemHeight: 10, + data: [ + '超标告警', + '其他报警' + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + xAxis: { + show: false, + type: 'value', + }, + grid: { + right: '12%', + left: '1%', + top: '6%', + bottom: '1%', + }, + yAxis: [ + { + type: 'category', + inverse: true, + offset: -8, + axisLabel: { + show: true, + align: 'left', + verticalAlign:'bottom', + lineHeight: 36, + textStyle: { + color: '#fff', + fontSize: '12', + }, + }, + splitLine: { + show: false, + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + }, + data: yData, + }, + { + type: 'category', + inverse: true, + offset: 0, + axisTick: 'none', + axisLine: 'none', + show: true, + axisLabel: { + textStyle: { + color: '#fff', + fontSize: '14', + }, + }, + data: data, + }, + ], + series: [ + { + name: '超标告警', + type: 'bar', + stack: 'user', + zlevel: 1, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 1, + y2: 0, + colorStops: [ + { + offset: 0, + color: '#7FB0FF', // 0% 处的颜色 + }, + { + offset: 1, + color: '#5485D5', // 100% 处的颜色 + }, + ], + global: false, // 缺省为 false + }, + }, + }, + barWidth: 10, + data: data.map((item,i)=>{ + return { + value:item, + name:yData[i] + } + }), + }, + { + name: '其他报警', + type: 'bar', + stack: 'user', + zlevel: 1, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 1, + y2: 0, + colorStops: [ + { + offset: 0, + color: '#ACACAC', // 0% 处的颜色 + }, + { + offset: 1, + color: '#ffffff', // 100% 处的颜色 + }, + ], + global: false, // 缺省为 false + }, + }, + }, + barWidth: 10, + data: [160,100,130,120,140,120,130,100].map((item,i)=>{ + return { + value:item, + name:yData[i] + } + }), + }, + { + name: '背景', + type: 'bar', + barWidth: 10, + barGap: '-100%', + data: getMax, + itemStyle: { + color: 'rgba(21,36,72,0.5)', + }, + }, + ], + }; + +} diff --git a/src/components/env/waste/left/wasteLeft.component.html b/src/components/env/waste/left/wasteLeft.component.html new file mode 100644 index 0000000..0c50e88 --- /dev/null +++ b/src/components/env/waste/left/wasteLeft.component.html @@ -0,0 +1,15 @@ +
+
+ + 企业告警排行 + + +
+
+ + 告警信息列表 + + +
+ +
diff --git a/src/components/env/waste/left/wasteLeft.component.ts b/src/components/env/waste/left/wasteLeft.component.ts new file mode 100644 index 0000000..7af6935 --- /dev/null +++ b/src/components/env/waste/left/wasteLeft.component.ts @@ -0,0 +1,102 @@ +import {Component, Emit, Vue} from 'vue-property-decorator'; +import template from "./wasteLeft.component.html" +import {gasBarChartData} from "./chartData"; +import * as echarts from "echarts"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" + + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, +}) +export default class WasteLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //企业告警排行图表实例 + bar: any = {} + + + //企业告警排行图表数据 + private barChart: any = {}; + //报警列表 + get dataList(){ + return this.$store.state.warningList + } + //获取图表实例 + getEcharts(e, type) { + this[type] = e + const self = this; + // getZr() + this[type].on('click',function(params){ + console.log(params) + const company = self.$store.state.companyList + const index = Math.floor(Math.random()*10)%2 + const companyObj = company[index] + companyObj.name = params.data.name + self.getCompany(companyObj) + }) + } + + //初始化特征污染物超标次数图表数据 + iniBarData() { + this.barChart = gasBarChartData() + } + + //点击告警信息 + @Emit() + getItem(item) { + console.log('item', item) + } + //获取公司信息 + @Emit('getCompany') + getCompany(item) { + console.log('item', item) + } + + timer: any = {} + + mounted() { + this.iniBarData() + //动态插入数据 + /* this.timer = setInterval(() => { + this.scrollList() + }, 6000)*/ + } + + count = 1 + + //告警信息列表滚动 + scrollList() { + this.dataList.unshift({ + title: '消防告警' + this.count, + info: '区域发现黑名单人员了区域发现黑名人预', + time: '2021-05-19 16:03:28', + level: this.count % 3, + id: Math.random(), + }) + this.count++; + /* this.$nextTick(() => { + const dom: any = document.querySelector('.warning-list-box') + dom.classList.remove('animate__fadeInLeft') + setTimeout(() => { + dom.classList.add('animate__fadeInLeft') + },) + })*/ + } + + beforeDestroy() { + clearInterval(this.timer) + } +} + diff --git a/src/components/env/waste/right/chartData.js b/src/components/env/waste/right/chartData.js new file mode 100644 index 0000000..f95d9c8 --- /dev/null +++ b/src/components/env/waste/right/chartData.js @@ -0,0 +1,264 @@ +export const pieChartData = function () { + return { + title: { + text: '75%', + subtext: '达标率', + itemGap: 5, + x: '40%', + y: '40%', + textAlign:'center', + textStyle: { + fontSize: 28, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 10, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + show:false, + trigger: 'item', + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + + }, + legend: { + orient:'vertical', + show: true, + itemStyle: { + opacity: 1, + }, + itemWidth: 12, + itemHeight: 8, + top: 'bottom', + right:0, + itemGap: 20, + textStyle: { + color: '#D4E5FF', + }, + + }, + color: ['#B8ECFF','#FADFA4'], + series: [ + { + type: 'pie', + radius: [60, 70], + center: ["42%", "50%"], + avoidLabelOverlap: false, + selectedOffset: 7, + label: { + show: false, + position: 'center' + }, + animation: true, + emphasis: { + disabled: true, + label: { + show: false, + } + }, + labelLine: { + show: false + }, + data: [ + { + name: '未超标数', + value: 75, + itemStyle: { + color: '#E8E8E8', + opacity: 1 + }, + }, + { + name: '超标数', + value: 25, + itemStyle: { + color: '#7FB0FF', + opacity: 0 + } + }, + ] + }, + { + type: 'pie', + radius: [55, 65], + center: ["42%", "50%"], + avoidLabelOverlap: false, + selectedOffset: 7, + label: { + show: false, + position: 'center' + }, + animation: false, + emphasis: { + disabled: true, + label: { + show: false, + } + }, + labelLine: { + show: false + }, + data: [ + { + name: '未超标数', + value: 75, + itemStyle: { + color: '#E8E8E8', + opacity: 0 + }, + }, + { + name: '超标数', + value: 25, + itemStyle: { + color: '#7FB0FF', + opacity: 1 + } + }, + ] + }, + + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' + } +} + + + +// 修改弹框内容用到的方法 +function replaceHtmlWord(str) { + return str.replace("NO2", "NO2") + .replace("SO2", "SO2") + .replace("O3", "O3") + // .replace("PM10", "PM10") + // .replace("PM2.5", "PM2.5") + +} + +// 修改图例文字用到的方法 +function replaceWords(str) { + return str.replace("NO2", "NO{sub|2}") + .replace("SO2", "SO{sub|2}") + .replace("O3", "O{sub|3}") + // .replace("PM2.5", "PM{sub|2.5}") + // .replace("PM10", "PM{sub|10}"); +} + +/** + * 废气右侧折线图 + * @param data + * @param xAxisData + * @param legend + * @param selected + * @returns {{yAxis: {axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, xAxis: {axisLabel: {show: boolean}, data, axisLine: {lineStyle: {color: string}}, splitLine: {lineStyle: {color: string, type: string}, show: boolean}, type: string}, color: string[], series, grid: {x: number, y: number, y2: number, x2: number}, legend: {formatter: (function(*=): *), padding: number[], itemGap: number, data, top: number, icon: string, width: string, itemWidth: number, textStyle: {verticalAlign: string, color: string, rich: {wxb: {verticalAlign: string, fontSize: number}, sub: {verticalAlign: string, fontSize: number}, wsb: {verticalAlign: string, fontSize: number}, sup: {verticalAlign: string, fontSize: number}}, lineHeight: number, fontSize: number}, align: string, selected}, tooltip: {alwaysShowContent: boolean, show: boolean, trigger: string}}} + */ +export const gasRightLineChartData = function (data, xAxisData, legend) { + return { + color: ['#7FB0FF','#E8E8E8'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: xAxisData + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: data, + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 40, + x2: 22, + y2: 20, + }, + legend: { + data: legend, + top: 10, + padding: [2, 2], + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + align:'left', + itemGap:10, + width: "100%", + itemWidth:10, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 8, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + } + + } +} diff --git a/src/components/env/waste/right/wasteRight.component.html b/src/components/env/waste/right/wasteRight.component.html new file mode 100644 index 0000000..19c52a8 --- /dev/null +++ b/src/components/env/waste/right/wasteRight.component.html @@ -0,0 +1,20 @@ +
+
+ + 排放变化趋势 + +
+ + + + +
+ +
+
+ + 排放达标率 + + +
+
diff --git a/src/components/env/waste/right/wasteRight.component.ts b/src/components/env/waste/right/wasteRight.component.ts new file mode 100644 index 0000000..5259ede --- /dev/null +++ b/src/components/env/waste/right/wasteRight.component.ts @@ -0,0 +1,99 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./wasteRight.component.html" +import {pieChartData, gasRightLineChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" + +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") +import { + dataForGas1, + dataForGas2, +} from '@/dataDemo/mockData'; + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class WasteRightComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //柱状图数据 + lineChartData: any = {}; + //定时器 + timer: any = null; + // 排放达标率数据 + pieChartData: any = {} + //柱状图实例 + line: any = {} + //饼图实例 + pie: any = {} + + //获取图表实例 + getEcharts(e, type) { + this[type] = e + } + //排放量数据 + dataForEmissions = dataForGas1 + //排放浓度数据 + dataForEmissionConcentration = dataForGas2 + //折线图x轴坐标 + xAxisData = ['1月','2月','3月','4月','5月','6月'] + //设置排放变化趋势默认选中项 + lineChartType = '排放量' + //排放变化趋势切换排放量排放浓度 + changeData(val) { + + if (val === '排放量') { + this.lineChartData = gasRightLineChartData(this.dataForEmissions.data,this.xAxisData,this.legend) + } else { + this.lineChartData = gasRightLineChartData(this.dataForEmissionConcentration.data,this.xAxisData,this.legend) + } + } + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.line.resize() + }, 300) + } + + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + //图例 + legend = ['COD','氨氮'] + mounted() { + /* this.timer = setInterval(()=>{ + this.randomNum() + }, 10000)*/ + this.pieChartData = pieChartData() + // data, xAxisData, legend + this.lineChartData = gasRightLineChartData(this.dataForEmissions.data,this.xAxisData,this.legend) + window.addEventListener("resize", this.resize); + + } + + + beforeDestroy() { + clearInterval(this.timer) + } + + //改变污染物监测颜色 + changeColor(val) { + if (Number(val) <= 30) { + return '#88E29F' + } else if (Number(val) > 30 && Number(val) <= 50) { + return '#F2A183' + } else { + return '#DD7171' + } + + } +} + diff --git a/src/components/env/water/left/chartData.js b/src/components/env/water/left/chartData.js new file mode 100644 index 0000000..b9e7d14 --- /dev/null +++ b/src/components/env/water/left/chartData.js @@ -0,0 +1,519 @@ +export const pieChartData = { + title: { + text: '75%', + subtext: '优良率', + itemGap: 5, + x: 105, + y: '37%', + textStyle: { + fontSize: 30, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 17, + fontWeight: 'normal', + align: "center", + color: '#5998FB' + }, + }, + tooltip: { + trigger: 'item' + }, + legend: { + orient: 'vertical', + right: '0%', + top: 'bottom', + height: 100, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 25, name: '断路'}, + {value: 25, name: '动土'}, + {value: 15, name: '受限空间'}, + {value: 20, name: '高处'}, + {value: 15, name: '临时用电'} + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left: -50, + radius: [50, 75], + data: [ + {value: 25, name: '断路'}, + {value: 1, name: ''}, + {value: 25, name: '动土'}, + {value: 1, name: ''}, + {value: 15, name: '受限空间'}, + {value: 1, name: ''}, + {value: 20, name: '高处'}, + {value: 1, name: ''}, + {value: 15, name: '临时用电'}, + {value: 1, name: ''}, + ], + color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null], + emphasis: { + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false + }, + tooltip: { + backgroundColor: 'rgba(0,0,0,0.4)', + textStyle: { + color: '#ffffff' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' +} + +// 修改弹框内容用到的方法 +function replaceHtmlWord(str) { + return str.replace("NO2", "NO2") + .replace("SO2", "SO2") + .replace("O3", "O3") + .replace("KMnO4", "KMnO4") + // .replace("PM10", "PM10") + // .replace("PM2.5", "PM2.5") + +} + +// 修改图例文字用到的方法 +function replaceWords(str) { + return str.replace("NO2", "NO{sub|2}") + .replace("SO2", "SO{sub|2}") + .replace("O3", "O{sub|3}") + .replace("KMnO4", "KMnO{sub|4}") + // .replace("PM2.5", "PM{sub|2.5}") + // .replace("PM10", "PM{sub|10}"); +} + +export const soilLineChartData = function (data, xAxisData, legend,selected) { + return { + color: ['#B8ECFF','#7FB0FF', '#FFFFFF','#FADFA4','#F9BAFF', '#FFB7B7', '#C9FFD7', '#947FEA'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + // interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: xAxisData + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: data, + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 40, + x2: 22, + y2: 20, + }, + legend: [{ + data: legend.slice(0,5), + top: 0, + padding: [2, 2], + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + align:'left', + itemGap:20, + width: "100%", + itemWidth:10, + selected, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + },{ + data: legend.slice(3,legend.length), + top: 20, + padding: [2, 2], + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + align:'left', + itemGap:20, + width: "80%", + itemWidth:10, + selected, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + }], + } +} +export const soilBarChartData = function (data, xAxisData,legend,$echarts) { + + let barTopColor = [ + "#B8ECFF", + "#7FB0FF", + "#E8E8E8", + "#FADFA4", + '#F9BAFF', + '#FFB7B7', + '#C9FFD7', + '#947FEA', + '#DD7171', + '#34BE98', + ]; + let barBottomColor = [ + "#7DBBD2", + "#5485D5", + "#999999", + '#CFB376', + '#A576A9', + '#BF8888', + '#82AF8E', + '#60519C', + '#985555', + '#1F886B', + ]; + let data1 = [ + [20,0,0,0,0,0,0,0], + [0,10,0,0,0,0,0,0], + [0,0,32,0,0,0,0,0], + [0,0,0,17,0,0,0,0], + [0,0,0,0,30,0,0,0], + [0,0,0,0,0,25,0,0,0,0], + [0,0,0,0,0,0,42,0,0,0], + [0,0,0,0,0,0,0,30,0,0], + [0,0,0,0,0,0,0,0,40,0], + [0,0,0,0,0,0,0,0,0,30], + ] + + let seriseData = data.map((item,i)=>{ + return { + data: data1[i], + type: 'bar', + name:item.name, + itemStyle: { + borderRadius:4, + color: function (params) { + return new $echarts.graphic.LinearGradient( + 0, 0, 0, 1, + [{ + offset: 0, + color: barTopColor[i] + }, + { + offset: 1, + color: barBottomColor[i] + } + ] + ) + }, + }, + barWidth: 8, + barGap:'-100%', + } + }) + return { + color:[ + "#B8ECFF", + "#7FB0FF", + "#E8E8E8", + "#FADFA4", + '#F9BAFF', + '#FFB7B7', + '#C9FFD7', + '#947FEA', + '#DD7171', + '#34BE98', + ], + xAxis: { + name:"", + type: 'category', + data: xAxisData, + // 设置文本样式 + axisLabel:{ + show:true, + interval:0, + formatter:function(name){ + return replaceWords(name); + }, + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + margin: 14, + verticalAlign: "middle", + fontSize: 10, + color:"#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + }, + rotate: 0, + }, + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + nameTextStyle:{ + align:'left' + }, + nameGap:20 + }, + yAxis: { + type: 'value', + name:"", + splitLine: { + show: true, + lineStyle: { + color: 'rgba(153,153,153,0.4)', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: seriseData, + label: { + // show: true + }, + tooltip: { + show: true, + alwaysShowContent: false, + trigger: 'item', + backgroundColor: 'rgba(0,0,0,0.4)', + textStyle: { + color: '#ffffff' + } + }, grid: { + x: 30, + y: 40, + x2: 22, + y2: 20, + }, + legend: [ + { + show:true, + data: legend.slice(0,5), + top: 0, + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + itemGap:20, + itemWidth:10, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + }, + { + show:true, + data: legend.slice(5,legend.length), + top: 20, + formatter: function (name) { + return replaceWords(name); + }, + icon:'circle', + itemGap:20, + itemWidth:10, + // 设置文本样式 + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff", + // 单独设置样式的图例(即上下标) + rich: { + // 数字下标 + sub: { + verticalAlign: "bottom", + fontSize: 8 + }, + // 数字上标 + sup: { + verticalAlign: "top", + fontSize: 8 + }, + // 文字下标 + wxb: { + verticalAlign: "bottom", + fontSize: 7, + }, + // 文字上标 + wsb: { + verticalAlign: "top", + fontSize: 7, + } + } + } + } + ], + } +} diff --git a/src/components/env/water/left/waterLeft.component.html b/src/components/env/water/left/waterLeft.component.html new file mode 100644 index 0000000..5081474 --- /dev/null +++ b/src/components/env/water/left/waterLeft.component.html @@ -0,0 +1,78 @@ +
+
+ + 水环境污染物年平均指标 + +
+
+
62
+
+ COD +
+
+
75%
+
+ PH +
+
+
45
+
+ 溶解氧 +
+
+
42
+
+ KMnO4 +
+
+
69
+
+ 氨氮 +
+
+
27%
+
+ 汞 +
+
+
15
+
+ BOD5 +
+
+
27
+
+ 铅 +
+
+
47
+
+ 挥发酚 +
+
+
29
+
+ 石油 +
+
+
+
+
+ + 污染物数值变化趋势 + +
+ + + + +
+ +
+
+ + 污染指数环比 + + +
+
diff --git a/src/components/env/water/left/waterLeft.component.ts b/src/components/env/water/left/waterLeft.component.ts new file mode 100644 index 0000000..20914ec --- /dev/null +++ b/src/components/env/water/left/waterLeft.component.ts @@ -0,0 +1,148 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./waterLeft.component.html" +import {pieChartData, soilLineChartData, soilBarChartData} from "./chartData"; +import * as echarts from "echarts"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" +import { + dataForWaterDay, + dataForWaterHour, + data3ForWater, +} from '@/dataDemo/mockData'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, +}) +export default class WaterLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //定时器设置 + timer: any = null; + //污染物数值变化趋势图表数据项 + option: any = {} + //特征污染物超标次数图表数据项 + barChart: any = {} + //污染物数值变化趋势图实例 + line: any = {} + //特征污染物超标次数实例 + bar: any = {} + //重新绘制图表方法 + resize() { + setTimeout(() => { + this.line.resize() + this.bar.resize() + }, 300) + } + //获取图表实例 + getEcharts(e,type){ + this[type] = e + } + //组件销毁前操作 + destroyed() { + window.removeEventListener("resize", this.resize) + } + //设置土壤污染物数值变化趋势默认选中项 + lineChartType = '小时平均' + //土壤污染物数值变化趋势切换小时统计和日统计 + changeData(val) { + this.selectIndex = 0 + if (val === '小时平均') { + this.initLineData(dataForWaterHour) + } else { + this.initLineData(dataForWaterDay) + } + } + //初始化污染物数值变化趋势图表数据 + initLineData(datas:any = '') { + let temp: any = [] + if (datas>0) { + temp = JSON.parse(JSON.stringify(datas)) + } else { + temp = JSON.parse(JSON.stringify(dataForWaterHour)) + } + + const xAxisData = temp.data[0].dataList?.map(item => item.date); + const data = temp.data.map(item => { + item.data = item.dataList?.map(its => its.value) + return item + }); + const legend = temp.data.map(item => item.name) + const selected = {}; + legend.forEach((item, i) => { + selected[item] = i === 0; + }) + this.option = soilLineChartData(data, xAxisData, legend, selected) + } + //初始化特征污染物超标次数图表数据 + iniBarData() { + const temp = JSON.parse(JSON.stringify(data3ForWater)) + const xAxisData = temp.data?.map(item => item.type); + const data = temp.data; + const legend = temp.data?.map(item => item.type) + this.barChart = soilBarChartData(data, xAxisData, legend, echarts) + } + //默认自动切换图例从第一个开始 + selectIndex = 0 + //定时器切换显示图例 + autoRunLine() { + const datas = this.lineChartType === '小时平均' ? dataForWaterHour : dataForWaterDay; + const temp = JSON.parse(JSON.stringify(datas)) + const xAxisData = temp.data[0].dataList?.map(item => item.date); + const data = temp.data.map(item => { + item.data = item.dataList?.map(its => its.value) + return item + }); + const legend = temp.data.map(item => item.name) + const selected = {}; + legend.forEach((item, i) => { + selected[item] = i === this.selectIndex; + }) + this.option = soilLineChartData(data, xAxisData, legend, selected) + } + //获取随机整数 + getRandomInt(min: number, max: number) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值 + } + + mounted() { + this.initLineData() + this.iniBarData() + this.timer = setInterval(() => { + if (this.selectIndex > 5) { + this.selectIndex = 0 + } + this.autoRunLine() + this.selectIndex++ + }, 3000) + window.addEventListener("resize", this.resize); + + /* this.timer = setInterval(()=>{ + this.dataList = [ { + title:'消防告警', + info:'区域发现黑名单人员了区域发现黑名人预', + time:'2021-05-19 16:03:28', + level:'1', + isNew:true, + },...this.dataList] + },2000)*/ + + } + + beforeDestroy() { + clearInterval(this.timer) + } +} + diff --git a/src/components/env/water/right/chartData.js b/src/components/env/water/right/chartData.js new file mode 100644 index 0000000..36b62e4 --- /dev/null +++ b/src/components/env/water/right/chartData.js @@ -0,0 +1,289 @@ +export const pieChartData = function () { + return { + title: { + text: '75%', + subtext: '达标率', + itemGap: 5, + x: '42%', + y: '40%', + textAlign:'center', + textStyle: { + fontSize: 28, + fontWeight: '600', + fontStyle: 'italic', + color: '#B8ECFF', + }, + subtextStyle: { + fontSize: 10, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + show:false, + trigger: 'item', + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + + }, + legend: { + show: true, + itemStyle: { + opacity: 1, + }, + itemWidth: 12, + itemHeight: 8, + width: 200, + top: 192, + itemGap: 20, + textStyle: { + color: '#D4E5FF', + }, + }, + color: ['#B8ECFF','#FADFA4'], + series: [ + { + type: 'pie', + radius: [60, 70], + center: ["45%", "50%"], + avoidLabelOverlap: false, + selectedOffset: 7, + label: { + show: false, + position: 'center' + }, + animation: true, + emphasis: { + disabled: true, + label: { + show: false, + } + }, + labelLine: { + show: false + }, + data: [ + { + name: '未超标数', + value: 75, + itemStyle: { + color: '#E8E8E8', + opacity: 1 + }, + }, + { + name: '超标数', + value: 25, + itemStyle: { + color: '#7FB0FF', + opacity: 0 + } + }, + ] + }, + { + type: 'pie', + radius: [55, 65], + center: ["45%", "50%"], + avoidLabelOverlap: false, + selectedOffset: 7, + label: { + show: false, + position: 'center' + }, + animation: false, + emphasis: { + disabled: true, + label: { + show: false, + } + }, + labelLine: { + show: false + }, + data: [ + { + name: '未超标数', + value: 75, + itemStyle: { + color: '#E8E8E8', + opacity: 0 + }, + }, + { + name: '超标数', + value: 25, + itemStyle: { + color: '#7FB0FF', + opacity: 1 + } + }, + ] + }, + + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' + } +} + + +export const barChartData = function ($echarts = {}){ + + return { + tooltip: { + show:false, + trigger: "axis", + axisPointer: { + // 坐标轴指示器,坐标轴触发有效 + type: "shadow" // 默认为直线,可选为:'line' | 'shadow' + } + }, + grid: { + left: "5%", //距离dom间距 + right: "4%", + top: "5%", + bottom: "5%" + }, + legend:{ + show:false + }, + xAxis: [ + { + type: 'value', + // boundaryGap: true, + axisPointer: { + type: "shadow" + }, + axisTick: { + show: false, + }, + axisLine: { + show: false + }, + splitLine: { + show: false + }, + axisLabel: { + show: false + } + } + ], + yAxis: [ + { + type: "category", + inverse: true, + axisLabel: { + verticalAlign: "bottom", + align: "left", + height:20, + width:30, + padding: [20, 10, 10, 6], + textStyle: { + fontSize: 12, + color: "#ffffff", + fontFamily: "SourceHanSansCN-Regular" + } + }, + // 纵坐标数据 + data: [ + "2号区3号库采样点", + "1号区13号库采样点", + "22号区4号库采样点", + "12号区33号库采样点", + "12号区3号库采样点", + "22号区32号库采样点", + "6号区3号库采样点", + "8号区2号库采样点", + "6号区9号库采样点", + "7号区1号库采样点", + ], + yAxisIndex: 0, + // 横坐标 分割线等取消显示 + axisTick: { + show: false + }, + axisLine: { + show: false + } + }, + { + type: "category", + inverse: true, + axisLine: { + show: false + }, + axisTick: { + show: false + }, + position:'right', + axisLabel: { + show: true, + inside: true, + verticalAlign: "bottom", + // 位置 上右下左 + padding: [0, 10, 10, 0], + // lineHeight: "40", + textStyle: { + fontSize: 12, + color: "#ffffff", + fontFamily: "SourceHanSansCN-Regular" + } + }, + // 统计的总量 用纵坐标模拟 + data: [90,80,70,60,55,50,46,40,30,20] + } + ], + series: [ + { + name: '', + type: 'bar', + // 宽度 + barWidth: "10", + // 堆叠 + stack: "总量1", + showBackground: true, + backgroundStyle: { + color: "#0c3252" + }, + data: [90,80,70,60,55,50,46,40,30,20], + z:10, + barCategoryGap:'50%', + barGap :'50%', + itemStyle: { + normal: { + show: true, + textStyle: { + fontSize: 12 + }, + color: new $echarts.graphic.LinearGradient( + 0, + 0, + 1, + 0, + [ + { + offset: 0, + color: "#7FB0FF" + }, + { + offset: 1, + color: "#5485D5" + } + ], + false + ) + } + } + } + + ] + } + + +} diff --git a/src/components/env/water/right/waterRight.component.html b/src/components/env/water/right/waterRight.component.html new file mode 100644 index 0000000..cd8c10f --- /dev/null +++ b/src/components/env/water/right/waterRight.component.html @@ -0,0 +1,36 @@ +
+
+ + 水系分布图 + +
+
+
+
+
+ 水系分布图 +
+ +
+
+ + 污染物监测达标率 + +
+
+
+ +
+
+ + + + {{ item.name }} + + +
+
+ +
+
diff --git a/src/components/env/water/right/waterRight.component.ts b/src/components/env/water/right/waterRight.component.ts new file mode 100644 index 0000000..a0c7c68 --- /dev/null +++ b/src/components/env/water/right/waterRight.component.ts @@ -0,0 +1,108 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./waterRight.component.html" +import {pieChartData, barChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" +import { + dataForWaterBar, +} from '@/dataDemo/mockData'; +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class WaterRightComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //水系分布图 + waterImg = require("@/assets/img/env/waterImg.png"); + //饼图内圈颜色 + pieCenterBorder = 'cod-border'; + //当前选中类型 + chooseType ='COD'; + //柱状图数据 + barChartData: any = {}; + //定时器 + timer: any = null; + // 排放达标率数据 + option: any = {} + //柱状图实例 + bar: any = {} + //饼图实例 + pie: any = {} + //右下饼图数据源 + dataForWaterBar = dataForWaterBar + //获取图表实例 + getEcharts(e, type) { + this[type] = e + } + //变更radio选项时改变饼图数据 + initPieChartData(val) { + const pieChartData = JSON.parse(JSON.stringify(this.option)) + const {series} = pieChartData; + let chooseData = this.option.series[0]; + if (val) { + chooseData = this.dataForWaterBar.data.find(item => item.name === val) + series[0].data[0].value = series[1].data[0].value = chooseData.value + series[0].data[0].name = series[1].data[0].name = '未超标数' + series[0].data[1].value = series[1].data[1].value = chooseData.value1 + series[0].data[1].name = series[1].data[1].name = '超标数' + pieChartData.title.text = chooseData.value + '%'; + const temp = this.dataForWaterBar.data.find(item=>item.name === val)?.color + this.pieCenterBorder = temp + '-border' + } + this.option = pieChartData; + this.option.series = series + this.option.legend.formatter = (name) => { + let tarValue; + const pieData = series[0].data + for (let i = 0; i < pieData.length; i++) { + if (name === pieData[i].name) { + tarValue = pieData[i].value; + } + } + return name + ':' + tarValue + } + } + + //组件销毁前操作 + destroyed() { + console.log('destroyed') + } + + mounted() { + /* this.timer = setInterval(()=>{ + this.randomNum() + }, 10000)*/ + this.option = pieChartData() + this.barChartData = barChartData(echarts) + + + } + + + beforeDestroy() { + clearInterval(this.timer) + } + + //改变污染物监测颜色 + changeColor(val) { + if (Number(val) <= 30) { + return '#88E29F' + } else if (Number(val) > 30 && Number(val) <= 50) { + return '#F2A183' + } else { + return '#DD7171' + } + + } +} + diff --git a/src/components/header.component.vue b/src/components/header.component.vue new file mode 100644 index 0000000..5b29f4f --- /dev/null +++ b/src/components/header.component.vue @@ -0,0 +1,320 @@ + + + diff --git a/src/components/largePopUp.component.vue b/src/components/largePopUp.component.vue new file mode 100644 index 0000000..711cf65 --- /dev/null +++ b/src/components/largePopUp.component.vue @@ -0,0 +1,180 @@ + + + + diff --git a/src/components/map.component.vue b/src/components/map.component.vue new file mode 100644 index 0000000..61750c2 --- /dev/null +++ b/src/components/map.component.vue @@ -0,0 +1,108 @@ + + + + diff --git a/src/components/parkFile/left.component.vue b/src/components/parkFile/left.component.vue new file mode 100644 index 0000000..af4161f --- /dev/null +++ b/src/components/parkFile/left.component.vue @@ -0,0 +1,216 @@ + + + \ No newline at end of file diff --git a/src/components/parkFile/right.component.vue b/src/components/parkFile/right.component.vue new file mode 100644 index 0000000..89a608e --- /dev/null +++ b/src/components/parkFile/right.component.vue @@ -0,0 +1,253 @@ + + + diff --git a/src/components/permitPopUp.component.vue b/src/components/permitPopUp.component.vue new file mode 100644 index 0000000..bef4457 --- /dev/null +++ b/src/components/permitPopUp.component.vue @@ -0,0 +1,86 @@ + + + + diff --git a/src/components/pop.component.vue b/src/components/pop.component.vue new file mode 100644 index 0000000..03d2026 --- /dev/null +++ b/src/components/pop.component.vue @@ -0,0 +1,33 @@ + + + + diff --git a/src/components/rightList.component.vue b/src/components/rightList.component.vue new file mode 100644 index 0000000..80d5792 --- /dev/null +++ b/src/components/rightList.component.vue @@ -0,0 +1,148 @@ + + + diff --git a/src/components/safety/hiddenDanger/left/chartData.js b/src/components/safety/hiddenDanger/left/chartData.js new file mode 100644 index 0000000..fb99bff --- /dev/null +++ b/src/components/safety/hiddenDanger/left/chartData.js @@ -0,0 +1,242 @@ +export const pieChartData = function (option = {}) { + return { + title: { + text: option?.text, + subtext: option?.subtext, + itemGap: 5, + x: '48%', + y: '38%', + textAlign:'center', + textStyle: { + fontSize: 17, + fontWeight: '600', + align: "center", + color: '#E8E8E8', + }, + subtextStyle: { + fontSize: 14, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + legend: { + right: 'right', + bottom:'bottom', + itemGap: 10, + itemWidth: 8, + itemHeight: 8, + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff" + }, + data:[ + { + name:'已消除', + icon:'roundRect' + },{ + name:'待验收', + icon:'roundRect' + },{ + name:'待整改', + icon:'roundRect' + },{ + name:'整改中', + icon:'roundRect' + }, + ] + }, + tooltip: { + trigger: 'item' + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left:0, + radius: [50, 75], + data: [ + {value: 25, name: '已消除'}, + {value: 1, name: ''}, + {value: 25, name: '待验收'}, + {value: 1, name: ''}, + {value: 40, name: '待整改'}, + {value: 1, name: ''}, + {value: 10, name: '整改中'}, + {value: 1, name: ''}, + ], + color: ['#7FB0FF', null, '#FADFA4', null, '#C9FFD7', null, '#FFFFFF', null,], + emphasis: { + label: { + show: true, + position:'inside', + color:'#ffffff', + textBorderColor: "rgb(111,111,111)", + textBorderwidth: 2, + backgroundColor:'transparent', + formatter:function (params) { + if (params.data.name){ + return params.data.value+'%' + }else { + return '' + } + + } + }, + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + // shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false, + position:'inside', + formatter:function (params) { + if (params.data.name){ + return params.data.value + }else { + return '' + } + + } + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' + } +} +export const lineChartData = function () { + return { + color:['#7FB0FF','#FADFA4','#C9FFD7','#FFFFFF'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: ['第一周','第二周','第三周','第四周','第五周'] + }, + legend: { + top: 'top', + itemGap: 30, + itemWidth: 8, + itemHeight: 8, + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff" + }, + data:[ + { + name:'新增', + icon:'roundRect' + },{ + name:'已验收', + icon:'roundRect' + } + ] + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name:'新增', + data: [60,80,140,70,100], + type: 'line', + symbolSize: 7, + lineStyle: { + color: '#7FB0FF', + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + },{ + name:'已验收', + data: [50,70,130,60,90], + type: 'line', + symbolSize: 7, + lineStyle: { + color: '#FADFA4', + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + } + ], + + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 30, + x2: 12, + y2: 20, + } + } +} diff --git a/src/components/safety/hiddenDanger/left/hiddenDangerLeft.component.html b/src/components/safety/hiddenDanger/left/hiddenDangerLeft.component.html new file mode 100644 index 0000000..b9c802b --- /dev/null +++ b/src/components/safety/hiddenDanger/left/hiddenDangerLeft.component.html @@ -0,0 +1,33 @@ +
+
+ + 隐患治理 + +
+ + 待核查 + 待整改 + 整改中 + 待验收 + +
+
+
隐患名称
+
上报时间
+
+
+
+
{{item.name}}
+
{{item.time}}
+
+
+
+
+ + 隐患统计 + + + + +
+
diff --git a/src/components/safety/hiddenDanger/left/hiddenDangerLeft.component.ts b/src/components/safety/hiddenDanger/left/hiddenDangerLeft.component.ts new file mode 100644 index 0000000..aab616f --- /dev/null +++ b/src/components/safety/hiddenDanger/left/hiddenDangerLeft.component.ts @@ -0,0 +1,144 @@ +import {Component, Emit, Vue} from 'vue-property-decorator'; +import template from "./hiddenDangerLeft.component.html" +import {pieChartData,lineChartData} from "./chartData"; + +import TitleComponent from "@/components/title.component.vue" +import RiskService from "@/service/risk.service"; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, + directives:{ + //列表数据动态飞入动画 + list:{ + bind:(el,binding)=>{ + const timer = (binding.value+1)*100 + setTimeout(()=>{ + el.classList.add("animate__fadeInLeft") + },timer) + }, + } + } +}) +export default class HiddenDangerLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + timer: any = null; + //饼图数据 + option1: any = pieChartData({text:'作业情况',subtext:'等级占比'}) + //饼图实例 + pieChart: any = {}; + //折线图实例 + lineChart: any = {}; + rightChart:any = {} + activePieItem = 0; + //折线图数据 + lineData = lineChartData() + count = 1 + status = '1' + //特殊作业mock数据 + // hiddenList = []; + get hiddenList(){ + return this.$store.state.hiddenDangrousList.filter(item=>item.reformStatus == this.status) + } + //切换饼图高亮区域 + changePieChange() { + + if (this.activePieItem > 8) { + this.activePieItem = 0 + } + + //定时移除高亮选中区 + this.rightChart.dispatchAction({ + type: "downplay", + seriesIndex: 0, + }); + //定时加载选中高亮区 + this.rightChart.dispatchAction({ + type: "highlight", + dataIndex: this.activePieItem + }) + this.activePieItem += 2; + + } + + //获取图表实例 + getEcharts(e,type) { + this[type] = e + } + + + //随机整数 + getRandomInt(min: number, max: number) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值 + } + + + + //监听页面变化重新绘制图表 + resize() { + setTimeout(() => { + this.rightChart.resize(); + this.lineChart.resize(); + }, 300) + } + public riskService = new RiskService(); + //获取隐患详情 + getHiddenDetail(params){ + this.showRight(params) + /* this.riskService.getRiskDetail(params).then((res:any)=>{ + if (res.code === 200){ + this.showRight(res.data) + }else{ + this.$message.error(res.message) + } + })*/ + } + //定时刷新图表 + lineChartChange(){ + this.lineChart.clear(); + this.lineChart.setOption(lineChartData()) + } + mounted() { + this.changeData(1) + this.timer = setInterval(() => { + this.lineChartChange() + this.changePieChange() + }, 3000) + + window.addEventListener("resize", this.resize); + } + + + beforeDestroy() { + clearInterval(this.timer) + } + + destroyed() { + window.removeEventListener("resize", this.resize) + } + @Emit() + showRight(item){ + console.log(item) + } + //切换风险级别 + changeData(val){ + // + } + delay(i) { + return `animate__delay-${i}s` + } + + +} + diff --git a/src/components/safety/hiddenDanger/left/mockData.js b/src/components/safety/hiddenDanger/left/mockData.js new file mode 100644 index 0000000..41d45d2 --- /dev/null +++ b/src/components/safety/hiddenDanger/left/mockData.js @@ -0,0 +1,63 @@ +export const mockData = { + "1":[ + { "id": "000542ff-f569-4823-88aa-f7a6904131c9", "name": "含油污水处理分析单元","description":"超标排放", "level": 1 }, + { "id": "004114e8-8d20-4ada-a52d-a152f5111f99", "name": "卸油作业分析单元","description":"燃油泄露风险", "level": 1 }, + { "id": "00655661-d216-4132-a89c-486f7fb6f884", "name": "发油作业分析单元","description":"燃油泄露风险", "level": 1 }, + { "id": "012fe1e5-9c3f-45e6-aa96-4f4c04c9cc48", "name": "配电间分析单元","description":"漏电风险", "level": 1 }, + { "id": "019889df-e79c-4870-849b-2abeefbf1a6a", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 1 }, + { "id": "0222ad5e-0668-4861-bd27-fac137cd7eb8", "name": "汽、柴油卸油分析单元","description":"泄露风险", "level": 1 }, + { "id": "02385672-2f50-488f-8b89-9cd0b98ccae6", "name": "含油污水处理分析单元","description":"超标排放", "level": 1 }, + { "id": "0253f566-b032-48ea-966e-2721dfe72208", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 1 }, + ], + "2":[ + { "id": "00655661-d216-4132-a89c-486f7fb6f884", "name": "发油作业分析单元","description":"燃油泄露风险", "level": 2 }, + { "id": "012fe1e5-9c3f-45e6-aa96-4f4c04c9cc48", "name": "配电间分析单元","description":"漏电风险", "level": 2 }, + { "id": "019889df-e79c-4870-849b-2abeefbf1a6a", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 2 }, + { "id": "0222ad5e-0668-4861-bd27-fac137cd7eb8", "name": "汽、柴油卸油分析单元","description":"泄露风险", "level": 2 }, + { "id": "02385672-2f50-488f-8b89-9cd0b98ccae6", "name": "含油污水处理分析单元","description":"超标排放", "level": 2 }, + { "id": "000542ff-f569-4823-88aa-f7a6904131c9", "name": "含油污水处理分析单元","description":"超标排放", "level": 2 }, + { "id": "004114e8-8d20-4ada-a52d-a152f5111f99", "name": "卸油作业分析单元","description":"燃油泄露风险", "level": 2 }, + { "id": "0253f566-b032-48ea-966e-2721dfe72208", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 2 }, + ], + "3":[ + { "id": "019889df-e79c-4870-849b-2abeefbf1a6a", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 3 }, + { "id": "0222ad5e-0668-4861-bd27-fac137cd7eb8", "name": "汽、柴油卸油分析单元","description":"泄露风险", "level": 3 }, + { "id": "02385672-2f50-488f-8b89-9cd0b98ccae6", "name": "含油污水处理分析单元","description":"超标排放", "level": 3 }, + { "id": "000542ff-f569-4823-88aa-f7a6904131c9", "name": "含油污水处理分析单元","description":"超标排放", "level": 3 }, + { "id": "004114e8-8d20-4ada-a52d-a152f5111f99", "name": "卸油作业分析单元","description":"燃油泄露风险", "level": 3 }, + { "id": "00655661-d216-4132-a89c-486f7fb6f884", "name": "发油作业分析单元","description":"燃油泄露风险", "level": 3 }, + { "id": "012fe1e5-9c3f-45e6-aa96-4f4c04c9cc48", "name": "配电间分析单元","description":"漏电风险", "level": 3 }, + { "id": "0253f566-b032-48ea-966e-2721dfe72208", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 3 }], + "4":[ + { "id": "000542ff-f569-4823-88aa-f7a6904131c9", "name": "含油污水处理分析单元","description":"超标排放", "level": 4 }, + { "id": "004114e8-8d20-4ada-a52d-a152f5111f99", "name": "卸油作业分析单元","description":"燃油泄露风险", "level": 4 }, + { "id": "00655661-d216-4132-a89c-486f7fb6f884", "name": "发油作业分析单元","description":"燃油泄露风险", "level": 4 }, + { "id": "012fe1e5-9c3f-45e6-aa96-4f4c04c9cc48", "name": "配电间分析单元","description":"漏电风险", "level": 4 }, + { "id": "019889df-e79c-4870-849b-2abeefbf1a6a", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 4 }, + { "id": "0222ad5e-0668-4861-bd27-fac137cd7eb8", "name": "汽、柴油卸油分析单元","description":"泄露风险", "level": 4 }, + { "id": "02385672-2f50-488f-8b89-9cd0b98ccae6", "name": "含油污水处理分析单元","description":"超标排放", "level": 4 }, + { "id": "0253f566-b032-48ea-966e-2721dfe72208", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 4 } + ], +} + +export const detail = { + "id": "1736bd5f-765e-4c4a-9786-8bc06a2134eb", + "name": "卸油作业分析单元", + "riskProbability": "可能", + "riskFactor": "泄漏、火灾、爆炸、憋压、中毒", + "affectConsequences": "泄漏、火灾、爆炸、憋压、中毒", + "level": 1, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "responsiblePersonId": "1fe37818-c849-4ba2-a53d-d440d1cbf983", + "responsiblePerson": "亓美枫", + "riskControlMeasures": "内外操每时进行巡检,记录操作数据", + "lastReviewDate": "2022-04-15 07:35:34", + "majorHazardSourcesId": "954e5e6f-91c5-46d1-a085-ad0e6cdae10c", + "majorHazardSourcesName": "氯气瓶仓库单元", + "personName": "亓美枫", + "phone": "15500692422", + "addr": "台西纬五路117号-1-3", + "remark": "台西纬五路117号-1-3", +} + diff --git a/src/components/safety/hiddenDanger/right/chartData.js b/src/components/safety/hiddenDanger/right/chartData.js new file mode 100644 index 0000000..de75be0 --- /dev/null +++ b/src/components/safety/hiddenDanger/right/chartData.js @@ -0,0 +1,272 @@ +export const barTopChartData = function ($echarts) { + let barTopColor = [ + "#B8ECFF", + "#7FB0FF", + "#E8E8E8", + "#FADFA4", + '#F9BAFF', + '#FFB7B7', + '#C9FFD7', + '#947FEA', + ]; + let barBottomColor = [ + "#7DBBD2", + "#5485D5", + "#999999", + '#CFB376', + '#A576A9', + '#BF8888', + '#82AF8E', + '#60519C', + ]; + const com = ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学', '海利得']; + const data1 = [] + for (let i = 0; i < com.length; i++) { + data1.push({ + name:com[i], + value:parseInt(String(Math.random()*100)) + }) + } + + let seriesData = data1.map((item,i)=>{ + return { + ...item, + itemStyle: { + borderRadius:[4,4,0,0], + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [ + { + offset: 0, + color: barTopColor[i], // 0% 处的颜色 + }, + { + offset: 1, + color: barBottomColor[i], // 100% 处的颜色 + }, + ], + global: false, // 缺省为 false + } + + }, + barWidth: 8, + } + }) + return { + color:[ + "#B8ECFF", + "#7FB0FF", + "#E8E8E8", + "#FADFA4", + '#F9BAFF', + '#FFB7B7' + ], + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + }, + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + }, + grid: { + left: '3%', + right: '4%', + bottom: '3%', + top: '8%', + containLabel: true + }, + xAxis: [ + { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学', '海利得'], + axisTick: { + show: false, + }, + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + } + ], + yAxis: [ + { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + } + ], + series: [ + { + name: '', + type: 'bar', + barWidth: 8, + data: seriesData + } + + ] + }; + +} +export const barBottomChartData = function () { + const yData = ['联化科技股份有限公司', '立本作物科技有限公司', '圣丰集团有限公司', '茂盛生物有限公司', '利尔化学股份有限公司', '海利得新材料股份有限公司','恒力石化股份有限公司']; + let data = [90,80,70,60,55,50,46]; + data.sort((a, b) => b - a); + let max = Math.max.apply(null, data); + max = max + 30; + let getMax = []; + for (let i = 0; i < yData.length; i++) { + getMax.push(max); + } + + return { + tooltip: { + show:false, + trigger: 'axis', + axisPointer: { + type: 'none', + }, + formatter: function (params) { + return params[0].name + ' : ' + params[0].value; + }, + }, + legend: { + show:false, + right: '25%', + top: '0%', + itemWidth: 10, + itemHeight: 10, + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + xAxis: { + show: false, + type: 'value', + }, + grid: { + right: '12%', + left: '1%', + top: '6%', + bottom: '1%', + }, + yAxis: [ + { + type: 'category', + inverse: true, + offset: -8, + axisLabel: { + show: true, + align: 'left', + verticalAlign:'bottom', + lineHeight: 28, + textStyle: { + color: '#fff', + fontSize: '12', + }, + }, + splitLine: { + show: false, + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + }, + data: yData, + }, + { + type: 'category', + inverse: true, + offset: 0, + axisTick: 'none', + axisLine: 'none', + show: true, + axisLabel: { + textStyle: { + color: '#fff', + fontSize: '14', + }, + }, + data: data, + }, + ], + series: [ + { + name: '', + type: 'bar', + stack: 'user', + zlevel: 1, + itemStyle: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 1, + y2: 0, + colorStops: [ + { + offset: 0, + color: '#7FB0FF', // 0% 处的颜色 + }, + { + offset: 1, + color: '#5485D5', // 100% 处的颜色 + }, + ], + global: false, // 缺省为 false + } + }, + barWidth: 10, + data: data, + }, + { + name: '背景', + type: 'bar', + barWidth: 10, + barGap: '-100%', + data: getMax, + itemStyle: { + color: 'rgba(21,36,72,0.5)', + }, + }, + ], + }; + +} diff --git a/src/components/safety/hiddenDanger/right/detail.component.html b/src/components/safety/hiddenDanger/right/detail.component.html new file mode 100644 index 0000000..c7389d3 --- /dev/null +++ b/src/components/safety/hiddenDanger/right/detail.component.html @@ -0,0 +1,38 @@ +
+
+ + 隐患详情 + + + + + + + + +
+
diff --git a/src/components/safety/hiddenDanger/right/hiddenDangerDetail.component.ts b/src/components/safety/hiddenDanger/right/hiddenDangerDetail.component.ts new file mode 100644 index 0000000..2015467 --- /dev/null +++ b/src/components/safety/hiddenDanger/right/hiddenDangerDetail.component.ts @@ -0,0 +1,85 @@ +import {Component, Emit, Prop, Vue} from 'vue-property-decorator'; +import template from "./detail.component.html" + +import TitleComponent from "@/components/title.component.vue" +import {detail} from "@/components/safety/risk/left/mockData"; + + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class HiddenDangerDetailComponent extends Vue { + //标题图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //风险详情 + @Prop({default: {}}) detailData!: any + //人物照片 + personIcon = require('@/assets/img/person.png') + //风险等级map + titleNameMap = { + 1: '一级风险', + 2: '二级风险', + 3: '三级风险', + 4: '四级风险', + } +//状态枚举 + statusMap = { + 1: { + name: '已超期', + class: 'red', + classBg: 'red-bg', + }, 2: { + name: '已超期', + class: 'red', + classBg: 'red-bg', + }, 4: { + name: '已超期', + class: 'red', + classBg: 'red-bg', + }, 5: { + name: '已超期', + class: 'red', + classBg: 'red-bg', + }, + + } + + @Emit() + changeClose() { + //监听关闭事件 + } + + showRiskDetail(risk) { + const obj = { + name: risk + } + this.showRisk({...detail, ...obj}) + + } + + //查看危险源信息 + @Emit() + showRisk(item) { + //查看危险源信息 + } + + mounted() { + + } + + + destroyed() { + //todo 销毁项 + } + +} + diff --git a/src/components/safety/hiddenDanger/right/hiddenDangerRight.component.html b/src/components/safety/hiddenDanger/right/hiddenDangerRight.component.html new file mode 100644 index 0000000..e397965 --- /dev/null +++ b/src/components/safety/hiddenDanger/right/hiddenDangerRight.component.html @@ -0,0 +1,22 @@ +
+
+ + 隐患超期统计 + + +
+
隐患名称
+
超期时间
+
责任单位
+
+
+
+
{{item.name}}
+
{{item.delay}}天
+
{{item.company}}
+
+
+
+ +
+ diff --git a/src/components/safety/hiddenDanger/right/hiddenDangerRight.component.ts b/src/components/safety/hiddenDanger/right/hiddenDangerRight.component.ts new file mode 100644 index 0000000..162de23 --- /dev/null +++ b/src/components/safety/hiddenDanger/right/hiddenDangerRight.component.ts @@ -0,0 +1,72 @@ +import {Component, Emit, Prop, Vue} from 'vue-property-decorator'; +import template from "./hiddenDangerRight.component.html" +import {barTopChartData,barBottomChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" +import * as echarts from "echarts"; +import RiskService from "@/service/risk.service"; + + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, + directives:{ + //列表数据动态飞入动画 + list:{ + bind:(el,binding)=>{ + const timer = (binding.value+1)*100 + setTimeout(()=>{ + el.classList.add("animate__fadeInRight") + },timer) + }, + } + } +}) +export default class HiddenDangerRightComponent extends Vue { + //标题图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + + //企业作业统计柱状图数据 + topBarChartData = {} + //企业作业统计柱状图实例 + barTop:any = {} + //企业延期隐患排行 + hiddenList:any[] = [] + //获取图表实例 + getEcharts(e,type){ + this[type] = e + this.topBarChartData = barTopChartData(echarts) + } + public riskService = new RiskService(); + getHiddenList(){ + this.riskService.getHiddenList().then((res:any)=>{ + if (res.code === 200){ + this.hiddenList = res.data; + }else{ + this.$message.error(res.message) + } + }) + } + //图表自适应 + resize() { + setTimeout(() => { + this.barTop.resize(); + }, 300) + } + mounted() { + this.getHiddenList() + window.addEventListener("resize", this.resize); + } + destroyed() { + window.removeEventListener("resize", this.resize) + } + +} + diff --git a/src/components/safety/index/left/chartData.js b/src/components/safety/index/left/chartData.js new file mode 100644 index 0000000..8741951 --- /dev/null +++ b/src/components/safety/index/left/chartData.js @@ -0,0 +1,102 @@ +export const pieChartData = function (option = {}) { + return { + title: { + text: option?.text, + subtext: option?.subtext, + itemGap: 5, + x: '46%', + y: '38%', + textAlign:'center', + textStyle: { + fontSize: 17, + fontWeight: '600', + align: "center", + color: '#E8E8E8', + }, + subtextStyle: { + fontSize: 14, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + trigger: 'item' + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left:0, + radius: [50, 65], + data: [ + {value: 25, name: '一级'}, + {value: 1, name: ''}, + {value: 25, name: '二级'}, + {value: 1, name: ''}, + {value: 15, name: '三级'}, + {value: 1, name: ''}, + {value: 20, name: '四级'}, + {value: 1, name: ''}, + ], + color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null], + emphasis: { + label: { + show: true, + position:'inside', + color:'#ffffff', + textBorderColor: "rgb(111,111,111)", + textBorderWidth: 3, + backgroundColor:'transparent', + formatter:function (params) { + if (params.data.name){ + return params.data.value+'%' + }else { + return '' + } + + } + }, + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + // shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false, + position:'inside', + formatter:function (params) { + if (params.data.name){ + return params.data.value + }else { + return '' + } + + } + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' + } +} diff --git a/src/components/safety/index/left/safetyIndexLeft.component.html b/src/components/safety/index/left/safetyIndexLeft.component.html new file mode 100644 index 0000000..1baa247 --- /dev/null +++ b/src/components/safety/index/left/safetyIndexLeft.component.html @@ -0,0 +1,52 @@ +
+
+ + 安全态势 + +
+
+
95分
+
+ 安全分数 +
+
+
+
1024天
+
+ 安全生产天数 +
+
+
+
+
+ + 告警信息 + + +
+
+ + 重大风险 + +
+
+
+
+

745

+

重大危险源(个)

+
+
+
+
+
+

84

+

风险项(个)

+
+
+
+
+ + +
+
+
diff --git a/src/components/safety/index/left/safetyIndexLeft.component.ts b/src/components/safety/index/left/safetyIndexLeft.component.ts new file mode 100644 index 0000000..dd388ea --- /dev/null +++ b/src/components/safety/index/left/safetyIndexLeft.component.ts @@ -0,0 +1,226 @@ +import {Component, Emit, Vue} from 'vue-property-decorator'; +import template from "./safetyIndexLeft.component.html" +import {pieChartData} from "./chartData"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, +}) +export default class SafetyIndexLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //总设备数 + totalEquipment = 1024; + //在线设备 + onlineEquipment = 724; + //报警列表 + get dataList(){ + return this.$store.state.warningList + } + timer: any = null; + //饼图数据 + option: any = pieChartData({text:'重大危险源',subtext:'等级占比'}) + option1: any = pieChartData({text:'风险项',subtext:'等级占比'}) + //饼图实例 + pieChart: any = {}; + leftChart:any = {} + rightChart:any = {} + activePieItem = 0; + + //切换饼图高亮区域 + changePieChange() { + + if (this.activePieItem > 8) { + this.activePieItem = 0 + } + /* let temp = JSON.parse(JSON.stringify(this.option)) + temp.series[0].data = temp.series[0].data.map(item => { + item.selected = false + return item + }) + temp.series[0].data[this.activePieItem].selected = true + console.log(temp.series) + /!* this.pieChart.setOption({ + series: temp.series + }); *!/ + this.pieChart.setOption(temp);*/ + //定时移除高亮选中区 + this.leftChart.dispatchAction({ + type: "downplay", + seriesIndex: 0, + }); + //定时加载选中高亮区 + this.leftChart.dispatchAction({ + type: "highlight", + dataIndex: this.activePieItem + }) + //定时移除高亮选中区 + this.rightChart.dispatchAction({ + type: "downplay", + seriesIndex: 0, + }); + //定时加载选中高亮区 + this.rightChart.dispatchAction({ + type: "highlight", + dataIndex: this.activePieItem + }) + this.activePieItem += 2; + + } + + //获取图表实例 + getEcharts(e,type) { + this[type] = e + } + //展示告警信息 + showWaring(item){ + + const levelMap = { + 1:'一级', + 2:'二级', + 3:'三级', + } + const levelClassMap = { + 3:'blue', + 2:'yellow', + 1:'red', + } + console.log(item) + this.getItem(Object.assign(item,{ + type:'风险告警', + level:item.level, + levelClass:levelClassMap[item.level], + levelName:levelMap[item.level], + content:'监测数值异常', + time:'2023年1月20日 14:33:33', + equipment:'北区广场监测点', + linkDangerSource:'炼化油生产单元', + tableHeader:[ + { + 'prop':'alarmSubject', + 'label':'告警主体', + 'width':'90px', + }, { + 'prop':'thermometer', + 'label':'温度计', + }, { + 'prop':'criticalValue', + 'label':'临界值', + 'width':'90px', + }, + ], + tableData: [{ + 'alarmSubject': '温度', + 'thermometer': '456°C', + 'criticalValue': '356°C', + }, { + 'alarmSubject': '湿度', + 'thermometer': '60%', + 'criticalValue': '20%-70%', + }, { + 'alarmSubject': '湿度', + 'thermometer': '60%', + 'criticalValue': '20%-70%', + }, { + 'alarmSubject': '湿度', + 'thermometer': '60%', + 'criticalValue': '20%-70%', + }, { + 'alarmSubject': '湿度', + 'thermometer': '60%', + 'criticalValue': '20%-70%', + }] + })) + } + //点击告警信息 + @Emit() + getItem(item) { + console.log('item', item) + } + + //生成随机数 + randomNum() { + const num = this.getRandomInt(4, 20) + if (num % 2 === 0) { + this.onlineEquipment += num + } else { + this.onlineEquipment -= num + } + + } + + //随机整数 + getRandomInt(min: number, max: number) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值 + } + + count = 1 + + //监听页面变化重新绘制图表 + resize() { + setTimeout(() => { + this.leftChart.resize(); + this.rightChart.resize(); + }, 300) + } + + mounted() { + this.timer = setInterval(() => { + this.changePieChange() + this.randomNum() + }, 3000) + + //动态插入数据 + /*this.timer = setInterval(() => { + this.scrollList() + }, 6000)*/ + window.addEventListener("resize", this.resize); + } + + //告警信息列表滚动 + scrollList() { + this.dataList.unshift({ + title: '消防告警' + this.count, + info: '区域发现黑名单人员了区域发现黑名人预', + time: '2021-05-19 16:03:28', + level: this.count % 3, + }) + this.count++; + /* this.$nextTick(() => { + const dom: any = document.querySelector('.warning-list-box') + dom.classList.remove('animate__fadeInLeft') + setTimeout(() => { + dom.classList.add('animate__fadeInLeft') + },) + })*/ + } + + beforeDestroy() { + clearInterval(this.timer) + } + + destroyed() { + window.removeEventListener("resize", this.resize) + } + changeMore(){ + console.log(1) + } + changeClose(){ + console.log(1) + } +} + diff --git a/src/components/safety/index/right/chartData.js b/src/components/safety/index/right/chartData.js new file mode 100644 index 0000000..a7b0974 --- /dev/null +++ b/src/components/safety/index/right/chartData.js @@ -0,0 +1,217 @@ +export const lineChartData = function (data, xAxisData, $echarts) { + return { + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: xAxisData + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + data: data, + type: 'line', + itemStyle: { + color: '#E8E8E8', + }, + symbolSize: 7, + lineStyle: { + color: '#E8E8E8', + width: 3 + }, + smooth: true, + label: { + show: true, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + } + ], + + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 22, + x2: 12, + y2: 20, + } + } +} +export const lineAndBatChartData = function ($echarts) { + return { + color: ['#7FB0FF', '#E8E8E8', '#FADFA4'], + tooltip: { + show: true, + alwaysShowContent: false, + trigger: 'item', + backgroundColor: 'rgba(0,0,0,0.4)', + textStyle: { + color: '#ffffff' + } + }, + legend: { + top: 'top', + itemGap: 25, + itemWidth: 8, + itemHeight: 8, + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff" + } + }, + grid: { + top: '15%', + left: '5%', + right: '5%', + bottom: '5%', + containLabel: true + }, + xAxis: [ + { + type: 'category', + data: [ + '1月', + '2月', + '3月', + '4月', + '5月', + '6月', + '7月', + ], + + axisTick: false, + axisLine: { + lineStyle: { + color: '#999999' + } + }, + axisLabel: { + color: '#999999' + } + } + ], + yAxis: [ + { + type: 'value', + name: '', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + width: 1, + type: 'solid' + } + }, + axisLine: { + show: true, + lineStyle: { + color: '#999999', + } + }, + }, + { + type: 'value', + name: '', + splitLine: { + show: false + } + } + ], + series: [ + { + name: '巡查次数', + type: 'bar', + barWidth: 8, + data: [120, 95, 70, 85, 110, 60, 90], + itemStyle: { + borderRadius: [4, 4, 0, 0], + color: function (params) { + return new $echarts.graphic.LinearGradient( + 0, 0, 0, 1, + [{ + offset: 0, + color: '#7FB0FF' + }, + { + offset: 1, + color: '#3179EA' + } + ] + ) + }, + } + }, + { + name: '上报隐患', + type: 'bar', + barWidth: 8, + itemStyle: { + borderRadius: [4, 4, 0, 0], + color: function (params) { + return new $echarts.graphic.LinearGradient( + 0, 0, 0, 1, + [{ + offset: 0, + color: '#E8E8E8' + }, + { + offset: 1, + color: '#999999' + } + ] + ) + }, + }, + data: [130, 75, 80, 83, 90, 100, 120] + }, + { + name: '上报风险', + type: 'line', + color: '#D0AF7B', + yAxisIndex: 1, + symbolSize: 6, + symbol: 'circle', + data: [110, 68, 78, 105, 125, 77, 100] + } + ] + } + +} diff --git a/src/components/safety/index/right/safetyIndexRight.component.html b/src/components/safety/index/right/safetyIndexRight.component.html new file mode 100644 index 0000000..a311437 --- /dev/null +++ b/src/components/safety/index/right/safetyIndexRight.component.html @@ -0,0 +1,89 @@ +
+
+ + 特殊作业 + +
+
+
+ 8 + +
+
进行中
+
+
+
+ + 28 + +
+
待开始
+
+
+
+ + 234 + +
+
已完成
+
+
+
+
+
+
+

745

+

作业企业数量

+
+
+
+
+
+

84

+

施工单位数量

+
+
+
+
+
+ + 隐患治理 + +
+
+
5
+
+ 整改超期 +
+
+
+
8
+
+ 待验收 +
+
+
+
9
+
+ 整改中 +
+
+
+
7
+
+ 待整改 +
+
+
+ +
+
+ + 污染物监测 + + + +
+
diff --git a/src/components/safety/index/right/safetyIndexRight.component.ts b/src/components/safety/index/right/safetyIndexRight.component.ts new file mode 100644 index 0000000..64eaacb --- /dev/null +++ b/src/components/safety/index/right/safetyIndexRight.component.ts @@ -0,0 +1,73 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./safetyIndexRight.component.html" +import {lineChartData,lineAndBatChartData} from "./chartData"; +import {smartAndEnvironmentallyFriendlyData} from '@/dataDemo/smartAndEnvironmentallyFriendlyData'; +import TitleComponent from "@/components/title.component.vue" +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class SafetyIndexRightComponent extends Vue { + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + + timer: any = null; + //折线图配置项 + option: any = {} + //折线图实例 + lineChart: any = {} + //折线柱状图实例 + barAndLineChart:any = {} + //折线柱状图配置项 + barAndLineData:any = {} + smartAndEnvironmentallyFriendlyData = JSON.parse(JSON.stringify(smartAndEnvironmentallyFriendlyData)) + + getEcharts(e,type) { + this[type] = e + this.initLineData() + this.barAndLineData = lineAndBatChartData(echarts) + } + resize() { + setTimeout(() => { + this.lineChart.resize(); + }, 300) + } + + + mounted() { + window.addEventListener("resize", this.resize); + } +//初始化line图表 + initLineData(inData = []) { + let newData: any[] = [] + if (inData.length === 0) { + newData = smartAndEnvironmentallyFriendlyData.atmosphericEnvironmentalQuality.data + } else { + newData = inData + } + const xAxisData = ['1月','2月','3月','4月','5月','6月','7月']; + + const data = (newData as any).data?.map(item => item.value); + data.splice(0, data.length - 7) + this.option = lineChartData(data, xAxisData, echarts) + } + + beforeDestroy() { + clearInterval(this.timer) + + } + destroyed() { + window.removeEventListener("resize", this.resize) + } + +} + diff --git a/src/components/safety/risk/left/chartData.js b/src/components/safety/risk/left/chartData.js new file mode 100644 index 0000000..3f97d00 --- /dev/null +++ b/src/components/safety/risk/left/chartData.js @@ -0,0 +1,280 @@ +export const pieChartData = function (option = {}) { + return { + title: { + text: option?.text, + subtext: option?.subtext, + itemGap: 5, + x: '48%', + y: '38%', + textAlign:'center', + textStyle: { + fontSize: 17, + fontWeight: '600', + align: "center", + color: '#E8E8E8', + }, + subtextStyle: { + fontSize: 14, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + legend: { + right: 'right', + bottom:'bottom', + itemGap: 10, + itemWidth: 8, + itemHeight: 8, + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff" + }, + data:[ + { + name:'一级', + icon:'roundRect' + },{ + name:'二级', + icon:'roundRect' + },{ + name:'三级', + icon:'roundRect' + },{ + name:'四级', + icon:'roundRect' + }, + ] + }, + tooltip: { + trigger: 'item' + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left:0, + radius: [50, 75], + data: [ + {value: 25, name: '一级'}, + {value: 1, name: ''}, + {value: 25, name: '二级'}, + {value: 1, name: ''}, + {value: 15, name: '三级'}, + {value: 1, name: ''}, + {value: 20, name: '四级'}, + {value: 1, name: ''}, + ], + color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null], + emphasis: { + label: { + show: true, + position:'inside', + color:'#ffffff', + textBorderColor: "rgb(111,111,111)", + textBorderwidth: 2, + backgroundColor:'transparent', + formatter:function (params) { + if (params.data.name){ + return params.data.value+'%' + }else { + return '' + } + + } + }, + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + // shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false, + position:'inside', + formatter:function (params) { + if (params.data.name){ + return params.data.value + }else { + return '' + } + + } + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' + } +} +export const lineChartData = function () { + return { + color:['#7FB0FF','#FADFA4','#C9FFD7','#FFFFFF'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: ['第一周','第二周','第三周','第四周','第五周'] + }, + legend: { + top: 'top', + itemGap: 30, + itemWidth: 8, + itemHeight: 8, + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff" + }, + data:[ + { + name:'一级', + icon:'roundRect' + },{ + name:'二级', + icon:'roundRect' + },{ + name:'三级', + icon:'roundRect' + },{ + name:'四级', + icon:'roundRect' + }, + ] + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name:'一级', + data: [60,80,140,70,100], + type: 'line', + symbolSize: 7, + lineStyle: { + color: '#7FB0FF', + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + },{ + name:'二级', + data: [50,70,130,60,90], + type: 'line', + symbolSize: 7, + lineStyle: { + color: '#FADFA4', + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + },{ + name:'三级', + data: [40,60,120,50,80], + type: 'line', + symbolSize: 7, + lineStyle: { + color: '#C9FFD7', + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + },{ + name:'四级', + data: [35,56,112,47,72], + type: 'line', + symbolSize: 7, + lineStyle: { + color: '#FFFFFF', + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + }, + ], + + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 30, + x2: 12, + y2: 20, + } + } +} diff --git a/src/components/safety/risk/left/mockData.js b/src/components/safety/risk/left/mockData.js new file mode 100644 index 0000000..09f8237 --- /dev/null +++ b/src/components/safety/risk/left/mockData.js @@ -0,0 +1,1850 @@ +export const mockData = { + "1": [ + {"id": "000542ff-f569-4823-88aa-f7a6904131c9", "name": "含油污水处理分析单元", "description": "超标排放", "level": 1}, + {"id": "004114e8-8d20-4ada-a52d-a152f5111f99", "name": "卸油作业分析单元", "description": "燃油泄露风险", "level": 1}, + {"id": "00655661-d216-4132-a89c-486f7fb6f884", "name": "发油作业分析单元", "description": "燃油泄露风险", "level": 1}, + {"id": "012fe1e5-9c3f-45e6-aa96-4f4c04c9cc48", "name": "配电间分析单元", "description": "漏电风险", "level": 1}, + {"id": "019889df-e79c-4870-849b-2abeefbf1a6a", "name": "拱顶罐、内浮顶罐分析单元", "description": "燃油泄露风险", "level": 1}, + {"id": "0222ad5e-0668-4861-bd27-fac137cd7eb8", "name": "汽、柴油卸油分析单元", "description": "泄露风险", "level": 1}, + {"id": "02385672-2f50-488f-8b89-9cd0b98ccae6", "name": "含油污水处理分析单元", "description": "超标排放", "level": 1}, + {"id": "0253f566-b032-48ea-966e-2721dfe72208", "name": "拱顶罐、内浮顶罐分析单元", "description": "燃油泄露风险", "level": 1}, + ], + "2": [ + {"id": "00655661-d216-4132-a89c-486f7fb6f884", "name": "发油作业分析单元", "description": "燃油泄露风险", "level": 2}, + {"id": "012fe1e5-9c3f-45e6-aa96-4f4c04c9cc48", "name": "配电间分析单元", "description": "漏电风险", "level": 2}, + {"id": "019889df-e79c-4870-849b-2abeefbf1a6a", "name": "拱顶罐、内浮顶罐分析单元", "description": "燃油泄露风险", "level": 2}, + {"id": "0222ad5e-0668-4861-bd27-fac137cd7eb8", "name": "汽、柴油卸油分析单元", "description": "泄露风险", "level": 2}, + {"id": "02385672-2f50-488f-8b89-9cd0b98ccae6", "name": "含油污水处理分析单元", "description": "超标排放", "level": 2}, + {"id": "000542ff-f569-4823-88aa-f7a6904131c9", "name": "含油污水处理分析单元", "description": "超标排放", "level": 2}, + {"id": "004114e8-8d20-4ada-a52d-a152f5111f99", "name": "卸油作业分析单元", "description": "燃油泄露风险", "level": 2}, + {"id": "0253f566-b032-48ea-966e-2721dfe72208", "name": "拱顶罐、内浮顶罐分析单元", "description": "燃油泄露风险", "level": 2}, + ], + "3": [ + {"id": "019889df-e79c-4870-849b-2abeefbf1a6a", "name": "拱顶罐、内浮顶罐分析单元", "description": "燃油泄露风险", "level": 3}, + {"id": "0222ad5e-0668-4861-bd27-fac137cd7eb8", "name": "汽、柴油卸油分析单元", "description": "泄露风险", "level": 3}, + {"id": "02385672-2f50-488f-8b89-9cd0b98ccae6", "name": "含油污水处理分析单元", "description": "超标排放", "level": 3}, + {"id": "000542ff-f569-4823-88aa-f7a6904131c9", "name": "含油污水处理分析单元", "description": "超标排放", "level": 3}, + {"id": "004114e8-8d20-4ada-a52d-a152f5111f99", "name": "卸油作业分析单元", "description": "燃油泄露风险", "level": 3}, + {"id": "00655661-d216-4132-a89c-486f7fb6f884", "name": "发油作业分析单元", "description": "燃油泄露风险", "level": 3}, + {"id": "012fe1e5-9c3f-45e6-aa96-4f4c04c9cc48", "name": "配电间分析单元", "description": "漏电风险", "level": 3}, + {"id": "0253f566-b032-48ea-966e-2721dfe72208", "name": "拱顶罐、内浮顶罐分析单元", "description": "燃油泄露风险", "level": 3}], + "4": [ + {"id": "000542ff-f569-4823-88aa-f7a6904131c9", "name": "含油污水处理分析单元", "description": "超标排放", "level": 4}, + {"id": "004114e8-8d20-4ada-a52d-a152f5111f99", "name": "卸油作业分析单元", "description": "燃油泄露风险", "level": 4}, + {"id": "00655661-d216-4132-a89c-486f7fb6f884", "name": "发油作业分析单元", "description": "燃油泄露风险", "level": 4}, + {"id": "012fe1e5-9c3f-45e6-aa96-4f4c04c9cc48", "name": "配电间分析单元", "description": "漏电风险", "level": 4}, + {"id": "019889df-e79c-4870-849b-2abeefbf1a6a", "name": "拱顶罐、内浮顶罐分析单元", "description": "燃油泄露风险", "level": 4}, + {"id": "0222ad5e-0668-4861-bd27-fac137cd7eb8", "name": "汽、柴油卸油分析单元", "description": "泄露风险", "level": 4}, + {"id": "02385672-2f50-488f-8b89-9cd0b98ccae6", "name": "含油污水处理分析单元", "description": "超标排放", "level": 4}, + {"id": "0253f566-b032-48ea-966e-2721dfe72208", "name": "拱顶罐、内浮顶罐分析单元", "description": "燃油泄露风险", "level": 4} + ], +} + +export const detail = { + "id": "1736bd5f-765e-4c4a-9786-8bc06a2134eb", + "name": "卸油作业分析单元", + "riskProbability": "可能", + "riskFactor": "泄漏、火灾、爆炸、憋压、中毒", + "affectConsequences": "泄漏、火灾、爆炸、憋压、中毒", + "level": 1, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "responsiblePersonId": "1fe37818-c849-4ba2-a53d-d440d1cbf983", + "responsiblePerson": "亓美枫", + "riskControlMeasures": "内外操每时进行巡检,记录操作数据", + "lastReviewDate": "2022-04-15 07:35:34", + "majorHazardSourcesId": "954e5e6f-91c5-46d1-a085-ad0e6cdae10c", + "majorHazardSourcesName": "氯气瓶仓库单元", + "personName": "亓美枫", + "phone": "15500692422", + "addr": "台西纬五路117号-1-3", + "remark": "台西纬五路117号-1-3", +} + +export const sepList = { + "3": [ + { + "id": "0055866e-cd54-40f3-8c92-d295f88cbec0", + "name": "裂解系统投料", + "operationLevel": 4, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "1、过热炉升温到 500C2、通压缩气3、通蒸汽 4、升温到 800C,投 F22", + "operationType": 6, + "operationStart": "2022-09-16", + "operationEnd": "2023-02-25", + "operationSite": "惠民街117号-19-2" + }, + { + "id": "01174267-461e-41f7-b513-41baff592cc0", + "name": "II级高处作业", + "operationLevel": 2, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "2m-15m的高处作业", + "operationType": 4, + "operationStart": "2022-08-11", + "operationEnd": "2023-01-06", + "operationSite": "西藏路76号-1-9" + }, + { + "id": "01d2fa28-5384-4e4f-8dcc-86ff3f0f8bd6", + "name": "换 CaC12", + "operationLevel": 2, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "1、开启 CaC12 循环 2、排 CaC12 到709 3、补CaC12", + "operationType": 7, + "operationStart": "2022-08-22", + "operationEnd": "2023-01-27", + "operationSite": "宁国三大厦98号-17-3" + }, + { + "id": "0272b134-ef77-4bd9-b0c0-1e085b551e61", + "name": "司炉岗位点火", + "operationLevel": 3, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "置换、抽盲板、燃烧炉点火、现场确认", + "operationType": 6, + "operationStart": "2022-09-22", + "operationEnd": "2023-02-16", + "operationSite": "台东四路76号-12-3" + }, + { + "id": "0d501d7b-f159-4e34-b5e6-dad5e466973f", + "name": "检测雨水管道泄漏点", + "operationLevel": 2, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "使用挖掘机和人工挖掘作业,挖掘深度1m.", + "operationType": 1, + "operationStart": "2022-03-25", + "operationEnd": "2023-02-06", + "operationSite": "济宁支街25号-5-9" + }, + { + "id": "13d7bde9-7b6e-4812-bef7-d74a102239d7", + "name": "烘干", + "operationLevel": 3, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "将物料运至烘箱开蒸汽、电加热、风机进行烘干", + "operationType": 8, + "operationStart": "2022-04-19", + "operationEnd": "2023-01-22", + "operationSite": "商河路16号-1-2" + }, + { + "id": "182187bf-f2eb-4f83-befa-0426f8bb2277", + "name": "临时用电作业", + "operationLevel": 1, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "厂区内的临时接电、用电作业", + "operationType": 9, + "operationStart": "2022-06-12", + "operationEnd": "2023-01-24", + "operationSite": "锦州街22号-9-3" + }, + { + "id": "1e83cec8-4606-4522-8e0a-0a745be6b7e4", + "name": "R32装置系统停车", + "operationLevel": 3, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "关闭计量系统、关闭反应釜蒸汽、关闭反应釜出料、关闭水碱洗系统、关闭精馏系统、关闭成品系统", + "operationType": 8, + "operationStart": "2022-06-10", + "operationEnd": "2023-02-26", + "operationSite": "港环路88号-7-9" + }, + { + "id": "263828b3-e3d2-4bc5-a7a3-f0a45c3fd796", + "name": "I级高处作业", + "operationLevel": 4, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "15m-30m的高处作业", + "operationType": 4, + "operationStart": "2022-03-10", + "operationEnd": "2023-02-18", + "operationSite": "南京广场145号-14-3" + }, + { + "id": "268951b7-b0f6-4469-b8b0-cbc171071bbd", + "name": "R32装置系统停车", + "operationLevel": 3, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "关闭计量系统、关闭反应釜蒸汽、关闭反应釜出料、关闭水碱洗系统、关闭精馏系统、关闭成品系统", + "operationType": 8, + "operationStart": "2022-09-15", + "operationEnd": "2023-02-14", + "operationSite": "长兴街81号-12-10" + }, + { + "id": "26ed0535-6a66-4f98-bd05-8b13cdf7e54d", + "name": "二级级动火", + "operationLevel": 3, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "除特级、一级动火作业之外的其他动火作业", + "operationType": 6, + "operationStart": "2022-10-05", + "operationEnd": "2023-01-17", + "operationSite": "辽北街103号-7-1" + }, + { + "id": "27cce8f1-99d6-4edd-a1eb-dd0fe7875dc9", + "name": "R32装置系统停车", + "operationLevel": 4, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "关闭计量系统、关闭反应釜蒸汽、关闭反应釜出料、关闭水碱洗系统、关闭精馏系统、关闭成品系统", + "operationType": 8, + "operationStart": "2022-05-26", + "operationEnd": "2023-01-28", + "operationSite": "莱阳街96号-5-4" + }, + { + "id": "30edb14a-bf8d-4406-8512-a94f64417ca0", + "name": "二、三级吊装", + "operationLevel": 3, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "100t 以下的吊装作业", + "operationType": 5, + "operationStart": "2022-12-04", + "operationEnd": "2023-02-22", + "operationSite": "吴县一街139号-9-4" + }, + { + "id": "312b9d7f-ad69-4c27-9eb8-67c2747a3324", + "name": "受限空间作业", + "operationLevel": 1, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "进入反应釜、储罐、水井等封闭和半封闭场所的作业", + "operationType": 3, + "operationStart": "2022-03-26", + "operationEnd": "2023-02-04", + "operationSite": "甘肃广场13号-7-7" + }, + { + "id": "37bd765b-7549-41ba-830f-1a6fd4ee146a", + "name": "受限空间作业", + "operationLevel": 1, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "进入反应釜、储罐、水井等封闭和半封闭场所的作业", + "operationType": 3, + "operationStart": "2022-10-05", + "operationEnd": "2023-02-03", + "operationSite": "闽江大厦61号-10-5" + }, + { + "id": "3a2ca18e-1f08-432d-bda3-4ea33a03852d", + "name": "设备检维修", + "operationLevel": 4, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "制定方案、检查现场、作业前准备、检维修作业、整理现场", + "operationType": 8, + "operationStart": "2022-05-28", + "operationEnd": "2023-02-04", + "operationSite": "屏东支路46号-11-3" + }, + { + "id": "3fae14d5-6dc4-420b-b6fe-9873cf7490d0", + "name": "II级高处作业", + "operationLevel": 1, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "2m-15m的高处作业", + "operationType": 4, + "operationStart": "2022-01-01", + "operationEnd": "2023-01-16", + "operationSite": "晓望街52号-13-1" + }, + { + "id": "429ca788-26f9-4080-ba42-d553a5f2bc25", + "name": "特级、一级动火", + "operationLevel": 1, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "在易燃易爆生产装置、输送管道.储罐、容器、管廊等场所装置上进行的动火的作业", + "operationType": 6, + "operationStart": "2022-09-11", + "operationEnd": "2023-02-14", + "operationSite": "莱阳街13号-13-1" + }, + { + "id": "42b2be23-cf27-4ffd-ba9d-105c92e7724f", + "name": "检测雨水管道泄漏点", + "operationLevel": 3, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "使用挖掘机和人工挖掘作业,挖掘深度1m.", + "operationType": 1, + "operationStart": "2022-06-10", + "operationEnd": "2023-01-22", + "operationSite": "菜市二路68号-10-2" + }, + { + "id": "42c060f5-b015-491b-92f6-775ba8715dd3", + "name": "二级级动火", + "operationLevel": 3, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "除特级、一级动火作业之外的其他动火作业", + "operationType": 6, + "operationStart": "2022-06-05", + "operationEnd": "2023-02-10", + "operationSite": "泉州街43号-1-6" + }, + { + "id": "4801a6a2-11c8-4370-951f-13e9d00b216e", + "name": "二级级动火", + "operationLevel": 4, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "除特级、一级动火作业之外的其他动火作业", + "operationType": 6, + "operationStart": "2022-10-24", + "operationEnd": "2023-02-08", + "operationSite": "黄海街121号-11-8" + }, + { + "id": "489d96f0-004c-4650-8e7d-64176f9281ca", + "name": "二、三级吊装", + "operationLevel": 4, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "100t 以下的吊装作业", + "operationType": 5, + "operationStart": "2022-05-05", + "operationEnd": "2023-02-06", + "operationSite": "兴安大厦133号-3-2" + }, + { + "id": "4c97c847-aa27-4c27-a610-9a7c8ffbe763", + "name": "设备检维修", + "operationLevel": 3, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "制定方案、检查现场、作业前准备、检维修作业、整理现场", + "operationType": 8, + "operationStart": "2022-04-18", + "operationEnd": "2023-02-16", + "operationSite": "华山路85号-18-7" + }, + { + "id": "517511da-6e0e-444b-8feb-c6759a461c44", + "name": "设备检维修", + "operationLevel": 1, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "制定方案、检查现场、作业前准备、检维修作业、整理现场", + "operationType": 8, + "operationStart": "2022-07-03", + "operationEnd": "2023-02-06", + "operationSite": "太平路82号-13-3" + }, + { + "id": "530a199c-ad67-493a-9a3a-93fed6ffa35e", + "name": "裂解系统投料", + "operationLevel": 3, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "1、过热炉升温到 500C2、通压缩气3、通蒸汽 4、升温到 800C,投 F22", + "operationType": 6, + "operationStart": "2022-04-22", + "operationEnd": "2023-02-12", + "operationSite": "华严路111号-11-6" + }, + { + "id": "548411df-ed1f-47cb-b5fb-bb7dd7d7a67e", + "name": "临时用电作业", + "operationLevel": 1, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "厂区内的临时接电、用电作业", + "operationType": 9, + "operationStart": "2022-05-12", + "operationEnd": "2023-01-10", + "operationSite": "吴县一街72号-12-10" + }, + { + "id": "5bfbb201-2812-4ae2-89a6-576092e7c04c", + "name": "盲板抽堵作业", + "operationLevel": 1, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "厂区内各管道上的盲板抽堵", + "operationType": 7, + "operationStart": "2022-03-06", + "operationEnd": "2023-02-01", + "operationSite": "郓城南路46号-17-10" + }, + { + "id": "5cade967-a0a0-4a36-b819-ff8080a4e38a", + "name": "IV级高处作业", + "operationLevel": 2, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "30m以上登高作业", + "operationType": 4, + "operationStart": "2022-09-29", + "operationEnd": "2023-01-06", + "operationSite": "寿光广场76号-13-8" + }, + { + "id": "5d57ad5f-0b5f-464e-94e8-e4c4f0939692", + "name": "盲板抽堵作业", + "operationLevel": 1, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "厂区内各管道上的盲板抽堵", + "operationType": 7, + "operationStart": "2022-01-15", + "operationEnd": "2023-02-19", + "operationSite": "莆田街67号-2-6" + }, + { + "id": "5fe1ea76-4b0e-4187-9093-92d65843745c", + "name": "动土作业", + "operationLevel": 4, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "动土深度 0.5m 以上的;可能对地下隐蔽设施产生影响的作业", + "operationType": 2, + "operationStart": "2022-08-20", + "operationEnd": "2023-01-09", + "operationSite": "河城大厦53号-9-8" + }, + { + "id": "617f9cf1-1439-460f-a528-5cb61299f8a9", + "name": "贮槽、计量槽检修", + "operationLevel": 1, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "清理槽内结壁、结块物、凝聚物,焊接处理漏点,更换附件,打压查漏", + "operationType": 8, + "operationStart": "2022-09-23", + "operationEnd": "2023-01-25", + "operationSite": "枣庄广场39号-4-10" + }, + { + "id": "66f5365f-3dbd-4348-b0e4-b1fa419a6331", + "name": "贮槽、计量槽检修", + "operationLevel": 2, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "清理槽内结壁、结块物、凝聚物,焊接处理漏点,更换附件,打压查漏", + "operationType": 8, + "operationStart": "2022-01-26", + "operationEnd": "2023-02-15", + "operationSite": "北京街66号-9-2" + }, + { + "id": "684d894b-5a8a-423b-bf03-5b4f5fc46bf2", + "name": "烘干", + "operationLevel": 3, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "将物料运至烘箱开蒸汽、电加热、风机进行烘干", + "operationType": 8, + "operationStart": "2022-05-06", + "operationEnd": "2023-02-12", + "operationSite": "瑞阳街107号-17-6" + }, + { + "id": "68ac876a-64b9-4f9e-8b62-316494c5209a", + "name": "IV级高处作业", + "operationLevel": 2, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "30m以上登高作业", + "operationType": 4, + "operationStart": "2022-05-21", + "operationEnd": "2023-01-26", + "operationSite": "费县路96号-4-5" + }, + { + "id": "714d571b-26d4-4282-9d22-461f6bc94dca", + "name": "盲板抽堵作业", + "operationLevel": 4, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "厂区内各管道上的盲板抽堵", + "operationType": 7, + "operationStart": "2022-12-12", + "operationEnd": "2023-02-27", + "operationSite": "漳州街二街32号-12-2" + }, + { + "id": "71dec23b-ab68-4555-9f03-b2c2f4de6b42", + "name": "临时用电作业", + "operationLevel": 1, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "厂区内的临时接电、用电作业", + "operationType": 9, + "operationStart": "2022-08-21", + "operationEnd": "2023-01-07", + "operationSite": "南通大厦56号-7-8" + }, + { + "id": "7d29b301-2464-44a0-9133-3e8b67da0dd2", + "name": "检测雨水管道泄漏点", + "operationLevel": 1, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "使用挖掘机和人工挖掘作业,挖掘深度1m.", + "operationType": 1, + "operationStart": "2022-07-14", + "operationEnd": "2023-01-12", + "operationSite": "台北路92号-17-10" + }, + { + "id": "7e141488-fe41-47e3-b504-e079bfa42d80", + "name": "IV级高处作业", + "operationLevel": 3, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "30m以上登高作业", + "operationType": 4, + "operationStart": "2022-02-18", + "operationEnd": "2023-02-16", + "operationSite": "惠民南路149号-8-9" + }, + { + "id": "7f19f6cf-d6de-431b-ace2-87615f916413", + "name": "设备检维修", + "operationLevel": 2, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "制定方案、检查现场、作业前准备、检维修作业、整理现场", + "operationType": 8, + "operationStart": "2022-11-27", + "operationEnd": "2023-01-10", + "operationSite": "人和路117号-6-7" + }, + { + "id": "80d29809-295a-40a8-8a74-14ad4c0426d0", + "name": "反应釜通氯气", + "operationLevel": 4, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "氯气瓶加压、通氯气、更换氯气瓶、更换氮气瓶", + "operationType": 7, + "operationStart": "2022-06-08", + "operationEnd": "2023-02-28", + "operationSite": "大港二路11号-18-9" + }, + { + "id": "81f52470-c455-463d-9281-075037709f91", + "name": "贮槽、计量槽检修", + "operationLevel": 4, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "清理槽内结壁、结块物、凝聚物,焊接处理漏点,更换附件,打压查漏", + "operationType": 8, + "operationStart": "2022-09-29", + "operationEnd": "2023-02-12", + "operationSite": "明月峡大厦51号-7-4" + }, + { + "id": "85bfa6a0-4f55-4804-aecd-a979080ccf70", + "name": "二、三级吊装", + "operationLevel": 2, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "100t 以下的吊装作业", + "operationType": 5, + "operationStart": "2022-04-28", + "operationEnd": "2023-01-26", + "operationSite": "长兴街56号-12-2" + }, + { + "id": "8f5f5507-004d-4567-8ba1-86b00a89f576", + "name": "二级级动火", + "operationLevel": 3, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "除特级、一级动火作业之外的其他动火作业", + "operationType": 6, + "operationStart": "2022-05-24", + "operationEnd": "2023-01-30", + "operationSite": "泰山支路116号-20-9" + }, + { + "id": "909f5e50-aa59-42cb-90a0-3971f6f49435", + "name": "动土作业", + "operationLevel": 3, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "动土深度 0.5m 以上的;可能对地下隐蔽设施产生影响的作业", + "operationType": 2, + "operationStart": "2022-02-25", + "operationEnd": "2023-02-23", + "operationSite": "天台二路25号-16-4" + }, + { + "id": "96892143-34f3-4228-bdae-8ba925f7eac6", + "name": "烘干", + "operationLevel": 3, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "将物料运至烘箱开蒸汽、电加热、风机进行烘干", + "operationType": 8, + "operationStart": "2022-04-08", + "operationEnd": "2023-03-01", + "operationSite": "延吉街19号-19-6" + }, + { + "id": "9717eae6-9d37-44f7-8d5e-2ec5be41376c", + "name": "司炉岗位点火", + "operationLevel": 1, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "置换、抽盲板、燃烧炉点火、现场确认", + "operationType": 6, + "operationStart": "2022-05-17", + "operationEnd": "2023-01-02", + "operationSite": "安邱街135号-3-4" + }, + { + "id": "9734f4c9-9e55-4496-8ed0-77dd8ef8f454", + "name": "盲板抽堵作业", + "operationLevel": 3, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "厂区内各管道上的盲板抽堵", + "operationType": 7, + "operationStart": "2022-06-14", + "operationEnd": "2023-01-06", + "operationSite": "宁夏路21号-13-7" + }, + { + "id": "9cc23ddd-edd0-4baf-a7e3-2803ebd96e3a", + "name": "特级、一级动火", + "operationLevel": 3, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "在易燃易爆生产装置、输送管道.储罐、容器、管廊等场所装置上进行的动火的作业", + "operationType": 6, + "operationStart": "2022-07-09", + "operationEnd": "2023-01-22", + "operationSite": "大学广场142号-8-9" + }, + { + "id": "a99f11dd-a3a3-4bce-b1f2-e2fa651ab282", + "name": "I级高处作业", + "operationLevel": 1, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "15m-30m的高处作业", + "operationType": 4, + "operationStart": "2022-08-07", + "operationEnd": "2023-02-21", + "operationSite": "仙游路97号-3-3" + }, + { + "id": "b4141110-830b-4975-b5b1-3746eb451b9b", + "name": "特级、一级动火", + "operationLevel": 3, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "在易燃易爆生产装置、输送管道.储罐、容器、管廊等场所装置上进行的动火的作业", + "operationType": 6, + "operationStart": "2022-04-16", + "operationEnd": "2023-01-02", + "operationSite": "宁国路92号-14-7" + }, + { + "id": "b478de94-93d3-448f-8b0b-30446882095a", + "name": "IV级高处作业", + "operationLevel": 4, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "30m以上登高作业", + "operationType": 4, + "operationStart": "2022-01-21", + "operationEnd": "2023-02-08", + "operationSite": "济南街65号-16-6" + }, + { + "id": "b52052df-7034-4f5b-8f25-5b44193785ca", + "name": "换 CaC12", + "operationLevel": 4, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "1、开启 CaC12 循环 2、排 CaC12 到709 3、补CaC12", + "operationType": 7, + "operationStart": "2022-08-25", + "operationEnd": "2023-01-14", + "operationSite": "泰州四路98号-19-10" + }, + { + "id": "b6d021a4-5e0f-4da4-81e1-37ba0d04710f", + "name": "反应釜通氯气", + "operationLevel": 4, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "氯气瓶加压、通氯气、更换氯气瓶、更换氮气瓶", + "operationType": 7, + "operationStart": "2022-07-29", + "operationEnd": "2023-02-14", + "operationSite": "延吉街129号-14-7" + }, + { + "id": "b70a2bbe-c867-46bc-95dd-6771eb4c5b60", + "name": "特级、一级动火", + "operationLevel": 2, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "在易燃易爆生产装置、输送管道.储罐、容器、管廊等场所装置上进行的动火的作业", + "operationType": 6, + "operationStart": "2022-01-12", + "operationEnd": "2023-02-21", + "operationSite": "屏东支路23号-13-1" + }, + { + "id": "bb1e64fb-e6b7-4976-8522-8c8936d1d8e7", + "name": "二、三级吊装", + "operationLevel": 4, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "100t 以下的吊装作业", + "operationType": 5, + "operationStart": "2022-10-05", + "operationEnd": "2023-02-23", + "operationSite": "西康街85号-19-4" + }, + { + "id": "c3418aa9-0bc9-4ff9-b96f-9db3cf94cb6a", + "name": "司炉岗位点火", + "operationLevel": 3, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "置换、抽盲板、燃烧炉点火、现场确认", + "operationType": 6, + "operationStart": "2022-02-06", + "operationEnd": "2023-02-11", + "operationSite": "长春街83号-3-3" + }, + { + "id": "cc186602-6bff-4fc8-8119-8848c4948e2a", + "name": "烘干", + "operationLevel": 3, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "将物料运至烘箱开蒸汽、电加热、风机进行烘干", + "operationType": 8, + "operationStart": "2022-05-09", + "operationEnd": "2023-02-04", + "operationSite": "福寺大厦61号-4-2" + }, + { + "id": "d9c0b381-425e-413f-8f57-7b3b41d4bd6d", + "name": "动土作业", + "operationLevel": 3, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "动土深度 0.5m 以上的;可能对地下隐蔽设施产生影响的作业", + "operationType": 2, + "operationStart": "2022-11-17", + "operationEnd": "2023-01-18", + "operationSite": "虹桥广场107号-11-3" + }, + { + "id": "d9dfd6a6-2b44-445a-b41b-9176fba97f3c", + "name": "R32装置系统停车", + "operationLevel": 2, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "关闭计量系统、关闭反应釜蒸汽、关闭反应釜出料、关闭水碱洗系统、关闭精馏系统、关闭成品系统", + "operationType": 8, + "operationStart": "2022-12-30", + "operationEnd": "2023-01-07", + "operationSite": "咸阳支街124号-7-5" + }, + { + "id": "db38cdbe-cee6-4210-8fbb-bd50132a7822", + "name": "裂解系统投料", + "operationLevel": 1, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "1、过热炉升温到 500C2、通压缩气3、通蒸汽 4、升温到 800C,投 F22", + "operationType": 6, + "operationStart": "2022-04-30", + "operationEnd": "2023-01-04", + "operationSite": "瑞阳街73号-18-5" + }, + { + "id": "e07185a1-73d9-4ff7-b9b7-c30f6c5d68ca", + "name": "动土作业", + "operationLevel": 3, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "动土深度 0.5m 以上的;可能对地下隐蔽设施产生影响的作业", + "operationType": 2, + "operationStart": "2022-01-27", + "operationEnd": "2023-01-18", + "operationSite": "礼阳路148号-4-9" + }, + { + "id": "e21997f1-4a94-4dba-a9c9-a333f377c08c", + "name": "盲板抽堵作业", + "operationLevel": 1, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "厂区内各管道上的盲板抽堵", + "operationType": 7, + "operationStart": "2022-05-03", + "operationEnd": "2023-02-14", + "operationSite": "小港一大厦127号-5-8" + }, + { + "id": "e3f18e67-cc31-4331-9807-1df028172023", + "name": "受限空间作业", + "operationLevel": 4, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "进入反应釜、储罐、水井等封闭和半封闭场所的作业", + "operationType": 3, + "operationStart": "2022-08-09", + "operationEnd": "2023-01-08", + "operationSite": "仙山街102号-19-3" + }, + { + "id": "e49377c5-f847-438b-82fa-b4c2fb647d2e", + "name": "设备检维修", + "operationLevel": 4, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "制定方案、检查现场、作业前准备、检维修作业、整理现场", + "operationType": 8, + "operationStart": "2022-09-11", + "operationEnd": "2023-01-30", + "operationSite": "阳谷广场125号-16-6" + }, + { + "id": "e665a6c6-2467-4f89-b038-0f6c83f1a9b6", + "name": "贮槽、计量槽检修", + "operationLevel": 1, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "清理槽内结壁、结块物、凝聚物,焊接处理漏点,更换附件,打压查漏", + "operationType": 8, + "operationStart": "2022-01-24", + "operationEnd": "2023-02-15", + "operationSite": "顺兴街108号-17-8" + }, + { + "id": "e6dd4cc7-ad01-478f-800e-25147d741732", + "name": "换 CaC12", + "operationLevel": 2, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "1、开启 CaC12 循环 2、排 CaC12 到709 3、补CaC12", + "operationType": 7, + "operationStart": "2022-07-26", + "operationEnd": "2023-01-13", + "operationSite": "南平广场114号-12-2" + }, + { + "id": "eb8f664d-b719-46e7-87bb-7175f40f3f38", + "name": "司炉岗位点火", + "operationLevel": 3, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "置换、抽盲板、燃烧炉点火、现场确认", + "operationType": 6, + "operationStart": "2022-02-22", + "operationEnd": "2023-02-24", + "operationSite": "无棣四路53号-3-4" + }, + { + "id": "edb7fd4e-16ac-41e0-8254-181921f0c7e6", + "name": "IV级高处作业", + "operationLevel": 1, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "30m以上登高作业", + "operationType": 4, + "operationStart": "2022-02-26", + "operationEnd": "2023-01-04", + "operationSite": "吴县二大厦94号-11-6" + }, + { + "id": "ee9cbb0d-6642-4485-9fa6-a0ce6ae51414", + "name": "换 CaC12", + "operationLevel": 4, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "1、开启 CaC12 循环 2、排 CaC12 到709 3、补CaC12", + "operationType": 7, + "operationStart": "2022-11-05", + "operationEnd": "2023-01-04", + "operationSite": "安徽路130号-5-9" + }, + { + "id": "eed0b0a4-7604-4168-aaa2-6a0aab9e6234", + "name": "反应釜通氯气", + "operationLevel": 2, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "氯气瓶加压、通氯气、更换氯气瓶、更换氮气瓶", + "operationType": 7, + "operationStart": "2022-05-21", + "operationEnd": "2023-01-29", + "operationSite": "嫩江广场56号-6-9" + }, + { + "id": "eedaed29-966f-4e08-a175-44bd8fa731b7", + "name": "换 CaC12", + "operationLevel": 2, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "1、开启 CaC12 循环 2、排 CaC12 到709 3、补CaC12", + "operationType": 7, + "operationStart": "2022-04-29", + "operationEnd": "2023-01-30", + "operationSite": "单县路124号-17-10" + }, + { + "id": "f0e24a67-5141-48a0-9a07-3dba3b0a30da", + "name": "II级高处作业", + "operationLevel": 4, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "2m-15m的高处作业", + "operationType": 4, + "operationStart": "2022-10-22", + "operationEnd": "2023-02-07", + "operationSite": "郓城北广场115号-17-6" + }, + { + "id": "f1f200ed-c448-4b49-b48e-5b4fecafe761", + "name": "特级、一级动火", + "operationLevel": 1, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "在易燃易爆生产装置、输送管道.储罐、容器、管廊等场所装置上进行的动火的作业", + "operationType": 6, + "operationStart": "2022-08-26", + "operationEnd": "2023-01-18", + "operationSite": "太平路148号-4-6" + }, + { + "id": "f6ca5b3e-e4c8-4868-a9df-02a78a33a837", + "name": "反应釜通氯气", + "operationLevel": 4, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "氯气瓶加压、通氯气、更换氯气瓶、更换氮气瓶", + "operationType": 7, + "operationStart": "2022-06-07", + "operationEnd": "2023-02-07", + "operationSite": "新湛一路88号-5-10" + }, + { + "id": "f90144c9-7400-49e9-8c69-189f07dfe975", + "name": "受限空间作业", + "operationLevel": 3, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "进入反应釜、储罐、水井等封闭和半封闭场所的作业", + "operationType": 3, + "operationStart": "2022-06-19", + "operationEnd": "2023-01-29", + "operationSite": "城武支大厦130号-4-4" + }, + { + "id": "fc5e3ce6-9914-4e88-9694-2147fd23feb5", + "name": "贮槽、计量槽检修", + "operationLevel": 4, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "清理槽内结壁、结块物、凝聚物,焊接处理漏点,更换附件,打压查漏", + "operationType": 8, + "operationStart": "2022-12-13", + "operationEnd": "2023-01-05", + "operationSite": "艳阳街93号-15-4" + }, + { + "id": "ff542a98-4e11-4a80-95ff-df2b62765451", + "name": "二级级动火", + "operationLevel": 3, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "除特级、一级动火作业之外的其他动火作业", + "operationType": 6, + "operationStart": "2022-01-12", + "operationEnd": "2023-01-25", + "operationSite": "宁国一大厦89号-1-9" + } + ], + "2": [ + { + "id": "0c12b09d-655d-4baf-aac9-7d286796deeb", + "name": "R32装置系统停车", + "operationLevel": 1, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "关闭计量系统、关闭反应釜蒸汽、关闭反应釜出料、关闭水碱洗系统、关闭精馏系统、关闭成品系统", + "operationType": 8, + "operationStart": "2023-01-21", + "operationEnd": "2024-01-05", + "operationSite": "茌平路86号-7-7" + }, + { + "id": "257ba497-de19-4c87-92fd-f9a69685cc50", + "name": "检测雨水管道泄漏点", + "operationLevel": 3, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "使用挖掘机和人工挖掘作业,挖掘深度1m.", + "operationType": 1, + "operationStart": "2023-01-13", + "operationEnd": "2024-01-18", + "operationSite": "泰州二路63号-7-9" + }, + { + "id": "5dda733e-6a3d-42ce-926a-6d3018b83b57", + "name": "烘干", + "operationLevel": 4, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "将物料运至烘箱开蒸汽、电加热、风机进行烘干", + "operationType": 8, + "operationStart": "2022-10-17", + "operationEnd": "2024-02-05", + "operationSite": "白沙河路63号-4-10" + }, + { + "id": "5e968c53-b907-4c4f-a618-550d554a78bb", + "name": "二级级动火", + "operationLevel": 3, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "除特级、一级动火作业之外的其他动火作业", + "operationType": 6, + "operationStart": "2023-01-29", + "operationEnd": "2024-01-02", + "operationSite": "瑞云街113号-5-7" + }, + { + "id": "67296601-79fa-44b7-950f-c108d2d8289e", + "name": "临时用电作业", + "operationLevel": 1, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "厂区内的临时接电、用电作业", + "operationType": 9, + "operationStart": "2023-01-31", + "operationEnd": "2024-02-05", + "operationSite": "龙羊峡路13号-8-1" + }, + { + "id": "68a97c6e-2a21-423d-a89d-fc87706506d1", + "name": "IV级高处作业", + "operationLevel": 4, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "30m以上登高作业", + "operationType": 4, + "operationStart": "2022-11-17", + "operationEnd": "2024-01-17", + "operationSite": "团岛路33号-2-1" + }, + { + "id": "983068d2-4810-4492-b84e-6aef4945e306", + "name": "动土作业", + "operationLevel": 3, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "动土深度 0.5m 以上的;可能对地下隐蔽设施产生影响的作业", + "operationType": 2, + "operationStart": "2022-07-25", + "operationEnd": "2024-02-28", + "operationSite": "山城广场135号-19-10" + }, + { + "id": "9bc2db1a-23b7-4b00-a090-d0a477a07034", + "name": "反应釜通氯气", + "operationLevel": 1, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "氯气瓶加压、通氯气、更换氯气瓶、更换氮气瓶", + "operationType": 7, + "operationStart": "2022-06-30", + "operationEnd": "2024-01-22", + "operationSite": "棣纬二大厦129号-15-8" + }, + { + "id": "a1fd3234-2ada-44fc-a226-f530d958ca4d", + "name": "II级高处作业", + "operationLevel": 3, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "2m-15m的高处作业", + "operationType": 4, + "operationStart": "2022-09-10", + "operationEnd": "2024-01-09", + "operationSite": "广西支街17号-18-1" + }, + { + "id": "a3dc31ec-3ce4-41f7-aa11-d5604ea2e0b3", + "name": "II级高处作业", + "operationLevel": 4, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "2m-15m的高处作业", + "operationType": 4, + "operationStart": "2022-10-17", + "operationEnd": "2024-02-07", + "operationSite": "台东东七广场129号-14-6" + }, + { + "id": "a3e86d7e-62b5-4387-8afd-9341fba77d95", + "name": "裂解系统投料", + "operationLevel": 1, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "1、过热炉升温到 500C2、通压缩气3、通蒸汽 4、升温到 800C,投 F22", + "operationType": 6, + "operationStart": "2022-08-05", + "operationEnd": "2024-01-27", + "operationSite": "六码头80号-3-1" + }, + { + "id": "a92b2b7c-98ce-4479-8f62-3ec32d8ebee1", + "name": "动土作业", + "operationLevel": 3, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "动土深度 0.5m 以上的;可能对地下隐蔽设施产生影响的作业", + "operationType": 2, + "operationStart": "2022-11-17", + "operationEnd": "2024-01-23", + "operationSite": "瑞金广场124号-18-4" + }, + { + "id": "ab78ff0c-121d-4d6a-8a5e-89e3689c15dc", + "name": "受限空间作业", + "operationLevel": 2, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "进入反应釜、储罐、水井等封闭和半封闭场所的作业", + "operationType": 3, + "operationStart": "2023-04-24", + "operationEnd": "2024-02-12", + "operationSite": "高密路34号-9-10" + }, + { + "id": "b71bff70-1830-4f22-80f0-75d3ad581b83", + "name": "换 CaC12", + "operationLevel": 2, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "1、开启 CaC12 循环 2、排 CaC12 到709 3、补CaC12", + "operationType": 7, + "operationStart": "2022-10-27", + "operationEnd": "2024-02-02", + "operationSite": "十梅庵街146号-4-4" + }, + { + "id": "be835f1b-288d-40fa-bd56-213c66e69510", + "name": "I级高处作业", + "operationLevel": 2, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "15m-30m的高处作业", + "operationType": 4, + "operationStart": "2022-12-02", + "operationEnd": "2024-02-24", + "operationSite": "范县路79号-3-4" + }, + { + "id": "c1ab0efd-9715-472b-a774-3974402d7b39", + "name": "检测雨水管道泄漏点", + "operationLevel": 2, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "使用挖掘机和人工挖掘作业,挖掘深度1m.", + "operationType": 1, + "operationStart": "2022-07-24", + "operationEnd": "2024-02-08", + "operationSite": "万寿路72号-20-9" + }, + { + "id": "c34e3d3f-5a44-4442-9d10-e2206d0a5482", + "name": "烘干", + "operationLevel": 4, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "将物料运至烘箱开蒸汽、电加热、风机进行烘干", + "operationType": 8, + "operationStart": "2022-04-07", + "operationEnd": "2024-02-25", + "operationSite": "隆德广场29号-9-6" + }, + { + "id": "c5113029-eaec-4318-9fb4-0e85775d3860", + "name": "二、三级吊装", + "operationLevel": 3, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "100t 以下的吊装作业", + "operationType": 5, + "operationStart": "2022-05-24", + "operationEnd": "2024-02-20", + "operationSite": "钜野广场26号-10-8" + }, + { + "id": "cb75beee-2adc-4f87-9302-050643a2eb1e", + "name": "I级高处作业", + "operationLevel": 2, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "15m-30m的高处作业", + "operationType": 4, + "operationStart": "2022-11-04", + "operationEnd": "2024-01-27", + "operationSite": "延吉街103号-12-1" + }, + { + "id": "cf689702-51bb-4cf6-b828-af0d955dee55", + "name": "I级高处作业", + "operationLevel": 4, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "15m-30m的高处作业", + "operationType": 4, + "operationStart": "2022-07-24", + "operationEnd": "2024-03-02", + "operationSite": "台西纬二路14号-3-6" + }, + { + "id": "cff72cd4-aaca-47d5-84ab-3839b3452931", + "name": "特级、一级动火", + "operationLevel": 1, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "在易燃易爆生产装置、输送管道.储罐、容器、管廊等场所装置上进行的动火的作业", + "operationType": 6, + "operationStart": "2022-05-16", + "operationEnd": "2024-02-26", + "operationSite": "国城路88号-12-8" + }, + { + "id": "d40c7f8e-3326-428b-a235-02240a91c063", + "name": "设备检维修", + "operationLevel": 2, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "制定方案、检查现场、作业前准备、检维修作业、整理现场", + "operationType": 8, + "operationStart": "2022-08-16", + "operationEnd": "2024-01-02", + "operationSite": "观城路60号-3-4" + }, + { + "id": "d4a76336-291c-4817-8eff-ce170c1a7c15", + "name": "临时用电作业", + "operationLevel": 1, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "厂区内的临时接电、用电作业", + "operationType": 9, + "operationStart": "2023-01-31", + "operationEnd": "2024-02-05", + "operationSite": "龙羊峡路13号-8-1" + }, + { + "id": "d7ed2b42-4d11-4a21-b902-e0e6d27c8f51", + "name": "裂解系统投料", + "operationLevel": 1, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "1、过热炉升温到 500C2、通压缩气3、通蒸汽 4、升温到 800C,投 F22", + "operationType": 6, + "operationStart": "2022-06-18", + "operationEnd": "2024-02-16", + "operationSite": "乐陵街44号-3-7" + }, + { + "id": "d7fe1a2c-ac96-4c50-a863-d74532694b5c", + "name": "反应釜通氯气", + "operationLevel": 4, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "氯气瓶加压、通氯气、更换氯气瓶、更换氮气瓶", + "operationType": 7, + "operationStart": "2022-01-29", + "operationEnd": "2024-04-01", + "operationSite": "西陵峡街29号-9-2" + } + ], + "1": [ + { + "id": "03cde8f0-140e-48d6-9d78-92cd7dfab33e", + "name": "司炉岗位点火", + "operationLevel": 1, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "置换、抽盲板、燃烧炉点火、现场确认", + "operationType": 6, + "operationStart": "2023-08-29", + "operationEnd": "2024-02-10", + "operationSite": "郧阳路115号-9-2" + }, + { + "id": "0fe7d3ac-fed7-4d97-917f-ffcb65073dd7", + "name": "受限空间作业", + "operationLevel": 4, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "进入反应釜、储罐、水井等封闭和半封闭场所的作业", + "operationType": 3, + "operationStart": "2023-09-21", + "operationEnd": "2024-01-28", + "operationSite": "巢湖街57号-11-4" + }, + { + "id": "24e80cb3-df39-4b52-85e4-6dd35a64fadf", + "name": "临时用电作业", + "operationLevel": 4, + "enterpriseId": "1", + "enterprise": "中煤陕西榆林能源化工有限公司", + "operationContent": "厂区内的临时接电、用电作业", + "operationType": 9, + "operationStart": "2023-07-31", + "operationEnd": "2024-01-06", + "operationSite": "昌平街27号-1-6" + }, + { + "id": "25daee70-b9a1-4c98-81e2-e24c7224688c", + "name": "临时用电作业", + "operationLevel": 1, + "enterpriseId": "4", + "enterprise": "液化空气(榆林)有限公司", + "operationContent": "厂区内的临时接电、用电作业", + "operationType": 9, + "operationStart": "2023-08-10", + "operationEnd": "2024-03-01", + "operationSite": "龙山路68号-8-4" + }, + { + "id": "37099c58-ed1b-49cc-810f-b3bca5666f96", + "name": "司炉岗位点火", + "operationLevel": 4, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "置换、抽盲板、燃烧炉点火、现场确认", + "operationType": 6, + "operationStart": "2023-12-11", + "operationEnd": "2024-01-17", + "operationSite": "湛山四大厦84号-16-7" + }, + { + "id": "5358cd0c-f473-4b37-b8c3-d81082ad1897", + "name": "检测雨水管道泄漏点", + "operationLevel": 1, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "使用挖掘机和人工挖掘作业,挖掘深度1m.", + "operationType": 1, + "operationStart": "2023-10-01", + "operationEnd": "2024-01-20", + "operationSite": "礼阳路100号-12-8" + }, + { + "id": "6a155c0e-d692-4833-a18c-4a7400b3aa4c", + "name": "II级高处作业", + "operationLevel": 2, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "2m-15m的高处作业", + "operationType": 4, + "operationStart": "2023-11-11", + "operationEnd": "2024-01-21", + "operationSite": "天台路100号-10-7" + }, + { + "id": "70c3a18f-dede-4fd2-bcdd-b909620c1870", + "name": "裂解系统投料", + "operationLevel": 3, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "operationContent": "1、过热炉升温到 500C2、通压缩气3、通蒸汽 4、升温到 800C,投 F22", + "operationType": 6, + "operationStart": "2023-10-31", + "operationEnd": "2024-02-20", + "operationSite": "新田路69号-1-8" + }, + { + "id": "73f81d12-f81b-41d2-beed-f3c570e1dd99", + "name": "R32装置系统停车", + "operationLevel": 2, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "关闭计量系统、关闭反应釜蒸汽、关闭反应釜出料、关闭水碱洗系统、关闭精馏系统、关闭成品系统", + "operationType": 8, + "operationStart": "2023-05-17", + "operationEnd": "2024-03-01", + "operationSite": "大成大厦127号-10-6" + }, + { + "id": "7c00d36e-41a9-493c-8af3-d577275abdf7", + "name": "I级高处作业", + "operationLevel": 3, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "15m-30m的高处作业", + "operationType": 4, + "operationStart": "2023-09-24", + "operationEnd": "2024-01-28", + "operationSite": "西陵峡三路128号-12-4" + }, + { + "id": "87da5769-4ae6-4c90-80b7-7a2e4037f630", + "name": "二、三级吊装", + "operationLevel": 4, + "enterpriseId": "3", + "enterprise": "陕西延长石油榆林凯越煤化有限责任公司", + "operationContent": "100t 以下的吊装作业", + "operationType": 5, + "operationStart": "2023-12-27", + "operationEnd": "2024-01-19", + "operationSite": "咸阳支街37号-4-1" + }, + { + "id": "9cb6e2b7-840f-488c-a2b1-4df0517e943c", + "name": "贮槽、计量槽检修", + "operationLevel": 4, + "enterpriseId": "2", + "enterprise": "陕西延长石油榆林煤化有限公司", + "operationContent": "清理槽内结壁、结块物、凝聚物,焊接处理漏点,更换附件,打压查漏", + "operationType": 8, + "operationStart": "2023-10-20", + "operationEnd": "2024-01-23", + "operationSite": "阳信路84号-4-9" + }, + { + "id": "aff076a6-8b12-4739-99b4-3aaf77bc6f00", + "name": "盲板抽堵作业", + "operationLevel": 2, + "enterpriseId": "5", + "enterprise": "榆林洪宇环保再生资源有限公司", + "operationContent": "厂区内各管道上的盲板抽堵", + "operationType": 7, + "operationStart": "2023-08-14", + "operationEnd": "2024-02-25", + "operationSite": "港华大厦77号-2-8" + } + ] +} + +export const hiddenDangerList = [ + { + "id": "0045fde2-0cd7-4adc-8d97-536c920f6717", + "name": "批控器无浪涌保护器", + "reformStatus": 1, + "exceedTimeLimitStatus": 0 + }, + { + "id": "009cc4c3-ce2b-4d4d-bb4a-5c6e13170f04", + "name": "稳压系统无法自启动", + "reformStatus": 1, + "exceedTimeLimitStatus": 0 + }, + { + "id": "013e5bdd-9229-467e-9e17-31b0e3ac64aa", + "name": "TD202罐", + "reformStatus": 1, + "exceedTimeLimitStatus": 0 + }, + { + "id": "01564c82-4829-41b0-b27c-653cee15398a", + "name": "管线掉漆", + "reformStatus": 1, + "exceedTimeLimitStatus": 0 + }, + { + "id": "016d8287-daa5-40dc-b048-6f1533f113cc", + "name": "发车台3号位电机风扇破损", + "reformStatus": 1, + "exceedTimeLimitStatus": 0 + }, + { + "id": "02062c51-4e1b-49f5-8ffc-59a4388dd88a", + "name": "临时气瓶暂存场所可燃气故障,无法正常报警", + "reformStatus": 1, + "exceedTimeLimitStatus": 0 + }, + { + "id": "1d2a4081-b284-4d1b-bcc1-d2958bfb8a41", + "name": "库区至大门摄像头无法显示", + "reformStatus": 1, + "exceedTimeLimitStatus": 0 + }, + { + "id": "1d306063-a507-419b-938b-0104ccb263b7", + "name": "临时气瓶暂存场所可燃气故障,无法正常报警", + "reformStatus": 1, + "exceedTimeLimitStatus": 0 + }, + { + "id": "1db948d6-b24a-42c0-abc8-d1ff710aa03d", + "name": "润滑油乳化需更换", + "reformStatus": 1, + "exceedTimeLimitStatus": 0 + }, + { + "id": "1de43d60-30cc-4efd-9ba3-00d3e216b3de", + "name": "批控器无浪涌保护器", + "reformStatus": 1, + "exceedTimeLimitStatus": 0 + }, + { + "id": "1ec4fd87-be1a-4efc-8aad-49b0181023bb", + "name": "封堵机房穿线孔", + "reformStatus": 1, + "exceedTimeLimitStatus": 0 + }, + { + "id": "1f940431-c14d-416d-b4ab-e2781632d2a1", + "name": "稳压系统无法自启动", + "reformStatus": 1, + "exceedTimeLimitStatus": 0 + }, + { + "id": "203d1918-b05a-443b-ab3d-bf34b0854ea2", + "name": "消防泵房清水回流管线", + "reformStatus": 1, + "exceedTimeLimitStatus": 0 + },{ + "id": "00a2bb18-4f2c-43a7-8834-91cf9ab8e131", + "name": "发车台3号位电机风扇破损", + "reformStatus": 2, + "exceedTimeLimitStatus": 0 + }, + { + "id": "01241c43-1d92-4926-92ca-dd7516688f3a", + "name": "码头宽带故障", + "reformStatus": 2, + "exceedTimeLimitStatus": 0 + }, + { + "id": "01579e71-f901-401a-a9d5-aae10d16ec58", + "name": "地埋自来水管线渗漏", + "reformStatus": 2, + "exceedTimeLimitStatus": 0 + }, + { + "id": "01f95bbd-5d57-48fb-9eae-376088029da0", + "name": "码头宽带故障", + "reformStatus": 2, + "exceedTimeLimitStatus": 0 + }, + { + "id": "0250ea86-9891-4c93-92e6-958f03d50f47", + "name": "消防控制柜继电器异常", + "reformStatus": 2, + "exceedTimeLimitStatus": 0 + }, + { + "id": "02531447-5add-4221-af62-1e848d6e3121", + "name": "消防控制柜继电器异常", + "reformStatus": 2, + "exceedTimeLimitStatus": 0 + }, + { + "id": "02641dea-957e-4ca4-b9c2-905ea0b9aaf1", + "name": "码头能见度度仪故障", + "reformStatus": 2, + "exceedTimeLimitStatus": 0 + }, + { + "id": "03231ad7-c20f-4970-8b24-aac92dfb5d4e", + "name": "管线掉漆", + "reformStatus": 2, + "exceedTimeLimitStatus": 0 + }, + { + "id": "03302bcb-dc2e-4bc9-9729-a172a638a2f2", + "name": "码头能见度度仪故障", + "reformStatus": 2, + "exceedTimeLimitStatus": 0 + }, + { + "id": "03f63d69-c4db-49b3-8c57-2d0cf542ed9e", + "name": "TD202罐", + "reformStatus": 2, + "exceedTimeLimitStatus": 0 + }, + { + "id": "0400eb18-6d40-4148-b225-c9295f9b7330", + "name": "TD202罐", + "reformStatus": 2, + "exceedTimeLimitStatus": 0 + }, + { + "id": "042082c5-0728-4768-9473-33391fb7608a", + "name": "消防控制柜继电器异常", + "reformStatus": 2, + "exceedTimeLimitStatus": 0 + },{ + "id": "0083b5c7-3883-4667-9cbc-9bc4d59cdbfb", + "name": "润滑油乳化需更换", + "reformStatus": 3, + "exceedTimeLimitStatus": 0 + }, + { + "id": "00b351ad-c047-45d5-a8e6-2a85b764e6ff", + "name": "TD202罐", + "reformStatus": 3, + "exceedTimeLimitStatus": 0 + }, + { + "id": "00bd4fec-4fb1-4dd1-8e07-0eda2b4692ca", + "name": "TD202罐", + "reformStatus": 3, + "exceedTimeLimitStatus": 0 + }, + { + "id": "02928982-054e-4093-a146-24f3a9a630b1", + "name": "TD202罐", + "reformStatus": 3, + "exceedTimeLimitStatus": 0 + }, + { + "id": "03c36cec-512a-46f1-a7ca-1eb4f909141a", + "name": "路灯空开不匹配", + "reformStatus": 3, + "exceedTimeLimitStatus": 0 + }, + { + "id": "03fc1d67-e65f-405c-95e8-73ace929ba11", + "name": "清水柴油泵无法启动", + "reformStatus": 3, + "exceedTimeLimitStatus": 0 + }, + { + "id": "051c37d5-4f99-47aa-a297-bab2a6b1819d", + "name": "码头能见度度仪故障", + "reformStatus": 3, + "exceedTimeLimitStatus": 0 + }, + { + "id": "05ed21ac-3a71-40f2-b21f-fb0ce790cfb3", + "name": "TD202罐", + "reformStatus": 3, + "exceedTimeLimitStatus": 0 + }, + { + "id": "060a4d16-afdb-4a7a-9930-a6467d3ed674", + "name": "人体静电释放器缺电", + "reformStatus": 3, + "exceedTimeLimitStatus": 0 + }, + { + "id": "071ec5f6-1241-4eed-bc38-c44cef18e28c", + "name": "润滑油乳化需更换", + "reformStatus": 3, + "exceedTimeLimitStatus": 0 + }, + { + "id": "08b8f0bb-d5c5-44e6-bef3-e147a985e594", + "name": "封堵机房穿线孔", + "reformStatus": 3, + "exceedTimeLimitStatus": 0 + },{ + "id": "000a42c8-c6af-4652-bc10-3070e8ee315a", + "name": "灭火器欠压", + "reformStatus": 4, + "exceedTimeLimitStatus": 0 + }, + { + "id": "01e53f91-c27e-4c4e-966f-9a7f58d2d7f9", + "name": "发车台3号位电机风扇破损", + "reformStatus": 4, + "exceedTimeLimitStatus": 0 + }, + { + "id": "02645bad-14c6-401c-931b-1efcd5a86638", + "name": "管线掉漆", + "reformStatus": 4, + "exceedTimeLimitStatus": 0 + }, + { + "id": "026f837f-279c-48b0-ae8f-be4d3c63c61b", + "name": "地埋自来水管线渗漏", + "reformStatus": 4, + "exceedTimeLimitStatus": 0 + }, + { + "id": "02eb41a1-0daa-48ed-a249-ea7a01d65f44", + "name": "发车台3号位电机风扇破损", + "reformStatus": 4, + "exceedTimeLimitStatus": 0 + }, + { + "id": "03c616d5-6c4c-42a6-bc97-3a21f1bfa256", + "name": "封堵机房穿线孔", + "reformStatus": 4, + "exceedTimeLimitStatus": 0 + }, + { + "id": "04935307-3ee9-46cc-9406-8dbb64397c73", + "name": "封堵机房穿线孔", + "reformStatus": 4, + "exceedTimeLimitStatus": 0 + }, + { + "id": "04b35486-4d76-4b7c-b18d-17a3aa852e56", + "name": "码头宽带故障", + "reformStatus": 4, + "exceedTimeLimitStatus": 0 + }, + { + "id": "05bf3c70-a37e-4e3d-9e29-7a2101ba8ee5", + "name": "灭火器欠压", + "reformStatus": 4, + "exceedTimeLimitStatus": 0 + }, + { + "id": "061d81cf-0101-4a7e-b629-3d76d78172f2", + "name": "静电释放球馈电", + "reformStatus": 4, + "exceedTimeLimitStatus": 0 + }, + { + "id": "065ba39e-b017-41a5-9570-152778d98753", + "name": "人体静电释放器缺电", + "reformStatus": 4, + "exceedTimeLimitStatus": 0 + }, + { + "id": "06aeba3e-0ab7-43f2-8521-500fa944b9cd", + "name": "灭火器欠压", + "reformStatus": 4, + "exceedTimeLimitStatus": 0 + } + ] + + + +export const hiddenList = [ + { + "id": "0045fde2-0cd7-4adc-8d97-536c920f6717", + "name": "批控器无浪涌保护器", + "reformStatus": 1, + "company": "联化科", + "delay":50, + "exceedTimeLimitStatus": 0 + }, + { + "id": "009cc4c3-ce2b-4d4d-bb4a-5c6e13170f04", + "name": "稳压系统无法自启动", + "reformStatus": 1, + "company": "立本作物", + "delay":45, + "exceedTimeLimitStatus": 0 + }, + { + "id": "013e5bdd-9229-467e-9e17-31b0e3ac64aa", + "name": "TD202罐", + "reformStatus": 1, + "company": "圣丰集团", + "delay":42, + "exceedTimeLimitStatus": 0 + }, + { + "id": "01564c82-4829-41b0-b27c-653cee15398a", + "name": "管线掉漆", + "reformStatus": 1, + "company": "茂盛生物", + "delay":40, + "exceedTimeLimitStatus": 0 + }, + { + "id": "016d8287-daa5-40dc-b048-6f1533f113cc", + "name": "发车台3号位电机风扇破损", + "reformStatus": 1, + "company": "利尔化学", + "delay":39, + "exceedTimeLimitStatus": 0 + }, + { + "id": "02062c51-4e1b-49f5-8ffc-59a4388dd88a", + "name": "临时气瓶暂存场所可燃气故障,无法正常报警", + "reformStatus": 1, + "company": "海利得", + "delay":36, + "exceedTimeLimitStatus": 0 + }, + { + "id": "1d2a4081-b284-4d1b-bcc1-d2958bfb8a41", + "name": "库区至大门摄像头无法显示", + "reformStatus": 1, + "company": "联化科", + "delay":33, + "exceedTimeLimitStatus": 0 + }, + { + "id": "1d306063-a507-419b-938b-0104ccb263b7", + "name": "临时气瓶暂存场所可燃气故障,无法正常报警", + "reformStatus": 1, + "company": "立本作物", + "delay":32, + "exceedTimeLimitStatus": 0 + }, + { + "id": "1db948d6-b24a-42c0-abc8-d1ff710aa03d", + "name": "润滑油乳化需更换", + "reformStatus": 1, + "company": "圣丰集团", + "delay":30, + "exceedTimeLimitStatus": 0 + }, + { + "id": "1de43d60-30cc-4efd-9ba3-00d3e216b3de", + "name": "批控器无浪涌保护器", + "reformStatus": 1, + "company": "茂盛生物", + "delay":25, + "exceedTimeLimitStatus": 0 + }, + { + "id": "1ec4fd87-be1a-4efc-8aad-49b0181023bb", + "name": "封堵机房穿线孔", + "reformStatus": 1, + "company": "利尔化学", + "delay":25, + "exceedTimeLimitStatus": 0 + }, + { + "id": "1f940431-c14d-416d-b4ab-e2781632d2a1", + "name": "稳压系统无法自启动", + "reformStatus": 1, + "company": "海利得", + "delay":22, + "exceedTimeLimitStatus": 0 + }, + { + "id": "203d1918-b05a-443b-ab3d-bf34b0854ea2", + "name": "消防泵房清水回流管线", + "reformStatus": 1, + "company": "利尔化学", + "delay":10, + "exceedTimeLimitStatus": 0 + } +] + + diff --git a/src/components/safety/risk/left/riskIndexLeft.component.html b/src/components/safety/risk/left/riskIndexLeft.component.html new file mode 100644 index 0000000..aedf107 --- /dev/null +++ b/src/components/safety/risk/left/riskIndexLeft.component.html @@ -0,0 +1,33 @@ +
+
+ + 风险分级管控 + +
+ + 一级风险 + 二级风险 + 三级风险 + 四级风险 + +
+
+
风险分析单元
+
风险描述
+
+
+
+
{{item.name}}
+
{{item.description}}
+
+
+
+
+ + 风险项统计 + + + + +
+
diff --git a/src/components/safety/risk/left/riskIndexLeft.component.ts b/src/components/safety/risk/left/riskIndexLeft.component.ts new file mode 100644 index 0000000..08749ff --- /dev/null +++ b/src/components/safety/risk/left/riskIndexLeft.component.ts @@ -0,0 +1,151 @@ +import {Component, Emit, Vue} from 'vue-property-decorator'; +import template from "./riskIndexLeft.component.html" +import {pieChartData,lineChartData} from "./chartData"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" +import RiskService from "@/service/risk.service"; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, + directives:{ + //列表数据动态飞入动画 + list:{ + bind:(el,binding)=>{ + const timer = (binding.value+1)*100 + setTimeout(()=>{ + el.classList.add("animate__fadeInLeft") + },timer) + }, + } + } +}) +export default class RiskIndexLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + timer: any = null; + //饼图数据 + option1: any = pieChartData({text:'风险项',subtext:'等级占比'}) + //饼图实例 + pieChart: any = {}; + //折线图实例 + lineChart: any = {}; + //风险mock数据 + riskList = []; + rightChart:any = {} + activePieItem = 0; + //折线图数据 + lineData = lineChartData() + //切换饼图高亮区域 + changePieChange() { + + if (this.activePieItem > 8) { + this.activePieItem = 0 + } + + //定时移除高亮选中区 + this.rightChart.dispatchAction({ + type: "downplay", + seriesIndex: 0, + }); + //定时加载选中高亮区 + this.rightChart.dispatchAction({ + type: "highlight", + dataIndex: this.activePieItem + }) + this.activePieItem += 2; + + } + + //获取图表实例 + getEcharts(e,type) { + this[type] = e + } + + + //随机整数 + getRandomInt(min: number, max: number) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值 + } + + count = 1 + + //监听页面变化重新绘制图表 + resize() { + setTimeout(() => { + this.rightChart.resize(); + this.lineChart.resize(); + }, 300) + } + public riskService = new RiskService(); + //获取风险管控列表 + getRiskList(){ + this.riskService.getRiskList().then((res:any)=>{ + if (res.code === 200){ + this.riskList = res.data; + }else{ + this.$message.error(res.message) + } + }) + } + //获取风险管控详情 + getRiskDetail(params){ + this.riskService.getRiskDetail(params).then((res:any)=>{ + if (res.code === 200){ + this.showRight(res.data) + }else{ + this.$message.error(res.message) + } + }) + } + //定时刷新图表 + lineChartChange(){ + this.lineChart.clear(); + this.lineChart.setOption(lineChartData()) + } + mounted() { + this.getRiskList() + this.timer = setInterval(() => { + this.lineChartChange() + this.changePieChange() + }, 3000) + + window.addEventListener("resize", this.resize); + } + + + beforeDestroy() { + clearInterval(this.timer) + } + + destroyed() { + window.removeEventListener("resize", this.resize) + } + @Emit() + showRight(item){ + console.log(3123) + } + levelType = '1' + //切换风险级别 + changeData(val){ + console.log(1) + } + delay(i) { + return `animate__delay-${i}s` + } + + +} + diff --git a/src/components/safety/risk/right/chartData.js b/src/components/safety/risk/right/chartData.js new file mode 100644 index 0000000..a7b0974 --- /dev/null +++ b/src/components/safety/risk/right/chartData.js @@ -0,0 +1,217 @@ +export const lineChartData = function (data, xAxisData, $echarts) { + return { + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: xAxisData + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + data: data, + type: 'line', + itemStyle: { + color: '#E8E8E8', + }, + symbolSize: 7, + lineStyle: { + color: '#E8E8E8', + width: 3 + }, + smooth: true, + label: { + show: true, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + } + ], + + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 22, + x2: 12, + y2: 20, + } + } +} +export const lineAndBatChartData = function ($echarts) { + return { + color: ['#7FB0FF', '#E8E8E8', '#FADFA4'], + tooltip: { + show: true, + alwaysShowContent: false, + trigger: 'item', + backgroundColor: 'rgba(0,0,0,0.4)', + textStyle: { + color: '#ffffff' + } + }, + legend: { + top: 'top', + itemGap: 25, + itemWidth: 8, + itemHeight: 8, + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff" + } + }, + grid: { + top: '15%', + left: '5%', + right: '5%', + bottom: '5%', + containLabel: true + }, + xAxis: [ + { + type: 'category', + data: [ + '1月', + '2月', + '3月', + '4月', + '5月', + '6月', + '7月', + ], + + axisTick: false, + axisLine: { + lineStyle: { + color: '#999999' + } + }, + axisLabel: { + color: '#999999' + } + } + ], + yAxis: [ + { + type: 'value', + name: '', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + width: 1, + type: 'solid' + } + }, + axisLine: { + show: true, + lineStyle: { + color: '#999999', + } + }, + }, + { + type: 'value', + name: '', + splitLine: { + show: false + } + } + ], + series: [ + { + name: '巡查次数', + type: 'bar', + barWidth: 8, + data: [120, 95, 70, 85, 110, 60, 90], + itemStyle: { + borderRadius: [4, 4, 0, 0], + color: function (params) { + return new $echarts.graphic.LinearGradient( + 0, 0, 0, 1, + [{ + offset: 0, + color: '#7FB0FF' + }, + { + offset: 1, + color: '#3179EA' + } + ] + ) + }, + } + }, + { + name: '上报隐患', + type: 'bar', + barWidth: 8, + itemStyle: { + borderRadius: [4, 4, 0, 0], + color: function (params) { + return new $echarts.graphic.LinearGradient( + 0, 0, 0, 1, + [{ + offset: 0, + color: '#E8E8E8' + }, + { + offset: 1, + color: '#999999' + } + ] + ) + }, + }, + data: [130, 75, 80, 83, 90, 100, 120] + }, + { + name: '上报风险', + type: 'line', + color: '#D0AF7B', + yAxisIndex: 1, + symbolSize: 6, + symbol: 'circle', + data: [110, 68, 78, 105, 125, 77, 100] + } + ] + } + +} diff --git a/src/components/safety/risk/right/riskDetailRight.component.html b/src/components/safety/risk/right/riskDetailRight.component.html new file mode 100644 index 0000000..42c5005 --- /dev/null +++ b/src/components/safety/risk/right/riskDetailRight.component.html @@ -0,0 +1,25 @@ +
+
+ + 危险源详情 + +
{{ titleName }}
+
+
危险源名称:{{ riskDetailData.name }}
+
危险源编号:{{ riskDetailData.unifiedCoding }}
+
+ 关联危化品: + {{ riskDetailData.hazardousChemicalsName }} +
+
危险因素:{{ riskDetailData.riskFactor }}
+
影响后果:{{ riskDetailData.consequence }}
+
管控措施:{{ riskDetailData.controlMeasures }}
+
责任主体:{{ riskDetailData.enterprise }}
+
备注:{{ riskDetailData.remark }}
+
+
+ + +
diff --git a/src/components/safety/risk/right/riskDetailRight.component.ts b/src/components/safety/risk/right/riskDetailRight.component.ts new file mode 100644 index 0000000..d3cc2b6 --- /dev/null +++ b/src/components/safety/risk/right/riskDetailRight.component.ts @@ -0,0 +1,79 @@ +import {Component, Emit, Prop, Vue} from 'vue-property-decorator'; +import template from "./riskDetailRight.component.html" + +import TitleComponent from "@/components/title.component.vue" +import LargePopUpComponent from "@/components/largePopUp.component.vue" + + + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + LargePopUpComponent, + }, +}) +export default class RiskDetailRightComponent extends Vue { + //标题图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //风险详情 + @Prop({default: {}}) riskDetailData!: any + //圆形图标颜色类名 + iconColor = '' + //文字颜色类名 + textColor = '' + //风险等级名称 + titleName = '' + //风险等级map + titleNameMap = { + 1: '一级风险', + 2: '二级风险', + 3: '三级风险', + 4: '四级风险', + } + + //说明书弹窗 + dialogVisibleForBook = false + private detailData = {}; + + @Emit() + changeClose() { + console.log(1) + } + + //查看危险源信息 + getHazard() { + const temp = this.riskDetailData + this.detailData = { + "chemicalCn":temp.hazardousChemicalsName, + "otherChemicalCn":temp.hazardousChemicalsName, + "chemicalEn":temp.name, + "cas":temp.riskFactor, + "hazardCategory":temp.riskFactor, + "invasionRoute":temp.riskFactor, + "environmentalHazards":temp.riskFactor, + "explosionHazard":temp.riskFactor + } + this.dialogVisibleForBook = true + } + + mounted() { + //todo 加载项 + this.iconColor = `level-${this.riskDetailData.level}` + this.textColor = `level-${this.riskDetailData.level}-text` + this.titleName = this.titleNameMap[this.riskDetailData.level] + } + + + destroyed() { + //todo 销毁项 + } + +} + diff --git a/src/components/safety/risk/right/riskIndexRight.component.html b/src/components/safety/risk/right/riskIndexRight.component.html new file mode 100644 index 0000000..e922c21 --- /dev/null +++ b/src/components/safety/risk/right/riskIndexRight.component.html @@ -0,0 +1,38 @@ +
+
+ + 风险详情 + +
{{ titleName }}
+
+
分析单元:{{ riskDetailData.name }}
+
风险概率:{{ riskDetailData.riskProbability }}
+
+ 关联危险源: + {{ riskDetailData.majorHazardSourcesName }} +
+
风险因素:{{ riskDetailData.riskFactor }}
+
影响后果:{{ riskDetailData.affectConsequences }}
+
管控措施:{{ riskDetailData.riskControlMeasures }}
+
+
+
责任单位:{{ riskDetailData.enterprise }}
+
+
    +
  • 负责人:{{ riskDetailData.name }}
  • +
  • 联系电话:{{ riskDetailData.phone }}
  • +
+
+ +
+
+ +
+
+
最后一次审查时间:{{ riskDetailData.lastReviewDate }}
+
备注:{{ riskDetailData.remark }}
+
+
+
diff --git a/src/components/safety/risk/right/riskIndexRight.component.ts b/src/components/safety/risk/right/riskIndexRight.component.ts new file mode 100644 index 0000000..826888c --- /dev/null +++ b/src/components/safety/risk/right/riskIndexRight.component.ts @@ -0,0 +1,65 @@ +import {Component, Emit, Prop, Vue} from 'vue-property-decorator'; +import template from "./riskIndexRight.component.html" + +import TitleComponent from "@/components/title.component.vue" + + + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class RiskIndexRightComponent extends Vue { + //标题图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //风险详情 + @Prop({default: {}}) riskDetailData!: any + //圆形图标颜色类名 + iconColor = '' + //文字颜色类名 + textColor = '' + //风险等级名称 + titleName = '' + //风险等级map + titleNameMap = { + 1: '一级风险', + 2: '二级风险', + 3: '三级风险', + 4: '四级风险', + } + //人物照片 + personIcon = require('@/assets/img/person.png') + + + @Emit() + changeClose() { + //监听关闭事件 + } + + //查看危险源信息 + @Emit() + getHazard(item) { + //查看危险源信息 + } + + mounted() { + this.iconColor = `level-${this.riskDetailData.level}` + this.textColor = `level-${this.riskDetailData.level}-text` + this.titleName = this.titleNameMap[this.riskDetailData.level] + } + + + destroyed() { + //todo 销毁项 + } + +} + diff --git a/src/components/safety/specialOperation/left/chartData.js b/src/components/safety/specialOperation/left/chartData.js new file mode 100644 index 0000000..7971ef6 --- /dev/null +++ b/src/components/safety/specialOperation/left/chartData.js @@ -0,0 +1,242 @@ +export const pieChartData = function (option = {}) { + return { + title: { + text: option?.text, + subtext: option?.subtext, + itemGap: 5, + x: '48%', + y: '38%', + textAlign:'center', + textStyle: { + fontSize: 17, + fontWeight: '600', + align: "center", + color: '#E8E8E8', + }, + subtextStyle: { + fontSize: 14, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + legend: { + right: 'right', + bottom:'bottom', + itemGap: 10, + itemWidth: 8, + itemHeight: 8, + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff" + }, + data:[ + { + name:'一级', + icon:'roundRect' + },{ + name:'二级', + icon:'roundRect' + },{ + name:'三级', + icon:'roundRect' + },{ + name:'四级', + icon:'roundRect' + }, + ] + }, + tooltip: { + trigger: 'item' + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left:0, + radius: [50, 75], + data: [ + {value: 25, name: '一级'}, + {value: 1, name: ''}, + {value: 25, name: '二级'}, + {value: 1, name: ''}, + {value: 15, name: '三级'}, + {value: 1, name: ''}, + {value: 20, name: '四级'}, + {value: 1, name: ''}, + ], + color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null], + emphasis: { + label: { + show: true, + position:'inside', + color:'#ffffff', + textBorderColor: "rgb(111,111,111)", + textBorderwidth: 2, + backgroundColor:'transparent', + formatter:function (params) { + if (params.data.name){ + return params.data.value+'%' + }else { + return '' + } + + } + }, + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + // shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false, + position:'inside', + formatter:function (params) { + if (params.data.name){ + return params.data.value + }else { + return '' + } + + } + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' + } +} +export const lineChartData = function () { + return { + color:['#7FB0FF','#FADFA4','#C9FFD7','#FFFFFF'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: ['第一周','第二周','第三周','第四周','第五周'] + }, + legend: { + top: 'top', + itemGap: 30, + itemWidth: 8, + itemHeight: 8, + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff" + }, + data:[ + { + name:'已完成', + icon:'roundRect' + },{ + name:'待开始', + icon:'roundRect' + } + ] + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name:'已完成', + data: [60,80,140,70,100], + type: 'line', + symbolSize: 7, + lineStyle: { + color: '#7FB0FF', + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + },{ + name:'待开始', + data: [50,70,130,60,90], + type: 'line', + symbolSize: 7, + lineStyle: { + color: '#FADFA4', + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + } + ], + + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 30, + x2: 12, + y2: 20, + } + } +} diff --git a/src/components/safety/specialOperation/left/mockData.js b/src/components/safety/specialOperation/left/mockData.js new file mode 100644 index 0000000..41d45d2 --- /dev/null +++ b/src/components/safety/specialOperation/left/mockData.js @@ -0,0 +1,63 @@ +export const mockData = { + "1":[ + { "id": "000542ff-f569-4823-88aa-f7a6904131c9", "name": "含油污水处理分析单元","description":"超标排放", "level": 1 }, + { "id": "004114e8-8d20-4ada-a52d-a152f5111f99", "name": "卸油作业分析单元","description":"燃油泄露风险", "level": 1 }, + { "id": "00655661-d216-4132-a89c-486f7fb6f884", "name": "发油作业分析单元","description":"燃油泄露风险", "level": 1 }, + { "id": "012fe1e5-9c3f-45e6-aa96-4f4c04c9cc48", "name": "配电间分析单元","description":"漏电风险", "level": 1 }, + { "id": "019889df-e79c-4870-849b-2abeefbf1a6a", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 1 }, + { "id": "0222ad5e-0668-4861-bd27-fac137cd7eb8", "name": "汽、柴油卸油分析单元","description":"泄露风险", "level": 1 }, + { "id": "02385672-2f50-488f-8b89-9cd0b98ccae6", "name": "含油污水处理分析单元","description":"超标排放", "level": 1 }, + { "id": "0253f566-b032-48ea-966e-2721dfe72208", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 1 }, + ], + "2":[ + { "id": "00655661-d216-4132-a89c-486f7fb6f884", "name": "发油作业分析单元","description":"燃油泄露风险", "level": 2 }, + { "id": "012fe1e5-9c3f-45e6-aa96-4f4c04c9cc48", "name": "配电间分析单元","description":"漏电风险", "level": 2 }, + { "id": "019889df-e79c-4870-849b-2abeefbf1a6a", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 2 }, + { "id": "0222ad5e-0668-4861-bd27-fac137cd7eb8", "name": "汽、柴油卸油分析单元","description":"泄露风险", "level": 2 }, + { "id": "02385672-2f50-488f-8b89-9cd0b98ccae6", "name": "含油污水处理分析单元","description":"超标排放", "level": 2 }, + { "id": "000542ff-f569-4823-88aa-f7a6904131c9", "name": "含油污水处理分析单元","description":"超标排放", "level": 2 }, + { "id": "004114e8-8d20-4ada-a52d-a152f5111f99", "name": "卸油作业分析单元","description":"燃油泄露风险", "level": 2 }, + { "id": "0253f566-b032-48ea-966e-2721dfe72208", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 2 }, + ], + "3":[ + { "id": "019889df-e79c-4870-849b-2abeefbf1a6a", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 3 }, + { "id": "0222ad5e-0668-4861-bd27-fac137cd7eb8", "name": "汽、柴油卸油分析单元","description":"泄露风险", "level": 3 }, + { "id": "02385672-2f50-488f-8b89-9cd0b98ccae6", "name": "含油污水处理分析单元","description":"超标排放", "level": 3 }, + { "id": "000542ff-f569-4823-88aa-f7a6904131c9", "name": "含油污水处理分析单元","description":"超标排放", "level": 3 }, + { "id": "004114e8-8d20-4ada-a52d-a152f5111f99", "name": "卸油作业分析单元","description":"燃油泄露风险", "level": 3 }, + { "id": "00655661-d216-4132-a89c-486f7fb6f884", "name": "发油作业分析单元","description":"燃油泄露风险", "level": 3 }, + { "id": "012fe1e5-9c3f-45e6-aa96-4f4c04c9cc48", "name": "配电间分析单元","description":"漏电风险", "level": 3 }, + { "id": "0253f566-b032-48ea-966e-2721dfe72208", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 3 }], + "4":[ + { "id": "000542ff-f569-4823-88aa-f7a6904131c9", "name": "含油污水处理分析单元","description":"超标排放", "level": 4 }, + { "id": "004114e8-8d20-4ada-a52d-a152f5111f99", "name": "卸油作业分析单元","description":"燃油泄露风险", "level": 4 }, + { "id": "00655661-d216-4132-a89c-486f7fb6f884", "name": "发油作业分析单元","description":"燃油泄露风险", "level": 4 }, + { "id": "012fe1e5-9c3f-45e6-aa96-4f4c04c9cc48", "name": "配电间分析单元","description":"漏电风险", "level": 4 }, + { "id": "019889df-e79c-4870-849b-2abeefbf1a6a", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 4 }, + { "id": "0222ad5e-0668-4861-bd27-fac137cd7eb8", "name": "汽、柴油卸油分析单元","description":"泄露风险", "level": 4 }, + { "id": "02385672-2f50-488f-8b89-9cd0b98ccae6", "name": "含油污水处理分析单元","description":"超标排放", "level": 4 }, + { "id": "0253f566-b032-48ea-966e-2721dfe72208", "name": "拱顶罐、内浮顶罐分析单元","description":"燃油泄露风险", "level": 4 } + ], +} + +export const detail = { + "id": "1736bd5f-765e-4c4a-9786-8bc06a2134eb", + "name": "卸油作业分析单元", + "riskProbability": "可能", + "riskFactor": "泄漏、火灾、爆炸、憋压、中毒", + "affectConsequences": "泄漏、火灾、爆炸、憋压、中毒", + "level": 1, + "enterpriseId": "6", + "enterprise": "中石油兰州石化榆林化工有限公司", + "responsiblePersonId": "1fe37818-c849-4ba2-a53d-d440d1cbf983", + "responsiblePerson": "亓美枫", + "riskControlMeasures": "内外操每时进行巡检,记录操作数据", + "lastReviewDate": "2022-04-15 07:35:34", + "majorHazardSourcesId": "954e5e6f-91c5-46d1-a085-ad0e6cdae10c", + "majorHazardSourcesName": "氯气瓶仓库单元", + "personName": "亓美枫", + "phone": "15500692422", + "addr": "台西纬五路117号-1-3", + "remark": "台西纬五路117号-1-3", +} + diff --git a/src/components/safety/specialOperation/left/specialOperationLeft.component.html b/src/components/safety/specialOperation/left/specialOperationLeft.component.html new file mode 100644 index 0000000..1e9d212 --- /dev/null +++ b/src/components/safety/specialOperation/left/specialOperationLeft.component.html @@ -0,0 +1,32 @@ +
+
+ + 特殊作业 + +
+ + 进行中 + 待开始 + 已完成 + +
+
+
作业类型
+
责任单位
+
+
+
+
{{item.name}}
+
{{item.enterprise}}
+
+
+
+
+ + 作业情况统计 + + + + +
+
diff --git a/src/components/safety/specialOperation/left/specialOperationLeft.component.ts b/src/components/safety/specialOperation/left/specialOperationLeft.component.ts new file mode 100644 index 0000000..607e44b --- /dev/null +++ b/src/components/safety/specialOperation/left/specialOperationLeft.component.ts @@ -0,0 +1,154 @@ +import {Component, Emit, Vue} from 'vue-property-decorator'; +import template from "./specialOperationLeft.component.html" +import {pieChartData,lineChartData} from "./chartData"; + +import TitleComponent from "@/components/title.component.vue" +import RiskService from "@/service/risk.service"; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, + directives:{ + //列表数据动态飞入动画 + list:{ + bind:(el,binding)=>{ + const timer = (binding.value+1)*100 + setTimeout(()=>{ + el.classList.add("animate__fadeInLeft") + },timer) + }, + } + } +}) +export default class SpecialOperationLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + timer: any = null; + //饼图数据 + option1: any = pieChartData({text:'作业情况',subtext:'等级占比'}) + //饼图实例 + pieChart: any = {}; + //折线图实例 + lineChart: any = {}; + //特殊作业mock数据 + sepList = []; + rightChart:any = {} + activePieItem = 0; + //折线图数据 + lineData = lineChartData() + //切换饼图高亮区域 + changePieChange() { + + if (this.activePieItem > 8) { + this.activePieItem = 0 + } + + //定时移除高亮选中区 + this.rightChart.dispatchAction({ + type: "downplay", + seriesIndex: 0, + }); + //定时加载选中高亮区 + this.rightChart.dispatchAction({ + type: "highlight", + dataIndex: this.activePieItem + }) + this.activePieItem += 2; + + } + + //获取图表实例 + getEcharts(e,type) { + this[type] = e + } + + + //随机整数 + getRandomInt(min: number, max: number) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值 + } + + count = 1 + + //监听页面变化重新绘制图表 + resize() { + setTimeout(() => { + this.rightChart.resize(); + this.lineChart.resize(); + }, 300) + } + public riskService = new RiskService(); + //获取风险管控列表 + getRiskList(){ + this.riskService.getSepList().then((res:any)=>{ + if (res.code === 200){ + res.data[1] = this.$store.state.dangrousWorkList + this.sepList = res.data; + }else{ + this.$message.error(res.message) + } + }) + } + //获取风险管控详情 + getRiskDetail(params){ + this.showRight(params) + /* this.riskService.getRiskDetail(params).then((res:any)=>{ + if (res.code === 200){ + this.showRight(res.data) + }else{ + this.$message.error(res.message) + } + })*/ + } + //定时刷新图表 + lineChartChange(){ + this.lineChart.clear(); + this.lineChart.setOption(lineChartData()) + } + mounted() { + // 假数据替换 不能请求过快 + setTimeout(()=>{ + this.getRiskList() + },1000) + this.timer = setInterval(() => { + this.lineChartChange() + this.changePieChange() + }, 3000) + + window.addEventListener("resize", this.resize); + } + + + beforeDestroy() { + clearInterval(this.timer) + } + + destroyed() { + window.removeEventListener("resize", this.resize) + } + @Emit() + showRight(item){ + console.log(3123) + } + status = '1' + //切换风险级别 + changeData(val){ + console.log(1) + } + delay(i) { + return `animate__delay-${i}s` + } + + +} + diff --git a/src/components/safety/specialOperation/right/chartData.js b/src/components/safety/specialOperation/right/chartData.js new file mode 100644 index 0000000..a9308cd --- /dev/null +++ b/src/components/safety/specialOperation/right/chartData.js @@ -0,0 +1,243 @@ +export const barTopChartData = function () { + return { + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + }, + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + }, + legend:{ + top: 'top', + itemGap: 25, + itemWidth: 8, + itemHeight: 8, + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff" + } + }, + grid: { + left: '3%', + right: '4%', + bottom: '3%', + top: '8%', + containLabel: true + }, + xAxis: [ + { + type: 'category', + data: ['联化科', '立本作物', '圣丰集团', '茂盛生物', '利尔化学', '海利得'], + axisTick: { + show: false, + }, + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + } + ], + yAxis: [ + { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + } + ], + color: ['#7FB0FF', '#C9FFD7', '#E8E8E8'], + series: [ + + { + name: '待开始', + type: 'bar', + stack: 'user', + barWidth: 20, + itemStyle: { + + }, + data: [50,40, 55, 60, 42, 10] + }, + { + name: '进行中', + type: 'bar', + stack: 'user', + barWidth: 20, + data: [15, 20, 11, 9, 14, 10] + }, + { + name: '已完成', + type: 'bar', + stack: 'user', + barWidth: 20, + itemStyle: { + + }, + data: [40, 30, 40, 20, 15, 20] + }, + + ] + }; + +} +export const barBottomChartData = function () { + const yData = ['联化科技股份有限公司', '立本作物科技有限公司', '圣丰集团有限公司', '茂盛生物有限公司', '利尔化学股份有限公司', '海利得新材料股份有限公司','恒力石化股份有限公司']; + let data = [90,80,70,60,55,50,46]; + data.sort((a, b) => b - a); + let max = Math.max.apply(null, data); + max = max + 30; + let getMax = []; + for (let i = 0; i < yData.length; i++) { + getMax.push(max); + } + + return { + tooltip: { + show:false, + trigger: 'axis', + axisPointer: { + type: 'none', + }, + formatter: function (params) { + return params[0].name + ' : ' + params[0].value; + }, + }, + legend: { + show:false, + right: '25%', + top: '0%', + itemWidth: 10, + itemHeight: 10, + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + xAxis: { + show: false, + type: 'value', + }, + grid: { + right: '12%', + left: '1%', + top: '6%', + bottom: '1%', + }, + yAxis: [ + { + type: 'category', + inverse: true, + offset: -8, + axisLabel: { + show: true, + align: 'left', + verticalAlign:'bottom', + lineHeight: 28, + textStyle: { + color: '#fff', + fontSize: '12', + }, + }, + splitLine: { + show: false, + }, + axisTick: { + show: false, + }, + axisLine: { + show: false, + }, + data: yData, + }, + { + type: 'category', + inverse: true, + offset: 0, + axisTick: 'none', + axisLine: 'none', + show: true, + axisLabel: { + textStyle: { + color: '#fff', + fontSize: '14', + }, + }, + data: data, + }, + ], + series: [ + { + name: '', + type: 'bar', + stack: 'user', + zlevel: 1, + itemStyle: { + color: { + type: 'linear', + x: 0, + y: 0, + x2: 1, + y2: 0, + colorStops: [ + { + offset: 0, + color: '#7FB0FF', // 0% 处的颜色 + }, + { + offset: 1, + color: '#5485D5', // 100% 处的颜色 + }, + ], + global: false, // 缺省为 false + } + }, + barWidth: 10, + data: data, + }, + { + name: '背景', + type: 'bar', + barWidth: 10, + barGap: '-100%', + data: getMax, + itemStyle: { + color: 'rgba(21,36,72,0.5)', + }, + }, + ], + }; + +} diff --git a/src/components/safety/specialOperation/right/detail.component.html b/src/components/safety/specialOperation/right/detail.component.html new file mode 100644 index 0000000..13ebbe4 --- /dev/null +++ b/src/components/safety/specialOperation/right/detail.component.html @@ -0,0 +1,32 @@ +
+
+ + 作业详情 + +
+
作业名称:{{ detailData.name }}
+
作业等级:{{ detailData.operationLevel }}
+
作业类型:{{ detailData.operationType }}
+
作业单位:{{ detailData.enterprise }}
+
作业内容:{{ detailData.operationContent }}
+
作业地点:{{ detailData.operationSite }}
+ +
作业开始时间:{{ detailData.operationStart }}
+
作业结束时间:{{ detailData.operationEnd }}
+
+
+
diff --git a/src/components/safety/specialOperation/right/sepDetail.component.ts b/src/components/safety/specialOperation/right/sepDetail.component.ts new file mode 100644 index 0000000..c60be75 --- /dev/null +++ b/src/components/safety/specialOperation/right/sepDetail.component.ts @@ -0,0 +1,56 @@ +import {Component, Emit, Prop, Vue} from 'vue-property-decorator'; +import template from "./detail.component.html" + +import TitleComponent from "@/components/title.component.vue" + + + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class SepDetailComponent extends Vue { + //标题图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //风险详情 + @Prop({default: {}}) detailData!: any + + //风险等级map + titleNameMap = { + 1: '一级风险', + 2: '二级风险', + 3: '三级风险', + 4: '四级风险', + } + + + @Emit() + changeClose() { + //监听关闭事件 + } + + //查看危险源信息 + @Emit() + getHazard() { + //查看危险源信息 + } + + mounted() { + + } + + + destroyed() { + //todo 销毁项 + } + +} + diff --git a/src/components/safety/specialOperation/right/specialOperationRight.component.html b/src/components/safety/specialOperation/right/specialOperationRight.component.html new file mode 100644 index 0000000..f5cf786 --- /dev/null +++ b/src/components/safety/specialOperation/right/specialOperationRight.component.html @@ -0,0 +1,14 @@ +
+
+ + 企业作业统计 + + +
+
+ + 企业延期作业排行 + + +
+
diff --git a/src/components/safety/specialOperation/right/specialOperationRight.component.ts b/src/components/safety/specialOperation/right/specialOperationRight.component.ts new file mode 100644 index 0000000..09933da --- /dev/null +++ b/src/components/safety/specialOperation/right/specialOperationRight.component.ts @@ -0,0 +1,57 @@ +import {Component, Emit, Prop, Vue} from 'vue-property-decorator'; +import template from "./specialOperationRight.component.html" +import {barTopChartData,barBottomChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" + + + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class SpecialOperationRightComponent extends Vue { + //标题图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + + //企业作业统计柱状图数据 + topBarChartData = {} + //企业作业统计柱状图实例 + barTop:any = {} + //企业延期作业排行柱状图数据 + bottomBarChartData = {} + //企业延期作业排行柱状图实例 + barBottom:any = {} + //企业延期作业排行 + //获取图表实例 + getEcharts(e,type){ + this[type] = e + if (type === 'barTop'){ + this.topBarChartData = barTopChartData() + }else if(type === 'barBottom'){ + this.bottomBarChartData = barBottomChartData() + } + } + //图表自适应 + resize() { + setTimeout(() => { + this.barTop.resize(); + this.barBottom.resize(); + }, 300) + } + mounted() { + window.addEventListener("resize", this.resize); + } + destroyed() { + window.removeEventListener("resize", this.resize) + } + +} + diff --git a/src/components/scrollNumber.component.vue b/src/components/scrollNumber.component.vue new file mode 100644 index 0000000..d44cb7a --- /dev/null +++ b/src/components/scrollNumber.component.vue @@ -0,0 +1,112 @@ + + + diff --git a/src/components/smartEmergency/afterwards/left/afterwardsLeft.component.html b/src/components/smartEmergency/afterwards/left/afterwardsLeft.component.html new file mode 100644 index 0000000..2c813ce --- /dev/null +++ b/src/components/smartEmergency/afterwards/left/afterwardsLeft.component.html @@ -0,0 +1,87 @@ +
+
+
+
+
+
+
+
    +
  • 事故类型:{{info.typeName}}
  • +
  • 事故内容:{{info.content}}
  • +
  • + 事故级别: + {{ levelName }} + + 上调 + 下调 +
  • +
  • 关联危险源:石油炼制单元
  • +
  • 上报位置:{{info.address}} +
  • +
  • 上报人:{{ info.reporter }} + 一健联系 +
  • +
+
+
应急任务
+
+ 安全保障 + 医疗救援 + 人流控制 +
+ +
+
+
+ {{ item.org }} +

{{item.content}}

+
+
负责人:{{item.head}}
+ +
+
+ + + +
+
+
+
应急中...
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+ 应急准备 + 事态控制 + 善后工作 +
+
+ +
+ + 结束应急 +
+
+
+ +
diff --git a/src/components/smartEmergency/afterwards/left/afterwardsLeft.component.ts b/src/components/smartEmergency/afterwards/left/afterwardsLeft.component.ts new file mode 100644 index 0000000..93b5596 --- /dev/null +++ b/src/components/smartEmergency/afterwards/left/afterwardsLeft.component.ts @@ -0,0 +1,390 @@ +import {Component, Emit, Prop, Vue} from 'vue-property-decorator'; +import template from "./afterwardsLeft.component.html" +import {pieChartData} from "./chartData"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" +import * as turf from '@turf/turf' +import Mock from "mockjs" +import moment from "moment" +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, +}) +export default class AfterwardsLeftComponent extends Vue { + //传入的报警信息详情 + @Prop({ + default: function () { + return { + "typeName": "火灾", + "content": "北京汉邦唐化工厂区发生火灾", + "levelName": "二级", + "levelClass": "level-2-text", + "levelClassIcon": "level-2", + "time": "2023-05-15 15:21:35", + "address": "工厂厂房", + "reporter": "蒋丽", + "tableHeader": [ + { + "prop": "name", + "label": "摄像头名称" + }, + { + "prop": "type", + "label": "类型" + }, + { + "prop": "distance", + "label": "距离 (m)" + } + ], + "tableData": [ + { + "type": "简型摄像头", + "distance": "10", + "name": "1号摄像头" + }, + { + "type": "简型摄像头", + "distance": "20", + "name": "2号摄像头" + }, + { + "type": "简型摄像头", + "distance": "22", + "name": "3号摄像头" + }, + { + "type": "简型摄像头", + "distance": "10", + "name": "4号摄像头" + }, + { + "type": "简型摄像头", + "distance": "20", + "name": "5号摄像头" + }, + { + "type": "简型摄像头", + "distance": "22", + "name": "6号摄像头" + } + ], + "title": "火灾爆炸", + "info": "北京汉邦唐化工厂区发生火灾", + "level": "1", + "type": "fire", + "tel": 13231475537, + "id": "110000197911038403", + "position": [ + 13312990.72, + 4098613.12, + 0.51 + ] + } + } + }) info!: any[]; + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + + currentCompany = false + popObj:any = { + popTitle:'报警记录', + type:'', + title: '风险点异常', + info: '', + time: '', + address:'', + level: '', + typeName:"", + reporter:"", + tel:"", + position:[], + content:"", + typeId:"", + id:'' + + } + typeList =[ + { + label:'气体泄露', + value:'normal', + level:2, + id:1 + },{ + label:'火灾爆炸', + value:'fire', + level:1, + id:2 + },{ + label:'气液泄露', + value:'normal', + level:1, + id:3 + },{ + label:'安全事故', + value:'normal', + level:2, + id:4 + },{ + label:'自然灾害', + value:'normal', + level:3, + id:5 + }, + ] + levelClass = 'level-1'; + levelName = '一级'; + level=1; + cardText = 'level-1-text'; + taskList = [ + { + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + }, + ] + + // 当前进度条 + active = 1 + radioActive = 1 + customColor = '#ffffff' + percentage = 50 + changeRadio(type){ + this.radioActive = type + if (type === 1){ + this.percentage = 50 + this.taskList = this.taskList.map((item,i)=>{ + item.checked = false + if ([2,3,5,7,9].includes(i)){ + item.checked = true + } + return item + }) + }else if(type === 2){ + this.percentage = 70 + this.taskList = this.taskList.map((item,i)=>{ + item.checked = false + if ([1,2,3,5,7,8,9].includes(i)){ + item.checked = true + } + return item + }) + }else{ + this.percentage = 80 + this.taskList = this.taskList.map((item,i)=>{ + item.checked = false + if ([1,2,3,5,6,7,8,9].includes(i)){ + item.checked = true + } + return item + }) + + } + } + get dataList(){ + return this.$store.state.warningList + } + changeBox(item){ + item.checked = !item.checked + const find = this.taskList.filter(item => item.checked) + this.percentage = find.length*10 + } + + //下一步操作 + nextStep(){ + if (this.active<3){ + this.active++ + } + this.gotoNext() + } + @Emit('gotoNext') + gotoNext(){ + // + } + changeLevel(type){ + if (type === 'up'){ + if (this.level === 1){ + return + } + this.level-- + + }else if(type === 'down'){ + if (this.level === 4){ + return + } + this.level++ + } + const nameList = { + 1:'一级', + 2:'二级', + 3:'三级', + 4:'四级', + } + this.levelName = nameList[this.level] + this.levelClass = `level-${this.level}` + this.cardText = `level-${this.level}-text` + } + setData(val,type){ + if (type === 'typeName'){ + const find = this.typeList.find(item=>item.id == val) as any + this.popObj.level = find.level + this.popObj.title = find.label + this.popObj.type = find.value + } + this.popObj[type] = val + } + + //展示告警信息 + showWaring(item){ + const levelMap = { + 1:'一级', + 2:'二级', + 3:'三级', + } + const levelClassMap = { + 3:'blue', + 2:'yellow', + 1:'red', + } + this.getItem(Object.assign(item,{ + type:'风险告警', + level:item.level, + levelClass:levelClassMap[item.level], + levelName:levelMap[item.level], + content:'监测数值异常', + time:'2023年1月20日 14:33:33', + equipment:'北区广场监测点', + tableHeader:[ + { + 'prop':'alarmSubject', + 'label':'告警主体', + 'width':'90px', + }, { + 'prop':'COD', + 'label':'COD', + }, { + 'prop':'standard', + 'label':'标准值', + }, + ], + tableData: [{ + 'alarmSubject': '排放量', + 'COD': '456m3', + 'standard': '466m3', + }, { + 'alarmSubject': '排放浓度', + 'COD': '2.6mg/L', + 'standard': '2.5mg/L', + }, { + 'alarmSubject': '排放时间', + 'COD': '2023.3.31 05:03:45', + 'standard': '8:00-22:00', + }, { + 'alarmSubject': '排放浓度', + 'COD': '2.6mg/L', + 'standard': '2.5mg/L', + }, { + 'alarmSubject': '排放时间', + 'COD': '2023.3.31 05:03:45', + 'standard': '8:00-22:00', + }] + })) + } + //点击告警信息 + @Emit() + getItem(item) { + // console.log('item', item) + } + + count = 1 + + + mounted() { + + } + + destroyed() { + + } + + changeMore() { + console.log(1) + } + + changeClose() { + console.log(1) + } + addManual(){ + this.currentCompany = true + } + submitWaring(){ + this.popObj.id = Mock.mock("@id"); + if (this.popObj.type === 'normal'){ + this.popObj.position=turf.randomPosition([ + 13312995.84, + 4098177.2800000003, + 13313096.96, + 4098754.88, + ]); + }else if(this.popObj.type === 'fire'){ + this.popObj.position= [13312990.72, 4098613.12, 0.51] + } + this.popObj.time = moment().subtract(0,"days").format("YYYY-MM-DD HH:mm:ss") + + this.$store.commit("upDateWaringList",[this.popObj]) + this.currentCompany=false + } + //点击点位 + @Emit('changePoint') + changePoint(item) { + console.log(item) +// + } +} + diff --git a/src/components/smartEmergency/afterwards/left/chartData.js b/src/components/smartEmergency/afterwards/left/chartData.js new file mode 100644 index 0000000..efdb970 --- /dev/null +++ b/src/components/smartEmergency/afterwards/left/chartData.js @@ -0,0 +1,98 @@ +export const pieChartData = { + title: { + text: '90%', + subtext: '在线率', + itemGap: 5, + x: 105, + y: '37%', + textStyle: { + fontSize: 30, + fontWeight: '600', + fontStyle: 'italic', + color: '#E8E8E8', + }, + subtextStyle: { + fontSize: 17, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + trigger: 'item' + }, + legend: { + orient: 'vertical', + right: '0%', + top: 'bottom', + height:100, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 25, name: '气体'}, + {value: 25, name: '水质'}, + {value: 15, name: '特征污染物'}, + {value: 20, name: '废气'}, + {value: 15, name: '废水'} + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left:-50, + radius: [50, 75], + data: [ + {value: 25, name: '气体',num:90}, + {value: 1, name: '',num:0}, + {value: 25, name: '水质',num:95}, + {value: 1, name: '',num:0}, + {value: 15, name: '特征污染物',num:94}, + {value: 1, name: '',num:0}, + {value: 20, name: '废气',num:91}, + {value: 1, name: '',num:0}, + {value: 15, name: '废水',num:89}, + {value: 1, name: '',num:0}, + ], + color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null], + emphasis: { + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + }, + formatter:function (params) { + return params.data.name+' : '+ params.data.num+'%' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' +} diff --git a/src/components/smartEmergency/afterwards/right/afterwardsRight.component.html b/src/components/smartEmergency/afterwards/right/afterwardsRight.component.html new file mode 100644 index 0000000..1110703 --- /dev/null +++ b/src/components/smartEmergency/afterwards/right/afterwardsRight.component.html @@ -0,0 +1,120 @@ +
+
+
+
+
+
+

745

+

区域内人数

+
+
+
+
+
+

84

+

区域内车辆

+
+
+
+
+ 附近摄像头 + 移动摄像头 +
+
+ 摄像头名称 + 类型 + 距离 (m) +
+
+
+ {{ item.name }} + {{ item.type }} + {{ item.distance }} +
+ +
+ +
+
+ 火灾救援 +
+ + 张三 + + , + + 高光易 + + , + + 薛想 + +
+
+
+ 医疗救助 +
+ + 张三 + + , + + 高光易 + + , + + 薛想 + +
+
+
+ 化学防护 +
+ + 张三 + + , + + 高光易 + + , + + 薛想 + +
+
+
+
+
+
+
+
+
事故事态简报
+
+
+
+
+
+
+
+ + + 事故造成伤亡人员 + 暂无 +
+
+ + + {{activity.timestamp}} {{activity.content}} + + +
+
+ +
diff --git a/src/components/smartEmergency/afterwards/right/afterwardsRight.component.ts b/src/components/smartEmergency/afterwards/right/afterwardsRight.component.ts new file mode 100644 index 0000000..d314052 --- /dev/null +++ b/src/components/smartEmergency/afterwards/right/afterwardsRight.component.ts @@ -0,0 +1,268 @@ +import {Component, Emit, Prop, Vue} from 'vue-property-decorator'; +import template from "./afterwardsRight.component.html" +import TitleComponent from "@/components/title.component.vue" +import Mock from "mockjs" +import * as turf from "@turf/turf"; +import moment from "moment"; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class AfterwardsRightComponent extends Vue { + //传入的报警信息详情 + @Prop({ + default: function () { + return { + } + } + }) info!: any; + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + + currentCompany = false + popObj:any = { + popTitle:'报警记录', + type:'', + title: '风险点异常', + info: '', + time: '', + address:'', + level: '', + typeName:"", + reporter:"", + tel:"", + position:[], + content:"", + typeId:"", + id:'' + + } + typeList =[ + { + label:'气体泄露', + value:'normal', + level:2, + id:1 + },{ + label:'火灾爆炸', + value:'fire', + level:1, + id:2 + },{ + label:'气液泄露', + value:'normal', + level:1, + id:3 + },{ + label:'安全事故', + value:'normal', + level:2, + id:4 + },{ + label:'自然灾害', + value:'normal', + level:3, + id:5 + }, + ] + levelClass = 'level-1'; + levelName = '一级'; + level=1; + cardText = 'level-1-text'; + + activities = [{ + content: '消防车到达3辆 ', + timestamp: '12:30:11' + }, { + content: '救援小组到达20人', + timestamp: '12:24:11' + }, { + content: '安保小组到达 40人', + timestamp: '12:20:11' + }] + searchVal = '' + // 当前进度条 + active = 1 + get dataList(){ + return this.$store.state.warningList + } + radioActive = 1 + + + + //获取摄像头 + get cameraList(){ + const from = this.info.position; + const tempData = this.$store.state.cameraList.map((item,i)=>{ + const to = item.position; + const distance = Math.floor(turf.distance(from, to, {units: 'meters'})/100000); + const temp = { + type:'简型摄像头', + distance, + name:`${i}号摄像头`, + } + return {...item,...temp} + }) + return tempData.filter(item => item.distance <= 100).toSorted((a, b) => a.distance - b.distance) + } + changeRadio(type){ + this.radioActive = type + } + seachData(){ + console.log(this.searchVal) + } + //下一步操作 + nextStep(){ + if (this.active<3){ + this.active++ + } + } + changeLevel(type){ + if (type === 'up'){ + if (this.level === 1){ + return + } + this.level-- + + }else if(type === 'down'){ + if (this.level === 4){ + return + } + this.level++ + } + const nameList = { + 1:'一级', + 2:'二级', + 3:'三级', + 4:'四级', + } + this.levelName = nameList[this.level] + this.levelClass = `level-${this.level}` + this.cardText = `level-${this.level}-text` + } + setData(val,type){ + if (type === 'typeName'){ + const find = this.typeList.find(item=>item.id == val) as any + this.popObj.level = find.level + this.popObj.title = find.label + this.popObj.type = find.value + } + this.popObj[type] = val + } + + //展示告警信息 + showWaring(item){ + const levelMap = { + 1:'一级', + 2:'二级', + 3:'三级', + } + const levelClassMap = { + 3:'blue', + 2:'yellow', + 1:'red', + } + this.getItem(Object.assign(item,{ + type:'风险告警', + level:item.level, + levelClass:levelClassMap[item.level], + levelName:levelMap[item.level], + content:'监测数值异常', + time:'2023年1月20日 14:33:33', + equipment:'北区广场监测点', + tableHeader:[ + { + 'prop':'alarmSubject', + 'label':'告警主体', + 'width':'90px', + }, { + 'prop':'COD', + 'label':'COD', + }, { + 'prop':'standard', + 'label':'标准值', + }, + ], + tableData: [{ + 'alarmSubject': '排放量', + 'COD': '456m3', + 'standard': '466m3', + }, { + 'alarmSubject': '排放浓度', + 'COD': '2.6mg/L', + 'standard': '2.5mg/L', + }, { + 'alarmSubject': '排放时间', + 'COD': '2023.3.31 05:03:45', + 'standard': '8:00-22:00', + }, { + 'alarmSubject': '排放浓度', + 'COD': '2.6mg/L', + 'standard': '2.5mg/L', + }, { + 'alarmSubject': '排放时间', + 'COD': '2023.3.31 05:03:45', + 'standard': '8:00-22:00', + }] + })) + } + //点击告警信息 + @Emit() + getItem(item) { + // console.log('item', item) + } + + count = 1 + + + mounted() { + + } + + destroyed() { + + } + + changeMore() { + console.log(1) + } + + changeClose() { + console.log(1) + } + addManual(){ + this.currentCompany = true + } + submitWaring(){ + this.popObj.id = Mock.mock("@id"); + if (this.popObj.type === 'normal'){ + this.popObj.position=turf.randomPosition([ + 13312995.84, + 4098177.2800000003, + 13313096.96, + 4098754.88, + ]); + }else if(this.popObj.type === 'fire'){ + this.popObj.position= [13312990.72, 4098613.12, 0.51] + } + this.popObj.time = moment().subtract(0,"days").format("YYYY-MM-DD HH:mm:ss") + + this.$store.commit("upDateWaringList",[this.popObj]) + this.currentCompany=false + } + //打开视频 + @Emit('openVideo') + openVideo(item) { + // console.log('item', item) + } +} + diff --git a/src/components/smartEmergency/afterwards/right/chartData.js b/src/components/smartEmergency/afterwards/right/chartData.js new file mode 100644 index 0000000..ae9ddae --- /dev/null +++ b/src/components/smartEmergency/afterwards/right/chartData.js @@ -0,0 +1,112 @@ + +export const lineChartData = function () { + return { + color:['#FADFA4','#947FEA'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: ['1月','2月','3月','4月','5月'] + }, + legend: { + top: 'top', + itemGap: 30, + itemWidth: 8, + itemHeight: 8, + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff" + }, + data:[ + { + name:'应急事件', + icon:'roundRect' + },{ + name:'应急演练', + icon:'roundRect' + } + ] + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name:'应急事件', + data: [60,80,140,70,100], + type: 'line', + symbolSize: 4, + symbol: 'circle', + lineStyle: { + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + },{ + name:'应急演练', + data: [50,70,130,60,90], + type: 'line', + symbolSize: 4, + symbol: 'circle', + lineStyle: { + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + } + ], + + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 30, + x2: 12, + y2: 20, + } + } +} diff --git a/src/components/smartEmergency/control/left/chartData.js b/src/components/smartEmergency/control/left/chartData.js new file mode 100644 index 0000000..efdb970 --- /dev/null +++ b/src/components/smartEmergency/control/left/chartData.js @@ -0,0 +1,98 @@ +export const pieChartData = { + title: { + text: '90%', + subtext: '在线率', + itemGap: 5, + x: 105, + y: '37%', + textStyle: { + fontSize: 30, + fontWeight: '600', + fontStyle: 'italic', + color: '#E8E8E8', + }, + subtextStyle: { + fontSize: 17, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + trigger: 'item' + }, + legend: { + orient: 'vertical', + right: '0%', + top: 'bottom', + height:100, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 25, name: '气体'}, + {value: 25, name: '水质'}, + {value: 15, name: '特征污染物'}, + {value: 20, name: '废气'}, + {value: 15, name: '废水'} + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left:-50, + radius: [50, 75], + data: [ + {value: 25, name: '气体',num:90}, + {value: 1, name: '',num:0}, + {value: 25, name: '水质',num:95}, + {value: 1, name: '',num:0}, + {value: 15, name: '特征污染物',num:94}, + {value: 1, name: '',num:0}, + {value: 20, name: '废气',num:91}, + {value: 1, name: '',num:0}, + {value: 15, name: '废水',num:89}, + {value: 1, name: '',num:0}, + ], + color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null], + emphasis: { + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + }, + formatter:function (params) { + return params.data.name+' : '+ params.data.num+'%' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' +} diff --git a/src/components/smartEmergency/control/left/controlLeft.component.html b/src/components/smartEmergency/control/left/controlLeft.component.html new file mode 100644 index 0000000..478e0f7 --- /dev/null +++ b/src/components/smartEmergency/control/left/controlLeft.component.html @@ -0,0 +1,84 @@ +
+
+
+
+
+
+
+
    +
  • 事故类型:{{info.typeName}}
  • +
  • 事故内容:{{info.content}}
  • +
  • + 事故级别: + {{ levelName }} + + 上调 + 下调 +
  • +
  • 关联危险源:石油炼制单元
  • +
  • 上报位置:{{info.address}} +
  • +
  • 上报人:{{ info.reporter }} + 一健联系 +
  • +
+
+
应急任务
+
+ 安全保障 + 医疗救援 + 人流控制 +
+ +
+
+
+ {{ item.org }} +

{{item.content}}

+
+
负责人:{{item.head}}
+ +
+
+ + + +
+
+
+
应急中...
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+ 应急准备 + 事态控制 + 善后工作 +
+
+ +
{{active === 3?'完成':'下一步'}}
+
+
+ +
diff --git a/src/components/smartEmergency/control/left/controlLeft.component.ts b/src/components/smartEmergency/control/left/controlLeft.component.ts new file mode 100644 index 0000000..3a4eb6e --- /dev/null +++ b/src/components/smartEmergency/control/left/controlLeft.component.ts @@ -0,0 +1,390 @@ +import {Component, Emit, Prop, Vue} from 'vue-property-decorator'; +import template from "./controlLeft.component.html" +import {pieChartData} from "./chartData"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" +import * as turf from '@turf/turf' +import Mock from "mockjs" +import moment from "moment" +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, +}) +export default class ControlLeftComponent extends Vue { + //传入的报警信息详情 + @Prop({ + default: function () { + return { + "typeName": "火灾", + "content": "北京汉邦唐化工厂区发生火灾", + "levelName": "二级", + "levelClass": "level-2-text", + "levelClassIcon": "level-2", + "time": "2023-05-15 15:21:35", + "address": "工厂厂房", + "reporter": "蒋丽", + "tableHeader": [ + { + "prop": "name", + "label": "摄像头名称" + }, + { + "prop": "type", + "label": "类型" + }, + { + "prop": "distance", + "label": "距离 (m)" + } + ], + "tableData": [ + { + "type": "简型摄像头", + "distance": "10", + "name": "1号摄像头" + }, + { + "type": "简型摄像头", + "distance": "20", + "name": "2号摄像头" + }, + { + "type": "简型摄像头", + "distance": "22", + "name": "3号摄像头" + }, + { + "type": "简型摄像头", + "distance": "10", + "name": "4号摄像头" + }, + { + "type": "简型摄像头", + "distance": "20", + "name": "5号摄像头" + }, + { + "type": "简型摄像头", + "distance": "22", + "name": "6号摄像头" + } + ], + "title": "火灾爆炸", + "info": "北京汉邦唐化工厂区发生火灾", + "level": "1", + "type": "fire", + "tel": 13231475537, + "id": "110000197911038403", + "position": [ + 13312990.72, + 4098613.12, + 0.51 + ] + } + } + }) info!: any[]; + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + + currentCompany = false + popObj:any = { + popTitle:'报警记录', + type:'', + title: '风险点异常', + info: '', + time: '', + address:'', + level: '', + typeName:"", + reporter:"", + tel:"", + position:[], + content:"", + typeId:"", + id:'' + + } + typeList =[ + { + label:'气体泄露', + value:'normal', + level:2, + id:1 + },{ + label:'火灾爆炸', + value:'fire', + level:1, + id:2 + },{ + label:'气液泄露', + value:'normal', + level:1, + id:3 + },{ + label:'安全事故', + value:'normal', + level:2, + id:4 + },{ + label:'自然灾害', + value:'normal', + level:3, + id:5 + }, + ] + levelClass = 'level-1'; + levelName = '一级'; + level=1; + cardText = 'level-1-text'; + taskList = [ + { + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + },{ + head:'张大仙', + content:'派驻安保人员,辅助警示设备以及隔离设备,控制进入人流,如果字数比较多…', + checked:false, + }, + ] + + // 当前进度条 + active = 1 + radioActive = 1 + customColor = '#ffffff' + percentage = 50 + changeRadio(type){ + this.radioActive = type + if (type === 1){ + this.percentage = 50 + this.taskList = this.taskList.map((item,i)=>{ + item.checked = false + if ([2,3,5,7,9].includes(i)){ + item.checked = true + } + return item + }) + }else if(type === 2){ + this.percentage = 70 + this.taskList = this.taskList.map((item,i)=>{ + item.checked = false + if ([1,2,3,5,7,8,9].includes(i)){ + item.checked = true + } + return item + }) + }else{ + this.percentage = 80 + this.taskList = this.taskList.map((item,i)=>{ + item.checked = false + if ([1,2,3,5,6,7,8,9].includes(i)){ + item.checked = true + } + return item + }) + + } + } + get dataList(){ + return this.$store.state.warningList + } + changeBox(item){ + item.checked = !item.checked + const find = this.taskList.filter(item => item.checked) + this.percentage = find.length*10 + } + + //下一步操作 + nextStep(){ + if (this.active<3){ + this.active++ + } + this.gotoNext() + } + @Emit('gotoNext') + gotoNext(){ + // + } + changeLevel(type){ + if (type === 'up'){ + if (this.level === 1){ + return + } + this.level-- + + }else if(type === 'down'){ + if (this.level === 4){ + return + } + this.level++ + } + const nameList = { + 1:'一级', + 2:'二级', + 3:'三级', + 4:'四级', + } + this.levelName = nameList[this.level] + this.levelClass = `level-${this.level}` + this.cardText = `level-${this.level}-text` + } + setData(val,type){ + if (type === 'typeName'){ + const find = this.typeList.find(item=>item.id == val) as any + this.popObj.level = find.level + this.popObj.title = find.label + this.popObj.type = find.value + } + this.popObj[type] = val + } + + //展示告警信息 + showWaring(item){ + const levelMap = { + 1:'一级', + 2:'二级', + 3:'三级', + } + const levelClassMap = { + 3:'blue', + 2:'yellow', + 1:'red', + } + this.getItem(Object.assign(item,{ + type:'风险告警', + level:item.level, + levelClass:levelClassMap[item.level], + levelName:levelMap[item.level], + content:'监测数值异常', + time:'2023年1月20日 14:33:33', + equipment:'北区广场监测点', + tableHeader:[ + { + 'prop':'alarmSubject', + 'label':'告警主体', + 'width':'90px', + }, { + 'prop':'COD', + 'label':'COD', + }, { + 'prop':'standard', + 'label':'标准值', + }, + ], + tableData: [{ + 'alarmSubject': '排放量', + 'COD': '456m3', + 'standard': '466m3', + }, { + 'alarmSubject': '排放浓度', + 'COD': '2.6mg/L', + 'standard': '2.5mg/L', + }, { + 'alarmSubject': '排放时间', + 'COD': '2023.3.31 05:03:45', + 'standard': '8:00-22:00', + }, { + 'alarmSubject': '排放浓度', + 'COD': '2.6mg/L', + 'standard': '2.5mg/L', + }, { + 'alarmSubject': '排放时间', + 'COD': '2023.3.31 05:03:45', + 'standard': '8:00-22:00', + }] + })) + } + //点击告警信息 + @Emit() + getItem(item) { + // console.log('item', item) + } + + count = 1 + + + mounted() { + + } + + destroyed() { + + } + + changeMore() { + console.log(1) + } + + changeClose() { + console.log(1) + } + addManual(){ + this.currentCompany = true + } + submitWaring(){ + this.popObj.id = Mock.mock("@id"); + if (this.popObj.type === 'normal'){ + this.popObj.position=turf.randomPosition([ + 13312995.84, + 4098177.2800000003, + 13313096.96, + 4098754.88, + ]); + }else if(this.popObj.type === 'fire'){ + this.popObj.position= [13312990.72, 4098613.12, 0.51] + } + this.popObj.time = moment().subtract(0,"days").format("YYYY-MM-DD HH:mm:ss") + + this.$store.commit("upDateWaringList",[this.popObj]) + this.currentCompany=false + } + //点击点位 + @Emit('changePoint') + changePoint(item) { + console.log(item) +// + } +} + diff --git a/src/components/smartEmergency/control/right/chartData.js b/src/components/smartEmergency/control/right/chartData.js new file mode 100644 index 0000000..ae9ddae --- /dev/null +++ b/src/components/smartEmergency/control/right/chartData.js @@ -0,0 +1,112 @@ + +export const lineChartData = function () { + return { + color:['#FADFA4','#947FEA'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: ['1月','2月','3月','4月','5月'] + }, + legend: { + top: 'top', + itemGap: 30, + itemWidth: 8, + itemHeight: 8, + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff" + }, + data:[ + { + name:'应急事件', + icon:'roundRect' + },{ + name:'应急演练', + icon:'roundRect' + } + ] + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name:'应急事件', + data: [60,80,140,70,100], + type: 'line', + symbolSize: 4, + symbol: 'circle', + lineStyle: { + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + },{ + name:'应急演练', + data: [50,70,130,60,90], + type: 'line', + symbolSize: 4, + symbol: 'circle', + lineStyle: { + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + } + ], + + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 30, + x2: 12, + y2: 20, + } + } +} diff --git a/src/components/smartEmergency/control/right/controlRight.component.html b/src/components/smartEmergency/control/right/controlRight.component.html new file mode 100644 index 0000000..40ca692 --- /dev/null +++ b/src/components/smartEmergency/control/right/controlRight.component.html @@ -0,0 +1,120 @@ +
+
+
+
+
+
+

745

+

区域内人数

+
+
+
+
+
+

84

+

区域内车辆

+
+
+
+
+ 附近摄像头 + 移动摄像头 +
+
+ 摄像头名称 + 类型 + 距离 (m) +
+
+
+ {{ item.name }} + {{ item.type }} + {{ item.distance }} +
+ +
+ +
+
+ 火灾救援 +
+ + 张三 + + , + + 高光易 + + , + + 薛想 + +
+
+
+ 医疗救助 +
+ + 张三 + + , + + 高光易 + + , + + 薛想 + +
+
+
+ 化学防护 +
+ + 张三 + + , + + 高光易 + + , + + 薛想 + +
+
+
+
+
+
+
+
+
事故事态简报
+
+
+
+
+
+
+
+ + + 事故造成伤亡人员 + 暂无 +
+
+ + + {{activity.timestamp}} {{activity.content}} + + +
+
+ +
diff --git a/src/components/smartEmergency/control/right/controlRight.component.ts b/src/components/smartEmergency/control/right/controlRight.component.ts new file mode 100644 index 0000000..d2f61f7 --- /dev/null +++ b/src/components/smartEmergency/control/right/controlRight.component.ts @@ -0,0 +1,281 @@ +import {Component, Emit, Prop, Vue} from 'vue-property-decorator'; +import template from "./controlRight.component.html" +import TitleComponent from "@/components/title.component.vue" +import Mock from "mockjs" +import * as turf from "@turf/turf"; +import moment from "moment"; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class ControlRightComponent extends Vue { + //传入的报警信息详情 + @Prop({ + default: function () { + return { + } + } + }) info!: any; + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + + currentCompany = false + popObj:any = { + popTitle:'报警记录', + type:'', + title: '风险点异常', + info: '', + time: '', + address:'', + level: '', + typeName:"", + reporter:"", + tel:"", + position:[], + content:"", + typeId:"", + id:'' + + } + typeList =[ + { + label:'气体泄露', + value:'normal', + level:2, + id:1 + },{ + label:'火灾爆炸', + value:'fire', + level:1, + id:2 + },{ + label:'气液泄露', + value:'normal', + level:1, + id:3 + },{ + label:'安全事故', + value:'normal', + level:2, + id:4 + },{ + label:'自然灾害', + value:'normal', + level:3, + id:5 + }, + ] + levelClass = 'level-1'; + levelName = '一级'; + level=1; + cardText = 'level-1-text'; + tableDataVicinity = [ + { + position:'人民广场东北库', + distance:'10', + num:'99', + checked:false, + },{ + position:'人民广场西南库', + distance:'20', + num:'69', + checked:false, + },{ + position:'人民广场西北库', + distance:'30', + num:'169', + checked:false, + }, + ] + activities = [{ + content: '消防车到达3辆 ', + timestamp: '12:30:11' + }, { + content: '救援小组到达20人', + timestamp: '12:24:11' + }, { + content: '安保小组到达 40人', + timestamp: '12:20:11' + }] + searchVal = '' + // 当前进度条 + active = 1 + get dataList(){ + return this.$store.state.warningList + } + //获取摄像头 + get cameraList(){ + const from = this.info.position; + const tempData = this.$store.state.cameraList.map((item,i)=>{ + const to = item.position; + const distance = Math.floor(turf.distance(from, to, {units: 'meters'})/100000); + const temp = { + type:'简型摄像头', + distance, + name:`${i}号摄像头`, + } + return {...item,...temp} + }) + return tempData.filter(item => item.distance <= 100).toSorted((a, b) => a.distance - b.distance) + } + radioActive = 1 + changeRadio(type){ + this.radioActive = type + } + seachData(){ + console.log(this.searchVal) + } + //下一步操作 + nextStep(){ + if (this.active<3){ + this.active++ + } + } + changeLevel(type){ + if (type === 'up'){ + if (this.level === 1){ + return + } + this.level-- + + }else if(type === 'down'){ + if (this.level === 4){ + return + } + this.level++ + } + const nameList = { + 1:'一级', + 2:'二级', + 3:'三级', + 4:'四级', + } + this.levelName = nameList[this.level] + this.levelClass = `level-${this.level}` + this.cardText = `level-${this.level}-text` + } + setData(val,type){ + if (type === 'typeName'){ + const find = this.typeList.find(item=>item.id == val) as any + this.popObj.level = find.level + this.popObj.title = find.label + this.popObj.type = find.value + } + this.popObj[type] = val + } + + //展示告警信息 + showWaring(item){ + const levelMap = { + 1:'一级', + 2:'二级', + 3:'三级', + } + const levelClassMap = { + 3:'blue', + 2:'yellow', + 1:'red', + } + this.getItem(Object.assign(item,{ + type:'风险告警', + level:item.level, + levelClass:levelClassMap[item.level], + levelName:levelMap[item.level], + content:'监测数值异常', + time:'2023年1月20日 14:33:33', + equipment:'北区广场监测点', + tableHeader:[ + { + 'prop':'alarmSubject', + 'label':'告警主体', + 'width':'90px', + }, { + 'prop':'COD', + 'label':'COD', + }, { + 'prop':'standard', + 'label':'标准值', + }, + ], + tableData: [{ + 'alarmSubject': '排放量', + 'COD': '456m3', + 'standard': '466m3', + }, { + 'alarmSubject': '排放浓度', + 'COD': '2.6mg/L', + 'standard': '2.5mg/L', + }, { + 'alarmSubject': '排放时间', + 'COD': '2023.3.31 05:03:45', + 'standard': '8:00-22:00', + }, { + 'alarmSubject': '排放浓度', + 'COD': '2.6mg/L', + 'standard': '2.5mg/L', + }, { + 'alarmSubject': '排放时间', + 'COD': '2023.3.31 05:03:45', + 'standard': '8:00-22:00', + }] + })) + } + //点击告警信息 + @Emit() + getItem(item) { + // console.log('item', item) + } + //打开视频 + @Emit('openVideo') + openVideo(item) { + // console.log('item', item) + } + count = 1 + + + mounted() { + + } + + destroyed() { + + } + + changeMore() { + console.log(1) + } + + changeClose() { + console.log(1) + } + addManual(){ + this.currentCompany = true + } + submitWaring(){ + this.popObj.id = Mock.mock("@id"); + if (this.popObj.type === 'normal'){ + this.popObj.position=turf.randomPosition([ + 13312995.84, + 4098177.2800000003, + 13313096.96, + 4098754.88, + ]); + }else if(this.popObj.type === 'fire'){ + this.popObj.position= [13312990.72, 4098613.12, 0.51] + } + this.popObj.time = moment().subtract(0,"days").format("YYYY-MM-DD HH:mm:ss") + + this.$store.commit("upDateWaringList",[this.popObj]) + this.currentCompany=false + } +} + diff --git a/src/components/smartEmergency/goods/left/chartData.js b/src/components/smartEmergency/goods/left/chartData.js new file mode 100644 index 0000000..efdb970 --- /dev/null +++ b/src/components/smartEmergency/goods/left/chartData.js @@ -0,0 +1,98 @@ +export const pieChartData = { + title: { + text: '90%', + subtext: '在线率', + itemGap: 5, + x: 105, + y: '37%', + textStyle: { + fontSize: 30, + fontWeight: '600', + fontStyle: 'italic', + color: '#E8E8E8', + }, + subtextStyle: { + fontSize: 17, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + trigger: 'item' + }, + legend: { + orient: 'vertical', + right: '0%', + top: 'bottom', + height:100, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 25, name: '气体'}, + {value: 25, name: '水质'}, + {value: 15, name: '特征污染物'}, + {value: 20, name: '废气'}, + {value: 15, name: '废水'} + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left:-50, + radius: [50, 75], + data: [ + {value: 25, name: '气体',num:90}, + {value: 1, name: '',num:0}, + {value: 25, name: '水质',num:95}, + {value: 1, name: '',num:0}, + {value: 15, name: '特征污染物',num:94}, + {value: 1, name: '',num:0}, + {value: 20, name: '废气',num:91}, + {value: 1, name: '',num:0}, + {value: 15, name: '废水',num:89}, + {value: 1, name: '',num:0}, + ], + color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null], + emphasis: { + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + }, + formatter:function (params) { + return params.data.name+' : '+ params.data.num+'%' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' +} diff --git a/src/components/smartEmergency/goods/left/goodsHomeLeft.component.html b/src/components/smartEmergency/goods/left/goodsHomeLeft.component.html new file mode 100644 index 0000000..fb62e1b --- /dev/null +++ b/src/components/smartEmergency/goods/left/goodsHomeLeft.component.html @@ -0,0 +1,95 @@ +
+
+ + 物资盘点 + + +
+
+ +
+
+ +
+

{{item.name}}

+

{{item.num}}/{{item.total}} 件

+
+
+ {{['red','orange'].includes(getStyle(item).bg)?'急缺':'缺少'}} +
+
+
+
+
+
+
+ + +
+
+
+
+
+
+ +
+
+ 物资存放点 + 完备率 +
+
+
+ {{ item.name }} + {{ item.num }} + +
+
+
+ + + +
+
×
+
+
+
+
+
缺失物资清单
+
+ +
+ + 导出 +
+ +
+ +
+ 物资名称 + 物资类型 + 物资存放点 + 应备 + 已有 + 缺失 +
+
+
+ {{item.name}} + {{item.type}} + {{item.address}} + {{item.total}} + {{item.num}} + {{(item.total-item.num)<0?'':item.total-item.num}} +
+
+ + +
+
diff --git a/src/components/smartEmergency/goods/left/goodsHomeLeft.component.ts b/src/components/smartEmergency/goods/left/goodsHomeLeft.component.ts new file mode 100644 index 0000000..8aad6be --- /dev/null +++ b/src/components/smartEmergency/goods/left/goodsHomeLeft.component.ts @@ -0,0 +1,502 @@ +import {Component, Emit, Vue} from 'vue-property-decorator'; +import template from "./goodsHomeLeft.component.html" +import TitleComponent from "@/components/title.component.vue" +import * as turf from '@turf/turf' +import Mock from "mockjs" +import moment from "moment" +import("@/assets/style/pageCommon.component.scss") + +@Component({ + template, + components: { + TitleComponent + }, +}) +export default class GoodsHomeLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + imgFireHammer = require("@/assets/img/eme/eme_Fireaxe.png"); + imgExtinguisher = require("@/assets/img/eme/eme_extinguisher.png"); + imgMedicineBag = require("@/assets/img/eme/eme_medicinebag.png"); + fu = require("@/assets/img/eme/fuzi.png"); + mhq = require("@/assets/img/eme/mhq.png"); + bag = require("@/assets/img/eme/wz.png"); + searchValue = '' + showLogPop = false + popObj:any = { + popTitle:'报警记录', + type:'', + title: '风险点异常', + info: '', + time: '', + address:'', + level: '', + typeName:"", + reporter:"", + tel:"", + position:[], + content:"", + typeId:"", + id:'' + + } + goodsList = [ + { + type:'fu', + name:'消防斧', + num:10, + total:10, + },{ + type:'fu', + name:'消防斧', + num:20, + total:20, + },{ + type:'mhq', + name:'灭火器', + num:5, + total:10, + },{ + type:'bag', + name:'急救包', + num:8, + total:10, + },{ + type:'fu', + name:'消防斧', + num:9, + total:10, + },{ + type:'bag', + name:'急救包', + num:10, + total:10, + },{ + type:'fu', + name:'消防斧', + num:10, + total:10, + },{ + type:'fu', + name:'消防斧', + num:20, + total:20, + },{ + type:'mhq', + name:'灭火器', + num:5, + total:10, + },{ + type:'bag', + name:'急救包', + num:8, + total:10, + },{ + type:'fu', + name:'消防斧', + num:9, + total:10, + },{ + type:'bag', + name:'急救包', + num:10, + total:10, + },{ + type:'fu', + name:'消防斧', + num:10, + total:10, + },{ + type:'fu', + name:'消防斧', + num:20, + total:20, + },{ + type:'mhq', + name:'灭火器', + num:5, + total:10, + },{ + type:'bag', + name:'急救包', + num:8, + total:10, + },{ + type:'fu', + name:'消防斧', + num:9, + total:10, + },{ + type:'bag', + name:'急救包', + num:10, + total:10, + },{ + type:'fu', + name:'消防斧', + num:10, + total:10, + },{ + type:'fu', + name:'消防斧', + num:20, + total:20, + },{ + type:'mhq', + name:'灭火器', + num:5, + total:10, + },{ + type:'bag', + name:'急救包', + num:8, + total:10, + },{ + type:'fu', + name:'消防斧', + num:9, + total:10, + },{ + type:'mhq', + name:'灭火器', + num:5, + total:10, + },{ + type:'bag', + name:'急救包', + num:8, + total:10, + },{ + type:'fu', + name:'消防斧', + num:9, + total:10, + },{ + type:'bag', + name:'急救包', + num:10, + total:10, + },{ + type:'fu', + name:'消防斧', + num:10, + total:10, + },{ + type:'fu', + name:'消防斧', + num:20, + total:20, + },{ + type:'mhq', + name:'灭火器', + num:5, + total:10, + },{ + type:'bag', + name:'急救包', + num:8, + total:10, + },{ + type:'fu', + name:'消防斧', + num:9, + total:10, + },{ + type:'mhq', + name:'灭火器', + num:5, + total:10, + },{ + type:'bag', + name:'急救包', + num:8, + total:10, + },{ + type:'fu', + name:'消防斧', + num:9, + total:10, + },{ + type:'bag', + name:'急救包', + num:10, + total:10, + },{ + type:'fu', + name:'消防斧', + num:10, + total:10, + },{ + type:'fu', + name:'消防斧', + num:20, + total:20, + },{ + type:'mhq', + name:'灭火器', + num:5, + total:10, + },{ + type:'bag', + name:'急救包', + num:8, + total:10, + },{ + type:'fu', + name:'消防斧', + num:9, + total:10, + },{ + type:'bag', + name:'急救包', + num:10, + total:10, + }, + ] + tableData = [ + { + type:'fu', + name:'仓库', + num:10, + total:10, + },{ + type:'fu', + name:'消防柜', + num:20, + total:20, + },{ + type:'mhq', + name:'避难中心', + num:5, + total:10, + },{ + type:'bag', + name:'园区南仓库', + num:8, + total:10, + },{ + type:'fu', + name:'园区东仓库', + num:9, + total:10, + },{ + type:'bag', + name:'园区北仓库', + num:10, + total:10, + },{ + type:'fu', + name:'园区西仓库', + num:10, + total:10, + } + ] + listTableData = [ + { + 'name':'穿戴式防爆照明灯', + 'type':'照明灯', + 'address':'仓库A', + 'total':200, + 'num':120 + }, + { + 'name':'消防斧', + 'type':'消防', + 'address':'仓库A', + 'total':30, + 'num':10 + }, + { + 'name':'穿戴式防爆照明灯', + 'type':'照明灯', + 'address':'仓库A', + 'total':200, + 'num':120 + }, + { + 'name':'消防斧', + 'type':'消防', + 'address':'仓库A', + 'total':30, + 'num':25 + },{ + 'name':'穿戴式防爆照明灯', + 'type':'照明灯', + 'address':'仓库A', + 'total':200, + 'num':160 + }, { + 'name':'消防斧', + 'type':'消防', + 'address':'仓库A', + 'total':30, + 'num':24 + },{ + 'name':'穿戴式防爆照明灯', + 'type':'照明灯', + 'address':'仓库A', + 'total':200, + 'num':190 + }, { + 'name':'消防斧', + 'type':'消防', + 'address':'仓库A', + 'total':30, + 'num':10 + },{ + 'name':'穿戴式防爆照明灯', + 'type':'照明灯', + 'address':'仓库A', + 'total':200, + 'num':120 + }, { + 'name':'消防斧', + 'type':'消防', + 'address':'仓库A', + 'total':30, + 'num':10 + },{ + 'name':'穿戴式防爆照明灯', + 'type':'照明灯', + 'address':'仓库A', + 'total':200, + 'num':120 + }, { + 'name':'消防斧', + 'type':'消防', + 'address':'仓库A', + 'total':30, + 'num':10 + }, + ] + getImg(type){ + const imgMap = { + 'fu':this.imgFireHammer, + 'mhq':this.imgExtinguisher, + 'bag':this.imgMedicineBag + } + return imgMap[type] + } + getImgBg(type){ + const imgMap = { + 'fu':this.fu, + 'mhq':this.mhq, + 'bag':this.bag + } + return imgMap[type] + } + getStyle(item){ + const val = item.num/item.total + let colorObj:any = { + border:'', + bg:'', + line:'' + } + if (val>=1){ + colorObj = { + border:'', + bg:'', + line:'', + width:'100%' + } + }else if (val<1 && val>=0.9){ + colorObj = { + border:'blue-border', + bg:'blue', + line:'blue-line', + width:`${val*100}%` + } + }else if (val<0.9 && val>=0.7){ + colorObj = { + border:'yellow-border', + bg:'yellow', + line:'yellow-line', + width:`${val*100}%` + } + }else if (val<0.7 && val>=0.5){ + colorObj = { + border:'orange-border', + bg:'orange', + line:'orange-line', + width:`${val*100}%` + } + }else if (val<0.5){ + colorObj = { + border:'red-border', + bg:'red', + line:'red-line', + width:`${val*100}%` + } + } + return colorObj + } + typeList =[ + { + label:'气体泄露', + value:'normal', + level:2, + id:1 + },{ + label:'火灾爆炸', + value:'fire', + level:1, + id:2 + },{ + label:'气液泄露', + value:'normal', + level:1, + id:3 + },{ + label:'安全事故', + value:'normal', + level:2, + id:4 + },{ + label:'自然灾害', + value:'normal', + level:3, + id:5 + }, + ] + setData(val,type){ + if (type === 'typeName'){ + const find = this.typeList.find(item=>item.id == val) as any + this.popObj.level = find.level + this.popObj.title = find.label + this.popObj.type = find.value + } + this.popObj[type] = val + } + //点击告警信息 + @Emit() + getItem(item) { + // console.log('item', item) + } + + count = 1 + + + mounted() { +// + } + + destroyed() { +// + } + + showListData() { + this.showLogPop = true + } + showGoodsList(item){ + console.log(item) + this.showList(item) + } + @Emit('showList') + showList(item){ + console.log(item) + } + @Emit() + changeClose() { + console.log(1) + } +} diff --git a/src/components/smartEmergency/goods/right/chartData.js b/src/components/smartEmergency/goods/right/chartData.js new file mode 100644 index 0000000..495acd4 --- /dev/null +++ b/src/components/smartEmergency/goods/right/chartData.js @@ -0,0 +1,232 @@ + +export const lineChartData = function () { + return { + color:['#FADFA4','#947FEA'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: ['1月','2月','3月','4月','5月'] + }, + legend: { + top: 'top', + itemGap: 30, + itemWidth: 8, + itemHeight: 8, + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff" + }, + data:[ + { + name:'使用量', + icon:'roundRect' + },{ + name:'过期量', + icon:'roundRect' + } + ] + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name:'使用量', + data: [60,80,140,70,100], + type: 'line', + symbolSize: 4, + symbol: 'circle', + lineStyle: { + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + },{ + name:'过期量', + data: [50,70,130,60,90], + type: 'line', + symbolSize: 4, + symbol: 'circle', + lineStyle: { + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + } + ], + + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 30, + x2: 12, + y2: 20, + } + } +} + +export const pieChartData = { + title: { + show:false, + text: '90%', + subtext: '在线率', + itemGap: 5, + x: 105, + y: '37%', + textStyle: { + fontSize: 30, + fontWeight: '600', + fontStyle: 'italic', + color: '#E8E8E8', + }, + subtextStyle: { + fontSize: 17, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + trigger: 'item' + }, + legend: [ + { + orient: 'vertical', + right: '15%', + bottom: 0, + width:150, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 25, name: '警示'}, + {value: 25, name: '消防'}, + {value: 15, name: '排烟照明'}, + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + { + orient: 'vertical', + left: '25%', + bottom: 0, + width:150, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 20, name: '破拆'}, + {value: 15, name: '救生'}, + {value: 15, name: '环境监测'}, + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }], + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + top:0, + // left:-50, + radius: [55, 70], + center: ["50%", "38%"], + data: [ + {value: 25, name: '警示',num:21}, + {value: 1, name: '',num:0}, + {value: 25, name: '消防',num:21}, + {value: 1, name: '',num:0}, + {value: 15, name: '排烟照明',num:13}, + {value: 1, name: '',num:0}, + {value: 20, name: '破拆',num:17}, + {value: 1, name: '',num:0}, + {value: 15, name: '救生',num:17}, + {value: 1, name: '',num:0}, + {value: 15, name: '环境监测',num:17}, + {value: 1, name: '',num:0}, + ], + color: ['#ECFF7F', null, '#EA7F7F', null, '#FADFA4', null, '#7FB0FF', null, '#FFFFFF', null,'#947FEA',null], + emphasis: { + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + }, + formatter:function (params) { + return params.data.name+' : '+ params.data.num+'%' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' +} diff --git a/src/components/smartEmergency/goods/right/confirm.component.vue b/src/components/smartEmergency/goods/right/confirm.component.vue new file mode 100644 index 0000000..d51b4c8 --- /dev/null +++ b/src/components/smartEmergency/goods/right/confirm.component.vue @@ -0,0 +1,185 @@ + + + diff --git a/src/components/smartEmergency/goods/right/goodsRight.component.html b/src/components/smartEmergency/goods/right/goodsRight.component.html new file mode 100644 index 0000000..7fa124d --- /dev/null +++ b/src/components/smartEmergency/goods/right/goodsRight.component.html @@ -0,0 +1,109 @@ +
+
+ + 应急设施统计 + +
+
+ 消防站 + 2/3 +
+
+ 气防站 + 3/5 +
+
+ 避难中心 + 2/2 +
+
+ 防空洞 + 2/3 +
+
+ +
+
+ + 物资损耗统计 + +
+ 企业 + 公共 +
+ +
+
+ + 物资缺失类型分布 + + +
+ +
+
×
+
+
+
+
+
{{popTitle}}
+ + + + + + + + + + + + + + + + + + + + + + +
+
确认
+
取消
+
+
+ +
+
×
+
+
+
+
+
报警记录
+
+ 告警类型 + 告警内容 + 报警内容 + 上报人员 + 事故地点 + 处理意见 +
+
+
+ {{item.type}} + {{item.content}} + {{item.alarm}} + {{item.reporter}} + {{item.address}} + {{item.suggestion}} +
+
+ + +
+
diff --git a/src/components/smartEmergency/goods/right/goodsRight.component.ts b/src/components/smartEmergency/goods/right/goodsRight.component.ts new file mode 100644 index 0000000..8da8bcc --- /dev/null +++ b/src/components/smartEmergency/goods/right/goodsRight.component.ts @@ -0,0 +1,315 @@ +import {Component, Vue} from 'vue-property-decorator'; +import template from "./goodsRight.component.html" +import {lineChartData,pieChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class GoodsRightComponent extends Vue { + //标题图片 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //定时器 + timer: any = null; + //折线图数据 + option: any = {} + //折线图实例 + lineChart: any = {} + //环形图数据 + pieChartData: any = pieChartData + //环形图实例 + pie:any = {} + // 计数 + count = 0 + public colors = [ + {color: '#FF5959', percentage: 20}, + {color: '#FFA900', percentage: 40}, + {color: '#FADFA4', percentage: 60}, + {color: '#C9FFD7', percentage: 80}, + {color: '#76c893', percentage: 100} + ]; + showPop = false + showLogPop = false + popTitle = '开启演练' + popObj:any = { + popTitle:'报警记录', + type:'', + title: '风险点异常', + info: '', + time: '', + address:'', + level: '', + typeName:"", + reporter:"", + tel:"", + position:[], + content:"", + typeId:"", + plan:"", + linkPlan:"化工园区氢气泄露处理预案", + id:'' + + } + typeList =[ + { + label:'气体泄露', + value:'normal', + level:2, + id:1 + },{ + label:'火灾爆炸', + value:'fire', + level:1, + id:2 + },{ + label:'气液泄露', + value:'normal', + level:1, + id:3 + },{ + label:'安全事故', + value:'normal', + level:2, + id:4 + },{ + label:'自然灾害', + value:'normal', + level:3, + id:5 + }, + ] + levelList =[ + { + label:'一级', + value:'1', + id:1 + },{ + label:'二级', + value:'2', + id:2 + },{ + label:'三级', + value:'3', + id:3 + },{ + label:'四级', + value:'4', + id:4 + } + ] + planList =[ + { + label:'氢气泄露演练', + value:'氢气泄露演练', + id:1 + },{ + label:'氯气泄露演练', + value:'氯气泄露演练', + id:2 + },{ + label:'氯化氢泄露演练', + value:'氯化氢泄露演练', + id:3 + },{ + label:'二氧化硫泄露演练', + value:'二氧化硫泄露演练', + id:5 + } + ] + linkPlanList =[ + { + label:'化工园区氢气泄露处理预案', + value:'化工园区氢气泄露处理预案', + id:1 + } + ] + tableData = [ + { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + },{ + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, + ] + + + public textFormat(data){ + return "" + } + public getCount(data){ + this.count = 0; + setTimeout(()=>{ + const timer = setInterval(()=>{ + if(this.countitem.id == val) as any + this.popObj.title = find.label + this.popObj.type = find.value + } + this.popObj[type] = val + } + //图表自适应 + resize() { + setTimeout(() => { + this.lineChart.resize(); + }, 300) + } + + timerForLineData: any = null; + + //自动切换line图表数据 + autoChangeLineData() { + this.timerForLineData = setInterval(() => { + this.lineChart.clear() + this.lineChart.setOption(this.option) + this.getCount(this.count) + }, 5000) + } + + //获取范围内随机数 + getRandomInt(min: number, max: number) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值 + } + + mounted() { + this.getCount(70) + this.autoChangeLineData() + window.addEventListener("resize", this.resize); + } + + //初始化line图表 + initLineData() { + this.option = lineChartData() + } + + beforeDestroy() { + clearInterval(this.timer) + clearInterval(this.timerForLineData) + } + + destroyed() { + window.removeEventListener("resize", this.resize) + } + + //改变污染物监测颜色 + changeColor(val) { + if (Number(val) <= 30) { + return '#ffffff' + } else if (Number(val) > 30 && Number(val) <= 50) { + return '#F2A183' + } else { + return '#DD7171' + } + + } + radioActive = 1 + changeRadio(type){ + this.radioActive = type + } +} + diff --git a/src/components/smartEmergency/goods/right/storeGoods.component.vue b/src/components/smartEmergency/goods/right/storeGoods.component.vue new file mode 100644 index 0000000..0c1db43 --- /dev/null +++ b/src/components/smartEmergency/goods/right/storeGoods.component.vue @@ -0,0 +1,359 @@ + + + + diff --git a/src/components/smartEmergency/home/left/chartData.js b/src/components/smartEmergency/home/left/chartData.js new file mode 100644 index 0000000..efdb970 --- /dev/null +++ b/src/components/smartEmergency/home/left/chartData.js @@ -0,0 +1,98 @@ +export const pieChartData = { + title: { + text: '90%', + subtext: '在线率', + itemGap: 5, + x: 105, + y: '37%', + textStyle: { + fontSize: 30, + fontWeight: '600', + fontStyle: 'italic', + color: '#E8E8E8', + }, + subtextStyle: { + fontSize: 17, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + trigger: 'item' + }, + legend: { + orient: 'vertical', + right: '0%', + top: 'bottom', + height:100, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 25, name: '气体'}, + {value: 25, name: '水质'}, + {value: 15, name: '特征污染物'}, + {value: 20, name: '废气'}, + {value: 15, name: '废水'} + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left:-50, + radius: [50, 75], + data: [ + {value: 25, name: '气体',num:90}, + {value: 1, name: '',num:0}, + {value: 25, name: '水质',num:95}, + {value: 1, name: '',num:0}, + {value: 15, name: '特征污染物',num:94}, + {value: 1, name: '',num:0}, + {value: 20, name: '废气',num:91}, + {value: 1, name: '',num:0}, + {value: 15, name: '废水',num:89}, + {value: 1, name: '',num:0}, + ], + color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null], + emphasis: { + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + }, + formatter:function (params) { + return params.data.name+' : '+ params.data.num+'%' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' +} diff --git a/src/components/smartEmergency/home/left/emergencyHomeLeft.component.html b/src/components/smartEmergency/home/left/emergencyHomeLeft.component.html new file mode 100644 index 0000000..104d148 --- /dev/null +++ b/src/components/smartEmergency/home/left/emergencyHomeLeft.component.html @@ -0,0 +1,161 @@ +
+
+ + 预警信息 + + +
+
+
应急值班小组:4
+
+
+ 消防组 +
+ + 张三 + + , + + 高光易 + + , + + 薛想 + +
+
+
+ 医疗队 +
+ + 张三 + + , + + 高光易 + + , + + 薛想 + +
+
+
+ 救援小组 +
+ + 张三 + + , + + 高光易 + + , + + 薛想 + +
+
+
+ 后勤处 +
+ + 张三 + + , + + 高光易 + + , + + 薛想 + +
+
+
+
值班专家:3
+
+
+ 火灾救援 +
+ + 张三 + + , + + 高光易 + + , + + 薛想 + +
+
+
+ 医疗救助 +
+ + 张三 + + , + + 高光易 + + , + + 薛想 + +
+
+
+ 化学防护 +
+ + 张三 + + , + + 高光易 + + , + + 薛想 + +
+
+
+
+ +
+
×
+
+
+
+
+
{{popObj.popTitle}}
+ + + + + + + + + + + + + + + + + + + +
+
提交
+
取消
+
+
+
diff --git a/src/components/smartEmergency/home/left/emergencyHomeLeft.component.ts b/src/components/smartEmergency/home/left/emergencyHomeLeft.component.ts new file mode 100644 index 0000000..146d345 --- /dev/null +++ b/src/components/smartEmergency/home/left/emergencyHomeLeft.component.ts @@ -0,0 +1,203 @@ +import {Component, Emit, Vue} from 'vue-property-decorator'; +import template from "./emergencyHomeLeft.component.html" +import {pieChartData} from "./chartData"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" +import * as turf from '@turf/turf' +import Mock from "mockjs" +import moment from "moment" +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, +}) +export default class EmergencyHomeLeftComponent extends Vue { + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + + currentCompany = false + popObj:any = { + popTitle:'报警记录', + type:'', + title: '风险点异常', + info: '', + time: '', + address:'', + level: '', + typeName:"", + reporter:"", + tel:"", + position:[], + content:"", + typeId:"", + id:'' + + } + typeList =[ + { + label:'气体泄露', + value:'normal', + level:2, + id:1 + },{ + label:'火灾爆炸', + value:'fire', + level:1, + id:2 + },{ + label:'气液泄露', + value:'normal', + level:1, + id:3 + },{ + label:'安全事故', + value:'normal', + level:2, + id:4 + },{ + label:'自然灾害', + value:'normal', + level:3, + id:5 + }, + ] + get dataList(){ + return this.$store.state.eventList + } + setData(val,type){ + if (type === 'typeName'){ + const find = this.typeList.find(item=>item.id == val) as any + this.popObj.level = find.level + this.popObj.typeName = find.label + this.popObj.title = find.label + this.popObj.type = find.value + }else{ + this.popObj[type] = val + } + + } + + //展示告警信息 + showWaring(item){ + this.getItem(Object.assign({ + typeName:'人员聚集', + content:'人员踩踏事故预警', + levelName:'二级', + levelClass:'level-2-text', + levelClassIcon:'level-2', + time:'2023年3月12日 13:56:00', + address:'工厂厂房', + reporter:'李四', + tableHeader:[ + { + prop:'name', + label:'摄像头名称' + },{ + prop:'type', + label:'类型' + },{ + prop:'distance', + label:'距离 (m)' + } + ], + tableData : [ + { + type:'简型摄像头', + distance:'10', + name:'1号摄像头', + },{ + type:'简型摄像头', + distance:'20', + name:'2号摄像头', + },{ + type:'简型摄像头', + distance:'22', + name:'3号摄像头', + },{ + type:'简型摄像头', + distance:'10', + name:'4号摄像头', + },{ + type:'简型摄像头', + distance:'20', + name:'5号摄像头', + },{ + type:'简型摄像头', + distance:'22', + name:'6号摄像头', + }, + ] + },item)) + } + //点击告警信息 + @Emit() + getItem(item) { + // console.log('item', item) + } + + count = 1 + + + mounted() { + + } + + destroyed() { + + } + + changeMore() { + console.log(1) + } + + changeClose() { + console.log(1) + } + addManual(){ + this.currentCompany = true + this.popObj = { + popTitle:'报警记录', + type:'', + title: '风险点异常', + info: '', + time: '', + address:'', + level: '', + typeName:"", + reporter:"", + tel:"", + position:[], + content:"", + typeId:"", + id:'' + + } + } + submitWaring(){ + this.popObj.id = Mock.mock("@id"); + if (this.popObj.type === 'normal'){ + this.popObj.position=turf.randomPosition([ + 13312995.84, + 4098177.2800000003, + 13313096.96, + 4098754.88, + ]); + }else if(this.popObj.type === 'fire'){ + this.popObj.position= [13312990.72, 4098613.12, 0.51] + } + this.popObj.time = moment().subtract(0,"days").format("YYYY-MM-DD HH:mm:ss") + + this.$store.commit("upDateEventList",[this.popObj]) + this.currentCompany=false + } +} + diff --git a/src/components/smartEmergency/home/right/chartData.js b/src/components/smartEmergency/home/right/chartData.js new file mode 100644 index 0000000..ae9ddae --- /dev/null +++ b/src/components/smartEmergency/home/right/chartData.js @@ -0,0 +1,112 @@ + +export const lineChartData = function () { + return { + color:['#FADFA4','#947FEA'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: ['1月','2月','3月','4月','5月'] + }, + legend: { + top: 'top', + itemGap: 30, + itemWidth: 8, + itemHeight: 8, + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff" + }, + data:[ + { + name:'应急事件', + icon:'roundRect' + },{ + name:'应急演练', + icon:'roundRect' + } + ] + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name:'应急事件', + data: [60,80,140,70,100], + type: 'line', + symbolSize: 4, + symbol: 'circle', + lineStyle: { + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + },{ + name:'应急演练', + data: [50,70,130,60,90], + type: 'line', + symbolSize: 4, + symbol: 'circle', + lineStyle: { + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + } + ], + + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 30, + x2: 12, + y2: 20, + } + } +} diff --git a/src/components/smartEmergency/home/right/confirm.component.vue b/src/components/smartEmergency/home/right/confirm.component.vue new file mode 100644 index 0000000..587a25c --- /dev/null +++ b/src/components/smartEmergency/home/right/confirm.component.vue @@ -0,0 +1,289 @@ + + + diff --git a/src/components/smartEmergency/home/right/judgment.component.vue b/src/components/smartEmergency/home/right/judgment.component.vue new file mode 100644 index 0000000..f0ac06c --- /dev/null +++ b/src/components/smartEmergency/home/right/judgment.component.vue @@ -0,0 +1,269 @@ + + + diff --git a/src/components/smartEmergency/home/right/smartEmergencyRight.component.html b/src/components/smartEmergency/home/right/smartEmergencyRight.component.html new file mode 100644 index 0000000..e57d782 --- /dev/null +++ b/src/components/smartEmergency/home/right/smartEmergencyRight.component.html @@ -0,0 +1,123 @@ +
+
+ + 应急统计 + +
+
+
+ 5 + +
+
未处理
+
+
+
+ + 30 + +
+
已处理
+
+
+
+ + 18 + +
+
已消警
+
+
+ +
+
+ + 应急演练 + +
+ 演练次数 + 5 +
+
最近一次演练时间:2月12日
+
开始演练
+
+
+ + 物资盘点 + +
+
+
{{count}}%
+ 物资完备度 +
+ +
+
+ +
+
×
+
+
+
+
+
{{popTitle}}
+ + + + + + + + + + + + + + + + + + + + + + +
+
确认
+
取消
+
+
+ +
+
×
+
+
+
+
+
报警记录
+
+ 告警类型 + 告警内容 + 报警内容 + 上报人员 + 事故地点 + 处理意见 +
+
+
+ {{item.type}} + {{item.content}} + {{item.alarm}} + {{item.reporter}} + {{item.address}} + {{item.suggestion}} +
+
+ + +
+
diff --git a/src/components/smartEmergency/home/right/smartEmergencyRight.component.ts b/src/components/smartEmergency/home/right/smartEmergencyRight.component.ts new file mode 100644 index 0000000..5c1ff82 --- /dev/null +++ b/src/components/smartEmergency/home/right/smartEmergencyRight.component.ts @@ -0,0 +1,321 @@ +import {Component, Emit, Vue} from 'vue-property-decorator'; +import template from "./smartEmergencyRight.component.html" +import {lineChartData} from "./chartData"; +import TitleComponent from "@/components/title.component.vue" +import * as echarts from 'echarts'; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class SmartEmergencyRightComponent extends Vue { + //标题图片 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + //定时器 + timer: any = null; + //折线图数据 + option: any = {} + //折线图实例 + lineChart: any = {} + // 计数 + count = 0 + public colors = [ + {color: '#FF5959', percentage: 20}, + {color: '#FFA900', percentage: 40}, + {color: '#FADFA4', percentage: 60}, + {color: '#C9FFD7', percentage: 80}, + {color: '#76c893', percentage: 100} + ]; + showPop = false + showLogPop = false + popTitle = '开启演练' + popObj:any = { + popTitle:'报警记录', + type:'', + title: '风险点异常', + info: '', + time: '', + address:'', + level: '', + typeName:"", + reporter:"", + tel:"", + position:[], + content:"", + typeId:"", + plan:"", + linkPlan:"化工园区氢气泄露处理预案", + id:'' + + } + typeList =[ + { + label:'气体泄露', + value:'normal', + level:2, + id:1 + },{ + label:'火灾爆炸', + value:'fire', + level:1, + id:2 + },{ + label:'气液泄露', + value:'normal', + level:1, + id:3 + },{ + label:'安全事故', + value:'normal', + level:2, + id:4 + },{ + label:'自然灾害', + value:'normal', + level:3, + id:5 + }, + ] + levelList =[ + { + label:'一级', + value:'1', + id:1 + },{ + label:'二级', + value:'2', + id:2 + },{ + label:'三级', + value:'3', + id:3 + },{ + label:'四级', + value:'4', + id:4 + } + ] + planList =[ + { + label:'氢气泄露演练', + value:'氢气泄露演练', + id:1 + },{ + label:'氯气泄露演练', + value:'氯气泄露演练', + id:2 + },{ + label:'氯化氢泄露演练', + value:'氯化氢泄露演练', + id:3 + },{ + label:'二氧化硫泄露演练', + value:'二氧化硫泄露演练', + id:5 + } + ] + linkPlanList =[ + { + label:'化工园区氢气泄露处理预案', + value:'化工园区氢气泄露处理预案', + id:1 + } + ] + tableData = [ + { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + },{ + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, { + type:'火灾爆炸', + content:'发生火灾', + alarm:'发生火灾', + reporter:'罗马', + address:'A号点位', + suggestion:'立即救援', + }, + ] + //开始演练 + startDrill(){ + this.showPop = true + } + //报警记录 + showLog(){ + this.showLogPop = true + } + submitWaring(){ + this.showPop = false + this.showPlan() + } + @Emit('showPlan') + showPlan(){ + // + } + public textFormat(data){ + return "" + } + public getCount(data){ + this.count = 0; + setTimeout(()=>{ + const timer = setInterval(()=>{ + if(this.countitem.id == val) as any + this.popObj.title = find.label + this.popObj.type = find.value + } + this.popObj[type] = val + } + //图表自适应 + resize() { + setTimeout(() => { + this.lineChart.resize(); + }, 300) + } + + timerForLineData: any = null; + + //自动切换line图表数据 + autoChangeLineData() { + this.timerForLineData = setInterval(() => { + this.lineChart.clear() + this.lineChart.setOption(this.option) + this.getCount(this.count) + }, 5000) + } + + //获取范围内随机数 + getRandomInt(min: number, max: number) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值 + } + + mounted() { + this.getCount(70) + this.autoChangeLineData() + window.addEventListener("resize", this.resize); + } + + //初始化line图表 + initLineData() { + this.option = lineChartData() + } + + beforeDestroy() { + clearInterval(this.timer) + clearInterval(this.timerForLineData) + } + + destroyed() { + window.removeEventListener("resize", this.resize) + } + + //改变污染物监测颜色 + changeColor(val) { + if (Number(val) <= 30) { + return '#ffffff' + } else if (Number(val) > 30 && Number(val) <= 50) { + return '#F2A183' + } else { + return '#DD7171' + } + + } +} + diff --git a/src/components/smartEmergency/plan/left/chartData.js b/src/components/smartEmergency/plan/left/chartData.js new file mode 100644 index 0000000..efdb970 --- /dev/null +++ b/src/components/smartEmergency/plan/left/chartData.js @@ -0,0 +1,98 @@ +export const pieChartData = { + title: { + text: '90%', + subtext: '在线率', + itemGap: 5, + x: 105, + y: '37%', + textStyle: { + fontSize: 30, + fontWeight: '600', + fontStyle: 'italic', + color: '#E8E8E8', + }, + subtextStyle: { + fontSize: 17, + fontWeight: 'normal', + align: "center", + color: '#E8E8E8' + }, + }, + tooltip: { + trigger: 'item' + }, + legend: { + orient: 'vertical', + right: '0%', + top: 'bottom', + height:100, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 25, name: '气体'}, + {value: 25, name: '水质'}, + {value: 15, name: '特征污染物'}, + {value: 20, name: '废气'}, + {value: 15, name: '废水'} + ], + textStyle: { + color: '#D4E5FF', + padding: [5, 10, 5, 10] + }, + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + left:-50, + radius: [50, 75], + data: [ + {value: 25, name: '气体',num:90}, + {value: 1, name: '',num:0}, + {value: 25, name: '水质',num:95}, + {value: 1, name: '',num:0}, + {value: 15, name: '特征污染物',num:94}, + {value: 1, name: '',num:0}, + {value: 20, name: '废气',num:91}, + {value: 1, name: '',num:0}, + {value: 15, name: '废水',num:89}, + {value: 1, name: '',num:0}, + ], + color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null], + emphasis: { + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: {}, + select: { + itemStyle: {} + }, + labelLine: { + show: false + }, + label: { + show: false + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + }, + formatter:function (params) { + return params.data.name+' : '+ params.data.num+'%' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' +} diff --git a/src/components/smartEmergency/plan/left/emergencyPlanLeft.component.html b/src/components/smartEmergency/plan/left/emergencyPlanLeft.component.html new file mode 100644 index 0000000..f0ad2fc --- /dev/null +++ b/src/components/smartEmergency/plan/left/emergencyPlanLeft.component.html @@ -0,0 +1,106 @@ +
+
+
+
+
+
+
+
    +
  • 事故类型:{{info.typeName}}
  • +
  • 事故内容:{{info.content}}
  • +
  • + 事故级别: + {{ levelName }} + + 上调 + 下调 +
  • +
  • 关联危险源:石油炼制单元
  • +
  • 上报位置:{{info.address}} +
  • +
  • 上报人:{{ info.reporter }} + 一健联系 +
  • +
+
+
应急组织
+
+ 组织 + 职责 + 负责人 +
+
+
+ {{ item.org }} + {{ item.job }} + {{ item.head }} +
+ +
+
值班专家
+
+ 领域 + 专家 +
+
+
+ {{ item.area }} + {{ item.person }} + +
+
+
附近应急设施
+
+ 设施名称 + 所在位置 + 距离 (m) +
+
+
+ {{ item.name }} + {{ item.position }} + {{ item.distance }} +
+ +
+ +
+
+
+
应急中...
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+ 应急准备 + 事态控制 + 善后工作 +
+
+ +
{{active === 3?'完成':'下一步'}}
+
+
+ +
diff --git a/src/components/smartEmergency/plan/left/emergencyPlanLeft.component.ts b/src/components/smartEmergency/plan/left/emergencyPlanLeft.component.ts new file mode 100644 index 0000000..0d3fcc5 --- /dev/null +++ b/src/components/smartEmergency/plan/left/emergencyPlanLeft.component.ts @@ -0,0 +1,356 @@ +import {Component, Emit, Prop, Vue} from 'vue-property-decorator'; +import template from "./emergencyPlanLeft.component.html" +import {pieChartData} from "./chartData"; + +import TitleComponent from "@/components/title.component.vue" +import WarningListComponent from "@/components/warningList.component.vue" +import * as turf from '@turf/turf' +import Mock from "mockjs" +import moment from "moment" +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + WarningListComponent + }, +}) +export default class EmergencyPlanLeftComponent extends Vue { + //传入的报警信息详情 + @Prop({ + default: { + "typeName": "火灾", + "content": "北京汉邦唐化工厂区发生火灾", + "levelName": "二级", + "levelClass": "level-2-text", + "levelClassIcon": "level-2", + "time": "2023-05-15 15:21:35", + "address": "工厂厂房", + "reporter": "蒋丽", + "tableHeader": [ + { + "prop": "name", + "label": "摄像头名称" + }, + { + "prop": "type", + "label": "类型" + }, + { + "prop": "distance", + "label": "距离 (m)" + } + ], + "tableData": [ + { + "type": "简型摄像头", + "distance": "10", + "name": "1号摄像头" + }, + { + "type": "简型摄像头", + "distance": "20", + "name": "2号摄像头" + }, + { + "type": "简型摄像头", + "distance": "22", + "name": "3号摄像头" + }, + { + "type": "简型摄像头", + "distance": "10", + "name": "4号摄像头" + }, + { + "type": "简型摄像头", + "distance": "20", + "name": "5号摄像头" + }, + { + "type": "简型摄像头", + "distance": "22", + "name": "6号摄像头" + } + ], + "title": "火灾爆炸", + "info": "北京汉邦唐化工厂区发生火灾", + "level": "1", + "type": "fire", + "tel": 13231475537, + "id": "110000197911038403", + "position": [ + 13312990.72, + 4098613.12, + 0.51 + ] + } + }) info!: any; + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + + currentCompany = false + popObj:any = { + popTitle:'报警记录', + type:'', + title: '风险点异常', + info: '', + time: '', + address:'', + level: '', + typeName:"", + reporter:"", + tel:"", + position:[], + content:"", + typeId:"", + id:'' + + } + typeList =[ + { + label:'气体泄露', + value:'normal', + level:2, + id:1 + },{ + label:'火灾爆炸', + value:'fire', + level:1, + id:2 + },{ + label:'气液泄露', + value:'normal', + level:1, + id:3 + },{ + label:'安全事故', + value:'normal', + level:2, + id:4 + },{ + label:'自然灾害', + value:'normal', + level:3, + id:5 + }, + ] + levelClass = 'level-1'; + levelName = '一级'; + level=1; + cardText = 'level-1-text'; + tableData = [ + { + head:'李大仙', + org:'保安组', + checked:false, + job:'组织闲杂人要…' + },{ + head:'张大仙', + org:'后勤组', + checked:false, + job:'输送救援物资…' + },{ + head:'尼古拉斯…', + org:'医疗组', + checked:false, + job:'医疗受伤人群…' + }, + ] + tableDataExpert = [ + { + person:'张三,高光易,薛想', + area:'火灾救援', + checked:false, + },{ + person:'张三,高光易,薛想', + area:'医疗救助', + checked:false, + },{ + person:'张三,高光易,薛想', + area:'医疗组', + checked:false, + }, + ] + tableDataVicinity = [ + { + position:'人民广场东北方向…', + distance:'10', + name:'一号站', + checked:false, + },{ + position:'人民广场西南方向…', + distance:'20', + name:'四号站', + checked:false, + },{ + position:'人民广场西北方向…', + distance:'30', + name:'二号站', + checked:false, + }, + ] + // 当前进度条 + active = 1 + + get dataList(){ + return this.$store.state.warningList + } + + //下一步操作 + nextStep(){ + if (this.active<3){ + this.active++ + } + this.gotoNext() + } + @Emit('gotoNext') + gotoNext(){ + // + } + changeLevel(type){ + if (type === 'up'){ + if (this.level === 1){ + return + } + this.level-- + + }else if(type === 'down'){ + if (this.level === 4){ + return + } + this.level++ + } + const nameList = { + 1:'一级', + 2:'二级', + 3:'三级', + 4:'四级', + } + this.levelName = nameList[this.level] + this.levelClass = `level-${this.level}` + this.cardText = `level-${this.level}-text` + } + setData(val,type){ + if (type === 'typeName'){ + const find = this.typeList.find(item=>item.id == val) as any + this.popObj.level = find.level + this.popObj.title = find.label + this.popObj.type = find.value + } + this.popObj[type] = val + } + + //展示告警信息 + showWaring(item){ + const levelMap = { + 1:'一级', + 2:'二级', + 3:'三级', + } + const levelClassMap = { + 3:'blue', + 2:'yellow', + 1:'red', + } + this.getItem(Object.assign(item,{ + type:'风险告警', + level:item.level, + levelClass:levelClassMap[item.level], + levelName:levelMap[item.level], + content:'监测数值异常', + time:'2023年1月20日 14:33:33', + equipment:'北区广场监测点', + tableHeader:[ + { + 'prop':'alarmSubject', + 'label':'告警主体', + 'width':'90px', + }, { + 'prop':'COD', + 'label':'COD', + }, { + 'prop':'standard', + 'label':'标准值', + }, + ], + tableData: [{ + 'alarmSubject': '排放量', + 'COD': '456m3', + 'standard': '466m3', + }, { + 'alarmSubject': '排放浓度', + 'COD': '2.6mg/L', + 'standard': '2.5mg/L', + }, { + 'alarmSubject': '排放时间', + 'COD': '2023.3.31 05:03:45', + 'standard': '8:00-22:00', + }, { + 'alarmSubject': '排放浓度', + 'COD': '2.6mg/L', + 'standard': '2.5mg/L', + }, { + 'alarmSubject': '排放时间', + 'COD': '2023.3.31 05:03:45', + 'standard': '8:00-22:00', + }] + })) + } + //点击告警信息 + @Emit() + getItem(item) { + // console.log('item', item) + } + + count = 1 + + + mounted() { + + } + + destroyed() { + + } + + changeMore() { + console.log(1) + } + + changeClose() { + console.log(1) + } + addManual(){ + this.currentCompany = true + } + submitWaring(){ + this.popObj.id = Mock.mock("@id"); + if (this.popObj.type === 'normal'){ + this.popObj.position=turf.randomPosition([ + 13312995.84, + 4098177.2800000003, + 13313096.96, + 4098754.88, + ]); + }else if(this.popObj.type === 'fire'){ + this.popObj.position= [13312990.72, 4098613.12, 0.51] + } + this.popObj.time = moment().subtract(0,"days").format("YYYY-MM-DD HH:mm:ss") + + this.$store.commit("upDateWaringList",[this.popObj]) + this.currentCompany=false + } + //点击点位 + @Emit('changePoint') + changePoint(item) { + console.log(item) +// + } +} + diff --git a/src/components/smartEmergency/plan/right/chartData.js b/src/components/smartEmergency/plan/right/chartData.js new file mode 100644 index 0000000..ae9ddae --- /dev/null +++ b/src/components/smartEmergency/plan/right/chartData.js @@ -0,0 +1,112 @@ + +export const lineChartData = function () { + return { + color:['#FADFA4','#947FEA'], + xAxis: { + type: 'category', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLabel: { + //x轴文字的配置 + show: true, + interval: 0,//使x轴文字显示全 + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + + data: ['1月','2月','3月','4月','5月'] + }, + legend: { + top: 'top', + itemGap: 30, + itemWidth: 8, + itemHeight: 8, + textStyle: { + // 未单独设置样式的图例(即非上下标) + lineHeight: 12, + verticalAlign: "middle", + fontSize: 10, + color: "#fff" + }, + data:[ + { + name:'应急事件', + icon:'roundRect' + },{ + name:'应急演练', + icon:'roundRect' + } + ] + }, + yAxis: { + type: 'value', + splitLine: { + show: true, + lineStyle: { + color: '#999999', + type: 'solid' + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + } + }, + }, + series: [ + { + name:'应急事件', + data: [60,80,140,70,100], + type: 'line', + symbolSize: 4, + symbol: 'circle', + lineStyle: { + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + },{ + name:'应急演练', + data: [50,70,130,60,90], + type: 'line', + symbolSize: 4, + symbol: 'circle', + lineStyle: { + width: 2 + }, + smooth: true, + label: { + show: false, + position: 'top', + color: '#ffffff', + borderWidth: 0 + }, + } + ], + + tooltip: { + show: false, + alwaysShowContent: false, + trigger: 'item' + }, + grid: { + x: 30, + y: 30, + x2: 12, + y2: 20, + } + } +} diff --git a/src/components/smartEmergency/plan/right/smartEmergencyPlanRight.component.html b/src/components/smartEmergency/plan/right/smartEmergencyPlanRight.component.html new file mode 100644 index 0000000..4a86704 --- /dev/null +++ b/src/components/smartEmergency/plan/right/smartEmergencyPlanRight.component.html @@ -0,0 +1,85 @@ +
+
+
+
+
+
+

745

+

区域内人数

+
+
+
+
+
+

84

+

区域内车辆

+
+
+
+
+ 附近摄像头 + 移动摄像头 +
+
+ 摄像头名称 + 类型 + 距离 (m) +
+
+
+ {{ item.name }} + {{ item.type }} + {{ item.distance }} +
+ +
+ +
+ 物资存放点 + 物资数量 + 距离 (m) +
+
+
+ {{ item.position }} + {{ item.num }} + {{ item.distance }} +
+
+
+
+
+
+
+
事故事态简报
+
+
+
+
+
+
+
+ + + 事故造成伤亡人员 + 暂无 +
+
+ + + {{activity.timestamp}} {{activity.content}} + + +
+
+ +
diff --git a/src/components/smartEmergency/plan/right/smartEmergencyPlanRight.component.ts b/src/components/smartEmergency/plan/right/smartEmergencyPlanRight.component.ts new file mode 100644 index 0000000..1020ca8 --- /dev/null +++ b/src/components/smartEmergency/plan/right/smartEmergencyPlanRight.component.ts @@ -0,0 +1,300 @@ +import {Component, Emit, Prop, Vue} from 'vue-property-decorator'; +import template from "./smartEmergencyPlanRight.component.html" +import TitleComponent from "@/components/title.component.vue" +import Mock from "mockjs" +import * as turf from "@turf/turf"; +import moment from "moment"; + +import("@/assets/style/pageCommon.component.scss") + + +Component.registerHooks([ + 'beforeRouteLeave', +]); +@Component({ + template, + components: { + TitleComponent, + }, +}) +export default class SmartEmergencyPlanRightComponent extends Vue { + //传入的报警信息详情 + @Prop({ + default: function () { + return { + } + } + }) info!: any; + //标题左侧图标 + imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); + + currentCompany = false + popObj:any = { + popTitle:'报警记录', + type:'', + title: '风险点异常', + info: '', + time: '', + address:'', + level: '', + typeName:"", + reporter:"", + tel:"", + position:[], + content:"", + typeId:"", + id:'' + + } + typeList =[ + { + label:'气体泄露', + value:'normal', + level:2, + id:1 + },{ + label:'火灾爆炸', + value:'fire', + level:1, + id:2 + },{ + label:'气液泄露', + value:'normal', + level:1, + id:3 + },{ + label:'安全事故', + value:'normal', + level:2, + id:4 + },{ + label:'自然灾害', + value:'normal', + level:3, + id:5 + }, + ] + levelClass = 'level-1'; + levelName = '一级'; + level=1; + cardText = 'level-1-text'; + + tableDataVicinity = [ + { + position:'人民广场东北库', + distance:'10', + num:'99', + checked:false, + },{ + position:'人民广场西南库', + distance:'20', + num:'69', + checked:false, + },{ + position:'人民广场西北库', + distance:'30', + num:'169', + checked:false, + }, + ] + activities = [{ + content: '消防车到达3辆 ', + timestamp: '12:30:11' + }, { + content: '救援小组到达20人', + timestamp: '12:24:11' + }, { + content: '安保小组到达 40人', + timestamp: '12:20:11' + }] + searchVal = '' + // 当前进度条 + active = 1 + get dataList(){ + return this.$store.state.warningList + } + //获取摄像头 + get cameraList(){ + const from = this.info.position; + const tempData = this.$store.state.cameraList.map((item,i)=>{ + const to = item.position; + const distance = Math.floor(turf.distance(from, to, {units: 'meters'})/100000); + const temp = { + type:'简型摄像头', + distance, + name:`${i}号摄像头`, + } + return {...item,...temp} + }) + return tempData.filter(item => item.distance <= 100).toSorted((a, b) => a.distance - b.distance) + } + //获取物资仓库 + get goodsList(){ + const from = this.info.position; + const tempData = this.$store.state.safeGoods.map((item,i)=>{ + const to = item.position; + const distance = Math.floor(turf.distance(from, to, {units: 'meters'})/100000); + const findData = this. tableDataVicinity[i%3] + + return {...item,...findData,distance} + }) + return tempData.filter(item => item.distance <= 100).toSorted((a, b) => a.distance - b.distance) + } + radioActive = 1 + changeRadio(type){ + this.radioActive = type + } + seachData(){ + console.log(this.searchVal) + } + //下一步操作 + nextStep(){ + if (this.active<3){ + this.active++ + } + } + changeLevel(type){ + if (type === 'up'){ + if (this.level === 1){ + return + } + this.level-- + + }else if(type === 'down'){ + if (this.level === 4){ + return + } + this.level++ + } + const nameList = { + 1:'一级', + 2:'二级', + 3:'三级', + 4:'四级', + } + this.levelName = nameList[this.level] + this.levelClass = `level-${this.level}` + this.cardText = `level-${this.level}-text` + } + setData(val,type){ + if (type === 'typeName'){ + const find = this.typeList.find(item=>item.id == val) as any + this.popObj.level = find.level + this.popObj.title = find.label + this.popObj.type = find.value + } + this.popObj[type] = val + } + + //展示告警信息 + showWaring(item){ + const levelMap = { + 1:'一级', + 2:'二级', + 3:'三级', + } + const levelClassMap = { + 3:'blue', + 2:'yellow', + 1:'red', + } + this.getItem(Object.assign(item,{ + type:'风险告警', + level:item.level, + levelClass:levelClassMap[item.level], + levelName:levelMap[item.level], + content:'监测数值异常', + time:'2023年1月20日 14:33:33', + equipment:'北区广场监测点', + tableHeader:[ + { + 'prop':'alarmSubject', + 'label':'告警主体', + 'width':'90px', + }, { + 'prop':'COD', + 'label':'COD', + }, { + 'prop':'standard', + 'label':'标准值', + }, + ], + tableData: [{ + 'alarmSubject': '排放量', + 'COD': '456m3', + 'standard': '466m3', + }, { + 'alarmSubject': '排放浓度', + 'COD': '2.6mg/L', + 'standard': '2.5mg/L', + }, { + 'alarmSubject': '排放时间', + 'COD': '2023.3.31 05:03:45', + 'standard': '8:00-22:00', + }, { + 'alarmSubject': '排放浓度', + 'COD': '2.6mg/L', + 'standard': '2.5mg/L', + }, { + 'alarmSubject': '排放时间', + 'COD': '2023.3.31 05:03:45', + 'standard': '8:00-22:00', + }] + })) + } + //点击告警信息 + @Emit() + getItem(item) { + // console.log('item', item) + } + //打开视频 + @Emit('openVideo') + openVideo(item) { + // console.log('item', item) + } + //打开视频 + @Emit('focusGood') + focusGood(item) { + // console.log('item', item) + } + + count = 1 + + + mounted() { + + } + + destroyed() { + + } + + changeMore() { + console.log(1) + } + + changeClose() { + console.log(1) + } + addManual(){ + this.currentCompany = true + } + submitWaring(){ + this.popObj.id = Mock.mock("@id"); + if (this.popObj.type === 'normal'){ + this.popObj.position=turf.randomPosition([ + 13312995.84, + 4098177.2800000003, + 13313096.96, + 4098754.88, + ]); + }else if(this.popObj.type === 'fire'){ + this.popObj.position= [13312990.72, 4098613.12, 0.51] + } + this.popObj.time = moment().subtract(0,"days").format("YYYY-MM-DD HH:mm:ss") + + this.$store.commit("upDateWaringList",[this.popObj]) + this.currentCompany=false + } +} + diff --git a/src/components/title.component.vue b/src/components/title.component.vue new file mode 100644 index 0000000..c039363 --- /dev/null +++ b/src/components/title.component.vue @@ -0,0 +1,112 @@ + + + + diff --git a/src/components/warningDetail.component.vue b/src/components/warningDetail.component.vue new file mode 100644 index 0000000..848c6f5 --- /dev/null +++ b/src/components/warningDetail.component.vue @@ -0,0 +1,114 @@ + + + diff --git a/src/components/warningList.component.vue b/src/components/warningList.component.vue new file mode 100644 index 0000000..fa095b6 --- /dev/null +++ b/src/components/warningList.component.vue @@ -0,0 +1,139 @@ + + + diff --git a/src/dataDemo/index b/src/dataDemo/index new file mode 100644 index 0000000..7faabd8 --- /dev/null +++ b/src/dataDemo/index @@ -0,0 +1,15 @@ +//智慧化工园区总体介绍 +export const indexPageData = { + "parkIntroduction": '上海青浦工业园区是1995年11月25日,经上海市人民政府批准成立的九大市级工业开发区之一,目前规划面积56.2平方公里。园区不仅位于长三角"之"字型经济圈的交接处,是上海通往江苏、浙江两省的交汇点,而且也是长三角制造业产业带的中心,具有承东启西、东联西进产业带的枢纽作用和对长三角、华东地区的辐射作用。\n' + + '经过20多年的开发建设,上海青浦工业园区已经成为全区经济发展的重要增长极,2016年,园区的规模工业产值、就业人口和税收收入分别占全区的1/2、1/3和1/4; 已经成为全市投资环境最好的区域之一,世界500强和行业龙头企业纷纷在园区投资落户。目前,已形成了以德国海德堡为代表的印刷传媒产业,以日立电梯为代表的精密机械产业,以腾讯云计算为代表的电子信息产业,以高田汽配为代表的汽车零部件产业,以日本尤妮佳为代表的纺织新材料产业等主导产业格局。同时,一批研发中心、技术服务中心等与园区制造业相关的配套生产性服务业也初具雏形,综合配套能力不断提升,产城联动效应逐步显现。', + "menu": [ + {menuName: '一园一档', path: '/front/oneGardenAndOneGear',imgName:'yyyd'}, + {menuName: '一企一档', path: '/front/oneGearPerEnterprise',imgName:'yqyd'}, + {menuName: '智慧安监', path: '/front/smartSafetySupervision',imgName:'zhaj'}, + {menuName: '智慧环保', path: '/front/smartAndEnvironmentallyFriendly',imgName:'zhhb'}, + {menuName: '智慧应急', path: '/front/smartEmergency',imgName:'zhyj'}, + {menuName: '封闭园区', path: '/front/closedCampus',imgName:'fbyq'}, + {menuName: '智慧能源', path: '/front/smartEnergy',imgName:'zhny'}, + {menuName: '智慧管廊', path: '/',imgName:'zhgl'}, + ] +} diff --git a/src/dataDemo/mockData.js b/src/dataDemo/mockData.js new file mode 100644 index 0000000..5929f1e --- /dev/null +++ b/src/dataDemo/mockData.js @@ -0,0 +1,1315 @@ +let Mock = require('mockjs') +let dateFunction = function () { + let now = new Date(this.now); + now.setTime(now.getTime() + this.fromNowOn * 24 * 60 * 60 * 1000); + let sub = now; + let year = sub.getFullYear() < 10 ? '0' + sub.getFullYear() : sub.getFullYear(); + let month = sub.getMonth() + 1 < 10 ? '0' + sub.getMonth() : sub.getMonth(); + let day = sub.getDate() < 10 ? '0' + sub.getDate() : sub.getDate(); + if (month == '00') { + month = '12' + year = year - 1 + } + return month + '-' + day; +} +let dateTimeFunction = function () { + let now = new Date(this.now); + now.setTime(now.getTime() + this.fromNowOn * 24 * 60 * 60 * 1000); + let sub = now; + let year = sub.getFullYear() < 10 ? '0' + sub.getFullYear() : sub.getFullYear(); + let month = sub.getMonth() + 1 < 10 ? '0' + sub.getMonth() : sub.getMonth(); + let day = sub.getDate() < 10 ? '0' + sub.getDate() : sub.getDate(); + let HH = sub.getHours() < 10 ? '0' + sub.getHours() : sub.getHours(); + let mm = sub.getMinutes() < 10 ? '0' + sub.getMinutes() : sub.getMinutes(); + let ss = sub.getSeconds() < 10 ? '0' + sub.getSeconds() : sub.getSeconds(); + if (month == '00') { + month = '12' + year = year - 1 + } + return year + '-' + month + '-' + day + ' ' + HH + ':' + mm + ':' + ss; +} +let dateFunctionHour = function () { + let now = new Date(this.now); + now.setTime(now.getTime() + this.fromNowOn * 60 * 60 * 1000); + let sub = now; + let HH = sub.getHours() < 10 ? '0' + sub.getHours() : sub.getHours(); + let mm = sub.getMinutes() < 10 ? '0' + sub.getMinutes() : sub.getMinutes(); + let ss = sub.getSeconds() < 10 ? '0' + sub.getSeconds() : sub.getSeconds(); + return HH + ':' + mm ; +} +export let data1 = Mock.mock({ + 'data|30': [ + { + "value|1-500": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': 31, + 'date': dateFunction + } + ] +}) + +export let data2 = Mock.mock({ + 'data|30': [ + { + "value|15-100": 1, + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn|+1': 31, + 'date': dateFunctionHour + } + ] +}) + +export let data5 = Mock.mock({ + 'data|30': [ + { + "value|25-200": 1, + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn|+1': 31, + 'date': dateFunctionHour + } + ] +}) + +export const dataSep = Mock.mock({ + 'data|10': [{ + 'data|30': + [{ + "value|15-100": 1, + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn|+1': -31, + 'date': dateFunctionHour + }] + }] +}) + +export const yearData = { + "CO": "22", + "O3": "34", + "SO2": "11", + "NO2": "24", + "PM2.5": "15", + "PM10": "40", +} +// 指标:甲醛、甲醇、CL2、NO、HF、HCL\HCN\BR2\C4H80\C3H5CLO\MACHS\HBR\C3H3N\乙醇 +export const yearData1 = { + "甲醛": "21", + "甲醇": "14", + "CL2": "18", + "HF": "32", + "CO": "22", + "NO": "10", + "HCL": "42", + "HCN": "31", + "BR2": "21", + "C4H80": "33", + // "C3H5CLO": "10", + "MACHS": "25", + "HBR": "13", + "C3H3N": "41", + "乙醇": "15", +} +//特征污染物指标卡 +export const sepCardData = { + "甲醛": "21", + "甲醇": "14", + "CL2": "18", + "HF": "32", + "BR2": "22", + "NO": "10", + "HCL": "42", + "HCN": "31", + // "BR2": "21", + // "C4H80": "33", + // "C3H5CLO": "10", + // "MACHS": "25", + // "HBR": "13", + // "C3H3N": "41", + // "乙醇": "15", +} +// 指标:COD\PH、溶解氧、高锰酸钾、生化需氧量、氨氮挥发酚、汞、铅、石油 +export const yearData2 = { + "COD": "21", + "PH": "14", + "溶解酶": "18", + "高锰酸钾": "32", + "生化需氧量": "22", + "氨氮": "10", + "挥发酚": "42", + "汞": "14", + "铅": "21", + "石油": "17", +} +// 指标:多环芳烃\VOC\SVOC\PH\镉\汞\砷\铅 +export const yearData3 = { + "多环芳烃": "21", + "VOC": "14", + "SVOC": "18", + "PH": "32", + "镉": "22", + "汞": "10", + "铅": "42", + "砷": "21", +} +export const data3 = { + "data": [ + {type: 'PH',name:'PH', value: ""}, + {type: 'PAHs',name: 'PAHs', value: "0"}, + {type: 'SVOC',name: 'SVOC', value: "0"}, + {type: 'VOC', name: 'VOC', value: "30"}, + {type: '镉',name: '镉', value: "60"}, + {type: '汞',name: '汞', value: "20"}, + {type: '砷',name: '砷', value: "20"}, + {type: '铅',name: '铅', value: "20"}, + ] +} +export const data3ForAir = { + "data": [ + {type: 'CO',name:'CO', value: ""}, + {type: 'O3',name: 'O3', value: "0"}, + {type: 'SO2',name: 'SO2', value: "0"}, + {type: 'NO2', name: 'NO2', value: "30"}, + {type: 'PM2.5',name: 'PM2.5', value: "60"}, + {type: 'PM10',name: 'PM10', value: "20"} + ] +} +export const data3ForSpecial = { + "data": [ + {type: '甲醛',name:'甲醛', value: ""}, + {type: '甲醇',name: '甲醇', value: "0"}, + {type: '氯气',name: '氯气', value: "0"}, + {type: 'NO', name: 'NO', value: "30"}, + {type: 'HF',name: 'HF', value: "60"}, + {type: 'HCL',name: 'HCL', value: "20"}, + {type: '苯系物',name: '苯系物', value: "20"}, + {type: '乙醇',name: '乙醇', value: "20"}, + ] +} +export const data3ForWater = { + "data": [ + {type: 'COD',name:'COD', value: ""}, + {type: 'PH',name: 'PH', value: "0"}, + {type: '溶解氧',name: '溶解氧', value: "0"}, + {type: 'KMnO4', name: 'KMnO4', value: "30"}, + {type: '氨氮',name: '氨氮', value: "60"}, + {type: '汞',name: '汞', value: "20"}, + {type: 'BOD5',name: 'BOD5', value: "20"}, + {type: '铅',name: '铅', value: "20"}, + {type: '挥发酚',name: '挥发酚', value: "20"}, + {type: '石油',name: '石油', value: "20"}, + ] +} + +export const top10 = { + "data": [ + {type: '2号区3号库AAA监测点', value: 76}, + {type: '2号区3号库BBB监测点', value: 50}, + {type: '2号区3号库CCC监测点', value: 40}, + {type: '2号区3号库DDD监测点', value: 30}, + {type: '2号区3号库EEE监测点', value: 20}, + ] +} +export const airDetail = { + "data": [ + {type: '当前AQI值', value: "20", level: '优', class: 'greenTxt'}, + {type: '当前CO值', value: "25", level: '优', class: 'greenTxt'}, + {type: '当前O3值', value: "40", level: '良', class: 'yellowTxt'}, + {type: '当前SO2值', value: "40", level: '良', class: 'yellowTxt'}, + {type: '当前NO2值', value: "80", level: '严重', class: 'redTxt'}, + {type: '当前PM2.5值', value: "20", level: '优', class: 'greenTxt'}, + {type: '当前PM10值', value: "60", level: '中度', class: 'purpleTxt'}, + ] +} + +export const waterDetail = { + "data": [ + {type: '当前COD值', value: "20", level: '优', class: 'greenTxt'}, + {type: '当前PH值', value: "25", level: '优', class: 'greenTxt'}, + {type: '当前溶解氧值', value: "40", level: '良', class: 'yellowTxt'}, + {type: '当前高锰酸钾值', value: "40", level: '良', class: 'yellowTxt'}, + {type: '当前生化需氧量值', value: "80", level: '严重', class: 'redTxt'}, + {type: '当前汞值', value: "20", level: '优', class: 'greenTxt'}, + {type: '当前氨氮值', value: "60", level: '中度', class: 'purpleTxt'}, + {type: '当前挥发酚值', value: "20", level: '优', class: 'greenTxt'}, + {type: '当前铅值', value: "25", level: '优', class: 'greenTxt'}, + {type: '当前石油值', value: "40", level: '良', class: 'yellowTxt'}, + ] +} + +export const soilDetail = { + "data": [ + {type: '最新PH值', value: "20", level: '优', class: 'greenTxt'}, + {type: '最新多环芳烃值', value: "25", level: '优', class: 'greenTxt'}, + {type: '最新SVOC值', value: "40", level: '良', class: 'yellowTxt'}, + {type: '最新VOC值', value: "40", level: '良', class: 'yellowTxt'}, + {type: '最新镉值', value: "80", level: '严重', class: 'redTxt'}, + {type: '最新汞值', value: "20", level: '优', class: 'greenTxt'}, + {type: '最新砷值', value: "60", level: '中度', class: 'purpleTxt'}, + {type: '最新铅值', value: "20", level: '优', class: 'greenTxt'}, + ] +} +//特征污染物数据 +export const characterDetail = { + "data": [ + {type: '当前甲醛值', value: "20", level: '优', class: 'greenTxt'}, + {type: '当前甲醇值', value: "25", level: '优', class: 'greenTxt'}, + {type: '当前CL2值', value: "40", level: '良', class: 'yellowTxt'}, + {type: '当前NO值', value: "40", level: '良', class: 'yellowTxt'}, + {type: '当前HF值', value: "80", level: '严重', class: 'redTxt'}, + {type: '当前HCL值', value: "20", level: '优', class: 'greenTxt'}, + {type: '当前HCN值', value: "60", level: '中度', class: 'purpleTxt'}, + {type: '当前BR2值', value: "20", level: '优', class: 'greenTxt'}, + /*{type: '当前C4H80值', value: "20",level:'优',class:'greenTxt'}, + {type: '当前C3H5CLO值', value: "20",level:'优',class:'greenTxt'}, + {type: '当前MACHS值', value: "20",level:'优',class:'greenTxt'}, + {type: '当前HBR值', value: "20",level:'优',class:'greenTxt'}, + {type: '当前C3H3N值', value: "20",level:'优',class:'greenTxt'}, + {type: '当前乙醇值', value: "20",level:'优',class:'greenTxt'},*/ + ] +} +export let dataForDay = Mock.mock({ + 'data|6': [{ + 'dataList|30': [ + { + "value|1-500": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': -31, + 'date': dateFunction + } + ], + 'type': 'line', + "name|+1": [ + "CO", + "O3", + "SO2", + "NO2", + "PM2.5", + "PM10", + ] + }] +}) + +export let dataForHour = Mock.mock({ + 'data|6': [{ + 'dataList|30': [ + { + "value|20-50": 1, + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn|+1': -31, + 'date': dateFunctionHour + } + ], + 'type': 'line', + 'smooth':true, + 'label': { + 'show': true, + 'position':'top', + 'color':'#ffffff', + 'borderWidth':0 + }, + "name|+1": [ + "CO", + "O3", + "SO2", + "NO2", + "PM2.5", + "PM10", + ] + }] + +}) +export let dataForSoilDay = Mock.mock({ + 'data|8': [{ + 'dataList|30': [ + { + "value|1-500": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': -31, + 'date': dateFunction + } + ], + 'type': 'line', + 'smooth':true, + 'label': { + 'show': true, + 'position':'top', + 'color':'#ffffff', + 'borderWidth':0 + }, + "name|+1": [ + "PH", + "PAHs", + "SVOC", + "VOC", + "镉", + "汞", + "砷", + "铅", + ] + }] +}) + +export let dataForSoilHour = Mock.mock({ + 'data|8': [{ + 'dataList|30': [ + { + "value|10-50": 1, + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn|+1': -31, + 'date': dateFunctionHour + } + ], + 'type': 'line', + 'smooth':true, + 'label': { + 'show': true, + 'position':'top', + 'color':'#ffffff', + 'borderWidth':0 + }, + "name|+1": [ + "PH", + "PAHs", + "SVOC", + "VOC", + "镉", + "汞", + "砷", + "铅", + ] + }] + +}) +export let dataForSpecialDay = Mock.mock({ + 'data|8': [{ + 'dataList|30': [ + { + "value|1-500": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': -31, + 'date': dateFunction + } + ], + 'type': 'line', + 'smooth':true, + 'label': { + 'show': true, + 'position':'top', + 'color':'#ffffff', + 'borderWidth':0 + }, + "name|+1": [ + "甲醛", + "甲醇", + "氯气", + "NO", + "HF", + "HCL", + "苯系物", + "乙醇", + ] + }] +}) + +export let dataForSpecialHour = Mock.mock({ + 'data|8': [{ + 'dataList|30': [ + { + "value|10-50": 1, + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn|+1': -31, + 'date': dateFunctionHour + } + ], + 'type': 'line', + 'smooth':true, + 'label': { + 'show': true, + 'position':'top', + 'color':'#ffffff', + 'borderWidth':0 + }, + "name|+1": [ + "甲醛", + "甲醇", + "氯气", + "NO", + "HF", + "HCL", + "苯系物", + "乙醇", + ] + }] + +}) +export let dataForWaterDay = Mock.mock({ + 'data|10': [{ + 'dataList|30': [ + { + "value|1-500": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': -31, + 'date': dateFunction + } + ], + 'type': 'line', + 'smooth':true, + 'label': { + 'show': true, + 'position':'top', + 'color':'#ffffff', + 'borderWidth':0 + }, + "name|+1": [ + 'COD', + 'PH', + '溶解氧', + 'KMnO4', + '氨氮', + '汞', + 'BOD5', + '铅', + '挥发酚', + '石油' + ] + }] +}) + +export let dataForWaterHour = Mock.mock({ + 'data|10': [{ + 'dataList|30': [ + { + "value|10-50": 1, + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn|+1': -31, + 'date': dateFunctionHour + } + ], + 'type': 'line', + 'smooth':true, + 'label': { + 'show': true, + 'position':'top', + 'color':'#ffffff', + 'borderWidth':0 + }, + "name|+1": [ + 'COD', + 'PH', + '溶解氧', + 'KMnO4', + '氨氮', + '汞', + 'BOD5', + '铅', + '挥发酚', + '石油' + ] + }] + +}) + +export let dataForHour1 = Mock.mock({ + 'data|8': [{ + 'data|6': [{ + 'dataList|30': [ + { + "value|1-100": 1, + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn|+1': -31, + 'date': dateFunctionHour + } + ], + 'type': 'line', + "name|+1": [ + "CO", + "O3", + "SO2", + "NO2", + "PM2.5", + "PM10", + ] + }] + }] +}) + +export let dataForBar = Mock.mock({ + 'data|8': [{ + 'data|6': [{ + "value|1-100": 1, + "type|+1": [ + "CO", + "O3", + "SO2", + "NO2", + "PM2.5", + "PM10", + ] + }] + }] +}) + +// 图例:COD\PH、溶解氧、高锰酸钾、生化需氧量、氨氮挥发酚、汞、铅、石油 +export let dataForWaterLineHour = Mock.mock({ + 'data|9': [{ + 'dataList|30': [ + { + "value|1-100": 1, + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn|+1': -31, + 'date': dateFunctionHour + } + ], + 'type': 'line', + "name|+1": [ + "COD", + "PH", + "溶解氧", + "高锰酸钾", + "生化需氧量", + "氨氮挥发酚", + "汞", + "铅", + "石油", + ] + }] +}) + +export const dataForWaterLineHour1 = Mock.mock({ + 'data|9': [ + { + 'data|9': + [{ + 'dataList|30': [ + { + "value|1-100": 1, + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn|+1': -31, + 'date': dateFunctionHour + } + ], + 'type': 'line', + "name|+1": [ + "COD", + "PH", + "溶解氧", + "高锰酸钾", + "生化需氧量", + "氨氮挥发酚", + "汞", + "铅", + "石油", + ] + }] + }] +}) + +export let dataForWaterLineDay = Mock.mock({ + 'data|9': [{ + 'dataList|30': [ + { + "value|1-500": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': -31, + 'date': dateFunction + } + ], + 'type': 'line', + "name|+1": [ + "COD", + "PH", + "溶解氧", + "高锰酸钾", + "生化需氧量", + "氨氮挥发酚", + "汞", + "铅", + "石油", + ] + }] +}) +const colorMap = { + "COD": "cod", + "PH": "ph", + "溶解氧": "rjy", + "KMnO4": "gmsj", + "BOD5": "shxyl", + "氨氮": "ad", + "挥发酚": "hff", + "汞": "hg", + "铅": "pb", + "石油": "oil", +} +export const dataForWaterBar = Mock.mock({ + "data|10": [ + { + "type|+1": [ + "COD", + "PH", + "溶解氧", + "KMnO4", + "BOD5", + "氨氮", + "挥发酚", + "汞", + "铅", + "石油", + ], + "name|+1": [ + "COD", + "PH", + "溶解氧", + "KMnO4", + "BOD5", + "氨氮", + "挥发酚", + "汞", + "铅", + "石油", + ], + "value|1-100": 1, + "value1": function () { + return 100 - this.value * 1 + }, + "color": function () { + return colorMap[this.name] + }, + } + + ] +}) +export const dataForWaterBar1 = Mock.mock({ + "data|9": [{ + "data|9": + [{ + "type|+1": [ + "COD", + "PH", + "溶解氧", + "高锰酸钾", + "生化需氧量", + "氨氮", + "挥发酚", + "汞", + "铅", + "石油", + ], + "name|+1": [ + "COD", + "PH", + "溶解氧", + "高锰酸钾", + "生化需氧量", + "氨氮", + "挥发酚", + "汞", + "铅", + "石油", + ], + "value|1-100": 1, + "value1": function () { + return 100 - this.value * 1 + }, + "color": function () { + return colorMap[this.name] + }, + }] + + }] +}) + +export const airPointData = Mock.mock({ + "data|9": [ + { + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn': -31, + 'date': dateTimeFunction, + 'subAttr': '当前AQI', + 'subValue|15-80': 1, + 'attrList': { + "当前CO值|15-80": 1, + "当前O3值|15-80": 1, + "当前SO2值|15-80": 1, + "当前NO2值|15-80": 1, + "当前PM2.5值|15-80": 1, + "当前PM10值|15-80": 1, + } + } + ] +}) +export const waterPointData = Mock.mock({ + "data|9": [ + { + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn': -31, + 'date': dateTimeFunction, + 'subAttr': '水体污染指数', + 'subValue|15-80': 1, + 'attrList': { + "当前COD值|15-80": 1, + "当前PH值|15-80": 1, + "当前溶解氧值|15-80": 1, + "当前高锰酸钾值|15-80": 1, + "当前生化需氧量值|15-80": 1, + "当前汞值|15-80": 1, + "当前氨氮值|15-80": 1, + "当前挥发酚值|15-80": 1, + "当前铅值|15-80": 1, + "当前石油值|15-80": 1, + } + } + ] +}) +export const soilPointData = Mock.mock({ + "data|9": [ + { + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn': -31, + 'date': dateTimeFunction, + 'subAttr': 'CPI指数', + 'subValue|15-80': 1, + 'attrList': { + "最新PH值|15-80": 1, + "最新多环芳烃值|15-80": 1, + "最新SVOC值|15-80": 1, + "最新VOC值|15-80": 1, + "最新镉值|15-80": 1, + "最新汞值|15-80": 1, + "最新砷值|15-80": 1, + "最新铅值|15-80": 1 + } + } + ] +}) +export const sepPointData = Mock.mock({ + "data|9": [ + { + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn': -31, + 'date': dateTimeFunction, + 'subAttr': '特征污染物', + 'subValue': '未超标', + 'attrList': { + "当前甲醛值|15-80": 1, + "当前甲醇值|15-80": 1, + "当前CL2值|15-80": 1, + "当前NO值|15-80": 1, + "当前HF值|15-80": 1, + "当前HCL值|15-80": 1, + "当前HCN值|15-80": 1, + "当前BR2值|15-80": 1 + } + } + ] +}) + + +// 图例:COD\PH、溶解氧、高锰酸钾、生化需氧量、氨氮挥发酚、汞、铅、石油 +export let sepLineHour = Mock.mock({ + 'data|8': [{ + 'dataList|30': [ + { + "value|1-100": 1, + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn|+1': -31, + 'date': dateFunctionHour + } + ], + 'type': 'line', + "name|+1": [ + "甲醛", + "甲醇", + "CL2", + "HF", + "BR2", + "NO", + "HCL", + "HCN" + ] + }] +}) +export let sepLineHour1 = Mock.mock({ + 'data|8': [{ + 'data|8': [{ + 'dataList|30': [ + { + "value|1-100": 1, + 'now|+1': '@now("yyyy-MM-dd HH:mm:ss")', + 'fromNowOn|+1': -31, + 'date': dateFunctionHour + } + ], + 'type': 'line', + "name|+1": [ + "甲醛", + "甲醇", + "CL2", + "HF", + "BR2", + "NO", + "HCL", + "HCN" + ] + }] + }] +}) +export let sepLineDay = Mock.mock({ + 'data|8': [{ + 'dataList|30': [ + { + "value|1-500": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': -31, + 'date': dateFunction + } + ], + 'type': 'line', + "name|+1": [ + "甲醛", + "甲醇", + "CL2", + "HF", + "BR2", + "NO", + "HCL", + "HCN" + ] + }] +}) + + +//特征污染物柱状图 +export const data4 = Mock.mock({ + 'data|8': [{ + "value|1-100": 1, + "type|+1": [ + "甲醛", + "甲醇", + "CL2", + "HF", + "BR2", + "NO", + "HCL", + "HCN" + ] + }] +}) +//特征污染物柱状图 +export const dataSepBar = Mock.mock({ + 'data|8': [{ + 'data|8': [{ + "value|1-100": 1, + "type|+1": [ + "甲醛", + "甲醇", + "CL2", + "HF", + "BR2", + "NO", + "HCL", + "HCN" + ] + }] + }] +}) +//污染源随机数据池 +export const radomPool = Mock.mock({ + 'data|8': [{ + 'dataList|30': [ + { + "value|20-90": 1, + + } + ] + } + ] +}) + +//污染源日均数据 +export let pollutionLineDay = Mock.mock({ + 'data|8': [{ + 'dataList|30': [ + { + "value|20-90": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源超限统计 +export let overrunData = Mock.mock({ + 'data|8': [{ + 'dataList|12': [ + { + "value|0-20": 1, + } + ], + 'type': 'line', + }] +}) + + +//智慧能源用水日统计 +export let waterDailyData = Mock.mock({ + 'data|8': [{ + 'dataList|30': [ + { + "value|300-800": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源抄水表 +export let waterDataDaily = Mock.mock({ + 'data|20': [{ + 'dataList|20': [ + { + "value|300-800.0-2": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源节水目标 +export let waterConservation = Mock.mock({ + 'data|8': [ + { + "value|300-500": 1, + } + ], + 'type': 'line', + +}) + +//智慧能源抄电表 +export let electricityDataDaily = Mock.mock({ + 'data|20': [{ + 'dataList|20': [ + { + "value|10000-40000.0-1": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源减排目标 +export let conservationTarget = Mock.mock({ + 'data|20': [ + { + "value|100-150": 1, + } + ], + 'type': 'line', + +}) + +//智慧能源抄电表 +export let conservationAnalysis = Mock.mock({ + 'data|8': [{ + 'dataList|13': [ + { + "value|200-300": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源抄燃气表 +export let gasDataDaily = Mock.mock({ + 'data|20': [{ + 'dataList|20': [ + { + "value|40-4000.0-2": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源抄蒸汽表 +export let steamDataDaily = Mock.mock({ + 'data|20': [{ + 'dataList|20': [ + { + "value|40-100.0-2": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源用水月统计 +export let waterMonthlyData = Mock.mock({ + 'data|8': [{ + 'dataList|12': [ + { + "value|900-24000": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源用电日统计 +export let electricityDailyData = Mock.mock({ + 'data|8': [{ + 'dataList|30': [ + { + "value|1-4": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源用电月统计 +export let electricityMonthlyData = Mock.mock({ + 'data|8': [{ + 'dataList|12': [ + { + "value|30-120": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源用电量 +export let electricityUsedData = Mock.mock({ + 'data|8': [{ + 'dataList|13': [ + { + "value|1-4": 1, + } + ], + 'type': 'line', + }] +}) + + +//智慧能源用燃气日统计 +export let gasDailyData = Mock.mock({ + 'data|8': [{ + 'dataList|30': [ + { + "value|40-4000": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源用燃气月统计 +export let gasMonthlyData = Mock.mock({ + 'data|8': [{ + 'dataList|12': [ + { + "value|1200-120000": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源首页用燃气园区日统计 +export let gasDailyIndexData = Mock.mock({ + 'data|8': [{ + 'dataList|12': [ + { + "value|4000-5000": 1, + } + ], + 'type': 'line', + }] +}) +//智慧能源首页用燃气园月日统计 +export let gasMonthlyIndexData = Mock.mock({ + 'data|8': [{ + 'dataList|12': [ + { + "value|12-15": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源用蒸汽日统计 +export let steamDailyData = Mock.mock({ + 'data|20': [{ + 'dataList|30': [ + { + "value|40-100": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源用蒸汽月统计 +export let steamMonthlyData = Mock.mock({ + 'data|20': [{ + 'dataList|12': [ + { + "value|1200-3000": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源首页用蒸汽园区日统计 +export let steamDailyIndexData = Mock.mock({ + 'data|20': [{ + 'dataList|30': [ + { + "value|200-300": 1, + } + ], + 'type': 'line', + }] +}) + +//智慧能源首页用蒸汽园区月统计 +export let steamMonthlyIndexData = Mock.mock({ + 'data|20': [{ + 'dataList|12': [ + { + "value|6000-9000": 1, + } + ], + 'type': 'line', + }] +}) + + +//生成30日 +export let getDay30 = Mock.mock({ + 'data': [{ + 'date': function () { + let category = []; + let dottedBase = +new Date(); + for (let i = 0; i < 32; i++) { + let sub = new Date((dottedBase += 1000 * 3600 * 24)); + let year = sub.getFullYear() < 10 ? '0' + sub.getFullYear() : sub.getFullYear(); + let month = sub.getMonth() + 1 < 10 ? '0' + (sub.getMonth() + 1) : (sub.getMonth() + 1); + let day = sub.getDate() < 10 ? '0' + sub.getDate() : sub.getDate(); + if (month == '00') { + month = '12' + year = year - 1 + } + category.push([month, day].join("-")); + + } + return category; + + } + + }] + +}) + + +export let dataForGas1 = Mock.mock({ + 'data|2': [{ + 'data|6': [ + { + "value|30-200": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': -31, + 'date': dateFunction + } + ], + 'type': 'line', + 'smooth': true, + "name|+1": [ + "COD", + "氨氮" + ] + }] +}) + +export let dataForGas2 = Mock.mock({ + 'data|2': [{ + 'data|6': [ + { + "value|30-200": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': -31, + 'date': dateFunction + } + ], + 'type': 'line', + 'smooth': true, + "name|+1": [ + "COD", + "氨氮" + ] + }] +}) +export let dataForClean1 = Mock.mock({ + 'data|4': [{ + 'data|6': [ + { + "value|30-200": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': -31, + 'date': dateFunction + } + ], + 'type': 'line', + 'smooth': true, + "name|+1": [ + "COD", + "氨氮", + "VOS", + "石油类" + ] + }] +}) + +export let dataForClean2 = Mock.mock({ + 'data|4': [{ + 'data|6': [ + { + "value|30-200": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': -31, + 'date': dateFunction + } + ], + 'type': 'line', + 'smooth': true, + "name|+1": [ + "COD", + "氨氮", + "VOS", + "石油类" + ] + }] +}) +export let dataForEnergyIndex = Mock.mock({ + 'data|4': [{ + 'data|13': [ + { + "value|500-2500": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': -31, + 'date': dateFunction + } + ], + 'type': 'line', + 'smooth': true, + "name|+1": [ + "石油", + "天然气", + "煤炭", + "煤气" + ] + }] +}) diff --git a/src/dataDemo/smartAndEnvironmentallyFriendlyData.js b/src/dataDemo/smartAndEnvironmentallyFriendlyData.js new file mode 100644 index 0000000..ab226ea --- /dev/null +++ b/src/dataDemo/smartAndEnvironmentallyFriendlyData.js @@ -0,0 +1,131 @@ +let Mock = require('mockjs') +let dateFunction = function () { + let now = new Date(this.now); + now.setTime(now.getTime() + this.fromNowOn * 24 * 60 * 60 * 1000); + let sub = now; + let year = sub.getFullYear() < 10 ? '0' + sub.getFullYear() : sub.getFullYear(); + let month = sub.getMonth() + 1 < 10 ? '0' + sub.getMonth() : sub.getMonth(); + let day = sub.getDate() < 10 ? '0' + sub.getDate() : sub.getDate(); + if (month == '00') { + month = '12' + year = year - 1 + } + return month + '-' + day; +} +let data1 = Mock.mock({ + 'data|30': [ + { + "value|10-200": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': -31, + 'date': dateFunction + } + ] +}) + +let data2 = Mock.mock({ + 'data|30': [ + { + "value|10-100": 1, + "value2|10-100": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': -31, + 'date': dateFunction + } + ] +}) +let data3 = Mock.mock({ + 'data|30': [ + { + "value|10-100": 1, + "value2|10-100": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': -31, + 'date': dateFunction + } + ] +}) +//智慧环保页面数据 +export const smartAndEnvironmentallyFriendlyData = { + "daysMonitored": "566",//监测天数 + //大气环境质量 -start + "atmosphericEnvironmentalQuality": { + "aqi": 20,//空气质量指数AQI:取值范围0至正无穷 0-50=优 51-100=良 101-150=轻度污染 151-200=中度污染 201-300=重度污染+蓝色预警 301-400=严重污染+黄色预警 401-500=严重污染+橙色预警 500以上=严重污染+红色预警 + "excellentRate": "75",//优良率 + "alerts": "3",//预警次数 + "data": data1 + }, + //大气环境质量 -end + //水环境质量 -start + "waterQuality": { + "typeOfWaterBody": "Ⅳ", + "comprehensivePollutionIndex": 0.2, + "data": data2 + }, + //水环境质量 -end + //特征污染物监测 -start + "characteristicContaminants": { + "formaldehydeExcessRate": "10",//甲醛超标率 + "methanolExceedance": "22",//甲醇超标率 + // "chlorineGasExcessRate": "33%",//氯气超标率 + "NOExceedance": "36",//一氧化氮超标率 + // "HFExceedance": "26%",//氟化氢超标率 + "BenzeneExceedance": "17",//苯系物超标率 + "HCLExceedance": "52",//氯化氢超标率 + "EthanolExceedance": "27",//乙醇超标率 + }, + //特征污染物监测 -end + //土壤环境质量 -start + "soilEnvironmentalQuality": { + "CPIPollutionIndex": '0.7',//土壤CPI污染指数 + "NemeroPollutionIndex": '2',//内梅罗污染指数 + "QualityEvaluation": 'Ⅰ',//土壤质量评价 + "data":data3 + }, + //土壤环境质量 -end + //监测类型 -start + "typeOfMonitoring": [ + {"label": '大气环境', "value": 'air', "isChecked": false}, + {"label": '水环境', "value": 'water', "isChecked": false}, + {"label": '土壤环境', "value": 'soil', "isChecked": false}, + {"label": '特征污染物', "value": 'spe', "isChecked": false}, + {"label": '废气污染源', "value": 'gas', "isChecked": false}, + {"label": '废水污染源', "value": 'waste', "isChecked": false}, + {"label": '清下水监控', "value": 'clean', "isChecked": false} + ], + //监测类型 -end + //污染源监控 -start + "contaminationSourceMonitoring": { + //企业废气排放监控 + "enterpriseExhaustEmissionMonitoring": { + //废气排放总量 + "totalExhaustEmissions": 545, + //废气污染源 + "exhaustGasPollutionSource": '21', + //排放超标次数 + "numberOfTimesEmissionsExceedStandards": '12' + }, + //废水水排放监测 + "wastewaterWaterDischargeMonitoring": { + //废水排放总量 + "totalEmissions": 642, + //废水污染源 + "sourcesOfWastewaterPollution": '9', + //排放超标次数 + "numberOfTimesEmissionsExceedStandards": '9' + }, + //清下水排放监测 + "cleanSewerDischargeMonitoring": { + //清下水排放总量 + "totalEmissions": 573, + //废水污染源 + "pollutionSources": '12', + //排放超标次数 + "numberOfTimesEmissionsExceedStandards": '7' + }, + } + //污染源监控 -end + + +} + diff --git a/src/dataDemo/smartSafetySupervisionData b/src/dataDemo/smartSafetySupervisionData new file mode 100644 index 0000000..462ef57 --- /dev/null +++ b/src/dataDemo/smartSafetySupervisionData @@ -0,0 +1,78 @@ +let Mock = require('mockjs') +let dateFunction = function () { + let now = new Date(this.now); + now.setTime(now.getTime() - this.fromNowOn * 24 * 60 * 60 * 1000); + let sub = now; + let year = sub.getFullYear() < 10 ? '0' + sub.getFullYear() : sub.getFullYear(); + let month = sub.getMonth() + 1 < 10 ? '0' + sub.getMonth() : sub.getMonth(); + let day = sub.getDate() < 10 ? '0' + sub.getDate() : sub.getDate(); + if (month == '00') { + month = '12' + year = year - 1 + } + return year + '-' + month + '-' + day; +} +let data1 = Mock.mock({ + 'data|30': [ + { + "value|1-500": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': 1, + 'date': dateFunction + } + ] +}) + +let data2 = Mock.mock({ + 'data|30': [ + { + "value|1-100": 1, + "value2|1-100": 1, + 'now|+1': '@now("yyyy-MM-dd")', + 'fromNowOn|+1': 1, + 'date': dateFunction + } + ] +}) + + + +//智慧安监页面数据 +export const smartSafetySupervisionData = { + 'safeProductionDays': 1120,//安全生产天数 + 'hazard':{ + 'storagePoint':89,//危险品存储点 + 'craft':74,//危险工艺 + }, + 'business':{ + 'underManagement':88,//在管企业数 + 'employee':3022,//企业总员工数 + 'car':726, + }, + 'work':{ + 'running':3,//进行中特殊作业 + 'business':2,//进行特殊作业企业 + 'recorded':53,//已备案特殊作业 + 'history':300,//历史特殊作业 + }, + + 'pitfall' :{ + 'check':238,//待验收 + 'rectify':211,//待整改 + 'rectifing':11,//整改中 + 'cancel':1077,//已消除 + }, + + 'dangerousWorkData': [ + {value: 1048, name: '断路'}, + {value: 735, name: '动土'}, + {value: 580, name: '受限空间'}, + {value: 484, name: '高处'}, + {value: 300, name: '吊装'}, + {value: 300, name: '动火'}, + {value: 300, name: '盲板抽堵'}, + {value: 300, name: '设备检维修'}, + {value: 300, name: '临时用电'}, + ], + + } diff --git a/src/global.d.ts b/src/global.d.ts new file mode 100644 index 0000000..90f4186 --- /dev/null +++ b/src/global.d.ts @@ -0,0 +1,5 @@ + +declare module 'common/notFound'; +declare module 'common/map'; +declare module 'common/index'; +declare module 'file-saver' \ No newline at end of file diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..47a6744 --- /dev/null +++ b/src/main.ts @@ -0,0 +1 @@ +import("./bootstrap") diff --git a/src/mock/bounds.ts b/src/mock/bounds.ts new file mode 100644 index 0000000..0787b6e --- /dev/null +++ b/src/mock/bounds.ts @@ -0,0 +1,47 @@ +export default [[[ + 13312756.48, + 4098385.2800000003, + 6.031601562500001 +],[ + 13312829.44, + 4098457.6, + 5.40009765625 +],[ + 13312739.84, + 4098548.16, + 5.40005859375 +],[ + 13312668.16, + 4098478.4, + 5.4001171875 +]],[[ + 13312928, + 4098465.92, + 8.60546875 +],[ + 13313026.56, + 4098550.08, + 8.472421875 +],[ + 13313066.24, + 4098509.44, + 8.4935546875 +],[ + 13313164.8, + 4098602.88, + 6.0297656250000005 +],[ + 13312977.92, + 4098790.72, + 6.1410156250000005 +],[ + 13312793.6, + 4098625.2800000003, + 10.571015625 +],[ + 13312958.72, + 4098458.88, + 8.350625 +] + +]] \ No newline at end of file diff --git a/src/mock/dangrous.ts b/src/mock/dangrous.ts new file mode 100644 index 0000000..7dde82b --- /dev/null +++ b/src/mock/dangrous.ts @@ -0,0 +1,75 @@ +export default [ + [ + [ + 13312856.32, + 4098289.92, + 0.50998046875 + ],[ + 13312933.120000001, + 4098206.72, + 0.61 + ],[ + 13312962, + 4098238.5, + 0.027461051940918 + ],[ + 13312884.48, + 4098315.2, + 0.50998046875 + ] + ],[ + [ + 13313146.88, + 4098282.24, + 0.5 + ],[ + 13313168.64, + 4098260.48, + 0.5 + ],[ + 13313264.64, + 4098348.48, + 0.5 + ],[ + 13313239.040000001, + 4098373.7600000002, + 0.5 + ] + ],[ + [ + 13312925.44, + 4098457.92, + 0.610009765625 + ],[ + 13312876.8, + 4098416.3200000003, + 0.510009765625 + ],[ + 13312902.4, + 4098388.16, + 0.51 + ],[ + 13312951.040000001, + 4098432.96, + 0.61001953125 + ] + ],[ + [ + 13313053.44, + 4098577.2800000003, + 0.51005859375 + ],[ + 13313031.68, + 4098556.48, + 0.51001953125 + ],[ + 13313050.88, + 4098534.72, + 0.50998046875 + ],[ + 13313073.92, + 4098554.56, + 0.51 + ] + ] +] \ No newline at end of file diff --git a/src/mock/four.ts b/src/mock/four.ts new file mode 100644 index 0000000..1d5af39 --- /dev/null +++ b/src/mock/four.ts @@ -0,0 +1,73 @@ +export default [[ + [ + 13312657.92, + 4098489.6, + 0.5 + ],[ + 13312757.76, + 4098383.68, + 0.5 + ],[ + 13312834.56, + 4098460.48, + 0.5 + ],[ + 13312737.280000001, + 4098564.48, + 0.5 + ] +],[ + [ + 13313146.88, + 4098282.24, + 0.5 + ],[ + 13313168.64, + 4098260.48, + 0.5 + ],[ + 13313264.64, + 4098348.48, + 0.5 + ],[ + 13313239.040000001, + 4098373.7600000002, + 0.5 + ] +],[ + [ + 13312839.68, + 4098664.64, + 0.5 + ],[ + 13312897.280000001, + 4098604.8000000003, + 0.5 + ],[ + 13312976.64, + 4098674.56, + 0.5 + ],[ + 13312919.040000001, + 4098737.2800000003, + 0.5 + ] +],[ + [ + 13313043.200000001, + 4098523.2, + 0.5 + ],[ + 13313148.16, + 4098411.2, + 0.5 + ],[ + 13313187.84, + 4098447.68, + 0.5 + ],[ + 13313091.84, + 4098564.48, + 0.5 + ] +]] \ No newline at end of file diff --git a/src/mock/four2.ts b/src/mock/four2.ts new file mode 100644 index 0000000..7d68644 --- /dev/null +++ b/src/mock/four2.ts @@ -0,0 +1,73 @@ +export default[[ + [ + 13312646.4, + 4098533.7600000002, + 0.4000390625 + ],[ + 13312421.120000001, + 4098775.04, + 0.4 + ],[ + 13312482.56, + 4098835.52, + 0.4 + ],[ + 13312716.8, + 4098596.8000000003, + 0.4000390625 + ] +],[ + [ + 13312732.16, + 4098612.8000000003, + 0.4 + ],[ + 13312504.32, + 4098859.2, + 0.4000390625 + ],[ + 13312556.8, + 4098922.56, + 0.4 + ],[ + 13312785.92, + 4098663.68, + 0.4 + ] +],[ + [ + 13312798.72, + 4098672, + 0.399921875 + ],[ + 13312550.4, + 4098922.24, + 0.3999609375 + ],[ + 13312599.040000001, + 4098978.24, + 0.3999609375 + ],[ + 13312857.6, + 4098722.56, + 0.3999609375 + ] +],[ + [ + 13312911.36, + 4098755.52, + 0.736093750000002 + ],[ + 13312861.44, + 4098712.96, + 0.600859375 + ],[ + 13312593.92, + 4098988.48, + 0.4 + ],[ + 13312642.56, + 4099042.56, + 0.95 + ] +]] \ No newline at end of file diff --git a/src/mock/index.ts b/src/mock/index.ts new file mode 100644 index 0000000..94c37f6 --- /dev/null +++ b/src/mock/index.ts @@ -0,0 +1,989 @@ +import Mock from "mockjs" +import moment from "moment" +import * as turf from '@turf/turf' +import bounds from "./bounds"; +import realBounds from "./real"; +import safeBounds from "./safe"; +import planBounds from "./plan"; +import line from "./line"; +import {mockData,detail,sepList,hiddenDangerList,hiddenList} from "@/components/safety/risk/left/mockData.js"; +import four from "./four"; +import four2 from "./four2"; +import dangrous from "./dangrous"; + +export class MockData{ + public static getPeopleList(){ + const data = [] as any; + for(let i=0;i<100;i++){ + data.push({ + id:Mock.mock("@id"), + name:Mock.mock("@cname"), + job:"安全顾问", + position:turf.randomPosition([119.588709 ,34.514257,119.596724,34.520382]), + time:moment().subtract(Math.floor(Math.random()*30),"minutes").format("YYYY-MM-DD HH:mm:ss"), + tel:Mock.mock("@integer(13200000000, 13299999999)") + }) + } + return Mock.mock({ + code:0, + message:"成功", + data, + }) + } + public static getCameraList(){ + const data = [] as any; + const positions=[[ + 13312915.200000001, + 4098598.08, + 0.51 + ],[ + 13313086.72, + 4098442.24, + 0.51001953125 + ],[ + 13312961.280000001, + 4098238.72, + 0.5099609375 + ],[ + 13312853.76, + 4098298.88, + 0.5099609375 + ],[ + 13312756.48, + 4098408.96, + 0.51 + ],[ + 13312967.68, + 4098156.48, + 0.6099609375 + ],[ + 13313036.8, + 4098762.24, + 0.51 + ],[ + 13312883.200000001, + 4098757.7600000002, + 0.4 + ],[ + 13313327.36, + 4098413.12, + 0.51 + ],[ + 13312756.48, + 4098400.96, + 0.51 + ]] + const typeList = ["热成像摄像机","红外球形摄像机","高空瞭望摄像机"] + //turf.randomPosition([119.588709 ,34.514257,119.596724,34.520382]), + for(let i=0;i<10;i++){ + data.push({ + id:Mock.mock("@id"), + position:positions[i], + remark:typeList[i%3], + type:i%4, + }) + } + return Mock.mock({ + code:0, + message:"成功", + data, + }) + } + public static getCompanyList(){ + const data = [] as any; + const typeList = ["江苏汉邦唐","北京汉邦唐"]; + const areaList = [[[ + 13312797.44, + 4098625.6, + 0.400078125 + ],[ + 13312634.88, + 4098467.8400000003, + 0.400078125 + ],[ + 13312825.6, + 4098269.12, + 0.4 + ],[ + 13312852.48, + 4098290.56, + 0.6099218750000001 + ],[ + 13313027.84, + 4098100.8000000003, + 0.4000390625 + ],[ + 13313169.92, + 4098240, + 0.4000390625 + ]],[[ + 13312771.84, + 4098628.48, + 5.8119531250000005 + ],[ + 13312986.88, + 4098841.6, + 0.399921875 + ],[ + 13313376, + 4098431.36, + 0.399921875 + ],[ + 13313145.6, + 4098222.4, + 0.400078125 + ] + + ]]; + const positionList = [[ + 13312874.24, + 4098367.68, + 20 + ],[ + 13313114.88, + 4098505.92, + 20 + ]] + for(let i=0;i<2;i++){ + data.push({ + id:Mock.mock("@id"), + position:positionList[i%2], + area:areaList[i%2], + name:typeList[i%2], + peopleCount:100, + master:Mock.mock("@cname"), + city:Mock.mock("@city(true)"), + address:Mock.mock("@county(true)") + }) + } + return Mock.mock({ + code:0, + message:"成功", + data, + }) + } + public static getFourList(){ + const data = [] as any; + const areaList = four; + for(let i=0;i{ + Object.assign(item,{ + time : moment().subtract(i,"days").format("YYYY-MM-DD HH:mm:ss"), + position:turf.randomPosition([ + 13312995.84, + 4098177.2800000003, + 13313096.96, + 4098754.88, + ]), + head:Mock.mock("@cname"), + phone:Mock.mock("@integer(13200000000, 13299999999)"), + enterprise:'联化科', + risk:'管廊管道破裂', + reportingDate:moment().subtract(i,"days").format("YYYY-MM-DD HH:mm:ss"), + inspector:Mock.mock("@cname"), + hiddenDangerDetails:'南区6号管廊巡检过程中存在少量裂缝,目前未发现泄露', + rectificationMeasure:'整改措施:需要尽快进行管道评估,\n' + + '并根据评估结果,实施修复工作', + period:moment().subtract(i,"days").format("YYYY年M月DD日"), + remark:'管廊修复工作必须提前发布园\n' + + '区公告,并发函通知相关使用企业', + status:1, + }) + return item + }); + return Mock.mock({ + code:200, + message:"成功", + data, + }) + } + + public static getWaringList(){ + /* { + type:"fire", + id:new Date().getTime()+"", + typeName:"火灾", + position:[13312990.72, 4098613.12, 0.51], + reporter:"张三", + content:"北京汉邦唐化工厂区发生火灾" + + }*/ + const data = [ + { + title: '风险点异常', + info: '煤化工艺3号点温度异常', + time: '2023年1月20日 14:33:33', + level: '2', + type:"normal", + typeName:"风险告警", + reporter:"张三", + tel:"13337542569", + content:"煤化工艺3号点温度异常" + } + , { + title: '环境告警', + info: '土壤污染指数超标', + time: '2023年1月20日 14:33:33', + level: '1', + type:"normal", + typeName:"环境告警", + reporter:"李四", + tel:"13985412541", + content:"土壤污染指数超标" + }, { + title: '隐患整改超期', + info: '南区6号管廊存在少许裂缝', + time: '2023年1月20日 14:33:33', + level: '3', + type:"normal", + typeName:"隐患整改超期", + reporter:"张三", + tel:"13337542569", + content:"南区6号管廊存在少许裂缝" + }, { + title: '大气环境蓝色预警', + info: '大气5号监测点蓝色预警', + time: '2023年1月20日 14:33:33', + level: '2', + type:"normal", + typeName:"大气环境蓝色预警", + reporter:"张三", + tel:"13337542569", + content:"大气5号监测点蓝色预警" + }, { + title: '风险告警', + info: '富土康厂区4号设备监测数值异常', + time: '2023年1月20日 14:33:33', + level: '3', + type:"normal", + typeName:"风险告警", + reporter:"张三", + tel:"13337542569", + content:"富土康厂区4号设备监测数值异常" + }, { + title: '车辆告警', + info: '电子围栏-车辆非法进入', + time: '2023年1月20日 14:33:33', + level: '2', + type:"normal", + typeName:"车辆告警", + reporter:"李四", + tel:"13985412541", + content:"电子围栏-车辆非法进入" + }, + ].map((item:any)=>{ + item.id = Mock.mock("@id"); + if (item.type === 'normal'){ + item.position=turf.randomPosition([ + 13312995.84, + 4098177.2800000003, + 13313096.96, + 4098754.88, + ]); + }else if(item.type === 'fire'){ + item.position= [13312990.72, 4098613.12, 0.51] + } + item.reporter = Mock.mock("@cname") + item.tel = Mock.mock("@integer(13200000000, 13299999999)") + item.time = moment().subtract(0,"days").format("YYYY-MM-DD HH:mm:ss") + + return item + }); + const i = Math.floor(Math.random()*5)+1 + return Mock.mock({ + code:200, + message:"成功", + data:[data[i]], + }) + } + public static deviceList(){ + const nameList = [ + "2号区3号库采样点", + "1号区13号库采样点", + "22号区4号库采样点", + "12号区33号库采样点", + "12号区3号库采样点", + "22号区32号库采样点", + "6号区3号库采样点", + "8号区2号库采样点", + "6号区9号库采样点", + "7号区1号库采样点", + ] + const values = [90,80,70,60,55,50,46,40,30,20]; + const data = { + nameList, + values + }; + return Mock.mock({ + code:200, + message:"成功", + data, + }) + } + public static xkz(){ + + const data = [ + { + id: '12987122', + name: 'C区排放口', + type: 'COD', + unit: '3.2', + year1: 1075, + year2: 2075, + year3: 2275, + }, { + id: '12987123', + name: 'C区排放口', + type: '氨氮', + unit: '4.43', + year1: 1075, + year2: 2075, + year3: 2275, + }, { + id: '12987124', + name: 'C区排放口', + type: '氨氮', + unit: '4.43', + year1: 1075, + year2: 2075, + year3: 2275, + }, { + id: '12987125', + name: 'C区排放口', + type: '氨氮', + unit: '1.43', + year1: 1275, + year2: 2775, + year3: 2175, + }, { + id: '12987126', + name: 'C区排放口', + type: '氨氮', + unit: '2.43', + year1: 1275, + year2: 2375, + year3: 2575, + }]; + return Mock.mock({ + code:200, + message:"成功", + data, + }) + } + public static dangerSourceDetail(){ + + const data = { + "id": "954e5e6f-91c5-46d1-a085-ad0e6cdae10c", + "mainResponsiblePersonId": "14acb7b9-83b2-4231-8eb2-d65f90ee49c8", + "mainResponsiblePerson": "璩筠月", + "technologyResponsiblePersonId": "18c563b8-9e7e-4055-b4d0-333e30dfe70b", + "technologyResponsiblePerson": "殳淑美", + "operateResponsiblePersonId": "1e3d6d39-6fa8-43ec-9577-cb734ede549c", + "operateResponsiblePerson": "况毅强", + "name": "氯气瓶仓库单元", + "riskFactor": "易燃易爆", + "consequence": "气体泄漏,导致燃烧爆炸,人员伤亡", + "remark": "气体泄漏,导致燃烧爆炸,人员伤亡", + "level": 3, + "controlMeasures": "1.采用密封存储容器,定期检修\r2.安装高精度气体泄漏检测仪器,及时预警", + "unifiedCoding": "BA京110115〔2019〕007号", + "unitType": 0, + "memorySpace": "14", + "enterprise": "中石油兰州石化榆林化工有限公司", + "hazardousChemicalsName": "氯气" + }; + return Mock.mock({ + code:200, + message:"成功", + data, + }) + } + + public static getEventList(){ + /* { + type:"fire", + id:new Date().getTime()+"", + typeName:"火灾", + position:[13312990.72, 4098613.12, 0.51], + reporter:"张三", + content:"北京汉邦唐化工厂区发生火灾" + + }*/ + const data = [ + { + title: '高空坠落', + info: '物体高空坠落', + time: '2023年1月20日 14:33:33', + level: '2', + type:"normal", + typeName:"安全事故", + reporter:"张三", + tel:"13337542569", + content:"物体高空坠落" + } + , { + title: '火灾告警', + info: '北京汉邦唐化工厂区发生火灾', + time: '2023年1月20日 14:33:33', + level: '1', + type:"fire", + typeName:"火灾", + reporter:"李四", + tel:"13985412541", + content:"北京汉邦唐化工厂区发生火灾" + }, { + title: '坍塌事故', + info: '建筑坍塌及时处理', + time: '2023年1月20日 14:33:33', + level: '1', + type:"normal", + typeName:"坍塌事故", + reporter:"张三", + tel:"13337542569", + content:"建筑坍塌及时处理" + }, { + title: '气液泄露', + info: 'NO气体泄露', + time: '2023年1月20日 14:33:33', + level: '2', + type:"normal", + typeName:"气液泄露", + reporter:"张三", + tel:"13337542569", + content:"NO气体泄露" + }, { + title: '火灾爆炸', + info: '富土康厂区火灾爆炸', + time: '2023年1月20日 14:33:33', + level: '2', + type:"normal", + typeName:"火灾爆炸", + reporter:"张三", + tel:"13337542569", + content:"富土康厂区火灾爆炸" + }, { + title: '火灾爆炸', + info: '北京汉邦唐化工厂区发生火灾', + time: '2023年1月20日 14:33:33', + level: '1', + type:"fire", + typeName:"火灾", + reporter:"李四", + tel:"13985412541", + content:"北京汉邦唐化工厂区发生火灾" + }, + ].map((item:any)=>{ + item.id = Mock.mock("@id"); + if (item.type === 'normal'){ + item.position=turf.randomPosition([ + 13312995.84, + 4098177.2800000003, + 13313096.96, + 4098754.88, + ]); + }else if(item.type === 'fire'){ + item.position= [13312990.72, 4098613.12, 0.51] + } + item.reporter = Mock.mock("@cname") + item.tel = Mock.mock("@integer(13200000000, 13299999999)") + item.time = moment().subtract(0,"days").format("YYYY-MM-DD HH:mm:ss") + + return item + }); + const i = Math.floor(Math.random()*5)+1 + return Mock.mock({ + code:200, + message:"成功", + data:[data[i]], + }) + } +} diff --git a/src/mock/layer.ts b/src/mock/layer.ts new file mode 100644 index 0000000..e07e5b8 --- /dev/null +++ b/src/mock/layer.ts @@ -0,0 +1,361 @@ + + +enum COLOR{ + // 围栏 + BOUNDS="#F669FF", + // 实控线 + REALLINE="#00C8FF", + // 规划线 + PLANLINE="#FFA900", + // 安全线 + SAFELINE="#80ED30", + // 四色图-绿 + GREEN="#80ED30", + // 四色图-蓝 + BLUE="#7DAEFF", + // 四色图-黄 + YELLOW="#FFA900", + // 四色图-红 + RED="#FF5959" +} +export default [{ + name:"在管企业", + ids:[] as string[], + type:"areaMarker", + value:"company", + colors:["#0a5fff","#5e93fd"], + selected:false, + pages:["parkFile","companyFile","closePark","smartSafetySupervision","smartEnvironment","smartEnergy","gasConsumption","electricityConsumption","waterConsumption","steamConsumption"] +},{ + name:"视频监控", + ids:[] as string[], + type:"marker", + urls:[ + "@path:camera_0.png", + "@path:camera_1.png", + "@path:camera_2.png", + "@path:camera_3.png", + ], + value:"video" , + selected:false, + pages:["parkFile","smartEmergency","closePark","peopleCar","dangrousCar","boundsManager","smartSafetySupervision"] +},{ + name:"电子围栏", + ids:[] as string[], + type:"area", + value:"bounds", + color:COLOR.BOUNDS, + selected:false, + pages:["closePark","peopleCar"] +},{ + name:"人员热力图", + ids:[] as string[], + type:"heatmap", + value:"heatmap", + selected:false, + pages:[] +},{ + name:"人员定位", + ids:[] as string[], + type:"moveMarker", + value:"peo", + url: "@path:people.png", + pakFilePath: "@path:DTS_Library_V5.4.pak", + assetPath:"/JC_CustomAssets/VehicleLibrary/Exhibition/重型货车_01", + coordinateType:1, + selected:false, + pages:["closePark","peopleCar","smartSafetySupervision","smartEmergency"] +},{ + name:"人员热力图", + ids:[] as string[], + type:"heatmap", + value:"heatmap", + coordinateType:1, + selected:false, + pages:["smartEmergency"] +},{ + name:"车辆定位", + ids:[] as string[], + type:"moveMarker", + value:"car", + pakFilePath: "@path:DTS_Library_V5.4.pak", + assetPath:"/JC_CustomAssets/VehicleLibrary/Exhibition/重型货车_01", + urls:[ + "@path:car.png", + "@path:d-car.png", + "@path:d-car.png", + ], + coordinateType:1, + selected:false, + pages:["closePark","peopleCar","smartSafetySupervision","smartEmergency"] +},{ + name:"重载车辆", + ids:[] as string[], + type:"model", + pakFilePath: "@path:DTS_Library_V5.4.pak", + assetPath:"/JC_CustomAssets/VehicleLibrary/Exhibition/重型货车_01", + value:"heavy-car", + scale:[3,3,3], + selected:false, + pages:["closePark","dangrousCar"] +},{ + name:"空载车辆", + ids:[] as string[], + type:"model", + pakFilePath: "@path:DTS_Library_V5.4.pak", + assetPath:"/JC_CustomAssets/ObjectLibrary/Exhibition/交通工具/车辆/工程车_2", + value:"empty-car", + scale:[3,3,3], + selected:false, + pages:["closePark","dangrousCar"] +},{ + name:"疏散路线", + ids:[] as string[], + type:"line", + color:COLOR.GREEN, + value:"safe-route", + selected:false, + pages:["dangrousCar"] +}, +// { +// name:"气体监测", +// ids:[] as string[], +// type:"", +// value:"gas-monitor", +// selected:false, +// pages:["dangrousCar"] +// }, +{ + name:"重大危险源", + ids:[] as string[], + type:"areaMarker", + value:"dangrous", + color:"#FFF", + colors:[], + selected:false, + pages:["parkFile","smartSafetySupervision","smartEmergency"] +},{ + name:"风险四色图", + ids:[] as string[], + type:"areaMarker", + value:"four-color", + colors:[COLOR.RED,COLOR.YELLOW,COLOR.BLUE,COLOR.GREEN], + selected:false, + pages:["parkFile","smartSafetySupervision","risk"] +},{ + name:"风险四色图", + ids:[] as string[], + type:"areaMarker", + value:"four-color2", + colors:[COLOR.RED,COLOR.YELLOW,COLOR.BLUE,COLOR.GREEN], + selected:false, + pages:["dangrousCar"] +},{ + name:"应急设施", + ids:[] as string[], + type:"model", + pakFilePath: "@path:DTS_Library_V5.4.pak", + assetPath:"/JC_CustomAssets/EffectLibrary/Exhibition/3DUI/3D_UI_D_2", + value:"safe-building", + scale:[3,3,3], + selected:false, + pages:["parkFile","smartEmergency","goods"] +},{ + name:"物资仓库", + ids:[] as string[], + type:"model", + pakFilePath: "@path:DTS_Library_V5.4.pak", + assetPath:"/JC_CustomAssets/EffectLibrary/Exhibition/3DUI/3D_UI_C_5", + value:"safe-goods", + scale:[3,3,3], + selected:false, + pages:["parkFile","smartEmergency","goods"] +},{ + name:"实控线", + ids:[] as string[], + type:"area", + value:"real-line", + color:COLOR.REALLINE, + selected:false, + pages:["parkFile","boundsManager"] +},{ + name:"安全线", + ids:[] as string[], + type:"area", + value:"safe-line", + color:COLOR.SAFELINE, + selected:false, + pages:["parkFile","boundsManager"] +},{ + name:"规划线", + ids:[] as string[], + type:"area", + value:"plan-line", + color:COLOR.PLANLINE, + selected:false, + pages:["parkFile","boundsManager"] +},{ + name:"卡口设施", + ids:[] as string[], + type:"model", + pakFilePath: "@path:DTS_Library_V5.4.pak", + assetPath:"/JC_CustomAssets/EffectLibrary/Exhibition/3DUI/3D_UI_D_2", + value:"check-point", + scale:[3,3,3], + selected:false, + pages:["boundsManager"] +},{ + name:"动火", + ids:[] as string[], + type:"model", + pakFilePath: "@path:DTS_Library_V5.4.pak", + assetPath:"/JC_CustomAssets/EffectLibrary/Exhibition/3DUI/3D_UI_A_1", + value:"use-fire", + scale:[3,3,3], + selected:false, + pages:["dangerousWork"] +},{ + name:"断路", + ids:[] as string[], + type:"areaMarker", + value:"break-road", + selected:false, + color:"#000", + pages:["dangerousWork"] +},{ + name:"高空", + ids:[] as string[], + type:"model", + pakFilePath: "@path:DTS_Library_V5.4.pak", + assetPath:"/JC_CustomAssets/EffectLibrary/Exhibition/3DUI/3D_UI_A_1", + value:"high-sky", + scale:[3,3,3], + selected:false, + pages:["dangerousWork"] +},{ + name:"吊装", + ids:[] as string[], + type:"model", + pakFilePath: "@path:DTS_Library_V5.4.pak", + assetPath:"/JC_CustomAssets/EffectLibrary/Exhibition/3DUI/3D_UI_A_1", + value:"hoisting", + scale:[3,3,3], + selected:false, + pages:["dangerousWork"] +},{ + name:"动土", + ids:[] as string[], + type:"areaMarker", + value:"make-ground", + selected:false, + color:"#efaf00", + pages:["dangerousWork"] +},{ + name:"临时用电", + ids:[] as string[], + type:"model", + pakFilePath: "@path:DTS_Library_V5.4.pak", + assetPath:"/JC_CustomAssets/EffectLibrary/Exhibition/3DUI/3D_UI_A_1", + value:"use-e", + scale:[3,3,3], + selected:false, + pages:["dangerousWork"] +},{ + name:"受限空间", + ids:[] as string[], + type:"model", + pakFilePath: "@path:DTS_Library_V5.4.pak", + assetPath:"/JC_CustomAssets/EffectLibrary/Exhibition/3DUI/3D_UI_A_1", + value:"forbid-space", + scale:[3,3,3], + selected:false, + pages:["dangerousWork"] +},{ + name:"盲板抽堵", + ids:[] as string[], + type:"model", + pakFilePath: "@path:DTS_Library_V5.4.pak", + assetPath:"/JC_CustomAssets/EffectLibrary/Exhibition/3DUI/3D_UI_A_1", + value:"blind-plate", + scale:[3,3,3], + selected:false, + pages:["dangerousWork"] +},{ + name:"大气环境", + ids:[] as string[], + type:"marker", + value:"gas-env", + hasText:true, + coordinateType:1, + url:"@path:mp_atmosphere.png", + selected:false, + pages:["smartEnvironment","airQuality","dangrousCar"] +},{ + name:"土壤环境", + ids:[] as string[], + type:"marker", + value:"ground-env", + coordinateType:1, + hasText:true, + url:"@path:mp_soil.png", + selected:false, + pages:["smartEnvironment","soilQuality"] +},{ + name:"废气污染源", + ids:[] as string[], + type:"marker", + url:"@path:mp_fluegas.png", + value:"fq-wrw", + coordinateType:1, + hasText:true, + selected:false, + pages:["smartEnvironment","gas"] +},{ + name:"清下水监控", + ids:[] as string[], + type:"marker", + coordinateType:1, + hasText:true, + url:"@path:mp_purewater.png", + value:"qxs-jk", + selected:false, + pages:["smartEnvironment","clean"] +},{ + name:"水环境", + ids:[] as string[], + type:"marker", + coordinateType:1, + url:"@path:mp_water.png", + value:"water-env", + hasText:true, + selected:false, + pages:["smartEnvironment","waterQuality"] +},{ + name:"特征污染物", + ids:[] as string[], + type:"marker", + coordinateType:1, + hasText:true, + url:"@path:mp_contaminant.png", + value:"tz-wrw", + selected:false, + pages:["smartEnvironment","characteristicContaminants"] +},{ + name:"废水污染源", + ids:[] as string[], + type:"marker", + coordinateType:1, + hasText:true, + url:"@path:mp_fluewater.png", + value:"fs-wrw", + selected:false, + pages:["smartEnvironment","waste"] +},{ + name:"隐患治理", + ids:[] as string[], + type:"marker", + url:"@path:dt_yinhuan.png", + value:"hidden-dangrous", + selected:false, + pages:["pitfall"] +}] \ No newline at end of file diff --git a/src/mock/line.ts b/src/mock/line.ts new file mode 100644 index 0000000..cbad63d --- /dev/null +++ b/src/mock/line.ts @@ -0,0 +1,63 @@ +export default[ + [[ + 13313007.36, + 4098545.92, + 1 + ],[ + 13313047.040000001, + 4098509.12, + 0.50984375 + ],[ + 13313094.4, + 4098544.96, + 1 + ],[ + 13313141.76, + 4098497.2800000003, + 1 + ],[ + 13313192.96, + 4098545.2800000003, + 1 + ],[ + 13313130.24, + 4098629.12, + 1 + ],[ + 13313104.64, + 4098693.12, + 1 + ],[ + 13313082.88, + 4098749.44, + 1 + ],[ + 13313052.16, + 4098779.8400000003, + 1 + ],[ + 13313081.6, + 4098823.04, + 1 + ]],[[ + 13312802.56, + 4098473.92, + 1 + ],[ + 13312913.92, + 4098365.7600000002, + 1 + ],[ + 13312875.52, + 4098313.2800000003, + 1 + ],[ + 13313004.8, + 4098176, + 1 + ],[ + 13312966.4, + 4098140.48, + 1 + ]] +] \ No newline at end of file diff --git a/src/mock/nav.ts b/src/mock/nav.ts new file mode 100644 index 0000000..b227449 --- /dev/null +++ b/src/mock/nav.ts @@ -0,0 +1,111 @@ +export default [{ + label: "一园一档", + value: "parkFile", + children: [{ + label: "首页概览", + value: "parkFile" + }] +},{ + label: "一企一档", + value: "companyFile", + children: [{ + label: "首页概览", + value: "companyFile" + }] +},{ + label: "智慧环保", + value: "smartEnvironment", + children: [{ + label: "首页概览", + value: "smartEnvironment" + }, { + label: "大气环境", + value: "airQuality" + }, { + label: "水环境", + value: "waterQuality" + }, { + label: "土壤环境", + value: "soilQuality" + }, { + label: "特征污染物", + value: "characteristicContaminants" + }, { + label: "废气监测", + value: "gas" + }, { + label: "废水监测", + value: "waste" + }, { + label: "清下水", + value: "clean" + }] +}, { + label: "智慧安监", + value: "smartSafetySupervision", + children: [{ + label: "首页概览", + value: "smartSafetySupervision" + }, + { + label: "风险管控", + value: "risk" + }, + /* { + label:"重大危险源", + value:"hazard" + },*/ + { + label: "隐患治理", + value: "pitfall" + }, + { + label: "特殊作业", + value: "dangerousWork" + }] +}, { + label: "智慧应急", + value: "smartEmergency", + children: [{ + label: "首页概览", + value: "smartEmergency" + }, { + label: "物资盘点", + value: "goods" + }] +}, { + label: "封闭园区", + value: "closePark", + children: [{ + label: "首页概览", + value: "closePark" + }, { + label: "人车管理", + value: "peopleCar" + }, { + label: "危化车辆", + value: "dangrousCar" + }, { + label: "周界管理", + value: "boundsManager" + }] +}, { + label: "智慧能源", + value: "smartEnergy", + children: [{ + label: "首页概览", + value: "smartEnergy" + }, { + label: "燃料一张图", + value: "gasConsumption" + }, { + label: "电力一张图", + value: "electricityConsumption" + }, { + label: "水务一张图", + value: "waterConsumption" + }, { + label: "蒸汽一张图", + value: "steamConsumption" + }] +}] diff --git a/src/mock/plan.ts b/src/mock/plan.ts new file mode 100644 index 0000000..8101682 --- /dev/null +++ b/src/mock/plan.ts @@ -0,0 +1,19 @@ +export default [[ + 13312624.64, + 4098459.2, + 0.4 +],[ + 13312988.16, + 4098051.52, + 0.4 +],[ + 13312719.36, + 4097784.3200000003, + 0.4 +],[ + 13312346.88, + 4098189.12, + 0.400078125 +] + +] \ No newline at end of file diff --git a/src/mock/real.ts b/src/mock/real.ts new file mode 100644 index 0000000..e877df6 --- /dev/null +++ b/src/mock/real.ts @@ -0,0 +1,23 @@ +export default [[ + 13312554.24, + 4098441.2800000003, + 0.4 +],[ + 13313066.24, + 4098892.48, + 0.476328125 +],[ + 13313446.4, + 4098451.52, + 0.4000390625 +],[ + 13312994.56, + 4098064.96, + 0.3999609375 +],[ + 13312628.48, + 4098448.3200000003, + 0.39998046875 +] + +] \ No newline at end of file diff --git a/src/mock/safe.ts b/src/mock/safe.ts new file mode 100644 index 0000000..1fe5fca --- /dev/null +++ b/src/mock/safe.ts @@ -0,0 +1,19 @@ +export default [[ + 13312145.92, + 4098379.8400000003, + 0.39984375 +],[ + 13312945.92, + 4097631.04, + 0.39984375 +],[ + 13314124.8, + 4098650.24, + 0.39984375 +],[ + 13313205.76, + 4099659.2, + 0.4 +] + +] \ No newline at end of file diff --git a/src/models/index.ts b/src/models/index.ts new file mode 100644 index 0000000..d5dcabd --- /dev/null +++ b/src/models/index.ts @@ -0,0 +1,40 @@ +interface ActionResult { + /** + * code: 状态码, 0成功, 1一般业务异常, -1其他异常, -2授权异常, 令牌错误或令牌过期 + */ + code: number, + /** + * message: 错误消息 + */ + message: string; + /** + * data: 数据 + */ + data: T; +} +interface PagedResult { + /** + * 总笔数 + */ + totalRecords: number; + /** + * 总页数 + */ + totalPages: number; + /** + * 页码 + */ + pageNumber: number; + /** + * 每页笔数 + */ + pageSize: number; + /** + * 分页数据 + */ + datas: T[]; +} +interface loginModel{ + access_token:string, + expires_in:number +} diff --git a/src/models/line.option.ts b/src/models/line.option.ts new file mode 100644 index 0000000..1cdd63c --- /dev/null +++ b/src/models/line.option.ts @@ -0,0 +1,37 @@ +export default class LineOption{ + // 主键 + public id:string; + // 分组id + public groupId?:string; + // 用户自定义数据 + public userData?:string; + // 坐标系类型,取值范围:0为Projection类型,1为WGS84类型,2为火星坐标系(GCJ02),3为百度坐标系(BD09),默认值:0 + public coordinateType?:number; + // 坐标点数组 + public coordinate?:[number,number,number][]; + // 可视范围: [近裁距离, 远裁距离],取值范围: [任意负值, 任意正值] + public range?:[number,number]; + // 线宽,单位:米,默认值20 + public thickness?:number; + // 颜色值,支持四种格式 + public color?:string; + // 亮度,取值范围:[0~1000],默认值:0.5 + public intensity?:number; + // 流速,取值范围:[0~1.0],默认值:0.5 + public flowRate?:number; + // 折线样式,箭头/光流/贴地/实线/虚线等,取值范围:[0~7] + public style?:number; + // 可选参数,材质贴图平铺比例,和PolylineStyle取值有关,目前仅部分样式支持此参数,从起始位置开始平铺,超过的部分会按此比例生成新的区域,类似CSS的repeat。如果这个值 <= 0 使用自动计算按Polyline长度比例平铺, >0使用用户输入的值去平铺 + public tiling?:number; + // 可选参数,自定义材质路径,即资源库PAK文件里材质文件的路径,设置自定义材质参数后style相关参数会失效 + public material?:string; + // 样式,0:直线, 1:曲线,注意:设置为曲线坐标点多的时候会非常影响添加添加效率 + public shape:number; + // 选参数,仅在设置自定义材质路径后生效,自定义材质数值类型参数,包含name/value键值对的数组,其中value为数值,格式示例:[{"name":"不透明度","value":0.5},{"name":"UV重复","value":1.0}] + public scalarParameters?:any[]; + // 可选参数,仅在设置自定义材质路径后生效,自定义材质矢量类型参数,包含name/value键值对的数组,其中value为数组,格式示例:[{"name":"color1","value":[1,1,1,1]},{"name":"color2","value":[1,0,0,1]}] + public vectorParameters?:any[]; + // 是否做深度检测,默认为true,true会被遮挡,false不会被遮挡 + public depthTest?:boolean; + +} \ No newline at end of file diff --git a/src/models/marker.option.ts b/src/models/marker.option.ts new file mode 100644 index 0000000..3ae967b --- /dev/null +++ b/src/models/marker.option.ts @@ -0,0 +1,87 @@ +export default class MarkerOption{ + // 主键 + public id:string; + // 分组id + public groupId?:string; + // 用户数据 + public userData?:string; + // 坐标系类型,取值范围:0为Projection类型,1为WGS84类型,2为火星坐标系(GCJ02),3为百度坐标系(BD09),默认值:0 + public coordinateType?:number; + // 标注点的位置坐标: [x, y, z] + public coordinate?:[number,number,number]; + // 锚点: [x, y],设置Marker的整体偏移,取值规则和imageSize设置的宽高有关,图片的左上角会对准标注点的坐标位置。示例设置规则:x=-imageSize.width/2,y=imageSize.height + public anchors?:[number,number]; + // 可视范围: [近裁距离, 远裁距离],默认值: [10, 10000] + public range?:[number,number]; + // 文本可视范围: [近裁距离, 远裁距离],默认值: [100, 6000] + public textRange?:[number,number]; + // 图片的尺寸: [width, height], 默认值[32,32] + public imageSize?:[number,number]; + // 图片是否固定尺寸,取值范围:false 自适应,近大远小,true 固定尺寸,默认值:false + public fixedSize?:boolean; + // 图片路径,支持gif动图,支持本地路径和网络路径 + public imagePath?:string; + // 鼠标悬停时显示的图片路径,支持gif动图,支持本地路径和网络路径 + public hoverImagePath?:string; + // 鼠标悬停时显示的图片尺寸: [width, height], 默认值:[0,0] 使用图片自身的尺寸,注意:如果设置的值比imageSize尺寸小,则默认使用imageSize的尺寸。 + public hoverImageSize?:[number,number]; + // 显示的文字 + public text?:string; + // 是否打开文字展开动画效果,默认值:true + public useTextAnimation?:boolean; + // 文本偏移: [x, y],默认值:[0,0] + public textOffset?:[number,number]; + // 字体大小,默认值:12 + public fontSize?:number; + // 字体轮廓线大小,默认值:1 + public fontOutlineSize?:number; + // 文本背景颜色,默认值白色[1, 1, 1, 0.85],支持四种格式 + public textBackgroundColor?:string; + // 字体颜色,默认值:黑色Color.Black,支持四种格式, + public fontColor?:string; + // 字体轮廓线颜色,默认值:黑色Color.Black,支持四种格式 + public fontOutlineColor?:string; + // 弹窗背景颜色, [1.0,1.0,1.0,0.1] ,支持四种格式, + public popupBackgroundColor?:string; + // 弹窗HTML链接或者视频文件路径,也支持rtsp协议实时视频流 + public popupURL?:string; + // 弹窗大小: [width, height],默认值:[600,400] + public popupSize?:[number,number]; + // 弹窗偏移: [x, y],默认值:[0,0] + public popupOffset?:[number,number]; + // 标注点下方是否显示垂直牵引线,默认不显示:false + public showLine?:boolean; + // 牵引线粗细[width, height],默认值:[0,0],如果要显示牵引线,需要将该属性设置成非0值 + public lineSize?:[number,number]; + // 牵引线颜色,默认值:白色,支持四种格式 + public lineColor?:string; + // 牵引线偏移: [x, y],默认值:[0,0] + public lineOffset?:[number,number]; + // 是否自动关闭弹出窗口,默认值:true + public autoHidePopupWindow?:boolean; + // 自动判断下方是否有物体,设置正确高度,默认值:false + public autoHeight?:boolean; + // 显示模式,取值说明如下: + + // 0:相机移动不显示,参与避让聚合 + + // 1:相机移动时显示,参与避让聚合 + + // 2:相机移动时显示,不参与避让聚合 + + // 3:相机移动时不显示,不参与避让聚合 + + // 4:智能模式,根据当前相机高度自动适配以上模式,类似金字塔lod加载效果,内置默认规则:range范围的1%内取值2,大于1%小于10%取值1,大于10%取值0 + public displayMode?:number; + // 智能模式时的显示模式切换时range参数的首段比例,仅在displayMode=4时生效,取值范围:[0.01~1.0),默认值0.01,示例:如果range=[1,1000],则在[1,10]范围内dislayMode=2 + public autoDisplayModeSwitchFirstRatio?:number; + // 智能模式时的显示模式切换时range参数的第二段比例,仅在displayMode=4时生效,取值范围:[0.01~1.0),默认值0.1,示例:如果range=[1,1000],则在[10,100]范围内dislayMode=1,大于100则dislayMode=1 + public autoDisplayModeSwitchSecondRatio?:number; + // 聚合时是否根据图片路径(imagePath)分类聚合显示,即当多个marker的imagePath路径参数相同时按路径对marker分类聚合 + public clusterByImage?:boolean; + // 避让优先级,默认值:0 + public priority?:number; + // 是否参与遮挡剔除 + public occlusionCull?:boolean; + +} \ No newline at end of file diff --git a/src/models/polygon.option.ts b/src/models/polygon.option.ts new file mode 100644 index 0000000..1599a96 --- /dev/null +++ b/src/models/polygon.option.ts @@ -0,0 +1,37 @@ +export default class PolygonOption{ + // 主键 + public id:string; + // 分组id + public groupId?:string; + // 用户自定义数据 + public userData?:string; + // 坐标系类型,取值范围:0为Projection类型,1为WGS84类型,2为火星坐标系(GCJ02),3为百度坐标系(BD09),默认值:0 + public coordinateType?:number; + // 多边形坐标数组 + public coordinate?:[number,number,number][] | [number,number,number][][]; + // 颜色值,支持四种格式, + public color?:string; + // 3D多边形的高度,取值范围:[任意正数] + public height?:number; + // 亮度,取值范围:[0~1000] + public intensity?:number; + // 3DPolygon的样式,参考 + public style?:number; + // 可选参数,仅当3DPolygon的样式支持贴图显示时,设置贴图横向平铺,取值范围:[任意数值] + public tillingX?:number; + // 可选参数,仅当3DPolygon的样式支持贴图显示时,设置贴图纵向平铺,取值范围:[任意数值] + public tillingY?:number; + // 可选参数,自定义材质路径,即资源库PAK文件里材质文件的路径,设置自定义材质参数后style相关参数会失效 + public material?:string; + // 可选参数,仅在设置自定义材质路径后生效,自定义材质数值类型参数,包含name/value键值对的数组,其中value为数值,格式示例:[{"name":"不透明度","value":0.5},{"name":"UV重复","value":1.0}] + public scalarParameters?:any[]; + // 可选参数,仅在设置自定义材质路径后生效,自定义材质矢量类型参数,包含name/value键值对的数组,其中value为数组,格式示例:[{"name":"color1","value":[1,1,1,1]},{"name":"color2","value":[1,0,0,1]}] + public vectorParameters?:any[]; + // 可选参数,设置自定义材质路径后生效,是否生成顶面,默认:true + public generateTop?:boolean; + // 可选参数,设置自定义材质路径后生效,是否生成侧面,默认:true + public generateSide?:boolean; + // 可选参数,设置自定义材质路径后生效,是否生成底面,默认:true + public generateBottom?:boolean; + +} \ No newline at end of file diff --git a/src/models/radar.option.ts b/src/models/radar.option.ts new file mode 100644 index 0000000..94308a4 --- /dev/null +++ b/src/models/radar.option.ts @@ -0,0 +1,23 @@ +export default class RadarOption{ + // 主键 + public id:string; + // 分组id + public groupId?:string; + // 用户自定义数据 + public userData?:string; + // 坐标系类型,取值范围:0为Projection类型,1为WGS84类型,2为火星坐标系(GCJ02),3为百度坐标系(BD09),默认值:0 + public coordinateType?:number; + // 多边形坐标数组 + public coordinate?:[number,number,number]; + // 颜色值,支持四种格式, + public color?:string; + // 辐射圈的半径,取值范围:[0~500000],单位:米 + public radius?:number; + // 亮度,取值范围:[0~1000] + public intensity?:number; + // 波纹数量,取值范围:[0~5],单位:个 + public rippleNumber?:number; + // 自动判断下方是否有物体,设置正确高度,默认值:false + public autoHeight?:boolean; + +} \ No newline at end of file diff --git a/src/popup/pop.component.vue b/src/popup/pop.component.vue new file mode 100644 index 0000000..86df9a3 --- /dev/null +++ b/src/popup/pop.component.vue @@ -0,0 +1,142 @@ + + + \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts new file mode 100644 index 0000000..a5aba6a --- /dev/null +++ b/src/router/index.ts @@ -0,0 +1,36 @@ +import Vue from 'vue' +import VueRouter, { RouteConfig } from 'vue-router' +import pageNoFoundComponent from 'common/notFound' +import indexComponent from 'common/index' +import OverviewComponent from '@/views/overview.component' +import PopupComponent from "@/popup/pop.component.vue" + +Vue.use(VueRouter) +const routes: Array = [ + + { + path: '/', + name: 'index', + redirect:"/wit-park", + }, + { + path: '/wit-park', + name: 'indexComponent', + component:OverviewComponent + }, + { + path: '/popup', + name: 'popup', + component: PopupComponent + }, + { + path: '*', + name: '404', + component: pageNoFoundComponent + }, +] + +const router = new VueRouter({ + routes, +}) +export default router diff --git a/src/service/close.service.ts b/src/service/close.service.ts new file mode 100644 index 0000000..42338d6 --- /dev/null +++ b/src/service/close.service.ts @@ -0,0 +1,27 @@ +import HttpService from "hbt-common/service/http.service" +import type { AxiosResponse } from 'axios' +export default class CloseService extends HttpService{ + constructor(){ + super() + } + public getPeopleList(params?: any):Promise>>{ + const url = '/getPeopleList'; + return this.get(url,params) + } + public getCarList(params?: any):Promise>>{ + const url = '/getCarList'; + return this.get(url,params) + } + public getStopCarList(params?: any):Promise>>{ + const url = '/getStopCarList'; + return this.get(url,params) + } + public getBlackCarList(params?: any):Promise>>{ + const url = '/getBlackCarList'; + return this.get(url,params) + } + public getCameraList(params?: any):Promise>>{ + const url = '/getCameraList'; + return this.get(url,params) + } +} \ No newline at end of file diff --git a/src/service/park.service.ts b/src/service/park.service.ts new file mode 100644 index 0000000..e7a49b2 --- /dev/null +++ b/src/service/park.service.ts @@ -0,0 +1,97 @@ +import HttpService from "hbt-common/service/http.service" +import type { AxiosResponse } from 'axios' +export default class ParkFileService extends HttpService{ + constructor(){ + super() + } + public getExpertList(params?: any):Promise>>{ + const url = '/getPeopleList'; + return this.get(url,params) + } + public getCompanyList(params?: any):Promise>>{ + const url = '/getCompanyList'; + return this.get(url,params) + } + public getBounds(params?: any):Promise>>{ + const url = '/getBounds'; + return this.get(url,params) + } + public getRealBounds(params?: any):Promise>>{ + const url = '/getRealBounds'; + return this.get(url,params) + } + public getSafeBounds(params?: any):Promise>>{ + const url = '/getSafeBounds'; + return this.get(url,params) + } + public getPlanBounds(params?: any):Promise>>{ + const url = '/getPlanBounds'; + return this.get(url,params) + } + public getSafeLine(params?: any):Promise>>{ + const url = '/getSafeLine'; + return this.get(url,params) + } + public getGasData(params?: any):Promise>>{ + const url = '/getGasData'; + return this.get(url,params) + } + public getRoilData(params?: any):Promise>>{ + const url = '/getRoilData'; + return this.get(url,params) + } + public getBadGasData(params?: any):Promise>>{ + const url = '/getBadGasData'; + return this.get(url,params) + } + public getCleanWaterData(params?: any):Promise>>{ + const url = '/getCleanWaterData'; + return this.get(url,params) + } + public getWaterEnvData(params?: any):Promise>>{ + const url = '/getWaterEnvData'; + return this.get(url,params) + } + public getTzWrwData(params?: any):Promise>>{ + const url = '/getTzWrwData'; + return this.get(url,params) + } + public getBadWaterData(params?: any):Promise>>{ + const url = '/getBadWaterData'; + return this.get(url,params) + } + public getFourList(params?: any):Promise>>{ + const url = '/getFourList'; + return this.get(url,params) + } + public getFourList2(params?: any):Promise>>{ + const url = '/getParkFourList'; + return this.get(url,params) + } + public getCheckPoint(params?: any):Promise>>{ + const url = '/getCheckPoint'; + return this.get(url,params) + } + public getBuildingList(params?: any):Promise>>{ + const url = '/getBuildingList'; + return this.get(url,params) + } + public getStoreList(params?: any):Promise>>{ + const url = '/getStoreList'; + return this.get(url,params) + } + public getDangrous(params?: any):Promise>>{ + const url = '/getDangrous'; + return this.get(url,params) + } + // 获取动火 + public getDangrousWorkData(params?: any):Promise>>{ + const url = '/getDangrousWorkData'; + return this.get(url,params) + } + + public getHiddenDangrous(params?: any):Promise>>{ + const url = '/getHiddenDangrous'; + return this.get(url,params) + } +} \ No newline at end of file diff --git a/src/service/risk.service.ts b/src/service/risk.service.ts new file mode 100644 index 0000000..4d1f4d8 --- /dev/null +++ b/src/service/risk.service.ts @@ -0,0 +1,28 @@ +import HttpService from "hbt-common/service/http.service" +import type { AxiosResponse } from 'axios' +export default class RiskService extends HttpService{ + constructor(){ + super() + } + public getRiskList(params?: any):Promise>>{ + const url = '/getRiskList'; + return this.get(url,params) + } + public getRiskDetail(params?: any):Promise>>{ + const url = '/getRiskDetail'; + return this.post(url,params,{},false) + } + public getSepList(params?: any):Promise>>{ + const url = '/getSepList'; + return this.get(url,{},false) + } + public getHiddenDangerList(params?: any):Promise>>{ + const url = '/getHiddenDangerList'; + return this.get(url,{},false) + } + public getHiddenList(params?: any):Promise>>{ + const url = '/getHiddenList'; + return this.get(url,{},false) + } + +} diff --git a/src/shims-tsx.d.ts b/src/shims-tsx.d.ts new file mode 100644 index 0000000..64fc0a8 --- /dev/null +++ b/src/shims-tsx.d.ts @@ -0,0 +1,11 @@ +import Vue, { VNode } from 'vue' + +declare global { + namespace JSX { + interface Element extends VNode {} + interface ElementClass extends Vue {} + interface IntrinsicElements { + [elem: string]: any + } + } +} diff --git a/src/shims-vue.d.ts b/src/shims-vue.d.ts new file mode 100644 index 0000000..008dfaf --- /dev/null +++ b/src/shims-vue.d.ts @@ -0,0 +1,12 @@ +declare module '*.vue' { + import Vue from 'vue' + export default Vue +} +declare module '*.scss' { + const css:string + export default css +} +declare module '*.html' { + const html:string + export default html +} diff --git a/src/store/index.ts b/src/store/index.ts new file mode 100644 index 0000000..066c00f --- /dev/null +++ b/src/store/index.ts @@ -0,0 +1,73 @@ +import Vue from 'vue' +import Vuex from 'vuex' + +Vue.use(Vuex) + +export default new Vuex.Store({ + state: { + warningList: [], + eventList: [], + peopleList:[], + companyList:[], + carList:[], + cameraList:[], + hiddenDangrousList:[], + dangrousWorkList:[], + groundEnvList:[], + specialEnvList:[], + dangrousList:[], + safeGoods:[], + }, + getters: { + }, + mutations: { + setPeopleList(state,data){ + state.peopleList = data; + }, + setCompanyList(state,data){ + state.companyList = data; + }, + setCarList(state,data){ + state.carList = data; + }, + setCameraList(state,data){ + state.cameraList = data; + }, + upDateWaringList(state:any,data){ + state.warningList = [...data,...state.warningList]; + + }, + setHiddenDangrousList(state:any,data){ + state.hiddenDangrousList = data; + }, + setDangrousWorkList(state:any,data){ + state.dangrousWorkList = data; + }, + setGroundEnvList(state:any,data){ + state.groundEnvList = data; + }, + setSpecialEnvList(state:any,data){ + state.specialEnvList = data; + }, + upDateEventList(state:any,data){ + if (state.eventList.length === 50){ + const temp = [...data,...state.eventList]; + temp.pop() + state.eventList = temp; + }else{ + state.eventList = [...data,...state.eventList]; + } + + }, + setDangrousList(state:any,data){ + state.dangrousList = data; + }, + setSafeGoods(state:any,data){ + state.safeGoods = data; + }, + }, + actions: { + }, + modules: { + } +}) diff --git a/src/utils/echarts.ts b/src/utils/echarts.ts new file mode 100644 index 0000000..d273d2b --- /dev/null +++ b/src/utils/echarts.ts @@ -0,0 +1,304 @@ +const closeLineOpt = { + color:["#FADFA4","#947FEA"], + tooltip: { + trigger: 'axis', + backgroundColor:"rgba(0,0,0,0.6)", + borderWidth:0, + textStyle:{ + color:"rgba(255,255,255,0.8)", + }, + axisPointer: { + // Use axis to trigger tooltip + type: 'line' // 'shadow' as default; can also be 'line' or 'shadow' + } + }, + legend: { + itemWidth:10, + itemHeight:10, + icon:"roundRect", + textStyle:{ + color:"rgba(255,255,255,0.8)", + fontSize:10 + }, + top:30, + }, + grid: { + left: '3%', + right: '2%', + top:65, + bottom: 20, + containLabel: true + }, + xAxis: { + type: 'category', + axisLine:{ + lineStyle:{ + color:"#999" + } + }, + axisLabel:{ + color:"rgba(255,255,255,0.8)", + interval:0, + }, + splitLine:{ + show:true, + lineStyle:{ + color:"#D4E5FF", + opacity:0.16, + } + }, + data: [1, 2, 3,4,5,6,7,8,9,10,11,12].map(item=>item+"月") + }, + yAxis: [{ + type: 'value', + axisLine:{ + lineStyle:{ + color:"#999" + } + }, + splitLine:{ + show:true, + lineStyle:{ + color:"#D4E5FF", + opacity:0.16, + } + }, + axisLabel:{ + color:"rgba(255,255,255,0.8)", + }, + }], + series: [ + { + name: '入场车辆', + type: 'line', + symbol:"circle", + data: [320, 302, 301, 334,220, 182, 191, 234,150, 212, 201, 154] + }, + { + name: '出场车辆', + symbol:"circle", + type: 'line', + data: [120, 132, 101, 134,820, 832, 901, 934,320, 302, 301, 334] + } + ] +} +const closeBarOpt = { + color:["#7DAEFF"], + tooltip: { + trigger: 'axis', + backgroundColor:"rgba(0,0,0,0.6)", + borderWidth:0, + textStyle:{ + color:"rgba(255,255,255,0.8)", + }, + axisPointer: { + // Use axis to trigger tooltip + type: 'line' // 'shadow' as default; can also be 'line' or 'shadow' + } + }, + grid: { + left: '3%', + right: '4.5%', + top:15, + bottom: 15, + containLabel: true + }, + xAxis: { + axisLine:{ + lineStyle:{ + color:"#999" + } + }, + axisLabel:{ + color:"rgba(255,255,255,0.8)", + interval:0, + formatter:"{value}%" + }, + splitLine:{ + show:true, + lineStyle:{ + color:"#D4E5FF", + opacity:0.16, + } + }, + max: 100 + }, + yAxis: [{ + type: 'category', + axisLine:{ + lineStyle:{ + color:"#999" + } + }, + axisLabel:{ + color:"rgba(255,255,255,0.8)", + interval:0, + }, + splitLine:{ + show:true, + lineStyle:{ + color:"#D4E5FF", + opacity:0.16, + } + }, + data: ["车辆识别仪","人脸识别仪","筒机","半球机","球机","热成像"], + // animationDuration: 300, + // animationDurationUpdate: 300, + }], + series: [ + { + realtimeSort: true, + type: 'bar', + data:[65,32,73,81,90,100], + } + ], + // animationDuration: 0, + // animationDurationUpdate: 3000, + // animationEasing: 'linear', + // animationEasingUpdate: 'linear' + }; + +const closePieOpt = { + title: { + text: '设备告警树', + top:"42%", + left:"11%", + textStyle: { + fontSize: 20, + fontWeight: '500', + color: '#FFF', + }, + }, + tooltip: { + trigger: 'item' + }, + legend: { + orient: 'vertical', + right: '0%', + top: 'bottom', + height:100, + itemWidth: 10, + itemHeight: 10, + data: [ + {value: 100, name: '气体检测仪'}, + {value: 100, name: '车辆定位卡'}, + {value: 100, name: '人员定位卡'}, + {value: 100, name: '摄像头'}, + ], + textStyle: { + overflow:"truncate", + color: 'rgba(255,255,255,0.8)', + }, + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + selectedOffset: 10, + center:["28%","50%"], + radius: [55, 80], + data: [ + {value: 100, name: '气体检测仪'}, + {value: 2, name: ''}, + {value: 100, name: '车辆定位卡'}, + {value: 2, name: ''}, + {value: 100, name: '人员定位卡'}, + {value: 2, name: ''}, + {value: 100, name: '摄像头'}, + {value: 2, name: ''}, + ], + color: ['#7FB0FF',null, '#947FEA',null, '#C9FFD7',null, '#FADFA4',null, '#FFFFFF',null], + emphasis: { + label:{ + show: false + }, + itemStyle: { + // shadowBlur: 10, + shadowOffsetX: 0, + // borderWidth:5, + // borderColor:"rgba(255,255,255,0)", + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + }, + itemStyle: { + // borderWidth:5, + // borderColor:"rgba(0,0,0)" + + }, + select: { + label:{ + show:true, + color:"#FFF", + formatter:"{c}" + } + }, + labelLine: { + show: false + }, + label: { + position:"inside", + show: false + }, + tooltip:{ + backgroundColor:'rgba(0,0,0,0.4)', + textStyle:{ + color:'#ffffff' + } + + } + } + ], + animationDuration: 0, + animationDurationUpdate: 3000, + animationEasing: 'linear', + animationEasingUpdate: 'linear' +} + + +const radarOpt = { + color: ['rgba(127,176,255,0.6)'], + tooltip: { + trigger: 'item', + backgroundColor:"rgba(0,0,0,0.6)", + borderWidth:0, + textStyle:{ + color:"rgba(255,255,255,0.8)", + }, + }, + radar: { + indicator: [ + { text: '爆炸品', max: 150 }, + { text: '压缩气体', max: 150 }, + { text: '强氧化剂', max: 150 }, + { text: '腐蚀品', max: 120 }, + { text: '易燃液体', max: 108 }, + ], + center: ['50%', '50%'], + radius: 100, + axisName: { + color: '#fff', + borderRadius: 3, + padding: [3, 5] + } + }, + series: [ + { + type: 'radar', + data: [ + { + value: [100, 93, 50, 90, 70], + name: '危化品类型', + areaStyle: {} + } + ] + } + ] +}; + + +export default { + closeLineOpt, + closePieOpt, + closeBarOpt, + radarOpt +} \ No newline at end of file diff --git a/src/utils/player.ts b/src/utils/player.ts new file mode 100644 index 0000000..4b8d304 --- /dev/null +++ b/src/utils/player.ts @@ -0,0 +1,188 @@ + +import MarkerOption from '@/models/marker.option.js' +import PolygonOption from '@/models/polygon.option.js'; +import * as acapi from '../../public/ac.min.js' +// import acapi from 'ac.min.js' +export default class PlayerUtils{ + public api:any; + public initPlayer(domId){ + const player = new acapi.DigitalTwinPlayer(process.env.VUE_APP_PALYER_URL,{ + domId, + // reset:true, + apiOptions:{ + onReady: this.onReady, + onLog: this.onLog, //可选参数,日志输出回调函数 + onEvent: this.onEvent + }, + ui:{ + startupInfo:false, + mainUI:false + }, + + events: { + onVideoLoaded: this.onLoad, //可选参数,视频流加载成功回调函数 + onConnClose: this.onClose, //可选参数,连接断开回调函数 + mouseKeyListener:{ + onMouseEnter:this.onMouseEnter, + onMouseLeave:this.onMouseLeave, + onMouseMove:this.onMouseMove, + onMouseDown:this.onMouseDown, + onMouseUp:this.onMouseUp, + onKeyDown:this.onKeyDown, + onKeyUp:this.onKeyUp, + onKeyPress:this.onKeyPress, + } + }, + keyEventTarget: 'none', + }) + this.api = player.getAPI(); + return player + } + + public onReady:any=null; + + public onLog :any= null; + + public onEvent :any = null; + + public onLoad :any= null; + + public onClose :any= null; + public onMouseEnter :any= null; + public onMouseLeave :any= null; + public onMouseMove :any= null; + public onMouseDown :any= null; + public onMouseUp :any= (data)=>{ + console.log(data) + };; + public onKeyDown :any= null; + public onKeyUp :any= null; + public onKeyPress :any= null; + + + public async addMarker(data:MarkerOption | MarkerOption[],fn?:any){ + const option = { + range: [1, 10000], + autoHidePopupWindow:false, + displayMode:2, + coordinateType:1, + } + let params; + if(data instanceof Array){ + params = data.map(item=>{ + return Object.assign({},option,data) + }) + }else{ + params = Object.assign({},option,data) + } + await this.api.marker.add(params,fn); + } + + public async addPolygon(data:PolygonOption | PolygonOption[],fn?:any){ + const option = { + coordinateType:1, + } + let params; + if(data instanceof Array){ + params = data.map(item=>{ + return Object.assign({},option,data) + }) + }else{ + params = Object.assign({},option,data) + } + await this.api.polygon3d.add(params,fn); + } + // type:marker,polygon,polygon3d,marker3d等等 + public remove(type:string,ids:string | string[],fn?){ + this.api[type].delete(ids,fn) + } + public clearAll(type:string,fn?){ + this.api[type].clear(fn) + } + public toggle(type:string,ids:string | string[],isShow:boolean,fn?){ + if(isShow){ + this.api[type].show(ids,fn) + }else{ + this.api[type].hide(ids,fn) + } + } + public toggleAll(type:string,isShow:boolean,fn?){ + if(isShow){ + this.api[type].showAll(fn) + }else{ + this.api[type].hideAll(fn) + } + } + + + /** + * 投影坐标转经纬度坐标 + * @param coordinates [x,y,z]- 世界坐标 + * @param coordinateType - 经纬度坐标系类型0:世界 1:84 2:gcj02 3:bd09 + * @param fn 完成后的回调 + * @returns 经纬度 lon,lat] + */ + + public getLonLat(coordinates,coordinateType?,fn?){ + if(!coordinateType){ + // 1 84坐标系 2 GCJ02 3 BD09 + coordinateType=1; + } + const result = this.api.coord.pcs2gcs(coordinates,coordinateType,fn) + if(result.resultMessage==="OK"){ + return result.coordinates + }else{ + return new Error(result.resultMessage) + } + } + + /** + * 经纬度坐标转世界坐标 + * @param coordinates [lon,lat]- 经纬度 + * @param coordinateType - 经纬度坐标系类型 1:84 2:gcj02 3:bd09 + * @param fn 完成后的回调 + * @returns position [x,y,z]世界坐标 + */ + + public async getPosition(coordinates,coordinateType?,fn?){ + if(!coordinateType){ + // 1 84坐标系 2 GCJ02 3 BD09 + coordinateType=1; + } + const result = await this.api.coord.gcs2pcs(coordinates,coordinateType) + if(result.resultMessage==="OK"){ + return result.coordinates + }else{ + return new Error(result.resultMessage) + } + } + /** + * 世界坐标转屏幕坐标 + * @param position [x,y,z] - 世界坐标 + * @param fn 完成后的回调 + * @returns [x,y]屏幕坐标 + */ + public getScreenPosition(position,fn?){ + const result = this.api.coord.world2Screen(...position,fn); + if(result.resultMessage==="OK"){ + return result.screenPosition + }else{ + return new Error(result.resultMessage) + } + } + /** + * 屏幕坐标转世界坐标 + * @param offest [x,y,] - 屏幕坐标 + * @param fn 完成后的回调 + * @returns [x,y,z]世界坐标 + */ + public getPositionByOffset(offest,fn?){ + const result = this.api.coord.world2Screen(...offest,fn); + if(result.resultMessage==="OK"){ + return result.worldLocation + }else{ + return new Error(result.resultMessage) + } + } + +} \ No newline at end of file diff --git a/src/utils/utils.ts b/src/utils/utils.ts new file mode 100644 index 0000000..238b313 --- /dev/null +++ b/src/utils/utils.ts @@ -0,0 +1,6 @@ +const getRandNumBetween = (min, max) =>{ + return Math.round((Math.random() * (max - min) + min) * 10) / 10; +} +export { + getRandNumBetween +} \ No newline at end of file diff --git a/src/views/base.component.ts b/src/views/base.component.ts new file mode 100644 index 0000000..24c7d28 --- /dev/null +++ b/src/views/base.component.ts @@ -0,0 +1,582 @@ +import {Component, Vue} from 'vue-property-decorator'; + +import("./overview.component.scss") +import template from "./overview.component.html" +import HeaderComponent from "@/components/header.component.vue" +import MapComponent from "@/components/map.component.vue" +import {getRandNumBetween} from "@/utils/utils" +import layerData from "@/mock/layer" +import boundsData from "@/mock/bounds" +import ParkFileService from '@/service/park.service'; +import CloseService from '@/service/close.service'; +import * as turf from "@turf/turf" + +@Component({ + template, + components: { + MapComponent, + // MapComponent: () => import("common/map"), + HeaderComponent, + + } +}) +export default class BaseComponent extends Vue { + public player!: any; + public layerData = layerData; + + public lock = true; + + public timerList = {} as any; + + public eventAssets = { + fire:"/JC_CustomAssets/ParticleLibrary/Exhibition/火/火焰_10", + normal:"/JC_CustomAssets/EffectLibrary/Exhibition/Point/Point_R_2" + } ; + public warnAssets = "/JC_CustomAssets/EffectLibrary/Exhibition/Point/Point_Y_2"; + public pakFilePath = "@path:DTS_Library_V5.4.pak"; + public currentWanning:any = null; + public currentEvent:any = null; + + // dataList + public dataList = {} as any; + // service + public parkService = new ParkFileService() + public closeService = new CloseService() + + + + // 重置视角 + public async resetMap(time:number=1) { + if(this.lock){ + this.$message.error("视口未加载完成") + return + } + this.player.api.camera.lookAt( + 13312716.658437, + 4098255.982695, + 60.714346, + 0, + -20, + -45 + ) + // this.player.api.camera.get((res)=>{ + // console.log(res) + // }) + + // return await this.player.api.tileLayer.focus("48D390964B7F0D37D07DD8A2D5596E64",330,time) + + } + + + public addEvent(data){ + if(this.currentEvent){ + this.player.api.customObject.delete(this.currentEvent.id); + this.player.api.marker.delete(this.currentEvent.id); + this.currentEvent = null; + } + if(!data.position[2]){ + data.position[2]=0.5 + } + this.currentEvent = { + id: data.id, + pakFilePath: this.pakFilePath, + assetPath:this.eventAssets[data.type] , + location: data.position, + scale: data.type==="fire"?[15, 15, 15]:[10,10,10], + popupSize:[355,212], + coordinate:data.position, + lineSize:[2,40], + autoHeight:true, + popupOffset:[-176,-106], + useTextAnimation: false, + autoHidePopupWindow:false, + displayMode:2, + popupURL:"http://192.168.1.20:8080/#/popup?"+new URLSearchParams(data), + } + + this.player.api.marker.add(this.currentEvent, (data) => { + this.player.api.marker.showPopupWindow(this.currentEvent.id); + this.player.api.marker.focus(this.currentEvent.id,150,2) + }) + + this.player.api.customObject.add(this.currentEvent, (data) => { + }) + } + + public addWarnning(item){ + if(this.currentWanning){ + this.player.api.customObject.delete(this.currentWanning.id) + } + this.currentWanning = { + id:item.id+"", + groupId:"warning", + pakFilePath:this.pakFilePath, + assetPath:this.warnAssets, + // coordinateType:1, + location:[...item.position,10], + rotation:[0,90,0] + + } + this.player.api.customObject.add(this.currentWanning,()=>{ + this.player.api.customObject.focus(this.currentWanning.id,15,2) + }) + } + + // 添加电子围栏 // 安全线 // 实控线 // 规划线 + public async toggleArea(layer){ + if(!layer.ids.length){ + const result = this.dataList[layer.value].map(item=>{ + return { + id:item.id, + groupId:layer.value, + coordinates:item.area, + height:20, + color:layer.color, + style:4, + generateTop:false, + generateBottom:false + } + }); + this.player.api.polygon3d.add(result,(data)=>{ + if(data.resultMessage==="OK"){ + layer.ids = result.map(item=>item.id) + } + }) + }else{ + if(layer.selected){ + this.player.api.polygon3d.show(layer.ids) + }else{ + this.player.api.polygon3d.hide(layer.ids) + } + } + } + + // 添加marker + public toggleMarker(layer){ + if(!layer.ids.length){ + let text = {}; + const datas = this.dataList[layer.value].map(item=>{ + if(layer.hasText){ + text = { + useTextAnimation: false, + textBackgroundColor:[0,0,0,0.7], + textOffset:[0,0], + fontSize:12, + fontColor:"#FFF", + text:item.name || layer.name + } + } + return Object.assign({ + id:item.id, + groupId:layer.value, + coordinate:item.position, + coordinateType:layer.coordinateType?layer.coordinateType:0, + displayMode:2, + imagePath:layer.url || layer.urls[item.type], + imageSize:[48,48], + // popupURL:"http://192.168.1.20:8080/#/popup?"+new URLSearchParams(item), + lineSize:[2,40], + useTextAnimation: false, + lineOffset:[24,0], + // textBackgroundColor:[0,0,0,0.7], + autoHeight:true, + + },text) + }); + this.player.api.marker.add(datas,(data)=>{ + layer.ids = datas.map(item=>item.id) + }) + }else{ + if(layer.selected){ + // this.player.api.marker.showAllPopupWindow(); + this.player.api.marker.show(layer.ids) + }else{ + // this.player.api.marker.hideAllPopupWindow(); + this.player.api.marker.hide(layer.ids) + } + } + + + } + + // 添加企业面 tag + public toggleAreaMarker(layer){ + if(!layer.ids.length){ + const result = this.dataList[layer.value]; + if (!result) return + const datas = result.map(item=>{ + return { + id:item.id, + groupId:layer.value, + coordinate:item.position, + displayMode:2, + text:item.name, + // popupURL:"http://192.168.1.20:8080/#/popup?"+new URLSearchParams(item), + // popupSize:[348,156], + lineSize:[2,40], + useTextAnimation: false, + textBackgroundColor:[0,0,0,0.7], + textOffset:[0,0], + fontSize:12, + fontColor:"#FFF", + autoHeight:true, + + } + }); + const datas2 = result.map((item,index)=>{ + return { + id:item.id, + groupId:layer.value, + coordinates:item.area, + height:layer.value==="company"?5:40, + color:layer.color || layer.colors[index], + style:1, + generateTop:true, + generateBottom:true + + } + }); + + this.player.api.polygon3d.add(datas2,(data)=>{ + // + console.log(layer.value,data) + }) + this.player.api.marker.add(datas,(data)=>{ + layer.ids = result.map(item=>item.id) + }) + // this.player.api.marker.showAllPopupWindow(); + }else{ + if(layer.selected){ + // this.player.api.marker.showAllPopupWindow(); + this.player.api.marker.show(layer.ids) + this.player.api.polygon3d.show(layer.ids) + }else{ + // this.player.api.marker.hideAllPopupWindow(); + this.player.api.marker.hide(layer.ids) + this.player.api.polygon3d.hide(layer.ids) + } + } + } + + public async toggleMoveMarker(layer){ + const result = this.dataList[layer.value]; + + if(!layer.ids.length){ + const datas = result.map(item=>{ + return { + id:item.id, + groupId:layer.value, + pakFilePath:layer.pakFilePath, + assetPath:layer.assetPath, + coordinateType:layer.coordinateType?layer.coordinateType:0, + location:item.position, + smoothMotion:1, + scale:[0,0,0], + rotation:[0,90,0] + + } + }); + const markerDatas = result.map(item=>{ + return { + id:item.id, + groupId:layer.value, + coordinate:item.position, + coordinateType:layer.coordinateType?layer.coordinateType:0, + displayMode:2, + imagePath:layer.url || layer.urls[item.type], + imageSize:[48,48], + // popupURL:"http://192.168.1.20:8080/#/popup?"+new URLSearchParams(item), + lineSize:[2,40], + useTextAnimation: false, + lineOffset:[24,0], + // textBackgroundColor:[0,0,0,0.7], + autoHeight:true, + + } + }) + this.player.api.marker.add(markerDatas) + this.player.api.customObject.add(datas,(data)=>{ + console.log(data) + if(data.resultMessage==="OK"){ + this.player.api.marker.setAttachCustomObject(result.map(item=>{ + layer.ids.push(item.id); + + + return{ + markerId: item.id, //标注id + objectId: item.id, //自定义对象id + offset: [0, 0, 0] //偏移量 + } + })); + this.player.api.customObject.moveTo(result.map(item=>{ + return { + id:item.id, + location:turf.destination(turf.point(item.position),layer.value==="car"?50:1,Math.random()*360,{units:"meters"}).geometry.coordinates, + "smoothTime": 5 + } + })) + + this.timerList[layer.value] = setInterval(()=>{ + this.player.api.customObject.moveTo(result.map(item=>{ + return { + id:item.id, + location:turf.destination(turf.point(item.position),layer.value==="car"?50:1,Math.random()*360,{units:"meters"}).geometry.coordinates, + "smoothTime": 5 + } + })) + },5000) + } + }) + }else{ + if(layer.selected){ + this.player.api.customObject.show(layer.ids) + this.player.api.marker.show(layer.ids) + this.player.api.customObject.moveTo(result.map(item=>{ + return { + id:item.id, + location:turf.destination(turf.point(item.position),layer.value==="car"?50:1,Math.random()*360,{units:"meters"}).geometry.coordinates, + "smoothTime": 5 + } + })) + + this.timerList[layer.value] = setInterval(()=>{ + this.player.api.customObject.moveTo(result.map(item=>{ + return { + id:item.id, + location:turf.destination(turf.point(item.position),layer.value==="car"?50:1,Math.random()*360,{units:"meters"}).geometry.coordinates, + "smoothTime": 5 + } + })) + },5000) + }else{ + clearInterval(this.timerList[layer.value]); + this.timerList[layer.value] = null; + this.player.api.customObject.hide(layer.ids) + this.player.api.marker.hide(layer.ids) + } + } + + } + + // 添加3dMarker + public async toggleCustom(layer){ + if(!layer.type){ + return + } + + if(!layer.ids.length){ + const result = this.dataList[layer.value] || []; + const datas = result.map(item=>{ + if(!item.position[2]){ + item.position[2] = item.name==="高空"? 20:3 + } + return { + id:item.id, + groupId:layer.value, + pakFilePath:layer.pakFilePath, + assetPath:layer.assetPath, + coordinateType:layer.coordinateType?layer.coordinateType:0, + location:item.position, + scale:layer.scale, + rotation:[0,90,0] + + } + }); + this.player.api.customObject.add(datas,(data)=>{ + if(data.resultMessage==="OK"){ + if(layer.value.indexOf("car")<0){ + result.forEach(async (item)=>{ + let res = await this.player.api.misc.getBPFunction(layer.assetPath); + console.log(res,item) + if(layer.value==="safe-goods"){ + this.player.api.customObject.callBatchBPFunction([{ + id: item.id, + functionName: '数据', + parameters: [ + { "paramType": 5, "paramValue": item.remark}, + { "paramType": 6, "paramValue": [1,1,1,1] }, + ] + },{ + id: item.id, + functionName: '文字', + parameters: [ + { "paramType": 5, "paramValue": item.name}, + { "paramType": 5, "paramValue": ""}, + { "paramType": 6, "paramValue": [1,1,1,1] }, + { "paramType": 6, "paramValue": [0, 0.3, 1, 1] }, + ] + }],(data)=>{ + console.error("物资盘点的marker点位供应商方面有问题 无法修改 预计五月底修复 产品经理说先放着不改文字") + }); + }else if (layer.value==="safe-building" || layer.value==="check-point"){ + this.player.api.customObject.callBatchBPFunction([{ + id: item.id, + functionName: '文字', + parameters: [ + { "paramType": 5, "paramValue": item.name}, + { "paramType": 2, "paramValue": 48 }, + { "paramType": 6, "paramValue": [0,1,0.000774,1] }, + { "paramType": 3, "paramValue": 1 } + ] + },{ + id: item.id, + functionName: '数据', + parameters: [ + { "paramType": 5, "paramValue": item.remark}, + { "paramType": 2, "paramValue": 150 }, + ] + }]); + }else{ + this.player.api.customObject.callBatchBPFunction([{ + id: item.id, + functionName: '文字', + parameters: [ + { "paramType": 5, "paramValue": layer.name+"作业"}, + { "paramType": 2, "paramValue": 48}, + { "paramType": 6, "paramValue": [1,1,1,1] }, + ] + }],(data)=>{ + console.log(data) + }); + } + }) + } + layer.ids = result.map(item=>item.id) + } + }) + }else{ + if(layer.selected){ + this.player.api.customObject.show(layer.ids) + }else{ + this.player.api.customObject.hide(layer.ids) + } + } + } + + + // 热力图 + public async addHeatMap(layer) { + if(!layer.ids.length){ + const range = [0, 100]; + const data = [] as any; + const bbox = [ + 13312554.24, + 4098064.96, + 0, + 13313446.4, + 4098892.48, + 0 + ] + for (let i = 0; i < 100; i++) { + const x = getRandNumBetween(bbox[0], bbox[3]); //minX ~ maxX + const y = getRandNumBetween(bbox[1], bbox[4]); //minY ~ maxY + data.push({ + id: i.toString(), + coordinate: [x, y, 0], //热力点的坐标 + radius: Math.random() * 30, //热力点影像半径范围 + heatValue: Math.random() * 100 //热力值 + }); + } + this.player.api.heatmap.add('heatmap', bbox, range, data); + layer.ids.push("heatmap") + }else{ + if(layer.selected){ + this.player.api.heatmap.show(layer.ids) + }else{ + this.player.api.heatmap.hide(layer.ids) + } + } + + + } + + // 添加逃生路线 + + public async addRoute(layer){ + + if(!layer.ids.length){ + const result = this.dataList[layer.value].map(item=>{ + return { + id:item.id, + groupId:layer.value, + coordinates:item.positions, + thickness:5, + shape:0, + flowRate:0.1, + color:layer.color, + style:0, + } + }); + this.player.api.polyline.add(result,(data)=>{ + if(data.resultMessage==="OK"){ + layer.ids = result.map(item=>item.id) + } + }) + }else{ + if(layer.selected){ + this.player.api.polyline.show(layer.ids) + }else{ + this.player.api.polyline.hide(layer.ids) + } + } + } + + + public toggleLayerAssets(layer){ + if(layer.type === "area"){ + this.toggleArea(layer) + return + } + if(layer.type === "line"){ + this.addRoute(layer) + return + } + if(layer.type === "heatmap"){ + this.addHeatMap(layer) + return + } + if(layer.type==="areaMarker"){ + this.toggleAreaMarker(layer) + return + } + if(layer.type==="moveMarker"){ + this.toggleMoveMarker(layer) + return + } + if(layer.type==="model"){ + this.toggleCustom(layer) + return + } + if(layer.type==="marker"){ + this.toggleMarker(layer) + } + } + + + public onFocus(data){ + this.player.api[data.type].focus(data.id) + } + + + + // 组件渲染完成 + mounted() { + console.log(1) + } + beforeDestory(){ + } + destroyed(){ + this.layerData.forEach(item=>{ + if(item.type){ + this.player.api[item.type].clear() + } + if(this.timerList[item.value]){ + clearInterval(this.timerList[item.value]); + this.timerList[item.value] = null; + } + + }) + } + + +} diff --git a/src/views/overview.component.html b/src/views/overview.component.html new file mode 100644 index 0000000..685e441 --- /dev/null +++ b/src/views/overview.component.html @@ -0,0 +1,506 @@ +
+
+ {{item}} +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ +
+
+
+ + + +
+
+ +
+
+ + + + + + + + + +
+ +
+
+ 贺丽 + (访客) + + 联系方式:18020101697 +
+
+ 性别:女 + 所属单位:北京汉邦唐科技有限公司 + 职务:设备运维 + 年龄:25岁 +
+
+
+ +
+ +
+ 访问企业:中国石化有限公司 + 对接人:张敏 + 联系方式:18020101697 + 访问事项:考察 + 访问时间:20223年2月4日 12:00 +
+ +
+ +
+ 车辆类型:公司车辆 + 车牌号:苏A45W34 + 行为分:10分 + 所属人员:马莉 +
+
+ +
+ +
+

运单编号:KEA123456771000

+
+ 托运人:邵康杰 (18020101697) + 收货人:邵康杰 (18020101697) + 装货公司:汉邦唐 (18020101697) + 承运人:顺丰 (18020101697) +
+
+ 起运日期:2023-02-23 + 起运地:江苏省南京市高淳区 + 城市配送:是 + 目的地:北京市天安门 +
+
+
+ + 化学安全说明书 +
+ + +
+ 货物编号:123312323 + UN编号:1233454545545 + 类别:腐蚀品 + 包装类别:一类包装 + 数量:5 + 单位:吨 + 包装规格:罐车 +
+
+
+
+
+
+ +
+
+ + +
+ 车辆类型:公司车辆 + 车牌号:苏A45W34 + 行为分:10分 +
+ +
+ +
+ 所属人员:马莉 + 联系方式:18020101697 +
+ +
+ +
+ 访问企业:中国石化有限公司 + 对接人:张敏 + 联系方式:18020101697 + 访问事项:考察 + 访问时间:20223年2月4日 12:00 +
+
+ +
+ +
+

运单编号:KEA123456771000

+
+ 托运人:邵康杰 (18020101697) + 收货人:邵康杰 (18020101697) + 装货公司:汉邦唐 (18020101697) + 承运人:顺丰 (18020101697) +
+
+ 起运日期:2023-02-23 + 起运地:江苏省南京市高淳区 + 城市配送:是 + 目的地:北京市天安门 +
+
+
+ + 化学安全说明书 +
+ + +
+ 货物编号:123312323 + UN编号:1233454545545 + 类别:腐蚀品 + 包装类别:一类包装 + 数量:5 + 单位:吨 + 包装规格:罐车 +
+
+
+
+
+
+ +
+
+
+
+ +
+
+ +
+ + +
+
×
+
+
+
+
+
{{currentCompany.name}}
+
主要污染物:多环芳烃
+
+
+
2
+

重大危险源

+
+
+
32
+

风险项

+
+
+
10
+

隐患

+
+
+
1
+

特殊作业

+
+
+ +
+
+ + 人员:200 +
+
+ + 车辆:50 +
+
+ +
+
+ + 用水:3000 +
+
+ + 用电:3000 +
+
+ + 燃料:300 +
+
+ + 蒸汽:300 +
+
+
+
diff --git a/src/views/overview.component.scss b/src/views/overview.component.scss new file mode 100644 index 0000000..16d6e32 --- /dev/null +++ b/src/views/overview.component.scss @@ -0,0 +1,500 @@ +.layui-layer{ + background: none; +} +.layui-layer-title{ + color: #FFF; + background-color: rgba(0,0,0,0.6); +} +.layui-layer-ico{ + background: none; + &::after{ + content: "×"; + color: #FFF; + top: -12px; + font-size: 26px; + position: relative; + } +} +.overview-container { + width: 100%; + height: 100%; + position: relative; + .new-page{ + width: 100%; + height: 100%; + display: flex; + position: absolute; + left:0; + top: 0; + z-index: 9; + background-color: #0d151e; + } + .pop-box{ + width: 430px; + border-radius: 4px 4px 4px 4px; + opacity: 1; + border: 1px solid #FFFFFF; + background: rgba($color: #000000, $alpha: 0.6); + color: #E8E8E8; + padding: 30px; + font-size: 14px; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + .border{ + width: 8px; + height: 8px; + position: absolute; + border-left: 1px solid #FFF; + border-top: 1px solid #FFF; + &.l-t{ + top: 10px; + left: 10px; + } + &.r-t{ + top: 10px; + right: 10px; + transform: rotate(90deg); + } + &.r-b{ + bottom: 10px; + right: 10px; + transform: rotate(180deg); + } + &.l-b{ + bottom: 10px; + left: 10px; + transform: rotate(270deg); + } + } + .title{ + font-size: 16px; + } + .close{ + position: absolute; + cursor: pointer; + right: 20px; + top: 20px; + color: #FFF; + font-size: 26px; + } + .block{ + padding: 20px 0; + line-height: 100%; + border-bottom: 1px solid rgba($color: $border-color, $alpha: 0.4); + &.flex-box{ + display: flex; + justify-content: space-around; + flex-wrap: wrap; + } + .flex-panel{ + width: 70px; + text-align: center; + line-height: 100%; + svg{ + font-size: 15px; + } + &.half{ + width: 50%; + text-align: left; + } + p{ + line-height: 100%; + margin-bottom: 10px; + } + .count{ + padding: 10px 0; + font-size: 20px; + margin-bottom: 10px; + border-bottom: 1px solid rgba($color: $border-color, $alpha: 0.6); + position: relative; + &::after{ + content: ""; + width: 4px; + height: 4px; + border: 1px solid rgba($color: $border-color, $alpha: 0.6); + border-radius: 50%; + position: absolute; + display: block; + right: -5px; + bottom: -3px; + + } + } + } + } + } + + .fix-tab-box{ + display: inline-flex; + align-items: center; + height: 40px; + background: rgba($color: #000000, $alpha: 0.7); + border-radius: 20px; + padding-right: 80px; + position: fixed; + top: 100px; + z-index: 99; + left: 50%; + transform: translateX(-50%); + .tab{ + margin-left: 80px; + } + .el-radio{ + color: $font-color; + } + } + + #map { + width: 100%; + height: 100%; + } + + .bg-box { + width: 540px; + height: 100%; + position: absolute; + top: 0; + z-index: 9; + pointer-events: none; + animation-duration: 1s; + + &.left { + left: 0; + padding-left: 50px; + padding-right: 160px; + background: linear-gradient(270deg, rgba(51, 51, 51, 0) 0%, rgba(11, 11, 11, 0.5) 24%, rgba(0, 0, 0, 0.8) 100%); + } + + &.right { + right: 0; + padding-right: 50px; + padding-left: 160px; + background: linear-gradient(90deg, rgba(51, 51, 51, 0) 0%, rgba(11, 11, 11, 0.5) 31%, rgba(0, 0, 0, 0.8) 100%); + + } + &.right.none{ + background: none; + } + .panel-container { + //width: 330px; + height: 100%; + padding: 100px 0 50px; + pointer-events: auto; + position: relative; + } + } + + .top-bg { + width: 100%; + left: 0; + position: absolute; + top: 0; + z-index: 9; + pointer-events: none; + height: 90px; + background: linear-gradient(180deg, #333333 0%, rgba(51, 51, 51, 0) 100%); + } + + .fixed-btn { + width: 50px; + height: 50px; + position: absolute; + bottom: 60px; + right: 540px; + font-size: 26px; + cursor: pointer; + color: $font-color; + display: flex; + align-items: center; + justify-content: center; + background: rgba($color: #000000, $alpha: 0.3); + border-radius: 4px; + transition: right 1s; + } + + .layer-btn-box { + width: 50px; + position: absolute; + bottom: 60px; + right: 440px; + font-size: 26px; + cursor: pointer; + color: $font-color; + background: rgba($color: #000000, $alpha: 0.3); + border-radius: 4px; + height: 50px; + z-index: 9; + overflow: hidden; + transition: all 1s; + + .layer-btn { + width: 50px; + height: 50px; + display: flex; + align-items: center; + justify-content: center; + position: relative; + + &.active { + &::after { + width: 32px; + height: 32px; + border: 1px solid #B5DCFF; + border-radius: 50%; + content: ""; + top: 50%; + pointer-events: none; + left: 50%; + position: absolute; + transform: translate(-50%, -50%); + + } + } + } + } + + .info-content { + padding: 20px; + text-align: center; + + .cycle-icon { + width: 8px; + height: 8px; + } + .blue { + background: #7FB0FF; + } + + .yellow { + background: #F3D262; + } + + .orange { + background: #F6974D; + } + + .red { + background: #DD7171; + } + &-text { + display: flex; + align-items: center; + font-size: 12px; + margin-bottom: 20px; + + .label { + width: 80px; + } + + .position-icon { + width: 16px; + height: 16px; + background: url("~@/assets/icons/png/point.png"); + margin-left: 8px; + + } + + .text { + text-align: left; + &.blue { + color: #7FB0FF; + background: transparent; + } + + &.yellow { + color: #F3D262; + background: transparent; + } + + &.orange { + color: #F6974D; + background: transparent; + } + + &.red { + color: #DD7171; + background: transparent; + } + } + + .phone-btn { + width: 90px; + height: 24px; + background: rgba(255, 255, 255, 0.15); + border-radius: 16px; + border: 1px solid #FFFFFF; + cursor: pointer; + text-align: center; + font-size: 14px; + margin-left: 8px; + } + } + + + + } +} + +.cursor-pointer { + cursor: pointer; +} + +.pop-btn-style { + width: 140px; + height: 34px; + border-radius: 17px 17px 17px 17px; + background: transparent; + border: 1px solid #E8E8E8; + font-size: 16px; + padding: 0; + margin: 0 auto; + + span { + color: #E8E8E8; + } + + &:hover, &:focus { + background: transparent; + + span { + color: #E8E8E8 !important; + } + } +} + +//表格通用样式 +.tb-style { + .el-table, .el-table__expanded-cell { + background-color: transparent; + color: #E8E8E8; + + } + + .el-table th, .el-table thead.is-group th.el-table__cell { + background-color: rgba(232, 232, 232, 0.5); + color: #E8E8E8; + padding: 10px 0; + font-weight: 400; + } + + .el-table tr { + background-color: transparent; + + &:nth-child(2n+1) { + background-color: rgba(128, 128, 128, 0.6); + } + } + + .el-table .el-table__cell { + padding: 10px 0; + text-align: center; + } + + .el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell { + background-color: inherit; + } + + .el-table .blue-row { + td { + &:first-child { + border-left: 4px solid #7FB0FF; + } + } + + } + .el-table .yellow-row { + td { + &:first-child { + border-left: 4px solid #F3D262; + } + } + + } + .el-table .orange-row { + td { + &:first-child { + border-left: 4px solid #F6974D; + } + } + + } + .el-table .red-row { + td { + &:first-child { + border-left: 4px solid #DD7171; + } + } + + } + + +} + +//滚动条样式 +@mixin scrollStyle($width) { + &::-webkit-scrollbar { + width: $width !important; + height: 100% !important; + } + &::-webkit-scrollbar-thumb { + border-radius: 2px; + -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); + opacity: 0.2; + background: #ffffff; + } + &::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); + border-radius: 2px; + background: transparent; + } +} + +.permit-info-content { + height: 320px; + overflow: auto; + @include scrollStyle(2px); + padding: 0 15px; + + .el-table td.el-table__cell div { + font-size: 12px; + } + + .info { + display: flex; + flex-wrap: wrap; + padding-top: 20px; + padding-bottom: 10px; + + div { + width: 40%; + margin-bottom: 20px; + + &:nth-child(2n) { + width: 60%; + } + } + } +} + +.permit-tb { + .el-table { + width: 100%; + } +} + +.popSide { + width: 560px !important; + + .font-size-12 { + font-size: 12px; + } + + .tb-info-style { + margin-bottom: 20px; + } +} + + + diff --git a/src/views/overview.component.ts b/src/views/overview.component.ts new file mode 100644 index 0000000..a1db04f --- /dev/null +++ b/src/views/overview.component.ts @@ -0,0 +1,999 @@ +import {Component} from 'vue-property-decorator'; +import BaseComponent from "./base.component" +import EnvIndexLeftComponent from "../components/env/index/left/envIndexLeft.component"; +import EnvIndexRightComponent from "../components/env/index/right/envIndexRight.component"; +import AirRightComponent from "../components/env/air/right/airRight.component"; +import AirLeftComponent from "../components/env/air/left/airLeft.component"; +import SoilLeftComponent from "../components/env/soil/left/soilLeft.component"; +import SoilRightComponent from "../components/env/soil/right/soilRight.component"; +import SpecialLeftComponent from "../components/env/special/left/specialLeft.component"; +import SpecialRightComponent from "../components/env/special/right/specialRight.component"; +import WaterRightComponent from "../components/env/water/right/waterRight.component"; +import WaterLeftComponent from "../components/env/water/left/waterLeft.component"; +import GasLeftComponent from "../components/env/gas/left/gasLeft.component"; +import GasRightComponent from "../components/env/gas/right/gasRight.component"; +import WasteLeftComponent from "../components/env/waste/left/wasteLeft.component"; +import WasteRightComponent from "../components/env/waste/right/wasteRight.component"; +import CleanLeftComponent from "../components/env/clean/left/cleanLeft.component"; +import CleanRightComponent from "../components/env/clean/right/cleanRight.component"; +import PopComponent from "@/components/pop.component.vue"; +import DealPopUpComponent from "@/components/dealPopUp.component.vue"; +import PermitPopUpComponent from "@/components/permitPopUp.component.vue"; +import CloseParkHomeLeftComponent from "@/components/closePark/home/left.component.vue" +import CloseParkHomeRightComponent from "@/components/closePark/home/right.component.vue" +import CloseParkPeopleCarLeftComponent from "@/components/closePark/peopleCar/left.component.vue" +import CloseParkPeopleCarRightComponent from "@/components/closePark/peopleCar/right.component.vue" +import CloseParkDangrousCarLeftComponent from "@/components/closePark/dangrousCar/left.component.vue" +import CloseParkDangrousCarRightComponent from "@/components/closePark/dangrousCar/right.component.vue" +import CloseParBoundsLeftComponent from "@/components/closePark/boundsManager/left.component.vue" +import CloseParBoundsRightComponent from "@/components/closePark/boundsManager/right.component.vue" +import SafetyIndexLeftComponent from "../components/safety/index/left/safetyIndexLeft.component"; +import SafetyIndexRightComponent from "../components/safety/index/right/safetyIndexRight.component"; +import RiskIndexRightComponent from "../components/safety/risk/right/riskIndexRight.component"; +import RiskIndexLeftComponent from "../components/safety/risk/left/riskIndexLeft.component"; +import RiskDetailRightComponent from "../components/safety/risk/right/riskDetailRight.component"; +import ParkFileLeftComponent from "@/components/parkFile/left.component.vue" +import ParkFileRightComponent from "@/components/parkFile/right.component.vue" +import CompanyFileLeftComponent from "@/components/companyFile/left.component.vue" +import CompanyFileRightComponent from "@/components/companyFile/right.component.vue" +import PicComponent from "@/components/companyFile/pic.component.vue" +import SpecialOperationLeftComponent from "../components/safety/specialOperation/left/specialOperationLeft.component"; +import SpecialOperationRightComponent from "../components/safety/specialOperation/right/specialOperationRight.component"; +import SepDetailComponent from "../components/safety/specialOperation/right/sepDetail.component"; +import HiddenDangerLeftComponent from "../components/safety/hiddenDanger/left/hiddenDangerLeft.component"; +import HiddenDangerRightComponent from "../components/safety/hiddenDanger/right/hiddenDangerRight.component"; +import HiddenDangerDetailComponent from "../components/safety/hiddenDanger/right/hiddenDangerDetail.component"; +import WarningDetailComponent from "@/components/warningDetail.component.vue"; +import RightListComponent from "@/components/rightList.component.vue"; +import EnergyIndexLeftComponent from "@/components/energy/index/left/energyIndexLeft.component"; +import EnergyRightComponent from "@/components/energy/index/right/energyRight.component"; +import EnergyGasLeftComponent from "@/components/energy/gas/left/energyGasLeft.component"; +import EnergyGasRightComponent from "@/components/energy/gas/right/energyGasRight.component"; +import ElectricityRightComponent from "@/components/energy/electricity/right/electricityRight.component"; +import ElectricityLeftComponent from "@/components/energy/electricity/left/electricityLeft.component"; +import EnergyWaterLeftComponent from "@/components/energy/water/left/energyWaterLeft.component"; +import EnergyWaterRightComponent from "@/components/energy/water/right/energyWaterRight.component"; +import SteamRightComponent from "@/components/energy/steam/right/steamRight.component"; +import SteamLeftComponent from "@/components/energy/steam/left/steamLeft.component"; +import EmergencyHomeLeftComponent from "@/components/smartEmergency/home/left/emergencyHomeLeft.component"; +import SmartEmergencyRightComponent from "@/components/smartEmergency/home/right/smartEmergencyRight.component"; +import EmergencyPlanLeftComponent from "@/components/smartEmergency/plan/left/emergencyPlanLeft.component"; +import SmartEmergencyPlanRightComponent from "@/components/smartEmergency/plan/right/smartEmergencyPlanRight.component"; +import ControlLeftComponent from "@/components/smartEmergency/control/left/controlLeft.component"; +import ControlRightComponent from "@/components/smartEmergency/control/right/controlRight.component"; +import AfterwardsLeftComponent from "@/components/smartEmergency/afterwards/left/afterwardsLeft.component"; +import AfterwardsRightComponent from "@/components/smartEmergency/afterwards/right/afterwardsRight.component"; +import ConfirmComponent from "@/components/smartEmergency/home/right/confirm.component.vue"; +import JudgmentComponent from "@/components/smartEmergency/home/right/judgment.component.vue"; +import GoodsHomeLeftComponent from "@/components/smartEmergency/goods/left/goodsHomeLeft.component"; +import GoodsRightComponent from "@/components/smartEmergency/goods/right/goodsRight.component"; +import StoreGoodsComponent from "@/components/smartEmergency/goods/right/storeGoods.component.vue"; +import {MockData} from "@/mock"; + +import layer from "layui-layer" + + + +@Component({ + components: { + EnvIndexLeftComponent, + EnvIndexRightComponent, + AirRightComponent, + AirLeftComponent, + SoilLeftComponent, + SoilRightComponent, + SpecialLeftComponent, + SpecialRightComponent, + WaterRightComponent, + WaterLeftComponent, + GasLeftComponent, + GasRightComponent, + WasteLeftComponent, + WasteRightComponent, + CleanLeftComponent, + CleanRightComponent, + CloseParkHomeLeftComponent, + CloseParkHomeRightComponent, + CloseParkPeopleCarLeftComponent, + CloseParkPeopleCarRightComponent, + CloseParkDangrousCarLeftComponent, + CloseParkDangrousCarRightComponent, + CloseParBoundsLeftComponent, + CloseParBoundsRightComponent, + PopComponent, + DealPopUpComponent, + PermitPopUpComponent, + SafetyIndexLeftComponent, + SafetyIndexRightComponent, + RiskIndexRightComponent, + RiskIndexLeftComponent, + RiskDetailRightComponent, + ParkFileLeftComponent, + ParkFileRightComponent, + CompanyFileLeftComponent, + CompanyFileRightComponent, + SpecialOperationLeftComponent, + SpecialOperationRightComponent, + SepDetailComponent, + HiddenDangerLeftComponent, + HiddenDangerRightComponent, + HiddenDangerDetailComponent, + WarningDetailComponent, + RightListComponent, + EnergyIndexLeftComponent, + EnergyRightComponent, + EnergyGasLeftComponent, + EnergyGasRightComponent, + ElectricityRightComponent, + ElectricityLeftComponent, + EnergyWaterLeftComponent, + EnergyWaterRightComponent, + SteamRightComponent, + SteamLeftComponent, + EmergencyHomeLeftComponent, + SmartEmergencyRightComponent, + PicComponent, + EmergencyPlanLeftComponent, + SmartEmergencyPlanRightComponent, + ControlLeftComponent, + ControlRightComponent, + AfterwardsLeftComponent, + AfterwardsRightComponent, + ConfirmComponent, + JudgmentComponent, + GoodsHomeLeftComponent, + GoodsRightComponent, + StoreGoodsComponent + } +}) +export default class OverViewComponent extends BaseComponent { + //当前菜单 + public currentNav = ''; + + public currentLayers = [] as any; + + public parkList = ["一号停车场","二号停车场","三号停车场"]; + public currentPark = null; + public warnTimer:any; + currentVideo = require("@/assets/video/camera.mp4"); + //弹出层标识 + dialogVisible = false + //隐患详情 + showHiddenRightFlag = false + //许可证弹窗 + dialogVisibleForPermit = false + dialogVisibleForBigPop = false + //许可证模拟数据 + tableDataForPermit: any[] = MockData.xkz().data + + public openLayerDrawer = false; + //风险管控右侧控制显示隐藏 + riskFlag = false + riskDetailData = {} + //危险源详情标记 + riskDetailFlag = false + dangerSourceDetail = {} + public popFlag = false; + info: any = {} + // 告警列表 + waringList: any[] = []; + + // 是否显示全页新页面 + public newPageData:any = null; + + //应急准备 + showPlanFlag = false + //事态控制 + showControlFlag = false + //善后 + showAfterwardsFlag = false + //确认警情 + showConfirmFlag = false + //研判 + judgmentFlag = false + //物资详细列表 + storeGoodsFlag = false + public currentCarPeople:any; + + public currentCompany:any = false; + + created(){ + this.getCameraList(); + this.getCompanyList(); + this.getBounds(); + this.getRealBounds(); + this.getSafeBounds(); + this.getPlanBounds(); + this.getSafeLine(); + this.getStopCarList(); + this.getGasData(); + this.getRoilData(); + this.getBadGasData(); + this.getCleanWaterData(); + this.getTzWrwData(); + this.getBadWaterData(); + this.getWaterEnvData(); + this.getFourList(); + this.getFourList2(); + this.getCheckPoint(); + this.getStoreList(); + this.getBuildingList(); + this.getDangrous(); + this.getCarList(); + this.getPersonList(); + this.getHiddenDangrous(); + this.getDangrousWorkData(); + this.warnTimer = setInterval(()=>{ + this.getWaringList() + this.upDateEventList() + },10000) + } + + public getHiddenDangrous(){ + this.parkService.getHiddenDangrous().then((res:any)=>{ + this.dataList["hidden-dangrous"] = res.data; + this.$store.commit("setHiddenDangrousList",res.data) + }) + } + public getWaringList(){ + this.waringList = MockData.getWaringList().data + this.$store.commit("upDateWaringList",this.waringList) + } + public upDateEventList(){ + const eventList = MockData.getEventList().data + this.$store.commit("upDateEventList",eventList) + } + // 获取车辆 + public getCarList(){ + this.closeService.getCarList().then((res)=>{ + this.dataList["car"] = res.data; + this.$store.commit("setCarList",res.data) + }) + }// 获取车辆 + public getPersonList(){ + this.closeService.getPeopleList().then((res)=>{ + this.dataList["peo"] = res.data; + this.$store.commit("setPeopleList",res.data) + }) + } + // 获取摄像头 + public getCameraList(){ + this.closeService.getCameraList().then((res)=>{ + this.dataList["video"] = (res.data as any); + this.$store.commit("setCameraList",res.data) + }) + } + // 获取企业列表 + public getCompanyList(){ + this.parkService.getCompanyList().then((res:any)=>{ + this.dataList["company"] = res.data; + this.$store.commit("setCompanyList",res.data) + }) + } + + // 获取电子围栏 + public getBounds(){ + this.parkService.getBounds().then((res:any)=>{ + this.dataList["bounds"] = res.data; + }) + } + // 获取实控线 + public getRealBounds(){ + this.parkService.getRealBounds().then((res:any)=>{ + this.dataList["real-line"] = res.data; + }) + } + // 获取安全线 + public getSafeBounds(){ + this.parkService.getSafeBounds().then((res:any)=>{ + this.dataList["safe-line"] = res.data; + }) + } + // 获取规划线 + public getPlanBounds(){ + this.parkService.getPlanBounds().then((res:any)=>{ + this.dataList["plan-line"] = res.data; + }) + } + // 获取疏散线路 + public getSafeLine(){ + this.parkService.getSafeLine().then((res:any)=>{ + this.dataList["safe-route"] = res.data; + }) + } + // 获取重载空载车辆 + public getStopCarList(){ + this.closeService.getStopCarList().then((res:any)=>{ + this.dataList["empty-car"] = res.data.filter(item=>item.type=="空载"); + this.dataList["heavy-car"] = res.data.filter(item=>item.type!="空载"); + }) + } + // 获取大气监测 + public getGasData(){ + this.parkService.getGasData().then(res=>{ + const datas = MockData.deviceList().data + this.dataList["gas-env"] = (res.data as any).map((item,i)=>{ + item.name = datas.nameList[i] + item.value = datas.values[i] + return item + }); + }) + + } + // 获取土壤 + public getRoilData(){ + this.parkService.getRoilData().then(res=>{ + const datas = MockData.deviceList().data + this.dataList["ground-env"] = (res.data as any).map((item,i)=>{ + item.name = datas.nameList[i] + item.value = datas.values[i] + return item + }); + this.$store.commit("setGroundEnvList",this.dataList["ground-env"]) + }) + + } + // 获取废气 + public getBadGasData(){ + this.parkService.getBadGasData().then(res=>{ + this.dataList["fq-wrw"] = res.data; + }) + + } + // 获取清下水 + public getCleanWaterData(){ + this.parkService.getCleanWaterData().then(res=>{ + this.dataList["qxs-jk"] = res.data; + }) + + } + // 获取水环境 + public getWaterEnvData(){ + this.parkService.getWaterEnvData().then(res=>{ + this.dataList["water-env"] = res.data; + }) + + } + // 获取特征污染物 + public getTzWrwData(){ + this.parkService.getTzWrwData().then(res=>{ + const datas = MockData.deviceList().data + this.dataList["tz-wrw"] = (res.data as any).map((item,i)=>{ + item.name = datas.nameList[i] + item.value = datas.values[i] + return item + }); + this.$store.commit("setSpecialEnvList",this.dataList["tz-wrw"]) + + }) + + } + // 获取废水 + public getBadWaterData(){ + this.parkService.getBadWaterData().then(res=>{ + this.dataList["fs-wrw"] = res.data; + }) + + } + // 获取四色图 + public getFourList(){ + this.parkService.getFourList().then(res=>{ + this.dataList["four-color"] = res.data; + }) + + } + // 获取四色图2 + public getFourList2(){ + this.parkService.getFourList2().then(res=>{ + this.dataList["four-color2"] = res.data; + }) + + } + // 获取卡口 + public getCheckPoint(){ + this.parkService.getCheckPoint().then(res=>{ + this.dataList["check-point"] = res.data; + }) + + } + // 获取应急设施 + public getBuildingList(){ + this.parkService.getBuildingList().then(res=>{ + this.dataList["safe-building"] = res.data; + }) + + } + // 获取应急仓库 + public getStoreList(){ + this.parkService.getStoreList().then(res=>{ + this.dataList["safe-goods"] = res.data; + this.$store.commit("setSafeGoods",res.data) + }) + + } + // 获取重大危险源 + public getDangrous(){ + this.parkService.getDangrous().then(res=>{ + this.dataList["dangrous"] = res.data; + this.$store.commit("setDangrousList",res.data) + }) + } + // 获取动火 + public getDangrousWorkData(){ + this.parkService.getDangrousWorkData().then((res:any)=>{ + res.data.forEach(item=>{ + const layer = this.layerData.find(layer=>layer.name === item.name) as any; + if(!this.dataList[layer.value]){ + this.dataList[layer.value] = []; + } + this.dataList[layer.value].push(item); + this.$store.commit("setDangrousWorkList",res.data) + }) + + }) + } + // 停车场切换 + public parkChange(data){ + let ids = []; + if(data===0){ + ids = this.currentLayers.find(item=>item.value==="heavy-car").ids; + }else if(data===1){ + ids = this.currentLayers.find(item=>item.value==="empty-car").ids; + } + this.player.api.customObject.focus(ids) + } + + //特殊作业显示隐藏 + sepRightFlag = false + //特殊作业详情 + sepDetailData = {} + //特殊作业详情 + hiddenDetailData = {} + //是否从隐患那边打开的风险 + fromPage = '' + //大弹窗标题 + bigPopTitle = '人员信息卡' + //默认打开的折叠面板 + activeNames = ['1'] + //右侧列表显示隐藏 + rightListFlag = false + //右侧列表数据 + dataListRight:any = {} + //右侧主要内容显示隐藏 + get showMainRight(){ + return !this.popFlag && !this.riskFlag && (this.currentNav !== 'risk') && !this.sepRightFlag && + !this.showHiddenRightFlag && !this.riskDetailFlag && !this.rightListFlag && !this.showConfirmFlag && !this.judgmentFlag && !this.storeGoodsFlag + } + // 地图初始化后 + public getMap(store: any) { + this.player = store; + this.lock = false + this.resetMap(); + this.player.api.customObject.clear(); + this.player.api.polygon3d.clear(); + this.player.api.marker.clear(); + this.player.api.marker3d.clear(); + this.player.api.polyline.clear(); + this.player.api.heatmap.clear(); + this.currentLayers = this.getCurrentLayers(); + // this.addEvent({ + // type:"fire", + // id:new Date().getTime()+"", + // typeName:"火灾", + // tel:13222078731, + // position:[13312990.72, 4098613.12, 0.51], + // reporter:"张三", + // content:"北京汉邦唐化工厂区发生火灾" + + // }) + // this.addHeatMap(); + // document.addEventListener("mousemove",this.fixedCamera) + + } + + public handleChange(data) { + console.log(data) + if(data.GroupID){ + const currentData = this.dataList[data.GroupID].find(item=>item.id === data.Id); + + if(data.GroupID==="peo"){ + this.emitPersonPop(currentData) + } + if(data.GroupID==="car"){ + this.emitCarPop(currentData) + } + if(data.GroupID==="video"){ + this.openVideo(currentData) + } + if(data.GroupID==="company"){ + this.openCompany(currentData) + } + if(data.GroupID==="hidden-dangrous"){ + this.showHiddenRight(currentData) + } + if(["blind-plate","forbid-space","use-e","make-ground","hoisting","high-sky","break-road","use-fire"].includes(data.GroupID)){ + this.showSepRight(currentData) + } + } + } + + public navChange(data: string) { + this.currentNav = data; + if(this.player){ + this.currentLayers = this.getCurrentLayers(); + this.resetMap(); + } + console.log('当前点击导航', data) + this.hidePop() + } + + + public drawerChange(data) { + const fixedbtn = document.querySelector(".fixed-btn") as any; + const layerBth = document.querySelector(".layer-btn-box") as any; + const leftEl = document.querySelector(".left") as any; + const rightEl = document.querySelectorAll(".right") as any; + if (data) { + leftEl.classList.remove("animate__slideOutLeft"); + // rightEl.classList.remove("animate__slideOutRight"); + leftEl.classList.add("animate__slideInLeft"); + fixedbtn.style.right = "540px"; + layerBth.style.right = "440px"; + // rightEl.classList.add("animate__slideInRight"); + rightEl.forEach(item=>{ + item.classList.remove("animate__slideOutRight"); + item.classList.add("animate__slideInRight"); + }) + } else { + leftEl.classList.remove("animate__slideInLeft"); + // rightEl.classList.remove("animate__slideInRight"); + leftEl.classList.add("animate__slideOutLeft"); + fixedbtn.style.right = "140px"; + layerBth.style.right = "40px"; + // rightEl.classList.add("animate__slideOutRight"); + rightEl.forEach(item=>{ + item.classList.remove("animate__slideInRight"); + item.classList.add("animate__slideOutRight"); + }) + } + } + + public toggleHeight(){ + this.openLayerDrawer = !this.openLayerDrawer; + } + + public toggleLayer(layer){ + if(this.lock){ + this.$message.error("视口未加载完成") + return + } + layer.selected = !layer.selected; + this.toggleLayerAssets(layer) + } + + //点击报警信息右侧交互动画 + public popDrawerChange(flag = false,className='.main') { + this.$nextTick(()=>{ + const popEl = document.querySelector(className) as any; + if (!popEl) return + if (flag) { + popEl.classList.remove("animate__fadeInRight"); + setTimeout(()=>{ + popEl.classList.add("animate__fadeInRight"); + },10) + + } else { + popEl.classList.remove("animate__slideInRight"); + popEl.classList.add("animate__slideOutRight"); + } + }) + + } + + mounted() { + console.log(2) + } + + //获取点击的信息 + getItem(item) { + this.addWarnning(item) + this.popFlag = true + this.riskDetailFlag = false + this.riskFlag = false + this.info = item + this.popDrawerChange(true) + } + + //处理信息 + deal() { + this.dialogVisible = true + } + + + closePop(){ + if(this.currentWanning){ + this.player.api.customObject.delete(this.currentWanning.id); + this.currentWanning = null + } + this.popFlag = false + } + //隐藏弹出层 + hidePop() { + if(this.currentEvent){ + this.player.api.customObject.delete(this.currentEvent.id); + this.player.api.marker.delete(this.currentEvent.id); + this.currentEvent = null; + } + if(this.currentWanning){ + this.player.api.customObject.delete(this.currentWanning.id); + this.currentWanning = null + } + this.newPageData = null; + this.currentCompany=false; + this.popFlag = false + this.riskFlag = false + this.sepRightFlag = false + this.riskDetailFlag = false + this.showHiddenRightFlag = false + this.rightListFlag = false + this.showConfirmFlag = false + this.judgmentFlag = false + this.storeGoodsFlag = false + this.fromPage = '' + } + //隐藏危险源弹出层 + hideDangerPop() { + this.popDrawerChange(false,'.riskDetail') + this.riskDetailFlag = false + } + //显示应急plan + showPlan(){ + this.info = { + "typeName": "火灾", + "content": "北京汉邦唐化工厂区发生火灾", + "levelName": "二级", + "levelClass": "level-2-text", + "levelClassIcon": "level-2", + "time": "2023-05-15 15:21:35", + "address": "工厂厂房", + "reporter": "蒋丽", + "tableHeader": [ + { + "prop": "name", + "label": "摄像头名称" + }, + { + "prop": "type", + "label": "类型" + }, + { + "prop": "distance", + "label": "距离 (m)" + } + ], + "tableData": [ + { + "type": "简型摄像头", + "distance": "10", + "name": "1号摄像头" + }, + { + "type": "简型摄像头", + "distance": "20", + "name": "2号摄像头" + }, + { + "type": "简型摄像头", + "distance": "22", + "name": "3号摄像头" + }, + { + "type": "简型摄像头", + "distance": "10", + "name": "4号摄像头" + }, + { + "type": "简型摄像头", + "distance": "20", + "name": "5号摄像头" + }, + { + "type": "简型摄像头", + "distance": "22", + "name": "6号摄像头" + } + ], + "title": "火灾爆炸", + "info": "北京汉邦唐化工厂区发生火灾", + "level": "1", + "type": "fire", + "tel": 13231475537, + "id": "110000197911038403", + "position": [13313085.72,4098442.24,0.51001953125] + } + this.showPlanFlag = true + } + //显示控制 + showControl(){ + this.showPlanFlag = false + this.showControlFlag = true + } + //显示善后 + showAfterwards(){ + this.showControlFlag = false + this.showAfterwardsFlag = true + } + //显示应急首页 + showHome(){ + this.showAfterwardsFlag = false + } + //确认警情 + showConfirm(){ + this.showConfirmFlag = true + } + hideConfirm(){ + this.showConfirmFlag = false + } + hideJudgmentFlag(){ + this.judgmentFlag = false + this.showPlanFlag = true + } + showJudgmentFlag(){ + this.showConfirmFlag = false + this.judgmentFlag = true + } + //接收处理消息 + dealSubmit(msg: any) { + console.log(msg, 'msg') + this.hidePop() + } + + + + //动态合并表格列 + objectSpanMethod({row, column, rowIndex, columnIndex}) { + if ([0, 1].includes(columnIndex)) { + if (rowIndex % 5 === 0) { + return { + rowspan: 5, + colspan: 1 + }; + } else { + return { + rowspan: 0, + colspan: 0 + }; + } + } + } + + + //显示风险右侧详情 + showRiskRight(item){ + this.popFlag = false + this.riskDetailFlag = false + this.riskFlag = true + if (item){ + this.riskDetailData = item + } + this.popDrawerChange(true) + } + // 关闭风险右侧 + closeRiskRight(){ + this.riskFlag = false + if (this.fromPage === 'hidden'){ + this.showHiddenRightFlag = true + } + // this.hidePop() + } + // 关闭右侧危险源 + closeRiskDetailRight(){ + if (this.currentNav === 'smartSafetySupervision'){ + this.riskDetailFlag = false + }else{ + this.hideDangerPop() + this.showRiskRight(false) + } + + + } + + //弹出危险源相关信息 + getHazard(item){ + this.riskDetailFlag = true + this.riskFlag = false + this.popFlag = false + this.dangerSourceDetail = MockData.dangerSourceDetail().data + /* this.popDrawerChange() + this.popDrawerChange(true,'.main')*/ + } + + + public getCurrentLayers(){ + const layers = [] as any; + this.layerData.forEach((item:any)=>{ + if(item.pages.includes(this.currentNav)){ + if(!item.selected){ + this.toggleLayer(item) + } + layers.push(item) + }else{ + if(item.selected){ + this.toggleLayer(item) + } + } + }) + return layers + } + + + //显示特殊作业右侧详情 + showSepRight(item){ + this.resetMap() + setTimeout(()=>{ + this.player.api.customObject.focus(item.id,50,2,null,0,()=>{ + this.sepRightFlag = true + if (item){ + this.sepDetailData = item + } + this.popDrawerChange(true,'.main') + }) + this.player.api.polygon3d.focus(item.id,50,2) + },1000) + } + //关闭特殊作业详情 + closeSepDetailRight(){ + this.sepRightFlag = false + } + //显示隐患详情 + showHiddenRight(item){ + console.log(item) + this.player.api.marker.focus(item.id,10,2) + setTimeout(()=>{ + this.showHiddenRightFlag = true + this.riskFlag = false + this.riskDetailFlag = false + if (item){ + this.hiddenDetailData = item + } + this.popDrawerChange(true,'.main') + },2000) + + } + //关闭特殊作业详情 + closeHiddenDetailRight(){ + this.showHiddenRightFlag = false + } + //隐患详情关联风险 + showRisk(item){ + this.showHiddenRightFlag = false + this.riskFlag = true + this.fromPage = 'hidden' + if (item){ + this.riskDetailData = item + } + } + + + + + destroyed() { + if (this.player) { + this.player = null + } + if(this.warnTimer){ + clearInterval(this.warnTimer); + this.warnTimer = null; + } + } + //展示人员详情 + emitPersonPop(item){ + this.resetMap(); + setTimeout(()=>{ + this.currentCarPeople = item; + this.player.api.customObject.focus(item.id,50,2,[0,0,0],2); + setTimeout(()=>{ + this.bigPopTitle = '人员信息卡'; + this.dialogVisibleForBigPop = true + },2000) + },1000) + } + //展示车辆详情 + emitCarPop(item){ + this.resetMap(); + setTimeout(()=>{ + this.currentCarPeople = item; + this.player.api.customObject.focus(item.id,50,2,[0,0,0],2); + setTimeout(()=>{ + this.bigPopTitle = '车辆信息卡'; + this.dialogVisibleForBigPop = true + },2000) + },1000) + } + // 打开摄像头 + openVideo(item){ + this.resetMap(); + setTimeout(()=>{ + this.player.api.marker.focus(item.id,50,2) + setTimeout(()=>{ + layer.open({ + type:1, + shade:0, + title:item.remark+"-"+ item.id, + content:`
+ +
` + }) + },2000) + },1000) + } + openCompany(item){ + this.resetMap(); + setTimeout(()=>{ + this.player.api.polygon3d.focus(item.id,100,2,null,()=>{ + this.currentCompany = item; + }) + },1000) + } + + selectCompany(item){ + this.newPageData = item; + } + + + closeCarPersonPop(){ + this.player.api.customObject.focus(this.currentCarPeople.id,50,2,null,0,()=>{ + this.currentCarPeople = null; + }) + } + + //显示封闭园区右侧列表 + showList(item){ + this.dataListRight = item + this.rightListFlag = true + } + //关闭封闭园区右侧列表 + closeRight(){ + this.rightListFlag = false + this.dataListRight = {} + } + //点击右侧柱状图 + clickBar(item){ + this.resetMap(); + setTimeout(()=>{ + this.player.api.marker.focus(item.id,10,2) + },1000) + + } + + //点击应急告警 + getEmergencyEvent(item){ + this.addEvent(item) + this.showConfirmFlag = false + this.judgmentFlag = false + this.info = item + this.showConfirm() + // this.popFlag = true + // this.info = item + // this.popDrawerChange(true) + + } + changePoint(item){ + this.addEvent(item) + } + get showBackGround(){ + let flag = this.currentNav === 'risk' && !this.riskFlag && !this.riskDetailFlag + return flag?'none':'' + } + showGoodsList(item){ + this.storeGoodsFlag = true + } + focusGood(item){ + // console.log(item) + this.player.api.customObject.focus(item.id) + } + getCompany(item){ + console.log(item) + this.openCompany(item) + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..3bd8096 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + "target": "esnext", + "module": "esnext", + "strict": true, + "jsx": "preserve", + "noImplicitThis": false, + "moduleResolution": "node", + "experimentalDecorators": true, + "skipLibCheck": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "useDefineForClassFields": true, + "strictPropertyInitialization":false, + "noImplicitAny":false, + "sourceMap": true, + "baseUrl": ".", + "types": [ + "webpack-env", + ], + "paths": { + "@/*": [ + "src/*" + ], + "~/*":[ + "public/*" + ] + + }, + "lib": [ + "esnext", + "dom", + "dom.iterable", + "scripthost" + ] + }, + "include": [ + "src/**/*.vue", + "src/**/*.ts", + "src/**/*.tsx", + "tests/**/*.ts", + "tests/**/*.tsx" + ], + "exclude": [ + "common", + "node_modules" + ] +} diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..bdee74b --- /dev/null +++ b/vue.config.js @@ -0,0 +1,85 @@ +const { defineConfig } = require('@vue/cli-service') +const CompressionPlugin = require('compression-webpack-plugin') +const webpack = require("webpack"); +const path = require('path') +const resolve = (dir)=>{ + return path.join(__dirname, dir) +} +module.exports = defineConfig({ + productionSourceMap:process.env.NODE_ENV!=="production", + transpileDependencies: true, + lintOnSave: true, // 在保存时校验格式 + runtimeCompiler:true, + css:{ + loaderOptions:{ + scss:{ + additionalData:`@import "@/assets/common/scss/hbt-base.scss";` + } + } + }, + configureWebpack: { + plugins: [ + new webpack.ProvidePlugin({ + $:"jquery", + jQuery:"jquery", + "window.jQuery":"jquery" + }), + // http://doc.hbt.vip/hbt-vue/other/faq.html#使用gzip解压缩静态文件 + new CompressionPlugin({ + cache: false, // 不启用文件缓存 + test: /\.(js|css|html)?$/i, // 压缩文件格式 + filename: '[path].gz[query]', // 压缩后的文件名 + algorithm: 'gzip', // 使用gzip压缩 + minRatio: 0.8 // 压缩率小于1才会压缩 + }) + ], + }, + chainWebpack: config => { + config.extensions = ['.js', '.ts','.scss', '.vue', '.html']; + + config.plugin('module-federation-plugin').use(require("webpack").container.ModuleFederationPlugin,[{ + name: "test", + filename: "test.js", + + remotes: { + common:`common@${process.env.VUE_APP_REMOTES_URL}/common.js` + }, + shared:require("./package.json").dependencies, + }]); + config.module + .rule("html") + .test(/\.html$/) + .use('html-loader') + .loader('html-loader')//预读,识别html文件 + .end() + // set svg-sprite-loader + config.module + .rule('svg') + .exclude.add(resolve('src/assets')) + .end() + config.module + .rule('icons') + .test(/\.svg$/) + .include.add(resolve('src/assets')) + .end() + .use('svg-sprite-loader') + .loader('svg-sprite-loader') + .options({ + symbolId: 'icon-[name]' + }) + .end() + }, + devServer: { + proxy: { + // detail: https://cli.vuejs.org/config/#devserver-proxy + [process.env.VUE_APP_BASE_API_URL]: { + target: `http://119.45.158.12:8081`, + changeOrigin: true, + pathRewrite: { + ['^' + process.env.VUE_APP_BASE_API_URL]: '' + } + } + }, + // disableHostCheck: true + }, +})