diff --git a/src/views/pageMonitor/bottomLeft/OpHistogram.vue b/src/views/pageMonitor/bottomLeft/OpHistogram.vue index 123bf06..d048d16 100644 --- a/src/views/pageMonitor/bottomLeft/OpHistogram.vue +++ b/src/views/pageMonitor/bottomLeft/OpHistogram.vue @@ -85,6 +85,12 @@ export default { data() { return { labels: ["择期", "急诊", "日间", "门诊"], + fields: [ + "electiveCount", + "emergencyCount", + "daySurgeryCount", + "outSurgeryCount", + ], seriesData: [ { label: "择期", @@ -235,10 +241,11 @@ export default { }, label: { show: true, // 显示数值 - position: "insideTop", // 数值显示的位置 + position: "outsideTop", // 数值显示的位置 textStyle: { //数值样式 color: "#fff", + padding: [0, 0, 0, 7], }, formatter: function (data) { let txt = ""; @@ -301,14 +308,19 @@ export default { }, wrapData(list) { let that = this; - that.labels = []; + // that.labels = []; that.seriesData = []; list.forEach((item) => { - that.labels.push(item.deptName); - that.seriesData.push({ - label: item.deptName, - value: [item.deptCount], - isHave: false, + that.fields.forEach((a, index) => { + for (let key in item) { + if (a == key) { + that.seriesData.push({ + label: that.labels[index], + value: [item[key]], + isHave: false, + }); + } + } }); }); }, diff --git a/src/views/pageMonitor/bottomRight/DepHistogram.vue b/src/views/pageMonitor/bottomRight/DepHistogram.vue index 50b392c..557c6e2 100644 --- a/src/views/pageMonitor/bottomRight/DepHistogram.vue +++ b/src/views/pageMonitor/bottomRight/DepHistogram.vue @@ -247,6 +247,7 @@ export default { textStyle: { //数值样式 color: "#fff", + padding: [0, 0, 0, 7], }, formatter: function (data) { let txt = "";