|
@@ -5,19 +5,11 @@ const {api} = require('../api.js')
|
|
|
const {post,getCookie,getLocal,getUrlArgObjectNew,emptyBox,downloadExportedData,expJson,getLogoParam,focusMenuItem,listenScroll,exportTimeLimit} = require('../utils.js')
|
|
|
require('../../resource/jquery-ui/jquery-ui.min.js');
|
|
|
require('../../resource/jquery-ui/jquery-ui.min.css');
|
|
|
-const iconCheck= require("../../images/icon_check.png")
|
|
|
-const iconUnCheck = require("../../images/icon_unchecked.png")
|
|
|
-const iconCalenBlue= require("../../images/icon_calen_blue.png")
|
|
|
-const iconCalenGrey= require("../../images/icon_calen_grey.png")
|
|
|
const iconDown= require("../../images/arrow_down.png")
|
|
|
const iconUp = require("../../images/arrow_up.png")
|
|
|
const loadingImg = require("../../images/loading.gif")
|
|
|
const arrowLeft= require("../../images/arrow_left.png")
|
|
|
const arrowRight = require("../../images/arrow_right.png")
|
|
|
-const goUpG= require("../../images/arrow_up_grey.png")
|
|
|
-const goUpB = require("../../images/arrow_up_blue.png")
|
|
|
-const goDownG= require("../../images/arrow_down_grey.png")
|
|
|
-const goDownB = require("../../images/arrow_down_blue.png")
|
|
|
let isPlacefile = getCookie('isPlacefile')||1
|
|
|
|
|
|
let srcUrl = $("#contentIframe",parent.document).attr("src")
|
|
@@ -30,7 +22,6 @@ let typeMark= getUrlArgObjectNew("typeMark",srcUrl)||""; //0-总数量,1
|
|
|
let defectName = getUrlArgObjectNew("defectName",srcUrl)||"";
|
|
|
let casesId = getUrlArgObjectNew("casesId",srcUrl)||"";
|
|
|
let deptListDept = JSON.parse(getCookie("deptList"))||[]
|
|
|
-let isInspection = getUrlArgObjectNew("isInspection", srcUrl) || ""
|
|
|
let doctorNameUrl = getUrlArgObjectNew("doctorName", srcUrl) || ""
|
|
|
let currentPage;
|
|
|
deptNameTemp = docName = doctorNameUrl
|
|
@@ -56,17 +47,8 @@ $(function() {
|
|
|
if(isPlacefile != 1){
|
|
|
data_desc="behospitalDate"
|
|
|
}
|
|
|
- $(".export").css('display','none')
|
|
|
$(".partTitle .titlePic ").html(`<a class="consoleP" href="improveStatistics.html">条目缺陷改善统计 / </a>病历列表`)
|
|
|
|
|
|
-
|
|
|
- $(".partTitle .consoleD").click(function(){
|
|
|
- //初始菜单选中
|
|
|
- focusMenuItem(from==2?'YH-KZTKS':'YH-KZT')
|
|
|
- $(".container",parent.document).addClass("console-cont");
|
|
|
- })
|
|
|
- $('.recordScoreBtn').css("opacity",hasData('FUNC000017')?'1':'0.5')
|
|
|
-
|
|
|
$("#filterToggler").click(function(){
|
|
|
const text = $(this).text();
|
|
|
$(".toggle-item").slideToggle();
|
|
@@ -128,9 +110,8 @@ $(function() {
|
|
|
if(deptName == ""){
|
|
|
$(".selectDept").attr({'title':"全部",'data-id':''}).val("全部")
|
|
|
}
|
|
|
-
|
|
|
getTabData(1)
|
|
|
- })
|
|
|
+ });
|
|
|
//重置
|
|
|
$(".abnormalClear").on("click", function(e){
|
|
|
tabList = [];
|
|
@@ -140,8 +121,6 @@ $(function() {
|
|
|
nameTemp = "";
|
|
|
behospitalCodeTemp="";
|
|
|
levelTemp="";
|
|
|
- deptId="";
|
|
|
- deptName="";
|
|
|
deptNameTemp="";
|
|
|
deptIdTemp="";
|
|
|
doctorName=doctorNameUrl=deptNameTemp="";;
|
|
@@ -153,35 +132,47 @@ $(function() {
|
|
|
data_desc="behospitalDate"
|
|
|
}
|
|
|
data_asc="";
|
|
|
- if(from == 2){
|
|
|
- deptId=deptListDept[0]&&deptListDept[0].deptId;
|
|
|
- deptName=deptListDept[0]&&deptListDept[0].deptName;
|
|
|
- deptNameTemp=deptListDept[0]&&deptListDept[0].deptName;
|
|
|
- deptIdTemp=deptListDept[0]&&deptListDept[0].deptId;
|
|
|
- }
|
|
|
$('.patientNumInp').val('')
|
|
|
$('.patientNameInp').val('')
|
|
|
$('.doctorInp').val('')
|
|
|
$('.doctorNumInp').val('')
|
|
|
|
|
|
- if(from == 2){
|
|
|
- $('.selectDept ').val(deptListDept[0].deptName)
|
|
|
- deptName = deptNameTemp = deptListDept[0].deptName
|
|
|
- } else if (from == 4 || from == 3){
|
|
|
- deptName = deptNameTemp = deptNamePram
|
|
|
- $('.selectDept').val(deptNamePram)
|
|
|
- $('.selectDept ').attr('title',deptNamePram)
|
|
|
- $(".deptList").css("display", "none")
|
|
|
- }else{
|
|
|
- $('.selectDept ').val('全部')
|
|
|
- }
|
|
|
+ deptId = deptIdTemp = deptIdPram
|
|
|
+ deptName = deptNameTemp = deptNamePram
|
|
|
+ $('.selectDept').val(deptNamePram)
|
|
|
+ $('.selectDept ').attr('title',deptNamePram)
|
|
|
$(".deptList").css("display", "none")
|
|
|
+
|
|
|
$('.selectLevel').html('全部')
|
|
|
$(".levelList").css("display", "none")
|
|
|
$(".selectLevel").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
$("th[code]").removeClass("asc desc")
|
|
|
getTabData(1)
|
|
|
})
|
|
|
+ //导出事件
|
|
|
+ $('.export').click(function(){
|
|
|
+ let param = {
|
|
|
+ behospitalCode: behospitalCode, //病历号
|
|
|
+ typeMark:typeMark, // 0-总数量,1-已改善数量,2-待改善数量
|
|
|
+ patName: name, //病人姓名
|
|
|
+ entryName: defectName, //缺陷条目名称
|
|
|
+ entryId:casesId, //缺陷条目id
|
|
|
+ deptId: deptId||"", //科室id
|
|
|
+ deptName: deptName == "全部" ? "":deptName||"", //科室名称
|
|
|
+ doctorId: doctorNum, //医生id
|
|
|
+ doctorName: doctorNameUrl, //医生姓名
|
|
|
+ level:level,//病历等级
|
|
|
+ startDate: startDateParam, //选择日期--开始时间
|
|
|
+ endDate: endDateParam, //选择日期--结束时间
|
|
|
+ current:1, //页码
|
|
|
+ asc:data_asc, //升序
|
|
|
+ desc:data_desc, //降序
|
|
|
+ size: 500, //每页显示条数
|
|
|
+ };
|
|
|
+ expJson(api.getDefectImproveInnerByExport , param).then(res => {
|
|
|
+ downloadExportedData(res.data, '条目缺陷改善统计详情'+startDateParam.substr(0,10).replace(/\//g,'')+"-"+endDateParam.substr(0,10).replace(/\//g,'') + ".xls")
|
|
|
+ })
|
|
|
+ })
|
|
|
});
|
|
|
|
|
|
//判断有无某一权限
|
|
@@ -217,7 +208,6 @@ function getTabData(activePage){
|
|
|
}
|
|
|
$('.pagination').html("")
|
|
|
$('.tbody').html(emptyBox('努力加载中...','',1))
|
|
|
- // return post(from==2?api.qcResultShortByDeptPage:api.qcResultDefectList,param).then(res =>{
|
|
|
return post(api.getEntryDefectImproveInner,param).then(res =>{
|
|
|
if(res.data.code == '0'){
|
|
|
const data = res.data.data;
|
|
@@ -227,11 +217,6 @@ function getTabData(activePage){
|
|
|
currentPage = activePage
|
|
|
renderTab(tabList,data.hospitalId);
|
|
|
renderPagination(totalPage,Number(activePage),totalNum)
|
|
|
- if(totalPage > 1){
|
|
|
- renderPagination(totalPage,Number(activePage),totalNum)
|
|
|
- } else{
|
|
|
- $('.pagination').html("")
|
|
|
- }
|
|
|
}else{
|
|
|
$.alerModal({"message":res.data.msg,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
}
|
|
@@ -239,7 +224,19 @@ function getTabData(activePage){
|
|
|
console.log(999)
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+function getFilterParam(current){
|
|
|
+ const param = {
|
|
|
+ "isPlacefile":isPlacefile,
|
|
|
+ "deptId": deptName=="全部"?"":deptId||"", //科室id
|
|
|
+ "deptName": deptName=="全部"?"":deptName||"",
|
|
|
+ "asc":data_asc, //升序
|
|
|
+ "desc":data_desc, //降序
|
|
|
+ "startDate":startDateParam,
|
|
|
+ "endDate":endDateParam,
|
|
|
+ current
|
|
|
+ }
|
|
|
+ return param;
|
|
|
+}
|
|
|
function renderTab(data,hisId){
|
|
|
let str = ``
|
|
|
if(data.length===0){
|
|
@@ -264,32 +261,6 @@ function renderTab(data,hisId){
|
|
|
$('.tbody').html(str)
|
|
|
}
|
|
|
|
|
|
-function isTextCenter(name){
|
|
|
- const textCenterList = ['level', 'scoreRes', 'sex','age', 'behospitalDate', 'leaveHospitalDate', 'placefileDate', 'gradeTime','checkStatus','mrStatus','mrTime','chTime','chName','mrName','diagnose','behDoctorName','directorDoctorName','doctorName','name']
|
|
|
- return textCenterList.findIndex(item=> item==name) > -1
|
|
|
-}
|
|
|
-
|
|
|
-function scoreDetail(id,age,hid,code,name){
|
|
|
- const logoParam = getLogoParam();
|
|
|
- window.open(`./qcScore.html?id=${id}&age=${age}&name=${name}&hid=${getCookie('hospitalid')}&code=${code}`+logoParam)
|
|
|
-}
|
|
|
-function bindScoreDetail(hisId){
|
|
|
- $('.patientNameSpan').on('click',function(e){
|
|
|
- const index = $(this).attr("data-index")
|
|
|
- const id = tabList[index].behospitalCode
|
|
|
- const age = tabList[index].age;
|
|
|
- const noScore = tabList[index].level == '未评分'
|
|
|
- const checkStatus = tabList[index].checkStatus
|
|
|
- if(noScore){
|
|
|
- $.alerModal({"message":'请先进行评分!',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
- return
|
|
|
- } else{
|
|
|
- scoreDetail(id,age,hisId,'YH-BLZK-ZKPF',tabList[index].name)
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
//选择病历等级
|
|
|
$('.selectLevel').on("click", function(e){
|
|
|
e.stopPropagation()
|
|
@@ -322,22 +293,6 @@ function bindLeveldSelect(){
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-function bindOperaAll(){
|
|
|
- $('.scoreOpera').on("click", function(e){
|
|
|
- const hasSelectAll = $('.scoreOpera').attr("data-selectall")
|
|
|
- if(hasSelectAll == 'true'){
|
|
|
-
|
|
|
- for(let i = 0; i < tabList.length; i++){
|
|
|
- tabList[i].hasSelect = false
|
|
|
- }
|
|
|
- }else{
|
|
|
- for(let i = 0; i < tabList.length; i++){
|
|
|
- tabList[i].hasSelect = true
|
|
|
- }
|
|
|
- }
|
|
|
- renderTab(tabList)
|
|
|
- })
|
|
|
-}
|
|
|
|
|
|
function loading(){
|
|
|
const str = `
|
|
@@ -411,30 +366,4 @@ function renderPagination(totalPage,activePage,totalNum){
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-}
|
|
|
-
|
|
|
-$(function($){
|
|
|
- $('.export').click(function(){
|
|
|
- let param = {
|
|
|
- behospitalCode: behospitalCode,
|
|
|
- patName: name, //病人姓名
|
|
|
- level:level,//病历等级
|
|
|
- deptName: deptName == "全部" ? "":deptName||"",
|
|
|
- doctorName: doctorName,
|
|
|
- doctorId: doctorNum,
|
|
|
- startDate: behosDateStart, //出院日期--开始时间
|
|
|
- endDate: behosDateEnd, //出院日期--结束时间
|
|
|
- casesEntryName: casesEntryName,
|
|
|
- isPlacefile:isPlacefile,
|
|
|
- casesEntryId:casesId,
|
|
|
- ascs:data_asc, //升序
|
|
|
- descs:data_desc, //降序
|
|
|
- }
|
|
|
- if (isInspection) {
|
|
|
- param = { ...param, casesEntryName: ''}
|
|
|
- }
|
|
|
- expJson(!isInspection ? api.unModifyMRPageExport : api.medicalCheckInnerExport , param).then(res => {
|
|
|
- downloadExportedData(res.data, $(".partTitle").text() + ".xls")
|
|
|
- })
|
|
|
- })
|
|
|
-});
|
|
|
+}
|