|
@@ -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()
|