Showing
6 changed files
with
26 additions
and
13 deletions
| 1 | 1 | import { alarmLevel, statusType } from '/@/views/device/manage/config/detail.config'; | 
| 2 | 2 | import { FormSchema } from '/@/components/Form'; | 
| 3 | 3 | import { BasicColumn } from '/@/components/Table'; | 
| 4 | -import dayjs from 'moment'; | |
| 4 | +import moment from 'moment'; | |
| 5 | 5 | export const alarmSearchSchemas: FormSchema[] = [ | 
| 6 | 6 | { | 
| 7 | 7 | field: 'status', | 
| ... | ... | @@ -58,7 +58,7 @@ export const alarmSearchSchemas: FormSchema[] = [ | 
| 58 | 58 | component: 'DatePicker', | 
| 59 | 59 | componentProps: { | 
| 60 | 60 | valueFormat: 'x', | 
| 61 | - showTime: { defaultValue: dayjs('23:59:59', 'HH:mm:ss') }, | |
| 61 | + showTime: { defaultValue: moment('23:59:59', 'HH:mm:ss') }, | |
| 62 | 62 | }, | 
| 63 | 63 | colProps: { span: 6 }, | 
| 64 | 64 | }, | ... | ... | 
| ... | ... | @@ -36,9 +36,12 @@ | 
| 36 | 36 | setDrawerProps({ confirmLoading: false }); | 
| 37 | 37 | isUpdate.value = !!data?.isUpdate; | 
| 38 | 38 | if (unref(isUpdate)) { | 
| 39 | - await setFieldsValue({ | |
| 40 | - ...data.record, | |
| 41 | - }); | |
| 39 | + if (data.record.organizationDTO) { | |
| 40 | + await setFieldsValue(data.record); | |
| 41 | + } else { | |
| 42 | + Reflect.deleteProperty(data.record, 'organizationId'); | |
| 43 | + await setFieldsValue(data.record); | |
| 44 | + } | |
| 42 | 45 | } | 
| 43 | 46 | }); | 
| 44 | 47 | ... | ... | 
| ... | ... | @@ -3,17 +3,17 @@ import { FormSchema } from '/@/components/Form'; | 
| 3 | 3 | import { BasicColumn } from '/@/components/Table'; | 
| 4 | 4 | import { DeviceTypeEnum } from '/@/api/device/model/deviceModel'; | 
| 5 | 5 | import { getCustomerList } from '/@/api/device/deviceManager'; | 
| 6 | -import dayjs from 'moment'; | |
| 6 | +import moment from 'moment'; | |
| 7 | 7 | export const columns: BasicColumn[] = [ | 
| 8 | 8 | { | 
| 9 | 9 | title: '设备名称', | 
| 10 | 10 | dataIndex: 'name', | 
| 11 | - width: 120, | |
| 11 | + width: 160, | |
| 12 | 12 | }, | 
| 13 | 13 | { | 
| 14 | 14 | title: '设备标签', | 
| 15 | 15 | dataIndex: 'label', | 
| 16 | - width: 100, | |
| 16 | + width: 160, | |
| 17 | 17 | }, | 
| 18 | 18 | { | 
| 19 | 19 | title: '设备配置', | 
| ... | ... | @@ -34,7 +34,7 @@ export const columns: BasicColumn[] = [ | 
| 34 | 34 | { | 
| 35 | 35 | title: '描述', | 
| 36 | 36 | dataIndex: 'description', | 
| 37 | - width: 180, | |
| 37 | + width: 160, | |
| 38 | 38 | }, | 
| 39 | 39 | ]; | 
| 40 | 40 | // 实时数据表格 | 
| ... | ... | @@ -100,7 +100,7 @@ export const alarmSearchSchemas: FormSchema[] = [ | 
| 100 | 100 | component: 'DatePicker', | 
| 101 | 101 | componentProps: { | 
| 102 | 102 | valueFormat: 'x', | 
| 103 | - showTime: { defaultValue: dayjs('23:59:59', 'HH:mm:ss') }, | |
| 103 | + showTime: { defaultValue: moment('23:59:59', 'HH:mm:ss') }, | |
| 104 | 104 | }, | 
| 105 | 105 | colProps: { span: 6 }, | 
| 106 | 106 | }, | ... | ... | 
| ... | ... | @@ -23,7 +23,7 @@ | 
| 23 | 23 | </div> | 
| 24 | 24 | <div v-if="deviceDetail?.deviceInfo?.address" class="mt-4"> | 
| 25 | 25 | <p>设备位置</p> | 
| 26 | - <div ref="wrapRef" style="height: 400px; width: 100%"></div> | |
| 26 | + <div ref="wrapRef" style="height: 550px; width: 100%"></div> | |
| 27 | 27 | </div> | 
| 28 | 28 | </div> | 
| 29 | 29 | </template> | ... | ... | 
| ... | ... | @@ -3,6 +3,7 @@ import { FormSchema } from '/@/components/Table'; | 
| 3 | 3 | import { h } from 'vue'; | 
| 4 | 4 | import { Tag } from 'ant-design-vue'; | 
| 5 | 5 | import { useI18n } from '/@/hooks/web/useI18n'; | 
| 6 | +import moment from 'moment'; | |
| 6 | 7 | const { t } = useI18n(); | 
| 7 | 8 | export const columns: BasicColumn[] = [ | 
| 8 | 9 | { | 
| ... | ... | @@ -75,6 +76,11 @@ export const searchFormSchema: FormSchema[] = [ | 
| 75 | 76 | field: 'sendTime', | 
| 76 | 77 | label: '发送时间', | 
| 77 | 78 | component: 'RangePicker', | 
| 79 | + componentProps: { | |
| 80 | + showTime: { | |
| 81 | + defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')], | |
| 82 | + }, | |
| 83 | + }, | |
| 78 | 84 | colProps: { span: 6 }, | 
| 79 | 85 | }, | 
| 80 | 86 | ]; | ... | ... | 
| ... | ... | @@ -3,8 +3,7 @@ import { FormSchema } from '/@/components/Table'; | 
| 3 | 3 | import { h } from 'vue'; | 
| 4 | 4 | import { Tag } from 'ant-design-vue'; | 
| 5 | 5 | import { useI18n } from '/@/hooks/web/useI18n'; | 
| 6 | -import { phoneRule } from '/@/utils/rules'; | |
| 7 | - | |
| 6 | +import moment from 'moment'; | |
| 8 | 7 | const { t } = useI18n(); | 
| 9 | 8 | export const columns: BasicColumn[] = [ | 
| 10 | 9 | { | 
| ... | ... | @@ -62,6 +61,11 @@ export const searchFormSchema: FormSchema[] = [ | 
| 62 | 61 | field: 'sendTime', | 
| 63 | 62 | label: '发送时间', | 
| 64 | 63 | component: 'RangePicker', | 
| 64 | + componentProps: { | |
| 65 | + showTime: { | |
| 66 | + defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')], | |
| 67 | + }, | |
| 68 | + }, | |
| 65 | 69 | colProps: { span: 6 }, | 
| 66 | 70 | }, | 
| 67 | 71 | ]; | ... | ... |