feat: 💯 页面调整

This commit is contained in:
niushuai233 2024-06-08 21:33:01 +08:00
parent 4f248fa355
commit f7304edf60
6 changed files with 3301 additions and 0 deletions

View File

@ -0,0 +1,35 @@
package cc.niushuai.gasweb.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* data
*
* @author niushuai233
* @date: 2022/12/16 21:36
*/
@Data
public class ChartResp {
private String title;
private List<Data> data = new ArrayList<>();
public ChartResp(String title) {
this.title = title;
}
@lombok.Data
@AllArgsConstructor
public static class Data {
private String x;
private String y;
public String getY() {
return y.replace("ppm", "").replace("°C", "");
}
}
}

View File

@ -0,0 +1,42 @@
// 包装options
function getOption(title, xData, yData, unit) {
return {
title: {
text: title
},
tooltip: {
show: true,
trigger: 'item',
formatter: '时间点: {b0}<br />当前值: {c0}' + unit,
},
dataZoom: [{
id: "slider",
type: 'slider'
}],
xAxis: {
type: 'category',
data: xData
},
yAxis: {
type: 'value'
},
series: [
{
data: yData,
type: 'line',
smooth: true
}
]
};
}
function rebuildChart(instance, data, unit) {
var xData = data.data.map(item => item.x);
var yData = data.data.map(item => item.y);
// coChart.setOption(getOption('CO浓度', ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], [820, 932, 901, 934, 1290, 1330, 1320]));
instance.setOption(getOption(data.title, xData, yData, unit));
console.log('rebuild chart', instance, data.title);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,26 @@
/**
* Simplified Chinese translation for bootstrap-datetimepicker
* Yuan Cheung <advanimal@gmail.com>
*/
;(function ($) {
$.fn.datePicker.dates['en'] = {
days: ["Sun", 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
months: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
now: "now",
clear: 'clear',
headerYearLink: '',
units: ['-', ''],
button: ["confirm", "cancel"],
confirm: 'confirm',
cancel: 'cancel',
chooseDay: 'Choose Day',
chooseTime: 'Choose Time',
begin: 'Start Time',
end: 'End Time',
prevYear: 'prevYear',
prevMonth: 'prevMonth',
nextYear: 'nextYear',
nextMonth: 'nextMonth',
zero: '0:00'
};
}(jQuery));

File diff suppressed because it is too large Load Diff