2024年9月22日 修复问题

This commit is contained in:
bai 2024-09-22 22:00:32 +08:00
parent 2f1466615c
commit a98af1b1fe
4 changed files with 20 additions and 8 deletions

View File

@ -666,6 +666,7 @@ public class BlStuAnswerServiceImpl extends ServiceImpl<BlStuAnswerMapper, BlStu
{
title: { text: '\\n%%\\n', textStyle: { color: '#000', fontSize: 20 } },
grid: { left: '12%%', right: '3%%', bottom: '0%%', containLabel: true },
legend: { itemWidth: 42, itemHeight: 21, textStyle: { fontSize: 21 } },
xAxis: { type: 'category',
axisLabel: { textStyle: { color: '#000', fontSize: 20, fontFamily: '宋体' }, },
data: %s
@ -718,6 +719,7 @@ public class BlStuAnswerServiceImpl extends ServiceImpl<BlStuAnswerMapper, BlStu
{
title: { right: '30', text: '%%', textStyle: { fontSize: 30, fontFamily: '宋体' } },
grid: { left: '12%%', right: '3%%', bottom: '0%%', containLabel: true },
legend: { itemWidth: 42, itemHeight: 21, textStyle: { fontSize: 21 } },
xAxis: {
type: 'value', position: 'top', max: %s,
axisLabel: { textStyle: { color: '#000', fontSize: 20, fontFamily: '宋体' }, },
@ -893,14 +895,16 @@ public class BlStuAnswerServiceImpl extends ServiceImpl<BlStuAnswerMapper, BlStu
{
title: { right: '30', text: '%%', textStyle: { fontSize: 30, fontFamily: '宋体' } },
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
legend: {},
legend: { itemWidth: 42, itemHeight: 21, textStyle: { fontSize: 21 } },
grid: { left: '%s%%', right: '3%%', bottom: '0%%', containLabel: true },
xAxis: {
type: 'value',
splitLine: { show: false },
axisLabel: { textStyle: { color: '#000', fontSize: 20, fontFamily: '宋体' }, },
},
yAxis: { type: 'category', inverse: true,
data: %s,
axisLabel: { textStyle: { color: '#000', fontSize: 20, fontFamily: '宋体' }, },
axisLabel: {
formatter: (v) => {
let l = String(v).split('');let r = '';
@ -928,20 +932,24 @@ public class BlStuAnswerServiceImpl extends ServiceImpl<BlStuAnswerMapper, BlStu
return WebDriverUtil.getImgByte(json, "echarts" + height + ".html");//echarts500.html
}
public String getRadarChart100(Map<String, String> map, String imageHeight){
return getRadarChart(map, "100", "单位:%", imageHeight);
}
public String getRadarChart100(Map<String, String> map){
return getRadarChart(map, "100", "单位:%");
return getRadarChart(map, "100", "单位:%", null);
}
public String getRadarChart(Map<String, String> map) {
return getRadarChart(map, "5", "单位:分");
return getRadarChart(map, "5", "单位:分", null);
}
/**
* 雷达图
* @param map
* @return
*/
public String getRadarChart(Map<String, String> map, String maxNumber, String titleText) {
public String getRadarChart(Map<String, String> map, String maxNumber, String titleText, String imageHeight) {
String indicatorDataTemp = "{ name: '%s', max: " + maxNumber + " },";
List<String> nameList = Lists.newArrayList();
List<String> seriesDataList = Lists.newArrayList();
@ -1028,7 +1036,11 @@ public class BlStuAnswerServiceImpl extends ServiceImpl<BlStuAnswerMapper, BlStu
nameListSb.append("]");
json = json.formatted(title, nameList.size(), nameListSb.toString());
return WebDriverUtil.getImgByte(json,"echarts600.html", runJs);
String imageHeightpath = "600";
if(imageHeight != null){
imageHeightpath = imageHeight;
}
return WebDriverUtil.getImgByte(json,"echarts" + imageHeightpath + ".html", runJs);
}
public List<TableMerge> t1_1(WordOperator wo, Map<String, Object> result, BlStuInfo blStuMain) {

View File

@ -2311,7 +2311,7 @@ public class BlTeacherAnswerServiceImpl extends ServiceImpl<BlTeacherAnswerMappe
}
}
//多柱图
String jszgljxrwfpbl12Options = "option = {title: { right: '30', text: '小时/周', textStyle: { fontSize: 25 } },\n" +
String jszgljxrwfpbl12Options = "option = {title: { right: '30', text: '%', textStyle: { fontSize: 25 } },\n" +
" tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, legend: { textStyle: { color: '#000', fontSize: 24, fontFamily: '宋体' } }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, xAxis: { type: 'value',position: 'top', boundaryGap: [0, 0.01] }, yAxis: {axisLabel: {color: '#333',fontSize: 25," +
"formatter: function (value) { let list = value.split(\"\");let result = \"\"; for (let i = 1; i <= list.length; i++) {if (!(i % 17) && list[i] != undefined) { result += list[i - 1] + '\\n';} else {result += list[i - 1];} }return result;}}, type: 'category',\n" +
"data: ['研究生课程', '低年级本科专业必修课', '专业选修课', '高年级本科专业必修课', '公共通识课程'],inverse:true }, series: [ {\n" +
@ -2353,7 +2353,7 @@ public class BlTeacherAnswerServiceImpl extends ServiceImpl<BlTeacherAnswerMappe
}
}
//多柱图
String jszgljxrwfpbl11Options = "option = {title: { right: '30', text: '小时/周', textStyle: { fontSize: 25 } },\n" +
String jszgljxrwfpbl11Options = "option = {title: { right: '30', text: '%', textStyle: { fontSize: 25 } },\n" +
" tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, legend: { textStyle: { color: '#000', fontSize: 24, fontFamily: '宋体' } }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, xAxis: { type: 'value',position: 'top', boundaryGap: [0, 0.01] }, yAxis: {axisLabel: {color: '#333',fontSize: 25," +
"formatter: function (value) { let list = value.split(\"\");let result = \"\"; for (let i = 1; i <= list.length; i++) {if (!(i % 17) && list[i] != undefined) { result += list[i - 1] + '\\n';} else {result += list[i - 1];} }return result;}}, type: 'category',\n" +
"data: ['低年级本科专业必修课', '专业选修课', '研究生课程', '高年级本科专业必修课', '公共通识课程'],inverse:true }, series: [ {\n" +
@ -2379,7 +2379,7 @@ public class BlTeacherAnswerServiceImpl extends ServiceImpl<BlTeacherAnswerMappe
jszgljxrwfpblData[i] = (int) Double.parseDouble(par.getTj1());
}
//单柱图
String jszgljxrwfpbl10Options =" option = {title: { right: '30', text: '小时/周', textStyle: { fontSize: 25 } }, tooltip: {trigger: 'axis',},grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },\n" +
String jszgljxrwfpbl10Options =" option = {title: { right: '30', text: '%', textStyle: { fontSize: 25 } }, tooltip: {trigger: 'axis',},grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },\n" +
" xAxis: { type: 'value',position: 'top',splitLine: {lineStyle: {type: 'dashed'}}},\n" +
" yAxis: {type: 'category',\n" +
" data:"+JSONObject.toJSONString(jszgljxrwfpblname)+",\n" +