一日流程评估班级评估结果查看

This commit is contained in:
zhanglipeng 2021-04-19 09:43:44 +08:00
parent b9959b1273
commit 2bb381fe15
5 changed files with 209 additions and 5 deletions

View File

@ -70,15 +70,22 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div class="chart-wrapper">
<line-chart />
</div>
</div>
</template>
<script>
import LineChart from "../../dashboard/LineChartBjyrlcpjpjf";
import { listDayflowassessmentPjf } from "@/api/benyi/dayflowassessment";
import { listClass } from "@/api/system/class";
export default {
name: "Dayflowassessment",
components: {
LineChart,
},
data() {
return {
//

View File

@ -0,0 +1,165 @@
<template>
<div :class="className" :style="{ height: height, width: width }" />
</template>
<script>
import echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import resize from "./mixins/resize";
import { listClass } from "@/api/system/class";
import { listDayflowassessmentPjf } from "@/api/benyi/dayflowassessment";
export default {
mixins: [resize],
props: {
className: {
type: String,
default: "chart",
},
width: {
type: String,
default: "100%",
},
height: {
type: String,
default: "350px",
},
autoResize: {
type: Boolean,
default: true,
},
// chartData: {
// type: Object,
// required: true,
// },
},
data() {
return {
chart: null,
classOptions: null,
expectedData: null,
actualData: null,
};
},
watch: {
// chartData: {
// deep: true,
// handler(val) {
// this.setOptions(val);
// },
// },
},
mounted() {
this.$nextTick(() => {
this.getClassList();
});
},
beforeDestroy() {
if (!this.chart) {
return;
}
this.chart.dispose();
this.chart = null;
},
methods: {
/** 查询班级信息列表 */
async getClassList() {
await listDayflowassessmentPjf(this.queryParams).then((response) => {
console.log(response.rows);
var items = [];
var childcounts = [];
var childcheckincounts = [];
response.rows.forEach((element) => {
items.push(element.byClass.bjmc);
childcounts.push(element.bjpjf);
childcheckincounts.push(element.childcheckincount);
});
this.classOptions = items;
this.expectedData = childcounts;
this.actualData = childcheckincounts;
// console.log(this.classOptions);
});
this.initChart();
},
initChart() {
this.chart = echarts.init(this.$el, "macarons");
this.setOptions();
},
setOptions() {
this.chart.setOption({
title: {
text: "一日流程评估班级平均分",
},
xAxis: {
data: this.classOptions,
boundaryGap: false,
axisTick: {
show: false,
},
},
grid: {
left: 10,
right: 10,
bottom: 20,
top: 30,
containLabel: true,
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
},
padding: [5, 10],
},
yAxis: {
axisTick: {
show: false,
},
},
legend: {
data: this.classOptions,
},
series: [
{
name: "幼儿总数",
itemStyle: {
normal: {
color: "#FF005A",
lineStyle: {
color: "#FF005A",
width: 2,
},
},
},
smooth: true,
type: "line",
data: this.expectedData,
animationDuration: 2800,
animationEasing: "cubicInOut",
},
{
name: "幼儿出勤人数",
smooth: true,
type: "line",
itemStyle: {
normal: {
color: "#3888fa",
lineStyle: {
color: "#3888fa",
width: 2,
},
areaStyle: {
color: "#f3f8ff",
},
},
},
data: this.actualData,
animationDuration: 2800,
animationEasing: "quadraticOut",
},
],
});
},
},
};
</script>

View File

@ -276,7 +276,7 @@ public class ByChildHealthCheck extends BaseEntity {
.append("createtime", getCreatetime())
.append("createuser", getCreateuser())
.append("byChild", getByChild())
.append("byClass", getByChild())
.append("byClass", getByClass())
.toString();
}

View File

@ -1,5 +1,6 @@
package com.ruoyi.project.benyi.domain;
import com.ruoyi.project.system.domain.ByClass;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
@ -301,6 +302,8 @@ public class ByDayflowassessment extends BaseEntity {
private List<ByDayFlowStandard> list;
private ByClass byClass;
public void setId(Long id) {
this.id = id;
}
@ -453,6 +456,14 @@ public class ByDayflowassessment extends BaseEntity {
this.list = list;
}
public ByClass getByClass() {
return byClass;
}
public void setByClass(ByClass byClass) {
this.byClass = byClass;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@ -496,6 +507,7 @@ public class ByDayflowassessment extends BaseEntity {
.append("gzyjlyspjf", getGzyjlyspjf())
.append("wxkcpjf", getWxkcpjf())
.append("qkcpjf", getQkcpjf())
.append("byClass", getByClass())
.toString();
}

View File

@ -44,10 +44,30 @@
<result property="gzyjlyspjf" column="gzyjlyspjf"/>
<result property="wxkcpjf" column="wxkcpjf"/>
<result property="qkcpjf" column="qkcpjf"/>
<association property="byClass" column="classid" javaType="ByClass" resultMap="ByClassResult"/>
</resultMap>
<resultMap type="ByClass" id="ByClassResult">
<result property="bjbh" column="bjbh"/>
<result property="deptId" column="dept_id"/>
<result property="bjtype" column="bjtype"/>
<result property="bhxh" column="bhxh"/>
<result property="xn" column="xn"/>
<result property="bjmc" column="bjmc"/>
<result property="bjrych" column="bjrych"/>
<result property="jbny" column="jbny"/>
<result property="zbjs" column="zbjs"/>
<result property="zbjsxm" column="zbjsxm"/>
<result property="pbjs" column="pbjs"/>
<result property="pbjsxm" column="pbjsxm"/>
<result property="zljs" column="zljs"/>
<result property="zljsxm" column="zljsxm"/>
<result property="isdel" column="isdel"/>
<result property="createtime" column="createtime"/>
</resultMap>
<sql id="selectByDayflowassessmentVo">
select d.id, d.planid, d.dept_id, d.classid, d.bzbh, d.bzxm, d.pbbh, d.pbxm, d.zlbh, d.zlxm, d.xnxq, d.bzid, d.bzmf, d.kfz, d.kfcs, d.zzdf, d.classdf, d.items, d.values, d.pgdx, d.pgdxxm, d.create_userid, d.create_time,
select d.id, d.planid, d.dept_id, d.classid, e.bjmc, d.bzbh, d.bzxm, d.pbbh, d.pbxm, d.zlbh, d.zlxm, d.xnxq, d.bzid, d.bzmf, d.kfz, d.kfcs, d.zzdf, d.classdf, d.items, d.values, d.pgdx, d.pgdxxm, d.create_userid, d.create_time,
(select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='早间接待')) as zjjdpjf,
(select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='用餐')) as ycpjf,
(select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='早间坐圈')) as zjzqpjf,
@ -63,7 +83,7 @@
(select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='规则与纪律约束')) as gzyjlyspjf,
(select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='微型课程')) as wxkcpjf,
(select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='潜课程')) as qkcpjf
from by_dayflowassessment d
from by_dayflowassessment d left join by_class e on d.classid=e.bjbh
</sql>
<select id="selectByDayflowassessmentList" parameterType="ByDayflowassessment"
@ -99,7 +119,7 @@
</select>
<select id="selectByDayflowassessmentPjf" parameterType="ByDayflowassessment" resultMap="ByDayflowassessmentResult">
select t.classid,t.ny,avg(t.zzdf) as bjpjf,avg(t.zjjd) as zjjdpjf,avg(t.yc) as ycpjf,avg(t.zjzq) as zjzqpjf,avg(t.fzjx) as fzjxpjf,avg(t.dxsj) as dxsjpjf,avg(t.rcxsys) as rcxsyspjf,avg(t.hdgd) as hdgdpjf,avg(t.hwhd) as hwhdpjf,avg(t.ws) as wspjf,avg(t.lyzj) as lyzjpjf,avg(t.aq) as aqpjf,avg(t.zyhd) as zyhdpjf,avg(t.gzyjlys) as gzyjlyspjf,avg(t.wxkc) as wxkcpjf,avg(t.qkc) as qkcpjf from (
select t.classid,e.bjmc,t.ny,avg(t.zzdf) as bjpjf,avg(t.zjjd) as zjjdpjf,avg(t.yc) as ycpjf,avg(t.zjzq) as zjzqpjf,avg(t.fzjx) as fzjxpjf,avg(t.dxsj) as dxsjpjf,avg(t.rcxsys) as rcxsyspjf,avg(t.hdgd) as hdgdpjf,avg(t.hwhd) as hwhdpjf,avg(t.ws) as wspjf,avg(t.lyzj) as lyzjpjf,avg(t.aq) as aqpjf,avg(t.zyhd) as zyhdpjf,avg(t.gzyjlys) as gzyjlyspjf,avg(t.wxkc) as wxkcpjf,avg(t.qkc) as qkcpjf from (
select a.classid,a.zzdf,a.create_time,date_format(a.create_time,'%Y-%m') as 'ny',
(select sum(b.value) from by_dayflowassessmentitem b where a.id=b.pid and b.item in (select id from by_day_flow where name='早间接待')) as zjjd,
(select sum(b.value) from by_dayflowassessmentitem b where a.id=b.pid and b.item in (select id from by_day_flow where name='用餐')) as yc,
@ -120,7 +140,7 @@ from by_dayflowassessment a
where a.dept_id=#{deptId}
<if test="createTime != null ">and date_format(create_time,'%Y-%m') = date_format(#{createTime},'%Y-%m')</if>
) t
) t left join by_class e on e.bjbh=t.classid
group by t.classid,t.ny
</select>