fix: 修改同步设备状态
This commit is contained in:
parent
dead9c5b46
commit
0e56cadb12
|
@ -162,7 +162,7 @@ import {
|
|||
} from '@/api/device/instance';
|
||||
import MSelect from './MSelect.vue';
|
||||
import PatchMapping from './PatchMapping.vue';
|
||||
import { message } from 'ant-design-vue/es';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
|
||||
const columns = [
|
||||
{
|
||||
|
@ -280,7 +280,7 @@ const unbind = async (id: string) => {
|
|||
},
|
||||
);
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功!', 'success');
|
||||
handleSearch();
|
||||
}
|
||||
}
|
||||
|
@ -313,7 +313,7 @@ const onSave = () => {
|
|||
submitData,
|
||||
);
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功!', 'success');
|
||||
handleSearch();
|
||||
}
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ const onAction = async (record: any) => {
|
|||
submitData,
|
||||
);
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功!', 'success');
|
||||
handleSearch();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</div>
|
||||
<div v-else>
|
||||
<p>{{ type === 'active' ? '启用' : '同步' }}成功:{{ count }}条</p>
|
||||
<p v-if="type === 'active'">启用失败:{{ errCount }}条<j-tooltip title="实例信息页面中的配置项未完善"><AIcon type="QuestionCircleOutlined" /></j-tooltip></p>
|
||||
<p v-if="type === 'active'">启用失败:{{ errCount }}条<j-tooltip title="实例信息页面中的配置项未完善"><AIcon style="margin-left: 5px" type="QuestionCircleOutlined" /></j-tooltip></p>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
|
@ -56,13 +56,13 @@ const getData = (api: string) => {
|
|||
source.value = _source;
|
||||
_source.onmessage = (e: any) => {
|
||||
const res = JSON.parse(e.data);
|
||||
// console.log(res)
|
||||
switch (props.type) {
|
||||
case 'active':
|
||||
if (res.success) {
|
||||
_source.close();
|
||||
dt += res.total;
|
||||
count.value = dt;
|
||||
flag.value = false;
|
||||
} else {
|
||||
if (res.source) {
|
||||
errCount.value = 1
|
||||
|
@ -76,6 +76,7 @@ const getData = (api: string) => {
|
|||
case 'sync':
|
||||
dt += res;
|
||||
count.value = dt;
|
||||
flag.value = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue