增加活动告警国际化
This commit is contained in:
@@ -466,7 +466,7 @@ let modalState: ModalStateType = reactive({
|
||||
*/
|
||||
function fnModalVisibleByVive(row: Record<string, any>) {
|
||||
modalState.from = Object.assign(modalState.from, row);
|
||||
modalState.title = `查看${row.alarmId} 记录信息`;
|
||||
modalState.title = t('views.faultManage.activeAlarm.viewIdInfo',{alarmId:row.alarmId});
|
||||
modalState.visibleByView = true;
|
||||
}
|
||||
|
||||
@@ -585,14 +585,14 @@ const onSelectChange = (
|
||||
function fnCancelConfirm() {
|
||||
Modal.confirm({
|
||||
title: 'Tip',
|
||||
content: `确认是否取消确认告警?`,
|
||||
content: t('views.faultManage.activeAlarm.cancelSure'),
|
||||
onOk() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
cancelConfirm(state.selectedRowKeys).then(res => {
|
||||
hide();
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `取消确认告警成功`,
|
||||
content: t('views.faultManage.activeAlarm.cancelSuss'),
|
||||
duration: 2,
|
||||
});
|
||||
fnGetList();
|
||||
@@ -616,7 +616,7 @@ function fnSync() {
|
||||
hide();
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `手工同步成功`,
|
||||
content: t('views.faultManage.activeAlarm.sysncSuss'),
|
||||
duration: 2,
|
||||
});
|
||||
fnGetList();
|
||||
@@ -635,14 +635,14 @@ function fnSync() {
|
||||
function fnClear() {
|
||||
Modal.confirm({
|
||||
title: 'Tip',
|
||||
content: `是否清除该告警?`,
|
||||
content: t('views.faultManage.activeAlarm.delSure'),
|
||||
onOk() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
clearAlarm(state.selectedRowKeys).then(res => {
|
||||
hide();
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `清除成功`,
|
||||
content: t('views.faultManage.activeAlarm.delSuss'),
|
||||
duration: 2,
|
||||
});
|
||||
fnGetList();
|
||||
@@ -672,10 +672,10 @@ function fnShowSet() {
|
||||
? JSON.parse(res.data.data[0]['config'][0].value_json)
|
||||
: {};
|
||||
modalState.showSetFrom = Object.assign(modalState.showSetFrom, realJson);
|
||||
modalState.title = '显示过滤设置';
|
||||
modalState.title = t('views.faultManage.activeAlarm.showSet');
|
||||
modalState.visibleByShowSet = true;
|
||||
} else {
|
||||
message.error(`获取显示过滤设置失败`, 2);
|
||||
message.error(t('common.getInfoFail'), 2);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -686,14 +686,14 @@ function fnShowSet() {
|
||||
function fnExportAll() {
|
||||
Modal.confirm({
|
||||
title: 'Tip',
|
||||
content: `确认是否导出全部活动告警信息?`,
|
||||
content: t('views.faultManage.activeAlarm.exportSure'),
|
||||
onOk() {
|
||||
const key = 'exportAlarm';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
exportAll(queryParams).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `已完成导出`,
|
||||
content: t('common.msgSuccess', { msg: t('common.export') }),
|
||||
key,
|
||||
duration: 3,
|
||||
});
|
||||
@@ -1050,7 +1050,7 @@ onMounted(() => {
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip>
|
||||
<template #title>帮助文档</template>
|
||||
<template #title>{{ t('views.faultManage.activeAlarm.helpFile') }}</template>
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnModalVisibleBy(record.alarmCode)"
|
||||
@@ -1076,7 +1076,7 @@ onMounted(() => {
|
||||
:title="modalState.title"
|
||||
:confirm-loading="modalState.confirmLoading"
|
||||
@ok="fnModalOk"
|
||||
ok-text="查阅"
|
||||
:ok-text="t('views.faultManage.activeAlarm.confirm')"
|
||||
@cancel="fnModalCancel"
|
||||
>
|
||||
<a-form name="modalStateFrom" layout="horizontal">
|
||||
@@ -1414,7 +1414,7 @@ onMounted(() => {
|
||||
:title="modalState.title"
|
||||
:confirm-loading="modalState.confirmLoading"
|
||||
@ok="fnShowModalOk"
|
||||
ok-text="设置"
|
||||
:ok-text="t('views.faultManage.activeAlarm.set')"
|
||||
@cancel="fnModalCancel"
|
||||
>
|
||||
<a-form name="modalStateShowFrom" layout="horizontal">
|
||||
@@ -1509,7 +1509,7 @@ onMounted(() => {
|
||||
:title="modalState.title"
|
||||
:confirm-loading="modalState.confirmLoading"
|
||||
@ok="fnShowModalOk"
|
||||
ok-text="设置"
|
||||
:ok-text="t('views.faultManage.activeAlarm.set')"
|
||||
@cancel="fnModalCancel"
|
||||
>
|
||||
<a-form name="modalStateShowFrom" layout="horizontal">
|
||||
|
||||
Reference in New Issue
Block a user