diff --git a/src/api/rule-engine/config.ts b/src/api/rule-engine/config.ts
new file mode 100644
index 00000000..51a9495e
--- /dev/null
+++ b/src/api/rule-engine/config.ts
@@ -0,0 +1,5 @@
+import server from '@/utils/request';
+/**
+ * 查询等级
+ */
+export const queryLevel = () => server.get('/alarm/config/default/level');
\ No newline at end of file
diff --git a/src/store/product.ts b/src/store/product.ts
index c5144d8c..0cf68527 100644
--- a/src/store/product.ts
+++ b/src/store/product.ts
@@ -1,6 +1,7 @@
import { ProductItem } from "@/views/device/Product/typings";
import { defineStore } from "pinia";
-import { detail} from '@/api/device/product'
+import { detail , getDeviceNumber} from '@/api/device/product'
+import encodeQuery from "@/utils/encodeQuery";
export const useProductStore = defineStore({
id: 'product',
@@ -16,9 +17,13 @@ export const useProductStore = defineStore({
},
async refresh(id: string) {
const resp = await detail(id)
+ const res = await getDeviceNumber(encodeQuery({ terms: { productId: id } }))
if(resp.status === 200){
this.current = resp.result
this.detail = resp.result
+ if(res.status === 200){
+ this.current.count = res.result
+ }
}
},
setTabActiveKey(key: string) {
diff --git a/src/views/device/Product/Detail/BasicInfo/indev.vue b/src/views/device/Product/Detail/BasicInfo/indev.vue
index bcdcbd8b..582cb591 100644
--- a/src/views/device/Product/Detail/BasicInfo/indev.vue
+++ b/src/views/device/Product/Detail/BasicInfo/indev.vue
@@ -29,10 +29,10 @@
}}
{{
- productStore.current.createTime
+ moment(productStore.current.createTime).format('YYYY-MM-DD HH:mm:ss')
}}
{{
- productStore.current.modifyTime
+ moment(productStore.current.modifyTime).format('YYYY-MM-DD HH:mm:ss')
}}
@@ -47,6 +47,7 @@
+
\ No newline at end of file
diff --git a/src/views/rule-engine/Alarm/Config/typing.d.ts b/src/views/rule-engine/Alarm/Config/typing.d.ts
new file mode 100644
index 00000000..0d4dd421
--- /dev/null
+++ b/src/views/rule-engine/Alarm/Config/typing.d.ts
@@ -0,0 +1,26 @@
+import { BaseItem } from '@/utils/typings';
+
+type LevelItem = {
+ level: number;
+ title: string;
+};
+
+type IOConfigItem = {
+ id?: string;
+ address: string;
+ topic: string;
+ username: string;
+ password: string;
+};
+type IOItem = {
+ alarmConfigId: string;
+ sourceType: string;
+ config: Partial<{
+ type: string;
+ dataSourceId: string;
+ config: Partial;
+ }>;
+ exchangeType: 'consume' | 'producer'; //订阅|推送
+ state: 'disable' | 'enabled'; //禁用|正常
+ description: string;
+} & BaseItem;