diff --git a/package.json b/package.json index f7040682..978c1d3c 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "dependencies": { "@vitejs/plugin-vue-jsx": "^3.0.0", "@vuemap/vue-amap": "^1.1.20", + "@vueuse/core": "^9.10.0", "ant-design-vue": "^3.2.15", "axios": "^1.2.1", "echarts": "^5.4.1", diff --git a/src/api/device/instance.ts b/src/api/device/instance.ts index dd91bf13..8c3c964f 100644 --- a/src/api/device/instance.ts +++ b/src/api/device/instance.ts @@ -1,4 +1,5 @@ import server from '@/utils/request' +import { DeviceInstance } from '@/views/device/instance/typings' /** * 删除设备物模型 @@ -13,4 +14,11 @@ export const deleteMetadata = (deviceId: string) => server.remove(`/device-insta * @param data 物模型 * @returns */ -export const saveMetadata = (id: string, data: string) => server.put(`/device/instance/${id}/metadata`, data) \ No newline at end of file +export const saveMetadata = (id: string, data: string) => server.put(`/device/instance/${id}/metadata`, data) + +/** + * 根据设备ID获取设备详情 + * @param id 设备ID + * @returns 设备详情 + */ +export const detail = (id: string) => server.get(`/device-instance/${id}/detail`) \ No newline at end of file diff --git a/src/api/device/product.ts b/src/api/device/product.ts index 53183eb3..68f8b787 100644 --- a/src/api/device/product.ts +++ b/src/api/device/product.ts @@ -1,5 +1,5 @@ import server from '@/utils/request' -import type { DeviceMetadata } from '@/views/device/Product/typings' +import { DeviceMetadata, ProductItem } from '@/views/device/Product/typings' /** * 根据条件查询产品(不带翻页) @@ -23,4 +23,17 @@ export const convertMetadata = (direction: 'from' | 'to', type: string, data: an * @param data 产品数据 * @returns */ -export const modify = (id: string, data: any) => server.put(`/device-product/${id}`, data) \ No newline at end of file +export const modify = (id: string, data: any) => server.put(`/device-product/${id}`, data) + +/** + * + * @returns + */ +export const getCodecs = () => server.get<{id: string, name: string}>('/device/product/metadata/codecs') + +/** + * 根据产品ID获取产品详情 + * @param id 产品ID + * @returns + */ +export const detail = (id: string) => server.get(`/device-product/${id}`) \ No newline at end of file diff --git a/src/api/home.js b/src/api/home.js index ee609220..ea3aa339 100644 --- a/src/api/home.js +++ b/src/api/home.js @@ -5,4 +5,4 @@ export const getDeviceCount_api = () => server.get(`/device/instance/_count`); // 产品数量 export const getProductCount_api = (data) => server.post(`/device-product/_count`, data); // 查询产品列表 -export const getProductList_api = (data) => server.get(`/device/product/_query/no-paging?paging=false`, data); \ No newline at end of file +export const getProductList_api = (data) => server.get(`/device/product/_query/no-paging?paging=false`, data); diff --git a/src/api/login.js b/src/api/login.js index edf859f8..461d7628 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -12,4 +12,6 @@ export const postInitSet = (data) => server.post(`/user/settings/init`, data) export const systemVersion = () => server.get(`/system/version`) -export const bindInfo = () => server.get(`/application/sso/_all`) \ No newline at end of file +export const bindInfo = () => server.get(`/application/sso/_all`) + +export const settingDetail = (scopes) => server.get(`/system/config/${scopes}`) \ No newline at end of file diff --git a/src/api/notice/config.ts b/src/api/notice/config.ts new file mode 100644 index 00000000..9ed55cf8 --- /dev/null +++ b/src/api/notice/config.ts @@ -0,0 +1,12 @@ +import { patch, post, get } from '@/utils/request' + +export default { + // 列表 + list: (data: any) => post(`/notifier/config/_query`, data), + // 详情 + detail: (id: string): any => get(`/notifier/config/${id}`), + // 新增 + save: (data: any) => post(`/notifier/config`, data), + // 修改 + update: (data: any) => patch(`/notifier/config`, data) +} \ No newline at end of file diff --git a/src/components/CardBox/index.vue b/src/components/CardBox/index.vue index 4da3e72c..a919d67e 100644 --- a/src/components/CardBox/index.vue +++ b/src/components/CardBox/index.vue @@ -54,8 +54,8 @@ delete: item.key === 'delete', }" > - - + + @@ -284,13 +284,14 @@ const handleClick = () => { display: flex; flex-grow: 1; - & > span, - button { - width: 100% !important; - border-radius: 0 !important; + & > :deep(span, button) { + width: 100%; + border-radius: 0; } - button { + :deep(button) { + width: 100%; + border-radius: 0; background: #f6f6f6; border: 1px solid #e6e6e6; color: #2f54eb; @@ -322,7 +323,7 @@ const handleClick = () => { flex-basis: 60px; flex-grow: 0; - button { + :deep(button) { background: @error-color-deprecated-bg; border: 1px solid @error-color-outline; @@ -348,7 +349,7 @@ const handleClick = () => { } } - button[disabled] { + :deep(button[disabled]) { background: @disabled-bg; border-color: @disabled-color; diff --git a/src/components/Search/Item.vue b/src/components/Search/Item.vue index 6f44c425..bc3e5c70 100644 --- a/src/components/Search/Item.vue +++ b/src/components/Search/Item.vue @@ -1,6 +1,6 @@