work/js/chunk-1c743f9e.d1825197.js
2024-01-15 19:56:20 +08:00

1 line
9.7 KiB
PHP

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1c743f9e"],{"2e08":function(n,e,t){var a=t("9def"),i=t("9744"),o=t("be13");n.exports=function(n,e,t,s){var r=String(o(n)),c=r.length,l=void 0===t?" ":String(t),p=a(e);if(p<=c||""==l)return r;var d=p-c,u=i.call(l,Math.ceil(d/l.length));return u.length>d&&(u=u.slice(0,d)),s?u+r:r+u}},"303b":function(n,e,t){},"862d":function(n,e,t){"use strict";(function(e,t){n.exports=t()})(0,(function(){function n(n){var a=[];return n.AMapUI&&a.push(e(n.AMapUI)),n.Loca&&a.push(t(n.Loca)),Promise.all(a)}function e(n){return new Promise((function(e,t){var r=[];if(n.plugins)for(var c=0;c<n.plugins.length;c+=1)-1==i.AMapUI.plugins.indexOf(n.plugins[c])&&r.push(n.plugins[c]);if(o.AMapUI===a.failed)t("前次请求 AMapUI 失败");else if(o.AMapUI===a.notload){o.AMapUI=a.loading,i.AMapUI.version=n.version||i.AMapUI.version,c=i.AMapUI.version;var l=document.body||document.head,p=document.createElement("script");p.type="text/javascript",p.src="https://webapi.amap.com/ui/"+c+"/main.js",p.onerror=function(n){o.AMapUI=a.failed,t("请求 AMapUI 失败")},p.onload=function(){if(o.AMapUI=a.loaded,r.length)window.AMapUI.loadUI(r,(function(){for(var n=0,t=r.length;n<t;n++){var a=r[n].split("/").slice(-1)[0];window.AMapUI[a]=arguments[n]}for(e();s.AMapUI.length;)s.AMapUI.splice(0,1)[0]()}));else for(e();s.AMapUI.length;)s.AMapUI.splice(0,1)[0]()},l.appendChild(p)}else o.AMapUI===a.loaded?n.version&&n.version!==i.AMapUI.version?t("不允许多个版本 AMapUI 混用"):r.length?window.AMapUI.loadUI(r,(function(){for(var n=0,t=r.length;n<t;n++){var a=r[n].split("/").slice(-1)[0];window.AMapUI[a]=arguments[n]}e()})):e():n.version&&n.version!==i.AMapUI.version?t("不允许多个版本 AMapUI 混用"):s.AMapUI.push((function(n){n?t(n):r.length?window.AMapUI.loadUI(r,(function(){for(var n=0,t=r.length;n<t;n++){var a=r[n].split("/").slice(-1)[0];window.AMapUI[a]=arguments[n]}e()})):e()}))}))}function t(n){return new Promise((function(e,t){if(o.Loca===a.failed)t("前次请求 Loca 失败");else if(o.Loca===a.notload){o.Loca=a.loading,i.Loca.version=n.version||i.Loca.version;var r=i.Loca.version,c=i.AMap.version.startsWith("2"),l=r.startsWith("2");if(c&&!l||!c&&l)t("JSAPI 与 Loca 版本不对应!!");else{c=i.key,l=document.body||document.head;var p=document.createElement("script");p.type="text/javascript",p.src="https://webapi.amap.com/loca?v="+r+"&key="+c,p.onerror=function(n){o.Loca=a.failed,t("请求 AMapUI 失败")},p.onload=function(){for(o.Loca=a.loaded,e();s.Loca.length;)s.Loca.splice(0,1)[0]()},l.appendChild(p)}}else o.Loca===a.loaded?n.version&&n.version!==i.Loca.version?t("不允许多个版本 Loca 混用"):e():n.version&&n.version!==i.Loca.version?t("不允许多个版本 Loca 混用"):s.Loca.push((function(n){n?t(n):t()}))}))}if(!window)throw Error("AMap JSAPI can only be used in Browser.");var a;(function(n){n.notload="notload",n.loading="loading",n.loaded="loaded",n.failed="failed"})(a||(a={}));var i={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},o={AMap:a.notload,AMapUI:a.notload,Loca:a.notload},s={AMap:[],AMapUI:[],Loca:[]},r=[],c=function(n){"function"==typeof n&&(o.AMap===a.loaded?n(window.AMap):r.push(n))};return{load:function(e){return new Promise((function(t,s){if(o.AMap==a.failed)s("");else if(o.AMap==a.notload){var l=e.key,p=e.version,d=e.plugins;l?(window.AMap&&"lbs.amap.com"!==location.host&&s("禁止多种API加载方式混用"),i.key=l,i.AMap.version=p||i.AMap.version,i.AMap.plugins=d||i.AMap.plugins,o.AMap=a.loading,p=document.body||document.head,window.___onAPILoaded=function(i){if(delete window.___onAPILoaded,i)o.AMap=a.failed,s(i);else for(o.AMap=a.loaded,n(e).then((function(){t(window.AMap)}))["catch"](s);r.length;)r.splice(0,1)[0]()},d=document.createElement("script"),d.type="text/javascript",d.src="https://webapi.amap.com/maps?callback=___onAPILoaded&v="+i.AMap.version+"&key="+l+"&plugin="+i.AMap.plugins.join(","),d.onerror=function(n){o.AMap=a.failed,s(n)},p.appendChild(d)):s("请填写key")}else if(o.AMap==a.loaded)if(e.key&&e.key!==i.key)s("多个不一致的 key");else if(e.version&&e.version!==i.AMap.version)s("不允许多个版本 JSAPI 混用");else{if(l=[],e.plugins)for(p=0;p<e.plugins.length;p+=1)-1==i.AMap.plugins.indexOf(e.plugins[p])&&l.push(e.plugins[p]);l.length?window.AMap.plugin(l,(function(){n(e).then((function(){t(window.AMap)}))["catch"](s)})):n(e).then((function(){t(window.AMap)}))["catch"](s)}else if(e.key&&e.key!==i.key)s("多个不一致的 key");else if(e.version&&e.version!==i.AMap.version)s("不允许多个版本 JSAPI 混用");else{var u=[];if(e.plugins)for(p=0;p<e.plugins.length;p+=1)-1==i.AMap.plugins.indexOf(e.plugins[p])&&u.push(e.plugins[p]);c((function(){u.length?window.AMap.plugin(u,(function(){n(e).then((function(){t(window.AMap)}))["catch"](s)})):n(e).then((function(){t(window.AMap)}))["catch"](s)}))}}))},reset:function(){delete window.AMap,delete window.AMapUI,delete window.Loca,i={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},o={AMap:a.notload,AMapUI:a.notload,Loca:a.notload},s={AMap:[],AMapUI:[],Loca:[]}}}}))},9744:function(n,e,t){"use strict";var a=t("4588"),i=t("be13");n.exports=function(n){var e=String(i(this)),t="",o=a(n);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(t+=e);return t}},d322:function(n,e,t){"use strict";t.r(e);t("7f7f");var a=function(){var n=this,e=n._self._c;return e("div",{staticClass:"datav-index"},[e("div",{staticStyle:{width:"100vw"},attrs:{id:"container"}}),e("div",{staticClass:"btn-box"},[e("a-dropdown",{attrs:{trigger:["click"]},scopedSlots:n._u([{key:"overlay",fn:function(){return[e("a-menu",{staticStyle:{width:"160px"},on:{click:n.handleMenuClick}},n._l(n.member_list,(function(t,a){return e("a-menu-item",{key:a},[e("div",{staticClass:"menu-item-d"},[e("a-avatar",{attrs:{src:t.avatar,icon:"user",size:"small"}}),e("a",{staticClass:"muted name"},[n._v(n._s(t.name))]),a%3!=0?e("span",{staticClass:"line_on"},[n._v("• 在线")]):e("span",{staticClass:"line_off"},[n._v("• 离线")])],1)])})),1)]},proxy:!0}])},[e("a-button",{staticStyle:{"min-width":"100px"}},[e("div",{staticClass:"menu-item-d"},[e("a-avatar",{attrs:{src:n.now_user.avatar,icon:"user",size:"small"}}),e("a",{staticClass:"muted name"},[n._v(n._s(n.now_user.name))])],1)])],1),e("a-date-picker",{attrs:{format:"MM月DD日",allowClear:!1},on:{change:n.changeTime},model:{value:n.now_date,callback:function(e){n.now_date=e},expression:"now_date"}})],1)])},i=[],o=(t("28a5"),t("ac6a"),t("6b54"),t("f576"),t("2ef0"),t("862d")),s=t.n(o),r=t("f66b"),c=t("c24f"),l=t("97a8"),p={name:"datav",data:function(){return{map:null,Amap:null,visibleTaskCopied:!1,now_date:"",now_user:{member_code:"",avatar:"",name:"全部"},member_list:[],markers:[],polyline:null}},created:function(){this.now_date="",this.getMembers()},mounted:function(){this.initMap()},methods:{getMembers:function(){var n=this;Object(c["w"])().then((function(e){n.member_list=e.data.list}))},formatDate:function(n){var e=n.getFullYear(),t=(n.getMonth()+1).toString().padStart(2,"0"),a=n.getDate().toString().padStart(2,"0");return"".concat(e,"-").concat(t,"-").concat(a)},initMap:function(){var n=this;s.a.load({key:"4f8f55618010007147aab96fc72bb408",version:"2.0",plugins:["AMap.Geocoder"],Loca:{version:"2.0.0"}}).then((function(e){n.map=new e.Map("container",{viewMode:"3D",zoom:15,center:[105.433211,28.913861],mapStyle:"amap://styles/darkblue"}),n.initMaker()})).catch((function(n){console.log(n)}))},handleMenuClick:function(n){this.now_user=this.member_list[n.key],this.initList()},changeTime:function(n){console.log(this.now_date),this.initList()},initMaker:function(){var n=this;Object(r["a"])().then((function(e){e.data.forEach((function(e){if(e.positioning){var t=new AMap.Marker({position:e.positioning.split(","),map:n.map,content:'\n <div class="marker-d">\n <img src="'.concat(e.avatar||"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f7d49202401111649248163.png",'" />\n <div class="text">\n <div>').concat(e.name,"</div>\n <div>更新时间:").concat(e.date,"</div>\n <div>停留时间:").concat(e.date,"</div>\n </div>\n </div>\n "),offset:new AMap.Pixel(-20,-20)});n.markers.push(t)}}))}))},initList:function(){var n=this;this.now_user.member_code&&this.now_date&&(this.map.remove(this.markers),this.polyline&&this.polyline.setMap(null),Object(r["b"])({code:this.now_user.member_code,date:this.formatDate(new Date(this.now_date||Date.now()))}).then((function(e){var t=e.data.map((function(n){return n.split(",")}))||[];if(0==t.length)return Object(l["b"])({title:"该成员当日无轨迹信息"},"error",3e3);n.polyline=new AMap.Polyline({path:t,strokeColor:"#52c41a",strokeWeight:5,strokeOpacity:1,strokeStyle:"solid",zIndex:50}),n.polyline.setMap(n.map)})).catch((function(n){return console.log(n),Object(l["b"])({title:"该成员当日无轨迹信息"},"error",3e3)})))}}},d=p,u=(t("da9f"),t("2877")),f=Object(u["a"])(d,a,i,!1,null,null,null);e["default"]=f.exports},da9f:function(n,e,t){"use strict";t("303b")},f576:function(n,e,t){"use strict";var a=t("5ca1"),i=t("2e08"),o=t("a25f"),s=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);a(a.P+a.F*s,"String",{padStart:function(n){return i(this,n,arguments.length>1?arguments[1]:void 0,!0)}})},f66b:function(n,e,t){"use strict";t.d(e,"a",(function(){return i})),t.d(e,"b",(function(){return o}));var a=t("22b6");function i(n){return a["a"].post("project/project/positioning_list",{department_code:n})}function o(n){return a["a"].post("project/project/positioning_member",n)}}}]);