fix: 告警关闭非必要的操作
This commit is contained in:
@@ -8,8 +8,7 @@ import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import {
|
||||
listAct,
|
||||
updateConfirm,
|
||||
cancelConfirm,
|
||||
ackAlarm,
|
||||
listSync,
|
||||
clearAlarm,
|
||||
showPass,
|
||||
@@ -436,7 +435,7 @@ function fnModalVisibleBy(code: string) {
|
||||
function fnModalOk() {
|
||||
modalState.confirmLoading = true;
|
||||
const from = toRaw(modalState.from);
|
||||
if (from.ackState === '1') {
|
||||
if (from.ackState == '1') {
|
||||
message.error({
|
||||
content: t('views.faultManage.activeAlarm.ackError'),
|
||||
duration: 3,
|
||||
@@ -445,9 +444,8 @@ function fnModalOk() {
|
||||
modalState.openByView = false;
|
||||
return false;
|
||||
}
|
||||
const result = updateConfirm(from);
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
result
|
||||
ackAlarm([from.id], true)
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
@@ -527,7 +525,8 @@ function fnCancelConfirm() {
|
||||
content: t('views.faultManage.activeAlarm.cancelSure'),
|
||||
onOk() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
cancelConfirm(state.selectedRowKeys).then(res => {
|
||||
const ids = state.selectedRowKeys.map(v => Number(v));
|
||||
ackAlarm(ids, false).then(res => {
|
||||
hide();
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
@@ -577,7 +576,8 @@ function fnClear() {
|
||||
content: t('views.faultManage.activeAlarm.delSure'),
|
||||
onOk() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
clearAlarm(state.selectedRowKeys).then(res => {
|
||||
const ids = state.selectedRowKeys.map(v => Number(v));
|
||||
clearAlarm(ids).then(res => {
|
||||
hide();
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
@@ -928,6 +928,7 @@ onMounted(() => {
|
||||
type="primary"
|
||||
@click.prevent="fnCancelConfirm()"
|
||||
:disabled="state.selectedRowKeys.length <= 0"
|
||||
v-if="false"
|
||||
>
|
||||
<template #icon>
|
||||
<CloseOutlined />
|
||||
@@ -935,7 +936,7 @@ onMounted(() => {
|
||||
{{ t('views.faultManage.activeAlarm.updateConfirm') }}
|
||||
</a-button>
|
||||
|
||||
<a-button type="primary" @click.prevent="fnSync()">
|
||||
<a-button type="primary" @click.prevent="fnSync()" v-if="false">
|
||||
<template #icon>
|
||||
<ReloadOutlined />
|
||||
</template>
|
||||
@@ -954,7 +955,7 @@ onMounted(() => {
|
||||
{{ t('views.faultManage.activeAlarm.clear') }}
|
||||
</a-button>
|
||||
|
||||
<a-button type="primary" @click.prevent="fnShowSet()">
|
||||
<a-button type="primary" @click.prevent="fnShowSet()" v-if="false">
|
||||
<template #icon> <SettingOutlined /> </template>
|
||||
{{ t('views.faultManage.activeAlarm.disPlayFilfter') }}
|
||||
</a-button>
|
||||
@@ -1289,7 +1290,15 @@ onMounted(() => {
|
||||
{{ modalState.from.specificProblem }}
|
||||
</a-form-item>
|
||||
|
||||
<a-row>
|
||||
<a-form-item
|
||||
:label="t('views.faultManage.activeAlarm.objectName')"
|
||||
name="objectName"
|
||||
:label-col="{ span: 4 }"
|
||||
>
|
||||
{{ modalState.from.objectName }}
|
||||
</a-form-item>
|
||||
|
||||
<a-row v-show="modalState.from.ackUser != ''">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.faultManage.activeAlarm.ackUser')"
|
||||
@@ -1303,26 +1312,18 @@ onMounted(() => {
|
||||
:label="t('views.faultManage.activeAlarm.ackState')"
|
||||
name="ackState"
|
||||
>
|
||||
{{ modalState.from.ackState }}
|
||||
<DictTag
|
||||
:options="dict.activeAckState"
|
||||
:value="modalState.from.ackState"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.faultManage.activeAlarm.ackTime')"
|
||||
name="ackTime"
|
||||
>
|
||||
{{ modalState.from.ackTime }}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.faultManage.activeAlarm.objectName')"
|
||||
name="objectName"
|
||||
>
|
||||
{{ modalState.from.objectName }}
|
||||
{{ parseDateToStr(modalState.from.ackTime) }}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
Reference in New Issue
Block a user