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 3d5280e4..f8af61fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -924,10 +924,10 @@ "three" "0.143.0" "uppercamelcase" "^1.1.0" -"@vueuse/core@*", "@vueuse/core@^9.10.0": - "integrity" "sha512-CxMewME07qeuzuT/AOIQGv0EhhDoojniqU6pC3F8m5VC76L47UT18DcX88kWlP3I7d3qMJ4u/PD8iSRsy3bmNA==" - "resolved" "https://registry.npmjs.org/@vueuse/core/-/core-9.10.0.tgz" - "version" "9.10.0" +JSONStream@^1.0.4: + version "1.3.5" + resolved "https://registry.npmmirror.com/JSONStream/-/JSONStream-1.3.5.tgz" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== dependencies: "@types/web-bluetooth" "^0.0.16" "@vueuse/metadata" "9.10.0"