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