Merge remote-tracking branch 'origin/master'

master
wangh 1 year ago
commit 2fb0ff242d

@ -96,6 +96,7 @@ body {
border-radius: 3px;
border: 2px solid #3f65a1;
padding: 5%;
overflow: auto;
}
.winDiv .title2 {
@ -117,6 +118,7 @@ body {
border-radius: 3px;
border: 2px solid #3f65a1;
padding: 5%;
overflow: auto;
}
.status {

@ -88,20 +88,33 @@ $(() => {
})
})
let chart = null
let chart1 = (el, data) => {
console.log('chart', chart)
let xData = Object.keys(data?.[0] || {})?.filter(e => e !== 'time') || []
let series = xData.map(e => {
let dataA = data?.map(val => val[e]) || []
let isBig = false
dataA.forEach(e => {
if (e > 40) {
isBig = true
}
})
return {
name: e,
type: "line",
smooth: true,
symbol: "circle",
yAxisIndex: isBig ? 1 : 0,
symbolSize: 5,
showSymbol: false,
data: data?.map(val => val[e]) || [],
data: dataA,
}
})
let chart = echarts.init(el);
if (!chart) {
chart = echarts.init(el)
}
console.log('chart', chart)
let option = {
tooltip: {
trigger: "axis",
@ -175,6 +188,29 @@ let chart1 = (el, data) => {
},
},
},
{
type: "value",
name: "转速n/s",
axisTick: {
show: false,
},
axisLine: {
lineStyle: {
color: "#57617B",
},
},
axisLabel: {
margin: 10,
textStyle: {
fontSize: 14,
},
},
splitLine: {
lineStyle: {
color: "#57617B",
},
},
},
],
series: series,
};

@ -101,7 +101,9 @@
params.timeInterval=$('#timeInterval1').val();
$.get(ctx + 'broad/home/queryParamData', params, (e) => {
if (e.data.length > 0) {
$("#chart1").empty()
$('#chart1').remove()
$("#modal1 .centerModal .centerModalInfo").append('<div class="chart1" id="chart1"></div>')
chart = null
chart1(document.getElementById('chart1'), e.data)
} else {
$("#chart1").html(`<div style="width: 100%;height: 100%;text-align: center;line-height:35vw;color: #fff ">暂无数据</div>`)
@ -276,13 +278,6 @@
<span style="font-size: 1vw;color: #fff">实验胶种: </span>
<input id="type" name="loginName" style="width: 10vw;height:2vw;display: inline-block" type="text"/>
</div>
<div style="display: inline-block">
<span style="font-size: 1vw;color: #fff">时间间隔:</span>
<select id="timeInterval" class="form-control m-b" style="width: 10vw;height:2vw;display: inline-block"
th:with="type=${@dict.getType('time_interval')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
<div style="display: inline-block">
<span style="font-size: 1vw;color: #fff">起止时间: </span>
@ -294,6 +289,13 @@
style="width: 8vw;height:2vw;display: inline-block"
type="text">
</div>
<div style="display: inline-block">
<span style="font-size: 1vw;color: #fff">时间间隔:</span>
<select id="timeInterval" class="form-control m-b" style="width: 10vw;height:2vw;display: inline-block"
th:with="type=${@dict.getType('time_interval')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
<a class="btn btn-primary btn-rounded btn-sm" onclick="Modal2Search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="derive2()"><i class="fa fa-download"></i>&nbsp;导出</a>

Loading…
Cancel
Save