luolei 5 years ago
parent
commit
3f947922db
8 changed files with 201 additions and 34 deletions
  1. 1 1
      src/css/abnormal.less
  2. 65 0
      src/css/index.less
  3. 1 1
      src/html/abnormal.html
  4. BIN
      src/images/neck.png
  5. 130 31
      src/js/abnormal.js
  6. 2 0
      src/js/api.js
  7. 1 0
      src/js/index.js
  8. 1 1
      src/js/utils.js

+ 1 - 1
src/css/abnormal.less

@@ -168,7 +168,7 @@
     }
     .levelList{
         width: 120px;
-        height: 120px;
+        max-height: 120px;
         li:hover{
             background-color: #EEF4FF;
             cursor: pointer;

+ 65 - 0
src/css/index.less

@@ -387,6 +387,71 @@
       background: #fff;
       border-radius:4px;
     }
+    .remidifyMsgContent{
+      position: fixed;
+      left: 50%;
+      top: 50%;
+      width: 700px;
+      height:256px;
+      margin: -128px 0 0 -200px;
+      background: #fff;
+      border-radius:4px;
+      .disL {
+        float: left;
+      }
+      .disR {
+        float: left;
+      }
+      .abnormalTxtS {
+        width: 638px;
+        margin-left: 30px;
+        position: relative;
+        top: -14px;
+      }
+      .abnormalStatusLis {
+        width: 218px;
+        max-height: 200px;
+        overflow: auto;
+        li {
+          width: 218px;
+        }
+      }
+      .ellipsis {
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .abnormalAlls {
+        background-color: #f5f5f5;
+        padding: 0 10px;
+        box-sizing: border-box;
+        display: inline-block;
+        height: 34px;
+        line-height: 34px;
+        width: 220px;
+      }
+      .neck {
+        width: 20px;
+        position: relative;
+        left: 15px;
+        top: 25px;
+      }
+      .abnormalAll {
+        width: 220px !important;
+      }
+      .abnormalBtn {
+        top: -10px;
+      }
+      .abnormalLeft {
+        padding-left: 30px;
+        text-align: left;
+        width: auto !important;
+      }
+      .itemInfoRight {
+        display: block;
+        width: auto;
+      }
+    }
     .midifyMsgTitle{
       position: relative;
       height: 40px;

+ 1 - 1
src/html/abnormal.html

@@ -59,7 +59,7 @@
                     <th class="beHospitalId textCenter">创建时间</th>
                     <th class="beHospitalId textCenter">病人住院序号</th>
                     <th class="patientNo textCenter" >异常归属模块</th>
-                    <th class="patientName textCenter" style="width: 100px;">异常说明</th>
+                    <th class="patientName textCenter" style="width: 100px;">文书名称</th>
                     <th class="patientSex textCenter" >状态</th>
                     <th class="patientage textCenter" >备注</th>
                     <th class="patientage textCenter" style="width: 150px;">操作</th>

BIN
src/images/neck.png


+ 130 - 31
src/js/abnormal.js

@@ -125,8 +125,7 @@ function renderTab(data,hisId,activePage){
                 <td>${item.statusName || "-"}</td>
                 <td>${item.remark || "-"}</td>
                 <td  class="textCenter">
-                    <span data-index="${i}" data-type="1" class="patientNameSpan">修改</span>
-
+                    <span data-index="${i}" style="opacity:${item.type==1&&item.description==''?'0.4':'1'}" data-type="1" data-des="${item.description}" data-mol="${item.type}" class="patientNameSpan">修改</span>
                     <span data-index="${i}" data-type="2" class="patientNameSpan patientNameSpans">删除</span>
                 </td>
             </tr>
@@ -135,7 +134,26 @@ function renderTab(data,hisId,activePage){
     $('tbody').html(str?str:emptyBox())
     bindScoreDetail(hisId)
 }
-
+function getQcAnnormalMode(item,type,mol,des){
+    post(api.getQcAnnormalMode,{'description':des}).then(res =>{
+        if(res.data.code == '0'){
+            const data = res.data.data;
+            let tmpName=data.modeMame||'暂无'
+            let tmpid=data.modeId||''
+            let str = '',stic=`<li data-id="" title="" class="ellipsis">暂无</li>`;
+            for(let i = 0;i < data.qcModeDatas.length;i++){
+                let tmp = data.qcModeDatas[i]
+                str += `<li data-id="${tmp.id}" title="${tmp.name}" class="ellipsis">${tmp.name}</li>`
+            }
+                console.log(item,type,mol,des,stic+str,tmpName,tmpid)
+            midifyMsgBox(item,type,mol,des,stic+str,tmpName,tmpid)
+        }else{
+            console.log(res)
+        }
+    }).catch((err) =>{
+        console.log(err,11111)
+    })
+}
 function scoreDetail(id,age,hid,code){
     window.open(`./qcScore.html?id=${id}&age=${age}&hid=${hid}&code=${code}`)
 }
@@ -143,40 +161,81 @@ function bindScoreDetail(hisId){
     $('.patientNameSpan').on('click',function(e){
         const index = $(this).attr("data-index")
         const type = $(this).attr("data-type")
+        const mol = $(this).attr("data-mol")
+        const des = $(this).attr("data-des")||''
         const item = tabList[index]
-        midifyMsgBox(item,type)
+        if(item.type==1&&item.description==''){
+            return
+        }
+        if(type == 1&&mol&&mol==1){
+            getQcAnnormalMode(item,type,mol,des)
+        }else{
+            midifyMsgBox(item,type,mol,des)
+        }
     })
 }
 
-function midifyMsgBox(item,type){
+function midifyMsgBox(item,type,mol,des,str,name,id){
     const itemCopy = JSON.parse(JSON.stringify(item))
     let msgBox = ''
-    if(type == 1){
-        msgBox = `<div class="midifyMsgBox">
-            <div class="mask"></div>
-            <div class="midifyMsgContent abnormal">
-                <p class="midifyMsgTitle">修改 <img class="iconClose" src=${require('./../images/icon_close_default.png')} alt="关闭" /></p>
-                <div class="itemMsgInfoBox">
-                    <span class="itemMsgLab abnormalLeft">状态:</span> 
-                    <span class="abnormalAll" data-status="${itemCopy.status}">${itemCopy.status == 0?"未处理":"已处理"}<img class="arrow" src=${iconDown} alt="下拉"></span>
-                    <ul class="abnormalStatusLis">
-                        <li data-status="0">未处理</li>
-                        <li data-status="1">已处理</li>
-                    </ul>
+    if(type == 1){//修改(数据模块/其他)
+        if(mol&&mol==1){
+            msgBox = `<div class="midifyMsgBox">
+                <div class="mask"></div>
+                <div class="midifyMsgContent abnormal remidifyMsgContent clearfix">
+                    <p class="midifyMsgTitle">修改 <img class="iconClose" src=${require('./../images/icon_close_default.png')} alt="关闭" /></p>
+                    <div class="itemMsgInfoBox disL">
+                        <span class="itemMsgLab abnormalLeft">文书名称:</span> 
+                        <span class="abnormalAlls">${des}</span>
+                    </div>
+                    <img class="fl neck" src="${require('../images/neck.png')}">
+                    <div class="itemMsgInfoBox disR">
+                        <span class="itemMsgLab abnormalLeft">数据模块:</span> 
+                        <span class="abnormalAll" data-id="${id}" title="${name}">${name}<img class="arrow" src=${iconDown} alt="下拉"></span>
+                        <ul class="abnormalStatusLis">
+                            ${str}
+                        </ul>
+                    </div>
+                    <div style="clear:both"></div>
+                    <div class="itemMsgInfoBox disT">
+                        <span class="itemMsgLab abnormalLeft abnormalMark abnormalMarkL">备注:</span> 
+                        <div class="itemInfoRight">
+                            <textarea class="abnormalTxt abnormalTxtS" placeholder="请输入内容" >${itemCopy.remark}</textarea>
+                        </div>
+                    </div>
+                    <div  class="itemMsgInfoTips">支持≥0的数字输入,最多保留小数点后1位~</div>
+                    <div class="midifyMsgBtn abnormalBtn">
+                        <span class="midifyEdit">保存</span>
+                    </div>
                 </div>
-                <div class="itemMsgInfoBox">
-                    <span class="itemMsgLab abnormalLeft abnormalMark">备注:</span> 
-                    <span class="itemInfoRight"> 
-                        <textarea class="abnormalTxt" placeholder="请输入内容" >${itemCopy.remark}</textarea>
-                    </span>
-                </div>
-                <div  class="itemMsgInfoTips">支持≥0的数字输入,最多保留小数点后1位~</div>
-                <div class="midifyMsgBtn abnormalBtn">
-                    <span class="midifyEdit">保存</span>
+            </div>`
+        }else{
+            msgBox = `<div class="midifyMsgBox">
+                <div class="mask"></div>
+                <div class="midifyMsgContent abnormal">
+                    <p class="midifyMsgTitle">修改 <img class="iconClose" src=${require('./../images/icon_close_default.png')} alt="关闭" /></p>
+                    <div class="itemMsgInfoBox">
+                        <span class="itemMsgLab abnormalLeft">状态:</span> 
+                        <span class="abnormalAll" data-status="${itemCopy.status}">${itemCopy.status == 0?"未处理":"已处理"}<img class="arrow" src=${iconDown} alt="下拉"></span>
+                        <ul class="abnormalStatusLis">
+                            <li data-status="0">未处理</li>
+                            <li data-status="1">已处理</li>
+                        </ul>
+                    </div>
+                    <div class="itemMsgInfoBox">
+                        <span class="itemMsgLab abnormalLeft abnormalMark">备注:</span> 
+                        <span class="itemInfoRight"> 
+                            <textarea class="abnormalTxt" placeholder="请输入内容" >${itemCopy.remark}</textarea>
+                        </span>
+                    </div>
+                    <div  class="itemMsgInfoTips">支持≥0的数字输入,最多保留小数点后1位~</div>
+                    <div class="midifyMsgBtn abnormalBtn">
+                        <span class="midifyEdit">保存</span>
+                    </div>
                 </div>
-            </div>
-        </div>`
-    }else{
+            </div>`
+        }
+    }else{//删除
         msgBox = `<div class="midifyMsgBox">
             <div class="mask"></div>
             <div class="midifyMsgContent midifyMsgContentDel">
@@ -200,8 +259,14 @@ function midifyMsgBox(item,type){
     })
     $(".abnormalStatusLis li", parent.document).on("click",function(){
         let status = $(this).attr("data-status")
+        let id = $(this).attr("data-id")
+        let title = $(this).attr("title")
         let str = $(this).html()
-        $(".abnormalAll", parent.document).attr("data-status",status).html(str+`<img class="arrow" src=${iconDown} alt="下拉"></img>`)
+        $(".abnormalAll", parent.document).attr({
+            "data-status":status,
+            "data-id":id,
+            "title":title
+        }).html(str+`<img class="arrow" src=${iconDown} alt="下拉"></img>`)
         $(".abnormalStatusLis", parent.document).slideToggle()
     })
     $("#mainBox .midifyMsgBox .iconClose", parent.document).on("click", function(e){
@@ -215,7 +280,12 @@ function midifyMsgBox(item,type){
        itemCopy.score = val
     })
     $("#mainBox .midifyMsgBox .midifyEdit", parent.document).on("click", function(e){
-        saveModifyOne(itemCopy)
+        if(itemCopy.type==1){
+            console.log(itemCopy)
+            saveModifyTwo(itemCopy,des)
+        }else{
+            saveModifyOne(itemCopy)
+        }
     })
 }
 //保存修改
@@ -258,6 +328,35 @@ function saveModifyOne(itemCopy){
     
     })
 }
+//保存修改,数据模块
+function saveModifyTwo(itemCopy,des){
+    let txt = $(".abnormalTxt", parent.document).val()
+    let id = $(".abnormalAll", parent.document).attr("data-id")
+    let name = $(".abnormalAll", parent.document).attr("title")
+    let param = {
+        "hospitalId": getCookie("hospitalid"),
+        "hospitalModelName": des,
+        "qcAbnormalName": {
+          "description": des,
+          "remark": txt,
+          "status": itemCopy.status
+        },
+        "standModelId": id||'',
+        "standModelName": name?(name=="暂无"?'':name):''
+      }
+    post(api.saveAndupdataModel,param).then(res =>{
+        if(res.data.code == '0'){
+            const data = res.data.data;
+            getTabData(1)
+            $("#mainBox .midifyMsgBox", parent.document).remove()
+            $.alerModal({"message":'修改成功',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+        }else{
+            
+        }
+    }).catch((e) =>{
+    
+    })
+}
 //选择病历等级
 $('.selectLevel').on("click", function(e){
     e.stopPropagation()

+ 2 - 0
src/js/api.js

@@ -75,6 +75,8 @@ const api = {
     saveOrUpdate:'/qc/qcType/saveOrUpdate',//质控类型新增更新修改
     typeDelete:'/qc/qcType/delete',//质控类型删除
     typeGetById:'/qc/qcType/getById',//根据id返回
+    getQcAnnormalMode:'/qc/abnormal/getQcAnnormalMode',//异常修改
+    saveAndupdataModel:'/qc/modelHospital/saveAndupdataModel',//异常保存
 }
 module.exports = {
     api

+ 1 - 0
src/js/index.js

@@ -130,6 +130,7 @@ function getMenu(){
       initMenu(data.menuWrappers,data.userLoginDTO);
       userInfo = data.userLoginDTO
       setCookie("hospital",data.basHospitalInfoDTO.name)
+      setCookie("hospitalid",data.basHospitalInfoDTO.id)
       getAllCode(data.menuWrappers);
     }
   });

+ 1 - 1
src/js/utils.js

@@ -1,7 +1,7 @@
 const qs = require('qs');
 const $ = require("jquery");
 var Utils = require('./rePromise');
-const baseUrl = "http://192.168.2.241:5858"
+const baseUrl = "http://192.168.2.236:5858"
 //页面映射
 const pageMap={
   'YH-KZT':'console.html',