| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506 |
- <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <!DOCTYPE html>
- <html>
- <head>
- <title>我的消息--查看</title>
- <t:base type="jquery,easyui,tools,DatePicker"></t:base>
- <script src="plug-in/layer/layer.js"></script>
-
- <script>
- /* function btn_ok(){
- $("#btnsub").click();
- }
- function callback(data){
-
-
- if(data.success){
- layer.alert(data.msg, function(index){
- window.location.href="sysMsgController.do?list"
- layer.close(index);
- });
- }
- else{
- layer.alert(data.msg);
- }
- } */
- </script>
- <!-- 添加编辑跳转页面白色背景填充CSS -->
- <style type="text/css">
- .fixed-h{
- float:left;
- width:100%;
- height:940px;
- background:#ffffff;
- }
- </style>
- <script type="text/javascript">
- //编写自定义JS代码
- </script>
- </head>
- <body>
- <t:formvalid formid="formobj" dialog="false" usePlugin="password" layout="table" action="sysMsgController.do?doUpdate" tiptype="1" callback="callback">
- <input id="id" name="id" type="hidden" value="${sysMsgPage.id }"/>
- <input id="receivedRange" name="receivedRange" type="hidden" value="${sysMsgPage.receivedRange }"/>
- <input id="busid" name="busid" type="hidden" value="${sysMsgPage.busid }"/>
- <div class="fixed-h">
- <table style="width: 100%;" cellpadding="0" cellspacing="1" class="formtable">
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>消息标题:
- </label>
- </td>
- <td class="value">
- <input disabled="disabled" id="msgTitle" name="msgTitle" placeholder="请输入消息标题,最多20文字" maxlength="20" datatype="*1-20" type="text" style="width: 300px" ignore="ignore" value='${sysMsgPage.msgTitle}'/>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">消息标题</label>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>消息内容:
- </label>
- </td>
- <td class="value">
- <textarea disabled="disabled" id="msgContent" name="msgContent" style="width:600px;height: 200px;" class="inputxt" rows="9" placeholder="请输入消息内容(最多输入文字300)" maxlength="300" ignore="ignore" >${sysMsgPage.msgContent}</textarea>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">消息内容</label>
- </td>
- </tr>
- <!-- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>接收范围:
- </label>
- </td>
- <td>
- <table>
- <tr>
- <td>
- <input id="received_range_0" name="radio" class="checkOne" disabled="true" type="radio">公司全员
- </td>
- </tr>
- <tr>
- <td>
- <input id="received_range_1" name="radio" class="checkOne" disabled="true" type="radio">按单位
- <input id="orgIds" name=orgIds type="hidden" value="">
- <input type="text" id="departname" name="departname" readonly="readonly" class="inputxt" style="width: 150px" placeholder="请选择接收单位" disabled="true" onclick="openDepartmentSelect()">
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">单位</label>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" id="departSearch" disabled="true" onclick="openDepartmentSelect()">选择</a>
- <a href="#" disabled="disabled" class="easyui-linkbutton" plain="true" icon="icon-undo" id="departRedo" onclick="callbackClean()">清空</a>
- </td>
- </tr>
- <tr>
- <td>
- <input id="received_range_2" name="radio" class="checkOne" disabled="true" type="radio">按用户
- <input id="userid" name="userid" type="hidden" value="">
- <input readonly="readonly" type="text" id="realname" name="realname" value="" style="width: 150px" placeholder="请选择接收用户" disabled="true" onclick="openPersonnelSelect()" >
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">用户</label>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" id="departSearch" disabled="true" onclick="openPersonnelSelect()">选择</a>
- <a href="#" disabled="disabled" class="easyui-linkbutton" d plain="true" icon="icon-undo" id="departRedo" onclick="callbackPersonnelSelectClean()">清空</a>
- </td>
- </tr>
- </table>
- </td>
- </tr> -->
- <tr>
- <td height="50px" align="center" colspan="2">
- <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
- <!-- <a href="#" disabled="disabled" class="easyui-linkbutton l-btn l-btn-plain" iconcls="icon-save" onclick="btn_ok()">确定</a> -->
- <a style="margin-left:6px" href="#" class="easyui-linkbutton" plain="true" icon="icon-return" onclick="backHome()">返回</a>
-
- </td>
- </tr>
- </table>
- <div>
- </t:formvalid>
- </body>
- <script src = "webpage/cn/com/lzt/sysmsg/sysMsg.js"></script>
- <script src = "webpage/cn/com/lzt/sysmsg/myMsgHomePage-see.js"></script>
- <script type="text/javascript">
-
- //返回按钮
- function backHome(){
- window.location.href="sysMsgController.do?myMsgList";
- }
-
- function closeTabT(){
- // window.top.$('#maintabs').tabs('close', '');
- $('.J_menuTabs').on('click', "i[class='fa fa-times-circle']", closeTab);
- // window.top.$('#maintabs').tabs('close', '我的消息');
- }
-
- //计算元素集合的总宽度
- function calSumWidth(elements) {
- var width = 0;
- $(elements).each(function () {
- width += $(this).outerWidth(true);
- });
- return width;
- }
- //滚动到指定选项卡
- function scrollToTab(element) {
- var marginLeftVal = calSumWidth($(element).prevAll()), marginRightVal = calSumWidth($(element).nextAll());
- // 可视区域非tab宽度
- var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".J_menuTabs"));
- //可视区域tab宽度
- var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
- //实际滚动宽度
- var scrollVal = 0;
- if ($(".page-tabs-content").outerWidth() < visibleWidth) {
- scrollVal = 0;
- } else if (marginRightVal <= (visibleWidth - $(element).outerWidth(true) - $(element).next().outerWidth(true))) {
- if ((visibleWidth - $(element).next().outerWidth(true)) > marginRightVal) {
- scrollVal = marginLeftVal;
- var tabElement = element;
- while ((scrollVal - $(tabElement).outerWidth()) > ($(".page-tabs-content").outerWidth() - visibleWidth)) {
- scrollVal -= $(tabElement).prev().outerWidth();
- tabElement = $(tabElement).prev();
- }
- }
- } else if (marginLeftVal > (visibleWidth - $(element).outerWidth(true) - $(element).prev().outerWidth(true))) {
- scrollVal = marginLeftVal - $(element).prev().outerWidth(true);
- }
- $('.page-tabs-content').animate({
- marginLeft: 0 - scrollVal + 'px'
- }, "fast");
- }
- //查看左侧隐藏的选项卡
- function scrollTabLeft() {
- var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left')));
- // 可视区域非tab宽度
- var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".J_menuTabs"));
- //可视区域tab宽度
- var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
- //实际滚动宽度
- var scrollVal = 0;
- if ($(".page-tabs-content").width() < visibleWidth) {
- return false;
- } else {
- var tabElement = $(".J_menuTab:first");
- var offsetVal = 0;
- while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) {//找到离当前tab最近的元素
- offsetVal += $(tabElement).outerWidth(true);
- tabElement = $(tabElement).next();
- }
- offsetVal = 0;
- if (calSumWidth($(tabElement).prevAll()) > visibleWidth) {
- while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) {
- offsetVal += $(tabElement).outerWidth(true);
- tabElement = $(tabElement).prev();
- }
- scrollVal = calSumWidth($(tabElement).prevAll());
- }
- }
- $('.page-tabs-content').animate({
- marginLeft: 0 - scrollVal + 'px'
- }, "fast");
- }
- //查看右侧隐藏的选项卡
- function scrollTabRight() {
- var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left')));
- // 可视区域非tab宽度
- var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".J_menuTabs"));
- //可视区域tab宽度
- var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
- //实际滚动宽度
- var scrollVal = 0;
- if ($(".page-tabs-content").width() < visibleWidth) {
- return false;
- } else {
- var tabElement = $(".J_menuTab:first");
- var offsetVal = 0;
- while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) {//找到离当前tab最近的元素
- offsetVal += $(tabElement).outerWidth(true);
- tabElement = $(tabElement).next();
- }
- offsetVal = 0;
- while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) {
- offsetVal += $(tabElement).outerWidth(true);
- tabElement = $(tabElement).next();
- }
- scrollVal = calSumWidth($(tabElement).prevAll());
- if (scrollVal > 0) {
- $('.page-tabs-content').animate({
- marginLeft: 0 - scrollVal + 'px'
- }, "fast");
- }
- }
- }
- //通过遍历给菜单项加上data-index属性
- $(".J_menuItem").each(function (index) {
- if (!$(this).attr('data-index')) {
- $(this).attr('data-index', index);
- }
- });
- //update-begin--Author:zhoujf Date:20170707 for:TASK #2003 【UI改进】列表加载慢的时候会出现白板--------------------
- function hiddenloading(){
- $("#panelloadingDiv").hide();
- }
-
- function showloading(){
- $("#panelloadingDiv").show();
- }
- //update-end--Author:zhoujf Date:20170707 for:TASK #2003 【UI改进】列表加载慢的时候会出现白板--------------------
- function menuItem() {
- // 获取标识数据
- var dataUrl = $(this).attr('href'),
- dataIndex = $(this).data('index'),
- menuName = $.trim($(this).text()),
- flag = true;
- if (dataUrl == undefined || $.trim(dataUrl).length == 0)return false;
- // 选项卡菜单已存在
- $('.J_menuTab').each(function () {
- if ($(this).data('id') == dataUrl) {
- if (!$(this).hasClass('active')) {
- $(this).addClass('active').siblings('.J_menuTab').removeClass('active');
- scrollToTab(this);
- // 显示tab对应的内容区
- $('.J_mainContent .J_iframe').each(function () {
- if ($(this).data('id') == dataUrl) {
- $(this).show().siblings('.J_iframe').hide();
- return false;
- }
- });
- }
- flag = false;
- return false;
- }
- });
- // 选项卡菜单不存在
- if (flag) {
- var str = '<a href="javascript:;" class="active J_menuTab" data-id="' + dataUrl + '">' + menuName + ' <i class="fa fa-times-circle"></i><!-- <i class="fa fa-refresh"></i>--></a>';
- $('.J_menuTab').removeClass('active');
- // 添加选项卡对应的iframe
- //update-begin--Author:zhoujf Date:20170707 for:TASK #2003 【UI改进】列表加载慢的时候会出现白板--------------------
- var str1 = '<iframe class="J_iframe" onreadystatechange="hiddenloading();" onload="hiddenloading();" name="iframe' + dataIndex + '" width="100%" height="100%" src="' + dataUrl + '" frameborder="0" data-id="' + dataUrl + '" seamless></iframe>';
- //update-end--Author:zhoujf Date:20170707 for:TASK #2003 【UI改进】列表加载慢的时候会出现白板--------------------
- $('.J_mainContent').find('iframe.J_iframe').hide().parents('.J_mainContent').append(str1);
- //显示loading提示
- // var loading = layer.load();
- //
- // $('.J_mainContent iframe:visible').load(function () {
- // //iframe加载完成后隐藏loading提示
- // layer.close(loading);
- // });
- // 添加选项卡
- $('.J_menuTabs .page-tabs-content').append(str);
- //update-begin--Author:zhoujf Date:20170707 for:TASK #2003 【UI改进】列表加载慢的时候会出现白板--------------------
- showloading();
- //update-end--Author:zhoujf Date:20170707 for:TASK #2003 【UI改进】列表加载慢的时候会出现白板--------------------
- scrollToTab($('.J_menuTab.active'));
- }
- //var last = $("a[data-id='"+dataUrl+"']");
- var imageMenuData = [
- [{
- text: "刷新缓存",
- func: function() {
- var target = $('.J_iframe[data-id="' + dataUrl + '"]');
- var url = target.attr('src');
- //显示loading提示
- var loading = layer.load();
- target.attr('src', url).load(function () {
- //关闭loading提示
- layer.close(loading);
- });
- }
- }]
- ];
- try{
- $("a[data-id='"+dataUrl+"']").smartMenu(imageMenuData, {
- name:"name"+uuid()
- });
- }catch(e){
- // console.log(e);
- }
- return false;
- }
- $('.J_menuItem').on('click', menuItem);
- // 关闭选项卡菜单
- function closeTab() {
- var closeTabId = $(this).parents('.J_menuTab').data('id');
- var currentWidth = $(this).parents('.J_menuTab').width();
- //update-begin--Author:zhoujf Date:20170707 for:TASK #2003 【UI改进】列表加载慢的时候会出现白板--------------------
- hiddenloading();
- //update-end--Author:zhoujf Date:20170707 for:TASK #2003 【UI改进】列表加载慢的时候会出现白板--------------------
- // 当前元素处于活动状态
- if ($(this).parents('.J_menuTab').hasClass('active')) {
- // 当前元素后面有同辈元素,使后面的一个元素处于活动状态
- if ($(this).parents('.J_menuTab').next('.J_menuTab').size()) {
- var activeId = $(this).parents('.J_menuTab').next('.J_menuTab:eq(0)').data('id');
- $(this).parents('.J_menuTab').next('.J_menuTab:eq(0)').addClass('active');
- $('.J_mainContent .J_iframe').each(function () {
- if ($(this).data('id') == activeId) {
- $(this).show().siblings('.J_iframe').hide();
- return false;
- }
- });
- var marginLeftVal = parseInt($('.page-tabs-content').css('margin-left'));
- if (marginLeftVal < 0) {
- $('.page-tabs-content').animate({
- marginLeft: (marginLeftVal + currentWidth) + 'px'
- }, "fast");
- }
- // 移除当前选项卡
- $(this).parents('.J_menuTab').remove();
- // 移除tab对应的内容区
- $('.J_mainContent .J_iframe').each(function () {
- if ($(this).data('id') == closeTabId) {
- $(this).remove();
- return false;
- }
- });
- }
- // 当前元素后面没有同辈元素,使当前元素的上一个元素处于活动状态
- if ($(this).parents('.J_menuTab').prev('.J_menuTab').size()) {
- var activeId = $(this).parents('.J_menuTab').prev('.J_menuTab:last').data('id');
- $(this).parents('.J_menuTab').prev('.J_menuTab:last').addClass('active');
- $('.J_mainContent .J_iframe').each(function () {
- if ($(this).data('id') == activeId) {
- $(this).show().siblings('.J_iframe').hide();
- return false;
- }
- });
- // 移除当前选项卡
- $(this).parents('.J_menuTab').remove();
- // 移除tab对应的内容区
- $('.J_mainContent .J_iframe').each(function () {
- if ($(this).data('id') == closeTabId) {
- $(this).remove();
- return false;
- }
- });
- }
- }
- // 当前元素不处于活动状态
- else {
- // 移除当前选项卡
- $(this).parents('.J_menuTab').remove();
- // 移除相应tab对应的内容区
- $('.J_mainContent .J_iframe').each(function () {
- if ($(this).data('id') == closeTabId) {
- $(this).remove();
- return false;
- }
- });
- scrollToTab($('.J_menuTab.active'));
- }
- return false;
- }
- $('.J_menuTabs').on('click', "i[class='fa fa-times-circle']", closeTab);
- $('.J_menuTabs').on('click', "i[class='fa fa-refresh']", refreshTab);
- //关闭其他选项卡
- function closeOtherTabs(){
- $('.page-tabs-content').children("[data-id]").not(":first").not(".active").each(function () {
- $('.J_iframe[data-id="' + $(this).data('id') + '"]').remove();
- $(this).remove();
- });
- $('.page-tabs-content').css("margin-left", "0");
- //update-begin--Author:zhoujf Date:20170707 for:TASK #2003 【UI改进】列表加载慢的时候会出现白板--------------------
- hiddenloading();
- //update-end--Author:zhoujf Date:20170707 for:TASK #2003 【UI改进】列表加载慢的时候会出现白板--------------------
- }
- $('.J_tabCloseOther').on('click', closeOtherTabs);
- //滚动到已激活的选项卡
- function showActiveTab(){
- scrollToTab($('.J_menuTab.active'));
- }
- $('.J_tabShowActive').on('click', showActiveTab);
- // 点击选项卡菜单
- function activeTab() {
- if (!$(this).hasClass('active')) {
- var currentId = $(this).data('id');
- // 显示tab对应的内容区
- $('.J_mainContent .J_iframe').each(function () {
- if ($(this).data('id') == currentId) {
- $(this).show().siblings('.J_iframe').hide();
- return false;
- }
- });
- $(this).addClass('active').siblings('.J_menuTab').removeClass('active');
- scrollToTab(this);
- }
- }
- $('.J_menuTabs').on('click', '.J_menuTab', activeTab);
- //刷新iframe
- function refreshTab() {
- var target = $('.J_iframe[data-id="' + $(this).data('id') + '"]');
- if(target==undefined){
- target = $('.J_iframe[data-id="' + $(this).parent().data('id') + '"]');
- }
- var url = target.attr('src');
- //显示loading提示
- var loading = layer.load();
- target.attr('src', url).load(function () {
- //关闭loading提示
- layer.close(loading);
- });
- }
- $('.J_menuTabs').on('dblclick', '.J_menuTab', refreshTab);
- // 左移按扭
- $('.J_tabLeft').on('click', scrollTabLeft);
- // 右移按扭
- $('.J_tabRight').on('click', scrollTabRight);
- // 关闭全部
- $('.J_tabCloseAll').on('click', function () {
- $('.page-tabs-content').children("[data-id]").not(":first").each(function () {
- $('.J_iframe[data-id="' + $(this).data('id') + '"]').remove();
- $(this).remove();
- });
- $('.page-tabs-content').children("[data-id]:first").each(function () {
- $('.J_iframe[data-id="' + $(this).data('id') + '"]').show();
- $(this).addClass("active");
- });
- $('.page-tabs-content').css("margin-left", "0");
- });
- function uuid() {
- var s = [];
- var hexDigits = "0123456789abcdef";
- for (var i = 0; i < 36; i++) {
- s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
- }
- s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
- s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
- s[8] = s[13] = s[18] = s[23] = "-";
- var uuid = s.join("");
- return uuid;
- }
-
- </script>
|