123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486 |
- @using MySystem.BsModels;
- @{
- List<RightDic> RightList = ViewBag.RightList as List<RightDic>;
- List<RightDic> menus = ViewBag.menus as List<RightDic>;
- string RightInfo = ViewBag.RightInfo as string;
- string SysUserName = ViewBag.SysUserName as string;
- string MyTaskCount = ViewBag.MyTaskCount as string;
- string Role = ViewBag.Role as string;
- }
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>创业帮后台管理系统</title>
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
- <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
- <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
- <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
- <script>/^http(s*):\/\//.test(location.href) || alert('请先部署到服务器下再访问');</script>
- <style>
- .layui-form-select dl dd{
- color: #000 !important;
- }
- </style>
- </head>
- <body class="layui-layout-body">
- <div id="LAY_app">
- <div class="layui-layout layui-layout-admin">
- <div class="layui-header">
- <!-- 头部区域 -->
- <ul class="layui-nav layui-layout-left">
- <li class="layui-nav-item layadmin-flexible" lay-unselect>
- <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
- <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
- </a>
- </li>
- <li class="layui-nav-item layui-hide-xs" lay-unselect>
- <a href="/" target="_blank" title="前台">
- <i class="layui-icon layui-icon-website"></i>
- </a>
- </li>
- <li class="layui-nav-item" lay-unselect>
- <a href="javascript:;" layadmin-event="refresh" title="刷新">
- <i class="layui-icon layui-icon-refresh-3"></i>
- </a>
- </li>
- <li class="layui-nav-item" lay-unselect>
- <div class="layui-form" style="padding-top: 5px;">
- <select name="menusearch" lay-search lay-filter="SearchMenu">
- <option value="">搜索快捷菜单</option>
- @foreach(RightDic sub in menus)
- {
- if (RightInfo.Contains("," + sub.Id + ","))
- {
- string url = sub.Url;
- if (url.Contains("?"))
- {
- url += "&right=" + sub.Id;
- }
- else
- {
- url += "?right=" + sub.Id;
- }
- <option value="@(url)#@(sub.Name)">@sub.Name</option>
- }
- }
- </select>
- </div>
- </li>
- </ul>
- <ul class="layui-nav layui-layout-left">
-
- </ul>
- <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
- @*<li class="layui-nav-item" lay-unselect>
- <a id="TaskFlowBtn" lay-href="/Admin/TaskFlowDistribute/Index" lay-text="待处理任务">
- <i class="layui-icon layui-icon-notice"></i>
- @if(MyTaskCount != "0")
- {
- <span class="layui-badge-dot"></span>
- }
- </a>
- </li>
- <li class="layui-nav-item layui-hide-xs" lay-unselect>
- <a href="javascript:;" layadmin-event="theme">
- <i class="layui-icon layui-icon-theme"></i>
- </a>
- </li>
- <li class="layui-nav-item layui-hide-xs" lay-unselect>
- <a href="javascript:;" layadmin-event="note">
- <i class="layui-icon layui-icon-note"></i>
- </a>
- </li>*@
- <li class="layui-nav-item layui-hide-xs" lay-unselect>
- <a href="javascript:;" layadmin-event="fullscreen">
- <i class="layui-icon layui-icon-screen-full"></i>
- </a>
- </li>
- <li class="layui-nav-item" lay-unselect>
- <a href="javascript:;">
- <cite>@ViewBag.SysRealName</cite>
- </a>
- <dl class="layui-nav-child">
- <dd><a lay-href="/Admin/Home/AdminInfo">个人资料</a></dd>
- <dd><a lay-href="/Admin/Home/LoginPassword">修改密码</a></dd>
- <hr>
- <dd style="text-align: center;"><a onclick="quit()">退出</a></dd>
- </dl>
- </li>
- <li class="layui-nav-item layui-hide-xs" lay-unselect>
- <a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
- </li>
- <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
- <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
- </li>
- </ul>
- </div>
- <!-- 侧边菜单 -->
- <div class="layui-side layui-side-menu">
- <div class="layui-side-scroll">
- <div class="layui-logo" lay-href="/Admin/Home/Main">
- <span>创业帮</span>
- </div>
- <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
- <li data-name="get" class="layui-nav-item layui-nav-itemed layui-this">
- <a href="javascript:;" lay-href="/Admin/Home/Main" lay-tips="控制台" lay-direction="2">
- <i class="layui-icon layui-icon-auz"></i>
- <cite>控制台</cite>
- </a>
- </li>
- @foreach (RightDic sub1 in RightList.Where(m => m.RightLevel == 1).OrderByDescending(m => m.Sort).ThenBy(m => m.Id).ToList())
- {
- if (RightInfo.Contains("," + sub1.Id + ","))
- {
- string IdString = sub1.Id + "_";
- List<RightDic> children1 = RightList.Where(m => m.RightLevel == 2 && m.Id.StartsWith(IdString)).OrderByDescending(m => m.Sort).ThenBy(m => m.Id).ToList();
- <li data-name="component" class="layui-nav-item">
- @if (children1.Count > 0)
- {
- <a href="javascript:;" lay-tips="@sub1.Name" title="@sub1.Name" lay-direction="2">
- <i class="layui-icon @(string.IsNullOrEmpty(sub1.Icon) ? "layui-icon-component" : sub1.Icon)"></i>
- <cite>@sub1.Name</cite>
- </a>
- <dl class="layui-nav-child">
- @foreach (RightDic sub2 in children1)
- {
- if (RightInfo.Contains("," + sub2.Id + ","))
- {
- IdString = sub2.Id + "_";
- List<RightDic> children2 = RightList.Where(m => m.RightLevel == 3 && m.Id.StartsWith(IdString)).OrderByDescending(m => m.Sort).ThenBy(m => m.Id).ToList();
- <dd data-name="grid">
- @if (children2.Count > 0)
- {
- <a href="javascript:;" title="@sub2.Name">@sub2.Name</a>
- <dl class="layui-nav-child">
- @foreach (RightDic sub3 in children2)
- {
- if (RightInfo.Contains("," + sub3.Id + ","))
- {
- string url = sub3.Url;
- if (url.Contains("?"))
- {
- url += "&right=" + sub3.Id;
- }
- else
- {
- url += "?right=" + sub3.Id;
- }
- <dd data-name="list"><a lay-href="@url" title="@sub3.Name">@sub3.Name</a></dd>
- }
- }
- </dl>
- }
- else
- {
- string url = sub2.Url;
- if (url.Contains("?"))
- {
- url += "&right=" + sub2.Id;
- }
- else
- {
- url += "?right=" + sub2.Id;
- }
- <a lay-href="@url" title="@sub2.Name">@sub2.Name</a>
-
- }
- </dd>
- }
- }
- </dl>
- }
- else
- {
- string url = sub1.Url;
- if (url.Contains("?"))
- {
- url += "&right=" + sub1.Id;
- }
- else
- {
- url += "?right=" + sub1.Id;
- }
- <a href="javascript:;" lay-href="@url" title="@sub1.Name" lay-tips="@sub1.Name" lay-direction="2">
- <i class="layui-icon layui-icon-component"></i>
- <cite>@sub1.Name</cite>
- </a>
- }
- </li>
- }
- }
- @if (SysUserName == "admin" || SysUserName == "root")
- {
- <li data-name="component" class="layui-nav-item">
- <a href="javascript:;" lay-tips="开发" lay-direction="2">
- <i class="layui-icon layui-icon-component"></i>
- <cite>开发</cite>
- </a>
- <dl class="layui-nav-child">
- <dd data-name="grid">
- <a lay-href="/Admin/RightDic/Index">后台菜单</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/RightDicNew/Index">新后台菜单</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/UploadParams/Index">上传配置</a>
- </dd>
- @if(SysUserName == "admin")
- {
- <dd data-name="grid">
- <a lay-href="/Admin/OperateRightList/Index">操作权限库</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/PageUpdateInfo/Index">页面管理</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/FileUpdateInfo/Index">静态资源管理</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/AppBottomNavs/Index">APP底部导航</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/AppVersion/Index">APP版本管理</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/SystemSet/Edit">站内设置</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/PublicAccountSet/Edit">第三方配置</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/TimedTasks/Index">任务管理</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/ProfitObjects/Index">分润配置</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/SysTools/SeeSpLog">查看日志</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/SysTools/RelationForUser">关联上下级</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/SysTools/MakeCoupons">生成机具兑换码</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/SysTools/LisFee">立刷费率</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/SysTools/CheckMachine2">机具补录</a>
- </dd>
- }
- </dl>
- </li>
- }
- @if (Role == "13")
- {
- <li data-name="component" class="layui-nav-item">
- <a href="javascript:;" lay-tips="前端工具" lay-direction="2">
- <i class="layui-icon layui-icon-component"></i>
- <cite>前端工具</cite>
- </a>
- <dl class="layui-nav-child">
- <dd data-name="grid">
- <a lay-href="/Admin/RightDicNew/Index">新后台菜单</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/PageUpdateInfo/Index">页面管理</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/FileUpdateInfo/Index">静态资源管理</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/AppBottomNavs/Index">APP底部导航</a>
- </dd>
- <dd data-name="grid">
- <a lay-href="/Admin/AppVersion/Index">APP版本管理</a>
- </dd>
- </dl>
- </li>
- }
- </ul>
- </div>
- </div>
- <!-- 页面标签 -->
- <div class="layadmin-pagetabs" id="LAY_app_tabs">
- <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
- <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
- <div class="layui-icon layadmin-tabs-control layui-icon-down">
- <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
- <li class="layui-nav-item" lay-unselect>
- <a href="javascript:;"></a>
- <dl class="layui-nav-child layui-anim-fadein">
- <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
- <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
- <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
- </dl>
- </li>
- </ul>
- </div>
- <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
- <ul class="layui-tab-title" id="LAY_app_tabsheader">
- <li lay-id="/Admin/Home/Main" lay-attr="/Admin/Home/Main" class="layui-this"><i class="layui-icon layui-icon-home"></i></li>
- </ul>
- </div>
- </div>
- <!-- 主体内容 -->
- <div class="layui-body" id="LAY_app_body">
- <div class="layadmin-tabsbody-item layui-show">
- <iframe src="/Admin/Home/Main" frameborder="0" class="layadmin-iframe"></iframe>
- </div>
- </div>
- <!-- 辅助元素,一般用于移动设备下遮罩 -->
- <div class="layadmin-body-shade" layadmin-event="shade"></div>
- </div>
- </div>
- <script src="/layuiadmin/layui/layui.js"></script>
- <script>
- //任务流程提醒弹窗
- function taskRing() {
- var index = layer.open({
- type: 1
- ,offset: 'rb'
- ,content: '<div style="padding: 20px 100px;">您有新的任务需要处理</div>'
- ,btn: ['去处理', '稍等']
- ,btnAlign: 'c' //按钮居中
- ,shade: 0 //不显示遮罩
- ,yes: function(){
- layer.close(index);
- document.getElementById("TaskFlowBtn").click();
- }
- });
- }
- var $;
- layui.config({
- base: '/layuiadmin/' //静态资源所在路径
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['index', 'form'], function () {
- $ = layui.$;
- var form = layui.form;
- form.on('select(SearchMenu)', function (data) {
- if(data.value && data.value != '') {
- var data = data.value.split('#');
- addTab(data[1], data[0]);
- }
- });
- });
- //添加选项卡
- function addTab(name, url) {
- layui.index.openTabsPage(url, name);
- }
- function showPwd() {
- layer.open({
- type: 2
- , title: '修改登录密码'
- , content: '/Admin/Home/LoginPassword'
- , maxmin: true
- , area: ['400px', '350px']
- , btn: ['确定', '取消']
- , yes: function (index, layero) {
- var iframeWindow = window['layui-layer-iframe' + index]
- , submitID = 'LAY-list-front-submit'
- , submit = layero.find('iframe').contents().find('#' + submitID);
- //监听提交
- iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
- var field = data.field; //获取提交的字段
- var userdata = "";
- for (var prop in field) {
- userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
- }
- $.ajax({
- type: "POST",
- url: "/Admin/Home/LoginPasswordPost?r=" + Math.random(1),
- data: userdata,
- dataType: "text",
- success: function (data) {
- if (data == "success") {
- layer.msg("修改成功", { time: 2000 }, function () {
- layer.close(index); //关闭弹层
- });
- } else {
- layer.msg(data);
- }
- }
- });
- });
- submit.trigger('click');
- }
- , success: function (layero, index) {
- }
- });
- }
- function showInfo() {
- layer.open({
- type: 2
- , title: '个人资料'
- , content: '/Admin/Home/AdminInfo'
- , maxmin: true
- , area: ['400px', '350px']
- , btn: ['确定', '取消']
- , yes: function (index, layero) {
- var iframeWindow = window['layui-layer-iframe' + index]
- , submitID = 'LAY-list-front-submit'
- , submit = layero.find('iframe').contents().find('#' + submitID);
- //监听提交
- iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
- var field = data.field; //获取提交的字段
- console.log(field);
- var userdata = "";
- for (var prop in field) {
- userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
- }
- $.ajax({
- type: "POST",
- url: "/Admin/Home/AdminInfoPost?r=" + Math.random(1),
- data: userdata,
- dataType: "text",
- success: function (data) {
- if (data == "success") {
- layer.msg("修改成功", { time: 2000 }, function () {
- layer.close(index); //关闭弹层
- });
- } else {
- layer.msg(data);
- }
- }
- });
- });
- submit.trigger('click');
- }
- , success: function (layero, index) {
- }
- });
- }
- function quit() {
- layer.confirm('确定要退出吗?', {
- btn: ['确定', '取消']
- }, function () {
- window.location.href = "/Admin/Home/Quit";
- });
- }</script>
- </body>
- </html>
|