当前位置:网站首页>What is the reason why the switching page group disappears after easycvr establishes a multi-level group?

What is the reason why the switching page group disappears after easycvr establishes a multi-level group?

2022-06-24 01:53:00 Tsingsee green rhino video

TSINGSEE Green rhino video cloud side architecture platform when accessing multi-level channels , In the video access sidebar, a column menu will be displayed , The purpose is to make the distinction between channels clearer . At present, we have successfully added the multi-level grouping function to EasyCVR Inside .

In a certain EasyCVR On site , An error occurred while testing the multi-level grouping function bug, When the user establishes many levels of grouping in the grouping interface , Switch to the video square page , Multi level grouping content disappeared .

actually , The interface called by the device grouping interface and the video Plaza interface is not the same interface , Find the calling interface , Then get the corresponding top-level group , Temporarily on the outermost side , When the user clicks , Load the subgroups in one time .

So we need to make changes at the code level , When the user calls the interface of the video square interface , First, determine the user role , Then bind to find the corresponding group , Show the top-level groups , The rest show the subgroups at once . The reference codes are as follows :

// The child groups included in the group 
lowerlabels, err := cvrservice.GetDeviceService().GetLowerLabels(labelid)
if err != nil {
       c.AbortWithStatusJSON(400, err.Error())
       return
}
// The group contains subordinate devices 
devices, err := cvrservice.GetDeviceService().GetDevicesByLabelID(labelid)
if err != nil {
       c.AbortWithStatusJSON(400, err.Error())
       return
}

After adding, deploy the effect on the customer's site , Be able to show the group correctly :

原网站

版权声明
本文为[Tsingsee green rhino video]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/11/20211111095959851y.html

随机推荐