fix: 运维管理 远程升级修复部分bug

This commit is contained in:
jackhoo_98 2023-03-17 11:16:29 +08:00
parent 343d88209e
commit e74f8fa7aa
4 changed files with 23 additions and 8 deletions

View File

@ -201,6 +201,7 @@ import {
} from '@/api/device/firmware';
import type { FormInstance } from 'ant-design-vue';
import type { Properties } from '../type';
import { onlyMessage } from '@/utils/comm';
const formRef = ref<FormInstance>();
const dynamicValidateForm = reactive<{ properties: Properties[] }>({
@ -327,7 +328,9 @@ const handleOk = async () => {
? await save(params).catch(() => {})
: await update({ ...props.data, ...params }).catch(() => {});
if (response?.status === 200) {
message.success('操作成功');
// message.success('');
onlyMessage('操作成功', 'success');
emit('change', true);
}
loading.value = false;

View File

@ -55,7 +55,11 @@
</div>
</div>
<Search :columns="columns" target="search" @search="handleSearch" />
<pro-search
:columns="columns"
target="search"
@search="handleSearch"
/>
<j-pro-table
ref="tableRef"
model="TABLE"
@ -129,6 +133,7 @@ import { getImage } from '@/utils/comm';
import moment from 'moment';
import { cloneDeep } from 'lodash-es';
import Save from './Save.vue';
import { onlyMessage } from '@/utils/comm';
const tableRef = ref<Record<string, any>>({});
const route = useRoute();
@ -313,7 +318,7 @@ const handlEye = (data: string) => {
const handlTry = async (id: string) => {
const res = await startOneTask([id]);
if (res.success) {
message.success('操作成功');
onlyMessage('操作成功', 'success');
tableRef.value.reload();
}
};
@ -324,7 +329,7 @@ const saveChange = (value: boolean) => {
const confirm = async (e: MouseEvent) => {
const res = await startTask(taskId, ['failed']);
if (res.success) {
message.success('操作成功');
onlyMessage('操作成功', 'success');
handleRefresh('failed');
tableRef.value.reload();
}

View File

@ -233,10 +233,15 @@ const handleOk = () => {
visible.value = false;
};
const updateSelect = (selectedRowKeys: T[]) =>
selectedRowKeys
const updateSelect = (selectedRowKeys: T[]) => {
let selectedRowLabel: any = selectedRowKeys
.map((item) => checkAllDataMap.has(item) && checkAllDataMap.get(item))
.toString();
if (selectedRowLabel === 'false') {
selectedRowLabel = selectedRowKeys;
}
return selectedRowLabel;
};
const onVisible = () => {
!props.data.view && (visible.value = true);
@ -258,6 +263,7 @@ onMounted(() => {
if (props.data.id) {
checkLable.value = updateSelect(props.data.deviceId);
emit('update:modelValue', props.data.deviceId);
console.log(111, checkLable.value, props.data.deviceId);
}
}
},

View File

@ -74,6 +74,7 @@ import _ from 'lodash';
import Save from './Save/index.vue';
import { useMenuStore } from 'store/menu';
import type { FormDataType } from './type';
import { onlyMessage } from '@/utils/comm';
const menuStory = useMenuStore();
@ -233,7 +234,7 @@ const saveChange = (value: FormDataType) => {
visible.value = false;
current.value = {};
if (value) {
message.success('操作成功');
onlyMessage('操作成功', 'success');
tableRef.value.reload();
}
};
@ -241,7 +242,7 @@ const saveChange = (value: FormDataType) => {
const handlDelete = async (id: string) => {
const res = await remove(id);
if (res.success) {
message.success('操作成功');
onlyMessage('操作成功', 'success');
tableRef.value.reload();
}
};