diff --git a/apps/web-antd/src/api/iot/device/device/index.ts b/apps/web-antd/src/api/iot/device/device/index.ts index 650fe0875..7bd59886f 100644 --- a/apps/web-antd/src/api/iot/device/device/index.ts +++ b/apps/web-antd/src/api/iot/device/device/index.ts @@ -3,7 +3,8 @@ import type { PageParam, PageResult } from '@vben/request'; import { requestClient } from '#/api/request'; export namespace IotDeviceApi { - /** IoT 设备 VO */ + // TODO @haohao:需要跟后端对齐,必要的 ReqVO、RespVO + /** 设备 */ export interface Device { id?: number; // 设备 ID,主键,自增 deviceName: string; // 设备名称 @@ -48,7 +49,7 @@ export namespace IotDeviceApi { dataSpecsList: any[]; // 数据定义列表 } - /** IoT 设备属性 VO */ + /** 设备属性 VO */ export interface DeviceProperty { identifier: string; // 属性标识符 value: string; // 最新值 @@ -62,7 +63,7 @@ export namespace IotDeviceApi { password: string; // 密码 } - /** IoT 设备发送消息 Request VO */ + /** 设备发送消息 Request VO */ export interface DeviceMessageSendReq { deviceId: number; // 设备编号 method: string; // 请求方法 @@ -77,6 +78,7 @@ export namespace IotDeviceApi { } /** IoT 设备状态枚举 */ +// TODO @haohao:packages/constants/src/biz-iot-enum.ts 枚举; export enum DeviceStateEnum { INACTIVE = 0, // 未激活 OFFLINE = 2, // 离线 diff --git a/apps/web-antd/src/api/iot/device/group/index.ts b/apps/web-antd/src/api/iot/device/group/index.ts index 18cac3097..2c11411ae 100644 --- a/apps/web-antd/src/api/iot/device/group/index.ts +++ b/apps/web-antd/src/api/iot/device/group/index.ts @@ -3,7 +3,7 @@ import type { PageParam, PageResult } from '@vben/request'; import { requestClient } from '#/api/request'; export namespace IotDeviceGroupApi { - /** IoT 设备分组 VO */ + /** 设备分组 */ export interface DeviceGroup { id?: number; // 分组 ID name: string; // 分组名字 diff --git a/apps/web-antd/src/api/iot/product/category/index.ts b/apps/web-antd/src/api/iot/product/category/index.ts index 72f04b6b3..24d02ed3b 100644 --- a/apps/web-antd/src/api/iot/product/category/index.ts +++ b/apps/web-antd/src/api/iot/product/category/index.ts @@ -3,19 +3,19 @@ import type { PageParam, PageResult } from '@vben/request'; import { requestClient } from '#/api/request'; export namespace IotProductCategoryApi { - /** IoT 產品分類 VO */ + /** 产品分类 */ export interface ProductCategory { - id?: number; // 分類 ID - name: string; // 分類名稱 - parentId?: number; // 父级分類 ID - sort?: number; // 分類排序 - status?: number; // 分類狀態 - description?: string; // 分類描述 - createTime?: string; // 創建時間 + id?: number; // 分类 ID + name: string; // 分类名称 + parentId?: number; // 父级分类 ID + sort?: number; // 分类排序 + status?: number; // 分类状态 + description?: string; // 分类描述 + createTime?: string; // 创建时间 } } -/** 查詢產品分類分頁 */ +/** 查询产品分类分页 */ export function getProductCategoryPage(params: PageParam) { return requestClient.get>( '/iot/product-category/page', @@ -23,33 +23,33 @@ export function getProductCategoryPage(params: PageParam) { ); } -/** 查詢產品分類詳情 */ +/** 查询产品分类详情 */ export function getProductCategory(id: number) { return requestClient.get( `/iot/product-category/get?id=${id}`, ); } -/** 新增產品分類 */ +/** 新增产品分类 */ export function createProductCategory( data: IotProductCategoryApi.ProductCategory, ) { return requestClient.post('/iot/product-category/create', data); } -/** 修改產品分類 */ +/** 修改产品分类 */ export function updateProductCategory( data: IotProductCategoryApi.ProductCategory, ) { return requestClient.put('/iot/product-category/update', data); } -/** 刪除產品分類 */ +/** 刪除产品分类 */ export function deleteProductCategory(id: number) { return requestClient.delete(`/iot/product-category/delete?id=${id}`); } -/** 獲取產品分類精簡列表 */ +/** 获取产品分类精简列表 */ export function getSimpleProductCategoryList() { return requestClient.get( '/iot/product-category/simple-list', diff --git a/apps/web-antd/src/api/iot/product/product/index.ts b/apps/web-antd/src/api/iot/product/product/index.ts index 71bc3ade3..28b2f7b2e 100644 --- a/apps/web-antd/src/api/iot/product/product/index.ts +++ b/apps/web-antd/src/api/iot/product/product/index.ts @@ -3,7 +3,7 @@ import type { PageParam, PageResult } from '@vben/request'; import { requestClient } from '#/api/request'; export namespace IotProductApi { - /** IoT 产品 VO */ + /** 产品 */ export interface Product { id?: number; // 产品编号 name: string; // 产品名称 @@ -27,6 +27,8 @@ export namespace IotProductApi { } } +// TODO @haohao:packages/constants/src/biz-iot-enum.ts 枚举; + /** IOT 产品设备类型枚举类 */ export enum DeviceTypeEnum { DEVICE = 0, // 直连设备 diff --git a/apps/web-antd/src/api/iot/rule/scene/index.ts b/apps/web-antd/src/api/iot/rule/scene/index.ts index 59c8255a7..9a8acf758 100644 --- a/apps/web-antd/src/api/iot/rule/scene/index.ts +++ b/apps/web-antd/src/api/iot/rule/scene/index.ts @@ -3,7 +3,7 @@ import type { PageParam, PageResult } from '@vben/request'; import { requestClient } from '#/api/request'; export namespace RuleSceneApi { - /** IoT 场景联动规则 VO */ + /** 场景联动规则 */ export interface SceneRule { id?: number; name: string; @@ -14,7 +14,7 @@ export namespace RuleSceneApi { createTime?: Date; } - /** IoT 场景联动规则触发器 */ + /** 场景联动规则的触发器 */ export interface Trigger { type?: string; productId?: number; @@ -26,13 +26,13 @@ export namespace RuleSceneApi { conditionGroups?: TriggerConditionGroup[]; } - /** IoT 场景联动规则触发条件组 */ + /** 场景联动规则的触发条件组 */ export interface TriggerConditionGroup { conditions?: TriggerCondition[]; operator?: string; } - /** IoT 场景联动规则触发条件 */ + /** 场景联动规则的触发条件 */ export interface TriggerCondition { productId?: number; deviceId?: number; @@ -42,7 +42,7 @@ export namespace RuleSceneApi { type?: string; } - /** IoT 场景联动规则动作 */ + /** 场景联动规则的动作 */ export interface Action { type?: string; productId?: number; @@ -53,6 +53,7 @@ export namespace RuleSceneApi { } } +// TODO @haohao:貌似下面的,和 RuleSceneApi 重复了。 /** IoT 场景联动规则 */ export interface IotSceneRule { id?: number; @@ -135,6 +136,7 @@ export function deleteSceneRule(id: number) { } /** 批量删除场景联动规则 */ +// TODO @haohao:貌似用上。 export function deleteSceneRuleList(ids: number[]) { return requestClient.delete('/iot/scene-rule/delete-list', { params: { ids: ids.join(',') }, diff --git a/apps/web-antd/src/api/iot/statistics/index.ts b/apps/web-antd/src/api/iot/statistics/index.ts index 588eefcc4..9f3a04266 100644 --- a/apps/web-antd/src/api/iot/statistics/index.ts +++ b/apps/web-antd/src/api/iot/statistics/index.ts @@ -1,7 +1,8 @@ import { requestClient } from '#/api/request'; export namespace IotStatisticsApi { - /** IoT 统计摘要数据 */ + // TODO @haohao:需要跟后端对齐,必要的 ReqVO、RespVO + /** 统计摘要数据 */ export interface StatisticsSummary { productCategoryCount: number; productCount: number; @@ -22,7 +23,7 @@ export namespace IotStatisticsApi { [key: string]: number; } - /** IoT 消息统计数据类型 */ + /** 消息统计数据类型 */ export interface DeviceMessageSummary { statType: number; upstreamCounts: TimeValueItem[]; @@ -60,6 +61,7 @@ export function getDeviceMessageSummaryByDate( ); } +// TODO @haohao:貌似这里,没用到?是不是后面哪里用,或者可以删除哈? /** 获取设备消息统计摘要 */ export function getDeviceMessageSummary(statType: number) { return requestClient.get( diff --git a/apps/web-antd/src/api/iot/thingmodel/index.ts b/apps/web-antd/src/api/iot/thingmodel/index.ts index 354088704..9e89b869c 100644 --- a/apps/web-antd/src/api/iot/thingmodel/index.ts +++ b/apps/web-antd/src/api/iot/thingmodel/index.ts @@ -140,19 +140,11 @@ export function getThingModel(id: number) { /** 根据产品 ID 查询物模型列表 */ export function getThingModelListByProductId(productId: number) { return requestClient.get( - '/iot/thing-model/list-by-product-id', + '/iot/thing-model/list', { params: { productId } }, ); } -/** 根据产品标识查询物模型列表 */ -export function getThingModelListByProductKey(productKey: string) { - return requestClient.get( - '/iot/thing-model/list-by-product-key', - { params: { productKey } }, - ); -} - /** 新增物模型 */ export function createThingModel(data: ThingModelData) { return requestClient.post('/iot/thing-model/create', data); @@ -168,13 +160,6 @@ export function deleteThingModel(id: number) { return requestClient.delete(`/iot/thing-model/delete?id=${id}`); } -/** 批量删除物模型 */ -export function deleteThingModelList(ids: number[]) { - return requestClient.delete('/iot/thing-model/delete-list', { - params: { ids: ids.join(',') }, - }); -} - /** 获取物模型 TSL */ export function getThingModelTSL(productId: number) { return requestClient.get( diff --git a/apps/web-antd/src/api/mp/draft/index.ts b/apps/web-antd/src/api/mp/draft/index.ts index 70b7c0e83..f05d0117a 100644 --- a/apps/web-antd/src/api/mp/draft/index.ts +++ b/apps/web-antd/src/api/mp/draft/index.ts @@ -24,6 +24,49 @@ export namespace MpDraftApi { articles: Article[]; createTime?: Date; } + + /** 图文项(包含预览字段) */ + export interface NewsItem { + title: string; + thumbMediaId: string; + author: string; + digest: string; + showCoverPic: number; + content: string; + contentSourceUrl: string; + needOpenComment: number; + onlyFansCanComment: number; + thumbUrl: string; + picUrl?: string; // 用于预览封面 + } + + /** 图文列表 */ + export interface NewsItemList { + newsItem: NewsItem[]; + } + + /** 草稿文章(用于展示) */ + export interface DraftArticle { + mediaId: string; + content: NewsItemList; + updateTime: number; + } +} + +/** 创建空的图文项 */ +export function createEmptyNewsItem(): MpDraftApi.NewsItem { + return { + title: '', + thumbMediaId: '', + author: '', + digest: '', + showCoverPic: 0, + content: '', + contentSourceUrl: '', + needOpenComment: 0, + onlyFansCanComment: 0, + thumbUrl: '', + }; } /** 查询草稿列表 */ diff --git a/apps/web-antd/src/api/mp/material/index.ts b/apps/web-antd/src/api/mp/material/index.ts index fcec54547..91ca6ddf0 100644 --- a/apps/web-antd/src/api/mp/material/index.ts +++ b/apps/web-antd/src/api/mp/material/index.ts @@ -1,15 +1,8 @@ import type { PageParam, PageResult } from '@vben/request'; -import { requestClient } from '#/api/request'; +import { MaterialType } from '@vben/constants'; -/** 素材类型枚举 */ -// TODO @hw:mp 相关的枚举,可以考虑放这里来。 -export enum MaterialType { - IMAGE = 1, // 图片 - THUMB = 4, // 缩略图 - VIDEO = 3, // 视频 - VOICE = 2, // 语音 -} +import { requestClient } from '#/api/request'; export namespace MpMaterialApi { /** 素材信息 */ diff --git a/apps/web-antd/src/api/mp/menu/index.ts b/apps/web-antd/src/api/mp/menu/index.ts index ade69000b..a99613646 100644 --- a/apps/web-antd/src/api/mp/menu/index.ts +++ b/apps/web-antd/src/api/mp/menu/index.ts @@ -1,20 +1,6 @@ -import { requestClient } from '#/api/request'; +import { MenuType } from '@vben/constants'; -/** 菜单类型枚举 */ -// TODO @hw:mp 相关的枚举,可以考虑放这里来。 -export enum MenuType { - CLICK = 'click', // 点击推事件 - LOCATION_SELECT = 'location_select', // 发送位置 - MEDIA_ID = 'media_id', // 下发消息 - MINIPROGRAM = 'miniprogram', // 小程序 - PIC_PHOTO_OR_ALBUM = 'pic_photo_or_album', // 拍照或者相册发图 - PIC_SYSPHOTO = 'pic_sysphoto', // 系统拍照发图 - PIC_WEIXIN = 'pic_weixin', // 微信相册发图 - SCANCODE_PUSH = 'scancode_push', // 扫码推事件 - SCANCODE_WAITMSG = 'scancode_waitmsg', // 扫码带提示 - VIEW = 'view', // 跳转 URL - VIEW_LIMITED = 'view_limited', // 跳转图文消息URL -} +import { requestClient } from '#/api/request'; export namespace MpMenuApi { /** 菜单按钮信息 */ diff --git a/apps/web-antd/src/api/mp/message/index.ts b/apps/web-antd/src/api/mp/message/index.ts index 3b928d697..5d0d17295 100644 --- a/apps/web-antd/src/api/mp/message/index.ts +++ b/apps/web-antd/src/api/mp/message/index.ts @@ -1,19 +1,8 @@ import type { PageParam, PageResult } from '@vben/request'; -import { requestClient } from '#/api/request'; +import { MessageType } from '@vben/constants'; -/** 消息类型枚举 */ -// TODO @hw:mp 相关的枚举,可以考虑放这里来。 -export enum MessageType { - IMAGE = 'image', // 图片消息 - MPNEWS = 'mpnews', // 公众号图文消息 - MUSIC = 'music', // 音乐消息 - NEWS = 'news', // 图文消息 - TEXT = 'text', // 文本消息 - VIDEO = 'video', // 视频消息 - VOICE = 'voice', // 语音消息 - WXCARD = 'wxcard', // 卡券消息 -} +import { requestClient } from '#/api/request'; export namespace MpMessageApi { /** 消息信息 */ diff --git a/apps/web-antd/src/components/form-create/helpers.ts b/apps/web-antd/src/components/form-create/helpers.ts index def2c81a9..260170b51 100644 --- a/apps/web-antd/src/components/form-create/helpers.ts +++ b/apps/web-antd/src/components/form-create/helpers.ts @@ -21,15 +21,21 @@ import { /** 编码表单 Conf */ export function encodeConf(designerRef: any) { - return JSON.stringify(designerRef.value.getOption()); + // 关联案例:https://gitee.com/yudaocode/yudao-ui-admin-vue3/pulls/834/ + return formCreate.toJson(designerRef.value.getOption()); +} + +/** 解码表单 Conf */ +export function decodeConf(conf: string) { + return formCreate.parseJson(conf); } /** 编码表单 Fields */ export function encodeFields(designerRef: any) { - const rule = JSON.parse(designerRef.value.getJson()); + const rule = designerRef.value.getRule(); const fields: string[] = []; - rule.forEach((item: unknown) => { - fields.push(JSON.stringify(item)); + rule.forEach((item: any) => { + fields.push(formCreate.toJson(item)); }); return fields; } @@ -49,7 +55,7 @@ export function setConfAndFields( conf: string, fields: string | string[], ) { - designerRef.value.setOption(formCreate.parseJson(conf)); + designerRef.value.setOption(decodeConf(conf)); // 处理 fields 参数类型,确保传入 decodeFields 的是 string[] 类型 const fieldsArray = Array.isArray(fields) ? fields : [fields]; designerRef.value.setRule(decodeFields(fieldsArray)); @@ -65,7 +71,7 @@ export function setConfAndFields2( if (isRef(detailPreview)) { detailPreview = detailPreview.value; } - detailPreview.option = formCreate.parseJson(conf); + detailPreview.option = decodeConf(conf); detailPreview.rule = decodeFields(fields); if (value) { detailPreview.value = value; diff --git a/apps/web-antd/src/views/iot/alert/config/index.vue b/apps/web-antd/src/views/iot/alert/config/index.vue index 4797250dc..0f23562bc 100644 --- a/apps/web-antd/src/views/iot/alert/config/index.vue +++ b/apps/web-antd/src/views/iot/alert/config/index.vue @@ -10,7 +10,7 @@ import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; import { deleteAlertConfig, getAlertConfigPage } from '#/api/iot/alert/config'; import { $t } from '#/locales'; -import AlertConfigForm from '../modules/AlertConfigForm.vue'; +import AlertConfigForm from '../modules/alert-config-form.vue'; import { useGridColumns, useGridFormSchema } from './data'; defineOptions({ name: 'IoTAlertConfig' }); diff --git a/apps/web-antd/src/views/iot/alert/modules/AlertConfigForm.vue b/apps/web-antd/src/views/iot/alert/modules/alert-config-form.vue similarity index 100% rename from apps/web-antd/src/views/iot/alert/modules/AlertConfigForm.vue rename to apps/web-antd/src/views/iot/alert/modules/alert-config-form.vue diff --git a/apps/web-antd/src/views/iot/device/device/index.vue b/apps/web-antd/src/views/iot/device/device/index.vue index d06649d66..83e79c0a3 100644 --- a/apps/web-antd/src/views/iot/device/device/index.vue +++ b/apps/web-antd/src/views/iot/device/device/index.vue @@ -32,10 +32,10 @@ import { getSimpleProductList } from '#/api/iot/product/product'; import { $t } from '#/locales'; import { useGridColumns } from './data'; -import DeviceCardView from './modules/DeviceCardView.vue'; -import DeviceForm from './modules/DeviceForm.vue'; -import DeviceGroupForm from './modules/DeviceGroupForm.vue'; -import DeviceImportForm from './modules/DeviceImportForm.vue'; +import DeviceCardView from './modules/device-card-view.vue'; +import DeviceForm from './modules/device-form.vue'; +import DeviceGroupForm from './modules/device-group-form.vue'; +import DeviceImportForm from './modules/device-import-form.vue'; /** IoT 设备列表 */ defineOptions({ name: 'IoTDevice' }); @@ -48,6 +48,7 @@ const viewMode = ref<'card' | 'list'>('card'); const cardViewRef = ref(); // Modal instances +// TODO @haohao:这个界面,等 product 改完,在一起看看怎么弄更好。 const [DeviceFormModal, deviceFormModalApi] = useVbenModal({ connectedComponent: DeviceForm, destroyOnClose: true, diff --git a/apps/web-antd/src/views/iot/device/device/modules/components/DeviceTableSelect.vue b/apps/web-antd/src/views/iot/device/device/modules/components/device-table-select.vue similarity index 100% rename from apps/web-antd/src/views/iot/device/device/modules/components/DeviceTableSelect.vue rename to apps/web-antd/src/views/iot/device/device/modules/components/device-table-select.vue diff --git a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailConfig.vue b/apps/web-antd/src/views/iot/device/device/modules/detail/device-detail-config.vue similarity index 100% rename from apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailConfig.vue rename to apps/web-antd/src/views/iot/device/device/modules/detail/device-detail-config.vue diff --git a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsHeader.vue b/apps/web-antd/src/views/iot/device/device/modules/detail/device-details-header.vue similarity index 98% rename from apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsHeader.vue rename to apps/web-antd/src/views/iot/device/device/modules/detail/device-details-header.vue index 8c0acd85a..d0de74904 100644 --- a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsHeader.vue +++ b/apps/web-antd/src/views/iot/device/device/modules/detail/device-details-header.vue @@ -8,7 +8,7 @@ import { useRouter } from 'vue-router'; import { Button, Card, Descriptions, message } from 'ant-design-vue'; -import DeviceForm from '../DeviceForm.vue'; +import DeviceForm from '../device-form.vue'; interface Props { product: IotProductApi.Product; diff --git a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsInfo.vue b/apps/web-antd/src/views/iot/device/device/modules/detail/device-details-info.vue similarity index 100% rename from apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsInfo.vue rename to apps/web-antd/src/views/iot/device/device/modules/detail/device-details-info.vue diff --git a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsMessage.vue b/apps/web-antd/src/views/iot/device/device/modules/detail/device-details-message.vue similarity index 100% rename from apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsMessage.vue rename to apps/web-antd/src/views/iot/device/device/modules/detail/device-details-message.vue diff --git a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsSimulator.vue b/apps/web-antd/src/views/iot/device/device/modules/detail/device-details-simulator.vue similarity index 99% rename from apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsSimulator.vue rename to apps/web-antd/src/views/iot/device/device/modules/detail/device-details-simulator.vue index 4e203e3d4..19ae1dc67 100644 --- a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsSimulator.vue +++ b/apps/web-antd/src/views/iot/device/device/modules/detail/device-details-simulator.vue @@ -22,13 +22,13 @@ import { } from 'ant-design-vue'; import { DeviceStateEnum, sendDeviceMessage } from '#/api/iot/device/device'; -import DataDefinition from '#/views/iot/thingmodel/modules/components/DataDefinition.vue'; +import DataDefinition from '#/views/iot/thingmodel/modules/components/data-definition.vue'; import { IotDeviceMessageMethodEnum, IoTThingModelTypeEnum, } from '#/views/iot/utils/constants'; -import DeviceDetailsMessage from './DeviceDetailsMessage.vue'; +import DeviceDetailsMessage from './device-details-message.vue'; const props = defineProps<{ device: IotDeviceApi.Device; diff --git a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsSubDevice.vue b/apps/web-antd/src/views/iot/device/device/modules/detail/device-details-sub-device.vue similarity index 100% rename from apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsSubDevice.vue rename to apps/web-antd/src/views/iot/device/device/modules/detail/device-details-sub-device.vue diff --git a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsThingModelEvent.vue b/apps/web-antd/src/views/iot/device/device/modules/detail/device-details-thing-model-event.vue similarity index 100% rename from apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsThingModelEvent.vue rename to apps/web-antd/src/views/iot/device/device/modules/detail/device-details-thing-model-event.vue diff --git a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsThingModelPropertyHistory.vue b/apps/web-antd/src/views/iot/device/device/modules/detail/device-details-thing-model-property-history.vue similarity index 98% rename from apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsThingModelPropertyHistory.vue rename to apps/web-antd/src/views/iot/device/device/modules/detail/device-details-thing-model-property-history.vue index cdc541cd5..998486742 100644 --- a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsThingModelPropertyHistory.vue +++ b/apps/web-antd/src/views/iot/device/device/modules/detail/device-details-thing-model-property-history.vue @@ -354,7 +354,7 @@ async function handleExport() { ...list.value.map((item, index) => { return [ index + 1, - formatDate(new Date(item.updateTime)), + formatDateTime(new Date(item.updateTime)), isComplexDataType.value ? `"${JSON.stringify(item.value)}"` : item.value, @@ -553,15 +553,17 @@ defineExpose({ open }); // 提供 open 方法,用于打开弹窗 .toolbar-wrapper { padding: 16px; - background-color: #fafafa; + background-color: hsl(var(--card) / 0.9); border-radius: 8px; + border: 1px solid hsl(var(--border) / 0.6); } .chart-container, .table-container { padding: 16px; - background-color: #fff; + background-color: hsl(var(--card)); border-radius: 8px; + border: 1px solid hsl(var(--border) / 0.6); } } diff --git a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsThingModelProperty.vue b/apps/web-antd/src/views/iot/device/device/modules/detail/device-details-thing-model-property.vue similarity index 96% rename from apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsThingModelProperty.vue rename to apps/web-antd/src/views/iot/device/device/modules/detail/device-details-thing-model-property.vue index 283a2d133..d15e649c7 100644 --- a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsThingModelProperty.vue +++ b/apps/web-antd/src/views/iot/device/device/modules/detail/device-details-thing-model-property.vue @@ -22,7 +22,8 @@ import { import { getLatestDeviceProperties } from '#/api/iot/device/device'; -import DeviceDetailsThingModelPropertyHistory from './DeviceDetailsThingModelPropertyHistory.vue'; +import DeviceDetailsThingModelPropertyHistory + from './device-details-thing-model-property-history.vue'; const props = defineProps<{ deviceId: number }>(); @@ -123,10 +124,12 @@ onMounted(() => { style="width: 240px" @press-enter="handleQuery" /> -
- 自动刷新 - -
+