webpackJsonp([13],{AToG:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("a3Yh"),s=a.n(i),n=a("oFZM"),r=a("ATWy"),l=a("55us"),o={data:function(){return s()({center:{lng:114.3162,lat:30.581084},zoom:12,map:null,areaName:"武汉市",siteName:"",siteListData:[],carListData:[],allData:[],vechieTypeList:[]},"map",null)},mounted:function(){this.init()},methods:{getSelections:function(){var t=this;Object(l.a)(["area","vechie_type","vechie_special_purpose"]).then(function(e){t.vechieTypeList=e.vechie_type,t.vechieSpecialPurposeList=e.vechie_special_purpose})},markerHandler:function(){var t=this;Object(n.d)().then(function(e){201===e.msg?e.respData&&e.respData.length>0&&(t.allData=e.respData,t.siteListData=e.respData):t.$message.error(e.content)})},init:function(){this.map=new BMapGL.Map("allmap"),this.map.centerAndZoom(new BMapGL.Point(defaultCenterPoint[0],defaultCenterPoint[1]),11),this.map.enableScrollWheelZoom(!0),this.getSelections(),this.markerHandler()},getBoundary:function(t){var e=this;(new BMapGL.Boundary).get(t,function(a){for(var i=a.boundaries.length,s=0;s<i;s++){var n=new BMapGL.Polygon(a.boundaries[s],{fillColor:"#"+(16777215*Math.random()<<0).toString(16),fillOpacity:.3});e.map.addOverlay(n),n.addEventListener("click",function(){e.getSiteListData(t)})}})},getSiteListData:function(t){this.areaName=t;var e=this.allData.filter(function(e){return e.areaName===t});this.siteListData=e||[],e&&e[0]||(this.siteName="",this.carListData=[])},getCarDataList:function(t){var e=this;t&&(this.siteName=t.siteName||"",Object(r.c)({siteId:t.id}).then(function(t){201===t.msg?e.carListData=t.respData||[]:(e.carListData=[],e.$message.error(t.content))}),this.map.centerAndZoom(new BMapGL.Point(t.siteLongitude,t.siteLatitude),18))},vechieTypeFormatter:function(t,e,a,i){var s=this.vechieTypeList.find(function(t){return t.val===a});return s?s.name:""},vechieUseStatusFormatter:function(t,e,a,i){return["","在用","闲置","其他"][a]||""},vechieSpecialPurposeFormatter:function(t,e,a,i){var s=this.vechieSpecialPurposeList.find(function(t){return t.val===a});return s?s.name:""},isPreHospitalVechieFormatter:function(t,e,a,i){return["","是","否"][a]||""}}},c={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"main-page siteQuery"},[a("div",{staticClass:"main-page-body"},[a("el-row",{staticStyle:{height:"100%"}},[a("el-col",{staticStyle:{height:"100%"},attrs:{span:12}},[a("div",{staticClass:"map"},[a("div",{staticStyle:{width:"100%",height:"100%"},attrs:{id:"allmap"}})])]),t._v(" "),a("el-col",{staticStyle:{height:"100%"},attrs:{span:12}},[a("div",{staticClass:"top main-table"},[a("div",{staticClass:"title"},[a("span",{staticClass:"bed"},[a("span",{staticClass:"red"},[t._v(t._s(t.areaName))]),t._v("站点信息")]),t._v(" （共"),a("span",{staticClass:"red"},[t._v(" "+t._s(t.siteListData.length)+" ")]),t._v("个站点）")]),t._v(" "),a("div",{staticClass:"table-box"},[a("el-table",{ref:"siteListData",attrs:{data:t.siteListData,"highlight-current-row":"",height:"100%"},on:{"current-change":t.getCarDataList}},[a("el-table-column",{attrs:{label:"序号",type:"index","min-width":"50px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"siteName",label:"站点名称","min-width":"180"}}),t._v(" "),a("el-table-column",{attrs:{prop:"siteLocation",label:"站点位置","min-width":"180"}}),t._v(" "),a("el-table-column",{attrs:{prop:"carCount",label:"车辆数","min-width":"80px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"hospitalName",label:"所在医疗机构","min-width":"180px"}})],1)],1)]),t._v(" "),a("div",{staticClass:"bottom main-table"},[a("div",{staticClass:"title"},[a("span",{staticClass:"bed"},[a("span",{staticClass:"red"},[t._v(t._s(t.siteName))]),t._v("车辆明细信息")]),t._v(" （共"),a("span",{staticClass:"red"},[t._v(" "+t._s(t.carListData.length)+" ")]),t._v("辆急救车）")]),t._v(" "),a("div",{staticClass:"table-box"},[a("el-table",{attrs:{data:t.carListData,height:"100%"}},[a("el-table-column",{attrs:{label:"序号",type:"index","min-width":"50px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"licensePlateNumber",label:"车牌号","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{prop:"vechieType",label:"车辆类型","min-width":"120",formatter:t.vechieTypeFormatter}}),t._v(" "),a("el-table-column",{attrs:{prop:"vechieUseStatus",label:"车辆状态","min-width":"80",formatter:t.vechieUseStatusFormatter}}),t._v(" "),a("el-table-column",{attrs:{prop:"vechieSpecialPurpose",label:"车辆特殊用途","min-width":"120",formatter:t.vechieSpecialPurposeFormatter}}),t._v(" "),a("el-table-column",{attrs:{prop:"isPreHospitalVechie",label:"是否院前急救车","min-width":"80",formatter:t.isPreHospitalVechieFormatter}}),t._v(" "),a("el-table-column",{attrs:{prop:"vehicleUsingUnit",label:"车辆使用单位","min-width":"180"}})],1)],1)])])],1)],1)])},staticRenderFns:[]};var p=a("C7Lr")(o,c,!1,function(t){a("RGSm")},null,null);e.default=p.exports},RGSm:function(t,e){}});
//# sourceMappingURL=13.9e56559b8e9dc1fa51ba.1626919428218.js.map