20200506-zlp-2

首页新增教师学位统计
This commit is contained in:
paidaxing444 2020-05-06 18:00:19 +08:00
parent 69194ad6df
commit b4f4a59812
8 changed files with 125 additions and 66 deletions

View File

@ -18,6 +18,15 @@ export function listTeacher2(query) {
})
}
// 查询教师基本信息列表
export function listTeacherGroupXw() {
return request({
url: '/system/teacher/listgroupxw',
method: 'get',
params: ''
})
}
// 查询教师基本信息详细
export function getTeacher(id) {
return request({

View File

@ -62,7 +62,7 @@ export default {
},
xAxis: [{
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
data: ['班级A', '班级B', '班级C', '班级D', '班级E', '班级F', '班级G'],
axisTick: {
alignWithLabel: true
}
@ -74,25 +74,18 @@ export default {
}
}],
series: [{
name: 'pageA',
name: '幼儿出勤率',
type: 'bar',
stack: 'vistors',
barWidth: '60%',
data: [79, 52, 200, 334, 390, 330, 220],
data: [30, 29, 28, 31, 33, 18, 20],
animationDuration
}, {
name: 'pageB',
name: '教师出勤率',
type: 'bar',
stack: 'vistors',
barWidth: '60%',
data: [80, 52, 200, 334, 390, 330, 220],
animationDuration
}, {
name: 'pageC',
type: 'bar',
stack: 'vistors',
barWidth: '60%',
data: [30, 52, 200, 334, 390, 330, 220],
data: [3, 3, 3, 3, 2, 3, 3],
animationDuration
}]
})

View File

@ -3,77 +3,91 @@
</template>
<script>
import echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'
import echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import resize from "./mixins/resize";
import { listTeacherGroupXw } from "@/api/system/teacher";
export default {
names: [],
values: [],
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
default: "chart"
},
width: {
type: String,
default: '100%'
default: "100%"
},
height: {
type: String,
default: '300px'
default: "300px"
}
},
data() {
return {
chart: null
}
};
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
this.initChart();
});
},
beforeDestroy() {
if (!this.chart) {
return
return;
}
this.chart.dispose()
this.chart = null
this.chart.dispose();
this.chart = null;
},
methods: {
initChart() {
this.chart = echarts.init(this.$el, 'macarons')
async getData() {
await listTeacherGroupXw().then(response => {
console.log(response);
let name = [];
let value = [];
let len = response.rows;
for (var j = 0; j < len.length; j++) {
name.push(len[j].xl);
value.push({'name':len[j].xl,'value':len[j].byyx});
}
this.names = name;
this.values = value;
//console.log(this.names);
//console.log(this.values);
});
},
async initChart() {
await this.getData();
this.chart = echarts.init(this.$el, "macarons");
this.chart.setOption({
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
left: 'center',
bottom: '10',
data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts']
left: "center",
bottom: "10",
data: this.names
},
series: [
{
name: 'WEEKLY WRITE ARTICLES',
type: 'pie',
roseType: 'radius',
name: "幼儿园教职工学历统计",
type: "pie",
roseType: "radius",
radius: [15, 95],
center: ['50%', '38%'],
data: [
{ value: 320, name: 'Industries' },
{ value: 240, name: 'Technology' },
{ value: 149, name: 'Forex' },
{ value: 100, name: 'Gold' },
{ value: 59, name: 'Forecasts' }
],
animationEasing: 'cubicInOut',
center: ["50%", "38%"],
data: this.values,
animationEasing: "cubicInOut",
animationDuration: 2600
}
]
})
});
}
}
}
};
</script>

View File

@ -61,6 +61,17 @@ public class ByTeacherJbxxController extends BaseController
return getDataTable(list2);
}
/**
* 查询教师基本信息列表
*/
@PreAuthorize("@ss.hasPermi('system:teacher:list')")
@GetMapping("/listgroupxw")
public TableDataInfo listGroupXw(ByTeacherJbxx byTeacherJbxx)
{
List<ByTeacherJbxx> list = byTeacherJbxxService.selectByTeacherJbGroupXw(byTeacherJbxx);
return getDataTable(list);
}
/**
* 导出教师基本信息列表
*/

View File

@ -27,6 +27,14 @@ public interface ByTeacherJbxxMapper
*/
public List<ByTeacherJbxx> selectByTeacherJbxxList(ByTeacherJbxx byTeacherJbxx);
/**
* 查询教师基本信息列表
*
*
* @return 教师基本信息集合
*/
public List<ByTeacherJbxx> selectByTeacherJbGroupXw(ByTeacherJbxx byTeacherJbxx);
/**
* 新增教师基本信息
*

View File

@ -27,6 +27,14 @@ public interface IByTeacherJbxxService
*/
public List<ByTeacherJbxx> selectByTeacherJbxxList(ByTeacherJbxx byTeacherJbxx);
/**
* 查询教师基本信息列表
*
*
* @return 教师基本信息集合
*/
public List<ByTeacherJbxx> selectByTeacherJbGroupXw(ByTeacherJbxx byTeacherJbxx);
/**
* 新增教师基本信息
*

View File

@ -11,86 +11,90 @@ import com.ruoyi.project.system.service.IByTeacherJbxxService;
/**
* 教师基本信息Service业务层处理
*
*
* @author tsbz
* @date 2020-04-21
*/
@Service
public class ByTeacherJbxxServiceImpl implements IByTeacherJbxxService
{
public class ByTeacherJbxxServiceImpl implements IByTeacherJbxxService {
@Autowired
private ByTeacherJbxxMapper byTeacherJbxxMapper;
/**
* 查询教师基本信息
*
*
* @param id 教师基本信息ID
* @return 教师基本信息
*/
@Override
public ByTeacherJbxx selectByTeacherJbxxById(Long id)
{
public ByTeacherJbxx selectByTeacherJbxxById(Long id) {
return byTeacherJbxxMapper.selectByTeacherJbxxById(id);
}
/**
* 查询教师基本信息列表
*
*
* @param byTeacherJbxx 教师基本信息
* @return 教师基本信息
*/
@Override
@DataScope(deptAlias = "u")
public List<ByTeacherJbxx> selectByTeacherJbxxList(ByTeacherJbxx byTeacherJbxx)
{
public List<ByTeacherJbxx> selectByTeacherJbxxList(ByTeacherJbxx byTeacherJbxx) {
return byTeacherJbxxMapper.selectByTeacherJbxxList(byTeacherJbxx);
}
/**
* 查询教师基本信息列表
*
* @return 教师基本信息集合
*/
@Override
@DataScope(deptAlias = "u")
public List<ByTeacherJbxx> selectByTeacherJbGroupXw(ByTeacherJbxx byTeacherJbxx) {
return byTeacherJbxxMapper.selectByTeacherJbGroupXw(byTeacherJbxx);
}
/**
* 新增教师基本信息
*
*
* @param byTeacherJbxx 教师基本信息
* @return 结果
*/
@Override
public int insertByTeacherJbxx(ByTeacherJbxx byTeacherJbxx)
{
public int insertByTeacherJbxx(ByTeacherJbxx byTeacherJbxx) {
return byTeacherJbxxMapper.insertByTeacherJbxx(byTeacherJbxx);
}
/**
* 修改教师基本信息
*
*
* @param byTeacherJbxx 教师基本信息
* @return 结果
*/
@Override
public int updateByTeacherJbxx(ByTeacherJbxx byTeacherJbxx)
{
public int updateByTeacherJbxx(ByTeacherJbxx byTeacherJbxx) {
return byTeacherJbxxMapper.updateByTeacherJbxx(byTeacherJbxx);
}
/**
* 批量删除教师基本信息
*
*
* @param ids 需要删除的教师基本信息ID
* @return 结果
*/
@Override
public int deleteByTeacherJbxxByIds(Long[] ids)
{
public int deleteByTeacherJbxxByIds(Long[] ids) {
return byTeacherJbxxMapper.deleteByTeacherJbxxByIds(ids);
}
/**
* 删除教师基本信息信息
*
*
* @param id 教师基本信息ID
* @return 结果
*/
@Override
public int deleteByTeacherJbxxById(Long id)
{
public int deleteByTeacherJbxxById(Long id) {
return byTeacherJbxxMapper.deleteByTeacherJbxxById(id);
}
}

View File

@ -69,6 +69,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 数据范围过滤 -->
${dataScope}
</select>
<select id="selectByTeacherJbGroupXw" parameterType="ByTeacherJbxx" resultMap="ByTeacherJbxxResult">
select (CASE WHEN (select dict_label from sys_dict_data where dict_type='sys_jsxl' and dict_value=t.xl ) is null THEN '未设置' ELSE (select dict_label from sys_dict_data where dict_type='sys_jsxl' and dict_value=t.xl ) END )xl,count(*) byyx
from by_teacher_jbxx t
left join sys_user u on t.userid = u.user_id
where u.del_flag='0'
<!-- 数据范围过滤 -->
${dataScope}
group by t.xl
</select>
<select id="selectByTeacherJbxxById" parameterType="Long" resultMap="ByTeacherJbxxResult">
<include refid="selectByTeacherJbxxVo"/>