fix: bug#10196、10500、10524、10525
This commit is contained in:
parent
7a0796668f
commit
c4d33d56e3
|
@ -53,7 +53,7 @@
|
|||
>
|
||||
<j-input
|
||||
v-model:value="formData.id"
|
||||
placeholder="请输入"
|
||||
placeholder="请输入ID"
|
||||
:disabled="!!route.query.id"
|
||||
/>
|
||||
</j-form-item>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
export const PROVIDER_OPTIONS = [
|
||||
{ label: '固定地址', value: 'fixed-media' },
|
||||
{ label: 'GB/T28181', value: 'gb28181-2016' },
|
||||
{ label: '固定地址', value: 'fixed-media' },
|
||||
]
|
||||
export const streamMode = [
|
||||
{ label: 'UDP', value: 'UDP' },
|
||||
|
|
|
@ -78,7 +78,12 @@
|
|||
...item.tooltip,
|
||||
}"
|
||||
@click="item.onClick"
|
||||
:hasPermission="'media/Device:' + item.key"
|
||||
:hasPermission="
|
||||
'media/Device:' +
|
||||
(item.key !== 'updateChannel'
|
||||
? item.key
|
||||
: 'update')
|
||||
"
|
||||
>
|
||||
<AIcon
|
||||
type="DeleteOutlined"
|
||||
|
@ -124,7 +129,10 @@
|
|||
@click="i.onClick"
|
||||
type="link"
|
||||
style="padding: 0px"
|
||||
:hasPermission="'media/Device:' + i.key"
|
||||
:hasPermission="
|
||||
'media/Device:' +
|
||||
(i.key !== 'updateChannel' ? i.key : 'update')
|
||||
"
|
||||
>
|
||||
<template #icon><AIcon :type="i.icon" /></template>
|
||||
</PermissionButton>
|
||||
|
@ -318,7 +326,7 @@ const getActions = (
|
|||
},
|
||||
},
|
||||
{
|
||||
key: 'view', // updateChannel
|
||||
key: 'updateChannel',
|
||||
text: '更新通道',
|
||||
tooltip: {
|
||||
title:
|
||||
|
@ -366,6 +374,8 @@ const getActions = (
|
|||
icon: 'DeleteOutlined',
|
||||
},
|
||||
];
|
||||
return actions;
|
||||
return data.provider === 'fixed-media'
|
||||
? actions.filter((f: any) => f.key !== 'updateChannel')
|
||||
: actions;
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -43,8 +43,8 @@ interface DataNode {
|
|||
|
||||
/**
|
||||
* 点击节点
|
||||
* @param _
|
||||
* @param param1
|
||||
* @param _
|
||||
* @param param1
|
||||
*/
|
||||
const onSelect = (_: any, { node }: any) => {
|
||||
emit('onSelect', { dId: node.deviceId, cId: node.channelId });
|
||||
|
@ -68,23 +68,25 @@ const treeData = ref<any[]>([]);
|
|||
const getDeviceList = async () => {
|
||||
const res = await cascadeApi.getMediaTree({ paging: false });
|
||||
if (res.success) {
|
||||
treeData.value = res.result.map((m: any) => {
|
||||
const extra: any = {};
|
||||
extra.isLeaf = isLeaf(m);
|
||||
return {
|
||||
...m,
|
||||
...extra,
|
||||
};
|
||||
});
|
||||
treeData.value = res.result
|
||||
.sort((a: any, b: any) => a.createTime - b.createTime)
|
||||
.map((m: any) => {
|
||||
const extra: any = {};
|
||||
extra.isLeaf = isLeaf(m);
|
||||
return {
|
||||
...m,
|
||||
...extra,
|
||||
};
|
||||
});
|
||||
}
|
||||
};
|
||||
getDeviceList();
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
* @param list
|
||||
* @param key
|
||||
* @param children
|
||||
* @param list
|
||||
* @param key
|
||||
* @param children
|
||||
*/
|
||||
const updateTreeData = (
|
||||
list: DataNode[],
|
||||
|
@ -146,7 +148,7 @@ const getChildren = (key: any, params: any): Promise<any> => {
|
|||
|
||||
/**
|
||||
* 异步加载子节点数据
|
||||
* @param param0
|
||||
* @param param0
|
||||
*/
|
||||
const onLoadData = ({ key, children }: any): Promise<void> => {
|
||||
return new Promise(async (resolve) => {
|
||||
|
|
Loading…
Reference in New Issue