|
@@ -86,7 +86,9 @@
|
|
<div id="line" style="width: 1.526rem;height:1.03rem;"></div></div>
|
|
<div id="line" style="width: 1.526rem;height:1.03rem;"></div></div>
|
|
<div class="zongji" v-if="props.classradio=='Water'" >
|
|
<div class="zongji" v-if="props.classradio=='Water'" >
|
|
<div class="zongjili img3">{{ heightnum }}<span>m</span></div>
|
|
<div class="zongjili img3">{{ heightnum }}<span>m</span></div>
|
|
- <div class="zongjili img4"><p class="jcshijian">2024-03-20</p><p>{{ maxtime }}</p></div>
|
|
|
|
|
|
+ <div class="zongjili img4 imf">
|
|
|
|
+ <!-- <p class="jcshijian">2024-03-20</p> -->
|
|
|
|
+ <p>{{ maxtime.steptime }}</p></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -181,7 +183,9 @@ let currentrow1 = ref(false);
|
|
let steptimes = ref([]);
|
|
let steptimes = ref([]);
|
|
let series = ref([]);
|
|
let series = ref([]);
|
|
let heightnum=ref("0");
|
|
let heightnum=ref("0");
|
|
-let maxtime=ref();
|
|
|
|
|
|
+let maxtime=ref({
|
|
|
|
+ steptime:"03:02"
|
|
|
|
+});
|
|
let jcname=ref("监测点");
|
|
let jcname=ref("监测点");
|
|
let danwei=ref();
|
|
let danwei=ref();
|
|
let state=ref();
|
|
let state=ref();
|
|
@@ -193,6 +197,7 @@ let selelist=ref();
|
|
let jgSelectPointId=ref(0);
|
|
let jgSelectPointId=ref(0);
|
|
let selobj=ref([]);
|
|
let selobj=ref([]);
|
|
let isshow=ref(false);
|
|
let isshow=ref(false);
|
|
|
|
+let maxindex=ref();
|
|
|
|
|
|
const dynamicHeaders = ref([
|
|
const dynamicHeaders = ref([
|
|
|
|
|
|
@@ -489,15 +494,21 @@ function sliderchange(val) {
|
|
const tableRowClassName=()=>{
|
|
const tableRowClassName=()=>{
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+//获取最大值的下标
|
|
function firstOccurrenceOfMax(arr) {
|
|
function firstOccurrenceOfMax(arr) {
|
|
- console.log(arr);
|
|
|
|
- if (arr.length === 0) return -1; // 空数组返回-1
|
|
|
|
- let max = Math.max(...arr); // 找出最大值
|
|
|
|
- console.log(max)
|
|
|
|
- console.log(2222)
|
|
|
|
- console.log(arr.indexOf(max));
|
|
|
|
- return arr.indexOf(max); // 找出最大值首次出现的索引
|
|
|
|
- }
|
|
|
|
|
|
+ var max = arr[0];
|
|
|
|
+ //声明了个变量 保存下标值
|
|
|
|
+ var index = 0;
|
|
|
|
+ for (var i = 0; i < arr.length; i++) {
|
|
|
|
+ if (max < arr[i]) {
|
|
|
|
+ max = arr[i];
|
|
|
|
+ index = i;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ maxindex.value=index
|
|
|
|
+ return index;
|
|
|
|
+}
|
|
|
|
+
|
|
// 随机颜色
|
|
// 随机颜色
|
|
const randomColor=()=>{
|
|
const randomColor=()=>{
|
|
var letters = '0123456789ABCDEF';
|
|
var letters = '0123456789ABCDEF';
|
|
@@ -545,8 +556,11 @@ const handleDelete=(event)=>{
|
|
data:arr,//res.rows[i].data
|
|
data:arr,//res.rows[i].data
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- // firstOccurrenceOfMax(series.value[0].data)
|
|
|
|
|
|
+ firstOccurrenceOfMax(series.value[0].data)
|
|
const max = Math.max(...series.value[0].data);
|
|
const max = Math.max(...series.value[0].data);
|
|
|
|
+ maxtime.value= res.steptimes[ maxindex.value];
|
|
|
|
+ console.log(maxtime.value);
|
|
|
|
+ console.log(1111)
|
|
heightnum.value=max;
|
|
heightnum.value=max;
|
|
}
|
|
}
|
|
lineChart();
|
|
lineChart();
|