修复下面的问题 和其他页面中的类似问题

1.apps/web-antd/src/views/iot/device/device/modules/DeviceForm.vue
type 是和方法分离的

2.apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsMessage.vue
const getMessageList = async () => {
方法使用function 不要用const,保持一致

3.apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsMessage.vue
<script setup lang="ts">
文件结构是

4.apps/web-antd/src/views/iot/rule/data/rule/index.vue
handleRefresh 统一命名

Signed-off-by: Administrator <425053404@qq.com>
This commit is contained in:
Administrator
2025-10-17 18:06:58 +08:00
parent 1190121773
commit cec1cc7590
18 changed files with 232 additions and 233 deletions

View File

@@ -63,17 +63,17 @@ const [Grid, gridApi] = useVbenVxeGrid({
});
// 新增功能
const handleCreate = () => {
function handleCreate() {
thingModelFormRef.value?.open('create');
};
}
// 编辑功能
const handleEdit = (row: any) => {
function handleEdit(row: any) {
thingModelFormRef.value?.open('update', row.id);
};
}
// 删除功能
const handleDelete = async (row: any) => {
async function handleDelete(row: any) {
try {
await deleteThingModel(row.id);
message.success('删除成功');
@@ -81,31 +81,31 @@ const handleDelete = async (row: any) => {
} catch (error) {
console.error('删除失败:', error);
}
};
}
// 打开 TSL
const handleOpenTSL = () => {
function handleOpenTSL() {
thingModelTSLRef.value?.open();
};
}
// 获取数据类型标签
const getDataTypeLabel = (row: any) => {
function getDataTypeLabel(row: any) {
return getDataTypeOptionsLabel(row.property?.dataType) || '-';
};
}
// 刷新表格
const handleRefresh = () => {
function handleRefresh() {
gridApi.reload();
};
}
// 获取产品信息
const getProductData = async () => {
async function getProductData() {
try {
product.value = await getProduct(props.productId);
} catch (error) {
console.error('获取产品信息失败:', error);
}
};
}
// 初始化
onMounted(async () => {