20200506-zlp-2
首页新增教师学位统计
This commit is contained in:
parent
69194ad6df
commit
b4f4a59812
@ -18,6 +18,15 @@ export function listTeacher2(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询教师基本信息列表
|
||||||
|
export function listTeacherGroupXw() {
|
||||||
|
return request({
|
||||||
|
url: '/system/teacher/listgroupxw',
|
||||||
|
method: 'get',
|
||||||
|
params: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询教师基本信息详细
|
// 查询教师基本信息详细
|
||||||
export function getTeacher(id) {
|
export function getTeacher(id) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -62,7 +62,7 @@ export default {
|
|||||||
},
|
},
|
||||||
xAxis: [{
|
xAxis: [{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
data: ['班级A', '班级B', '班级C', '班级D', '班级E', '班级F', '班级G'],
|
||||||
axisTick: {
|
axisTick: {
|
||||||
alignWithLabel: true
|
alignWithLabel: true
|
||||||
}
|
}
|
||||||
@ -74,25 +74,18 @@ export default {
|
|||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
series: [{
|
series: [{
|
||||||
name: 'pageA',
|
name: '幼儿出勤率',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
stack: 'vistors',
|
stack: 'vistors',
|
||||||
barWidth: '60%',
|
barWidth: '60%',
|
||||||
data: [79, 52, 200, 334, 390, 330, 220],
|
data: [30, 29, 28, 31, 33, 18, 20],
|
||||||
animationDuration
|
animationDuration
|
||||||
}, {
|
}, {
|
||||||
name: 'pageB',
|
name: '教师出勤率',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
stack: 'vistors',
|
stack: 'vistors',
|
||||||
barWidth: '60%',
|
barWidth: '60%',
|
||||||
data: [80, 52, 200, 334, 390, 330, 220],
|
data: [3, 3, 3, 3, 2, 3, 3],
|
||||||
animationDuration
|
|
||||||
}, {
|
|
||||||
name: 'pageC',
|
|
||||||
type: 'bar',
|
|
||||||
stack: 'vistors',
|
|
||||||
barWidth: '60%',
|
|
||||||
data: [30, 52, 200, 334, 390, 330, 220],
|
|
||||||
animationDuration
|
animationDuration
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
|
@ -3,77 +3,91 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from "echarts";
|
||||||
require('echarts/theme/macarons') // echarts theme
|
require("echarts/theme/macarons"); // echarts theme
|
||||||
import resize from './mixins/resize'
|
import resize from "./mixins/resize";
|
||||||
|
import { listTeacherGroupXw } from "@/api/system/teacher";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
names: [],
|
||||||
|
values: [],
|
||||||
mixins: [resize],
|
mixins: [resize],
|
||||||
props: {
|
props: {
|
||||||
className: {
|
className: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'chart'
|
default: "chart"
|
||||||
},
|
},
|
||||||
width: {
|
width: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '100%'
|
default: "100%"
|
||||||
},
|
},
|
||||||
height: {
|
height: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '300px'
|
default: "300px"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chart: null
|
chart: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initChart()
|
this.initChart();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.chart.dispose()
|
this.chart.dispose();
|
||||||
this.chart = null
|
this.chart = null;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart() {
|
async getData() {
|
||||||
this.chart = echarts.init(this.$el, 'macarons')
|
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({
|
this.chart.setOption({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item',
|
trigger: "item",
|
||||||
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
left: 'center',
|
left: "center",
|
||||||
bottom: '10',
|
bottom: "10",
|
||||||
data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts']
|
data: this.names
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: 'WEEKLY WRITE ARTICLES',
|
name: "幼儿园教职工学历统计",
|
||||||
type: 'pie',
|
type: "pie",
|
||||||
roseType: 'radius',
|
roseType: "radius",
|
||||||
radius: [15, 95],
|
radius: [15, 95],
|
||||||
center: ['50%', '38%'],
|
center: ["50%", "38%"],
|
||||||
data: [
|
data: this.values,
|
||||||
{ value: 320, name: 'Industries' },
|
animationEasing: "cubicInOut",
|
||||||
{ value: 240, name: 'Technology' },
|
|
||||||
{ value: 149, name: 'Forex' },
|
|
||||||
{ value: 100, name: 'Gold' },
|
|
||||||
{ value: 59, name: 'Forecasts' }
|
|
||||||
],
|
|
||||||
animationEasing: 'cubicInOut',
|
|
||||||
animationDuration: 2600
|
animationDuration: 2600
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -61,6 +61,17 @@ public class ByTeacherJbxxController extends BaseController
|
|||||||
return getDataTable(list2);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出教师基本信息列表
|
* 导出教师基本信息列表
|
||||||
*/
|
*/
|
||||||
|
@ -27,6 +27,14 @@ public interface ByTeacherJbxxMapper
|
|||||||
*/
|
*/
|
||||||
public List<ByTeacherJbxx> selectByTeacherJbxxList(ByTeacherJbxx byTeacherJbxx);
|
public List<ByTeacherJbxx> selectByTeacherJbxxList(ByTeacherJbxx byTeacherJbxx);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询教师基本信息列表
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return 教师基本信息集合
|
||||||
|
*/
|
||||||
|
public List<ByTeacherJbxx> selectByTeacherJbGroupXw(ByTeacherJbxx byTeacherJbxx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增教师基本信息
|
* 新增教师基本信息
|
||||||
*
|
*
|
||||||
|
@ -27,6 +27,14 @@ public interface IByTeacherJbxxService
|
|||||||
*/
|
*/
|
||||||
public List<ByTeacherJbxx> selectByTeacherJbxxList(ByTeacherJbxx byTeacherJbxx);
|
public List<ByTeacherJbxx> selectByTeacherJbxxList(ByTeacherJbxx byTeacherJbxx);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询教师基本信息列表
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return 教师基本信息集合
|
||||||
|
*/
|
||||||
|
public List<ByTeacherJbxx> selectByTeacherJbGroupXw(ByTeacherJbxx byTeacherJbxx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增教师基本信息
|
* 新增教师基本信息
|
||||||
*
|
*
|
||||||
|
@ -16,8 +16,7 @@ import com.ruoyi.project.system.service.IByTeacherJbxxService;
|
|||||||
* @date 2020-04-21
|
* @date 2020-04-21
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class ByTeacherJbxxServiceImpl implements IByTeacherJbxxService
|
public class ByTeacherJbxxServiceImpl implements IByTeacherJbxxService {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ByTeacherJbxxMapper byTeacherJbxxMapper;
|
private ByTeacherJbxxMapper byTeacherJbxxMapper;
|
||||||
|
|
||||||
@ -28,8 +27,7 @@ public class ByTeacherJbxxServiceImpl implements IByTeacherJbxxService
|
|||||||
* @return 教师基本信息
|
* @return 教师基本信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ByTeacherJbxx selectByTeacherJbxxById(Long id)
|
public ByTeacherJbxx selectByTeacherJbxxById(Long id) {
|
||||||
{
|
|
||||||
return byTeacherJbxxMapper.selectByTeacherJbxxById(id);
|
return byTeacherJbxxMapper.selectByTeacherJbxxById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,11 +39,21 @@ public class ByTeacherJbxxServiceImpl implements IByTeacherJbxxService
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@DataScope(deptAlias = "u")
|
@DataScope(deptAlias = "u")
|
||||||
public List<ByTeacherJbxx> selectByTeacherJbxxList(ByTeacherJbxx byTeacherJbxx)
|
public List<ByTeacherJbxx> selectByTeacherJbxxList(ByTeacherJbxx byTeacherJbxx) {
|
||||||
{
|
|
||||||
return byTeacherJbxxMapper.selectByTeacherJbxxList(byTeacherJbxx);
|
return byTeacherJbxxMapper.selectByTeacherJbxxList(byTeacherJbxx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询教师基本信息列表
|
||||||
|
*
|
||||||
|
* @return 教师基本信息集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@DataScope(deptAlias = "u")
|
||||||
|
public List<ByTeacherJbxx> selectByTeacherJbGroupXw(ByTeacherJbxx byTeacherJbxx) {
|
||||||
|
return byTeacherJbxxMapper.selectByTeacherJbGroupXw(byTeacherJbxx);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增教师基本信息
|
* 新增教师基本信息
|
||||||
*
|
*
|
||||||
@ -53,8 +61,7 @@ public class ByTeacherJbxxServiceImpl implements IByTeacherJbxxService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertByTeacherJbxx(ByTeacherJbxx byTeacherJbxx)
|
public int insertByTeacherJbxx(ByTeacherJbxx byTeacherJbxx) {
|
||||||
{
|
|
||||||
return byTeacherJbxxMapper.insertByTeacherJbxx(byTeacherJbxx);
|
return byTeacherJbxxMapper.insertByTeacherJbxx(byTeacherJbxx);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,8 +72,7 @@ public class ByTeacherJbxxServiceImpl implements IByTeacherJbxxService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateByTeacherJbxx(ByTeacherJbxx byTeacherJbxx)
|
public int updateByTeacherJbxx(ByTeacherJbxx byTeacherJbxx) {
|
||||||
{
|
|
||||||
return byTeacherJbxxMapper.updateByTeacherJbxx(byTeacherJbxx);
|
return byTeacherJbxxMapper.updateByTeacherJbxx(byTeacherJbxx);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,8 +83,7 @@ public class ByTeacherJbxxServiceImpl implements IByTeacherJbxxService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteByTeacherJbxxByIds(Long[] ids)
|
public int deleteByTeacherJbxxByIds(Long[] ids) {
|
||||||
{
|
|
||||||
return byTeacherJbxxMapper.deleteByTeacherJbxxByIds(ids);
|
return byTeacherJbxxMapper.deleteByTeacherJbxxByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,8 +94,7 @@ public class ByTeacherJbxxServiceImpl implements IByTeacherJbxxService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteByTeacherJbxxById(Long id)
|
public int deleteByTeacherJbxxById(Long id) {
|
||||||
{
|
|
||||||
return byTeacherJbxxMapper.deleteByTeacherJbxxById(id);
|
return byTeacherJbxxMapper.deleteByTeacherJbxxById(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
${dataScope}
|
${dataScope}
|
||||||
</select>
|
</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">
|
<select id="selectByTeacherJbxxById" parameterType="Long" resultMap="ByTeacherJbxxResult">
|
||||||
<include refid="selectByTeacherJbxxVo"/>
|
<include refid="selectByTeacherJbxxVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user