Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fe3715c4
authored
Dec 16, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【代码评审】IoT:物模型的管理哈
parent
773b8dea
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
1 deletions
+10
-1
src/api/iot/thinkmodelfunction/index.ts
+1
-0
src/views/iot/product/product/detail/ThingModel/ThingModelDataSpecs.vue
+2
-1
src/views/iot/product/product/detail/ThingModel/ThingModelForm.vue
+3
-0
src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelArrayTypeDataSpecs.vue
+1
-0
src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelEnumTypeDataSpecs.vue
+1
-0
src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelNumberTypeDataSpecs.vue
+1
-0
src/views/iot/product/product/detail/ThingModel/index.vue
+1
-0
No files found.
src/api/iot/thinkmodelfunction/index.ts
View file @
fe3715c4
...
@@ -51,6 +51,7 @@ export enum ProductFunctionAccessModeEnum {
...
@@ -51,6 +51,7 @@ export enum ProductFunctionAccessModeEnum {
READ_ONLY
=
'r'
// 只读
READ_ONLY
=
'r'
// 只读
}
}
// TODO @puhui999:getProductThingModelPage => getThingModelPage 哈,不用带 product 前缀
// IoT 产品物模型 API
// IoT 产品物模型 API
export
const
ThinkModelFunctionApi
=
{
export
const
ThinkModelFunctionApi
=
{
// 查询产品物模型分页
// 查询产品物模型分页
...
...
src/views/iot/product/product/detail/ThingModel/ThingModelDataSpecs.vue
View file @
fe3715c4
...
@@ -74,8 +74,9 @@ import {
...
@@ -74,8 +74,9 @@ import {
}
from
'./dataSpecs'
}
from
'./dataSpecs'
import
{
ThingModelProperty
}
from
'@/api/iot/thinkmodelfunction'
import
{
ThingModelProperty
}
from
'@/api/iot/thinkmodelfunction'
/** 物模型数据 */
/**
IoT
物模型数据 */
defineOptions
({
name
:
'ThingModelDataSpecs'
})
defineOptions
({
name
:
'ThingModelDataSpecs'
})
const
props
=
defineProps
<
{
modelValue
:
any
}
>
()
const
props
=
defineProps
<
{
modelValue
:
any
}
>
()
const
emits
=
defineEmits
([
'update:modelValue'
])
const
emits
=
defineEmits
([
'update:modelValue'
])
const
property
=
useVModel
(
props
,
'modelValue'
,
emits
)
as
Ref
<
ThingModelProperty
>
const
property
=
useVModel
(
props
,
'modelValue'
,
emits
)
as
Ref
<
ThingModelProperty
>
...
...
src/views/iot/product/product/detail/ThingModel/ThingModelForm.vue
View file @
fe3715c4
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
>
>
<el-form-item
label=
"功能类型"
prop=
"type"
>
<el-form-item
label=
"功能类型"
prop=
"type"
>
<el-radio-group
v-model=
"formData.type"
>
<el-radio-group
v-model=
"formData.type"
>
<!-- TODO @puhui999:从字典拿 -->
<el-radio-button
:value=
"1"
>
属性
</el-radio-button>
<el-radio-button
:value=
"1"
>
属性
</el-radio-button>
<el-radio-button
:value=
"2"
>
服务
</el-radio-button>
<el-radio-button
:value=
"2"
>
服务
</el-radio-button>
<el-radio-button
:value=
"3"
>
事件
</el-radio-button>
<el-radio-button
:value=
"3"
>
事件
</el-radio-button>
...
@@ -46,10 +47,12 @@ import { IOT_PROVIDE_KEY } from '@/views/iot/utils/constants'
...
@@ -46,10 +47,12 @@ import { IOT_PROVIDE_KEY } from '@/views/iot/utils/constants'
import
{
DataSpecsDataType
}
from
'./config'
import
{
DataSpecsDataType
}
from
'./config'
import
{
cloneDeep
}
from
'lodash-es'
import
{
cloneDeep
}
from
'lodash-es'
// TODO @puhui999:这里注释下哈
defineOptions
({
name
:
'IoTProductThingModelForm'
})
defineOptions
({
name
:
'IoTProductThingModelForm'
})
const
product
=
inject
<
Ref
<
ProductVO
>>
(
IOT_PROVIDE_KEY
.
PRODUCT
)
// 注入产品信息
const
product
=
inject
<
Ref
<
ProductVO
>>
(
IOT_PROVIDE_KEY
.
PRODUCT
)
// 注入产品信息
// TODO @puhui999:变量必要的注释哈。 = = 虽然有点啰嗦,但是写下,保持统一;
const
{
t
}
=
useI18n
()
const
{
t
}
=
useI18n
()
const
message
=
useMessage
()
const
message
=
useMessage
()
...
...
src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelArrayTypeDataSpecs.vue
View file @
fe3715c4
...
@@ -26,6 +26,7 @@ import { DataSpecsDataType, dataTypeOptions } from '../config'
...
@@ -26,6 +26,7 @@ import { DataSpecsDataType, dataTypeOptions } from '../config'
/** 数组型的 dataSpecs 配置组件 */
/** 数组型的 dataSpecs 配置组件 */
defineOptions
({
name
:
'ThingModelArrayTypeDataSpecs'
})
defineOptions
({
name
:
'ThingModelArrayTypeDataSpecs'
})
const
props
=
defineProps
<
{
modelValue
:
any
}
>
()
const
props
=
defineProps
<
{
modelValue
:
any
}
>
()
const
emits
=
defineEmits
([
'update:modelValue'
])
const
emits
=
defineEmits
([
'update:modelValue'
])
const
dataSpecs
=
useVModel
(
props
,
'modelValue'
,
emits
)
as
Ref
<
any
>
const
dataSpecs
=
useVModel
(
props
,
'modelValue'
,
emits
)
as
Ref
<
any
>
...
...
src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelEnumTypeDataSpecs.vue
View file @
fe3715c4
...
@@ -29,6 +29,7 @@ import {
...
@@ -29,6 +29,7 @@ import {
/** 枚举型的 dataSpecs 配置组件 */
/** 枚举型的 dataSpecs 配置组件 */
defineOptions
({
name
:
'ThingModelEnumTypeDataSpecs'
})
defineOptions
({
name
:
'ThingModelEnumTypeDataSpecs'
})
const
props
=
defineProps
<
{
modelValue
:
any
}
>
()
const
props
=
defineProps
<
{
modelValue
:
any
}
>
()
const
emits
=
defineEmits
([
'update:modelValue'
])
const
emits
=
defineEmits
([
'update:modelValue'
])
const
dataSpecsList
=
useVModel
(
props
,
'modelValue'
,
emits
)
as
Ref
<
DataSpecsEnumOrBoolDataVO
[]
>
const
dataSpecsList
=
useVModel
(
props
,
'modelValue'
,
emits
)
as
Ref
<
DataSpecsEnumOrBoolDataVO
[]
>
...
...
src/views/iot/product/product/detail/ThingModel/dataSpecs/ThingModelNumberTypeDataSpecs.vue
View file @
fe3715c4
...
@@ -34,6 +34,7 @@ import { DataSpecsNumberDataVO } from '../config'
...
@@ -34,6 +34,7 @@ import { DataSpecsNumberDataVO } from '../config'
/** 数值型的 dataSpecs 配置组件 */
/** 数值型的 dataSpecs 配置组件 */
defineOptions
({
name
:
'ThingModelNumberTypeDataSpecs'
})
defineOptions
({
name
:
'ThingModelNumberTypeDataSpecs'
})
const
props
=
defineProps
<
{
modelValue
:
any
}
>
()
const
props
=
defineProps
<
{
modelValue
:
any
}
>
()
const
emits
=
defineEmits
([
'update:modelValue'
])
const
emits
=
defineEmits
([
'update:modelValue'
])
const
dataSpecs
=
useVModel
(
props
,
'modelValue'
,
emits
)
as
Ref
<
DataSpecsNumberDataVO
>
const
dataSpecs
=
useVModel
(
props
,
'modelValue'
,
emits
)
as
Ref
<
DataSpecsNumberDataVO
>
...
...
src/views/iot/product/product/detail/ThingModel/index.vue
View file @
fe3715c4
<!-- TODO 目录,应该是 thinkModel 哈。 -->
<
template
>
<
template
>
<ContentWrap>
<ContentWrap>
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment