fix: bug#11008、11180、11184、11198、11097
This commit is contained in:
parent
6d4a442ee8
commit
2c46649750
|
@ -26,6 +26,10 @@
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入',
|
message: '请输入',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
validator: checkLength,
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<j-input
|
<j-input
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
import { savePointBatch } from '@/api/data-collect/collector';
|
import { savePointBatch } from '@/api/data-collect/collector';
|
||||||
import { Rule } from 'ant-design-vue/lib/form';
|
import { Rule } from 'ant-design-vue/lib/form';
|
||||||
import { cloneDeep } from 'lodash';
|
import { cloneDeep, isObject } from 'lodash';
|
||||||
import { regOnlyNumber } from '../../../data';
|
import { regOnlyNumber } from '../../../data';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -125,7 +125,15 @@ const handleOk = async () => {
|
||||||
if (ischange) {
|
if (ischange) {
|
||||||
const params = cloneDeep(props.data);
|
const params = cloneDeep(props.data);
|
||||||
params.forEach((i: any) => {
|
params.forEach((i: any) => {
|
||||||
accessModes.length !== 0 && (i.accessModes = data.accessModes);
|
if (accessModes.length !== 0) {
|
||||||
|
i.accessModes = data.accessModes;
|
||||||
|
} else {
|
||||||
|
if (isObject(i.accessModes)) {
|
||||||
|
i.accessModes = i.accessModes.map(
|
||||||
|
(item: any) => item.value,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
features.length !== 0 && (i.features = data.features);
|
features.length !== 0 && (i.features = data.features);
|
||||||
if (!!interval) {
|
if (!!interval) {
|
||||||
i.interval = data.interval;
|
i.interval = data.interval;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
defualtDataSource.length !== 0 ||
|
defualtDataSource.length !== 0 ||
|
||||||
defualtDataSource?.[0]?.children?.length !== 0
|
defualtDataSource?.[0]?.children?.length !== 0
|
||||||
"
|
"
|
||||||
:height="600"
|
:height="660"
|
||||||
defaultExpandAll
|
defaultExpandAll
|
||||||
>
|
>
|
||||||
<template #title="{ name, data }">
|
<template #title="{ name, data }">
|
||||||
|
@ -302,6 +302,10 @@ watch(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.ant-tree-list-holder-inner) {
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
:deep(.ant-tree-treenode) {
|
:deep(.ant-tree-treenode) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.ant-tree-node-content-wrapper {
|
.ant-tree-node-content-wrapper {
|
||||||
|
|
|
@ -6,19 +6,19 @@ const getParams = (dt: any) => {
|
||||||
return {
|
return {
|
||||||
limit: 24,
|
limit: 24,
|
||||||
interval: '1h',
|
interval: '1h',
|
||||||
format: 'HH:mm',
|
format: 'YYYY-MM-dd HH:mm',
|
||||||
};
|
};
|
||||||
case 'week':
|
case 'week':
|
||||||
return {
|
return {
|
||||||
limit: 7,
|
limit: 7,
|
||||||
interval: '1d',
|
interval: '1d',
|
||||||
format: 'MM-dd',
|
format: 'YYYY-MM-dd HH:mm',
|
||||||
};
|
};
|
||||||
case 'hour':
|
case 'hour':
|
||||||
return {
|
return {
|
||||||
limit: 60,
|
limit: 60,
|
||||||
interval: '1m',
|
interval: '1m',
|
||||||
format: 'HH:mm',
|
format: 'YYYY-MM-dd HH:mm',
|
||||||
};
|
};
|
||||||
default:
|
default:
|
||||||
const time = dt.time[1] - dt.time[0];
|
const time = dt.time[1] - dt.time[0];
|
||||||
|
@ -29,31 +29,31 @@ const getParams = (dt: any) => {
|
||||||
return {
|
return {
|
||||||
limit: Math.abs(Math.ceil(time / (60 * 60))),
|
limit: Math.abs(Math.ceil(time / (60 * 60))),
|
||||||
interval: '1m',
|
interval: '1m',
|
||||||
format: 'HH:mm',
|
format: 'YYYY-MM-dd HH:mm',
|
||||||
};
|
};
|
||||||
} else if (time > hour && time <= days) {
|
} else if (time > hour && time <= days) {
|
||||||
return {
|
return {
|
||||||
limit: Math.abs(Math.ceil(time / hour)),
|
limit: Math.abs(Math.ceil(time / hour)),
|
||||||
interval: '1h',
|
interval: '1h',
|
||||||
format: 'HH:mm',
|
format: 'YYYY-MM-dd HH:mm',
|
||||||
};
|
};
|
||||||
} else if (time > days && time <= days * 7) {
|
} else if (time > days && time <= days * 7) {
|
||||||
return {
|
return {
|
||||||
limit: Math.abs(Math.ceil(time / days / 7)) + 1,
|
limit: Math.abs(Math.ceil(time / days / 7)) + 1,
|
||||||
interval: '1d',
|
interval: '1d',
|
||||||
format: 'YYYY-MM-DD',
|
format: 'YYYY-MM-dd HH:mm',
|
||||||
};
|
};
|
||||||
} else if (time >= year) {
|
} else if (time >= year) {
|
||||||
return {
|
return {
|
||||||
limit: Math.abs(Math.ceil(time / days / 31)) + 1,
|
limit: Math.abs(Math.ceil(time / days / 31)) + 1,
|
||||||
interval: '1M',
|
interval: '1M',
|
||||||
format: 'yyyy年-M月',
|
format: 'YYYY-MM-dd HH:mm',
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
limit: Math.abs(Math.ceil(time / days)) + 1,
|
limit: Math.abs(Math.ceil(time / days)) + 1,
|
||||||
interval: '1d',
|
interval: '1d',
|
||||||
format: 'MM-dd',
|
format: 'YYYY-MM-dd HH:mm',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,7 +188,7 @@ import {
|
||||||
} from '@/api/link/accessConfig';
|
} from '@/api/link/accessConfig';
|
||||||
import { onlyMessage } from '@/utils/comm';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
import { accessConfigTypeFilter } from '@/utils/setting'
|
import { accessConfigTypeFilter } from '@/utils/setting';
|
||||||
|
|
||||||
const menuStory = useMenuStore();
|
const menuStory = useMenuStore();
|
||||||
const tableRef = ref<Record<string, any>>({});
|
const tableRef = ref<Record<string, any>>({});
|
||||||
|
@ -304,10 +304,12 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
popConfirm: {
|
popConfirm: {
|
||||||
title: '确认删除?',
|
title: '确认删除?',
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await remove(data.id);
|
const res: any = await remove(data.id);
|
||||||
if (res.success) {
|
if (res.status === 200) {
|
||||||
onlyMessage('操作成功', 'success');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
|
} else {
|
||||||
|
onlyMessage(res?.message, 'error');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -319,7 +321,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
const getProvidersList = async () => {
|
const getProvidersList = async () => {
|
||||||
const res: any = await getProviders();
|
const res: any = await getProviders();
|
||||||
providersList.value = res.result;
|
providersList.value = res.result;
|
||||||
providersOptions.value = accessConfigTypeFilter(res.result || [])
|
providersOptions.value = accessConfigTypeFilter(res.result || []);
|
||||||
};
|
};
|
||||||
getProvidersList();
|
getProvidersList();
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ const columns = [
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
label: '证书标准',
|
label: '国际标准',
|
||||||
value: 'common',
|
value: 'common',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -99,6 +99,7 @@ export const networkParams = (val: any) => {
|
||||||
from: Number(val.time.time[0]),
|
from: Number(val.time.time[0]),
|
||||||
to: Number(val.time.time[1]),
|
to: Number(val.time.time[1]),
|
||||||
limit: _limit,
|
limit: _limit,
|
||||||
|
format: 'YYYY-MM-dd HH:mm',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -238,10 +238,12 @@ const getActions = (
|
||||||
popConfirm: {
|
popConfirm: {
|
||||||
title: '确认删除?',
|
title: '确认删除?',
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await remove(data.id);
|
const res: any = await remove(data.id);
|
||||||
if (res.success) {
|
if (res.status === 200) {
|
||||||
onlyMessage('操作成功', 'success');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
|
} else {
|
||||||
|
onlyMessage(res?.message, 'error');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -327,10 +327,12 @@ const getActions = (
|
||||||
popConfirm: {
|
popConfirm: {
|
||||||
title: '确认删除?',
|
title: '确认删除?',
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await remove(data.id);
|
const res: any = await remove(data.id);
|
||||||
if (res.success) {
|
if (res.status === 200) {
|
||||||
onlyMessage('操作成功', 'success');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
|
} else {
|
||||||
|
onlyMessage(res?.message, 'error');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue