🔨 修改配置.

This commit is contained in:
lijiahangmax
2025-09-10 18:11:54 +08:00
parent bf4b1f9702
commit 697d29c6f2
15 changed files with 51 additions and 35 deletions

View File

@@ -287,14 +287,14 @@
@click="setInstallSuccess(record.installLog)">
<span class="more-doption normal">安装成功</span>
</a-doption>
<!-- 警开关 -->
<!-- 警开关 -->
<a-doption v-if="record.id"
v-permission="['monitor:monitor-host:update', 'monitor:monitor-host:update-switch']"
type="text"
size="mini"
@click="toggleAlarmSwitch(record)">
<span class="more-doption normal">
{{ toggleDictValue(AlarmSwitchKey, record.alarmSwitch, 'label') + '警' }}
{{ toggleDictValue(AlarmSwitchKey, record.alarmSwitch, 'label') + '警' }}
</span>
</a-doption>
</template>

View File

@@ -317,14 +317,14 @@
@click="setInstallSuccess(record.installLog)">
<span class="more-doption normal">安装成功</span>
</a-doption>
<!-- 警开关 -->
<!-- 警开关 -->
<a-doption v-if="record.id"
v-permission="['monitor:monitor-host:update', 'monitor:monitor-host:update-switch']"
type="text"
size="mini"
@click="toggleAlarmSwitch(record)">
<span class="more-doption normal">
{{ toggleDictValue(AlarmSwitchKey, record.alarmSwitch, 'label') + '警' }}
{{ toggleDictValue(AlarmSwitchKey, record.alarmSwitch, 'label') + '警' }}
</span>
</a-doption>
</template>

View File

@@ -107,13 +107,13 @@ export default function useMonitorHostList(options: UseMonitorHostListOptions) {
});
};
// 更新警开关
// 更新警开关
const toggleAlarmSwitch = async (record: MonitorHostQueryResponse) => {
const dict = toggleDict(AlarmSwitchKey, record.alarmSwitch);
Modal.confirm({
title: `${dict.label}确认`,
titleAlign: 'start',
content: `确定要${dict.label}警功能吗?`,
content: `确定要${dict.label}警功能吗?`,
okText: '确定',
onOk: async () => {
try {