1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302 |
- import axios from "axios";
- import data from "@c/mixins/anbao";
- export default {
- data() {
- return {
- stores: this.$useStore(),
- map: null,
- oldPopup: null,
- oldPopupId: null,
- };
- },
- mounted() {
- window.vue = this;
- window.jMap = null;
- window.jmapQuery = null;
- },
- methods: {
- streetTownMap(name) {
- return name
- },
- /**
- *地图初始化
- *
- */
- async initMap(type) {
- window.vue = this;
- window.jMap = null;
- window.jmapQuery = null;
- window.jMap = new JMap();
- var map_params = {
- camera: {
- x: 121.4175597,
- y: 31.119248,
- radius: 18000.0,
- offset: { heading: -4, pitch: -70, range: 0 },
- },
- map_complete_callback: () => {
- window.jmapQuery = new JMapQuery(window.jMap);
- // ToDo...
- },
- map_left_click_callback: (obj, type, movement, event) => {
- this.stores.$state.tankuangXY = { x: movement.position.x, y: movement.position.y };
- },
- map_right_click_callback: (obj) => {},
- };
- let res = await this.$axios.get(this.$api.dt);
- // 加载地图
- window.jMap.createMap("mapF", res.data, window.location.origin, map_params, {});
- // 地图背景样式
- window.jMap.switchBaseLayer("blue");
- /**
- * 获取街镇信息
- */
- var options = {
- click: addLayerCallBack,
- isZoom: false,
- style: {
- outline: true,
- outlineColor: "rgb(255,0,0,0.8)",
- // material: "rgb(154,255,154,0)",
- perPositionHeight: true,
- height: 200,
- width: "10px",
- size:"10px",
- label: {
- show: true,
- text: "name",
- font: "16px Helvetica",
- fillColor: "rgb(0,255,0,0.9)",
- pixelOffset: [0, -40],
- backgroundColor: "rgb(0,0,0,0)",
- showBackground: false,
- },
- },
- // where:"name = '莘庄镇'"
- };
- window.jMap.addLayer("mh_dyn_district", [1], options);
- // 街镇标题绘制
- // var qp = new JMapQueryParam({
- // queryMapService: "mh_dyn_district",
- // queryMapLayers: [1],
- // outFields: ["code", "name", "center_x", "center_y"],
- // // queryWhere: "name like '%莘庄镇%' ",
- // callBack: (res) => {
- // res.features.forEach(async(val) => {
- // await window.jMap.FlagInfo.show({
- // id: val.attributes.code,
- // position: { x: Number(val.attributes.center_x), y: Number(val.attributes.center_y), z: 0 },
- // element: `<div class='ysc-dynamic-layer ys-css3-box' onclick="vue.clickFlag(${val.attributes.code})">
- // <div class='biaozhu' style="font-size:18px !important">${val.attributes.name} ${val.attributes.code}</div>
- // </div>`,
- // }, { isZoom: false });
- // });
- // },
- // });
- // new JMapQuery(window.jMap).execQuery(qp)
- },
- /**
- * 疏导区网格
- */
- anbaoSDUWG(){
- console.log(1111)
- let arr = [
- [
- {x:121.36194587932806,y:31.16013705465239,z:0},
- {x:121.34727553811794,y:31.15828077299882,z:0},
- {x:121.32700411033827,y:31.148247489434965,z:0},
- {x:121.31514606604391,y:31.139440444833916,z:0},
- {x:121.30048786370499,y:31.134903156770502,z:0},
- {x:121.29284839062778,y:31.12773298212305,z:0},
- {x:121.28484794201171,y:31.12306873887283,z:0},
- {x:121.2434981967536,y:31.119911283997425,z:0},
- {x:121.22295978253271,y:31.11453182095247,z:0},
- {x:121.22093534994545,y:31.128184924119704,z:0},
- {x:121.22476714240756,y:31.137743873822444,z:0},
- {x:121.22284789103668,y:31.151848705517672,z:0},
- {x:121.2192245740552,y:31.185051824029983,z:0},
- {x:121.21634530262463,y:31.19305254070648,z:0},
- {x:121.21666410880577,y:31.199965150511076,z:0},
- {x:121.20802887999594,y:31.252419358825662,z:0},
- {x:121.2510308379889,y:31.25199056924825,z:0},
- {x:121.26975280768023,y:31.256161713215423,z:0},
- {x:121.29758483246128,y:31.25239812402721,z:0},
- {x:121.34774474510056,y:31.253635862387053,z:0},
- {x:121.34278143296902,y:31.239737181776324,z:0},
- {x:121.34412376809345,y:31.224709084528335,z:0},
- {x:121.35105449522602,y:31.20248989001769,z:0},
- {x:121.35374042236845,y:31.182090361752536,z:0},
- {x:121.36194587932806,y:31.16013705465239,z:0},
- ],
- [
- {x:121.30025,y:31.184825,z:0},
- {x:121.298659,y:31.186719,z:0},
- {x:121.297278,y:31.188721,z:0},
- {x:121.294521,y:31.19274,z:0},
- {x:121.302864,y:31.196146,z:0},
- {x:121.304392,y:31.193755,z:0},
- {x:121.306291,y:31.191095,z:0},
- {x:121.308116,y:31.188478,z:0},
- {x:121.309198,y:31.186907,z:0},
- {x:121.309383,y:31.186432,z:0},
- {x:121.309391,y:31.185858,z:0},
- {x:121.309372,y:31.185243,z:0},
- {x:121.309175,y:31.185049,z:0},
- {x:121.308407,y:31.184564,z:0},
- {x:121.307629,y:31.18408,z:0},
- {x:121.306116,y:31.18316,z:0},
- {x:121.303064,y:31.181291,z:0},
- {x:121.30025,y:31.184825,z:0},
- ]
- ]
- for(let i=0;i<arr.length;i++){
- console.log(i)
- let target = {
- id: i,
- attributes: {
- name: i,
- },
- position: arr[i],
- label: {
- text: i,
- font: "16px Helvetica",
- color: i ==0 ? "red" : "orange",
- pixelOffset: [0, -50],
- backgroundColor: "red"
- }
-
- }
- let options = {
- isZoom: false,
- style: {
- color: i == 0 ? "red" : i == 1 ? "orange" : "",
- transparency: 1,
- outline: true,
- outlineColor: 'transparent',
- perPositionHeight: true
-
- },
- // click: regionLocateCallBack111
- };
- setTimeout(() => {
- window.jMap.Locate.trackLocate(target, options);
- }, 2000)
-
- }
- },
- /**
- * 安保区域
- * @param {*} status 是否有图层
- * @param {*} id 1大网格 2小网格
- * @param {*} query 搜索内容
- */
- anbao(status, id, query) {
- var that = this
- var color = [
- "#2c6395",
- "#1b6cb6",
- "#40a4ff",
- "#8ac7ff",
- "#b1cce5",
- "#a03523",
- "#d7le00",
- "#ffa192",
- "#dba197",
- "#009081",
- "#00ae9c",
- "#50fed",
- "#4d6700",
- "#729900",
- // "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100", "#009b8a", "#b72727", "#71a382", "#1c6093", "#a4294f", "#3f8a3f", "#68afc1",
- // "#5081c5", "#c3a102", "#d17100", , "#a4294f", "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100",
- // "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100", "#009b8a", "#b72727", "#71a382", "#1c6093", "#a4294f", "#3f8a3f", "#68afc1",
- // "#5081c5", "#c3a102", "#d17100", , "#a4294f", "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100",
- // "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100", "#009b8a", "#b72727", "#71a382", "#1c6093", "#a4294f", "#3f8a3f", "#68afc1",
- // "#5081c5", "#c3a102", "#d17100", , "#a4294f", "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100",
- // "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100", "#009b8a", "#b72727", "#71a382", "#1c6093", "#a4294f", "#3f8a3f", "#68afc1",
- // "#5081c5", "#c3a102", "#d17100", , "#a4294f", "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100",
- // "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100", "#009b8a", "#b72727", "#71a382", "#1c6093", "#a4294f", "#3f8a3f", "#68afc1",
- // "#5081c5", "#c3a102", "#d17100", , "#a4294f", "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100",
- // "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100", "#009b8a", "#b72727", "#71a382", "#1c6093", "#a4294f", "#3f8a3f", "#68afc1",
- // "#5081c5", "#c3a102", "#d17100", , "#a4294f", "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100",
- // "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100", "#009b8a", "#b72727", "#71a382", "#1c6093", "#a4294f", "#3f8a3f", "#68afc1",
- // "#5081c5", "#c3a102", "#d17100", , "#a4294f", "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100",
- // "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100", "#009b8a", "#b72727", "#71a382", "#1c6093", "#a4294f", "#3f8a3f", "#68afc1",
- // "#5081c5", "#c3a102", "#d17100", , "#a4294f", "#3f8a3f", "#68afc1", "#5081c5", "#c3a102", "#d17100",
- ];
- var JmapQuery = new JMapQuery(window.jMap); // JMap为初始化地图时,实例化的JMap对象
- if (status) {
- window.jMap.Locate.clearLocate(); //清楚分布
- // window.jMap.removeLayer(); // 空值清除所有已添加图层
- }
- //中网格
- if (id == 1) {
- setTimeout(() => {
- // 例: 8.1 2 查询图层列表
- var qp2 = new JMapQueryParam({
- queryMapService: "mh_dyn_cywg",
- queryMapLayers: [0],
- // queryGeometry: result[0], // 默认进行属性查询,放开该段注释将在选定的几何空间内进行空间查询
- // queryWhere: "name like '%莘庄镇%' ", // 可自定义查询条件,也可不传该参数
- outFields: ["*"], // 返回字段信息
- callBack: testQueryCallBack2
- });
- JmapQuery.execQuery(qp2);
- // 图层查询完毕的回调函数
- function testQueryCallBack2(obj) {
- var bigNewArr = [];
- var name = [];
- //画线--------------
- var bigArr = obj.features.filter(function(el) {
- // return el.attributes.name.indexOf('新虹街道') > -1
- return el.attributes.name.indexOf('新虹街道') > -1 ||
- el.attributes.name.indexOf('华漕') > -1 ||
- el.attributes.name.indexOf('七宝中片') > -1 ||
- el.attributes.name.indexOf('航华网格') > -1 ||
- el.attributes.name.indexOf('七宝北片网格') > -1 ||
- el.attributes.name.indexOf('紫藤、红松') > -1 ||
- el.attributes.name.indexOf('虹梅区域') > -1
- })
- let arr = []
- for(let i=0;i<bigArr.length;i++){
- arr.push([])
- for(let ii =0;ii<bigArr[i].geometry.rings[0].length;ii++){
- arr[i].push(
- {
- x:bigArr[i].geometry.rings[0][ii][0],
- y:bigArr[i].geometry.rings[0][ii][1],
- z:0,
- }
- )
- }
- }
- console.log(11111,arr)
- for(let i=0;i<arr.length;i++){
- let target = {
- id: i + 1,
- attributes: {
- name: i,
- },
- position: arr[i],
- label: {
- text: i,
- font: "16px Helvetica",
- color: "red",
- pixelOffset: [0, -50],
- backgroundColor: "red"
- }
-
- }
- var options = {
- isZoom: false,
- style: {
- color: 'rgb(79, 226, 97)',
- transparency: 1,
- outline: true,
- outlineColor: 'transparent',
- perPositionHeight: true
-
- },
- click: regionLocateCallBack111
- };
- setTimeout(() => {
- window.jMap.Locate.trackLocate(target, options);
- }, 1000)
-
- }
- function regionLocateCallBack111(obj) {
- // console.log(obj); // obj为返回值
- }
- //画线----------------------------------
- //区域----------------------------------
- var bigArr = obj.features.filter(function(el) {
- return el.attributes.name.indexOf('新虹街道') > -1 ||
- el.attributes.name.indexOf('华漕') > -1 ||
- el.attributes.name.indexOf('七宝中片') > -1 ||
- el.attributes.name.indexOf('航华网格') > -1 ||
- el.attributes.name.indexOf('七宝北片网格') > -1 ||
- el.attributes.name.indexOf('紫藤、红松') > -1 ||
- el.attributes.name.indexOf('虹梅区域') > -1
- })
- bigArr.forEach(function(item, index) {
- var aaa = item.geometry.rings[0];
- var newArr = aaa.map(function(value, index) {
- var obj = {
- x: value[0],
- y: value[1],
- z: 0.1
- }
- return obj
- })
- bigNewArr.push(newArr);
- name.push(item.attributes.name)
- })
- bigNewArr.forEach(function(item, index) {
- var idx = index + 1;
- setTimeout(() => {
- // 2区域分布
- var target = {
- id: idx,
- attributes: {
- position: item[0],
- name: name[index] == "华漕镇处置网格二(纪王西片区)" ? "闵S1-1(纪王西网格)" : name[index] == "华漕镇处置网格一(纪王东片区)" ? "闵S1-2(纪王东网格)" : name[index] == "华漕镇处置网格四(诸翟北片区)" ? "闵S1-3(诸翟北网格)" : name[index] == "华漕镇处置网格五(诸翟南片区)" ? "闵S1-4(诸翟南网格)" : name[index] == "华漕镇处置网格三(老华漕片区)" ? "闵S1-5(老华漕网格)" : name[index] == "新虹街道处置网格二(爱博)" ? "闵S2-1(爱博网格)" : name[index] == "新虹街道处置网格三(华美)" ? "闵S2-2(华美网格)" : name[index] == "新虹街道处置网格一(枢纽)" ? "闵S2-3(枢纽网格)" : name[index] == "新虹街道处置网格四(航华)" ? "闵S2-4(航华网格)" : name[index] == "七宝镇处置网格一(七宝北片网格)" ? "闵S3-1(七宝北片网格)" : name[index] == "七宝镇处置网格二(七宝中片网格)" ? "闵S3-2(七宝吴宝路网格)" : name[index] == "七宝镇处置网格五(航华网格)" ? "闵S3-3(七宝航华网格)" : name[index] == "虹桥镇处置网格四(紫藤、红松区域)" ? "闵S4-1(紫藤红松网格)" : name[index] == "虹桥镇处置网格二(虹梅区域)" ? "闵S4-2(虹梅网格)" : name[index]
- },
- position: item,
- label: {
- text: name[index] == "华漕镇处置网格二(纪王西片区)" ? "闵S1-1(纪王西网格)" : name[index] == "华漕镇处置网格一(纪王东片区)" ? "闵S1-2(纪王东网格)" : name[index] == "华漕镇处置网格四(诸翟北片区)" ? "闵S1-3(诸翟北网格)" : name[index] == "华漕镇处置网格五(诸翟南片区)" ? "闵S1-4(诸翟南网格)" : name[index] == "华漕镇处置网格三(老华漕片区)" ? "闵S1-5(老华漕网格)" : name[index] == "新虹街道处置网格二(爱博)" ? "闵S2-1(爱博网格)" : name[index] == "新虹街道处置网格三(华美)" ? "闵S2-2(华美网格)" : name[index] == "新虹街道处置网格一(枢纽)" ? "闵S2-3(枢纽网格)" : name[index] == "新虹街道处置网格四(航华)" ? "闵S2-4(航华网格)" : name[index] == "七宝镇处置网格一(七宝北片网格)" ? "闵S3-1(七宝北片网格)" : name[index] == "七宝镇处置网格二(七宝中片网格)" ? "闵S3-2(七宝吴宝路网格)" : name[index] == "七宝镇处置网格五(航华网格)" ? "闵S3-3(七宝航华网格)" : name[index] == "虹桥镇处置网格四(紫藤、红松区域)" ? "闵S4-1(紫藤红松网格)" : name[index] == "虹桥镇处置网格二(虹梅区域)" ? "闵S4-2(虹梅网格)" : name[index],
- font: "14px Helvetica",
- color: "#fff",
- pixelOffset: [0, -40]
- }
- };
- var options = {
- isZoom: false,
- camera: {
- x: 121.4175597,
- y: 31.119248,
- radius: 18000.0,
- offset: { heading: -4, pitch: -70, range: 0 },
- },
- click: regionLocateCallBack,
- style: {
- // color: name[index] == "华漕镇处置网格二(纪王西片区)" ? "#2c6395" : name[index] == "华漕镇处置网格一(纪王东片区)" ? "#1b6cb6" : name[index] == "华漕镇处置网格四(诸翟北片区)" ? "#40a4ff" : name[index] == "华漕镇处置网格五(诸翟南片区)" ? "#8ac7ff" : name[index] == "华漕镇处置网格三(老华漕片区)" ? "#b1cce5" : name[index] == "新虹街道处置网格二(爱博)" ? "#a03523" : name[index] == "新虹街道处置网格三(华美)" ? "#d71e00" : name[index] == "新虹街道处置网格一(枢纽)" ? "#ffa192" : name[index] == "新虹街道处置网格四(航华)" ? "#dba197" : name[index] == "七宝镇处置网格一(七宝北片网格)" ? "#009081" : name[index] == "七宝镇处置网格二(七宝中片网格)" ? "#00ae9c" : name[index] == "七宝镇处置网格五(航华网格)" ? "#50ffed" : name[index] == "虹桥镇处置网格四(紫藤、红松区域)" ? "#b2ec0a" : name[index] == "虹桥镇处置网格二(虹梅区域)" ? "#b2ec4a" : "#729900",
- color:"transparent",
- transparency: 0,
- outline: true,
- outlineColor: 'blue',
- // "#4d6700",
- // "#729900",
- }
- };
- setTimeout(() => {
- jMap.Locate.regionLocate(target, options);
- }, 500)
- // 分布点点击事件的回调函数
- function regionLocateCallBack(obj) {
- console.log(obj)
- that.stores.gridDataChange(obj._attributes);
- }
- }, idx * 1)
- })
- }
- }, 1000)
- }
- //小网格(居委会)
- if (id == 2 && query) {
- // console.log(query)
- let queryName = ""
- for (let i = 0; i < query.length; i++) {
- // console.log(query[i].mapGridName)
- queryName = queryName ? `${queryName},'${query[i].mapGridName}'` : `'${query[i].mapGridName}'`
- }
- setTimeout(() => {
- var name2 = [];
- var qp3 = new JMapQueryParam({
- queryMapService: "mh_dyn_district",
- queryMapLayers: [2],
- // queryGeometry: result[0], // 默认进行属性查询,放开该段注释将在选定的几何空间内进行空间查询
- // queryWhere: "name like '%纪东村村委会%' ", // 可自定义查询条件,也可不传该参数
- // queryWhere: "grid_type in ('居委网格','村委网格') and subdistrict like '%华漕镇%' ", // 可自定义查询条件,也可不传该参数
- // queryWhere: `name in ('沪星村村委会','九星村村委会','新龙村经济合作社','中春路第二居委会',
- // ) and subdistrict in ('华漕镇','新虹街道','虹桥镇','七宝镇')`, // 可自定义查询条件,也可不传该参数
- queryWhere: `name in (${queryName}) and subdistrict in ('华漕镇','新虹街道','虹桥镇','七宝镇')`, // 可自定义查询条件,也可不传该参数
- // queryWhere: `subdistrict in ('华漕镇','新虹街道','虹桥镇','七宝镇')`, // 可自定义查询条件,也可不传该参数
- // queryWhere: `grid_type in ('居委网格','村委网格','拓展网格') and subdistrict in ('华漕镇','新虹街道','虹桥镇','七宝镇')`, // 可自定义查询条件,也可不传该参数
- outFields: ["*"], // 返回字段信息
- callBack: testQueryCallBack3
- });
- JmapQuery.execQuery(qp3);
- function testQueryCallBack3(obj) {
- let a = []
- for (let i = 0; i < obj.features.length; i++) {
- a[i] = {
- name: obj.features[i].attributes.name,
- subdistrict: obj.features[i].attributes.subdistrict,
- }
- }
- var big2Arr = []
- obj.features.forEach(function(item, index) {
- var b2 = item.geometry.rings;
- b2.forEach(function(item2, index2) {
- var newArr2 = b2[index2].map(function(value, index3) {
- var obj = {
- x: value[0],
- y: value[1],
- z: 0.1
- }
- return obj
- })
- big2Arr.push(newArr2);
- name2.push(item.attributes.name)
- })
- })
- //画线---------------------------------
- let huaxian = []
- for(let i=0;i<big2Arr.length;i++){
- huaxian.push([])
- for(let ii =0;ii<big2Arr[i].length;ii++){
- huaxian[i].push(
- big2Arr[i][ii]
- )
- }
- }
- for(let i=0;i<huaxian.length;i++){
- let target = {
- id: i + 1,
- attributes: {
- name: i,
- },
- position: huaxian[i],
- label: {
- text: i,
- font: "16px Helvetica",
- color: "rgba(255,255,255,0.1)",
- pixelOffset: [0, -50],
- backgroundColor: "red"
- }
-
- }
- var options = {
- isZoom: false,
- style: {
- color: 'rgb(1, 224, 255)',
- transparency: 1,
- outline: true,
- outlineColor: 'transparent',
- perPositionHeight: true
-
- },
- click: regionLocateCallBack111
- };
- setTimeout(() => {
- window.jMap.Locate.trackLocate(target, options);
- }, 1000)
-
- }
- function regionLocateCallBack111(obj) {
- // console.log(obj); // obj为返回值
- }
- //画线---------------------------------
- //画区域-----------------------------
- big2Arr.forEach(function(item, index) {
- var idx = index + 1;
- setTimeout(() => {
- // 2区域分布
- var target = {
- id: idx,
- attributes: {
- position: item[0],
- name: name2[index]
- },
- position: item,
- label: {
- text: name2[index],
- font: "12px Helvetica",
- color: "transparent",
- pixelOffset: [0, -40]
- }
- };
- var options = {
- isZoom: false,
- click: regionLocateCallBack2,
- style: {
- color: "#68afc1",
- transparency: 0.6,
- outline: true,
- outlineColor: 'blue',
- }
- };
- setTimeout(() => {
- jMap.Locate.regionLocate(target, options);
- }, 500)
- // 分布点点击事件的回调函数
- function regionLocateCallBack2(obj) {
- that.stores.gridDataChange(obj._attributes);
- }
- }, idx * 1)
- })
- //画区域-----------------------------
- }
- }, 2000);
- }
- //大网格
- if (id == 3) {
- setTimeout(() => {
- // 例: 8.1 2 查询图层列表
- var qp2 = new JMapQueryParam({
- queryMapService: "mh_dyn_cywg",
- queryMapLayers: [0],
- // queryGeometry: result[0], // 默认进行属性查询,放开该段注释将在选定的几何空间内进行空间查询
- // queryWhere: "name like '%莘庄镇%' ", // 可自定义查询条件,也可不传该参数
- outFields: ["*"], // 返回字段信息
- callBack: testQueryCallBack2
- });
- JmapQuery.execQuery(qp2);
- // 图层查询完毕的回调函数
- function testQueryCallBack2(obj) {
- var bigNewArr = [];
- var name = [];
- var bigArr = obj.features.filter(function(el) {
- // return el.attributes.name.indexOf('新虹街道') > -1
- return el.attributes.name.indexOf('新虹街道') > -1 ||
- el.attributes.name.indexOf('华漕') > -1 ||
- el.attributes.name.indexOf('七宝中片') > -1 ||
- el.attributes.name.indexOf('航华网格') > -1 ||
- el.attributes.name.indexOf('七宝北片网格') > -1 ||
- el.attributes.name.indexOf('紫藤、红松') > -1 ||
- el.attributes.name.indexOf('虹梅区域') > -1
- })
- //画区域
- bigArr.forEach(function(item, index) {
- var aaa = item.geometry.rings[0];
- var newArr = aaa.map(function(value, index) {
- var obj = {
- x: value[0],
- y: value[1],
- z: 0.1
- }
- return obj
- })
- bigNewArr.push(newArr);
- name.push(item.attributes.name)
- })
- bigNewArr.forEach(function(item, index) {
- var idx = index + 1;
- setTimeout(() => {
- // 2区域分布
- var target = {
- id: idx,
- attributes: {
- position: item[0],
- name: name[index] == "华漕镇处置网格二(纪王西片区)" ? "闵S1-1(纪王西网格)" : name[index] == "华漕镇处置网格一(纪王东片区)" ? "闵S1-2(纪王东网格)" : name[index] == "华漕镇处置网格四(诸翟北片区)" ? "闵S1-3(诸翟北网格)" : name[index] == "华漕镇处置网格五(诸翟南片区)" ? "闵S1-4(诸翟南网格)" : name[index] == "华漕镇处置网格三(老华漕片区)" ? "闵S1-5(老华漕网格)" : name[index] == "新虹街道处置网格二(爱博)" ? "闵S2-1(爱博网格)" : name[index] == "新虹街道处置网格三(华美)" ? "闵S2-2(华美网格)" : name[index] == "新虹街道处置网格一(枢纽)" ? "闵S2-3(枢纽网格)" : name[index] == "新虹街道处置网格四(航华)" ? "闵S2-4(航华网格)" : name[index] == "七宝镇处置网格一(七宝北片网格)" ? "闵S3-1(七宝北片网格)" : name[index] == "七宝镇处置网格二(七宝中片网格)" ? "闵S3-2(七宝吴宝路网格)" : name[index] == "七宝镇处置网格五(航华网格)" ? "闵S3-3(七宝航华网格)" : name[index] == "虹桥镇处置网格四(紫藤、红松区域)" ? "闵S4-1(紫藤红松网格)" : name[index] == "虹桥镇处置网格二(虹梅区域)" ? "闵S4-2(虹梅网格)" : name[index]
- },
- position: item,
- label: {
- // text: name[index] == "华漕镇处置网格二(纪王西片区)" ? "闵S1-1(纪王西网格)" : name[index] == "华漕镇处置网格一(纪王东片区)" ? "闵S1-2(纪王东网格)" : name[index] == "华漕镇处置网格四(诸翟北片区)" ? "闵S1-3(诸翟北网格)" : name[index] == "华漕镇处置网格五(诸翟南片区)" ? "闵S1-4(诸翟南网格)" : name[index] == "华漕镇处置网格三(老华漕片区)" ? "闵S1-5(老华漕网格)" : name[index] == "新虹街道处置网格二(爱博)" ? "闵S2-1(爱博网格)" : name[index] == "新虹街道处置网格三(华美)" ? "闵S2-2(华美网格)" : name[index] == "新虹街道处置网格一(枢纽)" ? "闵S2-3(枢纽网格)" : name[index] == "新虹街道处置网格四(航华)" ? "闵S2-4(航华网格)" : name[index] == "七宝镇处置网格一(七宝北片网格)" ? "闵S3-1(七宝北片网格)" : name[index] == "七宝镇处置网格二(七宝中片网格)" ? "闵S3-2(七宝吴宝路网格)" : name[index] == "七宝镇处置网格五(航华网格)" ? "闵S3-3(七宝航华网格)" : name[index] == "虹桥镇处置网格四(紫藤、红松区域)" ? "闵S4-1(紫藤红松网格)" : name[index] == "虹桥镇处置网格二(虹梅区域)" ? "闵S4-2(虹梅网格)" : name[index],
- font: "14px Helvetica",
- color: "#fff",
- pixelOffset: [0, -40]
- }
- };
- var options = {
- isZoom: false,
- camera: {
- x: 121.4175597,
- y: 31.119248,
- radius: 9000.0,
- offset: { heading: -4, pitch: -70, range: 0 },
- },
- click: regionLocateCallBack,
- style: {
- color: "#5b9bd5",
- transparency: 0.6,
- // name[index] == "华漕镇处置网格二(纪王西片区)" ? "#5b9bd5" :
- // name[index] == "华漕镇处置网格一(纪王东片区)" ? "#5b9bd5" :
- // name[index] == "华漕镇处置网格四(诸翟北片区)" ? "#5b9bd5" :
- // name[index] == "华漕镇处置网格五(诸翟南片区)" ? "#5b9bd5" :
- // name[index] == "华漕镇处置网格三(老华漕片区)" ? "#5b9bd5" :
- // name[index] == "新虹街道处置网格二(爱博)" ? "#17cfbc" :
- // name[index] == "新虹街道处置网格三(华美)" ? "#17cfbc" :
- // name[index] == "新虹街道处置网格一(枢纽)" ? "#17cfbc" :
- // name[index] == "新虹街道处置网格四(航华)" ? "#17cfbc" :
- // name[index] == "七宝镇处置网格一(七宝北片网格)" ? "#fca091" :
- // name[index] == "七宝镇处置网格二(七宝中片网格)" ? "#fca091" :
- // name[index] == "七宝镇处置网格五(航华网格)" ? "#fca091" :
- // name[index] == "虹桥镇处置网格四(紫藤、红松区域)" ? "rgb(37, 95, 37)" :
- // name[index] == "虹桥镇处置网格二(虹梅区域)" ? "rgb(37, 95, 37)" : "rgb(37, 95, 37)",
- outline: true,
- outlineColor: 'blue',
- // "#4d6700",
- // "#729900",
- }
- };
- setTimeout(() => {
- jMap.Locate.regionLocate(target, options);
- }, 500)
- // 分布点点击事件的回调函数
- function regionLocateCallBack(obj) {
- // that.stores.gridDataChange(obj._attributes);
- }
- }, idx * 1)
- })
- }
- }, 1000)
- }
- },
- /**
- * 安保气泡窗
- * @param {*} data
- */
- anbaoPopup(data) {
- var children = []
- if (data.type == 15) {
- children = [
- ["街道:", data.content.streetTown, 12],
- ["安监所人员:", data.content[0].type1, 12],
- ["城运中心人员:", data.content[0].type2, 12],
- ["消防助理员:", data.content[0].type3, 12],
- ]
- }
- if (data.type == 16) {
- children = [
- ["街道:", data.content[0].streetTown, 12],
- ["小网格人员:", data.content[0].type1, 12],
- ["小网格长:", data.content[0].type2, 12],
- ]
- }
- let arrayList = [{
- title: [data.name, true],
- children: []
- }]
- arrayList[0].children = children
- data.gisX = data.position.x
- data.gisY = data.position.y
- this.popup(data, arrayList, true, null, 1)
- },
- /**
- *添加动态图层
- *
- */
- addLayer() {
- var wheres = [];
- wheres[1] = "subdistrict='七宝镇'"; // 1:图层序号 subdistrict='七宝镇' 筛选条件
- var options = {
- click: windowGxLayer,
- wheres: wheres
- };
- setTimeout(() => {
- jMap.addImageryLayer("mh_dyn_cywg", [1], options);
- }, 3000);
- },
- // 点击事件回调函数
- addLayerCallBack(obj) {
- },
- /**
- *安保区域划分
- *
- */
- anbaoMap() {
- let target = {
- id: '100001',
- attributes: {
- name: '大型安保范围',
- },
- position: data[0],
- label: {
- text: "大型安保范围",
- font: "16px Helvetica",
- color: "rgba(255,255,255,0.1)",
- pixelOffset: [0, -50],
- backgroundColor: "red"
- }
- }
- var options = {
- isZoom: true,
- style: {
- color: 'rgb(255,255,0,0.9)',
- transparency: 1,
- outline: true,
- outlineColor: 'transparent',
- perPositionHeight: true
- },
- // click: regionLocateCallBack
- };
- setTimeout(() => {
- window.jMap.Locate.trackLocate(target, options);
- }, 1000)
- },
- // 安保分布点点击事件的回调函数
- regionLocateCallBack(obj) {},
- /**
- * @聚合撒点
- * @param {数据list} data
- * @param {页面类型} pageType
- * @param {类型} type
- */
- initMarkers(data, pageType, type) {
- var _this = this;
- var tag = 1; //1.自定义图标 2.完全自定义 3.默认
- var style = ""; //地图最大化小图标
- var points = []; //地图撒点处理数据存储
- var options = {
- style: { pixelRange: 10 },
- isZoom: true,
- click: clusterMapCallBack,
- };
- jMap.ClusterMap.show(data, options);
- },
- clickFlag(val) {},
- randomColor() {
- var color = "#";
- //for循环中,如果后面仅有一条语句,{}可省略不写
- //随机生成6位0-15之间的数字,再用toString(16)将数字转成16进制
- for (var i = 0; i < 6; i++) color += parseInt(Math.random() * 16).toString(16);
- return color;
- },
- removeMarkers(lnglats) {
- this.map.remove(lnglats);
- },
- /**
- *街镇切换
- */
- streetTownSwitch(data) {
- let sf = 2800.0;
- if (data.id == 12) {
- //区缩放比例调整
- sf = 18000.0;
- }
- var options = {
- area: data.id,
- base_layer_name: "dark",
- model_data_name: "dark",
- isShowDistrictLabel: true,
- camera: {
- x: data.x,
- y: data.y,
- radius: sf,
- offset: { heading: 4, pitch: -89, range: 0 },
- },
- };
- jMap.switchStreet(options);
- },
- /**
- * 点分布(撒点)
- * @param {坐标信息} lnglats
- * @param {页面类型} type
- */
- addMarker(lnglats, pageType, type) {
- window.jMap.Locate.clearLocate();
- let that = this
- let icon = "";
- let arr = []
- let arr1 = []
- let arr2 = []
- let arr3 = []
- let arr4 = []
- let arr5 = []
- var target = lnglats.map((val, ind) => {
- var wgs84 = CoordUtil.gcj02towgs84(Number(val.gisX) || Number(val.longitude), Number(val.gisY) || Number(val.latitude))
- var x = wgs84[0]
- var y = wgs84[1]
- if (pageType == "enforcement-dynamic" ||
- pageType == "self-management" ||
- pageType == "comprehensive-disposal" ||
- pageType == "rescue-station" ||
- pageType == "security-plan" ||
- pageType == "fire-signs" ||
- pageType == "fire-data-analysis" ||
- pageType == "water-sources") {
- let marker = {
- id: ind + 1,
- attrbutes: val,
- position: {
- x: x,
- y: y,
- // x: Number(val.gisX) || Number(val.longitude),
- // y: Number(val.gisY) || Number(val.latitude),
- z: 0
- },
- image: {
- url: type == "双随机执法单位" ? this.stores.sadianIcon.ssjzf : type == "安全检查单位" ? this.stores.sadianIcon.aqjcdw : type == "举报投诉" ? this.stores.sadianIcon.jbts : type == "执法记录仪" && val.type == "执法记录仪" ? this.stores.sadianIcon.zfjly :
-
- type == "执法记录仪" && val.type == "国家会展中心" ? this.stores.sadianIcon.hzzx :
-
- type == "重点单位" ? this.stores.sadianIcon.zddw : type == "龙湖天街(试点)" ? this.stores.sadianIcon.lhtj : type == "一般单位" ? this.stores.sadianIcon.ybdw : type == "九小场所" ? this.stores.sadianIcon.jxcs : type == "其他单位" ? this.stores.sadianIcon.qtdw :
- type == "厂房" ? this.stores.sadianIcon.cf : type == "仓库" ? this.stores.sadianIcon.ck :
- type == "车辆" && val.type != "国家会展中心" ? this.stores.sadianIcon.xfc : type == "历史警情" && val.type != "国家会展中心" ? this.stores.sadianIcon.lsjq :
- type == "历史火灾" && val.type != "国家会展中心" ? this.stores.sadianIcon.lshz : val.type == "国家会展中心" ? this.stores.sadianIcon.hzzx :
- type == "亡人火灾" ? this.stores.sadianIcon.wrhz : type == "伤人火灾" ? this.stores.sadianIcon.srhz :
- type == "消火栓可用" ? this.stores.sadianIcon.xhs : type == "消火栓不可用" ? this.stores.sadianIcon.xhsH :
- type == "天然水源" ? this.stores.sadianIcon.trsy : type == "科普教育基地" ? this.stores.sadianIcon.kpjyjd :
- type == "消防站" ? this.stores.sadianIcon.xfz : type == "高层建筑覆盖" && val.stationType == 1 ? this.stores.sadianIcon.xfdjl :
- type == "高层建筑覆盖" && val.stationType == 2 ? this.stores.sadianIcon.xfdj2 : type == "高层建筑覆盖" && val.stationType == 3 ? this.stores.sadianIcon.xfdj3 :
- type == "高层建筑覆盖" && val.stationType == 4 ? this.stores.sadianIcon.zzd : type == "高层建筑覆盖" && val.stationType == 5 ? this.stores.sadianIcon.jzwxxfz :
- type == "高层建筑覆盖" && val.stationType == 111 ? this.stores.sadianIcon.dian : type == "高层建筑" ? this.stores.sadianIcon.gcggjz :
- type == "专职队" ? this.stores.sadianIcon.zzd : type == "微型消防站" ? this.stores.sadianIcon.jzwxxfz : type == "大型综合体" && val.facilityType == "lhtj" ? this.stores.sadianIcon.lhtj :
- type == "大型综合体" && (val.facilityType == 2 || val.facilityType == 3) ? this.stores.sadianIcon.dxzht : type == "重大火灾隐患" ? this.stores.sadianIcon.lsjq :
- type == "企业消防" && val.facilityType == 13 ? this.stores.sadianIcon.zddw : type == "企业消防" && val.facilityType == 14 ? this.stores.sadianIcon.ybdw :
- type == "社区消防" && val.facilityType == 15 ? this.stores.sadianIcon.zddw : type == "社区消防" && val.facilityType == 16 ? this.stores.sadianIcon.ybdw :
- type == "一级微型消防站" ? this.stores.sadianIcon.yjxfz : type == "街镇专职消防队" ? this.stores.sadianIcon.jzzzxfd : type == "中小学" ? this.stores.sadianIcon.zs : type == "幼儿园" ? this.stores.sadianIcon.yey : type == "其他学校" ? this.stores.sadianIcon.qtxx :
- type == "三合一" ? this.stores.sadianIcon.shy : type == "实时警情" ? this.stores.sadianIcon.ssjq :
- type == "本年度重点事项推进情况" && val.status == 1 ? this.stores.sadianIcon.ywc : type == "本年度重点事项推进情况" && val.status == 2 ? this.stores.sadianIcon.jxz : type == "本年度重点事项推进情况" && val.status == 3 ? this.stores.sadianIcon.zbz :
- type == "高风险" ? this.stores.sadianIcon.gfx : type == "较高风险" ? this.stores.sadianIcon.jgfx : type == "一般风险" ? this.stores.sadianIcon.ybfx : type == "低风险" ? this.stores.sadianIcon.dfx :
- type == "单位巡检" ? this.stores.sadianIcon.dwxj : type == "物联网设备" ? this.stores.sadianIcon.dwxj : type == "监控视频" ? this.stores.sadianIcon.ssjq : type == "监督检查" ? this.stores.sadianIcon.jdjc :
- type == "养老机构" ? this.stores.sadianIcon.xfdjl :
- type == "医疗机构" ? this.stores.sadianIcon.zzd :
- type == "流动消防站(一级)" ? this.stores.sadianIcon.ldxfzyj :
- type == "流动消防站(二级)" ? this.stores.sadianIcon.ldxfzej :
- type == "重点微型消防站" ? this.stores.sadianIcon.zdwxxfz :
-
- this.stores.sadianIcon.trsy,
- // this.jqzhczIcon3 : val.type == "4" ?
- // this.jqzhczIcon4 : val.type == "5" ?
- // this.jqzhczIcon5 : val.type == "消火栓" && val.status == "1" ?
- // this.jqzhczIcon5 : val.type == "消火栓" && val.status == "2" ?
- // this.jqzhczIcon51 : val.type == "天然水源" ?
- // this.jqzhczIcon7 : this.xfzfdtIcon4,
- width: val.type == "国家会展中心" ? 83 : type == "高层建筑覆盖" && val.stationType == 111 ? 7 : type == 111 ? 74 : 19.5,
- height: val.type == "国家会展中心" ? 59 : type == "高层建筑覆盖" && val.stationType == 111 ? 7 : type == 111 ? 66 : 25,
- },
- };
- if (type == "高层建筑覆盖" && val.stationType == 1) {
- arr1.push(val)
- }
- if (type == "高层建筑覆盖" && val.stationType == 2) {
- arr2.push(val)
- }
- if (type == "高层建筑覆盖" && val.stationType == 3) {
- arr3.push(val)
- }
- if (type == "高层建筑覆盖" && val.stationType == 4) {
- arr4.push(val)
- }
- if (type == "高层建筑覆盖" && val.stationType == 5) {
- arr5.push(val)
- }
- return marker;
- } else {
- let marker = {
- id: ind + 1,
- attrbutes: val,
- position: { x: val.gisBaiDuX, y: val.gisBaiDuY, z: 0 },
- image: { url: icon, width: 300, height: 300 },
- };
- return marker;
- }
- });
- if (type == "高层建筑覆盖") {
- if (arr1.length > 0) {
- this.bufferL1(arr1)
- }
- if (arr2.length > 0) {
- this.bufferL2(arr2)
- }
- if (arr3.length > 0) {
- this.bufferL3(arr3)
- }
- if (arr4.length > 0) {
- this.bufferL4(arr4)
- }
- if (arr5.length > 0) {
- this.bufferL5(arr5)
- }
- // this.bufferL(arr)
- }
- //消防水源
- if (pageType == "water-sources") {
- var array = {
- clusterId: 100001,
- clusterData: []
- }
- var target1 = lnglats.map((val, ind) => {
- var wgs84 = CoordUtil.gcj02towgs84(Number(val.gisX) || Number(val.longitude), Number(val.gisY) || Number(val.latitude))
- var x = wgs84[0]
- var y = wgs84[1]
- val.type2 = type
- var array1 = {
- attributes: val,
- position: {
- x: x,
- y: y,
- z: 0,
- },
- image: {
- url: type == "消火栓可用" ? this.stores.sadianIcon.xhs : type == "消火栓不可用" ? this.stores.sadianIcon.xhsH : type == "天然水源" ? this.stores.sadianIcon.trsy : this.stores.sadianIcon.trsy,
- width: 19.5,
- height: 25,
- }
- }
- array.clusterData.push(array1)
- })
- var options = {
- style: { pixelRange: 60 },
- isZoom: true,
- click: this.clusterMapCallBack
- };
- window.jMap.ClusterMap.show(array, options)
- } else {
- //撒点类型
- window.jMap.Locate.pointLocate(target, {
- //撒点
- isZoom: false,
- //animate: { "show": true },
- scaleByDistance: {
- minScaling: 1,
- maxScaling: 1,
- minDistance: 50, //最小距离
- maxDistance: 120000 //最大距离
- },
- click: (val) => {
- //消防执法
- if (pageType == "enforcement-dynamic") {
- if (type == "安全检查单位" || type == "双随机执法单位") {
- this.$axios
- .get(
- this.$api.siaeall.one +
- "?" +
- this.$qs.stringify({
- companyId: val.attrbutes.number,
- companyName: val.attrbutes.name,
- })
- )
- .then((res) => {
- res.data[0].company = val._attrbutes.name;
- res.data[0].streetTown = val._attrbutes.streetTown;
- let arrayList = [{
- title: [res.data[0].company, res.data[0].company ? true : false],
- children: [
- ["单位地址:", res.data[0].companyAddress, 24],
- ["负责人:", res.data[0].linkPerson, 10],
- ["联系电话:", res.data[0].linkPhone, 14],
- ["历史火灾次数:", res.data[0].fireCount, 12],
- ],
- },
- {
- title: ["行政许可情况", res.data[0].processDate && res.data[0].carefullyCheckDate && res.data[0].securityCheckDates],
- children: [
- ["审核时间:", res.data[0].processDate, 12],
- ["验收时间:", res.data[0].carefullyCheckDate, 12],
- ["安检时间:", res.data[0].securityCheckDates, 12],
- ],
- },
- {
- title: ["历史检查情况", res.data[0].inspectCompany && res.data[0].fireHazard && res.data[0].rectificateFireHazard && res.data[0].punishmentDecision && res.data[0].orderThreeStops && res.data[0].correctionNotice && res.data[0].temporarySeizure && res.data[0].penaltyAmount],
- children: [
- ["检查:", res.data[0].inspectCompany + "(家)", 8],
- ["隐患:", res.data[0].fireHazard + "(起)", 8],
- ["整改:", res.data[0].rectificateFireHazard + "(起)", 8],
- ["行罚:", res.data[0].punishmentDecision + "(份)", 8],
- ["三停:", res.data[0].orderThreeStops + "(家)", 8],
- ["责改:", res.data[0].correctionNotice + "(份)", 8],
- ["临封:", res.data[0].temporarySeizure + "(份)", 8],
- ["罚金:", res.data[0].penaltyAmount + "(万元)", 8],
- ],
- },
- {
- title: ["相关火灾情况", res.data[0].fireTime && res.data[0].disposalDuration && res.data[0].burnedArea && res.data[0].fireGrade && res.data[0].mobilizeVehicles && res.data[0].squadron && res.data[0].status && res.data[0].initialFuelType1],
- children: [
- ["报警时间:", res.data[0].fireTime, 12],
- ["处置时长:", res.data[0].disposalDuration, 12],
- ["过火面积:", res.data[0].burnedArea, 12],
- ["火灾等级:", res.data[0].fireGrade, 12],
- ["调动车辆:", res.data[0].mobilizeVehicles + "(辆)", 12],
- ["所属中队:", res.data[0].squadron, 12],
- ["状况:", res.data[0].status, 12],
- ["起火物:", res.data[0].initialFuelType1, 12],
- ],
- },
- ];
- this.popup(val._attrbutes, arrayList, true)
- });
- } else if (type == "举报投诉") {
- let arrayList = [{
- title: [val._attrbutes.name, true],
- children: [
- ],
- }]
- this.popup(val._attrbutes, arrayList, true)
- } else if (type == "执法记录仪") {
- let arrayList = [{
- title: [val._attrbutes.groupName, true],
- children: [
- ["执法人:", val._attrbutes.name, 12],
- ],
- type: type,
- url: val._attrbutes.url,
- },
- ]
- this.popup(val._attrbutes, arrayList, true)
- } else if (type == "重大火灾隐患") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [val.attrbutes.facilityName, true],
- children: [
- ["地址:", val.attrbutes.address, 24],
- ["分类等级:", val.attrbutes.address, 24],
- ["基础信息:", msgParse.test1, 24],
- ["消防安全隐患情况:", msgParse.test2, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- } else if (type == "三合一") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [val.attrbutes.facilityName, true],
- children: [
- ["单位地址:", val.attrbutes.address.replace("\t", ""), 24],
- ["单位类别:", "三合一九小场所", 24],
- ["单位法人:", val.attrbutes.facilityName.replace("\t", ""), 24],
- ["检查人员姓名:", msgParse.test1, 24],
- ["检查时间:", msgParse.test3, 24],
- ["单位使用性质:", msgParse.test4, 24],
- ["单位所属街道:", msgParse.test8, 24],
- ["消消防安全责任人:", msgParse.test10, 24],
- ["消防安全管理人(联系人):", msgParse.test11, 24],
- ["联系电话(手机):", msgParse.test12, 24],
- ["单位(场所)面积(m²):", msgParse.test17, 24],
- ["地上:", msgParse.test18, 24],
- ["地下:", msgParse.test19, 24],
- ["建筑性质:", msgParse.test21, 24],
- ["建筑结构:", msgParse.test22, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- } else if (type == "本年度重点事项推进情况") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [val.attrbutes.facilityName, true],
- children: [
- ["街道名称:", val.attrbutes.streetTown, 24],
- ["地址:", val.attrbutes.address, 24],
- ["状态:", val.attrbutes.status == 1 ? "已完成" : val.attrbutes.status == 2 ? "施工中" : val.attrbutes.status == 3 ? "招标中" : "", 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- }
- //企业自主
- if (pageType == "self-management") {
- if (val.attrbutes.type == "重点单位") {
- this.elementInfo(val.attrbutes, "重点单位")
- } else if (val.attrbutes.type == "大型综合体") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [val.attrbutes.facilityName, true],
- children: [
- ["地址:", val.attrbutes.address, 24],
- ["类型:", val.attrbutes.facilityType == 2 ? "5W平大型商业综合体" : val.attrbutes.facilityType == 3 ? "3-5万平大型商业综合体" : "", 24],
- ["平面布局:", msgParse.planeLayout, 24],
- ["用火用电用气管理:", msgParse.fireGasManage, 24],
- ["油烟管道管理:", msgParse.oilFumeManage, 24],
- ["消防设施:", msgParse.fireFacility, 24],
- ["其他安全管理:", msgParse.otherSecurityManage, 24],
- ["合计汇总:", msgParse.totalSummary, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- } else if (val.attrbutes.type == "中小学" || val.attrbutes.type == "幼儿园" || val.attrbutes.type == "其他学校") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let phone = val.attrbutes.contactPhone
- let arrayList = [{
- title: [val.attrbutes.facilityName, true],
- children: [
- ["机构简称:", msgParse.test1, 24],
- // ["学校办别:", val.attrbutes.facilityType, 24],
- ["学校类型:", val.attrbutes.type, 24],
- ["所在街镇:", val.attrbutes.streetTown, 24],
- ["地址:", msgParse.address, 24],
- ["法人代表:", val.attrbutes.contact, 24],
- ["手机:", phone.length > 8 ? phone.substring(0, 3) + '****' + phone.substring(phone.length - 3, phone.length) : phone.substring(0, 2) + '***' + phone.substring(phone.length - 3, phone.length), 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- } else if (val.attrbutes.facilityType == "22") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [val.attrbutes.facilityName, true],
- children: [
- ["单位地址:", msgParse.address, 24],
- ["单位负责人:", val.attrbutes.contact, 24],
- ["负责人电话:", val.attrbutes.contactPhone, 24],
- ["巡检部位:", msgParse.test1, 24],
- ["巡检人员:", msgParse.test2, 24],
- ["巡检情况:", msgParse.test3, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- } else if (type == "物联网设备") {
- let arrayList = [{
- title: [val.attrbutes.buildName, true],
- children: [
- ["建筑地址:", val.address, 24],
- ["建筑面积:", val.attrbutes.buildArea, 24],
- ["建筑高度:", val.attrbutes.buildHigh, 24],
- ["地上(层):", val.attrbutes.aboveFloor, 24],
- ["地下(层):", val.attrbutes.underFloor, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- } else {
- let arrayList = [{
- title: ["单位详情", val.attrbutes.companyName ? true : false],
- children: [
- ["单位名称:", val.attrbutes.companyName, 24],
- ["单位类型:", val.attrbutes.companyTypeName, 24],
- ["联系电话:", val.attrbutes.linkPhone, 24],
- ["地址:", val.attrbutes.address, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- }
- //大型安保 、火灾数据分析
- if (pageType == "security-plan") {
- if (type == "监控视频") {
- let arrayList = [{
- title: ["监控视频", true],
- children: [
- ["监控名称:", val.attrbutes.name, 24],
- ["监控地址:", val.attrbutes.installPlace, 24],
- ],
- url: val.attrbutes.viewUrl,
- id: val.attrbutes.id
- }, ];
- that.stores.jkspChange(arrayList);
- }
- if (type == "监督检查") {
- let arrayList = [{
- title: ["监督检查", true],
- children: [
- ["检查员名称:", val.attrbutes.checkName, 24],
- ["检查人员所属单位:", val.attrbutes.subordinateCompany, 24],
- ["检查时间:", val.attrbutes.checkTime, 24],
- ["单位类型:", val.attrbutes.companyType, 24],
- ["单位使用性质:", val.attrbutes.companyUseNature, 24],
- ["单位法人:", val.attrbutes.companyName, 24],
- ["单位(场所)实际名称:", val.attrbutes.companyActualName, 24],
- ["网格号:", val.attrbutes.gridNum, 24],
- ["所辖派出所:", val.attrbutes.subordinatePoliceStation, 24],
- ["街镇:", val.attrbutes.street, 24],
- ["单位地址:", val.attrbutes.companyAddress, 24],
- ["消防安全责任人姓名:", val.attrbutes.fireDutyName, 24],
- ["消防安全管理人姓名:", val.attrbutes.fireManageName, 24],
- ["联系电话:", val.attrbutes.phone, 24],
- // ["隐患图片:", val.attrbutes.hiddImage ? JSON.parse(val.attrbutes.hiddImage) : NULL, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- //疏导区单位情况----------------------
- if (type == "养老机构") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [type, true],
- children: [
- ["单位名称:", val.attrbutes.facilityName, 24],
- ["地址:", val.attrbutes.address, 24],
- ["所属街镇:", val.attrbutes.streetTown, 24],
- ["隐患问题:", msgParse.test1, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (type == "医疗机构") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [type, true],
- children: [
- ["单位名称:", val.attrbutes.facilityName, 24],
- ["地址:", val.attrbutes.address, 24],
- ["所属街镇:", val.attrbutes.streetTown, 24],
- ["描述:", msgParse.test1, 24],
- ["隐患问题:", msgParse.test2, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (type == "流动消防站(一级)") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [val.attrbutes.facilityName, true],
- children: [
- ["街镇:", val.attrbutes.streetTown, 24],
- ["驻防位置:", val.attrbutes.address, 24],
- ["保卫区域:", val.attrbutes.facilityName, 24],
- ["负责人:", val.attrbutes.contact, 24],
- ["联系电话:", val.attrbutes.contactPhone, 24],
- ["支队:", msgParse.test1, 24],
- ["辖区中队:", msgParse.test2, 24],
- ["驻防车辆:", msgParse.test3, 24],
- ["车型/跟车人数:", `${msgParse.test4}/ ${msgParse.test5}`, 24],
- ["设立原因:", msgParse.test6, 24],
- ["驻防时间:", msgParse.test7, 24],
- ["视频设备编号:", msgParse.test8, 24],
- ["跟车人员姓名及岗位1:",`${msgParse.test10} ${msgParse.test9}`, 24],
- ["跟车人员姓名及岗位2:",`${msgParse.test12} ${msgParse.test11}`, 24],
- ["跟车人员姓名及岗位3:",`${msgParse.test14} ${msgParse.test14}`, 24],
- ["跟车人员姓名及岗位4:",`${msgParse.test16} ${msgParse.test15}`, 24],
- ["跟车人员姓名及岗位5:",`${msgParse.test18} ${msgParse.test17}`, 24],
- ["跟车人员姓名及岗位6:",`${msgParse.test20} ${msgParse.test19}`, 24],
- ["跟车人员姓名及岗位7:",`${msgParse.test22} ${msgParse.test21}`, 24],
- ["户号:", msgParse.test23, 24],
- ["车型:", msgParse.test24, 24],
- ["车辆号牌:", msgParse.test25, 24],
- ["所属单位:", msgParse.test26, 24],
- ["电台呼号:", msgParse.test27, 24],
- ["车辆类型:", `${msgParse.test28} ${msgParse.test29} ${msgParse.test30} ${msgParse.test31} ${msgParse.test32}`, 24],
- ["总质量:", msgParse.test33, 24],
- ["乘员数:", msgParse.test34, 24],
- ["云梯高度(米)、油箱容量(升):",`${msgParse.test35} 、${msgParse.test36}`, 24],
- ["发动机功率(千瓦):", msgParse.test37, 24],
- ["水泵流量(升/分钟):", msgParse.test38, 24],
- ["泡沫流量(升/分钟):", msgParse.test39, 24],
- ["水箱容量(吨):", msgParse.test40, 24],
- ["名称修改为(载水量):", msgParse.test41, 24],
- ["泡沫容量(吨):", msgParse.test42, 24],
-
-
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (type == "流动消防站(二级)") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [val.attrbutes.facilityName, true],
- children: [
- ["街镇:", val.attrbutes.streetTown, 24],
- ["驻防位置:", val.attrbutes.address, 24],
- ["保卫区域:", val.attrbutes.facilityName, 24],
- ["负责人:", val.attrbutes.contact, 24],
- ["联系电话:", val.attrbutes.contactPhone, 24],
- ["人数:", msgParse.test1, 24],
- ["设立原因:", msgParse.test2, 24],
- ["驻防时间:", msgParse.test3, 24],
- ["定位设备编号:", msgParse.test4, 24],
- ["对讲设备编号:", msgParse.test5, 24],
- ["跟车人员姓名及岗位:",`${msgParse.test7} ${msgParse.test6}`, 24],
- ["跟车人员姓名及岗位:",`${msgParse.test9} ${msgParse.test8}`, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (type == "重点微型消防站") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [val.attrbutes.facilityName, true],
- children: [
- ["街镇:", val.attrbutes.streetTown, 24],
- ["地址:", val.attrbutes.address, 24],
- ["名称:", val.attrbutes.facilityName, 24],,
- ["负责人:", val.attrbutes.contact, 24],
- ["联系电话:", val.attrbutes.contactPhone, 24],
- ["支队:", msgParse.test1, 24],
- ["性质:", msgParse.test2, 24],
- ["固定电话:", msgParse.test3, 24],
- ["微站可视化终端名称:", msgParse.test4, 24],
- ["是否配备电动车:", msgParse.test5, 24],
- ["备注:", msgParse.test6, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (type == "宾馆酒店" || type == "酒店/宾馆") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [type, true],
- children: [
- ["宾馆酒店名称:", val.attrbutes.facilityName, 24],
- ["街镇:", val.attrbutes.streetTown, 24],
- ["地址:", val.attrbutes.address, 24],
- ["房间数:",msgParse.test1, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (type == "大型商业综合体") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [type, true],
- children: [
- ["单位名称:", val.attrbutes.facilityName, 24],
- ["街镇:", val.attrbutes.streetTown, 24],
- ["地址:", val.attrbutes.address, 24],
- ["管理人:",msgParse.test1, 24],
- ["电话:",msgParse.test2, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (type == "厂房仓库" || type == "厂房/仓库") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [type, true],
- children: [
- ["单位名称:", val.attrbutes.facilityName, 24],
- ["街镇:", val.attrbutes.streetTown, 24],
- ["地址:", val.attrbutes.address, 24],
- // ["所属单位:",msgParse.test1, 24],
- // ["公司名称:",msgParse.test2, 24],
- ["公司负责人及联系方式:",`${msgParse.test3} ${msgParse.test4}`, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (type == "批发市场") {
- // let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [type, true],
- children: [
- ["单位名称:", val.attrbutes.facilityName, 24],
- ["街镇:", val.attrbutes.streetTown, 24],
- ["地址:", val.attrbutes.address, 24],
- ["联系人:", val.attrbutes.contact, 24],
- ["联系电话:", val.attrbutes.contactPhone, 24],
-
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (type == "规模租赁公寓") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [type, true],
- children: [
- ["单位名称:", val.attrbutes.facilityName, 24],
- ["街镇:", val.attrbutes.streetTown, 24],
- ["地址:", val.attrbutes.address, 24],
- ["联系人:", val.attrbutes.contact, 24],
- ["联系电话:", val.attrbutes.contactPhone, 24],
- ["建筑面积 ( 平方米 ):",msgParse.test1, 24],
- ["房间数量(间):",msgParse.test2, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (type == "三合一场所") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [type, true],
- children: [
- ["单位名称:", val.attrbutes.facilityName, 24],
- ["街镇:", val.attrbutes.streetTown, 24],
- ["地址:", val.attrbutes.address, 24],
- ["联系人:", val.attrbutes.contact, 24],
- ["联系电话:", val.attrbutes.contactPhone, 24],
- ["住宿人员数量:",msgParse.test1, 24],
- ["是否整改:",msgParse.test2, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- //疏导区单位情况----------------------
- //疏导区基本情况----------------------
- if (type == "学校") {
- let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [type, true],
- children: [
- ["单位名称:", val.attrbutes.facilityName, 24],
- ["街镇:", val.attrbutes.streetTown, 24],
- ["地址:", val.attrbutes.address, 24],
- ["联系人:", val.attrbutes.contact, 24],
- ["联系电话:", val.attrbutes.contactPhone, 24],
- ["场所名称:",msgParse.test1, 24],
- ["法定代表人:",msgParse.test2, 24],
- ["主标签:",msgParse.test3, 24],
- ["次标签:",msgParse.test4, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (type == "居民小区") {
- // let msgParse = JSON.parse(val.attrbutes.extendData)
- let arrayList = [{
- title: [type, true],
- children: [
- ["单位名称:", val.attrbutes.facilityName, 24],
- ["街镇:", val.attrbutes.streetTown, 24],
- ["地址:", val.attrbutes.address, 24],
- ["联系人:", val.attrbutes.contact, 24],
- ["联系电话:", val.attrbutes.contactPhone, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
-
- }
- //火灾数据分析
- if (pageType == "fire-data-analysis") {
- if (type == "历史火灾") {
- let arrayList = [{
- title: ["案件详情", true],
- children: [
- ["案件编号:", val.attrbutes.ajbh, 24],
- ["案件描述:", val.attrbutes.bcxx, 24],
- ["报警时间:", val.attrbutes.tzsj, 24],
- ["案件类型:", val.attrbutes.ajlx, 24],
- ["警情类别:", type, 24],
- ["警情等级:", val.attrbutes.ajdj, 24],
- ["调动车辆:", val.attrbutes.cdcl, 24],
- ["处置对象:", val.attrbutes.czdx, 24],
- ["主责中队:", val.attrbutes.zhongdui, 24],
- ["案件状态:", val.attrbutes.ajzt, 24],
- ["到场时间:", val.attrbutes.cssj, 24],
- ["控制时间:", val.attrbutes.kzsj, 24],
- ["熄灭时间:", val.attrbutes.xmsj, 24],
- ["返队时间:", val.attrbutes.fdsj, 24],
- ["所属街道:", val.attrbutes.streettown, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (type == "伤人火灾" || type == "亡人火灾") {
- let arrayList = [{
- title: ["案件详情", true],
- children: [
- ["火灾序号:", val.attrbutes.fireNumber, 24],
- ["所属街道:", val.attrbutes.street, 24],
- ["起火地点:", val.attrbutes.fireAddress, 24],
- ["起火时间:", val.attrbutes.fireTime, 24],
- ["直接财产损失:", val.attrbutes.directPropertyLoss + "万", 24],
- ["过火面积:", val.attrbutes.burnedArea + "㎡", , 24],
- ["受灾户数:", val.attrbutes.affectedHouse + "户", 24],
- ["受灾人数:", val.attrbutes.victimNumber + "人", 24],
- ["死亡人数:", val.attrbutes.deathToll + "人", 24],
- ["受伤人数:", val.attrbutes.injuredNumber + "人", 24],
- ["起火经过:", val.attrbutes.fireProcess, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- }
- //消防救援站点
- if (pageType == "rescue-station") {
- if (type == "科普教育基地") {
- let arrayList = [{
- title: [val.attrbutes.type, true],
- children: [
- ["成立时间/联系人:", val.attrbutes.policeTime, 24],
- ["站点地址:", val.attrbutes.alertLevel, 24],
- ["预约电话:", val.attrbutes.address, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (type == "消防站" || type == "专职队" || type == "高层建筑覆盖" || type == "高层建筑" || type == "微型消防站" || type == "一级微型消防站" || type == "街镇专职消防队") {
- if (val.attrbutes.stationType == 1 || val.attrbutes.stationType == 2 || val.attrbutes.stationType == 3 || val.attrbutes.stationType == 4) {
- let arrayList = [{
- title: [val.attrbutes.stationName, true],
- children: [
- ["消防站地址:", val.attrbutes.stationAddress, 24],
- ["消防站类型:", val.attrbutes.stationType == 1 ? "一级消防站" : val.attrbutes.stationType == 2 ? "二级消防站" : val.attrbutes.stationType == 3 ? "三级消防站" : val.attrbutes.stationType == 4 ? "专职队" : "", 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (val.attrbutes.stationType == 5) {
- let arrayList = [{
- title: [val.attrbutes.streetTown + "微型消防站(" + val.attrbutes.stationCode + '号)', true],
- children: [
- ["地址:", val.attrbutes.stationAddress, 24],
- ["编号:", val.attrbutes.stationCode, 24],
- ["距消防站直线距离:", val.attrbutes.stationAddress, 24],
- ["距消防站行驶距离:", val.attrbutes.driveDistance, 24],
- ["交通拥堵行驶时间:", val.attrbutes.jamDrive, 24],
- ["交通畅通行驶时间:", val.attrbutes.unimpededDrive, 24],
- // ["点位情况:", val.attrbutes.pointSituation, 24],
- ["建筑情况:", val.attrbutes.buildSituation, 24],
- ["车辆停放:", val.attrbutes.vehiclePark, 24],
- ["是否有产证:", val.attrbutes.birthCert, 24],
- ["产证情况:", val.attrbutes.birthCertSituation, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (val.attrbutes.stationType == 111 || val.attrbutes.stationType == 112) {
- let arrayList = [{
- title: [val.attrbutes.buildName, true],
- children: [
- ["建筑地址:", val.attrbutes.address, 24],
- ["主要产权人:", val.attrbutes.principalPropertyOwner, 24],
- ["统一社会信用代码:", val.attrbutes.creditCode, 24],
- ["物业服务企业名称:", val.attrbutes.propertyServiceName, 24],
- ["建成年份:", val.attrbutes.completeYear, 24],
- ["建筑高度:", val.attrbutes.buildHigh, 24],
- ["地上建筑层数:", val.attrbutes.aboveFloor, 24],
- ["地下建筑层数:", val.attrbutes.underFloor, 24],
- ["建筑类型:", val.attrbutes.buildType, 24],
- ["功能用途:", val.attrbutes.functionalPurpose, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- if (val.attrbutes.stationType == 17 || val.attrbutes.stationType == 18) {
- let bianhao = JSON.parse(val.attrbutes.extendData).test1
- let arrayList = [{
- title: [val.attrbutes.facilityName, true],
- children: [
- ["编号:", bianhao, 24],
- ["消防站地址:", val.attrbutes.address, 24],
- ["消防站类型:", val.attrbutes.stationType == 17 ? "一级微型消防站" : val.attrbutes.stationType == 18 ? "街镇专职消防队" : "", 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- }
- if (type == "企业消防" || type == "社区消防") {
- let arrayList = [{
- title: [val.attrbutes.facilityName, true],
- children: [
- ["站点地址:", val.attrbutes.address, 24],
- ["站点类型:", val.attrbutes.facilityType == 13 ? "重点单位微站" :
- val.attrbutes.facilityType == 14 ? "一般单位微站" : val.attrbutes.facilityType == 15 ? "居委会微站" : val.attrbutes.facilityType == 16 ? "村委会微站" : "", 24
- ],
- ["街镇:", val.attrbutes.streetTown, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- }
- //警情综合处置
- if (pageType == "comprehensive-disposal") {
- if (type == "实时警情") {
- let arrayList = [{
- title: ["案件详情", true],
- children: [
- ["案件编号:", val.attrbutes.ajbh, 24],
- ["案件描述:", val.attrbutes.bcxx, 24],
- ["报警时间:", val.attrbutes.tzsj, 24],
- ["案件类型:", val.attrbutes.ajlx, 24],
- ["警情类别:", val.attrbutes.type, 24],
- ["警情等级:", val.attrbutes.ajdj, 24],
- ["案发地址:", val.attrbutes.afdz, 24],
- ["调动车辆:", val.attrbutes.cdcl, 24],
- ["处置对象:", val.attrbutes.czdx, 24],
- ["主责中队:", val.attrbutes.zhongdui, 24],
- ["案件状态:", val.attrbutes.cssj, 24],
- ["到场时间:", val.attrbutes.dcsj, 24],
- ["出水时间:", val.attrbutes.cssj, 24],
- ["控制时间:", val.attrbutes.kzsj, 24],
- ["熄灭时间:", val.attrbutes.xmsj, 24],
- ["所属街道:", val.attrbutes.streettown, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- }
- //城市消防体征
- if (pageType == "fire-signs") {
- if (type == "仓库") {
- let arrayList = [{
- title: [val.attrbutes.companyName, true],
- children: [
- ["单位地址:", val.attrbutes.address, 24],
- ["单位类别:", val.attrbutes.companyType, 24],
- ["单位使用性质:", val.attrbutes.companyNature, 24],
- ["单位(法人)名称:", val.attrbutes.delegateName, 24],
- ["统一社会信用代码:", val.attrbutes.socialCode, 24],
- ["所辖派出所:", val.attrbutes.policeStation, 24],
- ["消防安全责任人:", val.attrbutes.fireDutyName, 24],
- ["消防安全管理人:", val.attrbutes.fireManageName, 24],
- ["联系电话(手机):", val.attrbutes.linkPhone, 24],
- ["是否自主消防安全管理:", val.attrbutes.fireSafetyManage, 24],
- ["单位(场所)面积(㎡):", val.attrbutes.companyArea, 24],
- ["行业类别:", val.attrbutes.industryType, 24],
- ["是否为洁净厂房:", val.attrbutes.cleanRoom, 24],
- ["生产经营组织形式:", val.attrbutes.organizationForm, 24],
- ["网格号:", val.attrbutes.gridNo, 24],
- ["年份:", val.attrbutes.particularYear, 24],
- ["提交时间:", val.attrbutes.submitTime, 24],
- ["经度:", val.attrbutes.longitude, 24],
- ["纬度:", val.attrbutes.latitude, 24],
- ],
- }, ];
- this.popup(val._attrbutes, arrayList, true)
- }
- }
- },
- });
- }
- },
- /**
- * 点分布(撒点四叶草 安保专用)
- * @param {坐标信息} lnglats
- * @param {页面类型} type
- */
- addMarkerSYC(lnglats, pageType, type) {
- let that = this
- let icon = "";
- var target = lnglats.map((val, ind) => {
- var wgs84 = CoordUtil.gcj02towgs84(Number(val.gisX) || Number(val.longitude), Number(val.gisY) || Number(val.latitude))
- var x = wgs84[0]
- var y = wgs84[1]
- if (
- pageType == "security-plan") {
- let marker = {
- id: ind + 1,
- attrbutes: val,
- position: {
- x: x,
- y: y,
- z: 0
- },
- image: {
- url: type == "国家会展中心" ? this.stores.sadianIcon.hzzx : this.stores.sadianIcon.zdwxxfz,
- width: val.type == "国家会展中心" ? 83 : 19.5,
- height: val.type == "国家会展中心" ? 59 : 25,
- },
- };
- return marker;
- } else {
- let marker = {
- id: ind + 1,
- attrbutes: val,
- position: { x: val.gisBaiDuX, y: val.gisBaiDuY, z: 0 },
- image: { url: icon, width: 300, height: 300 },
- };
- return marker;
- }
- });
- //撒点类型
- window.jMap.Locate.pointLocate(target, {
- //撒点
- isZoom: false,
- //animate: { "show": true },
- scaleByDistance: {
- minScaling: 1,
- maxScaling: 1,
- minDistance: 50, //最小距离
- maxDistance: 120000 //最大距离
- },
- click: (val) => {
- },
- });
- },
- /**
- * 点分布(网格名称 安保专用)
- * @param {坐标信息} lnglats
- * @param {页面类型} type
- */
- addMarkerWG(lnglats, pageType, type) {
- let that = this
- let icon = "";
- var target = lnglats.map((val, ind) => {
- var wgs84 = CoordUtil.gcj02towgs84(Number(val.gisX) || Number(val.longitude), Number(val.gisY) || Number(val.latitude))
- var x = wgs84[0]
- var y = wgs84[1]
- if (
- pageType == "security-plan") {
- let marker = {
- id: ind + 1,
- attrbutes: val,
- position: {
- x: x,
- y: y,
- z: 0
- },
- image: {
- url: val.type == "wgmc_hc" ? this.stores.sadianIcon.wgmc_hc :
- val.type == "wgmc_xh" ? this.stores.sadianIcon.wgmc_xh :
- val.type == "wgmc_qb" ? this.stores.sadianIcon.wgmc_qb :
- val.type == "wgmc_hq" ? this.stores.sadianIcon.wgmc_hq :
- val.type == "国家会展中心" ? this.stores.sadianIcon.hzzx :this.stores.sadianIcon.zdwxxfz,
- width: val.type == "wgmc_hc" ? 98 :
- val.type == "wgmc_xh" ? 98 :
- val.type == "wgmc_qb" ? 98 :
- val.type == "wgmc_hq" ? 98 :
- val.type == "国家会展中心" ? 83 : 19.5,
-
- height: val.type == "wgmc_hc" ? 33 :
- val.type == "wgmc_xh" ? 33 :
- val.type == "wgmc_qb" ? 33 :
- val.type == "wgmc_hq" ? 33 :
- val.type == "国家会展中心" ? 59 : 25,
- },
- };
- return marker;
- } else {
- let marker = {
- id: ind + 1,
- attrbutes: val,
- position: { x: val.gisBaiDuX, y: val.gisBaiDuY, z: 0 },
- image: { url: icon, width: 300, height: 300 },
- };
- return marker;
- }
- });
- //撒点类型
- window.jMap.Locate.pointLocate(target, {
- //撒点
- isZoom: false,
- //animate: { "show": true },
- scaleByDistance: {
- minScaling: 1,
- maxScaling: 1,
- minDistance: 50, //最小距离
- maxDistance: 120000 //最大距离
- },
- click: (val) => {
- },
- });
- },
- //聚合点击事件
- clusterMapCallBack(clusterPointArr, clickPoint) {
- let val = clusterPointArr.attributes
- if (val.type2 == "消火栓可用" || val.type2 == "消火栓不可用") {
- let arrayList = [{
- title: ["消火栓", true],
- children: [
- ["水源位置:", val.address, 24],
- ["电话:", val.phone, 12],
- ["责任人:", val.dutyPerson, 12],
- ["支队名称:", val.detachmentName, 24],
- ["管辖机构:", val.jurisdictionalAgency, 12],
- ["水源类型:", val.type, 12],
- ["取水形式:", val.getWaterType, 12],
- ["水源性质:", val.waterAdministrative, 12],
- ["供水单位:", val.waterUnit, 24],
- ["水压(Mpa):", val.waterGage, 24],
- ["状态:", val.status == 1 ? "可用" : "不可用", 12],
- ],
- }, ];
- this.popup(val, arrayList, true)
- } else if (type == "天然水源") {
- let arrayList = [{
- title: [val.facilityName, true],
- children: [
- ["水源位置:", val.address, 24],
- ],
- }, ];
- this.popup(val, arrayList, true)
- }
- },
- /**
- * 热力图
- * @param {} data
- */
- heatMap(data) {
- let target = []
- if (data.length > 0) {
- for (let i = 0; i < data.length; i++) {
- var wgs84 = CoordUtil.gcj02towgs84(Number(data[i].gisX) || Number(data[i].longitude), Number(data[i].gisY) || Number(data[i].latitude))
- var x = wgs84[0]
- var y = wgs84[1]
- target[i] = []
- target[i].x = x
- target[i].y = y
- }
- let options = {
- style: {
- minOpacity: 0.6,
- maxOpacity: 0.9,
- radius: 50,
- gradient: {
- '.10': 'green',
- '.45': 'yellow',
- '.65': 'orange',
- '.80': 'red'
- }
- },
- isZoom: false
- }
- jMap.HeatMap.show(target, options)
- } else {
- jMap.HeatMap.hide()
- }
- },
- // 无经纬度创建标点和点击事件
- addMarkerAddress(lnglats) {
- let target = lnglats.map((val, ind) => {
- if (!val.addressId) {
- let addressInfo = window.jMap.queryMphInfo(val.address)[val.address][0];
- return {
- ...val,
- addressId: addressInfo.address_id, // 地址id
- province: addressInfo.province, // 市
- district: addressInfo.district, // 区
- sub_district: addressInfo.sub_district, // 街镇
- streetname: addressInfo.streetname, // 路
- address: addressInfo.address, // 户
- committee: addressInfo.committee, // 居委会
- };
- }
- });
- target = target.reduce((item, next) => {
- !item.some((val) => val.addressId === next.addressId) && item.push(next);
- return item;
- }, []);
- for (let item = 0; item < Math.floor(target.length / 100); item++) {
- setTimeout(() => {
- window.jMap.locateMph(
- target
- .slice(item * 100, (item + 1) * 100)
- .map((val) => val.addressId)
- .join(), {
- isZoom: false,
- scaleByDistance: { minScaling: 0, maxScaling: 1, minDistance: 1000, maxDistance: 30000 },
- click: (value) => {
- this.elementInfo(value, "fire");
- },
- }
- );
- }, 0);
- }
- },
- elementInfo(value, type) {
- let element = "";
- if (type == "重点单位") {
- element = `<div class="ysc-dynamic-layer ys-css3-box" onclick="vue.removePopup">
- <div class="tableTooltip mapTab">
- <div class="tableTitle">
- <div>1212121</div>
- </div>
- </div>
- </div>`;
- }
- this.addMarkerInfo(element, value, type);
- },
- bufferL(val) {
- let target = {
- geometry: [{
- position: [],
- type: 'point'
- }],
- distance: 7000
- }
- for (let i = 0; i < val.length; i++) {
- // var wgs84 = CoordUtil.gcj02towgs84(Number(val.longitude + '0000000' ), Number(val.latitude + '0000000' ))
- // var x = wgs84[0]
- // var y = wgs84[1]
- target.geometry[i] = {
- position: [{ x: Number(val[i].longitude) + '0000000', y: Number(val[i].latitude) + '0000000' }],
- type: 'point'
- }
- // if(val[i].stationType ==7 ){
- // target
- // }
- }
- var options = { callBack: this.bufferCallback };
- jMap.Buffer.generate(target, options);
- },
- bufferL1(val) {
- let target = {
- geometry: [{
- position: [],
- type: 'point'
- }],
- distance: ((Math.sqrt(7 / 3.14) * 1000) / 2).toFixed(0)
- }
- for (let i = 0; i < val.length; i++) {
- var wgs84 = CoordUtil.gcj02towgs84(Number(val[i].longitude), Number(val[i].latitude))
- var x = wgs84[0].toFixed(13)
- var y = wgs84[1].toFixed(13)
- target.geometry[i] = {
- position: [{ x: x, y: y }],
- type: 'point'
- }
- }
- var options = { callBack: bufferCallback };
- jMap.Buffer.generate(target, options);
- },
- bufferL2(val) {
- let target = {
- geometry: [{
- position: [],
- type: 'point'
- }],
- distance: ((Math.sqrt(4 / 3.14) * 1000) / 2).toFixed(0)
- }
- for (let i = 0; i < val.length; i++) {
- var wgs84 = CoordUtil.gcj02towgs84(Number(val[i].longitude), Number(val[i].latitude))
- var x = wgs84[0].toFixed(13)
- var y = wgs84[1].toFixed(13)
- target.geometry[i] = {
- position: [{ x: x, y: y }],
- type: 'point'
- }
- }
- var options = { callBack: bufferCallback };
- jMap.Buffer.generate(target, options);
- },
- bufferL3(val) {
- let target = {
- geometry: [{
- position: [],
- type: 'point'
- }],
- distance: ((Math.sqrt(2 / 3.14) * 1000) / 2).toFixed(0)
- }
- for (let i = 0; i < val.length; i++) {
- var wgs84 = CoordUtil.gcj02towgs84(Number(val[i].longitude), Number(val[i].latitude))
- var x = wgs84[0].toFixed(13)
- var y = wgs84[1].toFixed(13)
- target.geometry[i] = {
- position: [{ x: x, y: y }],
- type: 'point'
- }
- }
- var options = { callBack: bufferCallback };
- jMap.Buffer.generate(target, options);
- },
- bufferL4(val) {
- let target = {
- geometry: [{
- position: [],
- type: 'point'
- }],
- distance: ((Math.sqrt(2 / 3.14) * 1000) / 2).toFixed(0)
- }
- for (let i = 0; i < val.length; i++) {
- var wgs84 = CoordUtil.gcj02towgs84(Number(val[i].longitude), Number(val[i].latitude))
- var x = wgs84[0].toFixed(13)
- var y = wgs84[1].toFixed(13)
- target.geometry[i] = {
- position: [{ x: x, y: y }],
- type: 'point'
- }
- }
- var options = { callBack: bufferCallback };
- jMap.Buffer.generate(target, options);
- },
- bufferL5(val) {
- let target = {
- geometry: [{
- position: [],
- type: 'point'
- }],
- distance: ((Math.sqrt(2 / 3.14) * 1000) / 2).toFixed(0)
- }
- for (let i = 0; i < val.length; i++) {
- var wgs84 = CoordUtil.gcj02towgs84(Number(val[i].longitude), Number(val[i].latitude))
- var x = wgs84[0].toFixed(13)
- var y = wgs84[1].toFixed(13)
- target.geometry[i] = {
- position: [{ x: x, y: y }],
- type: 'point'
- }
- }
- var options = { callBack: bufferCallback };
- jMap.Buffer.generate(target, options);
- },
- bufferCallback(result) {
- for (var i in result) {
- var target = {
- id: i,
- position: CoordUtil.arrayToJson(result[i].rings[0]) // 二维坐标数组转JSON数组,详见三中
- };
- var options = {
- style: {
- color: 'red',
- transparency: 0.6,
- }
- }
- // if (result[i].stationType == 1) {
- // options.style.color = '#f80000',
- // options.style.transparency = 0.6
- // }
- // if (result[i].stationType == 2) {
- // options.style.color = '#f88c00',
- // options.style.transparency = 0.6
- // }
- // if (result[i].stationType == 3) {
- // options.style.color = '#0092f8',
- // options.style.transparency = 0.6
- // }
- jMap.Locate.regionLocate(target, options)
- }
- },
- bufferCallback1(result) {
- for (var i in result) {
- var target = {
- id: i,
- position: CoordUtil.arrayToJson(result[i].rings[0]) // 二维坐标数组转JSON数组,详见三中
- };
- jMap.Locate.regionLocate(target, {
- style: {
- color: '#f80000',
- transparency: 0.6,
- }
- })
- }
- },
- bufferCallback2(result2) {
- for (var i in result2) {
- var target = {
- id: i,
- position: CoordUtil.arrayToJson(result2[i].rings[0]) // 二维坐标数组转JSON数组,详见三中
- };
- jMap.Locate.regionLocate(target, {
- isZoom: true,
- style: {
- color: '#f88c00',
- transparency: 0.6,
- }
- })
- }
- },
- bufferCallback3(result3) {
- for (var i in result3) {
- var target = {
- id: i,
- position: CoordUtil.arrayToJson(result3[i].rings[0]) // 二维坐标数组转JSON数组,详见三中
- };
- jMap.Locate.regionLocate(target, {
- style: {
- color: '#0092f8',
- transparency: 0.6,
- }
- })
- }
- },
- addMarkerInfo(element, value, type, isBtn = false) {
- var wgs84 = CoordUtil.gcj02towgs84(Number(value.gisX) || Number(value.longitude), Number(value.gisY) || Number(value.latitude))
- var x = wgs84[0]
- var y = wgs84[1]
- let _this = this
- // window.jMap.Popup && window.jMap.Popup.hide([this.oldPopup && this.oldPopup.id]);
- if (this.oldPopup && value.id === this.oldPopup.id) {
- window.jMap.Popup.hide();
- return (this.oldPopup = null);
- }
- if (type == "selfManagement" || type == "water") {
- window.jMap.Popup.show({
- id: value.id,
- //position: value.wgs84position, //使用自定义窗体
- position: { x: x, y: y }, //使用自定义窗体
- element: element,
- }, { isZoom: false, offset: [0, -40] });
- }
- if (type == "重点单位") {
- _this.stores.zddwIdSD(value.companyId);
- // localStorage.setItem("zddw",)
- // window.jMap.Popup.show({
- // // position: { x: value.gisX, y: value.gisY }, //使用自定义窗体
- // position: { x: x, y: y }, //使用自定义窗体
- // element: element,
- // }, { isZoom: 100, offset: [0, -40] });
- }
- // if (!isBtn) {
- // window.jMap.goTo({
- // x: Number(value.wgs84position.x),
- // y: Number(value.wgs84position.y),
- // radius: 1000,
- // }, {
- // duration: 3,
- // offset: {
- // heading: -4,
- // pitch: -70,
- // range: 0,
- // },
- // });
- // window.jMap.Buffer.generate({
- // geometry: [{ position: [{ x: Number(value.wgs84position.x), y: Number(value.wgs84position.y) }], type: "point" }],
- // distance: 1000,
- // }, {
- // callBack: (el) => {
- // for (const i in el) {
- // var target = {
- // id: i,
- // position: CoordUtil.arrayToJson(el[i].rings[0]),
- // };
- // }
- // window.jMap.Locate.regionLocate(target, {
- // style: {
- // color: "rgba(235, 98, 98, .1)",
- // transparency: 0.3,
- // },
- // });
- // },
- // });
- // }
- this.oldPopup = value;
- },
- removePopup(e) {
- },
- /**
- * 气泡窗
- * @param {*} data
- * @param {*} arrayList 展示数据
- * @param {*} type
- * @param {*} other
- * @param {*} zb 坐标类型
- */
- popup(data, arrayList, type, other, zb) {
- if (type) {
- if (!other) {
- var html = document.createElement('div');
- html.className = 'ysc-dynamic-layer ys-css3-box';
- var line = document.createElement('div');
- line.className = 'line';
- var main = document.createElement('div');
- main.className = 'main';
- if (zb) {
- main.setAttribute('style', 'position: fixed;top:120px;left:39%;max-height:500px;overflow-y: scroll;background:none;width:400px;bottom:auto; padding:10px 10px 5px 0 !important; border-radius: 0.05rem;border:1px solid rgba(115, 251, 253, 1);box - shadow: inset 0 0 1px 0.0125rem rgba(115, 251, 253, 1); background:rgba(0, 0, 0, 0.6)');
- } else {
- main.setAttribute('style', 'position: absolute;top:50%;max-height:500px;overflow-y: scroll;background:none;width:400px;bottom:auto; padding:10px 10px 5px 0 !important; border-radius: 0.05rem;border:1px solid rgba(115, 251, 253, 1);box - shadow: inset 0 0 1px 0.0125rem rgba(115, 251, 253, 1); background:rgba(0, 0, 0, 0.6)');
- }
- var click = document.createElement('div');
- click.setAttribute('style', 'float: right;width: 13px;height: 13px;position: absolute;top:8px;right:16px;cursor: pointer');
- var img = document.createElement('img');
- img.className = 'click';
- img.setAttribute("src", this.stores.sadianIcon.close);
- img.setAttribute("style", 'width: 20px;height: 20px;')
- click.appendChild(img)
- var contain = document.createElement('div');
- contain.setAttribute('style', 'margin-left: 3%;right:50px;top:30px;padding: 0px 0 ');
- if (arrayList[0].title[1]) {
- var p = document.createElement('div');
- p.setAttribute('style', 'font-size:18px;color:#73fbfd;line-height:25px');
- p.innerHTML = arrayList[0].title[0]
- contain.appendChild(p)
- }
- for (let i = 0; i < arrayList[0].children.length; i++) {
- if (arrayList[0].children[i][1]) {
- let textWrap = document.createElement('div');
- textWrap.setAttribute('style', 'font-size:14px;color:#fff;line-height:25px;');
- let p1 = document.createElement('span');
- p1.setAttribute('style', 'color:#73fbfd;');
- p1.innerHTML = arrayList[0].children[i][0]
- // if()
- let p2 = document.createElement('span');
- p2.setAttribute('style', 'color:#fff;word-break:break-all !important');
- p2.innerHTML = arrayList[0].children[i][1]
- textWrap.appendChild(p1)
- textWrap.appendChild(p2)
- contain.appendChild(textWrap)
- }
- }
- setTimeout(() => {
- main.appendChild(click)
- main.appendChild(contain)
- if (zb) {
- } else {
- html.appendChild(line)
- }
- html.appendChild(main)
- let text = html.innerHTML.replace(/"click"/g, '"click" onclick="vue.popup(false, false, false)"')
- if (zb) {
- var wgs84 = [Number(data.gisX), Number(data.gisY)]
- } else {
- var wgs84 = CoordUtil.gcj02towgs84(Number(data.gisX) || Number(data.longitude), Number(data.gisY) || Number(data.latitude))
- }
- var x = wgs84[0]
- var y = wgs84[1]
- var target = {
- id: '100001',
- position: { x: x, y: y, z: 0 },
- element: `<div class="ysc-dynamic-layer ys-css3-box" style="">${text}</div>`
- };
- var options = {
- // isZoom: true,
- offset: [-6, -275]
- };
- jMap.Popup.show(target, options);
- }, 10)
- } else {
- }
- } else {
- jMap.Popup.hide();
- }
- },
- }
- }
|