<ul
class
=
"sidebar-menu"
>
@
for
(int i = 0; i < mList.
Count
; i++)
{
if
(mList[i].FatherID == 0)
{
mCList = GetChild(mList[i].ModuleId, mList);<!--二级菜单的集合-->
<li
class
=
"treeview"
><a href=
"#"
><i
class
=
"fa fa-folder-o"
></i><span>@mList[i].ModuleName</span><i
class
=
"fa fa-angle-left pull-right"
></i></a><!--一级菜单-->
<ul
class
=
"treeview-menu"
>
@
for
(int j = 0; j < mCList.
Count
; j++)
{
if
(mCList[j].FatherID == 41)
{
mSList = GetChild(mCList[j].ModuleId, mList); <!--三级菜单的集合-->
<li><a href=
"javascript:void(0);"
data-id=
"@mCList[j].ModuleId"
><i
class
=
"fa fa-share"
></i>@mCList[j].ModuleName<i
class
=
"fa fa-angle-left pull-right"
></i></a><!--二级菜单-->
<ul
class
=
"treeview-menu"
>
@
for
(int k = 0; k < mSList.
Count
; k++)
{
if
(!String.IsNullOrEmpty(mSList[k].RoteURL))
{
<li><a href=
"@Url.Content(mSList[k].RoteURL)?cid=@mSList[k].ModuleId"
data-id=
"@mSList[k].ModuleId"
><i
class
=
"fa fa-circle-o"
></i>@mSList[k].ModuleName</a></li>
<!--三级菜单-->
i++;
}
else
{
<li><a href=
"javascript:void(0)"
data-id=
"@mSList[k].ModuleId"
><i
class
=
"fa fa-circle-o"
></i>@mSList[k].ModuleName</a></li>
<!--三级菜单-->
i++;
}
}
</ul>
</li>
i++;
}
else
{
if
(!String.IsNullOrEmpty(mCList[j].RoteURL))
{
<li><a href=
"@Url.Content(mCList[j].RoteURL)?cid=@mCList[j].ModuleId"
data-id=
"@mCList[j].ModuleId"
><i
class
=
"fa fa-circle-o"
></i>@mCList[j].ModuleName</a></li>
<!--二级菜单-->
i++;
}
else
{
<li><a href=
"javascript:void(0);"
data-id=
"@mCList[j].ModuleId"
><i
class
=
"fa fa-circle-o"
></i>@mCList[j].ModuleName</a></li>
<!--二级菜单-->
i++;
}
}
}
</ul>
</li>
}
}
</ul>