update: 运维管理、数据采集 更换message组件
This commit is contained in:
parent
e74f8fa7aa
commit
fb51bda318
|
@ -125,7 +125,7 @@
|
|||
import type { ActionsType } from '@/components/Table/index';
|
||||
import { getImage } from '@/utils/comm';
|
||||
import { query, remove, update } from '@/api/data-collect/channel';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import {
|
||||
TiTlePermissionButtonStyle,
|
||||
StatusColorEnum,
|
||||
|
@ -240,7 +240,7 @@ const getActions = (
|
|||
onConfirm: async () => {
|
||||
const res = await update(data.id, updateStatus[state]);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value?.reload();
|
||||
}
|
||||
},
|
||||
|
@ -259,7 +259,7 @@ const getActions = (
|
|||
onConfirm: async () => {
|
||||
const res = await remove(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
},
|
||||
|
@ -286,7 +286,7 @@ const saveChange = (value: object) => {
|
|||
visible.value = false;
|
||||
current.value = {};
|
||||
if (value) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -251,7 +251,7 @@ import {
|
|||
removePoint,
|
||||
readPoint,
|
||||
} from '@/api/data-collect/collector';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import PointCardBox from './components/PointCardBox/index.vue';
|
||||
import WritePoint from './components/WritePoint/index.vue';
|
||||
import BatchUpdate from './components/BatchUpdate/index.vue';
|
||||
|
@ -412,13 +412,13 @@ const handlDelete = async (id: string | undefined = undefined) => {
|
|||
if (res?.status === 200) {
|
||||
cancelSelect();
|
||||
tableRef.value?.reload();
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
}
|
||||
spinning.value = false;
|
||||
};
|
||||
const handlBatchUpdate = () => {
|
||||
if (_selectedRowKeys.value.length === 0) {
|
||||
message.warn('请先选择');
|
||||
onlyMessage('请先选择', 'warning');
|
||||
return;
|
||||
}
|
||||
const dataSet = new Set(_selectedRowKeys.value);
|
||||
|
@ -442,7 +442,7 @@ const clickRedo = async (data: any) => {
|
|||
if (res.status === 200) {
|
||||
cancelSelect();
|
||||
tableRef.value?.reload();
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -479,7 +479,7 @@ const saveChange = (value: object) => {
|
|||
current.value = {};
|
||||
if (value) {
|
||||
tableRef.value?.reload();
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ import {
|
|||
remove,
|
||||
} from '@/api/data-collect/collector';
|
||||
import Save from './Save/index.vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { Store } from 'jetlinks-store';
|
||||
import _ from 'lodash';
|
||||
import { colorMap, getState } from '../data.ts';
|
||||
|
@ -173,14 +173,14 @@ const handlUpdate = async (data: any) => {
|
|||
});
|
||||
if (resp.status === 200) {
|
||||
handleSearch(params.value);
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
}
|
||||
};
|
||||
const handlDelete = async (id: string) => {
|
||||
const resp = await remove(id);
|
||||
if (resp.status === 200) {
|
||||
handleSearch(params.value);
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -189,11 +189,11 @@ const saveChange = (value: object) => {
|
|||
current.value = {};
|
||||
if (value) {
|
||||
handleSearch(params.value);
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
}
|
||||
};
|
||||
|
||||
const handleSearch = async (value: string) => {
|
||||
const handleSearch = async (value: any) => {
|
||||
if (!searchValue.value && !value) {
|
||||
params.value = _.cloneDeep(defualtParams);
|
||||
} else if (!!searchValue.value) {
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
import { LocalStore } from '@/utils/comm';
|
||||
import { TOKEN_KEY } from '@/utils/variable';
|
||||
import { FIRMWARE_UPLOAD, querySystemApi } from '@/api/device/firmware';
|
||||
import { message } from 'ant-design-vue';
|
||||
import type { UploadChangeParam, UploadProps } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import type { UploadChangeParam } from 'ant-design-vue';
|
||||
import { notification as Notification } from 'ant-design-vue';
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'update:extraValue', 'change']);
|
||||
|
@ -58,7 +58,7 @@ const handleChange = async (info: UploadChangeParam) => {
|
|||
? api.result[0]?.properties['base-path']
|
||||
: '';
|
||||
const f = `${path}/file/${result.id}?accessKey=${result.others.accessKey}`;
|
||||
message.success('上传成功!');
|
||||
onlyMessage('上传成功!', 'success');
|
||||
fileValue.value = f;
|
||||
emit('update:modelValue', f);
|
||||
emit('update:extraValue', result);
|
||||
|
|
|
@ -328,7 +328,6 @@ const handleOk = async () => {
|
|||
? await save(params).catch(() => {})
|
||||
: await update({ ...props.data, ...params }).catch(() => {});
|
||||
if (response?.status === 200) {
|
||||
// message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
|
||||
emit('change', true);
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<script lang="ts" setup name="TaskPage">
|
||||
import type { ActionsType } from '@/components/Table/index';
|
||||
import { task, startTask, stopTask } from '@/api/device/firmware';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import Save from './Save/index.vue';
|
||||
import { useMenuStore } from 'store/menu';
|
||||
|
||||
|
@ -179,7 +179,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
onClick: async () => {
|
||||
const res = await stopTask(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
},
|
||||
|
@ -195,7 +195,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
onClick: async () => {
|
||||
const res = await startTask(data.id, ['canceled']);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
},
|
||||
|
@ -223,7 +223,7 @@ const saveChange = (value: boolean) => {
|
|||
visible.value = false;
|
||||
current.value = {};
|
||||
if (value) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup name="AccessChannel">
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { update, save } from '@/api/link/accessConfig';
|
||||
import { ProtocolMapping } from '../../data';
|
||||
|
||||
|
@ -131,7 +131,7 @@ const onFinish = async (values: any) => {
|
|||
const resp =
|
||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -310,7 +310,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup name="AccessCloudCtwing">
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import type { FormInstance } from 'ant-design-vue';
|
||||
import { update, save, getProtocolList } from '@/api/link/accessConfig';
|
||||
import { ProtocolMapping } from '../../data';
|
||||
|
@ -409,7 +409,7 @@ const saveData = async () => {
|
|||
id,
|
||||
});
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
}
|
||||
};
|
||||
|
@ -446,7 +446,7 @@ const next = async () => {
|
|||
current.value = current.value + 1;
|
||||
} else if (current.value === 1) {
|
||||
if (!procotolCurrent.value) {
|
||||
message.error('请选择消息协议!');
|
||||
onlyMessage('请选择消息协议!', 'error');
|
||||
} else {
|
||||
current.value = current.value + 1;
|
||||
}
|
||||
|
|
|
@ -394,7 +394,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup name="AccessCloudOneNet">
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import type { FormInstance } from 'ant-design-vue';
|
||||
import { update, save, getProtocolList } from '@/api/link/accessConfig';
|
||||
import AccessCard from '../AccessCard/index.vue';
|
||||
|
@ -496,7 +496,7 @@ const saveData = async () => {
|
|||
});
|
||||
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
}
|
||||
};
|
||||
|
@ -533,7 +533,7 @@ const next = async () => {
|
|||
current.value = current.value + 1;
|
||||
} else if (current.value === 1) {
|
||||
if (!procotolCurrent.value) {
|
||||
message.error('请选择消息协议!');
|
||||
onlyMessage('请选择消息协议!', 'error');
|
||||
} else {
|
||||
current.value = current.value + 1;
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup name="AccessEdge">
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import type { FormInstance } from 'ant-design-vue';
|
||||
import { update, save, getNetworkList } from '@/api/link/accessConfig';
|
||||
import {
|
||||
|
@ -270,7 +270,7 @@ const onFinish = async (values: any) => {
|
|||
const resp =
|
||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
}
|
||||
};
|
||||
|
@ -325,7 +325,7 @@ const addNetwork = () => {
|
|||
|
||||
const next = async () => {
|
||||
if (!networkCurrent.value) {
|
||||
message.error('请选择网络组件!');
|
||||
onlyMessage('请选择网络组件!', 'error');
|
||||
} else {
|
||||
current.value = current.value + 1;
|
||||
}
|
||||
|
|
|
@ -520,10 +520,11 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup name="AccessNetwork">
|
||||
import { message, Form } from 'ant-design-vue';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import type { FormInstance } from 'ant-design-vue';
|
||||
import { getResourcesCurrent, getClusters } from '@/api/link/accessConfig';
|
||||
import { update, save } from '@/api/link/accessConfig';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
|
||||
interface Form2 {
|
||||
clusterNodeId: string | undefined;
|
||||
|
@ -663,7 +664,7 @@ const saveData = () => {
|
|||
const resp =
|
||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -85,8 +85,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup name="AccessMedia">
|
||||
import { message, Form } from 'ant-design-vue';
|
||||
import type { FormInstance } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import GB28181 from './GB28181.vue';
|
||||
import { update, save } from '@/api/link/accessConfig';
|
||||
|
||||
|
@ -125,7 +124,7 @@ const onFinish = async (values: any) => {
|
|||
const resp =
|
||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -334,10 +334,10 @@ import {
|
|||
ColumnsHTTP,
|
||||
} from '../../data';
|
||||
import AccessCard from '../AccessCard/index.vue';
|
||||
import { message, Form } from 'ant-design-vue';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import type { FormInstance, TableColumnType } from 'ant-design-vue';
|
||||
import Markdown from 'vue3-markdown-it';
|
||||
import { useMenuStore } from 'store/menu';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
|
||||
const menuStory = useMenuStore();
|
||||
function generateUUID() {
|
||||
|
@ -528,7 +528,7 @@ const saveData = () => {
|
|||
? await save(params)
|
||||
: await update({ ...params, id });
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
}
|
||||
})
|
||||
|
@ -538,14 +538,14 @@ const saveData = () => {
|
|||
const next = async () => {
|
||||
if (current.value === 0) {
|
||||
if (!networkCurrent.value) {
|
||||
message.error('请选择网络组件!');
|
||||
onlyMessage('请选择网络组件!', 'error');
|
||||
} else {
|
||||
queryProcotolList(props.provider.id);
|
||||
current.value = current.value + 1;
|
||||
}
|
||||
} else if (current.value === 1) {
|
||||
if (!procotolCurrent.value) {
|
||||
message.error('请选择消息协议!');
|
||||
onlyMessage('请选择消息协议!', 'error');
|
||||
} else {
|
||||
const resp =
|
||||
type !== 'child-device'
|
||||
|
|
|
@ -174,7 +174,7 @@ import {
|
|||
undeploy,
|
||||
deploy,
|
||||
} from '@/api/link/accessConfig';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { useMenuStore } from 'store/menu';
|
||||
import { TiTlePermissionButtonStyle } from './data';
|
||||
|
||||
|
@ -281,10 +281,8 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
: await deploy(data.id);
|
||||
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value?.reload();
|
||||
} else {
|
||||
message.error('操作失败!');
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -301,10 +299,8 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
onConfirm: async () => {
|
||||
const res = await remove(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
} else {
|
||||
message.error('操作失败!');
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -314,7 +310,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
};
|
||||
|
||||
const getProvidersList = async () => {
|
||||
const res = await getProviders();
|
||||
const res: any = await getProviders();
|
||||
providersList.value = res.result;
|
||||
};
|
||||
getProvidersList();
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts" name="CertificateFile">
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import type { UploadChangeParam } from 'ant-design-vue';
|
||||
import { LocalStore } from '@/utils/comm';
|
||||
import { TOKEN_KEY } from '@/utils/variable';
|
||||
|
@ -54,7 +54,7 @@ const loading = ref(false);
|
|||
const handleChange = (info: UploadChangeParam) => {
|
||||
loading.value = true;
|
||||
if (info.file.status === 'done') {
|
||||
message.success('上传成功!');
|
||||
onlyMessage('上传成功!', 'success');
|
||||
const result = info.file.response?.result;
|
||||
keystoreBase64.value = result;
|
||||
loading.value = false;
|
||||
|
|
|
@ -101,12 +101,13 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup name="CertificateDetail">
|
||||
import { message, Form } from 'ant-design-vue';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import { getImage } from '@/utils/comm';
|
||||
import CertificateFile from './CertificateFile.vue';
|
||||
import type { UploadChangeParam } from 'ant-design-vue';
|
||||
import { save, update, queryDetail } from '@/api/link/certificate';
|
||||
import { FormDataType, TypeObjType } from '../type';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
@ -156,7 +157,7 @@ const onSubmit = () => {
|
|||
? await save(params).catch(() => {})
|
||||
: await update({ ...params, id }).catch(() => {});
|
||||
if (response?.status === 200) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
router.push('/iot/link/certificate');
|
||||
}
|
||||
loading.value = false;
|
||||
|
@ -169,7 +170,7 @@ const onSubmit = () => {
|
|||
const handleChange = (info: UploadChangeParam) => {
|
||||
fileLoading.value = true;
|
||||
if (info.file.status === 'done') {
|
||||
message.success('上传成功!');
|
||||
onlyMessage('上传成功!', 'success');
|
||||
const result = info.file.response?.result;
|
||||
formData.value.configs.cert = result;
|
||||
fileLoading.value = false;
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<script lang="ts" setup name="CertificatePage">
|
||||
import type { ActionsType } from '@/components/Table/index';
|
||||
import { query, remove } from '@/api/link/certificate';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { useMenuStore } from 'store/menu';
|
||||
|
||||
const menuStory = useMenuStore();
|
||||
|
@ -175,7 +175,7 @@ const handlEdit = (id: string) => {
|
|||
const handlDelete = async (id: string) => {
|
||||
const res = await remove(id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
import { LocalStore } from '@/utils/comm';
|
||||
import { TOKEN_KEY } from '@/utils/variable';
|
||||
import { PROTOCOL_UPLOAD, querySystemApi } from '@/api/link/protocol';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import type { UploadChangeParam, UploadProps } from 'ant-design-vue';
|
||||
import { notification as Notification } from 'ant-design-vue';
|
||||
|
||||
|
@ -48,7 +48,7 @@ const beforeUpload: UploadProps['beforeUpload'] = (file) => {
|
|||
const arr = file.name.split('.');
|
||||
const isFile = ['jar', 'zip'].includes(arr[arr.length - 1]); // file.type === 'application/zip' || file.type === 'application/javj-archive'
|
||||
if (!isFile) {
|
||||
message.error('请上传.zip.jar格式的文件');
|
||||
onlyMessage('请上传.zip.jar格式的文件', 'error');
|
||||
loading.value = false;
|
||||
}
|
||||
return isFile;
|
||||
|
@ -63,7 +63,7 @@ const handleChange = async (info: UploadChangeParam) => {
|
|||
? api.result[0]?.properties['base-path']
|
||||
: '';
|
||||
const f = `${path}/file/${result.id}?accessKey=${result.others.accessKey}`;
|
||||
message.success('上传成功!');
|
||||
onlyMessage('上传成功!', 'success');
|
||||
value.value = f;
|
||||
emit('update:modelValue', f);
|
||||
emit('change', f);
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
</j-modal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { getImage } from '@/utils/comm';
|
||||
import type { UploadChangeParam, FormInstance } from 'ant-design-vue';
|
||||
import FileUpload from './FileUpload.vue';
|
||||
|
@ -153,7 +153,7 @@ const onSubmit = async () => {
|
|||
const handleChange = (info: UploadChangeParam) => {
|
||||
fileLoading.value = true;
|
||||
if (info.file.status === 'done') {
|
||||
message.success('上传成功!');
|
||||
onlyMessage('上传成功!', 'success');
|
||||
const result = info.file.response?.result;
|
||||
formData.value.configuration.location = result;
|
||||
fileLoading.value = false;
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
import type { ActionsType } from '@/components/Table/index';
|
||||
import { getImage } from '@/utils/comm';
|
||||
import { list, remove } from '@/api/link/protocol';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import Save from './Save/index.vue';
|
||||
import _ from 'lodash';
|
||||
|
||||
|
@ -230,10 +230,8 @@ const getActions = (
|
|||
onConfirm: async () => {
|
||||
const res = await remove(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
} else {
|
||||
message.error('操作失败!');
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -256,7 +254,7 @@ const saveChange = (value: object) => {
|
|||
visible.value = false;
|
||||
current.value = {};
|
||||
if (value) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -974,7 +974,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup name="AccessNetwork">
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import type { FormInstance } from 'ant-design-vue';
|
||||
import {
|
||||
update,
|
||||
|
@ -1153,7 +1153,7 @@ const saveData = async () => {
|
|||
? await save(params).catch(() => {})
|
||||
: await update({ ...params, id }).catch(() => {});
|
||||
if (resp?.status === 200) {
|
||||
message.success('操作成功!');
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
if ((window as any).onTabSaveSuccess) {
|
||||
if (resp.result?.id) {
|
||||
|
|
|
@ -165,7 +165,7 @@
|
|||
import type { ActionsType } from '@/components/Table/index';
|
||||
import { getImage } from '@/utils/comm';
|
||||
import { supports, query, remove, start, shutdown } from '@/api/link/type';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { TiTlePermissionButtonStyle } from './data';
|
||||
import { useMenuStore } from 'store/menu';
|
||||
|
||||
|
@ -299,7 +299,7 @@ const getActions = (
|
|||
? await shutdown(data.id)
|
||||
: await start(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value?.reload();
|
||||
}
|
||||
},
|
||||
|
@ -318,7 +318,7 @@ const getActions = (
|
|||
onConfirm: async () => {
|
||||
const res = await remove(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
},
|
||||
|
|
|
@ -263,7 +263,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup name="StreamDetail">
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { queryProviders, queryDetail, save, update } from '@/api/media/stream';
|
||||
import type { FormInstance } from 'ant-design-vue';
|
||||
|
||||
|
@ -316,7 +316,7 @@ const onSubmit = async () => {
|
|||
const response =
|
||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||
if (response.status === 200) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
router.push('/iot/link/Stream');
|
||||
}
|
||||
loading.value = false;
|
||||
|
|
|
@ -144,7 +144,7 @@
|
|||
import type { ActionsType } from '@/components/Table/index';
|
||||
import { getImage } from '@/utils/comm';
|
||||
import { query, remove, disable, enalbe } from '@/api/media/stream';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { useMenuStore } from 'store/menu';
|
||||
|
||||
const menuStory = useMenuStore();
|
||||
|
@ -213,7 +213,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
? await disable(data.id)
|
||||
: await enalbe(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value?.reload();
|
||||
}
|
||||
},
|
||||
|
@ -231,7 +231,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
onConfirm: async () => {
|
||||
const res = await remove(data.id);
|
||||
if (res.success) {
|
||||
message.success('操作成功');
|
||||
onlyMessage('操作成功', 'success');
|
||||
tableRef.value.reload();
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue