提交 a43fcd3e 编写于 作者: guangjun.yang's avatar guangjun.yang

对接新接口、新UI等

上级 695eee7d
......@@ -5,18 +5,8 @@
</div>
</template>
<script>
import { format } from "path";
let vm = null;
let paramData = [
"生活方\n式干预",
"生活方\n式",
"本科",
"大专",
"中专以下",
"大专",
"中专以下",
"中专以下"
];
// let chartColumn = null;
export default {
props: {
id: {
......@@ -34,27 +24,60 @@ export default {
"#76d2d2"
]
},
paramData: {
dataList: {
type: Array,
default: () => [
"生活方\n式干预",
"生活方\n式",
"本科",
"大专",
"中专以下",
"大专",
"中专以下",
"中专以下"
]
default: () => []
}
},
data() {
return {
chartWidth: "300px",
chartHeight: "350px",
options: {
// color: vm.colors,
color: ["#FFB01B", "#39AF9A"],
};
},
watch: {
dataList: {
handler(newVal) {
let yAxisData = [], series0Data = [], series1Data = []
yAxisData = newVal.map( item => {
return item.classifyName
})
series0Data = this.dataList.map( item => {
return item.beforeRate
})
series1Data = this.dataList.map( item => {
return item.afterRate
})
this.drawColumn(yAxisData, series0Data, series1Data);
},
deep: false
}
},
created() {
if (process.client) {
let clientWidth =
window.outerWidth ||
document.body.clientWidth ||
document.documentElement.clientWidth;
this.chartWidth = clientWidth + "px";
this.chartHeight = 54 * 3 + "px";
// this.chartHeight = 54 * this.dataList.length + "px";
}
},
mounted() {
vm = this;
// chartColumn = this.$echarts.init(document.getElementById(this.id));
this.drawColumn([], [], []);
},
methods: {
// 画
drawColumn(yAxisData, series0Data, series1Data) {
let chartColumn = this.$echarts.init(document.getElementById(this.id));
// 基于准备好的dom,初始化echarts实例
// 绘制图表
let options = {
color: vm.colors,
tooltip: {
trigger: "axis",
axisPointer: {
......@@ -106,7 +129,7 @@ export default {
yAxis: {
axisTick: false,
type: "category",
data: paramData,
data: yAxisData,
textStyle: {
fontSize: 12,
color: "#676869"
......@@ -132,7 +155,8 @@ export default {
series: [
{
name: "培训前正确率",
data: [12, 200, 150, 80, 70, 110, 130, 130],
data: series0Data,
// data: [12, 200, 150, 80, 70, 110, 130, 130],
type: "bar",
barWidth: 15, //柱图宽度
label: {
......@@ -145,7 +169,8 @@ export default {
},
{
name: "培训后正确率",
data: [120, 20, 160, 80, 70, 110, 130, 130],
data: series1Data,
// data: [120, 20, 160, 80, 70, 110, 130, 130],
type: "bar",
barWidth: 15, //柱图宽度
label: {
......@@ -157,135 +182,8 @@ export default {
}
}
]
}
};
},
created() {
if (process.client) {
let clientWidth =
window.outerWidth ||
document.body.clientWidth ||
document.documentElement.clientWidth;
this.chartWidth = clientWidth + "px";
this.chartHeight = 54 * this.paramData.length + "px";
}
},
mounted() {
vm = this;
this.drawColumn();
},
methods: {
// 画
drawColumn() {
// 基于准备好的dom,初始化echarts实例
let chartColumn = this.$echarts.init(document.getElementById(this.id));
// 绘制图表
// let options = {
// color: vm.colors,
// tooltip: {
// trigger: "axis",
// axisPointer: {
// // 坐标轴指示器,坐标轴触发有效
// type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
// }
// },
// legend: {
// show: false,
// top: 20,
// data: ["培训前正确率", "培训后正确率"],
// textStyle: {
// fontSize: 12,
// // fontWeight: "bolder",
// color: "#676869"
// }
// },
// grid: {
// top: "2%",
// left: "3%",
// right: "6%",
// bottom: "0%",
// containLabel: true,
// borderWidth: 0
// },
// lineStyle: {
// color: "#fff"
// },
// xAxis: {
// axisTick: false,
// type: "value",
// axisLabel: {
// show: false,
// formatter: "{value}",
// textStyle: {
// color: "#676869"
// }
// },
// axisLine: {
// lineStyle: {
// color: "#676869",
// width: 0
// }
// },
// splitLine: {
// show: false
// }
// },
// yAxis: {
// axisTick: false,
// type: "category",
// data: vm.paramData,
// textStyle: {
// fontSize: 12,
// color: "#676869"
// },
// splitLine: {
// show: false
// },
// axisLabel: {
// formatter: "{value}",
// textAlign: "left",
// textStyle: {
// textAlign: "left",
// color: "#676869"
// }
// },
// axisLine: {
// lineStyle: {
// color: "#676869",
// width: 0
// }
// }
// },
// series: [
// {
// name: "培训前正确率",
// data: [12, 200, 150, 80, 70, 110, 130, 130],
// type: "bar",
// barWidth: 15, //柱图宽度
// label: {
// normal: {
// formatter: "{c}%",
// show: true,
// position: "inside"
// }
// }
// },
// {
// name: "培训后正确率",
// data: [120, 20, 160, 80, 70, 110, 130, 130],
// type: "bar",
// barWidth: 15, //柱图宽度
// label: {
// normal: {
// formatter: "{c}%",
// show: true,
// position: "inside"
// }
// }
// }
// ]
// };
chartColumn.setOption(this.options);
chartColumn.setOption(options);
}
}
};
......
......@@ -33,20 +33,10 @@ export default {
chartHeight: "350px"
};
},
created() {
if (process.client) {
let clientWidth =
window.outerWidth ||
document.body.clientWidth ||
document.documentElement.clientWidth;
this.chartWidth = (clientWidth * 0.9).toFixed(0) + 'px';
}
},
watch: {
dataList: {
handler(newVal) {
let yAxisData = [], series0Data = [], series1Data = []
yAxisData = newVal.map( item => {
return item.classifyName
......@@ -62,16 +52,25 @@ export default {
deep: false
}
},
created() {
if (process.client) {
let clientWidth =
window.outerWidth ||
document.body.clientWidth ||
document.documentElement.clientWidth;
this.chartWidth = (clientWidth * 0.9).toFixed(0) + 'px';
}
},
mounted() {
vm = this;
this.drawColumn([], [], []);
},
methods: {
//
// 绘制图表
drawColumn(yAxisData, series0Data, series1Data) {
// 基于准备好的dom,初始化echarts实例
chartColumn = this.$echarts.init(document.getElementById(this.id));
// 绘制图表
let options = {
color: vm.colors,
tooltip: {
......
<template>
<div class="pop-notice-wrapper">
<div class="mask"></div>
<div class="content">
<div class="top">
<span class="title">公告提醒</span>
<span class="body">该项目已于2019年12月1日<span class="b">停止发放项目证书</span>,但仍可以继续学习该项目</span>
</div>
<div class="line"></div>
<div class="bottom">
<span @click="clickNotice">我知道了</span>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
};
},
props: {
popText: {
type: String,
default: ""
},
btnText: {
type: String,
default: ""
}
},
methods: {
clickNotice() {
this.$emit('clickNotice')
}
},
};
</script>
<style lang="scss" scoped>
@import "../../style/mixin";
.pop-notice-wrapper {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 110;
font-size: px2rem(20px);
.mask {
position: absolute;
background: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
z-index: 111;
}
.content {
position: absolute;
left: 50%;
top: 50%;
z-index: 112;
width: px2rem(300px);
height: px2rem(185px);
margin: px2rem(-150px) 0 0 px2rem(-150px);
border-radius: px2rem(7px);
text-align: center;
background: #fff;
.top {
padding: px2rem(30px);
.title {
display: block;
font-size: px2rem(18px);
height: px2rem(18px);
line-height: px2rem(18px);
font-weight: 400;
color: #333333;
}
.body {
text-align: left;
display: block;
margin: px2rem(14px) 0;
font-size: px2rem(14px);
height: px2rem(21px);
line-height: px2rem(21px);
font-weight: 400;
color: #676869;
.b {
font-weight: 700;
}
}
}
.line {
width: px2rem(300px);
height: px2rem(1px);
background:rgba(240,241,242,1);
}
.bottom {
text-align: center;
// margin-top: px2rem(14px);
font-size: px2rem(17px);
height: px2rem(50px);
line-height: px2rem(50px);
font-weight: 400;
span {
color: #449284;
}
}
}
}
</style>
......@@ -2,10 +2,10 @@
<template>
<ul class="common-area-select">
<li class="center" @click="areaClick">
{{areaName}}<img src="../../assets/images/arr-down.png"/>
{{areaName}}<img v-show="!showArea" src="../../assets/images/arr-down.png"/><img v-show="showArea" src="../../assets/images/arr-up.png"/>
</li>
<li class="center" @click="orgClick">
{{orgName}}<img src="../../assets/images/arr-down.png"/>
{{orgName}}<img v-show="!showOrg" src="../../assets/images/arr-down.png"/><img v-show="showOrg" src="../../assets/images/arr-up.png"/>
</li>
<!-- <li class="center" @click="orgClick">
{{orgName}}<img src="../../assets/images/left-array-black.png"/>
......@@ -17,13 +17,24 @@ export default {
props: {
areaName: {
type: String,
default: "全部区域"
default: "全部"
},
orgName: {
type: String,
default: "全部机构"
},
showArea: {
type: Boolean,
default: false,
},
showOrg: {
type: Boolean,
default: false
}
},
// watch: {
// },
methods: {
areaClick() {
this.$emit("areaClick");
......@@ -58,9 +69,9 @@ export default {
// padding-top: 10px;
position: relative;
left: 3px;
top: 3px;
width: 16px;
height: 16px;
top: 1px;
width: 12px;
height: 12px;
}
}
</style>
......@@ -435,7 +435,7 @@ export default {
.mask {
position: fixed;
z-index: 1000;
top: 0;
top: 124px;
right: 0;
left: 0;
bottom: 0;
......
......@@ -97,7 +97,7 @@ export default {
.mask {
position: fixed;
z-index: 1000;
top: 0;
top: 124px;
right: 0;
left: 0;
bottom: 0;
......
<template>
<section class="container">
<CommonHeader></CommonHeader>
<CommonAreaSelect @areaClick="areaTabClick" @orgClick="orgTabClick"></CommonAreaSelect>
<CommonAreaSelect
@areaClick="areaTabClick"
@orgClick="orgTabClick"
:areaName="areaName"
:orgName="orgName"
:showArea="isShowArea"
:showOrg="isShowOrg">
</CommonAreaSelect>
<CommonTaps :projectInfo="projectInfo" @tabClicked="tabClicked"></CommonTaps>
<!-- 总体概况 -->
<article v-show="cIndex === 0">
......@@ -179,6 +186,10 @@ export default {
return {
isShowArea: false,
isShowOrg: false,
areaName: '全部',
orgName: '全部机构',
// :areaTitle="areaTitle"
// :orgTitle="orgTitle"
cIndex: 0,
colors: ["#39AF9A", "#FF9A4B", "#abb7bb", "#76d2d2"],
needBG: true,
......@@ -274,7 +285,8 @@ export default {
afterRate: 0,
educationEffectList: [],
knowledgeEffectList: []
}
},
};
},
async asyncData() {
......@@ -459,6 +471,9 @@ export default {
this.CNTParams.regionId = selData.regionId;
this.getHospitalsCNT(this.CNTParams);
this.isShowArea = false;
this.areaName = selData.townName || selData.countyName || selData.cityName || selData.provinceName
console.log(selData)
// this. = hospitalNames[0] || this.orgName
// this.getGeneralData(this.queryGDParams);
},
areaCancel() {
......@@ -466,8 +481,13 @@ export default {
},
orgConfirm(selData) {
let hospitalIds = [];
let hospitalNames = [];
let orgName = '';
selData.forEach(org => {
if (org.selected) hospitalIds.push(org.hospitalId);
if (org.selected) {
hospitalIds.push(org.hospitalId);
hospitalNames.push(org.hospitalName);
}
});
// this.queryGDParams.hospitalIdList = hospitalIds
......@@ -479,6 +499,7 @@ export default {
this.getGeneralData(this.queryGDParams);
}
this.isShowOrg = false;
this.orgName = hospitalNames[0] || this.orgName
console.log(selData, hospitalIds);
},
orgCancel() {
......@@ -498,14 +519,12 @@ export default {
// 通用跳转页面
gotoPage(subUrl) {
let subUrlAndParams = `/lreport_ssr${subUrl}
?token=${this.token}&projectId=${this.queryGDParams.projectId}
&regionId=${this.queryGDParams.regionId}&hospitalIdList=${this.queryGDParams.hospitalIdList.join(',')}`
let subUrlAndParams = `${subUrl}?token=${this.token}&projectId=${this.queryGDParams.projectId}&regionId=${this.queryGDParams.regionId}&hospitalIdList=${this.queryGDParams.hospitalIdList.join(',')}`
if (this.$rocNative.isWeb) {
this.$router.push(subUrl);
this.$router.push(subUrlAndParams);
} else {
let url = `/lreport_ssr${subUrl}?token=${this.token}`
goPageByNative(this, url);
let nativeUrl = `/lreport_ssr${subUrlAndParams}`
goPageByNative(this, nativeUrl);
}
},
......
......@@ -2,7 +2,7 @@
<section>
<CommonHeader title="培训前后知识点掌握情况"></CommonHeader>
<TitleKLGPoint :title="listTitle"></TitleKLGPoint>
<ChartColumnHorizontalTCLong :dataList="queryGDParams" class="mt-10"></ChartColumnHorizontalTCLong>
<ChartColumnHorizontalTCLong :dataList="knowledgeEffectList" class="mt-10"></ChartColumnHorizontalTCLong>
<CommonNoMore></CommonNoMore>
</section>
</template>
......@@ -19,25 +19,7 @@ export default {
data() {
return {
listTitle: "共10知识点",
needRightBtn: false,
// projectId: '',
token: '',
// // 查询概况数据
// queryGDParams: {
// beginDate: "",
// endDate: "",
// hospitalIdList: [],
// originalFlag: 1, // 默认值0:0不查看原始数据
// projectId: 256,
// regionId: "",
// timeFlag: 0,
// pageCfg: {
// type: 1,
// pageNo: 0,
// pageSize: 0
// }
// },
// 查询概况数据
queryGDParams: {
beginDate: "",
endDate: "",
......@@ -76,15 +58,6 @@ export default {
cookies.set("token", cQuery.token || "");
this.getStudyEffect(this.queryGDParams);
}
// this.token = (this.$route && this.$route.query && this.$route.query.token) || '';
// this.projectId = (this.$route && this.$route.query && this.$route.query.projectId) || 256;
// this.regionId = (this.$route && this.$route.query && this.$route.query.regionId) || '000';
// this.hospitalIdList = (this.$route && this.$route.query && this.$route.query.hospitalIdList) || '';
// this.queryGDParams.projectId = this.projectId;
// this.queryGDParams.regionId = this.regionId;
// this.queryGDParams.hospitalIdList = (this.hospitalIdList && this.hospitalIdList.split(',')) || [];
// cookies.set("token", this.token);
// this.getGeneralExam(this.queryGDParams);
}
},
methods: {
......
......@@ -127,7 +127,8 @@ export const getGeneralPersonal = async data => {
method: 'post',
data: data,
withCredentials: true,
url: `stats/report/generalPersonal/${data.pageCfg.type}/${data.pageCfg.pageNo}/${data.pageCfg.pageSize}`
url: `stats/report/generalPersonal/${data.pageCfg.type}`
// url: `stats/report/generalPersonal/${data.pageCfg.type}/${data.pageCfg.pageNo}/${data.pageCfg.pageSize}`
});
};
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册