Commit 439305f22d95b2932b7c41d1750f650e4ec3e51f

Authored by ww
1 parent c2696eb2

fix: device/location history data no dimension of seconds

@@ -84,7 +84,6 @@ export const defaultSchemas: FormSchema[] = [ @@ -84,7 +84,6 @@ export const defaultSchemas: FormSchema[] = [
84 return { 84 return {
85 showTime: true, 85 showTime: true,
86 onCalendarChange(value: Moment[]) { 86 onCalendarChange(value: Moment[]) {
87 - console.log('enter ');  
88 dates = value; 87 dates = value;
89 }, 88 },
90 disabledDate(current: Moment) { 89 disabledDate(current: Moment) {
@@ -128,12 +127,14 @@ export const defaultSchemas: FormSchema[] = [ @@ -128,12 +127,14 @@ export const defaultSchemas: FormSchema[] = [
128 ifShow({ values }) { 127 ifShow({ values }) {
129 return values[SchemaFiled.AGG] !== AggregateDataEnum.NONE; 128 return values[SchemaFiled.AGG] !== AggregateDataEnum.NONE;
130 }, 129 },
131 - componentProps({ formModel }) { 130 + componentProps({ formModel, formActionType }) {
132 const options = 131 const options =
133 formModel[SchemaFiled.WAY] === QueryWay.LATEST 132 formModel[SchemaFiled.WAY] === QueryWay.LATEST
134 ? getPacketIntervalByValue(formModel[SchemaFiled.START_TS]) 133 ? getPacketIntervalByValue(formModel[SchemaFiled.START_TS])
135 : getPacketIntervalByRange(formModel[SchemaFiled.DATE_RANGE]); 134 : getPacketIntervalByRange(formModel[SchemaFiled.DATE_RANGE]);
136 - 135 + if (formModel[SchemaFiled.AGG] !== AggregateDataEnum.NONE) {
  136 + formActionType.setFieldsValue({ [SchemaFiled.LIMIT]: null });
  137 + }
137 return { 138 return {
138 options, 139 options,
139 }; 140 };
@@ -147,9 +148,11 @@ export const defaultSchemas: FormSchema[] = [ @@ -147,9 +148,11 @@ export const defaultSchemas: FormSchema[] = [
147 ifShow({ values }) { 148 ifShow({ values }) {
148 return values[SchemaFiled.AGG] === AggregateDataEnum.NONE; 149 return values[SchemaFiled.AGG] === AggregateDataEnum.NONE;
149 }, 150 },
150 - componentProps: {  
151 - max: 50000,  
152 - min: 7, 151 + componentProps() {
  152 + return {
  153 + max: 50000,
  154 + min: 7,
  155 + };
153 }, 156 },
154 }, 157 },
155 ]; 158 ];
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 import { formSchema, columns } from './config.data'; 55 import { formSchema, columns } from './config.data';
56 import { BasicTable, useTable } from '/@/components/Table'; 56 import { BasicTable, useTable } from '/@/components/Table';
57 import { devicePage } from '/@/api/alarm/contact/alarmContact'; 57 import { devicePage } from '/@/api/alarm/contact/alarmContact';
58 - import { Tag, Empty, message } from 'ant-design-vue'; 58 + import { Tag, Empty } from 'ant-design-vue';
59 import { DeviceState } from '/@/api/device/model/deviceModel'; 59 import { DeviceState } from '/@/api/device/model/deviceModel';
60 import { BAI_DU_MAP_URL } from '/@/utils/fnUtils'; 60 import { BAI_DU_MAP_URL } from '/@/utils/fnUtils';
61 import { useModal, BasicModal } from '/@/components/Modal'; 61 import { useModal, BasicModal } from '/@/components/Modal';
@@ -80,7 +80,7 @@ @@ -80,7 +80,7 @@
80 import { selectDeviceAttrSchema, eChartOptions } from './config.data'; 80 import { selectDeviceAttrSchema, eChartOptions } from './config.data';
81 import { defaultSchemas } from './cpns/TimePeriodForm/config'; 81 import { defaultSchemas } from './cpns/TimePeriodForm/config';
82 import { QueryWay, SchemaFiled, AggregateDataEnum } from './cpns/TimePeriodForm/config'; 82 import { QueryWay, SchemaFiled, AggregateDataEnum } from './cpns/TimePeriodForm/config';
83 - import { formatToDateTime } from '/@/utils/dateUtil'; 83 + import { dateUtil } from '/@/utils/dateUtil';
84 export default defineComponent({ 84 export default defineComponent({
85 name: 'BaiduMap', 85 name: 'BaiduMap',
86 components: { 86 components: {
@@ -335,7 +335,7 @@ @@ -335,7 +335,7 @@
335 for (const key in data) { 335 for (const key in data) {
336 for (const item1 of data[key]) { 336 for (const item1 of data[key]) {
337 let { ts, value } = item1; 337 let { ts, value } = item1;
338 - const time = formatToDateTime(ts); 338 + const time = dateUtil(ts).format('YYYY-MM-DD HH:mm:ss');
339 value = Number(value).toFixed(2); 339 value = Number(value).toFixed(2);
340 dataArray.push([time, value, key]); 340 dataArray.push([time, value, key]);
341 } 341 }