提交 44fd8c43 编写于 作者: zhentian.jia's avatar zhentian.jia

UI回测问题解决

上级 0d557844
...@@ -14,9 +14,10 @@ export function dustributeOption(legendData, seriesData) { ...@@ -14,9 +14,10 @@ export function dustributeOption(legendData, seriesData) {
}, },
label: { label: {
// formatter: "{d}%", // formatter: "{d}%",
// color: '#000000',
formatter:function(data){ return data.percent.toFixed(1)+"%";} formatter:function(data){ return data.percent.toFixed(1)+"%";}
}, },
color: ['#FF9A4B', '#FFBC3D', '#39AF9A', '#3BA0FF', '#5D7092'], color: ['#FF9A4B', '#39AF9A', '#FFB01B', '#3BA0FF', '#5D7092'],
legend: { legend: {
orient: "horizontal", orient: "horizontal",
top: "", top: "",
...@@ -27,9 +28,10 @@ export function dustributeOption(legendData, seriesData) { ...@@ -27,9 +28,10 @@ export function dustributeOption(legendData, seriesData) {
{ {
name: "", name: "",
type: "pie", type: "pie",
radius: "60%", radius: [0, "78%"],
center: ["50%", "50%"], center: ["50%", "59%"],
data: seriesData, data: seriesData,
itemStyle: { itemStyle: {
emphasis: { emphasis: {
shadowBlur: 10, shadowBlur: 10,
...@@ -66,15 +68,15 @@ export function recordOption(legendData, xAxisData, seriesData) { ...@@ -66,15 +68,15 @@ export function recordOption(legendData, xAxisData, seriesData) {
} }
relVal += value + "人"; relVal += value + "人";
let divList = []; let divList = [];
divList[0] = "<div style='background: #3BA0FF;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>"; divList[0] = "<div style='background: #5D7092;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>";
divList[1] = "<div style='background: #FF9A4B;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>"; divList[1] = "<div style='background: #39AF9A;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>";
divList[2] = "<div style='background: #FFB01B;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>"; divList[2] = "<div style='background: #FFB01B;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>";
divList[3] = "<div style='background: #39AF9A;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>"; divList[3] = "<div style='background: #FF9A4B;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>";
divList[4] = "<div style='background: #5D7092;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>"; divList[4] = "<div style='background: #3BA0FF;height: 12px;width: 20px;margin: 5px 5px 0 2px;float: left;border-radius:2px;'></div>";
for (let j = params.length - 1; j >= 0; j--) { for (let j = params.length - 1 , k = 0; j >= 0; j-- , k++) {
if(value != 0) { if(value != 0) {
relVal += relVal +=
"<br/>" + divList[j] + "<br/>" + divList[k] +
params[j].seriesName + params[j].seriesName +
"占比: " + "占比: " +
( (
...@@ -84,7 +86,7 @@ export function recordOption(legendData, xAxisData, seriesData) { ...@@ -84,7 +86,7 @@ export function recordOption(legendData, xAxisData, seriesData) {
"%"; "%";
} else { } else {
relVal += relVal +=
"<br/>" + divList[j] + "<br/>" + divList[k] +
params[j].seriesName + params[j].seriesName +
"占比: "+ "0%"; "占比: "+ "0%";
} }
...@@ -94,11 +96,12 @@ export function recordOption(legendData, xAxisData, seriesData) { ...@@ -94,11 +96,12 @@ export function recordOption(legendData, xAxisData, seriesData) {
}, },
color: ['#3BA0FF', '#FF9A4B', '#FFB01B', '#39AF9A', '#5D7092'], color: ['#3BA0FF', '#FF9A4B', '#FFB01B', '#39AF9A', '#5D7092'],
legend: { legend: {
right: "3%",
data: legendData, data: legendData,
}, },
grid: { grid: {
left: "3%", left: "3%",
right: "4%", right: "3%",
bottom: "3%", bottom: "3%",
containLabel: true containLabel: true
}, },
...@@ -175,11 +178,12 @@ export function certificateOption(xAxisData, seriesJoin, seriesCert, seriesRate, ...@@ -175,11 +178,12 @@ export function certificateOption(xAxisData, seriesJoin, seriesCert, seriesRate,
right:"10%", right:"10%",
}, },
legend: { legend: {
right: '6%',
data: legendData, data: legendData,
}, },
grid: { grid: {
left: 20, left: '3%',
right: 20, right: '3%',
containLabel: true containLabel: true
}, },
xAxis: [ xAxis: [
...@@ -377,11 +381,13 @@ export function educationEffect(xAxisData, seriesBefore, seriesAfter) { ...@@ -377,11 +381,13 @@ export function educationEffect(xAxisData, seriesBefore, seriesAfter) {
}, },
color: ["#FEBB3C", "#39AF9A"], color: ["#FEBB3C", "#39AF9A"],
legend: { legend: {
right: "3%",
data: ["项目前总正确率", "项目后总正确率"] data: ["项目前总正确率", "项目后总正确率"]
}, },
grid: { grid: {
top: '20%',
left: "3%", left: "3%",
right: "4%", right: "3%",
bottom: "3%", bottom: "3%",
containLabel: true containLabel: true
}, },
...@@ -399,8 +405,9 @@ export function educationEffect(xAxisData, seriesBefore, seriesAfter) { ...@@ -399,8 +405,9 @@ export function educationEffect(xAxisData, seriesBefore, seriesAfter) {
min: 0, min: 0,
max: 100, max: 100,
type: "value", type: "value",
name: "正确率 (%)",
axisLabel: { axisLabel: {
formatter: "{value} %" formatter: "{value}%"
}, },
axisLine: { //隐藏轴线 axisLine: { //隐藏轴线
show: false show: false
...@@ -474,9 +481,11 @@ export function knowledgeEffect(xAxisData, seriesBefore, seriesAfter) { ...@@ -474,9 +481,11 @@ export function knowledgeEffect(xAxisData, seriesBefore, seriesAfter) {
right:"10%", right:"10%",
}, },
legend: { legend: {
right: 20,
data: ["培训前正确率", "培训后正确率"] data: ["培训前正确率", "培训后正确率"]
}, },
grid: { grid: {
top: '20%',
left: 20, left: 20,
right: 20, right: 20,
containLabel: true containLabel: true
...@@ -499,6 +508,7 @@ export function knowledgeEffect(xAxisData, seriesBefore, seriesAfter) { ...@@ -499,6 +508,7 @@ export function knowledgeEffect(xAxisData, seriesBefore, seriesAfter) {
min: 0, min: 0,
max: 100, max: 100,
type: "value", type: "value",
name: "正确率 (%)",
axisLine: { //隐藏轴线 axisLine: { //隐藏轴线
show: false show: false
}, },
...@@ -506,7 +516,7 @@ export function knowledgeEffect(xAxisData, seriesBefore, seriesAfter) { ...@@ -506,7 +516,7 @@ export function knowledgeEffect(xAxisData, seriesBefore, seriesAfter) {
show: false show: false
}, },
axisLabel: { axisLabel: {
formatter: "{value} %" formatter: "{value}%"
} }
}, },
series: [ series: [
......
...@@ -388,7 +388,7 @@ export function getPicOption(title, legendData, colorData, seriesData) { ...@@ -388,7 +388,7 @@ export function getPicOption(title, legendData, colorData, seriesData) {
legend: { legend: {
orient: "vertical", orient: "vertical",
top: "center", top: "center",
right: "right", right: "26",
data: legendData data: legendData
}, },
grid: { grid: {
...@@ -403,8 +403,8 @@ export function getPicOption(title, legendData, colorData, seriesData) { ...@@ -403,8 +403,8 @@ export function getPicOption(title, legendData, colorData, seriesData) {
{ {
name: "", name: "",
type: "pie", type: "pie",
radius: "55%", radius: [0, '55%'],
center: ["40%", "55%"], center: ["50%", "57.2%"],
data: seriesData, data: seriesData,
} }
] ]
...@@ -419,16 +419,17 @@ export function getBarOption(xAxisData, seriesData) { ...@@ -419,16 +419,17 @@ export function getBarOption(xAxisData, seriesData) {
left: '20px', left: '20px',
top: "20px", top: "20px",
}, },
color: ['#5B8FF9'], color: ['rgba(91, 143, 249, 0.85)'],
backgroundColor: '#FFFFFF', backgroundColor: '#FFFFFF',
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: "{b} : {c} " formatter: "{b} : {c} "
}, },
grid: { grid: {
left: '3%', top: '84',
right: '4%', bottom: '36',
bottom: '3%', left: '20',
right: '20',
containLabel: true containLabel: true
}, },
xAxis: [ xAxis: [
...@@ -721,6 +722,9 @@ export function getHospitalIdList(data) { ...@@ -721,6 +722,9 @@ export function getHospitalIdList(data) {
return listArr; return listArr;
} }
export function learnTimeValue(value) { export function learnTimeValue(value) {
if(value === null || value === '') {
return '-';
}
let s = parseInt(value),m = 0, h = 0;//秒,分,小时 let s = parseInt(value),m = 0, h = 0;//秒,分,小时
if(s==NaN){//错误error if(s==NaN){//错误error
return ''; return '';
......
<template> <template>
<div class="course-analysis-wrap"> <div class="course-analysis-wrap">
<div class="box-list"> <div class="box-list">
<div v-for="(item , index) in cardData" :key="index" class="box-card" v-bind:class="{ 'box-last': index == 2 }"> <div class="box-min">
<!-- <el-card class="box-card" v-bind:class="{ 'box-last': index == 2 }"> --> <div v-for="(item , index) in cardData" :key="index" class="box-card" v-bind:class="{ 'box-last': index == 2 }">
<p class="value">{{ item.value }}</p> <p class="value">{{ item.value }}</p>
<p class="title">{{ item.title }}</p> <p class="title">{{ item.title }}</p>
<!-- </el-card> --> </div>
</div> </div>
</div> </div>
<div class="spacing"></div> <div class="spacing"></div>
...@@ -296,6 +296,12 @@ export default { ...@@ -296,6 +296,12 @@ export default {
position: relative; position: relative;
height: 120px; height: 120px;
background: #f0f2f5; background: #f0f2f5;
overflow-x: auto;
overflow-y: hidden;
.box-min {
height: 120px;
min-width: 950px;
}
.box-card { .box-card {
position: relative; position: relative;
background-color: #ffffff; background-color: #ffffff;
......
...@@ -291,7 +291,7 @@ export default { ...@@ -291,7 +291,7 @@ export default {
let educationList = data; let educationList = data;
let legendData = []; let legendData = [];
let seriesData = []; let seriesData = [];
let colorData = ["#7453FF", "#3BA0FF", "#5D7092", "#39AF9A", "#FFBC3D", "#FF9A4B", "#8A2BE2"]; let colorData = ["#7453FF", "#3BA0FF", "#5D7092", "#39AF9A", "#FFBC3D", "#FF9A4B", "#B87F00"];
for (let i = 0; i < educationList.length; i++) { for (let i = 0; i < educationList.length; i++) {
legendData[i] = educationList[i].name; legendData[i] = educationList[i].name;
...@@ -319,7 +319,7 @@ export default { ...@@ -319,7 +319,7 @@ export default {
let titleList = data; let titleList = data;
let legendData = []; let legendData = [];
let seriesData = []; let seriesData = [];
let colorData = ["#3BA0FF", "#366BCB", "#39AF9A", "#FFBC3D", "#FFBC3D", "#67E0E3", "#8A2BE2"]; let colorData = ["#3BA0FF", "#366BCB", "#39AF9A", "#FFBC3D", "#FFBC3D", "#67E0E3", "#B87F00"];
for (let i = 0; i < titleList.length; i++) { for (let i = 0; i < titleList.length; i++) {
legendData[i] = titleList[i].name; legendData[i] = titleList[i].name;
seriesData[i] = titleList[i]; seriesData[i] = titleList[i];
...@@ -449,7 +449,7 @@ export default { ...@@ -449,7 +449,7 @@ export default {
} }
.sex { .sex {
position: relative; position: relative;
top: 42px; top: 67px;
left: 0; left: 0;
.sex-item { .sex-item {
float: left; float: left;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="data-all-wrap"> <div class="data-all-wrap">
<div v-if="dataType == 0" class="data-chart"> <div v-if="dataType == 0" class="data-chart">
<div class="box-list"> <div class="box-list">
<!-- <div v-for="(item , index) in cardData" :key="index" class="box"> --> <div class="box-min">
<div v-for="(item , index) in cardData" :key="index" class="box-card" v-bind:class="{ 'box-last': index == 2 }"> <div v-for="(item , index) in cardData" :key="index" class="box-card" v-bind:class="{ 'box-last': index == 2 }">
<el-tooltip v-if="index == 2" class="item-tool" placement="bottom-end" effect="light"> <el-tooltip v-if="index == 2" class="item-tool" placement="bottom-end" effect="light">
<div slot="content"> <div slot="content">
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<p class="should">{{ item.shouldKey }}:{{ item.shouldNum | toThousands }}</p> <p class="should">{{ item.shouldKey }}:{{ item.shouldNum | toThousands }}</p>
</div> </div>
</div> </div>
<!-- </div> --> </div>
</div> </div>
<div class="date-table"> <div class="date-table">
<el-tabs class="change-range" v-model="checkRange" type="card" @tab-click="handleCheckRange"> <el-tabs class="change-range" v-model="checkRange" type="card" @tab-click="handleCheckRange">
...@@ -848,6 +848,7 @@ export default { ...@@ -848,6 +848,7 @@ export default {
} }
index++; index++;
} }
let colorValue = ['#5D7092', '#39AF9A', '#FFB01B', '#FF9A4B', '#3BA0FF'];
for(let z = 0; z < seriesArr.length ; z++) { for(let z = 0; z < seriesArr.length ; z++) {
let seriesObj = { let seriesObj = {
name: seriesName[z], name: seriesName[z],
...@@ -860,6 +861,9 @@ export default { ...@@ -860,6 +861,9 @@ export default {
rotate: -90, rotate: -90,
} }
}, },
itemStyle: {
color: colorValue[seriesArr.length - z -1],
},
data: seriesArr[z], data: seriesArr[z],
}; };
seriesData.push(seriesObj); seriesData.push(seriesObj);
...@@ -1003,11 +1007,14 @@ export default { ...@@ -1003,11 +1007,14 @@ export default {
} }
.box-list { .box-list {
position: relative; position: relative;
padding: 30px 30px 0 30px; margin: 30px 30px 0 30px;
height: 136px; height: 120px;
// .box { overflow-x: auto;
// height: 106px; overflow-y: hidden;
// } .box-min {
height: 106px;
min-width: 1050px;
}
.box-card { .box-card {
position: relative; position: relative;
background-color: #F1F7F6; background-color: #F1F7F6;
...@@ -1178,7 +1185,7 @@ export default { ...@@ -1178,7 +1185,7 @@ export default {
.distributeChart { .distributeChart {
position: relative; position: relative;
// float: left; // float: left;
margin: 0 auto; margin: 0 auto 30px auto;
// width: 70%; // width: 70%;
width: 618px; width: 618px;
height: 320px; height: 320px;
...@@ -1186,13 +1193,13 @@ export default { ...@@ -1186,13 +1193,13 @@ export default {
.data-text { .data-text {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; left: 50%;
width: 30%; margin-left: 307px;
height: 320px; height: 320px;
width: 30%;
.content-text { .content-text {
position: relative; position: relative;
margin-top: 78px; margin-top: 78px;
margin-left: 35%;
text-align: left; text-align: left;
p { p {
margin-top: 20px; margin-top: 20px;
...@@ -1225,7 +1232,7 @@ export default { ...@@ -1225,7 +1232,7 @@ export default {
height: 416px; height: 416px;
.content-text { .content-text {
position: relative; position: relative;
margin-top: 100px; margin-top: 56px;
text-align: left; text-align: left;
p { p {
margin-top: 20px; margin-top: 20px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册