diff --git a/public/dashboard/index.html b/public/dashboard/index.html index 595d258..41e49e6 100644 --- a/public/dashboard/index.html +++ b/public/dashboard/index.html @@ -31,12 +31,12 @@ -
- -
驾驶舱 +
+ +
@@ -96,7 +96,7 @@

最新陪护单信息

- +
@@ -151,44 +151,8 @@

上月满意度评价分析

-
张** 第一人民医院内科楼15床
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
工号103 -
-
100
 
工号267 -
-
90
 
工号032 -
-
80
 
工号011 -
-
60
+
@@ -228,13 +192,8 @@ }, { name: "武进区中医院", - lat: 31.783091, - lng: 119.893227 - }, - { - name: "武进区中医院", - lat: 31.783091, - lng: 119.893227 + lat: 31.725018, + lng: 119.941279 } ]; var paramedicChart = [{ @@ -336,7 +295,17 @@ projectChartY.push(item.total) }) // 最近订单 lastOrder - + var lasts = datas.lastOrder + $(".last").empty("") + lasts.map(item=>{ + var contactName = item.contact? + item.contact.charAt(0) + item.contact.slice(1).replace(new RegExp(item.contact.charAt(1), "g"), '*') + :'**' + $(".last").append("" + +contactName+""+item.project.name+""+ + ""+item.status_name+""+ + "") + }) // 最新出院 outOrder var outs = datas.outOrder $(".outOrder").empty("") @@ -358,10 +327,23 @@ :'**' $(".tip").append(""+ contactName+"评价:"+item.comment+""+ - ""+item.project.name+""+ + ""+item.project.name+""+ "") }) - console.log("result", result) + // 满意度 satisfied + var satisfieds = datas.satisfied + $(".satisfied").empty("") + satisfieds.map((item,index)=>{ + var score = parseInt(item.score)*20 + var per = score +'%' + $(".satisfied").append(""+item.paramedic.name+""+ + "
"+ + ""+score+"分"+ + " ") + }) + $('.skillbar').skillbar({ + speed: 1000, + }); initChart() }, complete: function(xhr, textStatus) { @@ -370,19 +352,18 @@ }); } - $('.skillbar').skillbar({ - speed: 1000, - }); + // 图表 function initChart() { // 护工陪护实时概况 var option = { + tooltip:{}, series: [{ // name:'访问量', type: 'pie', color: ["#04c6c7", "#ffc34a"], - radius: '70%', + radius: '50%', data: paramedicChart }] }; @@ -390,6 +371,7 @@ myChart.setOption(option); // 床位陪护实时概况 var option1 = { + tooltip:{}, series: [{ type: 'pie', color: ["#04c6c7", "#ffc34a"], @@ -432,6 +414,7 @@ }, axisLabel: { interval: 0, + rotate: 20, textStyle: { color: '#fff', fontSize: '14px' @@ -526,6 +509,23 @@ var option4; option4 = { + tooltip:{ + trigger: 'axis', + formatter: function (params) { + let tooltipContent = ''; + var xAxisName = params[0].name; + // 添加X轴名称到提示框内容 + tooltipContent += `

${xAxisName}

` + params.forEach((param) => { + tooltipContent += `

${param.seriesName}: ${param.value}

`; + }); + return tooltipContent; + }, + }, + grid:{ + top:"10%", + bottom:"30%" + }, color: ['#018fff'], lineStyle: { color: '#018fff' @@ -567,6 +567,7 @@ }, axisLabel: { interval: 0, + rotate: 20, textStyle: { color: '#fff', fontSize: '14px' @@ -630,44 +631,25 @@ center: center, //设置地图中心点坐标 }); //初始化marker - marker = new TMap.MultiMarker({ - id: "marker-layer", //图层id - map: map, - styles: { //点标注的相关样式 - "marker": new TMap.MarkerStyle({ - "width": 25, - "height": 35, - "anchor": { - x: 16, - y: 32 - }, - "src": "https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/markerDefault.png" - }) - }, - geometries: [{ //点标注数据数组 - "id": "demo", - "styleId": "marker", - "position": center, - "properties": { - "title": "marker" - } - }] - }); - window.setInterval(function() { - //panToHospital(); - }, 3000); + + panToHospital() } function panToHospital() { - current_hospital++; - if (current_hospital == hospitals.length) { - current_hospital = 0; - } - var center = new TMap.LatLng(hospitals[current_hospital].lat, hospitals[current_hospital].lng); - map.panTo(center); + var geometriesArr = [] + hospitals.map(item=>{ + var center = new TMap.LatLng(item.lat, item.lng); + var mark = { //点标注数据数组 + "id": "demo", + "styleId": "marker", + "position": center, + "properties": { + "title": "marker" + } + } + geometriesArr.push(mark) + }) - marker.setMap(null); - marker = null; marker = new TMap.MultiMarker({ id: "marker-layer", //图层id map: map, @@ -682,14 +664,7 @@ "src": "https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/markerDefault.png" }) }, - geometries: [{ //点标注数据数组 - "id": "demo", - "styleId": "marker", - "position": center, - "properties": { - "title": "marker" - } - }] + geometries: geometriesArr }); } diff --git a/public/dashboard/index copy.html b/public/dashboard/index2.html similarity index 100% rename from public/dashboard/index copy.html rename to public/dashboard/index2.html