fix: bug#10769 10765 10760 10459

This commit is contained in:
leiqiaochu 2023-03-23 10:32:42 +08:00
parent 6deb18fc1a
commit 30c1619f06
6 changed files with 47 additions and 86 deletions

View File

@ -194,4 +194,4 @@ export const getMetadataConfig = (params: {
id: string;
dataType: string;
};
}) => server.get<Record<any, any>[]>(`/device/product/${params.deviceId}/config-metadata/${params.metadata.type}/${params.metadata.id}/${params.metadata.dataType}`)
}) => server.get<Record<any, any>[]>(`/device/product/${params.deviceId}/config-metadata/${params.metadata.type}/${params.metadata.id}/${params.metadata.dataType}`)

View File

@ -364,7 +364,7 @@ const setDevMesChartOption = (
grid: {
top: '2%',
bottom: '5%',
left: maxY > 100000 ? '90px' : '60px',
left: maxY > 100000 ? '50px' : '70px',
right: '50px',
},
series: [

View File

@ -147,6 +147,10 @@ const columns = [
dataIndex: 'id',
key: 'id',
ellipsis: true,
search:{
type:'string',
defaultTermType: 'eq'
}
},
{
title: '设备名称',

View File

@ -568,7 +568,17 @@ const query = reactive({
});
const param = ref<Record<string, any>>({
pageSize: 4,
terms: [],
terms: [
{
terms: [
{
column: 'channel',
termType: 'nin',
value: 'plugin',
},
],
},
],
});
const queryParams = ref<Record<string, any>>({});
/**
@ -669,49 +679,6 @@ const driver1 = new Driver({
},
});
/**
* 表格列表
*/
// const columnsMQTT: any[] = [
// {
// title: '',
// dataIndex: 'group',
// key: 'group',
// ellipsis: true,
// width: 100,
// // customCell: (record: any, index: number) => {
// // const list =
// // (config?.routes || []).sort((a: any, b: any) => a - b) || [];
// // const arr = list.filter((res: any) => {
// // // gpsNumber
// // return res?.group == record?.group;
// // });
// // if (index == 0 || list[index - 1]?.group != record?.group) {
// // return { rowSpan: arr.length };
// // } else {
// // return { rowSpan: 0 };
// // }
// // },
// },
// {
// title: 'topic',
// dataIndex: 'topic',
// key: 'topic',
// },
// {
// title: '',
// dataIndex: 'stream',
// key: 'stream',
// ellipsis: true,
// align: 'center',
// width: 100,
// },
// {
// title: '',
// dataIndex: 'description',
// key: 'description',
// },
// ];
let columnsMQTT = ref(<TableColumnType>[]);
const ColumnsMQTT = [
{
@ -760,38 +727,6 @@ const ColumnsHTTP = [
// scopedSlots: { customRender: 'description' },
},
];
// const columnsHTTP: any[] = [
// {
// title: '',
// dataIndex: 'group',
// key: 'group',
// ellipsis: true,
// width: 100,
// // customCell: (record: any, index: number) => {
// // const list =
// // (config?.routes || []).sort((a: any, b: any) => a - b) || [];
// // const arr = list.filter((res: any) => {
// // // gpsNumber
// // return res?.group == record?.group;
// // });
// // if (index == 0 || list[index - 1]?.group != record?.group) {
// // return { rowSpan: arr.length };
// // } else {
// // return { rowSpan: 0 };
// // }
// // },
// },
// {
// title: '',
// dataIndex: 'example',
// key: 'example',
// },
// {
// title: '',
// dataIndex: 'description',
// key: 'description',
// },
// ];
/**
* 获取上下行数据
*/
@ -892,6 +827,28 @@ const submitData = async () => {
accessProvider: current.value?.provider,
messageProtocol: current.value?.protocol,
};
// getConfigView(current.value?.protocol, current.value?.transport).then(
// (resp: any) => {
// metadata.value = (resp?.result[0] as ConfigMetadata) || {
// properties: [],
// };
// // udp
// if (metadata.value?.properties) {
// metadata.value?.properties.forEach((item) => {
// if (
// item.name === '' &&
// (!productStore.current?.configuration ||
// !productStore.current?.configuration.hasOwnProperty(
// item.name,
// ))
// ) {
// formData.data[item.name] =
// item.type.expands?.defaultValue;
// }
// });
// }
// },
// );
const metatdata = JSON.parse(productStore.current?.metadata || '{}');
if (!productStore.current?.metadata) {
const response = await getConfigView(

View File

@ -563,7 +563,7 @@ const query = reactive({
},
},
{
title: '所属部门',
title: '所属组织',
key: 'id$dim-assets',
dataIndex: 'id$dim-assets',
search: {

View File

@ -38,7 +38,7 @@
:statusText="slotProps.state?.text"
@click="openRuleEditor"
:statusNames="{
started: 'success',
started: 'processing',
disable: 'error',
}"
>
@ -88,17 +88,17 @@
</CardBox>
</template>
<template #state="slotProps">
<j-badge
<BadgeStatus
:text="
slotProps.state?.value === 'started'
? '正常'
: '禁用'
"
:status="
slotProps.state?.value === 'started'
? 'success'
: 'error'
"
:status="slotProps.state?.value"
:statusNames="{
started: 'processing',
disable: 'error',
}"
/>
</template>
<template #action="slotProps">