Commit 631bceed authored by xinzhedeai's avatar xinzhedeai

add:浸润线查询

parent 823970bc
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
style="background: #f0f0f0" style="background: #f0f0f0"
></canvas> ></canvas>
</div> </div>
<div class="chart-wrapper"> <div class="chart-wrapper" style="padding-left: 20px;">
<!-- 图表容器780 --> <!-- 图表容器780 -->
<div <div
ref="chartContainer" ref="chartContainer"
style="width: 780px; height: 600px; margin-bottom: 20px" style="width: 780px; height: 550px; margin-bottom: 20px;border:1px solid gainsboro;"
></div> ></div>
<!-- 图表操作区域(调整到最下方左侧) --> <!-- 图表操作区域(调整到最下方左侧) -->
<div class="chart-btn-group"> <div class="chart-btn-group">
...@@ -194,7 +194,6 @@ export default { ...@@ -194,7 +194,6 @@ export default {
this.chartVisible = true; this.chartVisible = true;
// 弹窗显示后初始化图表 // 弹窗显示后初始化图表
this.$nextTick(() => { this.$nextTick(() => {
this.initChart();
this.initChart1(); this.initChart1();
// 新增:在图表初始化的 $nextTick 后初始化 Canvas(确保 DOM 已渲染) // 新增:在图表初始化的 $nextTick 后初始化 Canvas(确保 DOM 已渲染)
this.$nextTick(() => { this.$nextTick(() => {
...@@ -368,14 +367,19 @@ export default { ...@@ -368,14 +367,19 @@ export default {
}, },
initChart1() { initChart1() {
let params = {
sort: "date,desc",
}
if(this.form.query.daterange){
params.daterange = this.form.query.daterange.join(',')
}
if(this.form.query.sensorid){
params.code = this.form.query.sensorid
}
request({ request({
url: "data/st/imghistory", url: "data/st/imghistory",
method: "get", method: "get",
params: { params
daterange: "2020-06-02,2026-07-11",
sort: "date,desc",
code: "202206201438352828",
},
}).then((res) => { }).then((res) => {
const data = res.body; const data = res.body;
// const data = this.getChartData().body // const data = this.getChartData().body
...@@ -1029,7 +1033,12 @@ export default { ...@@ -1029,7 +1033,12 @@ export default {
}); });
} }
}, },
loadData: reqApi.common.getRequst, loadData: function(){
console.log(this.form, 'form')
this.initChart1()
return reqApi.common.getRequst
},
cancelForm() { cancelForm() {
this.form.visible = false; this.form.visible = false;
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment