fix: 运维管理 远程升级修复部分bug
This commit is contained in:
parent
343d88209e
commit
e74f8fa7aa
|
@ -201,6 +201,7 @@ import {
|
||||||
} from '@/api/device/firmware';
|
} from '@/api/device/firmware';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
import type { Properties } from '../type';
|
import type { Properties } from '../type';
|
||||||
|
import { onlyMessage } from '@/utils/comm';
|
||||||
|
|
||||||
const formRef = ref<FormInstance>();
|
const formRef = ref<FormInstance>();
|
||||||
const dynamicValidateForm = reactive<{ properties: Properties[] }>({
|
const dynamicValidateForm = reactive<{ properties: Properties[] }>({
|
||||||
|
@ -327,7 +328,9 @@ const handleOk = async () => {
|
||||||
? await save(params).catch(() => {})
|
? await save(params).catch(() => {})
|
||||||
: await update({ ...props.data, ...params }).catch(() => {});
|
: await update({ ...props.data, ...params }).catch(() => {});
|
||||||
if (response?.status === 200) {
|
if (response?.status === 200) {
|
||||||
message.success('操作成功');
|
// message.success('操作成功');
|
||||||
|
onlyMessage('操作成功', 'success');
|
||||||
|
|
||||||
emit('change', true);
|
emit('change', true);
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|
|
@ -55,7 +55,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Search :columns="columns" target="search" @search="handleSearch" />
|
<pro-search
|
||||||
|
:columns="columns"
|
||||||
|
target="search"
|
||||||
|
@search="handleSearch"
|
||||||
|
/>
|
||||||
<j-pro-table
|
<j-pro-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
model="TABLE"
|
model="TABLE"
|
||||||
|
@ -129,6 +133,7 @@ import { getImage } from '@/utils/comm';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { cloneDeep } from 'lodash-es';
|
import { cloneDeep } from 'lodash-es';
|
||||||
import Save from './Save.vue';
|
import Save from './Save.vue';
|
||||||
|
import { onlyMessage } from '@/utils/comm';
|
||||||
|
|
||||||
const tableRef = ref<Record<string, any>>({});
|
const tableRef = ref<Record<string, any>>({});
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -313,7 +318,7 @@ const handlEye = (data: string) => {
|
||||||
const handlTry = async (id: string) => {
|
const handlTry = async (id: string) => {
|
||||||
const res = await startOneTask([id]);
|
const res = await startOneTask([id]);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -324,7 +329,7 @@ const saveChange = (value: boolean) => {
|
||||||
const confirm = async (e: MouseEvent) => {
|
const confirm = async (e: MouseEvent) => {
|
||||||
const res = await startTask(taskId, ['failed']);
|
const res = await startTask(taskId, ['failed']);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
handleRefresh('failed');
|
handleRefresh('failed');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,10 +233,15 @@ const handleOk = () => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateSelect = (selectedRowKeys: T[]) =>
|
const updateSelect = (selectedRowKeys: T[]) => {
|
||||||
selectedRowKeys
|
let selectedRowLabel: any = selectedRowKeys
|
||||||
.map((item) => checkAllDataMap.has(item) && checkAllDataMap.get(item))
|
.map((item) => checkAllDataMap.has(item) && checkAllDataMap.get(item))
|
||||||
.toString();
|
.toString();
|
||||||
|
if (selectedRowLabel === 'false') {
|
||||||
|
selectedRowLabel = selectedRowKeys;
|
||||||
|
}
|
||||||
|
return selectedRowLabel;
|
||||||
|
};
|
||||||
|
|
||||||
const onVisible = () => {
|
const onVisible = () => {
|
||||||
!props.data.view && (visible.value = true);
|
!props.data.view && (visible.value = true);
|
||||||
|
@ -258,6 +263,7 @@ onMounted(() => {
|
||||||
if (props.data.id) {
|
if (props.data.id) {
|
||||||
checkLable.value = updateSelect(props.data.deviceId);
|
checkLable.value = updateSelect(props.data.deviceId);
|
||||||
emit('update:modelValue', props.data.deviceId);
|
emit('update:modelValue', props.data.deviceId);
|
||||||
|
console.log(111, checkLable.value, props.data.deviceId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -74,6 +74,7 @@ import _ from 'lodash';
|
||||||
import Save from './Save/index.vue';
|
import Save from './Save/index.vue';
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
import type { FormDataType } from './type';
|
import type { FormDataType } from './type';
|
||||||
|
import { onlyMessage } from '@/utils/comm';
|
||||||
|
|
||||||
const menuStory = useMenuStore();
|
const menuStory = useMenuStore();
|
||||||
|
|
||||||
|
@ -233,7 +234,7 @@ const saveChange = (value: FormDataType) => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
current.value = {};
|
current.value = {};
|
||||||
if (value) {
|
if (value) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -241,7 +242,7 @@ const saveChange = (value: FormDataType) => {
|
||||||
const handlDelete = async (id: string) => {
|
const handlDelete = async (id: string) => {
|
||||||
const res = await remove(id);
|
const res = await remove(id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue