Compare commits

15 Commits

Author SHA1 Message Date
guanj
295cfc6ec1 修改北京现场问题 2026-07-02 09:55:03 +08:00
guanj
37eef06a3b 修改现场反馈问题 2026-06-30 08:36:33 +08:00
guanj
5c766684f9 联调短信发送功能 2026-06-22 18:57:53 +08:00
5180dfaf60 添加redis缓存刷新 2025-11-12 14:50:21 +08:00
guanj
6a1a7eb218 添加已发短信查询接口 2025-11-12 14:35:16 +08:00
guanj
80ed66a2b0 修改责任计算参数问题 2025-11-10 11:34:24 +08:00
stt
7d86bbb6c2 添加调取stationMap的方法 2025-11-07 16:19:15 +08:00
guanj
2631f43623 修改页面样式 2025-11-07 14:58:50 +08:00
stt
b396686b61 无锡大屏添加变电站名称绑定 2025-11-04 14:06:39 +08:00
stt
1a0a42c5a5 导出报表,时分秒可选 2025-10-30 10:24:34 +08:00
guanj
980d5a22b3 修改现场返回问题 2025-10-30 10:08:30 +08:00
guanj
0ffc0cd01e Merge branch 'master' of http://192.168.1.22:3000/Web/bigscreenWeb 2025-10-27 15:38:01 +08:00
guanj
079263ed38 修改 接线图第一次加载问题 2025-10-27 15:37:54 +08:00
stt
859d890434 地图的时候不展示表格 2025-10-27 15:08:43 +08:00
guanj
1c365c0585 提交地图文件 2025-10-27 14:13:43 +08:00
104 changed files with 21139 additions and 626 deletions

2
.gitignore vendored
View File

@@ -11,6 +11,8 @@ node_modules
dist dist
offline offline
# tiles
# tiles1
dist-ssr dist-ssr
*.local *.local
# Editor directories and files # Editor directories and files

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 899 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
_jsload2&&_jsload2('clayer', 'z.extend(nb.prototype,{cl:{},Bj:[],Pu:"",jq:"",MG:"",dl:s,Jg:s,Ig:s,Hg:[],LG:0,pz:u(),lz:u(),Ku:u(),Sd:function(){this.UG()},na:function(a,b){Mc.prototype.na.call(this,a,b);this.cl={};this.Bj=[];this.B=a;this.UG()},zt:ca(q),remove:function(){Mc.prototype.remove.call(this);this.fU()},UG:function(){var a=this,b=a.B;b&&(this.pz=function(b){a.yT(b)},this.lz=function(b){a.XS(b)},this.Ku=function(b){a.WS(b)},b.addEventListener("mousemove",this.pz),b.addEventListener("onhotspotover",this.lz),b.addEventListener("onhotspotout", this.Ku),b.addEventListener("onzoomstart",this.Ku))},fU:function(){var a=this.B;a&&(a.removeEventListener("mousemove",this.pz),a.removeEventListener("onhotspotover",this.lz),a.removeEventListener("onhotspotout",this.Ku))},yT:function(a){var b=this,c=b.B,e=c.oa();if(c.fa()<this.gc||c.Sb())b.xB();else if(a=e.wm().kh(a.point),e=e.$c(),a=new Q(Math.floor(a.x*Math.pow(2,c.fa()-18)),Math.floor(a.y*Math.pow(2,c.fa()-18))),e=new Q(Math.floor(a.x/e),Math.floor(a.y/e)),this.jq=c=e.x+"_"+e.y+"_"+c.fa(),this.cl[c]){if(this.Pu!= c){b.xB();b.TG(this.cl[c]);this.Pu=c;for(var e=-1,a=0,f=this.Bj.length;a<f;a++)if(c==this.Bj[a]){e=a;break}0<=e&&(this.Bj.splice(e,e),this.Bj.push(c))}}else if(this.MG!=c){this.MG=c;e=Wc[parseInt(Math.random()*Wc.length)];a=b.ub;c=e+"/data?grids="+c+"&q="+a.Wm+"&tags="+a.pu+"&filter="+a.filter+"&sortby="+a.Vy+"&ak="+a.Vl+"&page_size="+a.ON+"&age="+a.Gw;b.Cf?c+="&geotable_id="+b.Cf:b.Rn&&(c+="&databox_id="+b.Rn);var g=(1E5*Math.random()).toFixed(0);!B._rd&&(B._rd={});B._rd["_cbk"+g]=function(a){b.PS(a); delete B._rd["_cbk"+g]};oa(c+("&callback=BMap._rd._cbk"+g))}},PS:function(a){var b=this.B,c=a.content;if(!(a.status!=this.LG||!c||1>c.length)){for(var a=[],e=c[0].data,b=b.oa().wm(),f=0,g=e.length;f<g;f++){var i=e[f][2].replace(nb.tU,"").split(","),i=b.nh(new J(i[0],i[1]));a.push({pt:i,userdata:{name:e[f][0]||"name",size:e[f][4]?e[f][4].split("|"):[10,13],uid:e[f][1]||"",BO:e[f][3]||"sid1"}})}c=c[0].grid.join("_");this.cl[c]=a;this.Bj.push(c);30<this.Bj.length&&(c=this.Bj.shift(),delete this.cl[c], delete c);this.Pu!=this.jq&&(this.xB(),this.cl[this.jq]&&(this.TG(this.cl[this.jq]),this.Pu=this.jq))}},TG:function(a){for(var b=this.B,c=0,e=a.length;c<e;c++){var f=a[c].userdata.size,g=f[0]/2,f=f[1]/2,g=new ib(a[c].pt,{offsets:[f,g,f,g],userData:a[c].userdata});b.Cw(g,this.ub.Fk)}},xB:function(){this.B.dm(this.ub.Fk)},XS:function(a){if(a.spots&&!(1>a.spots.length||a.spots[0].tag!=this.ub.Fk)){this.Hg=a.spots;var b=this,a=this.Hg[0].getUserData().size[0],c="",e=b.B,f="",g=b.ub.eZ;0<this.Hg.length&& (c=this.Hg[0].getUserData().name);if(this.Jg)this.Jg.sa(this.Hg[0].ga()),this.Ig.dd(c),this.Ig.Ze(new O(a,0)),this.Jg.show(),c?this.Ig.show():this.Ig.U();else{var i=this.Hg[0].getUserData().size,f=this.Hg[0].getUserData().BO,k=this.Cf||this.Rn;this.dl=new qc(G.qa+"blank.gif",new O(i[0],i[1]),{anchor:new O(i[0]/2+1,i[1]/2+1)});this.GS(k,f,function(){b.Jg&&b.Jg.Rb(b.dl)});this.Jg=new U(this.Hg[0].ga(),{icon:this.dl,enableMassClear:t});e.Ga(this.Jg);this.Ig=new uc(c,{offset:new O(a,0)});this.Ig.Md({backgroundColor:g.backgroundColor, borderColor:g.borderColor});this.Jg.dn(this.Ig);c?this.Ig.show():this.Ig.U();this.Jg.addEventListener("onclick",function(){if(!(b.Hg.length<1)&&b.Hg[0].getUserData().uid){var a=b.ub,c=a.BY;if(b.Cf)c=a.CY;a=c+b.Hg[0].getUserData().uid+"?scope=2&ak="+a.Vl;b.Cf&&(a=a+("&geotable_id="+b.Cf));var e=(Math.random()*1E5).toFixed(0);!B._rd&&(B._rd={});B._rd["_cbk"+e]=function(a){b.FS(a);delete B._rd["_cbk"+e]};oa(a+("&callback=BMap._rd._cbk"+e))}})}}},FS:function(a){var b=a.content;this.Cf&&(b=a.contents[0]); if(a&&a.status==this.LG&&b){var a={poiId:b.uid||"",databoxId:b.databox_id||"",title:this.Cf?b.title:b.name,address:this.Cf?b.address:b.addr,phoneNumber:b.tel||"",postcode:b.zip||"",provinceCode:1*b.province_id||-1,province:b.province||"",cityCode:1*b.city_id||-1,city:b.city||"",districtCode:1*b.district_id||-1,district:b.district||"",point:this.Cf?new J(b.location[0],b.location[1]):new J(b.longitude,b.latitude),tags:b.tag&&b.tag.replace(nb.wU,"").split(nb.uU),typeId:1*b.cla||-1,extendedData:b.ext|| {}},c=new z.lang.Ju("onhotspotclick");c.customPoi=a;c.content=b;this.dispatchEvent(c)}},WS:function(){this.Jg&&this.Jg.U();this.Ig&&this.Ig.U()},GS:function(a,b,c){var e=this,f=Xc+"?method=getstyle&databox="+a+"&sid="+b,g=(1E5*Math.random()).toFixed(0);if(!e.dl||!(e.dl.databoxid==a&&e.dl.sid==b))!B._rd&&(B._rd={}),B._rd["_cbk"+g]=function(a){var b="";0==a.status&&(b="data:image/png;base64,"+a.content.sid1);0<b.length&&(e.dl.mO(b),c&&c(a));delete B._rd["_cbk"+g]},oa(f+("&callback=BMap._rd._cbk"+g))}}); ');

View File

@@ -0,0 +1 @@
_jsload2&&_jsload2('common', 'z.cookie=z.cookie||{};z.cookie.oI=function(a){return RegExp(\'^[^\\\\x00-\\\\x20\\\\x7f\\\\(\\\\)<>@,;:\\\\\\\\\\\\"\\\\[\\\\]\\\\?=\\\\{\\\\}\\\\/\\\\u0080-\\\\uffff]+$\').test(a)};z.cookie.cY=function(a){return z.cookie.oI(a)&&(a=RegExp("(^| )"+a+"=([^;]*)(;|$)").exec(document.cookie))?a[2]||s:s};z.cookie.get=function(a){a=z.cookie.cY(a);return"string"==typeof a?a=decodeURIComponent(a):s}; z.cookie.vO=function(a,b,c){if(z.cookie.oI(a)){var c=c||{},e=c.qx;"number"==typeof c.qx&&(e=new Date,e.setTime(e.getTime()+c.qx));document.cookie=a+"="+b+(c.path?"; path="+c.path:"")+(e?"; expires="+e.toGMTString():"")+(c.domain?"; domain="+c.domain:"")+(c.i5?"; secure":"")}};z.cookie.set=function(a,b,c){z.cookie.vO(a,encodeURIComponent(b),c)};z.cookie.remove=function(a,b){b=b||{};b.qx=new Date(0);z.cookie.vO(a,"",b)};z.xt=function(a){return/\\d{11}/.test(a)};z.TY=function(a){return/\\d{4}/.test(a)}; z.is=function(){function a(a){a=a.replace(/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i,function(a,b,c,e){return b+b+c+c+e+e});return(a=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(a))?"rgb("+parseInt(a[1],16)+","+parseInt(a[2],16)+","+parseInt(a[3],16)+")":s}var b={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887", cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3", deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6", lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee", mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6", purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}, c={hex:/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,rgb:/rgb\\(\\s*(\\d|\\d\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\s*,\\s*(\\d|\\d\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\s*,\\s*(\\d|\\d\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\s*\\)/,rgba:/rgba\\(\\s*(\\d|\\d\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\s*,\\s*(\\d|\\d\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\s*,\\s*(\\d|\\d\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\s*,\\s*(0|1|0\\.[1-9])\\s*\\)/};return{cK:function(a){if(c.hex.test(a))return a;if(c.rgb.test(a))return a=a.match(c.rgb),"#"+("0"+parseInt(a[1],10).toString(16)).slice(-2)+("0"+parseInt(a[2],10).toString(16)).slice(-2)+ ("0"+parseInt(a[3],10).toString(16)).slice(-2);if(b[a])return b[a]},S3:a,x2:function(a){return c.hex.test(a)?a:b[a]?b[a]:"#000"},AC:function(e,f){f===l&&(f=1);if(c.rgba.test(e))return e;"undefined"!=typeof b[e.toLowerCase()]&&(e=b[e.toLowerCase()]);c.hex.test(e)&&(e=a(e));c.rgb.test(e)?(e=e.replace(/rgb/g,"rgba"),e=e.replace(/\\)/,","+f+")")):e="rgba(0,0,0,1)";return e}}}(); ');

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
_jsload2&&_jsload2('convertor', 'z.extend(lc.prototype,{qQ:function(){for(var a=0,b=this.Pa.length;a<b;a++){var c=this.Pa[a];this[c.method].apply(this,c.arguments)}delete this.Pa},translate:function(a,b,c,e){b=b||1;c=c||5;if(10<a.length)e&&e({status:25});else{var f=B.Wc+"geoconv/v1/?coords=";z.Fb(a,function(a){f+=a.lng+","+a.lat+";"});f=f.replace(/;$/gi,"");f=f+"&from="+b+"&to="+c+"&ak="+qa;oa(f,function(a){if(0===a.status){var b=[];z.Fb(a.result,function(a){b.push(new B.Point(a.x,a.y))});delete a.result;a.points=b}e&&e(a)})}}}); ');

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
_jsload2&&_jsload2('coordtransutils', 'z.extend(eb,{AV:function(a,b,c){var e=S.Eb(a),a=b.fc,e=kc.ZD(b.Ub||"bj",e),e=new J(e.x,e.y),f=b.fa(),f=b.oa().dc(f),b=b.cb(),b=new Q(Math.round((e.lng-a.lng)/f+b.width/2),Math.round((a.lat-e.lat)/f+b.height/2));c&&c(b)},zV:function(a,b,c){var e=b.fa(),e=b.oa().dc(e),f=b.cb(),g=b.fc,b=b.Ub,a=new J(g.lng+e*(a.x-f.width/2),g.lat-e*(a.y-f.height/2)),a=kc.XD(b||"bj",a),a=new J(a.lng,a.lat),a=S.Tb(a);c&&c(a)}}); ');

View File

@@ -0,0 +1 @@
_jsload2&&_jsload2('copyrightctrl', 'z.extend($b.prototype,{zf:function(){this.B&&this.He(this.B)},initialize:function(a){Vb.prototype.initialize.call(this,a);this.Aa();this.uo();this.ba(a);return this.C},ba:function(a){var b=this;a.addEventListener("load",function(){b.uo()});a.addEventListener("moveend",function(){b.uo()});a.addEventListener("zoomend",function(){b.uo()});a.addEventListener("maptypechange",function(){b.C&&(b.C.style.color=b.B.oa().zm())})},Aa:function(){Vb.prototype.Aa.call(this);z.D.Ua(this.C,"BMap_cpyCtrl");var a= this.C.style;a.cursor="default";a.whiteSpace="nowrap";a.MozUserSelect="none";a.color=this.B.oa().zm();a.background="none";a.font="11px/15px "+G.fontFamily;Vb.prototype.Nr.call(this)},uo:function(){if(this.B&&this.C&&0!=this.cc.length)for(var a=0,b=this.cc.length;a<b;a++){this.B.fa();var c=this.B.xb({x:0,y:0}),e=this.B.xb({x:this.B.width,y:this.B.height}),c=new fb(c,e);if(this.cc[a].bounds&&c.ot(this.cc[a].bounds)==s){if(this.C)for(e=0;e<this.C.children.length;e++)if(this.C.children[e].getAttribute("_cid")== this.cc[a].id&&"none"!=this.C.children[e].style.display){this.C.children[e].style.display="none";return}}else if(this.C){for(var c=t,e=0,f=this.C.children.length;e<f;e++)if(this.C.children[e].getAttribute("_cid")==this.cc[a].id){c=q;this.C.children[e].style.display="inline";this.C.children[e].innerHTML!=this.cc[a].content&&(this.C.children[e].innerHTML=this.cc[a].content);break}c||this.Uq(this.cc[a])}}},Bw:function(a){if(a&&Wa(a.id)&&!isNaN(a.id)){var b={bounds:s,content:""},c;for(c in a)b[c]=a[c]; if(a=this.pm(a.id))for(var e in b)a[e]=b[e];else this.cc.push(b);this.uo()}},pm:function(a){for(var b=0,c=this.cc.length;b<c;b++)if(this.cc[b].id==a)return this.cc[b]},PD:w("cc"),qF:function(a){for(var b,c=0,e=this.cc.length;c<e;c++)this.cc[c].id==a&&(b=this.cc.splice(c,1),c--,e=this.cc.length);(a=this.Jd(a))&&a.parentNode&&a.parentNode.removeChild(a);this.uo();return b},Uq:function(a){this.C&&(this.C.innerHTML+="<span _cid=\'"+a.id+"\'>"+a.content+"</span>")},Jd:function(a){var b=Vb.prototype.Jd.call(this); if(Hb(a)){if(b)for(var c=0,e=b.children.length;c<e;c++)if(b.children[c].getAttribute("_cid")==a)return b.children[c]}else return b}});T(wf,{addCopyright:wf.Bw,removeCopyright:wf.qF,getCopyright:wf.pm,getCopyrightCollection:wf.PD}); ');

View File

@@ -0,0 +1 @@
_jsload2&&_jsload2('draw', 'function Ag(){}var Bg=Ag.prototype;Bg.IF=u();Bg.Ao=function(){aa("addLine\\u63a5\\u53e3\\u6ca1\\u6709\\u5b9e\\u73b0")};Bg.setAttribute=function(){aa("setAttribute\\u63a5\\u53e3\\u6ca1\\u6709\\u5b9e\\u73b0")};Bg.ke=function(){aa("setPath\\u63a5\\u53e3\\u6ca1\\u6709\\u5b9e\\u73b0")};Bg.ip=w("Mb");B.jz=Ag; ');

View File

@@ -0,0 +1 @@
_jsload2&&_jsload2('drawbycanvas', 'function Gg(a){this.B=a;this.NQ={strokeweight:"lineWidth",strokecolor:"strokeStyle",fillcolor:"fillStyle",strokeopacity:"globalAlpha",fillopacity:"globalAlpha"};this.Mb="canvas"}Gg.prototype=new B.jz;var Hg=Gg.prototype;Hg.Ao=function(){if(!this.canvas||this.canvas&&!zb(this.canvas)){var a=this.canvas=L("canvas");this.B.Tf().Et.appendChild(a);a.style.position="absolute";a=a.getContext("2d");a.lineCap="round";a.lineJoin="round";a.save();this.zU(this.canvas)}return this.canvas}; Hg.ke=function(a,b,c){if(a&&0!==b[0].length){var e=a.getContext("2d");this.sa(a);var f=parseInt(a.style.top),g=parseInt(a.style.left);e.beginPath();z.mc.Fb(b,function(a){if(0!==a.length){e.moveTo(a[0].x-g,a[0].y-f);for(var b=1,c=a.length;b<c;b++)e.lineTo(a[b].x-g,a[b].y-f)}});this.FR(a,c);"dashed"===c.strokeStyle&&this.HR(e,b,g,f,c)}}; Hg.HR=function(a,b,c,e,f){var g=this;a.beginPath();z.mc.Fb(b,function(b){if(0!==b.length){for(var k=[],m=0,n=b.length;m<n;m++)k.push({x:b[m].x-c,y:b[m].y-e});a.strokeStyle=f.strokeColor||"#3a6bdb";g.GR(a,k,{lineWidth:f.rc||5,interval:2*f.rc||10,lineLength:2*f.rc||10,strokeStyle:g.JS(a.strokeStyle,f.td)})}})}; Hg.GR=function(a,b,c){for(var c=c||{},e=c.Wx||10,f=c.lineWidth||5,g=c.m4||10,c=c.strokeStyle||"#3a6bdb",i=b.length-1,k=0,m=g+e,n=0,o=0;o<i;o++)var p=b[o].x,v=b[o].y,x=b[o+1].x,y=b[o+1].y,n=n+Math.sqrt((x-p)*(x-p)+(y-v)*(y-v));if(n<g)a.strokeStyle=c,a.lineWidth=f,a.lineJoin="round",a.lineCap="round",a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[i].x,b[i].y),a.stroke();else for(n=0;n<i;n++){var p=b[n].x,v=b[n].y,x=b[n+1].x,y=b[n+1].y,o=Math.sqrt((x-p)*(x-p)+(y-v)*(y-v))+k+g,A=m-Math.abs(k);if(k<= m){var E=parseInt(o/m),C=e*(x-p)/o,F=e*(y-v)/o;xMove=g*(x-p)/o;yMove=g*(y-v)/o;startX=p+A*(x-p)/o;startY=v+A*(y-v)/o;tailX=p+(g-Math.abs(k))*(x-p)/o;tailY=v+(g-Math.abs(k))*(y-v)/o;a.beginPath();a.strokeStyle=c;a.lineJoin="round";a.lineCap="round";a.lineWidth=f;D?a.moveTo(D,I):a.moveTo(p,v);0>=k&&a.lineTo(p,v);a.lineTo(tailX,tailY);a.moveTo(startX,startY);D=0;for(I=2*E;D<I;D++)if(D%2)startX+=C,startY+=F,a.moveTo(startX,startY);else{startX+=xMove;startY+=yMove;if(0>(x-startX)*xMove)break;a.lineTo(startX, startY)}a.stroke()}var k=parseInt(o-m*E)-g,D=x-Math.abs(k)*(x-p)/o,I=y-Math.abs(k)*(y-v)/o;n===i-1&&0<k&&(a.beginPath(),a.strokeStyle=c,p=x-k*(x-p)/o,leftY=y-k*(y-v)/o,k<=g?(a.moveTo(p,leftY),a.lineTo(x,y)):(a.moveTo(p,leftY),a.moveTo(p+xMove,leftY+yMove)),a.stroke())}}; Hg.JS=function(a,b){if(4===a.length)var c=parseInt(a.substr(1,1)+a.substr(1,1),16),e=parseInt(a.substr(2,1)+a.substr(2,1),16),f=parseInt(a.substr(3,1)+a.substr(3,1),16);else c=parseInt(a.substr(1,2),16),e=parseInt(a.substr(3,2),16),f=parseInt(a.substr(5,2),16);return c="rgba("+c+","+e+","+f+","+b+")"};Hg.setAttribute=function(a,b,c){if(a){var e=a.getContext("2d"),f=this.Wq(b);try{e[f]=c}catch(g){}a.setAttribute("_"+b,c||"");e.save()}};Hg.Wq=function(a){return this.NQ[a]||a}; Hg.zU=function(a){var b=this.B,c=b.K.lx,e=b.width+2*c,f=b.height+2*c,g=-b.offsetX-c,b=-b.offsetY-c,c=a.getContext("2d"),i={strokeStyle:c.strokeStyle,fillStyle:c.fillStyle,globalAlpha:c.globalAlpha,lineWidth:c.lineWidth,lineCap:"round",lineJoin:"round"};a.setAttribute("width",e);a.setAttribute("height",f);for(var k in i)c[k]=i[k];c.save();a=a.style;a.top=b+"px";a.left=g+"px"};Hg.XQ=function(a){a.clearRect(0,0,9999,9999)}; Hg.FR=function(a,b){var c=a.getContext("2d");c.globalAlpha=a.getAttribute("_fillopacity");0!==c.globalAlpha&&a.getAttribute("_fillcolor")&&c.fill();c.globalAlpha=a.getAttribute("_strokeopacity");0!==c.globalAlpha&&(a.getAttribute("_strokecolor")&&"dashed"!==b.strokeStyle)&&c.stroke()};Hg.sa=function(a){var b=this.B,c=b.K.lx,e=-b.offsetX-c,a=a.style;a.top=-b.offsetY-c+"px";a.left=e+"px"};B.zP=Gg; ');

View File

@@ -0,0 +1 @@
_jsload2&&_jsload2('drawbysvg', 'function Cg(a){this.B=a;this.NG="http://www.w3.org/2000/svg";this.TU={strokeweight:"stroke-width",strokecolor:"stroke",fillcolor:"fill",strokeopacity:"stroke-opacity",fillopacity:"fill-opacity",strokestyle:"stroke-dasharray"};this.hf=this.Zz();this.Mb="svg"}Cg.prototype=new B.jz;var Dg=Cg.prototype; Dg.Zz=function(){var a=this.hf=L("svg",{},this.NG);a.setAttribute("version","1.1");a.setAttribute("type","system");a.style.position="absolute";this.IF();this.B.Tf().Et.appendChild(a);z.M(a,H()?"touchstart":"mousedown",Cb);return a}; Dg.IF=function(){if(this.hf){var a=this.hf,b=this.B,c=b.K.lx,e=b.width+2*c,f=b.height+2*c,g=-b.offsetX-c,b=-b.offsetY-c;this.setAttribute(a,"x",e+"px");this.setAttribute(a,"y",f+"px");this.setAttribute(a,"viewBox",g+" "+b+" "+e+" "+f);a=a.style;a.top=b+"px";a.left=g+"px";a.width=e+"px";a.height=f+"px"}};Dg.H3=w("hf");Dg.setAttribute=function(a,b,c,e){if(a)return"strokestyle"==b&&(c="solid"==c?0:2*e),a.setAttributeNS(s,this.Wq(b),c||"none"),a};Dg.Wq=function(a){return this.TU[a]||a}; Dg.Ao=function(){var a=L("path",{},this.NG);this.setAttribute(a,"stroke-linejoin","round");this.setAttribute(a,"stroke-linecap","round");this.setAttribute(a,"fill-rule","evenodd");this.hf.appendChild(a);return a};Dg.ke=function(a,b){var c=this.tA(b)||"M -9999,-9999";this.setAttribute(a,"d",c)};Dg.tA=function(a){if(0==a.length)return"";var b=[];z.mc.Fb(a,function(a){if(!(2>a.length)){b.push("M "+a[0].x+" "+a[0].y+" L");for(var e=1,f=a.length;e<f;e++)b.push(a[e].x),b.push(a[e].y)}});return b.join(" ")}; B.ZP=Cg; ');

View File

@@ -0,0 +1 @@
_jsload2&&_jsload2('drawbyvml', 'function Eg(a){this.B=a;this.dV={strokeweight:"weight",strokecolor:"color",fillcolor:"color",strokeopacity:"opacity",fillopacity:"opacity",strokestyle:"dashstyle"};this.Mb="vml"}Eg.zK={orange:"#ffa500"};Eg.prototype=new B.jz;var Fg=Eg.prototype; Fg.setAttribute=function(a,b,c){a&&(0==b.indexOf("stroke")?a=a.getElementsByTagName("stroke")[0]:0==b.indexOf("fill")&&(a=a.getElementsByTagName("fill")[0]),0<b.indexOf("color")&&(c?(a.on=q,Eg.zK[c]&&(c=Eg.zK[c])):a.on=t),"strokestyle"==b&&(c="solid"==c?"solid":"4 2 1 2"),"strokeweight"==b&&(c+="px"),a[this.Wq(b)]=c||"")};Fg.Wq=function(a){return this.dV[a]||a};Fg.Ao=function(){return Ab(this.B.Tf().Et,\'<v:shape style="behavior:url(#default#VML);z-index:1;width:1px;height:1px;position:absolute;left:0;top:0;"coordsize="1,1" coordorigin="0,0" filled="t" fillcolor="white"><v:stroke style="behavior:url(#default#VML);" endcap="round" oned="true" /><v:fill style="behavior:url(#default#VML)" /></v:shape>\')}; Fg.ke=function(a,b){this.setAttribute(a,"path",this.tA(b));6==z.ca.ia&&(a.style.display="none",a.style.display="")};Fg.tA=function(a){if(0==a.length)return"";var b=[];z.mc.Fb(a,function(a){if(!(2>a.length)){b.push("m "+a[0].x+" "+a[0].y+" l");for(var e=1,f=a.length;e<f;e++)b.push(a[e].x),b.push(a[e].y);b.push("e")}});return b.join(" ")||" "};B.bQ=Eg; ');

View File

@@ -0,0 +1 @@
_jsload2&&_jsload2('geoctrl', 'z.extend(Zb.prototype,{initialize:function(a){var b=this;Vb.prototype.initialize.call(b,a);b.Aa();b.pr={"default":B.ka+"images/geolocation-control/mobile/default-40x40.png",loading:B.ka+"images/geolocation-control/mobile/loading-40x40.gif",success:B.ka+"images/geolocation-control/mobile/success-40x40.png",fail:B.ka+"images/geolocation-control/mobile/fail-40x40.png"};b.ij=b.C.children[0];b.FD=b.ij.children[0];b.Xo=b.FD.children[0];b.DD=b.ij.children[1];b.vL=b.DD.children[0].children[0];var c;b.B.addEventListener("moveend", function(){if(c){var a=b.B.Ka();a.lng===c.lng&&a.lat===c.lat?b.Lr(b.pr.success):(b.Lr(b.pr["default"]),b.VQ())}});z.M(b.Xo,"click",function(){b.Lr(b.pr.loading);(new Geolocation({timeout:1E4})).getCurrentPosition(function(e){b.Lr(b.pr.success);if(e.address&&b.j.O_){var f="";e.address.city?f+=e.address.city:e.address.province&&(f+=e.address.province);e.address.district&&(f+=e.address.district);e.address.street&&(f+=e.address.street);e.address.street_number&&(f+=e.address.street_number);b.xU(f)}var f= new J(e.longitude,e.latitude),g=new U(f,{icon:b.j.bN?b.j.bN:new qc(B.ka+"images/geolocation-control/point/position-icon-14x14.png",new O(14,14))});c=f;b.GD=f;a.Ga(g);a.Fd(f,15);e.address&&(b.ds={province:e.address.province||"",city:e.address.city||"",district:e.address.district||"",street:e.address.street||"",streetNumber:e.address.street_number||""},Ra(7001,{longitude:e.longitude,latitude:e.latitude,accuracy:e.accuracy}));e=new P("locationSuccess");e.point=b.GD;e.addressComponent=b.ds;b.dispatchEvent(e)}, function(a){b.Lr(b.pr.fail);var c=new P("locationError");c.code=a.errorCode;c.message=a.uk;b.dispatchEvent(c)})});return b.C},location:function(){var a=this;a.I0.push({});(new Geolocation({timeout:1E4})).getCurrentPosition(function(b){a.GD=new J(b.longitude,b.latitude);b.address&&(a.ds={province:b.address.province||"",city:b.address.city||"",district:b.address.district||"",street:b.address.street||"",streetNumber:b.address.street_number||""});b=new P("locationSuccess");b.point=a.GD;b.addressComponent= a.ds;a.dispatchEvent(b)},function(b){var c=new P("locationError");c.code=b.errorCode;c.message=b.uk;a.dispatchEvent(c)})},xX:function(){return this.ds?this.ds:s},sQ:function(){this.B?this.He(this.B):this.map&&this.He(this.map)},Aa:function(){Vb.prototype.Aa.call(this);this.C.style.cssText="height: 32px;";this.C.innerHTML=this.Vq()},Vq:function(){return[\'<div class="BMap_geolocationContainer" style="height: 32px; margin: 0px; box-sizing: border-box; border: 1px solid #d9d7d5; border-radius: 3px; -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2); overflow: hidden;">\', \'<div class="BMap_geolocationIconBackground" style="float: left; width: 32px; height: 32px; background-image: url(\\\'\'+B.ka+"images/geolocation-control/mobile/gradient-bg-1x64.png\'); background-size: 1px 32px; background-repeat: repeat-x;\\">",\'<div class="BMap_geolocationIcon" style="width: 32px; height: 32px; cursor: pointer; background-image: url(\\\'\'+B.ka+"images/geolocation-control/mobile/default-40x40.png\'); background-size: 20px 20px; background-repeat: no-repeat; background-position: center center;\\"></div>", "</div>",\'<div class="BMap_geolocationAddress" style="display: none; float: left; min-width: 50px; padding-left: 10px; padding-right: 10px; border-left: 1px solid #d9d7d5; background-image: url(\'+B.ka+\'images/geolocation-control/mobile/gradient-bg-1x64.png); background-size: 1px 32px; background-repeat: repeat-x;">\',\'<div style="height: 32px; display: table-cell; vertical-align: middle;"><div class="BMap_geolocationAddressText" style="font-size: 12px; color: #666666; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; display: block; min-width: 50px; max-width: 200px;"></div></div></div></div>\'].join("")}, Lr:function(a){this.Xo.style.backgroundImage="url(\'"+a+"\')"},xU:function(a){this.DD.style.display="block";this.vL.textContent=a},VQ:function(){this.vL.textContent="";this.DD.style.display="none"}});Zb.prototype.location=Zb.prototype.location;Zb.prototype.getAddressComponent=Zb.prototype.xX; ');

View File

@@ -0,0 +1 @@
_jsload2&&_jsload2('groundoverlay', 'z.extend(vc.prototype,{ib:function(){if(this.map){this.V||this.Ej();var a=this.map.fa();if(a<this.z.Bs||a>this.z.As)this.U();else{var b=this.z.bb.Ve(),c=this.z.bb.Rf(),a=this.map.Xe(b).x,e=this.map.Xe(c).y,c=this.map.Xe(c).x,b=this.map.Xe(b).y;this.V.style.left=a+"px";this.V.style.top=e+"px";this.V.style.width=c-a+"px";this.V.style.height=b-e+"px";this.show()}}},draw:function(){this.ib()},Ej:function(){if(!this.V){this.V=document.createElement("div");var a=this.V.style;a.cssText="position: absolute; -moz-user-select: none; overflow: hidden;"; a.zIndex=mc.Ck(this.z.bb.Ve().lat);this.z.opacity&&(a.opacity=this.z.opacity,a.filter="alpha(opacity="+100*parseInt(this.z.opacity,10)+")");this.Og=document.createElement("img");this.Og.style.width="100%";this.z.X_&&(this.Og.style.height="100%");this.V.appendChild(this.Og);var b=this;this.Og.onload=function(){b.P1=b.Og.naturalWidth||b.Og.width;b.O1=b.Og.naturalHeight||b.Og.height};this.z.Gm&&(this.Og.src=this.z.Gm);this.map.Tf().KE.appendChild(this.V);b=this;z.M(this.V,"click",function(a){b.dispatchEvent(new P("click"), a)});z.M(this.V,"dblclick",function(a){b.dispatchEvent(new P("dblclick"),a)})}},s_:function(a){this.z.bb=a;this.map&&this.ib();this.V.style.zIndex=mc.Ck(this.z.bb.Ve().lat)},ve:function(){return this.z.bb},HF:function(a){this.z.opacity=a;this.V.style.opacity=a;this.V.style.filter="alpha(opacity="+100*parseInt(a,10)+")"},XX:function(){return this.z.opacity},x_:function(a){this.z.Gm=a;this.Og&&(this.Og.src=a)},KX:function(){return this.z.Gm},p5:function(a){this.z.Bs=a},r3:function(){return this.z.Bs}, o5:function(a){this.z.As=a},q3:function(){return this.z.As}});vc.prototype.setBounds=vc.prototype.s_;vc.prototype.getBounds=vc.prototype.ve;vc.prototype.setOpacity=vc.prototype.HF;vc.prototype.getOpacity=vc.prototype.XX;vc.prototype.setImageURL=vc.prototype.x_;vc.prototype.getImageURL=vc.prototype.KX;vc.prototype.setDispalyOnMinLevel=vc.prototype.n5;vc.prototype.setDispalyOnMaxLevel=vc.prototype.m5; ');

View File

@@ -0,0 +1 @@
_jsload2&&_jsload2('hotspot', 'B.Ye(function(a){function b(a){var b=this.R;b.Qe=[];if(this.Jh)for(var c in this.Jh)if(!(0==c.indexOf("vector_")&&!this.Sb()||0==c.indexOf("tile_")&&this.Sb())){var i=this.Jh[c],k;for(k in i){var m=i[k];if(!(m.Lh>this.fa()||m.Hf<this.fa())){var n=this.$b(m.ga());n.x<this.width&&n.y<this.height&&a.offsetX<n.x+m.Jv[1]&&(a.offsetX>n.x-m.Jv[3]&&a.offsetY>n.y-m.Jv[0]&&a.offsetY<n.y+m.Jv[2])&&b.Qe.push(m)}}}}function c(){a.R.XK&&0<a.R.Qe.length?(a.platform.style.cursor="pointer",a.R.XK=t):(a.R.Qe=[],a.platform.style.cursor= a.K.Vb)}a.R.ju=new uc("",{za:new O(15,-3),Wp:{border:"1px solid #aaa",background:"#fffec2",whiteSpace:"nowrap",font:"12px "+G.fontFamily,mozBoxShadow:"1px 2px 6px #666",webkitBoxShadow:"1px 2px 6px #666",boxShadow:"1px 2px 6px #666",padding:"2px 4px"}});a.addEventListener("mousemove",function(c){if(!(c.fb&&!(c.fb instanceof oc)||c.zb)){var f=this.R,g=f.Qe.slice(0);b.call(this,c);for(var i=f.Qe.slice(0),k=0;k<g.length;k++)for(var m=0;m<i.length;m++)g[k]===i[m]&&(g.splice(k,1),k--,i.splice(m,1),m--); if(0<g.length){var n=new P("onhotspotout");n.spots=g.slice(0);this.dispatchEvent(n)}if(0==f.Qe.length&&!f.$x)this.platform.style.cursor!=this.K.Vb&&(this.platform.style.cursor=this.K.Vb),f.Up&&(clearTimeout(f.Up),f.Up=s),f.QF=setTimeout(function(){f.ju.U()},400);else if(0<i.length&&(this.platform.style.cursor="pointer",n=new P("onhotspotover"),n.spots=i.slice(0),this.dispatchEvent(n),f.Up&&(clearTimeout(f.Up),f.Up=s),f.QF&&(clearTimeout(f.QF),f.QF=s),n.spots[0].eE()))f.Up=setTimeout(function(){f.ju.dd(n.spots[0].eE()); f.ju.sa(c.point);f.ju.show();a.Ga(f.ju)},400)}});a.addEventListener("clickex",function(a){var c=this.R;a.overlay||(0==c.Qe.length&&b.call(this,a),0<c.Qe.length&&(a=new P("onhotspotclick"),a.spots=c.Qe.slice(0),a.spots.sort(function(a,b){return a.ga().lat-b.ga().lat}),this.dispatchEvent(a),c.Qe.length=0))});a.addEventListener("load",c);a.addEventListener("moveend",c);a.addEventListener("zoomend",c);a.addEventListener("dragend",function(){this.R.XK=q})}); ');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
_jsload2&&_jsload2('markeranimation', 'Ic[1]={options:{duration:400},Cm:[{Zb:0,translate:[0,-500],jc:"ease-in"},{Zb:0.5,translate:[0,0],jc:"ease-out"},{Zb:0.75,translate:[0,-20],jc:"ease-in"},{Zb:1,translate:[0,0],jc:"ease-out"}],du:[{Zb:0,translate:[375,-375],jc:"ease-in"},{Zb:0.5,translate:[0,0],jc:"ease-out"},{Zb:0.75,translate:[15,-15],jc:"ease-in"},{Zb:1,translate:[0,0],jc:"ease-out"}]}; Ic[2]={options:{duration:700,loop:vb},Cm:[{Zb:0,translate:[0,0],jc:"ease-out"},{Zb:0.5,translate:[0,-20],jc:"ease-in"},{Zb:1,translate:[0,0],jc:"ease-out"}],du:[{Zb:0,translate:[0,0],jc:"ease-out"},{Zb:0.5,translate:[15,-15],jc:"ease-in"},{Zb:1,translate:[0,0],jc:"ease-out"}]};Ic[3]={options:{duration:200,fP:q},Cm:[{Zb:0,translate:[0,0],jc:"ease-in"},{Zb:1,translate:[0,-20],jc:"ease-out"}],du:[{Zb:0,translate:[0,0],jc:"ease-in"},{Zb:1,translate:[15,-15],jc:"ease-out"}]}; Ic[4]={options:{duration:500,fP:q},Cm:[{Zb:0,translate:[0,-20],jc:"ease-in"},{Zb:0.5,translate:[0,0],jc:"ease-out"},{Zb:0.75,translate:[0,-10],jc:"ease-in"},{Zb:1,translate:[0,-0.0],jc:"ease-out"}],du:[{Zb:0,translate:[15,-15],jc:"ease-in"},{Zb:0.5,translate:[0,0],jc:"ease-out"},{Zb:0.75,translate:[8,-8],jc:"ease-in"},{Zb:1,translate:[0,0],jc:"ease-out"}]}; ');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
_jsload2&&_jsload2('vmlcontext', 'var hg=10,ig=hg/2; function jg(a){this.li=[[1,0,0],[0,1,0],[0,0,1]];this.cN=[];this.TJ=[];this.qk=[];this.lineWidth=1;this.miterLimit=1*hg;this.canvas=a;var b=L("div");b.style.width=a.clientWidth+"px";b.style.height=a.clientHeight+"px";b.style.position="absolute";a.appendChild(b);this.fL=b;this.TM=this.Iw=this.Hw=1;document.styleSheets.canvas_style||(a=document.createStyleSheet(),a.owningElement.id="canvas_style",a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\\\:shape,g_vml_\\\\:fill,g_vml_\\\\:stroke{behavior:url(#default#VML)}")} function kg(a,b){for(var c=[[1,0,0],[0,1,0],[0,0,1]],e=0;3>e;e++)for(var f=0;3>f;f++){for(var g=0,i=0;3>i;i++)g+=a[e][i]*b[i][f];c[e][f]=g}return c}var lg=jg.prototype;lg.clearRect=function(){this.fL.innerHTML=""};lg.beginPath=function(){this.qk=[]};lg.moveTo=function(a,b){var c=this.fi(a,b);this.qk.push({type:"moveTo",x:c.x,y:c.y});this.rs=c.x;this.ss=c.y};lg.lineTo=function(a,b){var c=this.fi(a,b);this.qk.push({type:"lineTo",x:c.x,y:c.y});this.rs=c.x;this.ss=c.y}; lg.bezierCurveTo=function(a,b,c,e,f,g){mg(this,this.fi(a,b),this.fi(c,e),this.fi(f,g))};function mg(a,b,c,e){a.qk.push({type:"bezierCurveTo",oW:b.x,pW:b.y,qW:c.x,rW:c.y,x:e.x,y:e.y});a.rs=e.x;a.ss=e.y}lg.quadraticCurveTo=function(a,b,c,e){a=this.fi(a,b);c=this.fi(c,e);e={x:this.rs+2/3*(a.x-this.rs),y:this.ss+2/3*(a.y-this.ss)};mg(this,e,{x:e.x+(c.x-this.rs)/3,y:e.y+(c.y-this.ss)/3},c)}; lg.arc=function(a,b,c,e,f,g){var c=c*hg,i=a+Math.cos(e)*c-ig,k=b+Math.sin(e)*c-ig,e=a+Math.cos(f)*c-ig,f=b+Math.sin(f)*c-ig;i==e&&!g&&(i+=0.125);a=this.fi(a,b);i=this.fi(i,k);e=this.fi(e,f);this.qk.push({type:g?"at":"wa",x:a.x,y:a.y,wa:c,X0:i.x,Z0:i.y,W0:e.x,Y0:e.y})};lg.rect=function(a,b,c,e){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+e);this.lineTo(a,b+e);this.closePath()}; lg.stroke=function(a){var b=[],c=a?this.fillStyle:this.strokeStyle,e=c.color,c=c.alpha;b.push("<g_vml_:shape",\' filled="\',!!a,\'"\',\' style="position:absolute;width:\',10,"px;height:",10,\'px;"\',\' coordorigin="0 0" coordsize="\',10*hg," ",10*hg,\'"\',\' stroked="\',!a,\'"\',\' path="\');for(var f=s,g=s,i=s,k=s,m=0;m<this.qk.length;m++){var n=this.qk[m];switch(n.type){case "moveTo":b.push(" m ",Math.round(n.x),",",Math.round(n.y));break;case "lineTo":b.push(" l ",Math.round(n.x),",",Math.round(n.y));break;case "close":b.push(" x "); n=s;break;case "bezierCurveTo":b.push(" c ",Math.round(n.oW),",",Math.round(n.pW),",",Math.round(n.qW),",",Math.round(n.rW),",",Math.round(n.x),",",Math.round(n.y));break;case "at":case "wa":b.push(" ",n.type," ",Math.round(n.x-this.Hw*n.wa),",",Math.round(n.y-this.Iw*n.wa)," ",Math.round(n.x+this.Hw*n.wa),",",Math.round(n.y+this.Iw*n.wa)," ",Math.round(n.X0),",",Math.round(n.Z0)," ",Math.round(n.W0),",",Math.round(n.Y0))}if(n){if(f==s||n.x<f)f=n.x;if(i==s||n.x>i)i=n.x;if(g==s||n.y<g)g=n.y;if(k== s||n.y>k)k=n.y}}b.push(\' ">\');a?b.push(\'<g_vml_:fill color="\',e,\'" opacity="\',c,\'" />\'):(a=this.TM*this.lineWidth,1>a&&(c*=a),b.push("<g_vml_:stroke",\' opacity="\',c,\'"\',\' joinstyle="\',this.lineJoin,\'"\',\' miterlimit="\',this.miterLimit,\'"\',\' endcap="\',"square",\'"\',\' weight="\',a,\'px"\',\' color="\',e,\'" />\'));b.push("</g_vml_:shape>");this.fL.insertAdjacentHTML("beforeEnd",b.join(""))};lg.fill=function(){this.stroke(q)};lg.closePath=function(){this.qk.push({type:"close"})}; lg.fi=function(a,b){var c=this.li;return{x:hg*(a*c[0][0]+b*c[1][0]+c[2][0])-ig,y:hg*(a*c[0][1]+b*c[1][1]+c[2][1])-ig}};lg.save=function(){var a={};copyState(this,a);this.TJ.push(a);this.cN.push(this.li);this.li=kg(createMatrixIdentity(),this.li)};lg.restore=function(){copyState(this.TJ.pop(),this);this.li=this.cN.pop()}; function ng(a,b,c){var e;a:{for(e=0;3>e;e++)for(var f=0;2>f;f++)if(!isFinite(b[e][f])||isNaN(b[e][f])){e=t;break a}e=q}e&&(a.li=b,c&&(a.TM=Math.sqrt(Math.abs(b[0][0]*b[1][1]-b[0][1]*b[1][0]))))}lg.translate=function(a,b){ng(this,kg([[1,0,0],[0,1,0],[a,b,1]],this.li),t)};lg.rotate=function(a){var b=Math.cos(a),a=Math.sin(a);ng(this,kg([[b,a,0],[-a,b,0],[0,0,1]],this.li),t)};lg.scale=function(a,b){this.Hw*=a;this.Iw*=b;ng(this,kg([[a,0,0],[0,b,0],[0,0,1]],this.li),q)}; lg.transform=function(a,b,c,e,f,g){ng(this,kg([[a,b,0],[c,e,0],[f,g,1]],this.li),q)};lg.setTransform=function(a,b,c,e,f,g){ng(this,[[a,b,0],[c,e,0],[f,g,1]],q)};B.aQ=jg; ');

View File

@@ -45,7 +45,8 @@ export function eventTrend(data: object) {
// 获取历史暂降事件趋势 // 获取历史暂降事件趋势
export function noDealEventList(data: object) { export function noDealEventList(data: object) {
return service({ return service({
url: "/largescreen/noDealEventList", // url: "/largescreen/noDealEventList",
url: "/largescreen/noDealEventListMessage",
method: "post", method: "post",
data, data,
}); });
@@ -53,7 +54,8 @@ export function noDealEventList(data: object) {
// 处理暂降事件 // 处理暂降事件
export function lookEvent(data: object) { export function lookEvent(data: object) {
return service({ return service({
url: "/largescreen/lookEvent", // url: "/largescreen/lookEvent",
url: "/largescreen/lookMessage",
method: "post", method: "post",
data, data,
}); });
@@ -90,6 +92,15 @@ export function msgHandle(data: object) {
data, data,
}); });
} }
//刷新redis缓存
export function refreshRedis() {
return service({
url: "/accept/refreshIdCache",
method: "get",
});
}
// 地图统计数量 // 地图统计数量
export function mapCount(data: object) { export function mapCount(data: object) {
return service({ return service({
@@ -201,6 +212,23 @@ export function eventPage(data: object) {
data, data,
}); });
} }
// 获取短信模版
export function messageGenerate(data: object) {
return service({
// url: "/accept/messageGenerate",
url: "/accept/messageGenerateByIds",
method: "post",
params: data,
});
}
// 发送短信
export function messageSend(data: object) {
return service({
url: "/accept/messageSend",
method: "post",
data,
});
}
// 导出暂降事件列表 // 导出暂降事件列表
export function eventPageExport(data: object) { export function eventPageExport(data: object) {
return service({ return service({
@@ -303,3 +331,12 @@ export function exportLineData() {
responseType: "blob", responseType: "blob",
}); });
} }
// 无锡地图查询
export function stationMap(data: object) {
return service({
url: "/scale/stationMap",
method: "post",
data,
});
}

BIN
src/assets/bdz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1,101 +1,101 @@
:deep(.el-dialog__body) { :deep(.el-dialog__body) {
color: #fff !important; color: #fff !important;
padding: 10px; padding: 10px;
} }
:deep(.el-form-item__label) { :deep(.el-form-item__label) {
color: #fff !important; color: #fff !important;
} }
:deep(.el-dialog__header) { :deep(.el-dialog__header) {
padding: 10px; padding: 10px;
background-color: #21232b; background-color: #21232b;
border-bottom: 1px solid #fff; border-bottom: 1px solid #fff;
} }
:deep(.el-dialog__footer) { :deep(.el-dialog__footer) {
padding: 0 10px 10px !important; padding: 0 10px 10px !important;
} }
:deep(.el-descriptions__label.el-descriptions__cell) { :deep(.el-descriptions__label.el-descriptions__cell) {
background: #0a73ff40 !important; background: #0a73ff40 !important;
color: #fff !important; color: #fff !important;
font-weight: bold; font-weight: bold;
} }
:deep(.el-descriptions) { :deep(.el-descriptions) {
--el-descriptions-table-border: 1px solid #0a73ff; --el-descriptions-table-border: 1px solid #0a73ff;
.el-descriptions__content.el-descriptions__cell.is-bordered-content { .el-descriptions__content.el-descriptions__cell.is-bordered-content {
color: #fff;
}
.el-descriptions__body {
background-color: #00000050;
}
}
:deep(.tableBox) {
padding: 10px;
.el-table {
--el-table-border-color: #0a73ff;
--el-table-row-hover-bg-color: #0a73ff20;
--el-table-header-bg-color: #0a73ff40;
--el-table-bg-color: #ffffff00;
text-align: center;
// th {
// background-color: #0a73ff;
// color: #fff;
// }
tr {
background-color: #00000050 !important;
color: #fff;
}
}
}
:deep(
.el-table--striped
.el-table__body
tr.el-table__row--striped
td.el-table__cell
) {
background: #5aa1ff29;
}
.titles {
display: flex;
align-items: center;
text-align: center;
margin-left: 20px;
div {
background-color: #0a73ff70;
color: #ccc;
cursor: pointer;
&:nth-child(1) {
margin-right: 10px;
}
}
.titleClick {
background-color: #0a73ff;
color: #fff;
}
}
:deep(.el-dialog) {
--el-dialog-bg-color: #343849c7 !important;
padding: 0px;
--el-dialog-margin-top: 8vh;
.el-dialog__title,
.el-dialog__close {
color: #fff;
}
}
:deep(.el-drawer) {
--el-drawer-bg-color: #343849c7;
color: #fff; color: #fff;
.el-drawer__header {
// background-color: #21232b;
background-color: #9f1700;
}
} }
:deep(.el-pagination) { .el-descriptions__body {
.el-pagination__total, background-color: #00000050;
.el-pagination__goto, }
.el-pagination__classifier { }
:deep(.tableBox) {
padding: 10px;
.el-table {
--el-table-border-color: #0a73ff;
--el-table-row-hover-bg-color: #0a73ff20;
--el-table-header-bg-color: #0a73ff40;
--el-table-bg-color: #ffffff00;
text-align: center;
// th {
// background-color: #0a73ff;
// color: #fff;
// }
tr {
background-color: #00000050 !important;
color: #fff; color: #fff;
} }
// --el-text-color-regular: #fff;
} }
}
:deep(
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell
) {
background: #5aa1ff29 ;
}
.titles {
display: flex;
align-items: center;
text-align: center;
margin-left: 20px;
div {
background-color: #0a73ff70;
color: #ccc;
cursor: pointer;
&:nth-child(1) {
margin-right: 10px;
}
}
.titleClick {
background-color: #0a73ff;
color: #fff;
}
}
:deep(.el-dialog) {
--el-dialog-bg-color: #343849c7 !important;
padding: 0px;
--el-dialog-margin-top: 8vh;
.el-dialog__title,
.el-dialog__close {
color: #fff;
}
}
:deep(.el-drawer) {
--el-drawer-bg-color: #343849c7;
color: #fff;
.el-drawer__header {
// background-color: #21232b;
background-color: #9f1700;
}
}
:deep(.el-pagination) {
.el-pagination__total,
.el-pagination__goto,
.el-pagination__classifier {
color: #fff;
}
// --el-text-color-regular: #fff;
}
:deep(.el-table__body tr.current-row > td.el-table__cell) {
background-color: #456a91de !important;
}

View File

@@ -1,5 +1,5 @@
<template> <template>
<div style="width: 540px"> <div :style="{ width: showTime ? '640px' : '540px' }">
<el-select <el-select
v-model="interval" v-model="interval"
style="min-width: 70px; width: 70px; margin-right: 10px" style="min-width: 70px; width: 70px; margin-right: 10px"
@@ -17,16 +17,17 @@
<el-date-picker <el-date-picker
v-model="timeValue" v-model="timeValue"
size="small" size="small"
type="daterange" :type="showTime ? 'datetimerange' : 'daterange'"
:disabled="disabledPicker" :disabled="disabledPicker"
:disabled-date="isFutureDate" :disabled-date="isFutureDate"
style="width: 190px; margin-right: 10px" :style="{ width: showTime ? '305px' : '200px', marginRight: '10px' }"
unlink-panels unlink-panels
:clearable="false" :clearable="false"
range-separator="" range-separator=""
start-placeholder="开始日期" :start-placeholder="showTime ? '开始时间' : '开始日期'"
end-placeholder="结束日期" :end-placeholder="showTime ? '结束时间' : '结束日期'"
value-format="YYYY-MM-DD" :value-format="showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'"
:default-time="showTime ? defaultTimeRange : undefined"
:shortcuts="shortcuts" :shortcuts="shortcuts"
/> />
<el-button <el-button
@@ -58,14 +59,42 @@ const emit = defineEmits(["timeChangeInfo"]);
interface Props { interface Props {
nextFlag?: boolean; nextFlag?: boolean;
theCurrentTime?: boolean; theCurrentTime?: boolean;
setWatch?: boolean;
showTime?: boolean;
defaultInterval?: number;
} }
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
nextFlag: false, nextFlag: false,
theCurrentTime: true, theCurrentTime: true,
setWatch: true,
showTime: false,
defaultInterval: 3,
}); });
const interval = ref(3); const START_TIME_SUFFIX = " 00:00:00";
const END_TIME_SUFFIX = " 23:59:59";
const defaultTimeRange = [
new Date(2000, 0, 1, 0, 0, 0),
new Date(2000, 0, 1, 23, 59, 59),
];
const getDatePart = (val: string) => (val || "").substring(0, 10);
const formatRangeValue = (start: string, end: string): [string, string] => {
const startDate = getDatePart(start);
const endDate = getDatePart(end);
if (!props.showTime) {
return [startDate, endDate];
}
return [`${startDate}${START_TIME_SUFFIX}`, `${endDate}${END_TIME_SUFFIX}`];
};
const setRangeValue = (start: string, end: string) => {
timeValue.value = formatRangeValue(start, end);
};
const interval = ref(props.defaultInterval);
const timeFlag = ref(1); const timeFlag = ref(1);
const count = ref(0); const count = ref(0);
const disabledPicker = ref(true); const disabledPicker = ref(true);
@@ -112,7 +141,8 @@ const isFutureDate = (time: any) => {
return time && time > Date.now(); return time && time > Date.now();
}; };
onMounted(() => { onMounted(() => {
timeChange(3); interval.value = props.defaultInterval;
timeChange(props.defaultInterval);
}); });
// 选择时间范围 // 选择时间范围
const timeChange = (e: number) => { const timeChange = (e: number) => {
@@ -122,13 +152,13 @@ const timeChange = (e: number) => {
if (e == 1) { if (e == 1) {
disabledPicker.value = true; disabledPicker.value = true;
timeValue.value = [setTime(1), setTime()]; setRangeValue(setTime(1), setTime());
} else if (e == 2) { } else if (e == 2) {
disabledPicker.value = true; disabledPicker.value = true;
timeValue.value = [setTime(2), setTime()]; setRangeValue(setTime(2), setTime());
} else if (e == 3) { } else if (e == 3) {
disabledPicker.value = true; disabledPicker.value = true;
timeValue.value = [setTime(3), setTime()]; setRangeValue(setTime(3), setTime());
} else if (e == 4) { } else if (e == 4) {
let year = parseInt(setTime().substring(0, 4)); let year = parseInt(setTime().substring(0, 4));
let month = parseInt(setTime().substring(5, 7)); let month = parseInt(setTime().substring(5, 7));
@@ -138,12 +168,12 @@ const timeChange = (e: number) => {
var dayOfWeek = start.getDay() == 0 ? 7 : start.getDay() - 1; // 如果为周日则置为7天 var dayOfWeek = start.getDay() == 0 ? 7 : start.getDay() - 1; // 如果为周日则置为7天
disabledPicker.value = true; disabledPicker.value = true;
timeValue.value = [setTime(0, dayOfWeek), setTime(0, -6 + dayOfWeek)]; setRangeValue(setTime(0, dayOfWeek), setTime(0, -6 + dayOfWeek));
} else if (e == 5) { } else if (e == 5) {
disabledPicker.value = false; disabledPicker.value = false;
backDisabled.value = true; backDisabled.value = true;
preDisabled.value = props.nextFlag ? false : true; preDisabled.value = props.nextFlag ? false : true;
timeValue.value = [setTime(), setTime()]; setRangeValue(setTime(), setTime());
} }
if (e == 1 || e == 2) { if (e == 1 || e == 2) {
timeFlag.value = 0; timeFlag.value = 0;
@@ -160,8 +190,8 @@ const nowTime = () => {
// 上一个 // 上一个
const preClick = () => { const preClick = () => {
preDisabled.value = false; preDisabled.value = false;
let startTime = timeValue.value[0]; let startTime = getDatePart(timeValue.value[0]);
let endTime = timeValue.value[1]; let endTime = getDatePart(timeValue.value[1]);
let year = parseInt(startTime.substring(0, 4)); let year = parseInt(startTime.substring(0, 4));
let month = parseInt(startTime.substring(5, 7)); let month = parseInt(startTime.substring(5, 7));
let date = parseInt(startTime.substring(8, 10)); let date = parseInt(startTime.substring(8, 10));
@@ -213,7 +243,7 @@ const preClick = () => {
startTime = year + "-01-01"; startTime = year + "-01-01";
endTime = year + "-12-31"; endTime = year + "-12-31";
} }
timeValue.value = [startTime, endTime]; setRangeValue(startTime, endTime);
// 判断向后键的状态 // 判断向后键的状态
// var temp = NowgetEndTime() // var temp = NowgetEndTime()
@@ -222,8 +252,8 @@ const preClick = () => {
//下一个 //下一个
const next = () => { const next = () => {
//向后 //向后
let startTime = timeValue.value[0]; let startTime = getDatePart(timeValue.value[0]);
let endTime = timeValue.value[1]; let endTime = getDatePart(timeValue.value[1]);
let year = parseInt(startTime.substring(0, 4)); let year = parseInt(startTime.substring(0, 4));
let month = parseInt(startTime.substring(5, 7)); let month = parseInt(startTime.substring(5, 7));
let date = parseInt(startTime.substring(8, 10)); let date = parseInt(startTime.substring(8, 10));
@@ -442,7 +472,7 @@ const next = () => {
} }
if (!props.nextFlag) { if (!props.nextFlag) {
if ( if (
new Date(endTime + " 00:00:00").getTime() >= new Date(getDatePart(endTime) + " 00:00:00").getTime() >=
new Date( new Date(
(window as any).XEUtils.toDateString(new Date(), "yyyy-MM-dd ") + (window as any).XEUtils.toDateString(new Date(), "yyyy-MM-dd ") +
" 00:00:00" " 00:00:00"
@@ -452,7 +482,7 @@ const next = () => {
} }
} }
timeValue.value = [startTime, endTime]; setRangeValue(startTime, endTime);
}; };
const setTime = (flag = 0, e = 0) => { const setTime = (flag = 0, e = 0) => {
@@ -538,6 +568,16 @@ const setTheDate = (value: any) => {
timeChange(value); timeChange(value);
}; };
const applyCustomRange = (start: string, end: string) => {
interval.value = 5;
disabledPicker.value = false;
backDisabled.value = true;
preDisabled.value = props.nextFlag ? false : true;
count.value = 0;
timeFlag.value = 1;
setRangeValue(start, end);
};
// 获取时间范围的同比 // 获取时间范围的同比
function getYearOnYear(startDate: string, endDate: string): [string, string] { function getYearOnYear(startDate: string, endDate: string): [string, string] {
const startYearAgo = new Date(startDate); const startYearAgo = new Date(startDate);
@@ -573,8 +613,10 @@ function formatDate(date: Date): string {
} }
watch(timeValue, async (newVal) => { watch(timeValue, async (newVal) => {
await store.dispatch("setTimeType", { type: interval, value: newVal }); if (props.setWatch) {
await emit("timeChangeInfo"); await store.dispatch("setTimeType", { type: interval, value: newVal });
await emit("timeChangeInfo");
}
}); });
defineExpose({ defineExpose({
@@ -583,9 +625,13 @@ defineExpose({
timeFlag, timeFlag,
setTimeOptions, setTimeOptions,
setTheDate, setTheDate,
applyCustomRange,
getYearOnYear, getYearOnYear,
getMonthOnMonth, getMonthOnMonth,
timeChange, timeChange,
setRangeValue,
formatRangeValue,
getDatePart,
}); });
</script> </script>

View File

@@ -58,7 +58,6 @@ export default createStore({
state.count++; state.count++;
}, },
[Mutations.SET_STATE](state: State, data: any) { [Mutations.SET_STATE](state: State, data: any) {
console.log("🚀 ~ data:", data)
state[data.key] = data.value; state[data.key] = data.value;
}, },
[Mutations.SET_TOKEN](state: State, data: any) { [Mutations.SET_TOKEN](state: State, data: any) {

View File

@@ -5,7 +5,7 @@ import store from "@/store/index";
const service = axios.create({ const service = axios.create({
baseURL: "/api", baseURL: "/api",
timeout: 60 * 1000, timeout: 60 * 1000 * 3,
headers: { "Content-Type": "application/json;charset=utf-8" }, headers: { "Content-Type": "application/json;charset=utf-8" },
}); });
@@ -143,7 +143,7 @@ service.interceptors.response.use(
}); });
} }
} else { } else {
return Promise.reject(res.data); return Promise.reject(res.data||res.data.message);
} }
}, },
(error) => { (error) => {

View File

@@ -10,7 +10,7 @@ class HttpRequest {
getInsideConfig() { getInsideConfig() {
const config = { const config = {
baseURL: this.baseUrl, // 所有的请求地址前缀部分(没有后端请求不用写) baseURL: this.baseUrl, // 所有的请求地址前缀部分(没有后端请求不用写)
timeout: 80000, // 请求超时时间(毫秒) timeout: 60 * 1000 * 3, // 请求超时时间(毫秒)
}; };
return config; return config;
} }

View File

@@ -58,7 +58,7 @@ export default class SocketService {
setTimeout(() => { setTimeout(() => {
//"ws://10.156.193.182:18093/ws/screen" 北京 //"ws://10.156.193.182:18093/ws/screen" 北京
//"ws://192.168.1.130:19001/ws/askRealTimeData/" 无锡 //"ws://192.168.1.130:19001/ws/askRealTimeData/" 无锡
const url = (mqttUrl || "ws://192.168.1.127:19001/ws/") + id; const url = (mqttUrl || "ws://192.168.2.130:18093/ws/") + id;
// const url = (mqttUrl || "ws://192.168.1.63:18093/ws/screen") + id; // const url = (mqttUrl || "ws://192.168.1.63:18093/ws/screen") + id;
console.log("🚀 ~ SocketService ~ connect ~ url:", url); console.log("🚀 ~ SocketService ~ connect ~ url:", url);
this.ws = new WebSocket(url); this.ws = new WebSocket(url);
@@ -126,7 +126,7 @@ export default class SocketService {
const url = window.URL.createObjectURL( const url = window.URL.createObjectURL(
new Blob([ new Blob([
"(function(e){setInterval(function(){this.postMessage(null)},30000)})()", "(function(e){setInterval(function(){this.postMessage(null)},30000)})()",
]) ]),
); );
this.workerBlobUrl = url; this.workerBlobUrl = url;
this.work = new Worker(url); this.work = new Worker(url);
@@ -175,7 +175,7 @@ export default class SocketService {
// 回调函数的注册 // 回调函数的注册
public registerCallBack( public registerCallBack(
socketType: string, socketType: string,
callBack: (message: MessageType) => void callBack: (message: MessageType) => void,
): void { ): void {
this.callBackMapping[socketType] = callBack; this.callBackMapping[socketType] = callBack;
} }

View File

@@ -2,16 +2,16 @@
<div v-loading="loading" element-loading-background="#343849c7"> <div v-loading="loading" element-loading-background="#343849c7">
<div class="iconBox"> <div class="iconBox">
<div class="div"> <div class="div">
<img src="@/assets/jcd.png" alt="" /> <img src="@/assets/bdz.png" alt="" />
<span>变电站</span> <span>变电站</span>
</div> </div>
<div class="div"> <!-- <div class="div">
<img src="@/assets/img/txzcwzj.png" alt="" /> <img src="@/assets/img/txzcwzj.png" alt="" />
<span>监测点</span> <span>监测点</span>
</div> </div> -->
</div> </div>
<div class="bmSelect"> <!-- <div class="bmSelect">
<el-select <el-select
v-model="value" v-model="value"
@change="setIcon" @change="setIcon"
@@ -28,7 +28,7 @@
:value="item.stationName" :value="item.stationName"
/> />
</el-select> </el-select>
</div> </div> -->
<div> <div>
<baidu-map <baidu-map
@@ -45,26 +45,26 @@
:double-click-zoom="false" :double-click-zoom="false"
> >
<!-- 线--> <!-- 线-->
<div v-if="zoom > 13"> <!-- <div v-if="zoom > 13">
<bm-polyline <bm-polyline
:path="path" :path="path"
v-for="(path, index) in polyline" v-for="(path, index) in polyline"
:key="index" :key="index"
></bm-polyline> ></bm-polyline>
</div> </div> -->
<!-- 变电站--> <!-- 变电站-->
<template v-if="zoom > 13"> <template>
<bm-marker <bm-marker
:position="path" :position="path"
v-for="path in siteList" v-for="path in siteList"
:key="path.subId" :key="path.subId"
:icon="path.icon" :icon="path.icon"
@click="markerClick(path)" @click="pointClick(path)"
></bm-marker> ></bm-marker>
</template> </template>
<!-- --> <!-- -->
<div maxZoom="12"> <!-- <div maxZoom="12">
<bm-marker <bm-marker
:position="path" :position="path"
v-for="path in areaLineInfo" v-for="path in areaLineInfo"
@@ -72,7 +72,7 @@
:icon="path.icon" :icon="path.icon"
@click="pointClick(path)" @click="pointClick(path)"
></bm-marker> ></bm-marker>
</div> </div> -->
<bm-marker <bm-marker
:position="infoWindowPoint" :position="infoWindowPoint"
:icon="{ url: '1', size: { width: 0, height: 0 } }" :icon="{ url: '1', size: { width: 0, height: 0 } }"
@@ -89,7 +89,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, nextTick, onMounted } from "vue"; import { ref, reactive, nextTick, onMounted } from "vue";
import { substationCount } from "@/api/statistics/index"; import { stationMap } from "@/api/statistics/index";
import { useStore } from "vuex"; import { useStore } from "vuex";
// import { BmlMarkerClusterer } from "vue-baidu-map-3x"; // import { BmlMarkerClusterer } from "vue-baidu-map-3x";
const emit = defineEmits(["pointClick"]); const emit = defineEmits(["pointClick"]);
@@ -129,7 +129,7 @@ const handler = async ({ BMap, map }: any) => {
const markerClick = (e: any) => { const markerClick = (e: any) => {
zoom.value = 15; zoom.value = 15;
infoWindowPoint.value = e; infoWindowPoint.value = e;
infoWindowPoint.value.show = true; // infoWindowPoint.value.show = true;
center.value.lng = 120.124367; center.value.lng = 120.124367;
center.value.lat = 31.555421; center.value.lat = 31.555421;
@@ -150,87 +150,87 @@ const init = () => {
polyline.value = []; polyline.value = [];
dataList.value = []; dataList.value = [];
areaLineInfo.value = []; areaLineInfo.value = [];
// substationCount({ stationMap({
// deptId: store.state.deptId, deptId: store.state.deptId,
// type: store.state.timeType, type: store.state.timeType,
// startTime: store.state.timeValue[0], startTime: store.state.timeValue[0],
// endTime: store.state.timeValue[1], endTime: store.state.timeValue[1],
// }).then((res: any) => { }).then((res: any) => {
// dataList.value = res.data; dataList.value = res.data;
dataList.value = [ // dataList.value = [
{ // {
stationId: 156, // stationId: 156,
stationName: "110kV北京电视台变", // stationName: "110kV北京电视台变",
gdName: "检修分公司", // gdName: "检修分公司",
longitude: 120.33, // longitude: 120.33,
latitude: 31.52, // latitude: 31.52,
lineCount: 1, // lineCount: 1,
eventCount: 1, // eventCount: 1,
lineEventDetails: [ // lineEventDetails: [
{ // // {
gdName: "检修分公司", // // gdName: "检修分公司",
pictureId: "5debb8bd0ce26527675eedffd74a3198", // // pictureId: "5debb8bd0ce26527675eedffd74a3198",
pictureName: "无锡线上", // // pictureName: "无锡线上",
}, // // },
{ // {
gdName: "检修分公司", // gdName: "检修分公司",
pictureId: "35b1301833e3fdfc872b1a27a17c7245", // pictureId: "35b1301833e3fdfc872b1a27a17c7245",
pictureName: "无锡修改1011--工程部", // pictureName: "无锡修改1011--工程部",
}, // },
], // ],
}, // },
]; // ];
let data = dataList.value; let data = dataList.value;
let r = 0.0035; let r = 0.0035;
let list = data.filter((item: any) => item.latitude != 0); let list = data.filter((item: any) => item.lat != 0);
list.forEach((item: any) => { list.forEach((item: any) => {
// 变电站图标 // 变电站图标
item.icon = { item.icon = {
url: new URL("@/assets/jcd.png", import.meta.url).href, url: new URL("@/assets/bdz.png", import.meta.url).href,
size: { size: {
width: 40, width: 40,
height: 40, height: 40,
}, },
}; };
if ( // if (
item.lineEventDetails?.length > 10 && // item.lineEventDetails?.length > 10 &&
item.lineEventDetails?.length < 100 // item.lineEventDetails?.length < 100
) { // ) {
r = 0.0055; // r = 0.0055;
} else if (item.lineEventDetails.length >= 100) { // } else if (item.lineEventDetails.length >= 100) {
r = 0.01055; // r = 0.01055;
} // }
item.lng = item.longitude; // item.lng = item.longitude;
item.lat = item.latitude; // item.lat = item.latitude;
item.lineEventDetails.forEach((val: any, i: number) => { // item.lineEventDetails.forEach((val: any, i: number) => {
val.lng = // val.lng =
item.longitude + // item.longitude +
r * Math.cos((2 * Math.PI * i) / item.lineEventDetails.length); // r * Math.cos((2 * Math.PI * i) / item.lineEventDetails.length);
val.lat = // val.lat =
item.latitude + // item.latitude +
r * Math.sin((2 * Math.PI * i) / item.lineEventDetails.length); // r * Math.sin((2 * Math.PI * i) / item.lineEventDetails.length);
// 监测点图标 // // 监测点图标
val.icon = { // val.icon = {
url: new URL("@/assets/img/txzcwzj.png", import.meta.url).href, // url: new URL("@/assets/img/txzcwzj.png", import.meta.url).href,
size: { // size: {
width: 40, // width: 40,
height: 40, // height: 40,
}, // },
}; // };
polyline.value.push([ // polyline.value.push([
{ // {
lng: item.lng, // lng: item.lng,
lat: item.lat, // lat: item.lat,
}, // },
{ // {
lng: val.lng, // lng: val.lng,
lat: val.lat, // lat: val.lat,
}, // },
]); // ]);
}); // });
areaLineInfo.value.push(...item.lineEventDetails); // areaLineInfo.value.push(...item.lineEventDetails);
}); });
siteList.value = list; siteList.value = list;
@@ -239,7 +239,7 @@ const init = () => {
setTimeout(() => { setTimeout(() => {
loading.value = false; loading.value = false;
}, 0); }, 0);
// }); });
}; };
const moveenFlag = ref(true); const moveenFlag = ref(true);
@@ -268,11 +268,11 @@ const checkMapData = () => {
console.warn("当前区域无离线地图数据,将返回默认位置"); console.warn("当前区域无离线地图数据,将返回默认位置");
// 使用正确的BMap.Point创建方式 // 使用正确的BMap.Point创建方式
const point = new BMapInstance.value.Point(116.404367, 39.915421); const point = new BMapInstance.value.Point(120.124367,31.555421);
// 平滑移动并设置合适缩放级别 // 平滑移动并设置合适缩放级别
mapInstance.value.panTo(point); mapInstance.value.panTo(point);
mapInstance.value.setZoom(12); mapInstance.value.setZoom(11);
// zoom.value = 12; // zoom.value = 12;
} }
} catch (error) { } catch (error) {
@@ -344,6 +344,7 @@ onMounted(() => {
defineExpose({ defineExpose({
setIcon, setIcon,
init
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -362,9 +363,9 @@ defineExpose({
position: absolute; position: absolute;
bottom: 10px; bottom: 10px;
left: 10px; left: 10px;
z-index: 2000; z-index: 1;
width: 110px; width: 110px;
height: 70px; height: 40px;
padding: 10px; padding: 10px;
background: #ffffff10 !important; background: #ffffff10 !important;
border: 1px solid #ccc; border: 1px solid #ccc;

View File

@@ -494,8 +494,8 @@ const generateFn = async () => {
loading1.value = true; loading1.value = true;
await getDynamicData({ await getDynamicData({
lineId: dotList.value.id, lineId: dotList.value.id,
searchBeginTime: tabList.value[activeName.value].time[0], searchBeginTime: time.value[0],
searchEndTime: tabList.value[activeName.value].time[1], searchEndTime: time.value[1],
time: tabList.value[activeName.value].key, time: tabList.value[activeName.value].key,
type: form.type, type: form.type,
userDataId: form.loadDataId, userDataId: form.loadDataId,

View File

@@ -623,6 +623,7 @@ watch(flag, (newVal) => {
setTimeout(() => { setTimeout(() => {
if (flag.value == 0) { if (flag.value == 0) {
initHasEventList(); initHasEventList();
// flag 变化后重新绑定事件 // flag 变化后重新绑定事件
bindRankingClickEvent(); bindRankingClickEvent();
} }
@@ -635,6 +636,29 @@ watch(flag, (newVal) => {
} }
}, 100); }, 100);
}); });
watch(
() => store.state.showMap,
(newVal) => {
if (newVal) {
return;
}
setTimeout(() => {
if (flag.value == 0) {
initHasEventList();
// flag 变化后重新绑定事件
bindRankingClickEvent();
}
if (flag.value == 2) {
renderChart2();
initHasUpEventList();
}
if (flag.value == 1) {
callHarmOneImageApi(getFirstTableData.value, getTimes.value);
}
}, 100);
}
);
// 暂降记录个数 // 暂降记录个数
const initialData = () => { const initialData = () => {
@@ -688,11 +712,9 @@ const initialAggregation = () => {
tableData.splice(0, tableData.length); tableData.splice(0, tableData.length);
}); });
}; };
const interval = ref(null);
// 提取发送消息到iframe的公共方法 // 提取发送消息到iframe的公共方法
const sendMessageToIframe = (type: string, payload: any) => { const sendMessageToIframe = (type: string, payload: any) => {
// console.log(123,store.state.iframeLoad);
// window.parent.postMessage( // window.parent.postMessage(
// { // {
// type, // type,
@@ -701,6 +723,10 @@ const sendMessageToIframe = (type: string, payload: any) => {
// "*" // "*"
// ); // );
// 如果 iframe 已加载完成,直接发送消息 // 如果 iframe 已加载完成,直接发送消息
if (store.state.showMap) {
return;
}
if (store.state.iframeLoad) { if (store.state.iframeLoad) {
window.parent.postMessage( window.parent.postMessage(
{ {
@@ -711,9 +737,13 @@ const sendMessageToIframe = (type: string, payload: any) => {
); );
return; return;
} }
if (interval.value) {
clearInterval(interval.value);
interval.value = null;
}
// 如果未加载完成,每 1 秒尝试发送一次 // 如果未加载完成,每 1 秒尝试发送一次
const interval = setInterval(() => { interval.value = setInterval(() => {
console.log("等待 iframe 加载1 秒后重试..."); console.log("等待 iframe 加载1 秒后重试...");
if (store.state.iframeLoad) { if (store.state.iframeLoad) {
// 加载完成后发送消息并清除定时器 // 加载完成后发送消息并清除定时器
@@ -724,7 +754,7 @@ const sendMessageToIframe = (type: string, payload: any) => {
}, },
"*" // 建议替换为具体域名 "*" // 建议替换为具体域名
); );
clearInterval(interval); clearInterval(interval.value);
} }
}, 1000); }, 1000);
}; };
@@ -937,7 +967,7 @@ const initialResponsibilityList = () => {
// 根据实际字段进行拼接,示例: // 根据实际字段进行拼接,示例:
const content = `${item.lineName || ""}进行${ const content = `${item.lineName || ""}进行${
item.dataTimes || "" item.dataTimes || ""
}次谐波电压溯源,溯源对象:${item.userDataName || ""}`.trim(); }次谐波电压溯源,溯源对象:${item.userDataName || "系统测点"}`.trim();
return { return {
...item, ...item,
content: content, content: content,
@@ -1267,7 +1297,7 @@ const handleChildClose = () => {
const init = () => { const init = () => {
initialData(); initialData();
initialAggregation(); initialAggregation();
initHasEventList(); // initHasEventList();
initialResponsibilityList(); initialResponsibilityList();
// getInfoListAmplify(); // getInfoListAmplify();
tableInfoAmplify(); tableInfoAmplify();

View File

@@ -20,6 +20,7 @@
v-model="form.userList" v-model="form.userList"
:data="dataTree" :data="dataTree"
multiple multiple
filterable filterable
show-checkbox show-checkbox
ref="treeRef" ref="treeRef"
@@ -46,6 +47,7 @@
v-model="form.index" v-model="form.index"
filterable filterable
multiple multiple
:multiple-limit="5" :multiple-limit="5"
collapse-tags collapse-tags
collapse-tags-tooltip collapse-tags-tooltip
@@ -553,11 +555,13 @@ const generateFn = async () => {
return ElMessage.warning("请选择用采用户"); return ElMessage.warning("请选择用采用户");
} }
loading1.value = true; loading1.value = true;
console.log("🚀 ~ generateFn ~ dotList.value:", dotList.value.id, tabList.value);
await getDynamicData({ await getDynamicData({
userDataId: "123", userDataId: "123",
lineId: dotList.value.id, lineId: dotList.value.id,
searchBeginTime: tabList.value[activeName.value].time[0], searchBeginTime: time.value[0],
searchEndTime: tabList.value[activeName.value].time[1], searchEndTime: time.value[1],
time: tabList.value[activeName.value].key, time: tabList.value[activeName.value].key,
type: form.type, type: form.type,
userList: form.userList, userList: form.userList,

View File

@@ -1,6 +1,6 @@
<template> <template>
<!-- 项目管理弹框 --> <!-- 项目管理弹框 -->
<el-dialog v-model="dialogVisible" title="项目管理" width="1600px"> <el-dialog v-model="dialogVisible" title="项目管理" width="1600px" @close="handleDialogClose">
<!-- <el-card class="transparent-card"> --> <!-- <el-card class="transparent-card"> -->
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
<div> <div>
@@ -65,22 +65,9 @@
<Edit @click="editd(item)" /> <Edit @click="editd(item)" />
</el-icon> </el-icon>
</el-tooltip> </el-tooltip>
<!-- <el-tooltip
class="item"
effect="dark"
content="修改项目"
placement="top"
>
<Edit
style="margin-left: 5px; width: 16px"
class="xiaoshou color"
@click="editd(item)"
/> </el-tooltip
> -->
</span> </span>
<div style="display: flex; justify-content: end"> <div style="display: flex; justify-content: end">
<el-button <!-- <el-button
v-if="item.active == 0" v-if="item.active == 0"
class="color" class="color"
:icon="Compass" :icon="Compass"
@@ -95,7 +82,7 @@
style="padding: 3px 0; color: #82bd51" style="padding: 3px 0; color: #82bd51"
type="text" type="text"
>已激活</el-button >已激活</el-button
> > -->
<el-button <el-button
class="color" class="color"
:icon="Share" :icon="Share"
@@ -145,7 +132,7 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 新增弹框 --> <!-- 新增弹框 -->
<el-dialog v-model="innerVisible" :title="dialogTitle" width="500px"> <el-dialog v-model="innerVisible" :title="dialogTitle" width="500px" >
<el-form <el-form
ref="ruleFormRef" ref="ruleFormRef"
:model="ruleForm" :model="ruleForm"
@@ -163,17 +150,22 @@
placeholder="请输入项目名称" placeholder="请输入项目名称"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="工程项目" prop="projectIds"> <el-form-item label="变电站名称">
<el-select <el-select
v-model="ruleForm.projectIds" v-model="ruleForm.substionIds"
placeholder="请选择" placeholder="请选择"
:popper-append-to-body="false" multiple
popper-class="custom-select-dropdown" :teleported="false"
> >
<el-option label="Zone one111" value="shanghai" /> <el-option
<el-option label="Zone two" value="beijing" /> v-for="item in dataList"
:key="item.id"
:label="item.name"
:value="item.id"
:disabled="item.bindFlag == true && !setDisabled?.includes(item.id)"
/>
</el-select> </el-select>
</el-form-item> --> </el-form-item>
<el-form-item label="项目排序" prop="orderBy"> <el-form-item label="项目排序" prop="orderBy">
<el-input v-model="ruleForm.orderBy" placeholder="请输入" /> <el-input v-model="ruleForm.orderBy" placeholder="请输入" />
</el-form-item> </el-form-item>
@@ -218,11 +210,15 @@ import {
active, active,
getActive, getActive,
} from "@/api/manage_wx/index"; } from "@/api/manage_wx/index";
import { stationMap } from "@/api/statistics/index";
import { useStore } from "vuex";
const emit = defineEmits<{ const emit = defineEmits<{
(e: "project-change", project: { id: string; name: string }): void; (e: "project-change", project: { id: string; name: string }): void;
(e: "station-map-updated"): void;
}>(); }>();
const store = useStore();
const projectData = ref([]); const projectData = ref([]);
// 系统配置弹框 // 系统配置弹框
@@ -240,6 +236,10 @@ const firstForm = ref({
id: "", id: "",
}); });
const dataList = ref([]); //变电站
const setDisabled = ref([]);
const params = reactive({ const params = reactive({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
@@ -251,6 +251,7 @@ interface RuleForm {
projectIds: []; projectIds: [];
orderBy: string; orderBy: string;
remark: string; remark: string;
substionIds: [];
} }
const formSize = ref("default"); const formSize = ref("default");
@@ -260,17 +261,18 @@ const ruleForm = reactive<RuleForm>({
projectIds: [], projectIds: [],
orderBy: "100", orderBy: "100",
remark: "", remark: "",
substionIds: [],
}); });
const rules = reactive<FormRules<RuleForm>>({ const rules = reactive<FormRules<RuleForm>>({
name: [{ required: true, message: "请输入项目名称", trigger: "blur" }], name: [{ required: true, message: "请输入项目名称", trigger: "blur" }],
projectIds: [ // projectIds: [
{ // {
required: true, // required: true,
message: "请选择", // message: "请选择",
trigger: "change", // trigger: "change",
}, // },
], // ],
orderBy: [ orderBy: [
{ {
required: true, required: true,
@@ -280,6 +282,21 @@ const rules = reactive<FormRules<RuleForm>>({
], ],
}); });
const handleDialogClose = () => {
emit('station-map-updated');
};
const init = () => {
stationMap({
deptId: store.state.deptId,
type: store.state.timeType,
startTime: store.state.timeValue[0],
endTime: store.state.timeValue[1],
}).then((res: any) => {
dataList.value = res.data;
});
};
onMounted(() => { onMounted(() => {
fetachData(); fetachData();
}); });
@@ -334,6 +351,8 @@ const onReset = () => {
const onSubmitadd = () => { const onSubmitadd = () => {
innerVisible.value = true; innerVisible.value = true;
dialogTitle.value = "新增项目"; dialogTitle.value = "新增项目";
init();
setDisabled.value = [];
// Object.assign(ruleForm, {}); 不生效 // Object.assign(ruleForm, {}); 不生效
Object.assign(ruleForm, { Object.assign(ruleForm, {
//生效,但是一个个赋值,麻烦 //生效,但是一个个赋值,麻烦
@@ -342,6 +361,7 @@ const onSubmitadd = () => {
orderBy: "100", orderBy: "100",
projectIds: ["1dd1b076e104f15459ac401fc1b902c4"], projectIds: ["1dd1b076e104f15459ac401fc1b902c4"],
remark: "", remark: "",
substionIds: [],
}); });
//Object.keys(ruleForm).forEach((key) => delete ruleForm[key]); //生效,但是有默认值的,一进去会直接报校验 //Object.keys(ruleForm).forEach((key) => delete ruleForm[key]); //生效,但是有默认值的,一进去会直接报校验
}; };
@@ -352,6 +372,8 @@ const querdata = (e: any) => {};
const editd = (row: any) => { const editd = (row: any) => {
innerVisible.value = true; innerVisible.value = true;
dialogTitle.value = "修改项目"; dialogTitle.value = "修改项目";
init();
setDisabled.value = JSON.parse(JSON.stringify(row.substionIds));
// Object.assign(ruleForm, row); // Object.assign(ruleForm, row);
Object.assign(ruleForm, { Object.assign(ruleForm, {
id: row.id, id: row.id,
@@ -359,6 +381,7 @@ const editd = (row: any) => {
orderBy: row.orderBy, orderBy: row.orderBy,
projectIds: row.projectIds, projectIds: row.projectIds,
remark: row.remark, remark: row.remark,
substionIds: row.substionIds,
}); });
}; };
@@ -371,6 +394,8 @@ const submitForm = async (formEl: FormInstance | undefined) => {
} else { } else {
getEdit(); getEdit();
} }
init();
emit('station-map-updated');
console.log("submit!"); console.log("submit!");
} else { } else {
console.log("error submit!", fields); console.log("error submit!", fields);
@@ -410,6 +435,7 @@ const getEdit = async () => {
const resetForm = () => { const resetForm = () => {
innerVisible.value = false; innerVisible.value = false;
emit('station-map-updated')
}; };
const onTableSizeChange = (size: number) => { const onTableSizeChange = (size: number) => {

View File

@@ -6,7 +6,7 @@
type="primary" type="primary"
color="#223772" color="#223772"
@click="showDetailClick" @click="showDetailClick"
v-if="iframeLoaded" v-if="iframeLoaded && !store.state.showMap"
> >
<span v-if="props.currentFlag == 0">暂降溯源</span> <span v-if="props.currentFlag == 0">暂降溯源</span>
<span v-if="props.currentFlag == 1">谐波溯源</span> <span v-if="props.currentFlag == 1">谐波溯源</span>
@@ -422,7 +422,13 @@
align="center" align="center"
label="责任对象" label="责任对象"
show-overflow-tooltip show-overflow-tooltip
/> >
<template #default="scope">
<span>{{
scope.row.userDataName==null? '系统测点':scope.row.userDataName
}}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
prop="updateTime" prop="updateTime"
align="center" align="center"

View File

@@ -5,6 +5,7 @@
width="100%" width="100%"
height="100%" height="100%"
@pointClick="pointClick" @pointClick="pointClick"
ref="bdMapRef"
></bdMap> ></bdMap>
<!-- 添加加载事件监听 --> <!-- 添加加载事件监听 -->
@@ -16,9 +17,15 @@
frameborder="0" frameborder="0"
scrolling="no" scrolling="no"
id="iframeLeft" id="iframeLeft"
:key="keyof"
@load="onIframeLoad" @load="onIframeLoad"
></iframe> ></iframe>
<el-button class="backButton" @click="backButton" size="small" :icon="Back" <el-button
v-if="!store.state.showMap"
class="backButton"
@click="backButton"
size="small"
:icon="Back"
>返回</el-button >返回</el-button
> >
</div> </div>
@@ -34,8 +41,10 @@ const props = defineProps<{
project: { id: string; name: string } | null; project: { id: string; name: string } | null;
}>(); }>();
const iframeSrc = ref(""); const bdMapRef = ref(null)
const iframeSrc = ref("");
const keyof = ref(0);
// 监听 props 变化 // 监听 props 变化
watch( watch(
() => props.project, () => props.project,
@@ -56,7 +65,8 @@ watch(
); );
// 点击监测点传入 接线图id // 点击监测点传入 接线图id
const pointClick = (row: any) => { const pointClick = (row: any) => {
setUrl(row.pictureId, row.pictureName); setUrl(row.configId, row.configName);
keyof.value += 1;
}; };
onMounted(() => { onMounted(() => {
@@ -71,8 +81,8 @@ onMounted(() => {
}); });
const setUrl = (url: string, nam: string) => { const setUrl = (url: string, nam: string) => {
iframeSrc.value = iframeSrc.value =
// window.location.origin + window.location.origin +
"http://192.168.1.179:4001" + // "http://192.168.1.179:4001" +
`/zutai/?id=${url}&&name=${encodeURIComponent( `/zutai/?id=${url}&&name=${encodeURIComponent(
nam nam
)}&&preview=true&&display=true&&graphicDisplay=wx#/preview`; )}&&preview=true&&display=true&&graphicDisplay=wx#/preview`;
@@ -133,9 +143,23 @@ const sendKeysToIframe = (keyList: string[]) => {
}; };
// 返回地图 // 返回地图
const backButton = () => { const backButton = () => {
window.removeEventListener("message", handleMessage); store.dispatch("setStateKey", { key: "iframeLoad", value: false });
store.dispatch("setStateKey", { key: "showMap", value: true }); store.dispatch("setStateKey", { key: "showMap", value: true });
// window.removeEventListener("message", handleMessage);
}; };
// 监听 station-map-updated 事件并转发给 bdMap 组件
const handleStationMapUpdated = () => {
if (bdMapRef.value && typeof bdMapRef.value.init === 'function') {
bdMapRef.value.init()
}
}
// 暴露方法给父组件调用
defineExpose({
handleStationMapUpdated
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.plan { .plan {

View File

@@ -87,13 +87,14 @@
<Management <Management
ref="createRef" ref="createRef"
@project-change="onProjectChange" @project-change="onProjectChange"
@station-map-updated="handleStationMapUpdated"
></Management> ></Management>
</div> </div>
<div class="body-box"> <div class="body-box">
<!-- 第三行数据 --> <!-- 第三行数据 -->
<div class="content-box"> <div class="content-box">
<dv-border-box-10 :color="color[0]" style="position: relative"> <dv-border-box-10 :color="color[0]" style="position: relative">
<Plan :project="currentProject" /> <Plan :project="currentProject" ref="planRef"/>
<!-- flag 值传递给 SecurityDetail 组件 --> <!-- flag 值传递给 SecurityDetail 组件 -->
<!-- showDetail从SecurityDetail 组件传过来 --> <!-- showDetail从SecurityDetail 组件传过来 -->
<SecurityDetail <SecurityDetail
@@ -235,6 +236,8 @@ const onProjectChange = (project: { id: string; name: string }) => {
currentProject.value = project; currentProject.value = project;
}; };
const planRef = ref() // 添加对 Plan 组件的引用
const smsQueriesRef = ref(); // 短信查询组件引用 const smsQueriesRef = ref(); // 短信查询组件引用
const smsConfigRef = ref(); // 短信查询组件引用 const smsConfigRef = ref(); // 短信查询组件引用
const sendRef = ref(); // 短信查询组件引用 const sendRef = ref(); // 短信查询组件引用
@@ -380,6 +383,14 @@ const createRef = ref();
const openDialog = () => { const openDialog = () => {
createRef.value.open(); createRef.value.open();
}; };
// 处理 Management 组件发出的 station-map-updated 事件
const handleStationMapUpdated = () => {
// 通过 Plan 组件转发给 bdMap
if (planRef.value && typeof planRef.value.handleStationMapUpdated === 'function') {
planRef.value.handleStationMapUpdated()
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -6,7 +6,7 @@
<div class="totalBox" style="background-color: #28a74570"> <div class="totalBox" style="background-color: #28a74570">
<div class="textTop" @click="openalarmPopUpBox(0, data.importId)"> <div class="textTop" @click="openalarmPopUpBox(0, data.importId)">
<span>{{ data.importNum || 0 }}</span> <span>{{ data.importNum || 0 }}</span>
<span style="font-size: 13px">半导体及精密加工企业<br />监测总数</span> <span style="font-size: 13px">半导体企业<br />监测总数</span>
</div> </div>
<div <div
class="textTop" class="textTop"
@@ -27,7 +27,7 @@
<div class="textTop" @click="openalarmPopUpBox(1, data.importId)"> <div class="textTop" @click="openalarmPopUpBox(1, data.importId)">
<span>{{ data.importDevNum || 0 }}</span> <span>{{ data.importDevNum || 0 }}</span>
<span style="font-size: 13px" <span style="font-size: 13px"
>半导体及精密加工企业<br />影响户数</span >半导体企业<br />影响户数</span
> >
</div> </div>
<div <div
@@ -35,11 +35,11 @@
@click="openalarmPopUpBox(1, data.otherImportId)" @click="openalarmPopUpBox(1, data.otherImportId)"
> >
<span>{{ data.otherImportDevNum || 0 }}</span> <span>{{ data.otherImportDevNum || 0 }}</span>
<span style="font-size: 13px">其他敏感用户<br />影响户数</span> <span style="font-size: 13px">其他敏感用户<br />影响户数</span>
</div> </div>
<div class="textTop" @click="openalarmPopUpBox(1, data.otherId)"> <div class="textTop" @click="openalarmPopUpBox(1, data.otherId)">
<span>{{ data.otherDevNum || 0 }}</span> <span>{{ data.otherDevNum || 0 }}</span>
<span style="font-size: 13px">非敏感用户<br />影响户数</span> <span style="font-size: 13px">非敏感用户<br />影响户数</span>
</div> </div>
</div> </div>
</div> </div>
@@ -89,9 +89,51 @@ const sensitivePopUpBoxRef = ref();
const alarmPopUpBoxRefEvent = ref(); const alarmPopUpBoxRefEvent = ref();
function truncateLabel(name: string, maxLen: number) {
if (name.length <= maxLen) return name;
return name.substring(0, maxLen - 1) + "…";
}
function formatLeafLabel(name: string, count: number, maxLen: number) {
if (!count) return "";
return `${truncateLabel(name, maxLen)}(${count})`;
}
const INNER_MIN_RATIO = 0.2;
const OUTER_MIN_RATIO = 0.03;
function getGroupTotal(item: any) {
return item.children.reduce(
(sum: number, c: any) => sum + (c.count || 0),
0
);
}
function getGroupDisplayScales(innerList: any[]) {
const totals = innerList.map(getGroupTotal);
const sum = totals.reduce((a, b) => a + b, 0) || 1;
const minVal = sum * INNER_MIN_RATIO;
const displayTotals = totals.map((t) => Math.max(t, minVal));
return totals.map((t, i) => (t > 0 ? displayTotals[i] / t : 1));
}
function getOuterDisplayValues(children: any[], groupScale: number) {
const scaledValues = children.map((c) => (c.count || 0) * groupScale);
const groupSum = scaledValues.reduce((a, b) => a + b, 0) || 1;
const minVal = groupSum * OUTER_MIN_RATIO;
return scaledValues.map((v) => (v > 0 ? Math.max(v, minVal) : 0.001));
}
const renderChart = (key: any) => { const renderChart = (key: any) => {
var myChart = proxy.$echarts.init(key); var myChart = proxy.$echarts.init(key);
const color = ["#2E8B57", "#0a73ff", "#DAA520"]; const chartColors = ["#2E8B57", "#0a73ff", "#DAA520"];
const maxChildren = Math.max(
...data.value.innerList.map((item: any) => item.children?.length || 0),
0
);
const outerFontSize = maxChildren > 8 ? 9 : maxChildren > 5 ? 10 : 11;
const outerLabelMaxLen = maxChildren > 8 ? 5 : maxChildren > 5 ? 6 : 8;
const groupScales = getGroupDisplayScales(data.value.innerList || []);
myChart.setOption({ myChart.setOption({
title: { title: {
text: "电压暂降用户分类统计(单位:次)", text: "电压暂降用户分类统计(单位:次)",
@@ -104,136 +146,85 @@ const renderChart = (key: any) => {
}, },
tooltip: { tooltip: {
formatter: (params) => { formatter: (params: any) => {
let str = params.marker + params.name; const label =
return str; params.data?.fullLabel ??
(params.data?.count != null
? `${params.name?.replace(/\n/g, "")}(${params.data.count})`
: params.name?.replace(/\n/g, ""));
if (!label) return "";
return params.marker + label;
}, },
}, },
// {
// name: "半导体及\n精密加工",
// itemStyle: {
// color: "#2E8B57",
// },
// label: {
// rotate: "radial",
// color: "#ffffff",
// fontSize: 10,
// },
// children: [
// {
// name: "半导体8次",
// value: 10,
// itemStyle: {
// color: "#2E8B57",
// },
// label: {
// position: "outside",
// fontSize: 10,
// color: "#ffffff",
// },
// labelLine: {
// show: true,
// length1: 10,
// smooth: true,
// length2: 10,
// },
// },
// {
// name: "半导体12次",
// value: 10,
// itemStyle: {
// color: "#2E8B57",
// },
// label: {
// position: "outside",
// fontSize: 10,
// color: "#ffffff",
// },
// labelLine: {
// show: true,
// length1: 10,
// smooth: true,
// length2: 10,
// },
// },
// ],
// },
series: [ series: [
{ {
type: "sunburst", type: "sunburst",
nodeClick: false, nodeClick: false,
data: data.value.innerList.map((item, i) => { labelLayout: (params: any) => ({
hideOverlap: !!params.labelLinePoints?.length,
}),
data: data.value.innerList.map((item: any, i: number) => {
return { return {
name: insertNewLine(item.name), name: insertNewLine(item.name),
itemStyle: { itemStyle: {
color: color[i], color: chartColors[i],
}, },
parentId: item.children[0].parentId, parentId: item.children[0]?.parentId,
label: { label: {
rotate: "radial", rotate: "radial",
color: "#ffffff", color: "#ffffff",
fontSize: 11, fontSize: 10,
lineHeight: 12, lineHeight: 12,
}, },
children: item.children.map((k) => { children: (() => {
return { const outerDisplayValues = getOuterDisplayValues(
name: k.name + `(${k.count})`, item.children,
value: k.count, groupScales[i]
parentId: k.parentId, );
treeId: k.treeId, return item.children.map((k: any, j: number) => {
itemStyle: { const count = k.count ?? 0;
color: color[i], const fullLabel = `${k.name}(${count})`;
}, return {
// label: { name: formatLeafLabel(k.name, count, outerLabelMaxLen),
// position: "outside", fullLabel,
// fontSize: 10, count,
// distance: 20, // 调整标签与图形的距离 value: outerDisplayValues[j],
// color: "#ffffff", parentId: k.parentId,
// avoidLabelOverlap: true, treeId: k.treeId,
// }, itemStyle: {
// labelLine: { color: chartColors[i],
// show: true, },
// length: 10, label: {
// length2: 30, show: count > 0,
// }, position: "outside",
label: { rotate: 0,
position: "outside", distance: 20,
distance: 20, // 增加距离避免重叠 fontSize: outerFontSize,
fontSize: 12, color: "#ffffff",
color: "#ffffff", avoidLabelOverlap: true,
avoidLabelOverlap: true, // 启用避让 minMargin: 4,
}, formatter: (params: any) => {
labelLine: { if (!params.data?.fullLabel) return "";
show: true, return params.name;
smooth: true, },
minTurnAngle: 60, },
length: 10, labelLine: {
length2: 10, show: count > 0,
}, smooth: true,
}; minTurnAngle: 60,
}), length: 10,
length2: 10,
},
};
});
})(),
}; };
}), }),
radius: [0, "60%"], radius: [0, "60%"],
center: ["50%", "55%"], center: ["50%", "55%"],
itemStyle: { itemStyle: {
borderWidth: 2, borderWidth: 2,
normal: {
label: {
rotate: 0,
fontSize: 13,
lineHeight: 20,
rich: {
fontSize16: {
fontSize: "16px",
},
fontSize12: {
fontSize: "12px",
},
},
},
},
}, },
levels: [ levels: [
{}, {},
@@ -253,7 +244,10 @@ const renderChart = (key: any) => {
r0: "40%", r0: "40%",
r: "60%", r: "60%",
label: { label: {
rotate: 0,
align: "right", align: "right",
avoidLabelOverlap: true,
minMargin: 4,
}, },
}, },
], ],
@@ -262,7 +256,6 @@ const renderChart = (key: any) => {
], ],
}); });
myChart.on("click", function (params: any) { myChart.on("click", function (params: any) {
console.log("🚀 ~ renderChart ~ params:", params);
alarmPopUpBoxRefEvent.value.open( alarmPopUpBoxRefEvent.value.open(
params.data.parentId, params.data.parentId,
params.data.treeId || "" params.data.treeId || ""
@@ -447,7 +440,7 @@ const init = async () => {
// customId: null, // customId: null,
// name: "精密加工", // name: "精密加工",
// code: null, // code: null,
// count: 335, // count: 1,
// eventList: null, // eventList: null,
// children: null, // children: null,
// }, // },
@@ -457,7 +450,7 @@ const init = async () => {
// customId: null, // customId: null,
// name: "半导体制造", // name: "半导体制造",
// code: null, // code: null,
// count: 113, // count: 2,
// eventList: null, // eventList: null,
// children: null, // children: null,
// }, // },

View File

@@ -113,7 +113,7 @@
v-for="(value, index) in infoWindowPoint.objName.split( v-for="(value, index) in infoWindowPoint.objName.split(
';' ';'
)" )"
style="white-space: nowrap" style="white-space: nowrap; font-size: 13px"
> >
{{ value }} {{ value }}
</div> </div>
@@ -198,8 +198,8 @@ const markerClick = (e: any) => {
zoom.value = 15; zoom.value = 15;
infoWindowPoint.value = e; infoWindowPoint.value = e;
infoWindowPoint.value.show = true; infoWindowPoint.value.show = true;
center.value.lng = 116.404367; center.value.lng = e.lng;
center.value.lat = 39.915421; center.value.lat = e.lat+ 0.01000001;;
setTimeout(() => { setTimeout(() => {
center.value.lng = e.lng; center.value.lng = e.lng;
@@ -285,41 +285,41 @@ const init = () => {
const moveenFlag = ref(true); const moveenFlag = ref(true);
const checkMapData = () => { const checkMapData = () => {
if (!mapInstance.value || !BMapInstance.value || !moveenFlag.value) return; // if (!mapInstance.value || !BMapInstance.value || !moveenFlag.value) return;
// 获取地图容器 // // 获取地图容器
const container = mapInstance.value.getContainer(); // const container = mapInstance.value.getContainer();
setTimeout(() => { // setTimeout(() => {
try { // try {
// 1. 获取所有图片瓦片 // // 1. 获取所有图片瓦片
const tiles = Array.from(container.querySelectorAll("img")); // const tiles = Array.from(container.querySelectorAll("img"));
// 2. 检查是否有离线地图瓦片 // // 2. 检查是否有离线地图瓦片
const hasOfflineTiles = tiles.some((tile: any) => { // const hasOfflineTiles = tiles.some((tile: any) => {
// 确保tile是有效的DOM元素 // // 确保tile是有效的DOM元素
if (!tile || !tile.src) return false; // if (!tile || !tile.src) return false;
// 检查是否是离线瓦片 // // 检查是否是离线瓦片
return tile.src.includes("/plugin/offline/tiles/"); // return tile.src.includes("/plugin/offline/tiles/");
}); // });
// 3. 如果没有离线瓦片,回到默认位置 // // 3. 如果没有离线瓦片,回到默认位置
if (!hasOfflineTiles) { // if (!hasOfflineTiles) {
console.warn("当前区域无离线地图数据,将返回默认位置"); // console.warn("当前区域无离线地图数据,将返回默认位置");
// 使用正确的BMap.Point创建方式 // // 使用正确的BMap.Point创建方式
const point = new BMapInstance.value.Point(116.404367, 39.915421); // const point = new BMapInstance.value.Point(116.404367, 39.915421);
// 平滑移动并设置合适缩放级别 // // 平滑移动并设置合适缩放级别
mapInstance.value.panTo(point); // mapInstance.value.panTo(point);
mapInstance.value.setZoom(12); // mapInstance.value.setZoom(12);
// zoom.value = 12; // // zoom.value = 12;
} // }
} catch (error) { // } catch (error) {/
console.error("地图检测出错:", error); // console.error("地图检测出错:", error);
} // }
}, 1000); // 适当缩短延迟时间 // }, 1000); // 适当缩短延迟时间
}; };
// 处理地图滚轮缩放修正scale导致的坐标偏移 // 处理地图滚轮缩放修正scale导致的坐标偏移

View File

@@ -37,7 +37,8 @@
<span class="iconfont icon-gaojing" :class="item.checked ? 'blue' : 'animate-flash-red'"></span> <span class="iconfont icon-gaojing" :class="item.checked ? 'blue' : 'animate-flash-red'"></span>
<div :style="{ color: item.checked ? '#0a73ff' : '#ff0000' }" style="font-weight: 650" <div :style="{ color: item.checked ? '#0a73ff' : '#ff0000' }" style="font-weight: 650"
@click="handleCurrentChange(item)"> @click="handleCurrentChange(item)">
<div>{{ item.timeid }}.{{ item.ms }}</div> {{ item.messageContent }}
<!-- <div>{{ item.timeid }}.{{ item.ms }}</div>
<p class="mt5"> <p class="mt5">
{{ item.bdname }} {{ item.pointname }}发生{{ {{ item.bdname }} {{ item.pointname }}发生{{
filteWavetype(item.wavetype) filteWavetype(item.wavetype)
@@ -50,7 +51,7 @@
影响范围 </span><span style="flex: 1" :style="{ color: item.checked ? '#0a73ff' : '#ffc107' }">{{ 影响范围 </span><span style="flex: 1" :style="{ color: item.checked ? '#0a73ff' : '#ffc107' }">{{
item.objName item.objName
}}</span> }}</span>
</p> </p> -->
</div> </div>
</div> </div>
</div> </div>
@@ -82,6 +83,7 @@ const gradeValue: any = ref(0);
const handleSelectionChange = (val: any) => { const handleSelectionChange = (val: any) => {
multipleSelection.value = val; multipleSelection.value = val;
}; };
const mp3Src: any = new URL(`@/assets/mp3/9578.mp3`, import.meta.url); const mp3Src: any = new URL(`@/assets/mp3/9578.mp3`, import.meta.url);
const audioRef: any = ref(null); const audioRef: any = ref(null);
const updateData = (row: any) => { const updateData = (row: any) => {
@@ -132,11 +134,12 @@ const speakBrowser = (item: any) => {
audioRef.value.play(); //没有就播放 audioRef.value.play(); //没有就播放
// audioRef.value.pause() //暂停 // audioRef.value.pause() //暂停
} else if (store.state.voiceType == 1) { } else if (store.state.voiceType == 1) {
speak( speak(`${item.messageContent}`
`      ${item.timeid}${item.bdname}${item.pointname // `      ${item.timeid}${item.bdname}${item.pointname
}发生${filteWavetype(item.wavetype)}事件,事件特征幅值${Math.floor( // }发生${filteWavetype(item.wavetype)}事件,事件特征幅值${Math.floor(
item.eventvalue * 100 // item.eventvalue * 100
)}%,持续时间:${item.persisttime}`, // )}%,持续时间:${item.persisttime}秒`
,
() => { () => {
// key.value += 1; // key.value += 1;
} }
@@ -156,10 +159,10 @@ const totalProcessing = (number: number, id?: string) => {
//紧急告警确认 //紧急告警确认
list = urgentList.value list = urgentList.value
.filter((item: any) => item.checked == true) .filter((item: any) => item.checked == true)
.map((item: any) => item.eventdetail_index); .map((item: any) => item.messageIds);
} else if (number == 2) { } else if (number == 2) {
//紧急告警全部确认 //紧急告警全部确认
list = urgentList.value.map((item: any) => item.eventdetail_index); list = urgentList.value.map((item: any) => item.messageIds);
} else if (number == 3) { } else if (number == 3) {
list = [id]; list = [id];
} }
@@ -173,13 +176,14 @@ const totalProcessing = (number: number, id?: string) => {
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
lookEvent(list).then((res) => { lookEvent( [...new Set(list.flat())]).then((res) => {
list.forEach((id: any) => { list.forEach((id: any) => {
urgentList.value = urgentList.value.filter( urgentList.value = urgentList.value.filter(
(item: any) => item.eventdetail_index != id (item: any) => item.messageIds != id
); );
broadcast.value = broadcast.value.filter( broadcast.value = broadcast.value.filter(
(item: any) => item.eventdetail_index != id (item: any) => item.messageIds != id
); );
}); });
if (broadcast.value.length == 0) { if (broadcast.value.length == 0) {

View File

@@ -39,7 +39,7 @@
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item label="残余电压告警阈值"> <el-form-item label="残余电压告警阈值">
<el-input-number v-model="form.eventValue" :min="0" :max="0.9" :precision="1" :step="0.1" <el-input-number v-model="form.eventValue" :min="0" :max="1" :step="0.01"
@change="(e) => (e == null ? (form.eventValue = 0.1) : null)" style="width: 200px" /> @change="(e) => (e == null ? (form.eventValue = 0.1) : null)" style="width: 200px" />
</el-form-item> </el-form-item>
<el-form-item label="持续时间告警阈值"> <el-form-item label="持续时间告警阈值">

View File

@@ -1,25 +1,56 @@
<!--报表导出--> <!--报表导出-->
<template> <template>
<el-dialog :close-on-click-modal="false" draggable v-model="machineVisible" :title="title" width="500"> <el-dialog
:close-on-click-modal="false"
draggable
v-model="machineVisible"
:title="title"
width="500"
>
<div> <div>
<div class="smsConfig"> <div class="smsConfig">
<el-form :model="form" inline label-width="auto" class=" ml30 mt10"> <el-form :model="form" inline label-width="auto" class="ml30 mt10">
<el-form-item label="时间"> <el-form-item label="时间">
<el-date-picker v-model="timeValue" size="small" type="daterange" :disabled-date="isFutureDate" <el-date-picker
style="width: 250px; margin-right: 10px" unlink-panels :clearable="false" range-separator="" v-model="timeValue"
start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYY-MM-DD HH:mm:ss" /> size="small"
type="datetimerange"
:disabled-date="isFutureDate"
style="width: 250px; margin-right: 10px"
unlink-panels
:clearable="false"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</el-form-item> </el-form-item>
<el-form-item label="部门集合"> <el-form-item label="部门集合">
<el-select v-model="form.deptList" placeholder="请选择部门集合" style="width: 250px" size="small" multiple <el-select
collapse-tags collapse-tags-tooltip> v-model="form.deptList"
placeholder="请选择部门集合"
style="width: 250px"
size="small"
multiple
collapse-tags
collapse-tags-tooltip
>
<template #header> <template #header>
<el-checkbox v-model="checkAll" :indeterminate="indeterminate" @change="handleCheckAll"> <el-checkbox
v-model="checkAll"
:indeterminate="indeterminate"
@change="handleCheckAll"
>
全部 全部
</el-checkbox> </el-checkbox>
</template> </template>
<el-option v-for="item in deptLists" :key="item.deptsIndex" :label="item.deptsname" <el-option
:value="item.deptsIndex" /> v-for="item in deptLists"
:key="item.deptsIndex"
:label="item.deptsname"
:value="item.deptsIndex"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -32,7 +63,14 @@
</div> </div>
<template #footer> <template #footer>
<el-button :icon="Close" @click="setUp" size="small">取消</el-button> <el-button :icon="Close" @click="setUp" size="small">取消</el-button>
<el-button type="primary" :icon="Check" @click="save" size="small">确定</el-button> <el-button
type="primary"
:icon="Check"
@click="save"
size="small"
:loading="loading"
>确定</el-button
>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
@@ -41,17 +79,18 @@ import { ref, watch, inject, onMounted } from "vue";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { Check, Close } from "@element-plus/icons-vue"; import { Check, Close } from "@element-plus/icons-vue";
import { getDept, exportForms } from "@/api/statistics/index"; import { getDept, exportForms } from "@/api/statistics/index";
import type { CheckboxValueType } from 'element-plus' import type { CheckboxValueType } from "element-plus";
import { useStore } from "vuex"; import { useStore } from "vuex";
const store = useStore(); const store = useStore();
const machineVisible = ref(false); const machineVisible = ref(false);
const title = ref("报表导出"); const title = ref("报表导出");
const timeValue = ref([]); const timeValue = ref([]);
const deptLists = ref(); const deptLists = ref();
const loading = ref(false);
//form表单校验规则 //form表单校验规则
const emit = defineEmits(["flushed"]); const emit = defineEmits(["flushed"]);
const checkAll = ref(false) const checkAll = ref(false);
const indeterminate = ref(false) const indeterminate = ref(false);
const form = ref({ const form = ref({
searchBeginTime: "", searchBeginTime: "",
searchEndTime: "", searchEndTime: "",
@@ -88,28 +127,28 @@ const init = () => {
// } // }
// }) // })
watch( watch(
() => form.value.deptList, // 使用函数返回值的形式 () => form.value.deptList, // 使用函数返回值的形式
(val) => { (val) => {
if (val.length == 0) { if (val.length == 0) {
checkAll.value = false checkAll.value = false;
indeterminate.value = false indeterminate.value = false;
} else if (val.length == deptLists.value.length) { } else if (val.length == deptLists.value.length) {
checkAll.value = true checkAll.value = true;
indeterminate.value = false indeterminate.value = false;
} else { } else {
indeterminate.value = true indeterminate.value = true;
} }
}, },
{ deep: true } // 添加深度监听选项 { deep: true } // 添加深度监听选项
) );
const handleCheckAll = (val: CheckboxValueType) => { const handleCheckAll = (val: CheckboxValueType) => {
indeterminate.value = false indeterminate.value = false;
if (val) { if (val) {
form.value.deptList = deptLists.value.map((_) => _.deptsIndex) form.value.deptList = deptLists.value.map((_) => _.deptsIndex);
} else { } else {
form.value.deptList = [] form.value.deptList = [];
} }
} };
const save = () => { const save = () => {
if (!timeValue.value[0]) { if (!timeValue.value[0]) {
ElMessage.warning("请选择时间!"); ElMessage.warning("请选择时间!");
@@ -122,25 +161,29 @@ const save = () => {
(form.value.deptId = store.state.deptId), (form.value.deptId = store.state.deptId),
(form.value.searchBeginTime = timeValue.value[0]), (form.value.searchBeginTime = timeValue.value[0]),
(form.value.searchEndTime = timeValue.value[1] (form.value.searchEndTime = timeValue.value[1]);
? timeValue.value[1].split(" ")[0] + " 23:59:59"
: ""); exportForms(form.value)
exportForms(form.value).then((res: any) => { .then((res: any) => {
let blob = new Blob([res], { let blob = new Blob([res], {
type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8", type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8",
});
// createObjectURL(blob); //创建下载的链接
const url = window.URL.createObjectURL(blob);
const link = document.createElement("a"); // 创建a标签
link.href = url;
link.download = "导出报表.docx"; // 设置下载的文件名
document.body.appendChild(link);
link.click(); //执行下载
document.body.removeChild(link);
machineVisible.value = false;
loading.value = false;
})
.catch((err) => {
loading.value = false;
}); });
// createObjectURL(blob); //创建下载的链接
const url = window.URL.createObjectURL(blob);
const link = document.createElement("a"); // 创建a标签
link.href = url;
link.download = "导出报表.docx"; // 设置下载的文件名
document.body.appendChild(link);
link.click(); //执行下载
document.body.removeChild(link);
machineVisible.value = false;
});
}; };
const isFutureDate = (time: any) => { const isFutureDate = (time: any) => {

View File

@@ -0,0 +1,583 @@
<template>
<el-dialog :close-on-click-modal="false" draggable v-model="machineVisible" :title="title" width="1300px"
:before-close="handleClose" @opened="handleDialogOpened">
<el-form inline="true" class="formLeft">
<el-form-item>
<datePicker :setWatch="false" :showTime="true" ref="datePickerRef" :defaultInterval="5" style="width: 560px" />
</el-form-item>
<el-form-item label="关键字筛选" style="margin-right: 10px">
<el-input clearable v-model="searchValue" size="small" placeholder="电站、测点、用户信息"></el-input>
</el-form-item>
<el-form-item style="margin-right: auto">
<el-popover placement="bottom" :width="550" trigger="click">
<template #reference>
<el-button size="small" :icon="DArrowRight" type="primary">更多</el-button>
</template>
<el-form label-width="auto">
<el-form-item label="关键字筛选">
<el-input clearable style="width: 150px" v-model="searchValue" size="small"
placeholder="电站、测点、用户信息"></el-input>
</el-form-item>
<el-form-item label="运维单位">
<el-select v-model="deptsIndex" placeholder="请选择运维单位" clearable size="small"
:teleported="false" style="width: 150px">
<el-option v-for="item in deptsList" :label="item.deptsname" :value="item.deptsIndex"
:key="item.deptsIndex"></el-option>
</el-select>
</el-form-item>
<el-form-item label="触发类型">
<el-select clearable size="small" :teleported="false" v-model="eventForm.eventtype"
placeholder="请选择触发类型" style="width: 150px">
<el-option v-for="item in eventTypeList" :label="item.label" :value="item.value"
:key="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="过滤敏感用户">
<el-select clearable size="small" :teleported="false" v-model="eventForm.fiterSensitiveUser"
placeholder="请选择过滤敏感用户" style="width: 150px">
<el-option label="是" value="1"></el-option>
<el-option label="否" value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item label="残余电压百分比">
<el-input-number v-model="eventForm.eventValueMin" :min="0" style="width: 150px"
size="small" :max="100" :precision="1" :step="1"
@change="(e) => (e == null ? (eventForm.eventValueMin = 1) : null)"><template #suffix>
<span>%</span>
</template></el-input-number>
<span> < 残余电压 < </span>
<el-input-number v-model="eventForm.eventValueMax" :min="0" style="width: 150px"
size="small" :max="100" :precision="1" :step="1"
@change="(e) => (e == null ? (eventForm.eventValueMax = 1) : null)"><template
#suffix>
<span>%</span>
</template></el-input-number>
</el-form-item>
<el-form-item label="暂降持续事时间">
<el-input-number v-model="eventForm.eventDurationMin" :min="0" style="width: 150px"
size="small" :max="1000000" :precision="1" :step="1" @change="
(e) => (e == null ? (eventForm.eventDurationMin = 1) : null)
"><template #suffix>
<span>ms</span>
</template></el-input-number>
<span> < 持续时间 < </span>
<el-input-number v-model="eventForm.eventDurationMax" :min="0" style="width: 150px"
size="small" :max="1000000" :precision="1" :step="1" @change="
(e) => (e == null ? (eventForm.eventDurationMax = 1) : null)
"><template #suffix>
<span>ms</span>
</template></el-input-number>
</el-form-item>
</el-form>
</el-popover>
</el-form-item>
<el-form-item style="margin-right: 0;">
<el-button size="small" :icon="Search" type="primary" @click="inquire(true)">查询</el-button>
<el-button size="small" type="warn" :icon="RefreshLeft" @click="clearInit()">重置</el-button>
<el-button size="small" type="primary" :icon="Comment" @click="getMessage"
:loading="templateLoading">生成短信</el-button>
<el-button type="primary" :icon="Download" @click="exportTable" size="small" :loading="exportLoading">导出
</el-button>
</el-form-item>
</el-form>
<div class="tableBox" v-loading="loading" element-loading-background="#343849c7">
<el-table ref="tableRef" :scrollbar-always-on="true" :data="tableData" height="280px" size="small" stripe
row-key="eventdetail_index" highlight-current-row :header-cell-style="{ textAlign: 'center' }" border
@row-click="handleRowClick" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" :selectable="selectable" reserve-selection
width="55" />
<el-table-column label="序号" align="center" width="60">
<template #default="scope">
{{ (pageNum - 1) * pageSize + scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="timeid" align="center" label="发生时间" width="160" sortable>
<template #default="scope">
{{ scope.row.timeid }}.{{ scope.row.ms }}
</template>
</el-table-column>
<el-table-column prop="bdname" align="center" label="变电站" show-overflow-tooltip sortable />
<el-table-column prop="busName" align="center" label="母线" show-overflow-tooltip />
<el-table-column prop="pointname" align="center" label="监测点" show-overflow-tooltip />
<el-table-column prop="objName" align="center" label="用户" show-overflow-tooltip>
<template #default="scope">{{ scope.row.objName || "/" }}</template>
</el-table-column>
<el-table-column prop="wavetype" align="center" width="70" label="触发类型">
<template #default="scope">
{{ filteWavetype(scope.row.wavetype) }}
</template>
</el-table-column>
<el-table-column prop="eventvalue" align="center" label="残余电压" width="90" sortable>
<template #default="scope">
{{ Math.floor(scope.row.eventvalue * 10000) / 100 }}%
</template>
</el-table-column>
<el-table-column prop="persisttime" align="center" label="持续时间" width="90" sortable>
<template #default="scope">
{{ Math.floor(scope.row.persisttime * 1000) / 1000 }}s
</template>
</el-table-column>
<el-table-column prop="address" align="center" label="操作" width="80">
<template #default="scope">
<el-button size="small" type="primary" link @click.stop="trendCharts(scope.row)">
波形
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination style="margin-top: 10px" :currentPage="pageNum" :page-size="pageSize"
:page-sizes="[10, 20, 50, 100, 200]" background size="small"
:layout="'sizes,total, ->, prev, pager, next, jumper'" :total="total" @size-change="onTableSizeChange"
@current-change="onTableCurrentChange"></el-pagination>
</div>
<el-divider />
<div class="sendBox">
<div style="min-height: 37px;">
<div class="mb10">发送用户</div>
<div class="userGroups">
<div v-for="group in pqsUserGroups" :key="group.deptName" class="userGroup">
<span class="deptName">{{ group.deptName }}</span>
<el-checkbox-group v-model="selectedUserIds">
<el-checkbox v-for="user in group.users" class="mb7" :key="user.userIndex" :label="user.userIndex"
border size="small">
{{ user.name }}
</el-checkbox>
</el-checkbox-group>
</div>
</div>
</div>
<div>
<div class="mb10">短信模板 </div>
<el-input v-model="messageList.message" style="flex: 1;" :rows="5" type="textarea"
:value="messageList && messageList.message" />
</div>
</div>
<div class=" mt10" style="display: flex;justify-content: flex-end;">
<el-button size="small" :icon="Message" type="primary" @click="sendMessage"
:loading="sendLoading">发送</el-button>
</div>
</el-dialog>
<el-dialog :close-on-click-modal="false" draggable v-model="trendVisible" v-if="trendVisible" title="波形"
width="70%">
<waveForm ref="waveFormRef" />
</el-dialog>
</template>
<script lang="ts" setup>
import { ref, reactive, nextTick, computed } from "vue";
import { eventPage, regionDevCount, messageGenerate, messageSend } from "@/api/statistics/index";
import {
DArrowRight,
Search,
RefreshLeft,
Download, Message, Comment
} from "@element-plus/icons-vue";
import * as XLSX from "xlsx";
import waveForm from "@/components/BX/waveForm.vue";
import datePicker from "@/components/datePicker/index.vue";
import { useStore } from "vuex";
import { ElMessage } from "element-plus";
const store = useStore();
const machineVisible = ref(false);
const title = ref("暂降事件列表");
const datePickerRef = ref();
const pageNum = ref(1);
const pageSize = ref(100);
const loading = ref(false);
const exportLoading = ref(false);
const total = ref(0);
const tableData = ref([]);
const searchValue = ref("");
const deptsIndex = ref(null);
const deptsList = ref([]);
const trendVisible = ref(false);
const waveFormRef = ref();
const tableRef = ref();
const selectedRowIds = ref<string[]>([]);
const selectedRows = ref<any[]>([]);
const templateLoading = ref(false);
const isAutoSelecting = ref(false);
const messageList = ref<{
message: string;
eventId: string;
pqsUsers: Record<string, any[]>;
}>({
message: "",
eventId: "",
pqsUsers: {},
});
const selectedUserIds = ref<string[]>([]);
const selectable = (row: any) => !!row.eventdetail_index;
const eventForm: any = reactive({
eventValueMin: null,
eventValueMax: null,
eventDurationMin: null,
eventDurationMax: null,
eventtype: null,
fiterSensitiveUser: '1',
});
const sendLoading = ref(false);
const typeMap: Record<string, string> = {
"0": "扰动",
"1": "暂降",
"2": "暂升",
"3": "中断",
"4": "其他",
"5": "录波",
};
const eventTypeList = computed(() => {
const availableTypes = store.state.eventTypeList.map((type: number) =>
String(type)
);
return availableTypes
.filter((type) => Object.prototype.hasOwnProperty.call(typeMap, type))
.map((type) => ({
value: type,
label: typeMap[type],
}));
});
const pqsUserGroups = computed(() => {
const pqsUsers = messageList.value.pqsUsers;
if (!pqsUsers || Array.isArray(pqsUsers)) return [];
return Object.entries(pqsUsers).map(([deptName, users]) => ({
deptName,
users: users || [],
}));
});
const initSelectedUsers = (pqsUsers: Record<string, any[]>) => {
const ids: string[] = [];
Object.values(pqsUsers || {}).forEach((users) => {
users.forEach((user) => {
if (user.userIndex) ids.push(user.userIndex);
});
});
selectedUserIds.value = ids;
};
const getFilteredPqsUsers = () => {
const result: Record<string, any[]> = {};
const pqsUsers = messageList.value.pqsUsers;
if (!pqsUsers || Array.isArray(pqsUsers)) return result;
Object.entries(pqsUsers).forEach(([deptName, users]) => {
const filtered = users.filter((user) => selectedUserIds.value.includes(user.userIndex));
if (filtered.length > 0) {
result[deptName] = filtered;
}
});
return result;
};
const getTimeRange = () => {
const picker = datePickerRef.value;
const timeValue = picker?.timeValue || [];
return {
type: picker?.interval ?? 5,
startDateTime: timeValue[0] || "",
endTDateime: timeValue[1] || "",
};
};
const getQueryParams = (override: Record<string, any> = {}) => {
const { type, startDateTime, endTDateime } = getTimeRange();
return {
deptId: deptsIndex.value || store.state.deptId,
type,
startDateTime,
endTDateime,
eventtype: null,
pageNum: pageNum.value,
pageSize: pageSize.value,
searchValue: searchValue.value,
...eventForm,
eventValueMin:
eventForm.eventValueMin == null ? null : eventForm.eventValueMin / 100,
eventValueMax:
eventForm.eventValueMax == null ? null : eventForm.eventValueMax / 100,
...override,
};
};
const filteWavetype = (wavetype: string) => {
return typeMap[String(wavetype)] ?? "";
};
const clearSelection = () => {
selectedRowIds.value = [];
selectedRows.value = [];
tableRef.value?.clearSelection();
};
const handleSelectionChange = (rows: any[]) => {
if (isAutoSelecting.value) return;
selectedRows.value = rows;
selectedRowIds.value = rows.map((row) => row.eventdetail_index);
};
const handleRowClick = (row: any) => {
if (!selectable(row)) return;
tableRef.value?.toggleRowSelection(row);
};
const selectAllAndGenerateMessage = async () => {
await nextTick();
if (total.value === 0) {
clearSelection();
return;
}
let allRecords = tableData.value;
if (total.value > tableData.value.length) {
const allRes = await eventPage(getQueryParams({ pageNum: 1, pageSize: total.value }));
allRecords = allRes.data.records || [];
}
const selectableRecords = allRecords.filter(selectable);
isAutoSelecting.value = true;
try {
selectedRows.value = selectableRecords;
selectedRowIds.value = selectableRecords.map((row) => row.eventdetail_index);
tableRef.value?.clearSelection();
await nextTick();
tableData.value.forEach((row: any) => {
if (selectedRowIds.value.includes(row.eventdetail_index)) {
tableRef.value?.toggleRowSelection(row, true);
}
});
getMessage(true);
} finally {
isAutoSelecting.value = false;
}
};
const getMessage = (silent = false) => {
if (selectedRowIds.value.length === 0) {
if (!silent) {
ElMessage.warning("请选择暂降事件!");
}
return;
}
templateLoading.value = true;
messageGenerate({ eventIds: selectedRowIds.value.join(',') }).then((res: any) => {
if (res.code == 'A0000') {
messageList.value = res.data;
initSelectedUsers(res.data.pqsUsers || {});
} else {
ElMessage.warning(res.message);
messageList.value = {
message: "",
eventId: "",
pqsUsers: {}
};
selectedUserIds.value = [];
}
}).finally(() => {
templateLoading.value = false;
});
};
const initDept = () => {
const { type, startDateTime, endTDateime } = getTimeRange();
regionDevCount({
deptId: store.state.deptId,
type,
startDateTime,
endTDateime,
}).then((res: any) => {
deptsList.value = res.data;
});
};
const resetQueryForm = () => {
searchValue.value = "";
deptsIndex.value = null;
eventForm.eventValueMin = null;
eventForm.eventValueMax = null;
eventForm.eventDurationMin = null;
eventForm.eventDurationMax = null;
eventForm.eventtype = null;
eventForm.fiterSensitiveUser = "1";
pageNum.value = 1;
pageSize.value = 100;
clearSelection();
datePickerRef.value?.setTheDate(5);
};
const handleDialogOpened = () => {
resetQueryForm();
initDept();
inquire(true);
};
const inquire = (resetPage = false) => {
messageList.value = {
message: "",
eventId: "",
pqsUsers: {}
};
selectedUserIds.value = [];
if (resetPage) {
pageNum.value = 1;
pageSize.value = 100;
clearSelection();
}
loading.value = true;
eventPage(getQueryParams()).then(async (res) => {
total.value = res.data.total;
tableData.value = res.data.records;
loading.value = false;
if (resetPage) {
await selectAllAndGenerateMessage();
}
});
};
const clearInit = async () => {
resetQueryForm();
await inquire(true);
};
const trendCharts = (row: any) => {
trendVisible.value = true;
setTimeout(() => {
waveFormRef.value?.open(row);
}, 500);
};
const open = (text: string) => {
title.value = text || "暂降事件列表";
clearSelection();
machineVisible.value = true;
};
const sendMessage = () => {
const filteredPqsUsers = getFilteredPqsUsers();
const userCount = Object.values(filteredPqsUsers).reduce((sum, users) => sum + users.length, 0);
if (userCount === 0) {
ElMessage.warning("发送用户不能为空!");
return;
}
if (!messageList.value.message?.trim()) {
ElMessage.warning("请输入发送短信内容!");
return;
}
sendLoading.value = true;
messageSend({
...messageList.value,
pqsUsers: filteredPqsUsers,
})
.then((res: any) => {
if (res.code == 'A0000') {
if (res.data.sendResult == 0) {
ElMessage.warning("发送失败");
} else {
ElMessage.success("发送成功");
}
} else {
ElMessage.warning(res.message);
}
}).catch((error: any) => {
ElMessage.warning("发送失败");
})
.finally(() => {
sendLoading.value = false;
});
};
const onTableSizeChange = (size: number) => {
pageSize.value = size;
inquire();
};
const onTableCurrentChange = (page: number) => {
pageNum.value = page;
inquire();
};
const exportTable = async () => {
exportLoading.value = true;
const columnExpor: any = [
["发生时间", "变电站", "母线", "监测点", "用户", "触发类型", "残余电压", "持续时间"],
];
try {
const res = await eventPage(
getQueryParams({ pageNum: 1, pageSize: total.value })
);
const data = res.data.records.map((item: any) => [
`${item.timeid}.${item.ms}`,
item.bdname,
item.busName,
item.pointname,
item.objName || "/",
filteWavetype(item.wavetype),
`${Math.floor(item.eventvalue * 10000) / 100}%`,
`${Math.floor(item.persisttime * 1000) / 1000}s`,
]);
const list = [...columnExpor, ...data];
const worksheet = XLSX.utils.aoa_to_sheet(list);
worksheet["!cols"] = list[0].map(() => ({ wch: 20 }));
const workbook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(workbook, worksheet, "暂降事件列表");
XLSX.writeFile(workbook, "暂降事件列表.xlsx");
} finally {
exportLoading.value = false;
}
};
const handleClose = () => {
machineVisible.value = false;
};
defineExpose({ open, selectedRows, selectedRowIds });
</script>
<style lang="scss" scoped>
@use "@/assets/scss/index.scss";
.formLeft {
display: flex;
align-items: center;
color: #fff;
}
.tableBox {
padding: 0;
}
.sendBox {
display: grid;
grid-template-columns: 2fr 1.3fr;
gap: 10px;
}
.userGroups {
flex: 1;
}
.userGroup {
display: flex;
align-items: flex-start;
margin-bottom: 5px;
line-height: 24px;
}
.deptName {
flex-shrink: 0;
margin-right: 8px;
white-space: nowrap;
}
</style>

Some files were not shown because too many files have changed in this diff Show More