123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport"
- content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.min.css">
- <link rel="stylesheet" href="/static/head_office/head_office.css">
- <title>{$sys_info['value']} </title>
- </head>
- <body>
- <div class="nav-header">
- <div class="nav-left" id="clock"></div>
- <div class="nav-title">{$sys_info['value']}平台总公司大屏</div>
- <div class="nav-right">系统已正常运行{$day}天</div>
- </div>
- <div class="main">
- <div class="main1">
- <div class="main1-left">
- <div class="main1-left1">
- <div class="left1-one">
- <text class="left1-num" id="todoCount"></text>
- <text class="left1-title">今日工单总数</text>
- </div>
- <div class="left1-two" id="todoCompletion">
- </div>
- <div class="box-chart-text">
- <div class="box-chart-text-title">今日工单完成率</div>
- <div class="box-chart-text-count" id="article-chart-count"></div>
- </div>
- <div class="left1-there">
- <text class="left1-num" id="orgUserCount"></text>
- <text class="left1-title">项目总人数</text>
- </div>
- <div class="left1-four">
- <text class="left1-num" id="orgCount"></text>
- <text class="left1-title">总项目数</text>
- </div>
- <div class="left1-five">
- <text class="left1-num" id="escortCount"></text>
- <text class="left1-title">护工数</text>
- </div>
- </div>
- <div class="main1-left2">
- <div class="title">用户数据统计</div>
- <div class="userData" id="userDataEcharts"></div>
- </div>
- </div>
- <div class="main1-center" id="gdmap">
- <div class="title">项目分布及数据分析</div>
- <div class="orgRanking">
- <div class="org-title">本月满意度排名</div>
- <div class="org-name" >
- <div class="org-name-one" id="orgFirst">1.</div>
- <div class="org-name-one" id="orgSecond">2.</div>
- <div class="org-name-one" id="orgThird">3.</div>
- </div>
- </div>
- </div>
- <div class="main1-right">
- <div class="main1-right1">
- <div class="waste-all">
- <div class="waste-title">各项目医废数据统计</div>
- <div class="waste-date">
- <text class="month" id="thisMonth">本月</text>
- <text class="year" id="thisYear">本年</text>
- </div>
- </div>
- <div class="waste-data" id="wasteData"></div>
- </div>
- <div class="main1-right2">
- <div class="escort-all">
- <div class="escort-title">各项目陪护单数据统计</div>
- <div class="escort-date">
- <text class="month" id="thisMonthOne">本月</text>
- <text class="year" id="thisYearOne">本年</text>
- </div>
- </div>
- <div class="escort-data" id="escortData"></div>
- </div>
- </div>
- </div>
- <div class="main2">
- <div class="main2-left">
- <div class="todo-count-title">各项目本月工单统计</div>
- <div class="main-body">
- <div class="tablebox" id="todotable">
- <!-- 表头容器 -->
- <div class="tbl-header">
- <table border="0" cellspacing="0" cellpadding="0">
- <thead>
- <tr>
- <th style="text-align: left;padding-left: 30px">项目名称</th>
- <th style="text-align: right;padding-right: 30px">工单数量</th>
- </tr>
- </thead>
- <tbody style="opacity:0;"></tbody>
- </table>
- </div>
- <!-- 表格内容容器-->
- <div class="tbl-body">
- <table border="0" cellspacing="0" cellpadding="0">
- <thead>
- <tr>
- <th style="text-align: left;padding-left: 30px">项目名称</th>
- <th style="text-align: right;padding-right: 30px">工单数量</th>
- </tr>
- </thead>
- <tbody id="todoNumsCount">
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- <div class="main2-center">
- <div class="center-title">各项目工单指数数据统计</div>
- <div class="org-todo-data-count" id="orgTodoCount"></div>
- </div>
- <div class="main2-right">
- <div class="todo-count-title">可视化管理巡查数据分析</div>
- <div class="xc-img" id="patrolImg">
- </div>
- <div class="patrol" id="patrolData"></div>
- </div>
- </div>
- </div>
- </body>
- </html>
- <script src="/static/jquery-1.11.3.min.js"></script>
- <script src="https://webapi.amap.com/maps?v=1.4.15&key=8964cd514e753504076df304f1395aa7"></script>
- <script type="text/javascript" src="/static/echarts.js"></script>
- <script src="/static/head_office/js/china.js"></script>
- <script src="/static/head_office/js/mymap.js"></script>
- <script src="/static/head_office/swiper/swiper-bundle.min.js"></script>
- <script>
- var map;
- var todocate = 1;
- var scorecate = 1;
- var modecate = 1;
- var patrols = [];
- var patrolindex = 1;
- var text = document.title;
- var timer;
- var partoltimer;
- var MyMarhq;
- var MyMarhq2;
- var neworgs;
- var markers;
- var newidx = 0;
- var type = 1;
- var type2 = 1;
- $(window).resize(function(){
- location.reload()
- });
- $(function () {
- changeZoom();
- // 地图
- map = new AMap.Map('gdmap', {
- resizeEnable: true, //是否监控地图容器尺寸变化
- mapStyle: "amap://styles/darkblue",
- zoom: 12, //初始化地图层级
- center: [116.39, 39.9] //初始化地图中心点
- });
- setInterval(function () {
- let marker = markers[newidx];
- createWindowInfo(marker);
- if(newidx >= markers.length - 1){
- newidx = 0
- }else{
- newidx++
- }
- },6*1000);
- window.setInterval("realSysTime(clock)", 1000);
- });
- function changeZoom() {
- var wb = $(window).width()/1920;
- var hb = $(window).height()/1080;
- if(wb >= hb){
- $('body').css({
- 'zoom': hb,
- });
- }else{
- $('body').css({
- 'zoom': wb,
- });
- }
- }
- var text = document.title;
- var timer;
- function loadingTitle() {
- clearTimeout(timer);
- document.title = text.substring(1,text.length) + text.substring(0,1);
- text = document.title.substring(0,text.length);
- timer = setTimeout("loadingTitle()", 500)
- }
- loadingTitle();
- getCountNum();
- getTodoCompletion();
- getOrgUserCount();
- getOrgRanking();
- getOrgList();
- qiehuan();
- getTodoNumsCount();
- getTodoTimeLength();
- getPatrolImg();
- getPatrolRecord();
- getEscortCount();
- setInterval(function () {
- getCountNum();
- getTodoCompletion();
- getOrgUserCount();
- getOrgRanking();
- getOrgList();
- getTodoNumsCount();
- getTodoTimeLength();
- getPatrolImg();
- getPatrolRecord();
- getEscortCount();
- }, 1*60000);
- setInterval(function (){
- qiehuan();
- },6000)
- function qiehuan(){
- if(type == 1){
- $('#thisMonth').css('background-color','#002D89');
- $('#thisYear').css('background-color','');
- getWaste();
- type = 0;
- }else{
- $('#thisMonth').css('background-color','')
- $('#thisYear').css('background-color','#002D89')
- getWaste1();
- type = 1;
- }
- if(type2 == 1){
- $('#thisMonthOne').css('background-color','#002D89');
- $('#thisYearOne').css('background-color','');
- getEscortCount();
- type2 = 0;
- }else{
- $('#thisMonthOne').css('background-color','')
- $('#thisYearOne').css('background-color','#002D89')
- getEscortCount1();
- type2 = 1;
- }
- }
- function getCountNum(){
- var url = '/api/Headoffice/orgCount';
- $.post(url,{},function (res) {
- $('#todoCount').html(res.data.todoCount);
- $('#orgUserCount').html(res.data.userCount);
- $('#orgCount').html(res.data.orgCount);
- $('#escortCount').html(res.data.escortCount);
- $('#article-chart-count').html(res.data.todoCompletion);
- })
- }
- function getTodoCompletion(){
- var url = '/api/Headoffice/todoCompletion';
- $.post(url,{},function (res) {
- if(res.code == 0) {
- var lists = res.data;
- option = {
- color:['#FF7531','#6F7377'],
- series: [
- {
- type: 'pie',
- radius: ['85%', '100%'],
- avoidLabelOverlap: false,
- label: {
- show: false,
- position: 'center'
- },
- emphasis: {
- label: {
- show: true,
- fontSize: '40',
- fontWeight: 'bold'
- }
- },
- labelLine: {
- show: false
- },
- data: lists
- }
- ]
- };
- var myChart = echarts.init(document.getElementById('todoCompletion'));
- myChart.setOption(option);
- }
- })
- }
- function getOrgUserCount(){
- var url = '/api/Headoffice/userCount';
- $.post(url,{},function (res) {
- if(res.code == 0) {
- var lists = res.data;
- option = {
- color:['#995BE5','#F55699','#FFF265','#FF7723','#588AF0'],
- series: [
- {
- type: 'pie',
- radius: ['40%', '70%'],
- avoidLabelOverlap: false,
- minAngle: 1, // 设置每块扇形的最小占比
- hoverAnimation: false,
- label: {
- normal: {
- show : true,
- formatter: "{b}:{c}",
- textStyle: {
- fontSize: 12,
- color: "#fff",
- },
- }
- },
- data: lists,
- }
- ]
- };
- var myChart = echarts.init(document.getElementById('userDataEcharts'));
- myChart.setOption(option);
- }
- })
- }
- function getOrgRanking(){
- var url = '/api/Headoffice/orgRanking';
- $.post(url,{},function (res) {
- if(res.data.length > 0){
- $('#orgFirst').html('1.'+res.data[0].name);
- $('#orgSecond').html('2.'+res.data[1].name);
- $('#orgThird').html('3.'+res.data[2].name);
- }
- })
- }
- function getOrgList(){
- var url = '/api/Headoffice/orgList';
- $.post(url,{},function (res) {
- if(res.code == 0) {
- let orgs = res.data;
- let idx = 0;
- markers = [];
- newidx = 0;
- for(let o in orgs){
- if(orgs[o].lat && orgs[o].lng){
- let marker = new AMap.Marker({
- position: new AMap.LngLat(orgs[o].lng, orgs[o].lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
- title: orgs[o].name
- });
- marker.orgId = orgs[o].id;
- marker.orgName = orgs[o].name;
- marker.orgLat = orgs[o].lat;
- marker.orgLng = orgs[o].lng;
- marker.on('click',function (e) {
- console.log(e);
- createWindowInfo(marker);
- });
- map.add(marker);
- markers.push(marker);
- if(idx == 0){
- createWindowInfo(marker);
- }
- idx++;
- }
- }
- if(markers.length > 1){
- newidx = 1;
- }
- }
- })
- }
- //wasteData
- function getWaste(){
- var url = '/api/Headoffice/wasteCount';
- $.post(url,{},function (res) {
- if(res.code == 0) {
- var lists = res.data;
- option = {
- color:['#FFF265'],
- xAxis: {
- type: 'category',
- data: lists.x,
- axisLabel: {
- show: true,
- textStyle: {
- color: '#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- },
- axisLabel:{
- rotate:30
- }
- },
- yAxis: {
- name:'重量/kg',
- splitLine:{
- show:false
- },
- // 去掉背景的网格线
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- },
- series: [{
- data: lists.y,
- type: 'bar',
- barWidth:10
- }]
- };
- var myChart = echarts.init(document.getElementById('wasteData'));
- myChart.setOption(option);
- }
- })
- }
- //wasteData
- function getWaste1(){
- var url = '/api/Headoffice/wasteCount';
- $.post(url,{},function (res) {
- if(res.code == 0) {
- var lists = res.data;
- option = {
- color:['#FFF265'],
- xAxis: {
- type: 'category',
- data: lists.x,
- axisLabel: {
- show: true,
- textStyle: {
- color: '#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- },
- axisLabel:{
- rotate:30
- }
- },
- yAxis: {
- name:'重量/kg',
- splitLine:{
- show:false
- },
- // 去掉背景的网格线
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- },
- series: [{
- data: lists.y2,
- type: 'bar',
- barWidth:10
- }]
- };
- var myChart = echarts.init(document.getElementById('wasteData'));
- myChart.setOption(option);
- }
- })
- }
- //escort-date
- function getEscortCount(){
- var url = '/api/Headoffice/phCount';
- $.post(url,{},function (res) {
- if(res.code == 0) {
- var lists = res.data;
- option = {
- color:['#F55699'],
- xAxis: {
- type: 'category',
- data: lists.x,
- axisLabel: {
- show: true,
- textStyle: {
- color: '#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- },
- axisLabel:{
- rotate:30
- }
- },
- yAxis: {
- name:'数量',
- splitLine:{
- show:false
- },
- // 去掉背景的网格线
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- },
- series: [{
- data: lists.y,
- type: 'bar',
- barWidth:10
- }]
- };
- var myChart = echarts.init(document.getElementById('escortData'));
- myChart.setOption(option);
- }
- })
- }
- function getEscortCount1(){
- var url = '/api/Headoffice/phCount';
- $.post(url,{},function (res) {
- if(res.code == 0) {
- var lists = res.data;
- option = {
- color:['#F55699'],
- xAxis: {
- type: 'category',
- data: lists.x,
- axisLabel: {
- show: true,
- textStyle: {
- color: '#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- },
- axisLabel:{
- rotate:30
- }
- },
- yAxis: {
- name:'数量',
- splitLine:{
- show:false
- },
- // 去掉背景的网格线
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- },
- series: [{
- data: lists.y2,
- type: 'bar',
- barWidth:10
- }]
- };
- var myChart = echarts.init(document.getElementById('escortData'));
- myChart.setOption(option);
- }
- })
- }
- //todoNumsCount
- function getTodoNumsCount(){
- var url = '/api/Headoffice/todoCount';
- $.post(url,{},function (res) {
- if(res.code == 0) {
- var str = '';
- var lists = res.data;
- for (let o in lists){
- str += '<tr>';
- str += '<td><div style="width:65%!important;height: 35px;overflow: hidden;text-align: left;margin-left: 30px">'+lists[o].name+'</div></td>';
- str += '<td><div style="overflow: hidden;text-align: right;margin-right: 47px">'+lists[o].count+'</div></td>';
- str += '</tr>';
- }
- $('#todoNumsCount').html(str);
- }
- })
- }
- function getTodoTimeLength(){
- var url = '/api/Headoffice/todoTimeLength';
- $.post(url,{},function (res) {
- if(res.code == 0) {
- var lists = res.data;
- option = {
- color: ['#7D9AFB','#FEC006'],
- legend: {
- right:'5',
- data:['平均响应时长','平均完成时长'],
- textStyle:{
- color:'#fff',
- fontSize: 12,
- },
- },
- dataZoom: {
- show: false,
- start: 0,
- end: 100
- },
- xAxis: [
- {
- axisLabel: {
- show: true,
- textStyle: {
- color: '#fff'
- },
- rotate:30
- },
- axisLine: {
- lineStyle: {
- color: '#7D9AFB',//左边线的颜色
- width:'3'//坐标线的宽度
- }
- },
- type: 'category',
- boundaryGap: true,
- data: lists.x,
- },
- {
- type: 'category',
- boundaryGap: true,
- data: []
- }
- ],
- yAxis: [
- {
- splitLine:{
- show:false, //去掉网格线
- },
- // 去掉背景的网格线
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- },
- {
- type: 'value',
- name:'分钟',
- scale: true,
- // 去掉背景的网格线
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- },
- {
- type: 'value',
- scale: true,
- main:0,
- // name:'分钟',
- // boundaryGap: [0.2, 0.2],
- axisLabel: {
- textStyle: {
- color: '#fff'
- },
- },
- },
- ],
- series: [
- {
- name: '平均响应时长',
- type: 'bar',
- xAxisIndex: 1,
- yAxisIndex: 1,
- data:lists.y,
- barWidth :20,
- },
- {
- name: '平均完成时长',
- type: 'line',
- data:lists.y2,
- barWidth :20,
- }
- ]
- };
- var myChart = echarts.init(document.getElementById('orgTodoCount'));
- myChart.setOption(option);
- }
- })
- }
- function getPatrolImg(){
- var url = '/api/Headoffice/patrolImg';
- $.post(url,{},function (res) {
- var lists = res.data;
- if(res.code == 0) {
- var str = '';
- for(let i in lists){
- str += '<img src="'+lists[i].images+'" >';
- }
- $('#patrolImg').html(str);
- }
- })
- }
- function getPatrolRecord(){
- var url = '/api/Headoffice/patrolRecordCount';
- $.post(url,{},function (res) {
- if(res.code == 0) {
- var lists = res.data;
- option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- label: {
- backgroundColor: '#6a7985'
- }
- }
- },
- color: ['#9433D6','#1E8BFF','#E9179C'],
- legend: {
- data: ['巡检', '巡视', '巡查'],
- textStyle: {
- color: "#ffffff"
- }
- },
- toolbox: {
- // feature: {
- // saveAsImage: {}
- // }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [
- {
- type: 'category',
- boundaryGap: false,
- data: lists.date,
- axisLabel: {
- show: true,
- textStyle: {
- color: '#ffffff' //这里用参数代替了
- }
- },
- }
- ],
- yAxis: [
- {
- type: 'value',
- name:'数量',
- splitLine:{
- show:false
- },
- // 去掉背景的网格线
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- }
- ],
- series: [
- {
- name: '巡检',
- type: 'line',
- stack: '总量',
- smooth: true,
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: '#1E8BFF'
- }, {
- offset: 1,
- color: '#8340F4'
- }])
- },
- data: lists.count1,
- },
- {
- name: '巡视',
- type: 'line',
- stack: '总量',
- smooth: true,
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: '#B745FF'
- }, {
- offset: 1,
- color: '#208AF7'
- }])
- },
- data: lists.count2,
- },
- {
- name: '巡查',
- type: 'line',
- stack: '总量',
- smooth: true,
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: '#E9179C'
- }, {
- offset: 1,
- color: '#091759'
- }])
- },
- data: lists.count3,
- },
- ]
- };
- var myChart = echarts.init(document.getElementById('patrolData'));
- myChart.setOption(option);
- }
- })
- }
- function realSysTime(clock) {
- var now = new Date();
- var year = now.getFullYear(); //获取年份
- var month = now.getMonth(); //获取月份
- var date = now.getDate(); //获取日期
- var day = now.getDay(); //获取星期
- var hour = now.getHours(); //获取小时
- var minute = now.getMinutes(); //获取分钟
- var seconds = now.getSeconds(); //获取秒
- month = month + 1;
- var arr_week = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
- var week = arr_week[day];
- if (month<10) {
- month = '0'+month
- }
- if (date<10) {
- date = '0'+date
- }
- if (hour<10) {
- hour = '0'+hour
- }
- if (minute<10) {
- minute = '0'+minute
- }
- if (seconds<10) {
- seconds = '0'+seconds
- }
- var time = year + "年" + month + "月" + date + "日 " + week + " " + hour + ":" + minute + ":" + seconds;
- clock.innerHTML = time;
- }
- function createWindowInfo(marker) {
- let url = "/screen/Index/project?orgid="+marker.orgId;
- let content = [
- "<span style='color:#0045C6;'>"+marker.orgName+"</span>"
- ];
- // // 创建 infoWindow 实例
- let infoWindow = new AMap.InfoWindow({
- content: content.join("<br>"), //传入 dom 对象,或者 html 字符串
- offset: new AMap.Pixel(0, -30)
- });
- // 打开信息窗体
- infoWindow.open(map, marker.getPosition());
- map.setCenter(marker.getPosition());
- }
- </script>
|