diff --git a/public/images/device-type-3.png b/public/images/device-type-3.png deleted file mode 100644 index 3561237e..00000000 Binary files a/public/images/device-type-3.png and /dev/null differ diff --git a/public/images/device-type-3-big.png b/public/images/device/instance/device-card.png similarity index 100% rename from public/images/device-type-3-big.png rename to public/images/device/instance/device-card.png diff --git a/src/api/device/instance.ts b/src/api/device/instance.ts index 8c3c964f..8886dcbe 100644 --- a/src/api/device/instance.ts +++ b/src/api/device/instance.ts @@ -21,4 +21,34 @@ export const saveMetadata = (id: string, data: string) => server.put(`/device/in * @param id 设备ID * @returns 设备详情 */ -export const detail = (id: string) => server.get(`/device-instance/${id}/detail`) \ No newline at end of file +export const detail = (id: string) => server.get(`/device-instance/${id}/detail`) + +/** + * 查询数据 + * @param data 分页搜索数据 + * @returns + */ +export const query = (data?: Record) => server.post('/device-instance/_query', data) + +/** + * 删除设备 + * @param id 设备ID + * @returns + */ +export const _delete = (id: string) => server.remove(`/device-instance/${id}`) + +/** + * 启用设备 + * @param id 设备ID + * @param data + * @returns + */ +export const _deploy = (id: string) => server.post(`/device-instance/${id}/deploy`) + +/** + * 禁用设备 + * @param id 设备ID + * @param data + * @returns + */ + export const _undeploy = (id: string) => server.post(`/device-instance/${id}/undeploy`) \ No newline at end of file diff --git a/src/api/northbound/alicloud.ts b/src/api/northbound/alicloud.ts new file mode 100644 index 00000000..e69de29b diff --git a/src/api/northbound/dueros.ts b/src/api/northbound/dueros.ts new file mode 100644 index 00000000..e3cb60cc --- /dev/null +++ b/src/api/northbound/dueros.ts @@ -0,0 +1,8 @@ +import server from '@/utils/request' + +/** + * 查询数据 + * @param data 分页搜索数据 + * @returns + */ +export const query = (data: Record) => server.post('/dueros/product/_query', data) \ No newline at end of file diff --git a/src/components/AIcon/index.ts b/src/components/AIcon/index.ts deleted file mode 100644 index 39b2aee7..00000000 --- a/src/components/AIcon/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { createFromIconfontCN } from '@ant-design/icons-vue'; - -const AliIcon = createFromIconfontCN({ - scriptUrl: '/icons/iconfont.js', // 在 iconfont.cn 上生成 -}); - -export default AliIcon \ No newline at end of file diff --git a/src/components/AIcon/index.tsx b/src/components/AIcon/index.tsx new file mode 100644 index 00000000..eb1703a1 --- /dev/null +++ b/src/components/AIcon/index.tsx @@ -0,0 +1,32 @@ +import { createFromIconfontCN } from '@ant-design/icons-vue'; +import * as $Icon from '@ant-design/icons-vue'; +import { createVNode } from 'vue'; + +const AliIcon = createFromIconfontCN({ + scriptUrl: '/icons/iconfont.js', // 在 iconfont.cn 上生成 +}); + +const AntdIcon = (props: {type: string}) => { + const {type} = props; + let antIcon: {[key: string]: any} = $Icon + return createVNode(antIcon[type]) +} + +const iconKeys = [ + 'EyeOutlined', + 'EditOutlined', + 'PlusOutlined', + 'DeleteOutlined', + 'CheckCircleOutlined', + 'StopOutlined', + 'CheckOutlined', + 'CloseOutlined', + 'DownOutlined' +] + +const Icon = (props: {type: string}) => { + if(iconKeys.includes(props.type)) return + return +} + +export default Icon \ No newline at end of file diff --git a/src/components/BadgeStatus/index.vue b/src/components/BadgeStatus/index.vue index 47870618..067ee58b 100644 --- a/src/components/BadgeStatus/index.vue +++ b/src/components/BadgeStatus/index.vue @@ -6,8 +6,7 @@ \ No newline at end of file diff --git a/src/views/northbound/AliCloud/index.vue b/src/views/northbound/AliCloud/index.vue new file mode 100644 index 00000000..cd36fd59 --- /dev/null +++ b/src/views/northbound/AliCloud/index.vue @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/src/views/northbound/DuerOS/index.vue b/src/views/northbound/DuerOS/index.vue new file mode 100644 index 00000000..f8ab376f --- /dev/null +++ b/src/views/northbound/DuerOS/index.vue @@ -0,0 +1,154 @@ + + + \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 53f50f7d..439b5bdc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -796,6 +796,11 @@ dependencies: "@types/webxr" "*" +"@types/web-bluetooth@^0.0.16": + version "0.0.16" + resolved "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz#1d12873a8e49567371f2a75fe3e7f7edca6662d8" + integrity sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ== + "@types/webxr@*": version "0.5.0" resolved "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.0.tgz" @@ -1003,6 +1008,28 @@ three "0.143.0" uppercamelcase "^1.1.0" +"@vueuse/core@^9.10.0": + version "9.10.0" + resolved "https://registry.npmmirror.com/@vueuse/core/-/core-9.10.0.tgz#2ef6e55ca773c5b2db1e3f13b8292af96dd32214" + integrity sha512-CxMewME07qeuzuT/AOIQGv0EhhDoojniqU6pC3F8m5VC76L47UT18DcX88kWlP3I7d3qMJ4u/PD8iSRsy3bmNA== + dependencies: + "@types/web-bluetooth" "^0.0.16" + "@vueuse/metadata" "9.10.0" + "@vueuse/shared" "9.10.0" + vue-demi "*" + +"@vueuse/metadata@9.10.0": + version "9.10.0" + resolved "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-9.10.0.tgz#1a5eb94ca755bd8e666505f47da7d88969cffdc7" + integrity sha512-G5VZhgTCapzU9rv0Iq2HBrVOSGzOKb+OE668NxhXNcTjUjwYxULkEhAw70FtRLMZc+hxcFAzDZlKYA0xcwNMuw== + +"@vueuse/shared@9.10.0": + version "9.10.0" + resolved "https://registry.npmmirror.com/@vueuse/shared/-/shared-9.10.0.tgz#49874a0f9955d28689b3133de660367c63dbc030" + integrity sha512-vakHJ2ZRklAzqmcVBL38RS7BxdBA4+5poG9NsSyqJxrt9kz0zX3P5CXMy0Hm6LFbZXUgvKdqAS3pUH1zX/5qTQ== + dependencies: + vue-demi "*" + JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.npmmirror.com/JSONStream/-/JSONStream-1.3.5.tgz"