123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- <%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8" %>
- <!DOCTYPE html>
- <!-- 头部区域 -->
- <style>
- .notice_ul {
- display: flex;
- align-items: center;
- float: right;
- width: 565px;
- height: 20px;
- margin: 5px 10px 0 0;
- padding: 20px;
- box-sizing: border-box;
- font-size: 20px;
- color: #FF8D02;
- background: #FFEEB6;
- border-radius: 13px;
- overflow: hidden;
- }
- /* .notice_ul li {
- height: 30px;
- line-height: 60px;
- } */
- .notice_title {
- display: flex;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .notice_icon {
- width: 20px;
- height: 22px;
- margin: auto 30px auto 7px;
- background-image: url(${domain}/asset/css/images/icon_notice.svg);
- background-size: 100% 100%;
- }
- .top-cutline-normal {
- width: 1px;
- height: 50px;
- background: #0B2F60;
- box-shadow: 1px 0px 0px 0px #1C56A3;
- }
- .top-avatar {
- width: 37px;
- height: 37px;
- margin: 9px 0 auto 9px;
- border-radius: 50%;
- background-image: url(${domain}/asset/css/images/avatar-default.png);
- background-size: 100% 100%;
- }
- .layui-logo {
- left: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- height: 100%;
- width: 265px !important;
- font-size: 18px;
- }
- </style>
- <div class="layui-header" id="top">
- <%--<div class="menu-collapse" @click="changeSide">
- <div class="menu-collapse-icon" :class="{close: collapse}"></div>
- </div>
- <div class="top-cutline"></div>
- <div class="layui-logo" style="">哈密市投资项目智慧平台</div>--%>
- <div class="prompt"><span class="date">{{dateWeek}}</span></div>
- <c:if test="${isShowDialog==1}">
- <div class="top-task" onClick="toTask()">
- <div class="top-dashboard-icon"></div>
- 调度
- </div>
- </c:if>
- <div class="top-dashboard" onClick="toWorkBench()">
- <div class="top-dashboard-icon"></div>
- 工作台
- </div>
- <%--<div class="top-arrow"></div>
- <div class="top-breadcrumb"></div>--%>
- <ul class="layui-nav layui-layout-right">
- <li class="layui-nav-item" style="flex: 1;">
- <div id="noticeUl"></div>
- </li>
- <%--<li class="layui-nav-item">
- <div class="top-cutline-normal"></div>
- </li>--%>
- <li class="layui-nav-item">
- <div style="display: flex; align-items: center; height: 100%;">
- <button class="layui-btn"
- style="border-radius: 5px; background-color: #0073EF;"
- @click="changeSystem"
- >返回主系统</button>
- </div>
- </li>
- <li class="layui-nav-item">
- <a style="padding:0;margin-left:25px;">
- <span class="txt">
- ${realName}
- </span>
- <ul class="sub_menu">
- <li onClick="openRestPanel()"><img src="${WebSite.asset }/css/images/u48.svg"/>修改密码</li>
- </ul>
- </a>
- </li>
- <li class="layui-nav-item">
- <div class="top-avatar"></div>
- </li>
- <li class="layui-nav-item"><a href="${domain}/logout"><span class="logout"
- style="margin: 0"
- ></span>退出</a></li>
- </ul>
- </div>
- <script type="text/javascript">
- new Vue({
- el: "#top",
- data: {
- collapse: true,
- dateWeek: ""
- },
- created() {
- this.dateWeek = this.formatDate(new Date());
- },
- methods: {
- changeSide: function () {
- this.collapse = !this.collapse;
- window.parent.postMessage({collapse: this.collapse}, "*");
- },
- changeSystem() {
- App.postJson("/api/app/switch/toFgw", {type:'0'}, function (res) {
- console.log(res);
- if(res.code ===200){
- var targetUrl = res.msg+"/index";
- var cookiesToSend = "rememberMe="+res.data.token;
- // 将需要携带的cookie通过URL参数的形式附加到目标URL上
- targetUrl += "?cookies=" + encodeURIComponent(cookiesToSend);
- window.location.href = targetUrl;
- }
- });
- },
- formatDate(date) {
- const weekdays = ["日", "一", "二", "三", "四", "五", "六"];
- const year = date.getFullYear();
- const month = date.getMonth() + 1; // JavaScript中的月份是从0开始的,所以需要加1
- const day = date.getDate();
- const weekday = weekdays[date.getDay()]; // JavaScript中的getDay()方法返回的是一周中的第几天,从0(星期日)到6(星期六)
- return year+`年`+(month < 10 ? '0' + month : month)+`月`+(day < 10 ? '0' + day : day)+`日 星期`+weekday;
- }
- }
- })
- </script>
|