--新增历史告警,故障通用设置国际化

This commit is contained in:
lai
2023-11-09 16:17:02 +08:00
parent 74eb29d64d
commit f458c18dbd
4 changed files with 48 additions and 23 deletions

View File

@@ -395,7 +395,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;
}
@@ -464,14 +464,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();
@@ -492,14 +492,14 @@ function fnCancelConfirm() {
function fnExportAll() {
Modal.confirm({
title: 'Tip',
content: `确认是否导出全部历史告警信息?`,
content: t('views.faultManage.historyAlarm.exportSure'),
onOk() {
const key = 'exportAlarmHis';
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,
});
@@ -587,7 +587,6 @@ onMounted(() => {
<a-input
v-model:value="queryParams.ne_type"
allow-clear
placeholder="查询告警设备类型"
></a-input>
</a-form-item>
</a-col>
@@ -599,7 +598,6 @@ onMounted(() => {
<a-input
v-model:value="queryParams.ne_name"
allow-clear
placeholder="查询告警网元名称"
></a-input>
</a-form-item>
</a-col>
@@ -611,7 +609,6 @@ onMounted(() => {
<a-input
v-model:value="queryParams.ne_id"
allow-clear
placeholder="查询告警网元标识"
></a-input>
</a-form-item>
</a-col>
@@ -640,7 +637,6 @@ onMounted(() => {
<a-input
v-model:value="queryParams.alarm_code"
allow-clear
placeholder="查询告警编号"
></a-input>
</a-form-item>
</a-col>
@@ -798,7 +794,7 @@ onMounted(() => {
<template v-if="column.key === 'alarm_id'">
<a-space :size="8" align="center">
<a-tooltip>
<template #title>查看详情</template>
<template #title>{{ t('common.viewText') }}</template>
<a-button
type="link"
@click.prevent="fnModalVisibleByVive(record)"
@@ -822,7 +818,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">