xq commit:"修改了逆变器历史详情"
This commit is contained in:
@ -2,9 +2,11 @@
|
||||
import moment from 'moment';
|
||||
import * as echarts from 'echarts';
|
||||
import { ref } from 'vue';
|
||||
import { useProgram } from '@/store/modules/program';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const useStore = useProgram();
|
||||
const detail = ref();
|
||||
const activeName = ref();
|
||||
const myChart1 = ref(null);
|
||||
@ -15,7 +17,6 @@ const myChart5 = ref(null);
|
||||
const myChart6 = ref(null);
|
||||
|
||||
function dealData() {
|
||||
console.info(detail.value);
|
||||
detail.value = {
|
||||
...detail.value,
|
||||
dataTimestamp: moment(Number(detail.value.dataTimestamp)).format('YYYY-MM-DD HH:mm:ss'),
|
||||
@ -163,8 +164,11 @@ watch(
|
||||
);
|
||||
|
||||
onBeforeMount(() => {
|
||||
localStorage.setItem('detail', route.query.detail);
|
||||
detail.value = JSON.parse(localStorage.getItem('detail'));
|
||||
if (!JSON.parse(localStorage.getItem('detail'))) {
|
||||
detail.value = useStore.details;
|
||||
} else {
|
||||
detail.value = JSON.parse(localStorage.getItem('detail'));
|
||||
}
|
||||
dealData();
|
||||
activeName.value = 'first';
|
||||
});
|
||||
|
Reference in New Issue
Block a user