Commit e546627d3a650ce9f944fccc8351781577c521df
Merge branch 'sqy_dev' into 'main'
feat:修改国际化 See merge request huang/yun-teng-iot-front!48
Showing
7 changed files
with
84 additions
and
33 deletions
| ... | ... | @@ -18,7 +18,7 @@ enum DeviceManagerApi { |
| 18 | 18 | |
| 19 | 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 | 24 | export const devicePage = (params: DeviceQueryParam) => { |
| ... | ... | @@ -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 | 9 | sort: 'sort', |
| 10 | 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 | 23 | tenant: { |
| 13 | 24 | tenant: 'tenant', |
| 14 | 25 | tenantManagement: 'tenant management', |
| 15 | - tenantSetting: 'tenant setting', | |
| 26 | + tenantSetting: 'tenant config', | |
| 27 | + tenantOEM: 'OEM customization', | |
| 28 | + tenantRule: 'tenant rule', | |
| 16 | 29 | }, |
| 30 | + | |
| 17 | 31 | organization: { |
| 18 | 32 | queryOrganizationName: 'organization name', |
| 19 | 33 | toolOrganizationList: 'organization list', |
| ... | ... | @@ -21,6 +35,22 @@ export default { |
| 21 | 35 | toolEditOrganization: 'edit organization', |
| 22 | 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 | 54 | dept: { |
| 25 | 55 | queryDeptName: 'dept name', |
| 26 | 56 | queryDeptStatus: 'status', |
| ... | ... | @@ -41,6 +71,8 @@ export default { |
| 41 | 71 | roleManagement: 'role management', |
| 42 | 72 | menuManagement: 'menu management', |
| 43 | 73 | deptManagement: 'dept management', |
| 74 | + organizationManagement: 'organization management', | |
| 75 | + dictManagement: 'dice management', | |
| 44 | 76 | modifyPassword: 'modify password', |
| 45 | 77 | pageSystemTitleCreateMenu: 'create menu', |
| 46 | 78 | pageSystemTitleCreateTenant: 'new tenant', | ... | ... |
| ... | ... | @@ -9,10 +9,23 @@ export default { |
| 9 | 9 | sort: '排序', |
| 10 | 10 | status: '状态', |
| 11 | 11 | }, |
| 12 | + notice: { | |
| 13 | + webSiteNotice: '站内通知', | |
| 14 | + noticeManagement: '通知管理', | |
| 15 | + myNotice: '我的通知', | |
| 16 | + }, | |
| 17 | + device: { | |
| 18 | + deviceManagement: '设备管理', | |
| 19 | + device: '设备', | |
| 20 | + deviceProfile: '设备配置', | |
| 21 | + }, | |
| 22 | + | |
| 12 | 23 | tenant: { |
| 13 | 24 | tenant: '租户', |
| 14 | 25 | tenantManagement: '租户管理', |
| 15 | - tenantSetting: '租户设置', | |
| 26 | + tenantSetting: '租户配置', | |
| 27 | + tenantOEM: 'OEM定制', | |
| 28 | + tenantRule: '租户角色', | |
| 16 | 29 | }, |
| 17 | 30 | organization: { |
| 18 | 31 | queryOrganizationName: '组织名称', |
| ... | ... | @@ -35,12 +48,28 @@ export default { |
| 35 | 48 | drawerTitleDeptParentDept: '上级部门', |
| 36 | 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 | 66 | system: { |
| 39 | 67 | system: '系统管理', |
| 40 | 68 | accountManagement: '账号管理', |
| 41 | 69 | roleManagement: '角色管理', |
| 42 | 70 | menuManagement: '菜单管理', |
| 43 | - deptManagement: '部门管理', | |
| 71 | + organizationManagement: '组织管理', | |
| 72 | + dictManagement: '字典管理', | |
| 44 | 73 | modifyPassword: '修改密码', |
| 45 | 74 | pageSystemTitleCreateMenu: '新增菜单', |
| 46 | 75 | pageSystemTitleCreateTenant: '新增租户', | ... | ... |
| ... | ... | @@ -75,19 +75,19 @@ export const alarmSearchSchemas: FormSchema[] = [ |
| 75 | 75 | field: 'icon', |
| 76 | 76 | label: '告警状态', |
| 77 | 77 | component: 'Select', |
| 78 | - colProps: { span: 8 }, | |
| 78 | + colProps: { span: 6 }, | |
| 79 | 79 | }, |
| 80 | 80 | { |
| 81 | 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 | 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 | 93 | export const alarmColumns: BasicColumn[] = [ | ... | ... |
| ... | ... | @@ -19,10 +19,7 @@ |
| 19 | 19 | }, |
| 20 | 20 | setup(props) { |
| 21 | 21 | const [registerTable] = useTable({ |
| 22 | - api: getDeviceAlarm(props.id, { | |
| 23 | - page: 0, | |
| 24 | - pageSize: 10, | |
| 25 | - }), | |
| 22 | + api: getDeviceAlarm, | |
| 26 | 23 | columns: alarmColumns, |
| 27 | 24 | formConfig: { |
| 28 | 25 | labelWidth: 120, |
| ... | ... | @@ -32,7 +29,11 @@ |
| 32 | 29 | showTableSetting: true, |
| 33 | 30 | bordered: true, |
| 34 | 31 | showIndexColumn: false, |
| 32 | + beforeFetch: getDeviceId, | |
| 35 | 33 | }); |
| 34 | + function getDeviceId(data) { | |
| 35 | + Reflect.set(data, 'deviceId', props.id); | |
| 36 | + } | |
| 36 | 37 | |
| 37 | 38 | return { |
| 38 | 39 | registerTable, | ... | ... |