@using GBLab.Common.Expand;
@using System.Data;

@{
    Layout = "~/Areas/Manage/Views/DefaultSkin/Shared_Back/_Layout_Page.cshtml";
    var Admin_Model = ViewData["adminuser"] as GBLab.Entities.T_User;
    var config = ViewData["SystemConfig"] as GBLab.Entities.Config.SystemConfig;
    var countinfo = ViewData["countinfo"] as DataTable;
    var notice = ViewData["notice"] as List<GBLab.Entities.T_Notices>;
    var workplan = ViewData["workplan"] as List<GBLab.Entities.T_WorkPlan>;
    string rolesInfo = "";
    var roles = ViewData["roles"] as List<GBLab.Entities.T_Role>;
    foreach (var item in roles)
    {
        rolesInfo += item.F_Name + ";";
    }
    ViewBag.BodyTitle = "";
}

<script src="/App_Themes/Skin_Manage/Extend/libs/sea/sea.js?v=@(ViewBag.Version)"></script>
<script src="/App_Themes/Skin_Manage/Extend/libs/sea/seajs-css.js?v=@(ViewBag.Version)"></script>
<script src="/App_Themes/Skin_Manage/Extend/helper/sea/seaConfig.js?v=@(ViewBag.Version)"></script>
<style>
    .panel {
        display: inline;
        float: left;
        padding: 3px;
    }

    .headimage {
        float: left;
        margin: 3px 10px 3px 3px;
        padding: 3px;
        border: 1px solid #efefef;
        border-radius: 5px;
        height: 78px;
        width: 78px;
    }

    .headcontainer {
        line-height: 35px;
    }

        .headcontainer > div {
            margin-top: 10px;
        }

            .headcontainer > div > span {
                font-weight: bold;
                color: green;
            }

    .enterpriseInfo > a {
        float: left;
        height: 80px;
        margin: 5px;
    }

        .enterpriseInfo > a > span > .l-btn-text {
            margin-top: 40px;
            line-height: 17px;
        }

    .countInfo > a {
        float: left;
        height: 80px;
        margin: 5px;
    }

        .countInfo > a > span > .l-btn-text {
            margin-top: 40px;
            line-height: 17px;
        }
</style>
<script>
    // 通过ID创建功能链接
    function createLink(id) {
        return "/manage/default/Post?ActionGUID=" + id;
    }
    // 查看窗口 - 打开 - 查看
    function NoticeDetail(rowId, rowGuid) {
        dialogWin = openWindow("#form-window", " 查看 ID:" + rowId, '/Manage/Notices/Detail?v=1' + "&Template=default" + '&F_Id=' + rowId + '&F_Guid=' + rowGuid, "icon-add").dialog('open');
        return;
    }

    function WorkPlanEdit(rowId, rowGuid) {
        dialogWin = openWindow("#form-window", " 修改 ID:" + rowId, createLink('3ca1f650-217a-4db7-b393-8e4ae3b2a100') + "&Template=default" + '&F_Id=' + rowId + '&F_Guid=' + rowGuid, "icon-add").dialog('open');
        return;
    }

    function ChangeUserInfo() {
        dialogWin = openWindow("#form-window", " 修改个人信息", '/manage/user/selfedit?v=1&' + "&Template=default" + '&F_Id=&F_Guid=', "icon-add").dialog('open');
        return;
    }

    function ChangeUserPassword() {
        dialogWin = openWindow("#form-window", " 修改个人信息", '/manage/user/changepassword?v=1&' + "&Template=default" + '&F_Id=&F_Guid=', "icon-add").dialog('open');
        return;
    }
</script>

<div id="AllContainer"
     class="easyui-layout"
     data-options="fit:true">

    <div data-options="region:'north',split:false,iconCls:'icon-ok'"
         style="height:100px"
         collapsible="true"
         minWidth="10"
         minHeight="10"
         maxWidth="100000"
         maxHeight="100px"
         border="true"
         class="headcontainer">
        <img src="@(Admin_Model.F_Logo.DefaultIsNullOrEmpty("").ToString().ChangeToImageUrl(""))" class="headimage">
        <div>
            欢迎您，【@(Admin_Model.T_Department.F_Name)】【@(Admin_Model.T_Post.F_Name)】<span>@(Admin_Model.F_Name)</span>@(rolesInfo)<br />
            这是您第 <span>@(Admin_Model.F_LoginNum)</span> 次登录，登录IP：@(GBLab.Common.Utils.ServerHelper.GetClientIP)，登录日期：@(System.DateTime.Now)，详细信息请查看日志 ，如果不是您本人登录，请及时修改密码 。
            <a href="#this" onclick="ChangeUserInfo()">【修改个人资料】</a>
            <a href="#this" onclick="ChangeUserPassword()">【修改密码】</a>
        </div>
    </div>
    <div data-options="region:'center',iconCls:'icon-ok',border:true">
        <div id="AllContainer2"
             class="easyui-layout"
             data-options="fit:true">
            <div data-options="region:'center',iconCls:'icon-ok',border:true">
                <ul class="easyui-datalist" title="企业公告" lines="true" style="width:33.2%;height:99%; float:left">
                    @foreach (var item in notice)
                    {
                        <li value="@(item.F_Id)"><span onclick="NoticeDetail('@(item.F_Id)', '@(item.F_Guid)')">@(item.F_Name)</span></li>
                    }
                </ul>
                <ul class="easyui-datalist" title="待办事项" lines="true" style="width:33.2%;height:99%; float:left">
                    @foreach (var item in workplan)
                    {
                        <li value="@(item.F_Id)"><span onclick="WorkPlanEdit('@(item.F_Id)', '@(item.F_Guid)')">@(item.F_Name)</span></li>
                    }
                </ul>
                <ul class="easyui-datalist" title="软件信息" lines="true" style="width:33.2%;height:99%; float:left">
                    <li value="">企业名称：<a href="http://www.xuexiaoruanjian.com" target="_blank" title="学校软件">学校软件</a></li>
                    <li value="">企业官网：<a href="http://www.xuexiaoruanjian.com" target="_blank" title="企业官网">http://www.xuexiaoruanjian.com</a></li>
                    <li value="">企业产品：<a href="http://www.xuexiaoruanjian.com/products/" target="_blank" title="企业产品">http://www.xuexiaoruanjian.com/products/</a></li>
                    <li value="">联系QQ：688704</li>
                    <li value="">联系邮箱：<a href="mailto:gblab@xuexiaoruanjian.com" target="_blank">gblab@xuexiaoruanjian.com</a></li>
                    <li value="">版本发布：<a href="http://www.xuexiaoruanjian.com/sub/" target="_blank" title="版本发布">http://www.xuexiaoruanjian.com/sub/</a></li>
                    <li value="">PowerBy：<a href="http://www.xuexiaoruanjian.com/" target="_blank" title="PowerBy">高博软件开发工作室</a></li>
                </ul>
                @*<div id="p2" class="easyui-panel enterpriseInfo" title="软件信息" style="width:33.2%;height:99%;float:left;">
                        <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100px" data-options="iconCls:'icon-large-picture',size:'large',iconAlign:'top'">【企业人数】</br>@(countinfo.Rows[0]["num_user"])</a>
                        <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100px" data-options="iconCls:'icon-large-shapes',size:'large',iconAlign:'top'">【全部登录】</br>@(countinfo.Rows[0]["num_login"])</a>
                        <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100px" data-options="iconCls:'icon-large-smartart',size:'large',iconAlign:'top'">【平均登录】</br>@(countinfo.Rows[0]["num_perlogin"])</a>
                        <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100px" data-options="iconCls:'icon-large-chart',size:'large',iconAlign:'top'">【我的登录】</br>@(countinfo.Rows[0]["num_userlogin"])</a>
                    </div>*@
            </div>
            <div title="系统信息" class="countInfo" data-options="region:'south',split:false" style="height:140px;padding:5px;width:100%;">
                <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100px;color:green;font-weight:bold;" data-options="iconCls:'icon-large-year',size:'large',iconAlign:'top'">【当前学年】</br>@(config.System_ThisYear)</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100px;color:green;font-weight:bold;" data-options="iconCls:'icon-large-term',size:'large',iconAlign:'top'">【当前学期】</br>@(GBLab.Entities.T_KeyValueItem.GetKeyName(GBLab.Entities.T_KeyValueItem.Name_System_Term, config.System_ThisTerm))</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100px" data-options="iconCls:'icon-large-usercount',size:'large',iconAlign:'top'">【教工人数】</br>@(countinfo.Rows[0]["num_user"])</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100px" data-options="iconCls:'icon-large-login',size:'large',iconAlign:'top'">【全部登录】</br>@(countinfo.Rows[0]["num_login"])</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100px" data-options="iconCls:'icon-large-login',size:'large',iconAlign:'top'">【平均登录】</br>@(countinfo.Rows[0]["num_perlogin"])</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" style="width:100px" data-options="iconCls:'icon-large-login',size:'large',iconAlign:'top'">【我的登录】</br>@(countinfo.Rows[0]["num_userlogin"])</a>
            </div>
        </div>
    </div>
    <div title="企业坐标" data-options="region:'south',split:false" style="height:400px;">
        @RenderPage("~/Areas/Manage/Views/DefaultSkin/Modules/00Common/Partial/_BaiDuMap_View.cshtml", new { FieldName = "F_Value", ValueInfo = config.System_Site_BaiduMap, NameInfo = config.System_Site_Name.DefaultIsNullOrEmpty("学校软件"), AddressInfo = config.System_Site_Address.DefaultIsNullOrEmpty("学校软件地址") })
    </div>
</div>
<div id="form-window" title="操作窗口" class="easyui-window" data-options="modal:true,closed:true,fit:false" style="width:98%;height:98%;padding:0px 0px 3px 0px;"></div>