浏览代码

消息通知

1178232204@qq.com 3 年之前
父节点
当前提交
9dc7f8bd6e
共有 9 个文件被更改,包括 969 次插入5 次删除
  1. 6 0
      src/css/common.less
  2. 522 0
      src/css/messageNoti.less
  3. 3 0
      src/html/index.html
  4. 82 0
      src/html/messageNoti.html
  5. 5 0
      src/js/api.js
  6. 27 5
      src/js/index.js
  7. 307 0
      src/js/messageNoti.js
  8. 2 0
      src/js/utils.js
  9. 15 0
      webpack.configCopy.jsx

+ 6 - 0
src/css/common.less

@@ -348,3 +348,9 @@ input.canEditDept {
   border-radius: 50%;
   margin-bottom: 5px;
 }
+.redNews {
+  background: #E34D59;
+  padding: 0 5px;
+  border-radius: 22px;
+  color: #fff;
+}

+ 522 - 0
src/css/messageNoti.less

@@ -0,0 +1,522 @@
+@import "./reset.less";
+.container {
+  width: 100%;
+  height: 100%;
+  overflow: auto;
+  background: #fff;
+  border-bottom: 10px @disColor solid;
+  box-sizing: border-box;
+}
+ul,
+li {
+  list-style: none;
+}
+h2 {
+  .h2;
+  border-bottom: 10px @disColor solid;
+  position: fixed;
+  top: 0;
+}
+.main-body {
+  .main-body-com;
+  border: none;
+  border-left: 10px @disColor solid;
+  margin: 54px 0 0;
+  min-width: 1090px;
+  min-height: calc(100% - 84px);
+  /*width: 100%;*/
+}
+.appealBtn {
+  color: #00a1ff;
+  padding: 0 5px;
+  cursor: pointer;
+}
+.review {
+  cursor: pointer;
+  & i {
+    width: 6px;
+    height: 6px;
+    background: #f48138;
+    display: inline-block;
+    border-radius: 50%;
+    margin-right: 5px;
+  }
+}
+.rejected {
+  cursor: pointer;
+  & i {
+    width: 6px;
+    height: 6px;
+    background: #e3505b;
+    display: inline-block;
+    border-radius: 50%;
+    margin-right: 5px;
+  }
+}
+.approved {
+  cursor: pointer;
+  & i {
+    width: 6px;
+    height: 6px;
+    background: #22ac76;
+    display: inline-block;
+    border-radius: 50%;
+    margin-right: 5px;
+  }
+}
+.qctable {
+  .table;
+  min-width: 1090px;
+  th,
+  td {
+    padding: 5px 10px;
+  }
+  th {
+    white-space: nowrap;
+  }
+  th[code] {
+    cursor: pointer;
+    &:after {
+      content: "";
+      display: inline-block;
+      width: 11px;
+      height: 14px;
+      margin-left: 4px;
+      vertical-align: middle;
+      background: url("../images/grey.png");
+    }
+    &.asc:after {
+      background: url("../images/up_blue.png");
+      background-size: 100%;
+    }
+    &.desc:after {
+      background: url("../images/down_blue.png");
+      background-size: 100%;
+    }
+  }
+  td {
+    white-space: nowrap;
+  }
+  .moduleNumber {
+    text-align: center;
+  }
+  .scoreOperaItem {
+    width: 50px;
+    cursor: pointer;
+  }
+  .tabTitle {
+    background: #eff0f9 !important;
+  }
+}
+.tabFoot {
+  height: 40px;
+  /*border: 1px solid #E2E5EF;
+    border-top: none;
+    box-sizing: border-box;*/
+}
+.scoreOpera {
+  height: 50px;
+  line-height: 50px;
+  margin: 0 20px 0 0;
+  cursor: pointer;
+  img {
+    margin: 0 10px 0 0;
+    vertical-align: middle;
+  }
+}
+
+.recordScoreOperaBtn {
+  cursor: pointer;
+  color: @activeColor;
+}
+.recordScoreBtn {
+  cursor: pointer;
+  display: inline-block;
+  width: 68px;
+  height: 30px;
+  line-height: 30px;
+  text-align: center;
+  border-radius: 4px;
+  box-sizing: border-box;
+  border: 1px solid @activeColor;
+  color: #fff;
+  background: @activeColor;
+}
+.filterBox {
+  position: relative;
+}
+.overAuto {
+  display: table;
+  padding-right: 20px;
+  width: 100%;
+}
+.toggle-item {
+  display: none;
+}
+.filter-toggler {
+  position: absolute;
+  left: 1048px;
+  top: 8px;
+  color: #777;
+  white-space: nowrap;
+  font-size: 14px;
+  background: url("../images/arrow_up.png") 60px center no-repeat;
+  padding-right: 15px;
+  background-size: 10px 6px;
+  &.up {
+    background: url("../images/arrow_down.png") 60px center no-repeat;
+    background-size: 10px 6px;
+  }
+}
+.filterItem {
+  position: relative;
+  display: inline-block;
+  float: left;
+  height: 40px;
+  line-height: 40px;
+  margin: 0 20px 20px 0;
+  margin-right: 29px !important;
+  span {
+    display: inline-block;
+    line-height: 32px;
+    position: relative;
+  }
+  input {
+    width: 120px;
+    height: 32px;
+    border-radius: 4px;
+    border: 1px solid #e2e5ef;
+    outline: none;
+    margin-right: 10px;
+    padding: 0 10px;
+    box-sizing: border-box;
+  }
+  input:focus {
+    border: 1px solid @activeColor;
+    outline: 0;
+    -webkit-box-shadow: @activeColor 0px 0px 2px;
+    -moz-box-shadow: @activeColor 0px 0px 2px;
+    box-shadow: @activeColor 0px 0px 2px;
+  }
+}
+
+.filterDropList {
+  position: absolute;
+  right: 0;
+  max-height: 200px;
+  overflow-y: auto;
+  background: #fff;
+  display: none;
+  border: 1px solid #e4e7ed;
+  box-shadow: 0 2px 12px 0 #e4e7ed;
+  z-index: 2;
+  li {
+    padding: 0 10px;
+  }
+}
+.deptList {
+  width: 120px;
+  max-height: 400px;
+}
+.modularList,
+.typeList,
+.qcCheckList {
+  width: 120px;
+  // height: 200px;
+  li:hover {
+    background-color: #eef4ff;
+    cursor: pointer;
+  }
+}
+
+.selectModular,
+.selectDept,
+.selectType,
+.qcSelectCheck {
+  display: inline-block;
+  position: relative;
+  width: 120px;
+  padding: 0 10px;
+  height: 32px;
+  border-radius: 4px;
+  border: 1px solid #e2e5ef;
+  box-sizing: border-box;
+  cursor: pointer;
+}
+.selectDept {
+  width: 120px;
+}
+
+.filter,
+.reset,
+.export {
+  display: inline-block;
+  width: 60px;
+  height: 32px;
+  background: @activeColor;
+  border-radius: 4px;
+  color: #fff;
+  text-align: center;
+  line-height: 32px;
+  position: relative;
+  top: 2px;
+  cursor: pointer;
+  float: left;
+  margin: 0 0px 22px 0;
+}
+.export {
+  height: 34px;
+
+  background: #fff;
+  border-radius: 4px;
+  color: #777;
+  border: 1px solid #777;
+  box-sizing: border-box;
+  cursor: pointer;
+  margin-left: 10px;
+  float: left;
+  top: 0px;
+}
+.arrow {
+  position: absolute;
+  width: 10px;
+  top: 12px;
+  right: 10px;
+}
+.iconCheck {
+  width: 14px;
+}
+.fl {
+  float: left;
+}
+.clearfix:after {
+  content: "";
+  height: 0;
+  line-height: 0;
+  display: block;
+  visibility: hidden;
+  clear: both;
+}
+.clearfix {
+  zoom: 1;
+}
+.divide {
+  margin: 0 10px;
+}
+.datapickerBox {
+  position: relative;
+  display: inline-block;
+  width: 120px;
+  height: 32px;
+  input {
+    position: absolute;
+  }
+}
+.setCol {
+  color: #777;
+  cursor: pointer;
+}
+.iconSetting {
+  width: 18px;
+  position: relative;
+  top: 3px;
+  margin: 0 3px 0 0;
+}
+.iconCalen {
+  position: absolute;
+  width: 15px;
+  top: 8px;
+  right: 10px;
+}
+.textCenter {
+  text-align: center;
+}
+.patientNameSpan {
+  color: @activeColor;
+  cursor: pointer;
+}
+
+.deptItem:hover {
+  background-color: #eef4ff;
+  cursor: pointer;
+}
+.ellipsis {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.unSelect {
+  color: #cfccd6;
+}
+
+.pagination {
+  margin: 35px 0 20px 0;
+  text-align: right;
+}
+.totalSum {
+  font-size: 12px;
+  line-height: 17px;
+  color: #777777;
+  margin-right: 20px;
+}
+.pageNum,
+.prePage,
+.nextPage,
+.more {
+  display: inline-block;
+  width: 20px;
+  cursor: pointer;
+  margin: 0 20px 0 0;
+  text-align: center;
+  color: #777;
+}
+.prePage,
+.nextPage {
+  img {
+    position: relative;
+    top: 0px;
+  }
+}
+.more {
+  cursor: not-allowed;
+}
+.arrowPage {
+  width: 6px;
+}
+.activePage {
+  color: @activeColor;
+}
+
+.ui-datepicker-calendar {
+  border: 0 none;
+  min-width: 0;
+}
+.ui-datepicker thead {
+  background-color: #fff;
+  color: #c3cbd6;
+}
+.ui-datepicker td {
+  padding: 0;
+  height: auto;
+  color: #657180;
+}
+.ui-datepicker td span,
+.ui-datepicker td a {
+  text-align: center;
+  height: 30px;
+  line-height: 30px;
+}
+
+.ui-state-default,
+.ui-widget-content .ui-state-default,
+.ui-widget-header .ui-state-default {
+  border: 0;
+  background-color: #fff;
+  &:hover {
+    background-color: #c4d8fe;
+  }
+}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year {
+  color: #333;
+  font-weight: normal;
+  height: 30px;
+  line-height: 30px;
+  margin: 0 5px;
+  width: 40%;
+  border-radius: 3px;
+}
+.ui-datepicker .ui-datepicker-prev,
+.ui-datepicker .ui-datepicker-next {
+  top: 5px;
+}
+.ui-state-active,
+.ui-widget-content .ui-state-active {
+  background-color: @activeColor !important;
+  color: #fff;
+}
+.ui-state-highlight,
+.ui-widget-content .ui-state-highlight {
+  background-color: #fff5bf !important;
+  color: #657180;
+}
+.ui-widget-header {
+  background-color: #fff;
+  border: 0 none;
+}
+
+input::-webkit-outer-spin-button,
+input::-webkit-inner-spin-button {
+  -webkit-appearance: none;
+}
+
+input[type="number"] {
+  -moz-appearance: textfield;
+}
+.tipIcon {
+  color: #777;
+  cursor: pointer;
+  display: inline-block;
+  margin-left: 6px;
+  margin-right: 2px;
+}
+.toolTipIcon {
+  width: 18px;
+  position: relative;
+  top: 3px;
+}
+
+.tooltip {
+  visibility: hidden;
+  position: relative;
+  padding: 7px 10px;
+  border-radius: 4px;
+  margin: 100px auto;
+  background-color: #4d4d4d;
+  text-align: center;
+  color: #fff;
+  font-size: 14px;
+}
+.tooltip:before {
+  content: "";
+  display: block;
+  position: absolute;
+  bottom: 9px;
+  left: -12px;
+  border-bottom: 6px solid transparent;
+  border-top: 6px solid transparent;
+  border-left: 6px solid transparent;
+  border-right: 6px solid #4d4d4d;
+}
+.modal .modal-box {
+  margin-top: -340px;
+  margin-left: -414px;
+}
+.mesgBox {
+  width: 688px;
+  height: 429px;
+  border: 1px solid #dee2e9;
+  padding: 0 13px;
+  h3 {
+    width: 100%;
+    height: 39px;
+    border-bottom: 1px solid #dee2e9;
+    text-align: center;
+    line-height: 39px;
+    color: #00a1ff;
+    font-size: 16px;
+  }
+  .news {
+    padding: 5px 0;
+    height: 337px;
+  }
+  .mesgBox-fot {
+    height: 39px;
+    line-height: 39px;
+    border-top: 1px solid #dee2e9;
+    & span {
+      width: 32%;
+      display: inline-block;
+    }
+  }
+}

+ 3 - 0
src/html/index.html

@@ -23,6 +23,9 @@
     {{else}}
         {{if showStatus==1}}
             <li class="page ${code}" code="${code}">${name}
+            {{if newsNumber }}
+            <span class="redNews">${newsNumber}</span>
+            {{/if}}
         {{/if}}
     {{/if}}
         {{/if}}

+ 82 - 0
src/html/messageNoti.html

@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>病历质控申诉发起</title>
+    <script type="text/html" id="editTmpl">
+        <div class="mesgBox">
+            <h3>待核查质控任务提醒</h3>
+            <div class="news">${news}</div>
+            <div class="mesgBox-fot">
+                <span>系统:${type == 1?'指控任务':''}</span>
+                <span>发送者:${senderName}</span>
+                <span>发送时间:${gmtCreate}</span>
+            </div>
+        </div>
+    </script>
+</head>
+
+<body>
+    <div class="container appealHistory">
+        <h2>消息通知</h2>
+        <div class="main-body">
+            <div class="filterBox">
+                <div class="clearfix">
+                    <span class="filterItem">
+                        <span>通知类型:</span>
+                        <span class="selectType">全部</span>
+                        <ul class="typeList filterDropList">
+                        </ul>
+                    </span>
+                    <span class="filterItem">
+                        <span>阅读状态状态:</span>
+                        <span class="qcSelectCheck">全部</span>
+                        <ul class="qcCheckList filterDropList">
+                        </ul>
+                    </span>
+                    <span class="filter">查询</span>
+                    <span class="filterclear abnormalClear filterclearT">重置</span>
+                </div>
+            </div>
+            <div class="overAuto">
+                <table class="qctable">
+                    <thead>
+                        <tr class="tabTitle">
+                            <th class="recordScoreOpera textCenter" style="width: 65px;">标题</th>
+                            <th class="beHospitalId textCenter">类型</th>
+                            <th class="patientNo textCenter">发送者</th>
+                            <th class="patientName textCenter" style="width: 100px;">发送时间</th>
+                            <th class="patientSex textCenter">阅读状态</th>
+                            <th class="patientage textCenter">操作</th>
+                        </tr>
+                    </thead>
+                    <tbody class="tbody">
+
+                    </tbody>
+                </table>
+            </div>
+            <div class="pagination"></div>
+        </div>
+
+        <div class="modal" id="delModal">
+            <div class="cover"></div>
+            <div class="modal-box">
+                <div class="modal-header clearfix">
+                    <span class="title">查看通知</span>
+                    <a class="close" href="javascript:void(0);">×</a>
+                </div>
+                <div class="modal-body">
+
+                </div>
+                <div class="modal-footer">
+                    <a class="confirm" href="javascript:void(0);">返回</a>
+                </div>
+            </div>
+        </div>
+    </div>
+</body>
+
+</html>

+ 5 - 0
src/js/api.js

@@ -229,6 +229,11 @@ const api = {
 
   getMedRecordOtherPage:'/qc/medRecordOther/getMedRecordOtherPage', //其他信息列表
   getMedRecordContentOther:'/qc/medRecordOther/getMedRecordContentOther', //文书内容展示
+
+  newsNoticePage:'/medNewsNotice/newsNoticePage', //消息通知列表
+  getNewsCount:'/medNewsNotice/getNewsCount', //消息数量
+  getNewsDropDownBox:'/medNewsNotice/getNewsDropDownBox', //消息通知-获取通知类型、阅读状态下拉框内容
+  getNewsNoticeInfoById:'/medNewsNotice/getNewsNoticeInfoById',//消息通知详情
 }
 const ywCheckApi = {
   addMedCheckInfo: '/qc/medCheckInfo/addMedCheckInfo',   //核查

+ 27 - 5
src/js/index.js

@@ -34,7 +34,7 @@ const is3His = getUrlArgObject('is3His')
 //token判断没有跳登录
 const token = localStorage.getItem('accessToken');
 const onAppeal = getCookie('checkAuth') && getCookie('checkAuth').indexOf('10')
-let auditNumber;
+let auditNumber, newsNumber;
 if (!token || localStorage.getItem('toLogin') === '1') {
   window.location.href = '../login.html';
 }
@@ -107,11 +107,13 @@ $(function () {
     $(this).find('.qiehuan i').html('切换病案质控')
     $('.subtitle').html('AI运行质控平台')
     getAuditNumber()
+    getNewsCount()
     getMenu()
   } else if (isPlacefile == 1) {
     $(this).find('.qiehuan i').html('切换运行质控')
     $('.subtitle').html('AI病案质控平台')
     getAuditNumber()
+    getNewsCount()
     getMenu()
   }
   $(".header .title .qiehuan").click(function () {
@@ -127,6 +129,7 @@ $(function () {
     }
     $('#contentIframe').attr('src', $('#contentIframe').attr('src'));
     getAuditNumber()
+    getNewsCount()
     getMenu();
   })
   $(".header .title .qiehuan").mouseenter(function () {
@@ -337,7 +340,7 @@ window.userActionHide = userActionHide
 function getAuditNumber() {
   isPlacefile = getCookie('isPlacefile') || 1
   return post(api.getAuditNumber, {
-    analyzeType:isPlacefile
+    analyzeType: isPlacefile
   }).then(res => {
     if (res.data.code == '0') {
       auditNumber = res.data.data > 99 ? '99+' : res.data.data
@@ -353,6 +356,23 @@ function getAuditNumber() {
 
   })
 }
+//获取消息通知数量
+function getNewsCount() {
+  return post(api.getNewsCount).then(res => {
+    if (res.data.code == '0') {
+      newsNumber = res.data.data.count > 99 ? '99+' : res.data.data.count
+    } else {
+      const token = localStorage.getItem('accessToken');
+      if (!token && window.location.href.indexOf('login') == -1) {
+        //alert('无token判断,跳回登录')
+      } else {
+        $.alerModal({ "message": res.data.msg, type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
+      }
+    }
+  }).catch((e) => {
+
+  })
+}
 function initMenu(data, userInfo) {
   //菜单数据填充
   $(".menu ul").html("");
@@ -444,7 +464,7 @@ function getOwnDept() {
     if (data.code == 0) {
       let result = data.data
       setCookie("deptList", JSON.stringify(result))
-      JSON.parse(localStorage.setItem('deptList',JSON.stringify(result)))
+      JSON.parse(localStorage.setItem('deptList', JSON.stringify(result)))
     }
   })
   // }
@@ -476,8 +496,10 @@ function getMenu() {
             }
           }
         }
+        if (data.menuWrappers[i].code === 'YH-XXTZ') {
+          data.menuWrappers[i].newsNumber = newsNumber
+        }
       }
-      
       initMenu(data.menuWrappers, data.userLoginDTO);
       userInfo = data.userLoginDTO
       setCookie("hospital", data.basHospitalInfoDTO.name)
@@ -487,7 +509,7 @@ function getMenu() {
         if (isPlacefile === '0' && data.menuWrappers[i].code === 'YH-ZKHC') {
           $(".menuList .YH-ZKHC").hide()
           $(".menu-mini .YH-ZKHC").hide()
-          
+
         }
       }
     }

+ 307 - 0
src/js/messageNoti.js

@@ -0,0 +1,307 @@
+const $ = require('jquery');
+require("../css/messageNoti.less");
+require('jquery-templates');
+require('./modal.js');
+const { api } = require('./api.js')
+const { post, getCookie, emptyBox, listenScroll } = require('./utils.js')
+require('./../resource/jquery-ui/jquery-ui.min.js');
+require('./../resource/jquery-ui/jquery-ui.min.css');
+const iconDown = require("./../images/arrow_down.png")
+const iconUp = require("./../images/arrow_up.png")
+const arrowLeft = require("./../images/arrow_left.png")
+const arrowRight = require("./../images/arrow_right.png")
+listenScroll()
+$(".selectType").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+$(".qcSelectCheck").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+let status = "", type = "", page = 1, showNum = 0, newsNumber;
+$(".menu .page", parent.document).removeClass("active")
+$(parent.document).find(".menu .page[code=YH-XXTZ]").addClass("active")
+
+function getTabData(activePage) {
+    const param = {
+        current: activePage,
+        size: 15,
+        desc: ['gmtCreate'],
+        type: type,
+        status: status
+    }
+    $('.pagination').html("")
+    $('.tbody').html(emptyBox('努力加载中...', '',))
+    return post(api.newsNoticePage, param).then(res => {
+        if (res.data.code == '0') {
+            tabList = res.data.data.records
+            const totalPage = res.data.data.pages
+            const totalNum = res.data.data.total
+            renderTab(tabList)
+            renderPagination(totalPage, Number(activePage), totalNum)
+            if (totalPage > 1) {
+                renderPagination(totalPage, Number(activePage), totalNum)
+            } else {
+                $('.pagination').html("")
+            }
+        } else {
+            const token = localStorage.getItem('accessToken');
+            if (!token && window.location.href.indexOf('login') == -1) {
+                //alert('无token判断,跳回登录')
+            } else {
+                $.alerModal({ "message": res.data.msg, type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
+            }
+        }
+    }).catch((e) => {
+
+    })
+}
+function renderTab(data) {
+    let str = ``
+    if (data.length === 0) {
+        $('.tbody').html(emptyBox(null, showNum + 12))
+        return;
+    }
+    for (let i = 0; i < data.length; i++) {
+        const item = data[i]
+        str += `
+            <tr  data-index=${i} data-doc="${item.doctorName || ""}" >
+                <td class="textCenter">${item.title || "-"}</td>
+                <td class="textCenter">${item.type == 1 ? '质控任务' : '-'}</td>
+                <td class="textCenter">${item.senderName || '-'}</td>
+                <td class="textCenter">${item.gmtCreate || '-'}</td>
+                <td class="textCenter">${item.status == 0 ? '未读' : '已读'}</td>
+                <td class="textCenter" data-id="${item.id || ""}" data-status="${item.status || ""}">
+                    <span class="appealBtn goHomeDetail1">查看</span>
+                </td>
+            </tr>
+        `
+    }
+    $('.tbody').html(str)
+
+    $(".goHomeDetail1").click(function () {
+        let id = $(this).parent().attr("data-id")
+        let status = $(this).parent().attr("data-status")
+        getNewsNoticeInfoById(id, status)
+
+    })
+}
+function getNewsNoticeInfoById(id, status) {
+    return post(api.getNewsNoticeInfoById, { id: id, status: status }).then(res => {
+        if (res.data.code == '0') {
+            const data = res.data.data
+            $("#delModal").show();
+            $(".modal-body").html('');
+            $("#editTmpl").tmpl(data).appendTo("#delModal .modal-body");
+            $("#delModal .confirm").unbind("click").click(function () {
+                $("#delModal").hide();
+                getTabData(page)
+                getNewsCount()
+            });
+        } else {
+            const token = localStorage.getItem('accessToken');
+            if (!token && window.location.href.indexOf('login') == -1) {
+                //alert('无token判断,跳回登录')
+            } else {
+                $.alerModal({ "message": res.data.msg, type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
+            }
+        }
+    }).catch((e) => {
+
+    })
+}
+getNewsCount()
+//获取待审核数量
+function getNewsCount() {
+    return post(api.getNewsCount).then(res => {
+        if (res.data.code == '0') {
+            newsNumber = res.data.data.count > 99 ? '99+' : res.data.data.count
+            if (newsNumber == 0) {
+                $(".menu .page", parent.document).children('.redNews').hide()  
+            } else {
+                $(".menu .page", parent.document).children('.redNews').html(newsNumber)  
+            }
+        } else {
+            const token = localStorage.getItem('accessToken');
+            if (!token && window.location.href.indexOf('login') == -1) {
+                //alert('无token判断,跳回登录')
+            } else {
+                $.alerModal({ "message": res.data.msg, type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
+            }
+        }
+    }).catch((e) => {
+
+    })
+}
+
+$(".filter").on("click", function (e) {
+    getTabData(1)
+})
+
+$(".abnormalClear").on("click", function (e) {
+    status = ""
+    type = ""
+    $('.selectType').html('全部')
+    $(".typeList ").css("display", "none")
+    $(".selectType").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+    $('.qcSelectCheck').html('全部')
+    $(".qcCheckList").css("display", "none")
+    $(".qcSelectCheck").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+    $("th[code]").removeClass("asc desc")
+    getTabData(1)
+})
+
+//操作类型
+$('.selectType').on("click", function (e) {
+    e.stopPropagation()
+    $(".qcSelectCheck .arrow").attr("src", iconDown)
+    $(".qcCheckList").css("display", "none")
+    const showList = $(".typeList ").css("display")
+    if (showList == "none" || !showList) {
+        $(".typeList ").css("display", "block")
+        $(".selectType .arrow").attr("src", iconUp)
+    } else {
+        $(".typeList ").css("display", "none")
+        $(".selectType .arrow").attr("src", iconDown)
+    }
+})
+//选择状态
+$('.qcSelectCheck').on("click", function (e) {
+    e.stopPropagation()
+    $(".selectType .arrow").attr("src", iconDown)
+    $(".typeList").css("display", "none")
+    const showList = $(".qcCheckList ").css("display")
+    if (showList == "none" || !showList) {
+        $(".qcCheckList ").css("display", "block")
+        $(".qcSelectCheck .arrow").attr("src", iconUp)
+    } else {
+        $(".qcCheckList ").css("display", "none")
+        $(".qcSelectCheck .arrow").attr("src", iconDown)
+    }
+})
+getNewsDropDownBox()
+//获取操作类型
+function getNewsDropDownBox() {
+    post(api.getNewsDropDownBox).then(res => {
+        if (res.data.code == '0') {
+            const typeList = res.data.data.newsType
+            const statusList = res.data.data.newsStatus
+            renderTypeList(typeList)
+            renderStatusList(statusList)
+        } else { }
+    }).catch((e) => {
+
+    })
+}
+function renderTypeList(data) {
+    let str = ``
+    for (var i in data) {
+        console.log(i);
+        str += `<li class="typeItem ellipsis" data-id=${data[i].val} data-name=${data[i].name}> ${data[i].name}</li>`
+    }
+    $('.typeList').html(str)
+    bindTypedSelect()
+}
+//通知类型选择
+function bindTypedSelect() {
+    $('.typeItem').on("click", function () {
+        const typeItemName = $(this).attr("data-name")
+        const typeItemItemId = $(this).attr("data-id")
+        type = typeItemItemId
+        $('.selectType').html(typeItemName)
+        $(".typeList").css("display", "none")
+        $(".selectType").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+        $('.selectType').removeClass('unSelect')
+    })
+}
+function renderStatusList(data) {
+    let str = ``
+    for (var i in data) {
+        str += `<li class="qcCheckItem ellipsis" data-id=${data[i].val}  data-name=${data[i].name}> ${data[i].name}</li>`
+    }
+    $('.qcCheckList').html(str)
+    bindCheckedSelectQc()
+}
+//状态
+function bindCheckedSelectQc() {
+    $('.qcCheckItem').on("click", function () {
+        const qcCheckItemName = $(this).attr("data-name")
+        const qcCheckItemItemId = $(this).attr("data-id") || ""
+        status = qcCheckItemItemId
+        $('.qcSelectCheck').html(qcCheckItemName)
+        $(".qcCheckList").css("display", "none")
+        $(".qcSelectCheck").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+        $('.qcSelectCheck').removeClass('unSelect')
+    })
+}
+
+$(function () {
+    getTabData(page)
+});
+//分页渲染
+function renderPagination(totalPage, activePage, totalNum) {
+    let str = `<span class="totalSum">共${totalPage}页/${totalNum}条数据</span><span class="prePage"><img class="arrowPage" src=${arrowLeft} /></span>`
+    if (totalPage <= 6) {
+        for (let i = 1; i <= totalPage; i++) {
+
+            str += `<span class="pageNum ${'page' + i}" data-page=${i}>${i}</span>`
+        }
+    } else {
+        if (activePage <= 3) { //选中页数小于4
+            for (let i = 1; i <= 4; i++) {
+                str += `<span class="pageNum ${'page' + i}" data-page=${i}>${i}</span>`
+            }
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page' + totalPage}" data-page=${totalPage}>${totalPage}</span>`
+
+        } else if (activePage > totalPage - 3) {
+            str += `<span class="pageNum page1" data-page=1>1</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page' + (totalPage - 3)}" data-page=${totalPage - 3}>${totalPage - 3}</span>`
+            str += `<span class="pageNum ${'page' + (totalPage - 2)}" data-page=${totalPage - 2}>${totalPage - 2}</span>`
+            str += `<span class="pageNum ${'page' + (totalPage - 1)}" data-page=${totalPage - 1}>${totalPage - 1}</span>`
+            str += `<span class="pageNum ${'page' + totalPage}" data-page=${totalPage}>${totalPage}</span>`
+        } else {
+            str += `<span class="pageNum page1" data-page=1>1</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page' + (activePage - 1)}" data-page=${activePage - 1}>${activePage - 1}</span>`
+            str += `<span class="pageNum ${'page' + activePage}" data-page=${activePage}>${activePage}</span>`
+            str += `<span class="pageNum ${'page' + (activePage + 1)}" data-page=${activePage + 1}>${activePage + 1}</span>`
+            str += `<span class="more" >...</span>`
+            str += `<span class="pageNum ${'page' + totalPage}" data-page=${totalPage}>${totalPage}</span>`
+        }
+
+    }
+    str += `<span class="nextPage"><img class="arrowPage" src=${arrowRight} /></span>`
+    $('.pagination').html(str)
+    $('.page' + activePage).addClass('activePage')
+    $(".pageNum").on("click", function (e) {
+        const activePageNow = Number($(this).attr('data-page'))
+        page = activePageNow
+        getTabData(activePageNow)
+        // renderPagination(totalPage,activePageNow,totalNum)
+    })
+    $(".prePage").on("click", function (e) {
+        let activePageNow = Number($(".activePage").attr('data-page'))
+        page = activePageNow
+        if (activePageNow > 1) {
+            activePageNow--
+            getTabData(activePageNow)
+            // renderPagination(totalPage,activePageNow,totalNum)
+        }
+    })
+    $(".nextPage").on("click", function (e) {
+        let activePageNow = Number($(".activePage").attr('data-page'))
+        page = activePageNow
+        if (activePageNow < totalPage) {
+            activePageNow++
+            getTabData(activePageNow)
+            // renderPagination(totalPage,activePageNow,totalNum)
+        }
+    })
+
+}
+
+$(document).on("click", function () {
+    $(".selectType .arrow").attr("src", iconDown)
+    $(".typeList").css("display", "none")
+    $(".qcSelectCheck .arrow").attr("src", iconDown)
+    $(".qcCheckList").css("display", "none")
+})
+
+

+ 2 - 0
src/js/utils.js

@@ -77,6 +77,8 @@ const pageMap = {
   "YH-SSXX-SSJL": 'appealHistory.html', //申诉记录
   "YH-SSXX-SSSH": 'appealCheck.html', //申诉审核
   "YH-SSXX-SSFQ": 'appealInit.html', //申诉发起列表
+
+  "YH-XXTZ": 'messageNoti.html', //申诉发起列表
 };
 
 //导出时间天数

+ 15 - 0
webpack.configCopy.jsx

@@ -68,6 +68,7 @@ module.exports = {
     mentCenter:path.resolve(__dirname, 'src/js', 'mentCenter.js'),
     test:path.resolve(__dirname, 'src/js/dept', 'test.js'),
     partDetailControlDept:path.resolve(__dirname, 'src/js/dept', 'partDetailControlDept.js'),
+    messageNoti:path.resolve(__dirname, 'src/js/dept', 'messageNoti.js'),
     vendor: 'lodash',  //多个页面所需的公共库文件,防止重复打包带入
   },
   output: {
@@ -119,6 +120,20 @@ module.exports = {
         collapseWhitespace: true //删除空白符与换行符
       }
     }),
+    new HtmlWebpackPlugin({
+      title: 'messageNoti',
+      template: path.resolve(__dirname, 'src/html/dept', 'messageNoti.html'),
+      filename: 'messageNoti.html',
+      chunks: ['messageNoti', 'vendor', 'common'],
+      hash: true, //防止缓存
+      inject: true,
+      minify: {
+        removeAttributeQuotes: true, //压缩 去掉引号
+        removeComments: true, //移除HTML中的注释
+        collapseWhitespace: true //删除空白符与换行符
+      }
+    }),
+    
     new HtmlWebpackPlugin({
       title: 'nursing',
       template: path.resolve(__dirname, 'src/html', 'nursing.html'),