Showing
7 changed files
with
84 additions
and
33 deletions
@@ -18,7 +18,7 @@ enum DeviceManagerApi { | @@ -18,7 +18,7 @@ enum DeviceManagerApi { | ||
18 | 18 | ||
19 | DEVICE_PROFILE_URL_ME = '/deviceProfile/me/list', | 19 | DEVICE_PROFILE_URL_ME = '/deviceProfile/me/list', |
20 | 20 | ||
21 | - DEVICE_ALARM_URL = '/alarm/DEVICE', | 21 | + DEVICE_ALARM_URL = '/alarm', |
22 | } | 22 | } |
23 | 23 | ||
24 | export const devicePage = (params: DeviceQueryParam) => { | 24 | export const devicePage = (params: DeviceQueryParam) => { |
@@ -97,16 +97,9 @@ export const getDeviceDetail = (id: string) => { | @@ -97,16 +97,9 @@ export const getDeviceDetail = (id: string) => { | ||
97 | }; | 97 | }; |
98 | 98 | ||
99 | // 查询设备详情中的告警 | 99 | // 查询设备详情中的告警 |
100 | -export const getDeviceAlarm = (id: string, params?: DeviceProfileQueryParam) => { | ||
101 | - return () => { | ||
102 | - return defHttp.get( | ||
103 | - { | ||
104 | - url: DeviceManagerApi.DEVICE_ALARM_URL + `/${id}`, | ||
105 | - params, | ||
106 | - }, | ||
107 | - { | ||
108 | - joinPrefix: false, | ||
109 | - } | ||
110 | - ); | ||
111 | - }; | 100 | +export const getDeviceAlarm = (params?: DeviceProfileQueryParam) => { |
101 | + return defHttp.get({ | ||
102 | + url: DeviceManagerApi.DEVICE_ALARM_URL, | ||
103 | + params, | ||
104 | + }); | ||
112 | }; | 105 | }; |
@@ -9,11 +9,25 @@ export default { | @@ -9,11 +9,25 @@ export default { | ||
9 | sort: 'sort', | 9 | sort: 'sort', |
10 | status: 'status', | 10 | status: 'status', |
11 | }, | 11 | }, |
12 | + notice: { | ||
13 | + webSiteNotice: 'web site notice', | ||
14 | + noticeManagement: 'notice management', | ||
15 | + myNotice: 'my notice', | ||
16 | + }, | ||
17 | + | ||
18 | + device: { | ||
19 | + deviceManagement: 'device management', | ||
20 | + device: 'device', | ||
21 | + deviceProfile: 'device profile', | ||
22 | + }, | ||
12 | tenant: { | 23 | tenant: { |
13 | tenant: 'tenant', | 24 | tenant: 'tenant', |
14 | tenantManagement: 'tenant management', | 25 | tenantManagement: 'tenant management', |
15 | - tenantSetting: 'tenant setting', | 26 | + tenantSetting: 'tenant config', |
27 | + tenantOEM: 'OEM customization', | ||
28 | + tenantRule: 'tenant rule', | ||
16 | }, | 29 | }, |
30 | + | ||
17 | organization: { | 31 | organization: { |
18 | queryOrganizationName: 'organization name', | 32 | queryOrganizationName: 'organization name', |
19 | toolOrganizationList: 'organization list', | 33 | toolOrganizationList: 'organization list', |
@@ -21,6 +35,22 @@ export default { | @@ -21,6 +35,22 @@ export default { | ||
21 | toolEditOrganization: 'edit organization', | 35 | toolEditOrganization: 'edit organization', |
22 | parentOrganization: 'parent organization', | 36 | parentOrganization: 'parent organization', |
23 | }, | 37 | }, |
38 | + RuleEngine: { | ||
39 | + ruleEngine: 'rule engine', | ||
40 | + sceneLinkage: 'scene linkage', | ||
41 | + }, | ||
42 | + message: { | ||
43 | + messageManagement: 'message management', | ||
44 | + messageConfig: 'message config', | ||
45 | + messageTemplate: 'message template', | ||
46 | + messageRecord: 'message record', | ||
47 | + }, | ||
48 | + alarm: { | ||
49 | + alarmManagement: 'alarm management', | ||
50 | + geographicPosition: 'geographic position', | ||
51 | + alarmContact: 'alarm contact', | ||
52 | + }, | ||
53 | + | ||
24 | dept: { | 54 | dept: { |
25 | queryDeptName: 'dept name', | 55 | queryDeptName: 'dept name', |
26 | queryDeptStatus: 'status', | 56 | queryDeptStatus: 'status', |
@@ -41,6 +71,8 @@ export default { | @@ -41,6 +71,8 @@ export default { | ||
41 | roleManagement: 'role management', | 71 | roleManagement: 'role management', |
42 | menuManagement: 'menu management', | 72 | menuManagement: 'menu management', |
43 | deptManagement: 'dept management', | 73 | deptManagement: 'dept management', |
74 | + organizationManagement: 'organization management', | ||
75 | + dictManagement: 'dice management', | ||
44 | modifyPassword: 'modify password', | 76 | modifyPassword: 'modify password', |
45 | pageSystemTitleCreateMenu: 'create menu', | 77 | pageSystemTitleCreateMenu: 'create menu', |
46 | pageSystemTitleCreateTenant: 'new tenant', | 78 | pageSystemTitleCreateTenant: 'new tenant', |
@@ -9,10 +9,23 @@ export default { | @@ -9,10 +9,23 @@ export default { | ||
9 | sort: '排序', | 9 | sort: '排序', |
10 | status: '状态', | 10 | status: '状态', |
11 | }, | 11 | }, |
12 | + notice: { | ||
13 | + webSiteNotice: '站内通知', | ||
14 | + noticeManagement: '通知管理', | ||
15 | + myNotice: '我的通知', | ||
16 | + }, | ||
17 | + device: { | ||
18 | + deviceManagement: '设备管理', | ||
19 | + device: '设备', | ||
20 | + deviceProfile: '设备配置', | ||
21 | + }, | ||
22 | + | ||
12 | tenant: { | 23 | tenant: { |
13 | tenant: '租户', | 24 | tenant: '租户', |
14 | tenantManagement: '租户管理', | 25 | tenantManagement: '租户管理', |
15 | - tenantSetting: '租户设置', | 26 | + tenantSetting: '租户配置', |
27 | + tenantOEM: 'OEM定制', | ||
28 | + tenantRule: '租户角色', | ||
16 | }, | 29 | }, |
17 | organization: { | 30 | organization: { |
18 | queryOrganizationName: '组织名称', | 31 | queryOrganizationName: '组织名称', |
@@ -35,12 +48,28 @@ export default { | @@ -35,12 +48,28 @@ export default { | ||
35 | drawerTitleDeptParentDept: '上级部门', | 48 | drawerTitleDeptParentDept: '上级部门', |
36 | tableTitleMemo: '备注', | 49 | tableTitleMemo: '备注', |
37 | }, | 50 | }, |
51 | + RuleEngine: { | ||
52 | + ruleEngine: '规则引擎', | ||
53 | + sceneLinkage: '场景联动', | ||
54 | + }, | ||
55 | + message: { | ||
56 | + messageManagement: '消息管理', | ||
57 | + messageConfig: '消息配置', | ||
58 | + messageTemplate: '消息模板', | ||
59 | + messageRecord: '消息记录', | ||
60 | + }, | ||
61 | + alarm: { | ||
62 | + alarmManagement: '告警管理', | ||
63 | + geographicPosition: '地理位置', | ||
64 | + alarmContact: '告警联系人', | ||
65 | + }, | ||
38 | system: { | 66 | system: { |
39 | system: '系统管理', | 67 | system: '系统管理', |
40 | accountManagement: '账号管理', | 68 | accountManagement: '账号管理', |
41 | roleManagement: '角色管理', | 69 | roleManagement: '角色管理', |
42 | menuManagement: '菜单管理', | 70 | menuManagement: '菜单管理', |
43 | - deptManagement: '部门管理', | 71 | + organizationManagement: '组织管理', |
72 | + dictManagement: '字典管理', | ||
44 | modifyPassword: '修改密码', | 73 | modifyPassword: '修改密码', |
45 | pageSystemTitleCreateMenu: '新增菜单', | 74 | pageSystemTitleCreateMenu: '新增菜单', |
46 | pageSystemTitleCreateTenant: '新增租户', | 75 | pageSystemTitleCreateTenant: '新增租户', |
@@ -75,19 +75,19 @@ export const alarmSearchSchemas: FormSchema[] = [ | @@ -75,19 +75,19 @@ export const alarmSearchSchemas: FormSchema[] = [ | ||
75 | field: 'icon', | 75 | field: 'icon', |
76 | label: '告警状态', | 76 | label: '告警状态', |
77 | component: 'Select', | 77 | component: 'Select', |
78 | - colProps: { span: 8 }, | 78 | + colProps: { span: 6 }, |
79 | }, | 79 | }, |
80 | { | 80 | { |
81 | field: 'icon', | 81 | field: 'icon', |
82 | - label: ' ', | ||
83 | - component: 'DatePicker', | ||
84 | - colProps: { span: 8 }, | 82 | + label: '告警类型', |
83 | + component: 'Input', | ||
84 | + colProps: { span: 6 }, | ||
85 | }, | 85 | }, |
86 | { | 86 | { |
87 | field: 'icon', | 87 | field: 'icon', |
88 | - label: '告警类型', | ||
89 | - component: 'Input', | ||
90 | - colProps: { span: 8 }, | 88 | + label: ' ', |
89 | + component: 'DatePicker', | ||
90 | + colProps: { span: 6 }, | ||
91 | }, | 91 | }, |
92 | ]; | 92 | ]; |
93 | export const alarmColumns: BasicColumn[] = [ | 93 | export const alarmColumns: BasicColumn[] = [ |
@@ -19,10 +19,7 @@ | @@ -19,10 +19,7 @@ | ||
19 | }, | 19 | }, |
20 | setup(props) { | 20 | setup(props) { |
21 | const [registerTable] = useTable({ | 21 | const [registerTable] = useTable({ |
22 | - api: getDeviceAlarm(props.id, { | ||
23 | - page: 0, | ||
24 | - pageSize: 10, | ||
25 | - }), | 22 | + api: getDeviceAlarm, |
26 | columns: alarmColumns, | 23 | columns: alarmColumns, |
27 | formConfig: { | 24 | formConfig: { |
28 | labelWidth: 120, | 25 | labelWidth: 120, |
@@ -32,7 +29,11 @@ | @@ -32,7 +29,11 @@ | ||
32 | showTableSetting: true, | 29 | showTableSetting: true, |
33 | bordered: true, | 30 | bordered: true, |
34 | showIndexColumn: false, | 31 | showIndexColumn: false, |
32 | + beforeFetch: getDeviceId, | ||
35 | }); | 33 | }); |
34 | + function getDeviceId(data) { | ||
35 | + Reflect.set(data, 'deviceId', props.id); | ||
36 | + } | ||
36 | 37 | ||
37 | return { | 38 | return { |
38 | registerTable, | 39 | registerTable, |