|
@@ -99,11 +99,11 @@
|
|
|
|
|
|
<script setup lang="ts" name="allDevice">
|
|
|
import * as echarts from 'echarts';
|
|
|
-import { getStamp, groupByType,getNextDayMidnight } from "@/utils/dateTime";
|
|
|
+import { getStamp, groupByType, getNextDayMidnight } from "@/utils/dateTime";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
import { useGlobalStore } from "@/stores/modules/global";
|
|
|
import { ref, computed, onMounted, reactive, watch, onDeactivated, onActivated, nextTick } from "vue";
|
|
|
-import { getTacRecordList, getFTPList, getCertificateList, getStaitemList, getArriveList } from "@/api/modules/allData";
|
|
|
+import { getTacRecordList, getFTPList, getCertificateList, getStaitemList, getArriveList } from "@/api/modules/allData";
|
|
|
import { Platform } from "@/api/interface";
|
|
|
import { parseTime } from '@/utils/index';
|
|
|
import { useRouter } from "vue-router";
|
|
@@ -181,7 +181,7 @@ const changeBase = (e) => {
|
|
|
}
|
|
|
watch(() => pageable.value.as_code_list, (newValue, oldValue) => {
|
|
|
if (newValue) {
|
|
|
- weatherInfo()
|
|
|
+ weatherInfo();
|
|
|
getCertificate();
|
|
|
getFTP();
|
|
|
getDeviceStatus();
|
|
@@ -201,8 +201,21 @@ const control = ref()
|
|
|
const arriveList = ref<any>({ aa: [], bb: [], cc: [] })
|
|
|
const arriveTime = ref<any>()
|
|
|
const getArrive = async () => {
|
|
|
- const { data } = await getArriveList({ ...pageable.value, time_space: 60, data_type: false, end_time: getStamp(parseTime(new Date(), '{y}-{m}-{d} {h}') + ':00'), begin_time: getStamp(parseTime(new Date(), '{y}-{m}-{d}') + ' 01:00') })
|
|
|
- arriveTime.value = Object.keys(data)
|
|
|
+ const { data } = await getArriveList({ ...pageable.value, time_space: 60, data_type: false, end_time: getStamp(parseTime(new Date(), '{y}-{m}-{d} {h}') + ':01'), begin_time: getStamp(parseTime(new Date(), '{y}-{m}-{d}') + ' 01:00') })
|
|
|
+ // 提取键并排序
|
|
|
+ const sortedKeys = Object.keys(data).sort((a, b) => {
|
|
|
+ const [timeA] = a.split(':').map(Number);
|
|
|
+ const [timeB] = b.split(':').map(Number);
|
|
|
+ return timeA - timeB;
|
|
|
+ });
|
|
|
+
|
|
|
+ // 根据排序后的键构建新对象
|
|
|
+ const sortedObj = {};
|
|
|
+ sortedKeys.forEach(key => {
|
|
|
+ sortedObj[key] = data[key];
|
|
|
+ });
|
|
|
+
|
|
|
+ arriveTime.value = Object.keys(sortedObj)
|
|
|
|
|
|
const arr = <any>{ aa: [], bb: [], cc: [] }
|
|
|
arriveTime.value?.forEach((item, index) => {
|