【代码评审】IoT:产品、设备、物模型的代码

This commit is contained in:
YunaiV
2024-10-01 19:29:24 +08:00
parent 4b2800f723
commit 6d641177b8
15 changed files with 114 additions and 149 deletions

View File

@ -23,9 +23,14 @@ import ProductDetailsHeader from '@/views/iot/product/detail/ProductDetailsHeade
import ProductDetailsInfo from '@/views/iot/product/detail/ProductDetailsInfo.vue'
import ProductTopic from '@/views/iot/product/detail/ProductTopic.vue'
import ThinkModelFunction from '@/views/iot/product/detail/ThinkModelFunction.vue'
import { useTagsViewStore } from '@/store/modules/tagsView'
import { useRouter } from 'vue-router'
defineOptions({ name: 'IoTProductDetail' })
const { delView } = useTagsViewStore() // 视图操作
const { currentRoute } = useRouter()
const route = useRoute()
const message = useMessage()
const id = Number(route.params.id) // 编号
@ -45,7 +50,7 @@ const getProductData = async (id: number) => {
}
// 查询设备数量
const getDeviceCount = async (productId: string) => {
const getDeviceCount = async (productId: number) => {
try {
const count = await DeviceApi.getDeviceCount(productId)
console.log('Device count response:', count)