|
@@ -1,135 +1,152 @@
|
|
|
require('../mock')
|
|
|
const $ = require('jquery');
|
|
|
// require("../css/partDetailControl.less");
|
|
|
-require("../../css/dept/useStatisticsDept.less");
|
|
|
+require("../../css/dataAnalysis/improveStatistics.less");
|
|
|
|
|
|
require('../modal.js');
|
|
|
const {api} = require('../api.js')
|
|
|
const {post,getCookie,getLocal,getUrlArgObjectNew,emptyBox,setTitleTxt,setDatePicker,getPickerDate,downloadExportedData,expJson,initScroll,listenScroll} = 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 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 arrowLeft= require("../../images/arrow_left.png")
|
|
|
|
|
|
-// $.ajax({
|
|
|
-// url: 'test/test1',
|
|
|
-// type: 'GET',
|
|
|
-// dataType: 'json',
|
|
|
-// success: data=> {
|
|
|
-// console.log(3333, data)
|
|
|
-// }
|
|
|
-// })
|
|
|
-
|
|
|
const arrowRight = require("../../images/arrow_right.png");
|
|
|
-const { get } = require('jquery');
|
|
|
$(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
listenScroll()
|
|
|
let isPlacefile = getCookie('isPlacefile')||1
|
|
|
|
|
|
-let tabList = [], name = "",deptName="",deptNameTemp="", behospitalCode="", behosDateStart="", level="",behosDateEnd="", scoreSum = 0,statisticsType="",
|
|
|
- nameTemp = "", behospitalCodeTemp="",levelTemp="", deptId="",deptIdTemp="", doctorName="", doctorNum="",doctorNameTemp="",doctorNumTemp="",
|
|
|
- data_desc="deptName",data_asc="";
|
|
|
- let srcUrl = $("#contentIframe",parent.document).attr("src")
|
|
|
- statisticsType = getUrlArgObjectNew("dateType",srcUrl)||""
|
|
|
- from = getUrlArgObjectNew("from",srcUrl)||""
|
|
|
- lineType = getUrlArgObjectNew("lineType",srcUrl)||""
|
|
|
- let startDateParam = getUrlArgObjectNew("startDateParam",srcUrl)||""
|
|
|
- let endDateParam = getUrlArgObjectNew("endDateParam",srcUrl)||""
|
|
|
- data_desc = (lineType == "合格率")?"firstLevelPercent":(lineType=="完整率"?"emptyPercent":"deptName")
|
|
|
- if(lineType){
|
|
|
- $("th[code="+data_desc+"]").addClass("desc");
|
|
|
- }
|
|
|
- //setTitleTxt('',from) //导航栏面包屑
|
|
|
- if(statisticsType == 1){
|
|
|
- $(".monthYear .mon").css({
|
|
|
- backgroundColor:'#00A1FF',
|
|
|
- color:'#fff'
|
|
|
- }).siblings().css({
|
|
|
- color:'#00A1FF',
|
|
|
- backgroundColor:'#fff'
|
|
|
- })
|
|
|
- setDatePicker($("#datepicker"),$("#datepicker2"),1)
|
|
|
- }else if(statisticsType == 2){
|
|
|
- $(".monthYear .year").css({
|
|
|
- backgroundColor:'#00A1FF',
|
|
|
- color:'#fff'
|
|
|
- }).siblings().css({
|
|
|
- color:'#00A1FF',
|
|
|
- backgroundColor:'#fff'
|
|
|
- })
|
|
|
- setDatePicker($("#datepicker"),$("#datepicker2"),2)
|
|
|
- }else if(statisticsType == 3){
|
|
|
- setDatePicker($("#datepicker"),$("#datepicker2"),3,new Date(startDateParam),new Date(endDateParam))
|
|
|
+let deptName="",deptNameTemp="", behospitalCode="", behospitalCodeTemp="",deptId="",deptIdTemp="",doctorName="",doctorId="",
|
|
|
+ data_desc=["clickNum"],data_asc=[];
|
|
|
+let srcUrl = $("#contentIframe",parent.document).attr("src")
|
|
|
+let deptIdParam = getUrlArgObjectNew("deptId",srcUrl)||""
|
|
|
+let deptNameParam = getUrlArgObjectNew("deptName",srcUrl)||""
|
|
|
+let startDateParam = getUrlArgObjectNew("startDate",srcUrl)||""
|
|
|
+let endDateParam = getUrlArgObjectNew("endDate",srcUrl)||""
|
|
|
+
|
|
|
+$(function() {
|
|
|
+ const iconCalenBlue= require("../../images/icon_calen_blue.png")
|
|
|
+ const iconCalenGrey= require("../../images/icon_calen_grey.png")
|
|
|
+ //获取科室列表
|
|
|
+ getDeptList()
|
|
|
+ //日期控件事件绑定
|
|
|
+ $('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
|
|
|
+ $('.iconCalen').on("mouseenter", function(e){
|
|
|
+ $(this).attr("src", iconCalenBlue)
|
|
|
+ })
|
|
|
+ $('.iconCalen').on("mouseleave", function(e){
|
|
|
+ $(this).attr("src", iconCalenGrey)
|
|
|
+ })
|
|
|
+ $('.iconCalen').on("click", function(e){
|
|
|
+ $(this).parent().find("input").focus()
|
|
|
+ })
|
|
|
+ //日期默认传参/当年
|
|
|
+ if(startDateParam){
|
|
|
+ const startDate = new Date(startDateParam);
|
|
|
+ const endDate = new Date(endDateParam);
|
|
|
+ $( "#datepicker" ).datepicker({
|
|
|
+ changeMonth: true,
|
|
|
+ changeYear: true,
|
|
|
+ dateFormat:"yy/mm/dd",
|
|
|
+ }).datepicker( "setDate", startDate);
|
|
|
+ $( "#datepicker2" ).datepicker({
|
|
|
+ changeMonth: true,
|
|
|
+ changeYear: true,
|
|
|
+ dateFormat:"yy/mm/dd"
|
|
|
+ }).datepicker( "setDate",endDate);
|
|
|
}else{
|
|
|
- setDatePicker($("#datepicker"),$("#datepicker2"),'default')
|
|
|
+ setDatePicker($("#datepicker"), $("#datepicker2"), 1);
|
|
|
}
|
|
|
- if(!statisticsType){
|
|
|
- setDatePicker($("#datepicker"),$("#datepicker2"),'default')
|
|
|
+ //父页面传参
|
|
|
+ if(deptIdParam){
|
|
|
+ deptId =deptIdTemp=deptIdParam;
|
|
|
+ deptName=deptNameTemp=deptNameParam;
|
|
|
+ $(".selectDept").val(deptNameParam).attr("title",deptNameParam);
|
|
|
+ $(".partTitle .titlePic ").html(`<a class="consoleP" href="useStatistics.html">临床质控使用统计 / </a>科室使用详情`);
|
|
|
}
|
|
|
+
|
|
|
+ //初始列表数据获取
|
|
|
+ getTabData(1);
|
|
|
+ //导出事件绑定
|
|
|
+ $('.export').click(function(){
|
|
|
+ const param = getFilterParam();
|
|
|
+ if(param.start > param.end){
|
|
|
+ $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
+ return
|
|
|
+ }
|
|
|
+ expJson(api.getQcClickByDeptExport,param).then(res =>{
|
|
|
+ downloadExportedData(res.data,"临床质控使用统计(科室)"+startDateParam.substr(0,10).replace(/\//g,'')+"-"+endDateParam.substr(0,10).replace(/\//g,'')+".xls");
|
|
|
+ })
|
|
|
+ })
|
|
|
+ //给每一个标题绑定一个排序事件
|
|
|
+ $("th[code]").on("click",function(e){
|
|
|
+ const code=$(this).attr("code");
|
|
|
+ if(data_asc==code){
|
|
|
+ data_desc=[code];
|
|
|
+ data_asc=[];
|
|
|
+ $("th[code]").removeClass("asc desc");
|
|
|
+ $(this).addClass("desc");
|
|
|
+ }else{
|
|
|
+ data_desc=[];
|
|
|
+ data_asc=[code];
|
|
|
+ $("th[code]").removeClass("asc desc");
|
|
|
+ $(this).addClass("asc");
|
|
|
+ }
|
|
|
+ getTabData(1);
|
|
|
+ });
|
|
|
//重置
|
|
|
-$(".abnormalClear").click(function(){
|
|
|
- data_desc=""
|
|
|
- data_asc=""
|
|
|
- setDatePicker($("#datepicker"),$("#datepicker2"),"default")
|
|
|
- $(".patientNumInp").val("")
|
|
|
- $("th[code]").removeClass("desc asc");
|
|
|
- behospitalCode =behospitalCodeTemp= ""
|
|
|
- deptName = deptNameTemp = ""
|
|
|
- level = levelTemp = ""
|
|
|
- deptId = deptIdTemp = ""
|
|
|
- $(".selectDept").attr({'title':"全部",'data-id':''}).val("全部")
|
|
|
- getTabData(1)
|
|
|
- getDeptList()
|
|
|
-})
|
|
|
-$(".partTitle a").click(function(){
|
|
|
+ $(".abnormalClear").click(function(){
|
|
|
+ data_desc=[]
|
|
|
+ data_asc=[]
|
|
|
+ setDatePicker($("#datepicker"),$("#datepicker2"),"default");
|
|
|
+ $("#doctorNum,#doctorName").val("");
|
|
|
+ $("th[code]").removeClass("desc asc");
|
|
|
+ behospitalCode =behospitalCodeTemp= ""
|
|
|
+ deptName = deptNameTemp = ""
|
|
|
+ deptId = deptIdTemp = ""
|
|
|
+ doctorId = "";
|
|
|
+ doctorName = "";
|
|
|
+ $(".selectDept").attr({'title':"全部",'data-id':''}).val("全部")
|
|
|
+ getTabData(1)
|
|
|
+ getDeptList()
|
|
|
+ })
|
|
|
+
|
|
|
+//查询
|
|
|
+ $(".filter").on("click", function(e){
|
|
|
+ startDateParam=getPickerDate($("#datepicker"),1)
|
|
|
+ endDateParam=getPickerDate($("#datepicker2"),2)
|
|
|
+ deptId = deptIdTemp;
|
|
|
+ deptName = deptNameTemp;
|
|
|
+ doctorId = $("#doctorNum").val().trim();
|
|
|
+ doctorName = $("#doctorName").val().trim();
|
|
|
+ getTabData(1)
|
|
|
+ })
|
|
|
+});
|
|
|
+
|
|
|
+function getFilterParam(){
|
|
|
+ const param = {
|
|
|
+ "isPlacefile":isPlacefile,
|
|
|
+ "deptId": deptName=="全部"?"":deptId||"", //科室id
|
|
|
+ "deptName": deptName=="全部"?"":deptName||"",
|
|
|
+ "doctorId":doctorId,
|
|
|
+ "doctorName":doctorName,
|
|
|
+ "asc":data_asc, //升序
|
|
|
+ "desc":data_desc, //降序
|
|
|
+ "startDate":startDateParam,
|
|
|
+ "endDate":endDateParam
|
|
|
+ }
|
|
|
+ return param;
|
|
|
+}
|
|
|
+/*$(".partTitle a").click(function(){
|
|
|
//初始菜单选中
|
|
|
$(".menu .page",parent.document).removeClass("active").eq(0).addClass("active");
|
|
|
$(".container",parent.document).addClass("console-cont");
|
|
|
})
|
|
|
-
|
|
|
-$('.recordScoreBtn').css("opacity",hasData('FUNC000017')?'1':'0.5')
|
|
|
-dateChange()
|
|
|
-//所有数据切换日期筛选
|
|
|
-function dateChange(){
|
|
|
- $(".monthYear .mon").click(function(){
|
|
|
- $(this).css({
|
|
|
- backgroundColor:'#00A1FF',
|
|
|
- color:'#fff'
|
|
|
- }).siblings().css({
|
|
|
- color:'#00A1FF',
|
|
|
- backgroundColor:'#fff'
|
|
|
- })
|
|
|
- $(".dayDetail .deptListWrap").css("display","block")
|
|
|
- $(".dayDetail .dayFilter").css("display","none")
|
|
|
- statisticsType = 1
|
|
|
- setDatePicker($("#datepicker"),$("#datepicker2"),1)
|
|
|
- getTabData(1)
|
|
|
- })
|
|
|
- $(".monthYear .year").click(function(){
|
|
|
- $(this).css({
|
|
|
- backgroundColor:'#00A1FF',
|
|
|
- color:'#fff'
|
|
|
- }).siblings().css({
|
|
|
- color:'#00A1FF',
|
|
|
- backgroundColor:'#fff'
|
|
|
- })
|
|
|
- $(".dayDetail .deptListWrap").css("display","none")
|
|
|
- $(".dayDetail .dayFilter").css("display","block")
|
|
|
- statisticsType = 2
|
|
|
- setDatePicker($("#datepicker"),$("#datepicker2"),2)
|
|
|
- getTabData(1)
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
//判断有无某一权限
|
|
|
function hasData(data){
|
|
|
let trdObj = JSON.parse(getLocal("trdObj"))
|
|
|
- let lis = trdObj['YH-BLZK-ZKPF']
|
|
|
+ let lis = trdObj['YH-ZKK-TMQXGSTJ']
|
|
|
if(!lis){
|
|
|
return false
|
|
|
}
|
|
@@ -137,296 +154,101 @@ function dateChange(){
|
|
|
return true
|
|
|
}
|
|
|
return false;
|
|
|
-}
|
|
|
+}*/
|
|
|
function getTabData(activePage){
|
|
|
- const dateStatrt = getPickerDate($("#datepicker"),1) //开始时间
|
|
|
- const dateEnd = getPickerDate($("#datepicker2"),2) //结束时间
|
|
|
- const start = new Date(dateStatrt).getTime()
|
|
|
- const end = new Date(dateEnd).getTime()
|
|
|
- if(start > end){
|
|
|
- $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
- console.log('开始时间',dateStatrt)
|
|
|
- return
|
|
|
- }
|
|
|
- const param = {
|
|
|
- "level": "",
|
|
|
- "name": behospitalCode||"",
|
|
|
- "deptName": deptName=="全部"?"":deptName||"", //科室名称
|
|
|
- "asc":data_asc, //升序 返回的是升序降序的依据
|
|
|
- "desc":data_desc, //降序
|
|
|
- "type": 0, //1-本月,2-本年,0-自定义时间(现在所有都是自定义时间,都会传开始日期和结束日期)
|
|
|
- "startDate":dateStatrt,
|
|
|
- "endDate":dateEnd
|
|
|
- }
|
|
|
- console.log('我是param',param)
|
|
|
- startDateParam = dateStatrt
|
|
|
- endDateParam = dateEnd
|
|
|
- $('.pagination').html("")
|
|
|
- $('.tbody').html(emptyBox('努力加载中...','',1))
|
|
|
- post(api.homePageLevelStatistics,param).then(res =>{
|
|
|
- if(res.data.code == '0'){
|
|
|
- const data = res.data.data||[];
|
|
|
- console.log('我是res',res)
|
|
|
- renderTab(data,data.hospitalId,activePage);
|
|
|
- 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)});
|
|
|
- }
|
|
|
- }).catch((e) =>{
|
|
|
-
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
-getTabData(1)
|
|
|
+ const param = getFilterParam();
|
|
|
+ $('.pagination').html("")
|
|
|
+ $('.tbody').html(emptyBox('努力加载中...','',1))
|
|
|
+ post(api.getQcClickDept,param).then(res =>{
|
|
|
+ if(res.data.code == '0'){
|
|
|
+ const data = res.data.data;
|
|
|
+ const detail =data.records||[];
|
|
|
+ const totalPage = data.pages;
|
|
|
+ const totalNum = data.total;
|
|
|
+ renderTab(detail,detail.hospitalId,activePage);
|
|
|
+ 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)});
|
|
|
+ }
|
|
|
+ }).catch((e) =>{
|
|
|
|
|
|
-//查询
|
|
|
-$(".filter").on("click", function(e){
|
|
|
- console.log('我是查询')
|
|
|
- name = nameTemp
|
|
|
- behospitalCode = behospitalCodeTemp
|
|
|
- level = levelTemp
|
|
|
- deptId = deptIdTemp
|
|
|
- deptName = deptNameTemp
|
|
|
- if(deptName == ""){
|
|
|
- $(".selectDept").attr({'title':"全部",'data-id':''}).val("全部")
|
|
|
- console.log('我是查询222')
|
|
|
- console.log(name)
|
|
|
- console.log(behospitalCode)
|
|
|
- console.log(level)
|
|
|
- console.log(deptId)
|
|
|
- console.log(deptName)
|
|
|
- console.log(deptName)
|
|
|
- }
|
|
|
- console.log('我是查询111')
|
|
|
- getTabData(1)
|
|
|
-})
|
|
|
+ })
|
|
|
+}
|
|
|
+//表格dom渲染
|
|
|
function renderTab(data,hisId,activePage){
|
|
|
- let str = ``
|
|
|
- for(let i = 0; i < data.length; i++){
|
|
|
- const item = data[i]
|
|
|
- str += `
|
|
|
- <tr data-index=${i}>
|
|
|
+ let str = ``
|
|
|
+ for(let i = 0; i < data.length; i++){
|
|
|
+ const item = data[i];
|
|
|
+
|
|
|
+ str += `
|
|
|
+ <tr data-index=${i} data-deptid="${item.deptId}" data-dept="${item.deptName}">
|
|
|
<td class="textCenter">${(activePage-1)*15 + i+1}</td>
|
|
|
<td >${item.deptName || "-"}</td>
|
|
|
-
|
|
|
- <td >${item.totality+'' || "-"}</td>
|
|
|
+ <td >${item.doctorId || "-"}</td>
|
|
|
+ <td >${item.doctorName || "-"}</td>
|
|
|
+ <td>${item.clickNum}</td>
|
|
|
</tr>
|
|
|
`
|
|
|
- }
|
|
|
- $('.tbody').html(str?str:emptyBox())
|
|
|
- bindScoreDetail(hisId)
|
|
|
- $(".goHomeDetail").click(function(){
|
|
|
- let index = $(this).parent().attr("data-index")
|
|
|
- let deptName = $(this).attr("data-dept")
|
|
|
- let ruleType = $(this).attr("data-ruleType")
|
|
|
- let deptId = data[index].deptId ? data[index].deptId : ''
|
|
|
- $(parent.document).find("#contentIframe").attr("src", "quexianDetailControlHome.html?deptName=" + deptName + "&deptId=" + deptId + "&from=4&casesId=243" + "&shijian=3" + "&ruleType=" + ruleType + "&startDateParam=" + startDateParam + "&endDateParam=" + endDateParam)
|
|
|
- })
|
|
|
- // 不合格数跳转至 病历列表详情页
|
|
|
- $(".goHomeDetail1").click(function () {
|
|
|
- let index = $(this).parent().attr("data-index")
|
|
|
- let deptName = $(this).attr("data-dept")
|
|
|
- let titleName = $(this).attr("data-title")
|
|
|
- // let ruleType = $(this).attr("data-ruleType")
|
|
|
- let deptId = data[index].deptId ? data[index].deptId:''
|
|
|
- // $(parent.document).find("#contentIframe").attr("src", "qcListCopy.html?deptName=" + deptName + "&deptId=" + deptId + "&from=4&casesId=243" + "&shijian=3" + "&ruleType=" + ruleType + "&startDate=" + startDateParam + "&endDate=" + endDateParam + "&defectName=" + defectName)
|
|
|
- $(parent.document).find("#contentIframe").attr("src", "qcListCopyUnqualified.html?deptName=" + deptName + "&deptId=" + deptId + "&from=4&casesId=243" + "&shijian=3" + "&startDate=" + startDateParam + "&endDate=" + endDateParam + "&titleName=" + titleName)
|
|
|
- })
|
|
|
- // initScroll("partDetailControl","YX",1)
|
|
|
-}
|
|
|
-
|
|
|
-function scoreDetail(id,age,hid,code){
|
|
|
- window.open(`./qcScore.html?id=${id}&age=${age}&hid=${hid}&code=${code}`)
|
|
|
-}
|
|
|
-function bindScoreDetail(hisId){
|
|
|
- $('.patientNameSpan').on('click',function(e){
|
|
|
- const index = $(this).attr("data-index")
|
|
|
- const type = $(this).attr("data-type")
|
|
|
- const item = tabList[index]
|
|
|
- midifyMsgBox(item,type)
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-function midifyMsgBox(item,type){
|
|
|
- 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?"未处理":"已处理"}</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>`
|
|
|
- }else{
|
|
|
- msgBox = `<div class="midifyMsgBox">
|
|
|
- <div class="mask"></div>
|
|
|
- <div class="midifyMsgContent midifyMsgContentDel">
|
|
|
- <p class="midifyMsgTitle">修改 <img class="iconClose" src=${require('../../images/icon_close_default.png')} alt="关闭" /></p>
|
|
|
- <p class="delTips">确认要删除该条异常记录?</p>
|
|
|
- <div class="midifyMsgBtn midifyMsgBtnDel">
|
|
|
- <span class="midifyEdit midifyEditDel">删除</span>
|
|
|
- <span class="midifyEdit midifyEditQuit">取消</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>`
|
|
|
- }
|
|
|
- $("#mainBox", parent.document).append(msgBox)
|
|
|
- $(".midifyEditDel", parent.document).on("click",function(){
|
|
|
- delModifyOne(itemCopy)
|
|
|
- })
|
|
|
- $(".midifyEditQuit", parent.document).on("click",function(){
|
|
|
- $("#mainBox .midifyMsgBox", parent.document).remove()
|
|
|
- })
|
|
|
- $(".abnormalAll", parent.document).on("click",function(){
|
|
|
- $(".abnormalStatusLis", parent.document).slideToggle()
|
|
|
- })
|
|
|
- $(".abnormalStatusLis li", parent.document).on("click",function(){
|
|
|
- let status = $(this).attr("data-status")
|
|
|
- let str = $(this).html()
|
|
|
- $(".abnormalAll", parent.document).attr("data-status",status).html(str)
|
|
|
- $(".abnormalStatusLis", parent.document).slideToggle()
|
|
|
- })
|
|
|
- $("#mainBox .midifyMsgBox .iconClose", parent.document).on("click", function(e){
|
|
|
- $("#mainBox .midifyMsgBox", parent.document).remove()
|
|
|
- })
|
|
|
- $("#mainBox .midifyMsgBox .itemScore", parent.document).on("keypress", function(event){
|
|
|
- return (/[\d\.]/.test(String.fromCharCode(event.keyCode)))
|
|
|
- })
|
|
|
- $("#mainBox .midifyMsgBox .itemScore", parent.document).on("input", function(e){
|
|
|
- const val = $(this).val()
|
|
|
- itemCopy.score = val
|
|
|
- })
|
|
|
- $("#mainBox .midifyMsgBox .midifyEdit", parent.document).on("click", function(e){
|
|
|
- saveModifyOne(itemCopy)
|
|
|
- })
|
|
|
-}
|
|
|
-//保存修改
|
|
|
-function delModifyOne(itemCopy){
|
|
|
- let param = {
|
|
|
- "id": itemCopy.id
|
|
|
- }
|
|
|
- post(api.delQcAnnormal,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,win: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
- }else{
|
|
|
- $.alerModal({"message":'删除失败,请重试~',type:"tip",time:'1000',win:'default',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
-
|
|
|
- }
|
|
|
- }).catch((e) =>{
|
|
|
- $.alerModal({"message":'删除失败,请重试~',type:"tip",time:'1000',win:'default',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
-
|
|
|
- })
|
|
|
-}
|
|
|
-//保存修改
|
|
|
-function saveModifyOne(itemCopy){
|
|
|
- let txt = $(".abnormalTxt", parent.document).val()
|
|
|
- let status = $(".abnormalAll", parent.document).attr("data-status")
|
|
|
- let param = {
|
|
|
- "id": itemCopy.id,
|
|
|
- "remark": txt,
|
|
|
- "status": status
|
|
|
- }
|
|
|
- post(api.saveQcAnnormal,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,win: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
- }else{
|
|
|
- $.alerModal({"message":'修改失败,请重试~',type:"tip",time:'1000',isFather: true,win: 'default', fatherWrapper: $("#mainBox", parent.document)});
|
|
|
-
|
|
|
- }
|
|
|
- }).catch((e) =>{
|
|
|
- $.alerModal({"message":'修改失败,请重试~',type:"tip",time:'1000',isFather: true,win: 'default', fatherWrapper: $("#mainBox", parent.document)});
|
|
|
-
|
|
|
- })
|
|
|
+ }
|
|
|
+ $('.tbody').html(str?str:emptyBox())
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-//全选绑定
|
|
|
-
|
|
|
-$('.selectDept').on("focus", function(e){
|
|
|
- e.stopPropagation()
|
|
|
- $(".deptList ").css("display","block")
|
|
|
-})
|
|
|
-$('.selectDept').on("blur", function(e){
|
|
|
- $(".deptList ").css("display", "none")
|
|
|
- $(".selectDept .arrow").attr("src",iconDown)
|
|
|
- })
|
|
|
- $('.selectDept').on("input", function(e){
|
|
|
- let val = $(this).val().trim()
|
|
|
- deptName = deptNameTemp = val
|
|
|
- getDeptList(deptName)
|
|
|
- })
|
|
|
-//获取科室列表
|
|
|
-getDeptList()
|
|
|
function getDeptList(val){
|
|
|
- post(api.getDeptList,{inputStr:val=="全部"?"":val||""}).then(res =>{
|
|
|
- if(res.data.code == '0'){
|
|
|
- const deptList = res.data.data||[]
|
|
|
- rendeDeptList(deptList)
|
|
|
- }else{
|
|
|
- rendeDeptList([])
|
|
|
- }
|
|
|
- }).catch((e) =>{
|
|
|
+ post(api.getDeptList,{inputStr:val=="全部"?"":val||""}).then(res =>{
|
|
|
+ if(res.data.code == '0'){
|
|
|
+ const deptList = res.data.data||[]
|
|
|
+ rendeDeptList(deptList)
|
|
|
+ }else{
|
|
|
+ rendeDeptList([])
|
|
|
+ }
|
|
|
+ }).catch((e) =>{
|
|
|
|
|
|
- })
|
|
|
+ })
|
|
|
}
|
|
|
//科室下拉框
|
|
|
function rendeDeptList(deptList){
|
|
|
- if(deptList.length == 0){
|
|
|
- $('.deptList').html("")
|
|
|
- return
|
|
|
- }
|
|
|
- let str = `<li class="deptItem " data-id="" data-name="全部">全部</li>`
|
|
|
- for(let i = 0; i < deptList.length; i++){
|
|
|
- str += `<li class="deptItem ellipsis" title=${deptList[i].deptName} data-id=${deptList[i].deptId} data-name=${deptList[i].deptName}> ${deptList[i].deptName}</li>`
|
|
|
- }
|
|
|
- $('.deptList').html(str)
|
|
|
- bindDeptSelect()
|
|
|
+ if(deptList.length == 0){
|
|
|
+ $('.deptList').html("")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let str = `<li class="deptItem " data-id="" data-name="全部">全部</li>`
|
|
|
+ for(let i = 0; i < deptList.length; i++){
|
|
|
+ str += `<li class="deptItem ellipsis" title=${deptList[i].deptName} data-id=${deptList[i].deptId} data-name=${deptList[i].deptName}> ${deptList[i].deptName}</li>`
|
|
|
+ }
|
|
|
+ $('.deptList').html(str)
|
|
|
+ bindDeptSelect()
|
|
|
}
|
|
|
//科室选择
|
|
|
function bindDeptSelect(){
|
|
|
- $('.deptItem').on("mousedown",function(){
|
|
|
- const deptItemName = $(this).attr("data-name")
|
|
|
- const deptItemId = $(this).attr("data-id")
|
|
|
- deptNameTemp=deptItemName=="全部"?"":deptItemName;
|
|
|
- deptIdTemp =deptItemId||''
|
|
|
- $('.selectDept').val(deptItemName)
|
|
|
- $('.selectDept ').attr('title',deptItemName)
|
|
|
- $(".deptList").css("display", "none")
|
|
|
- })
|
|
|
+ $('.deptItem').on("mousedown",function(){
|
|
|
+ const deptItemName = $(this).attr("data-name")
|
|
|
+ const deptItemId = $(this).attr("data-id")
|
|
|
+ deptNameTemp=deptItemName=="全部"?"":deptItemName;
|
|
|
+ deptIdTemp =deptItemId||''
|
|
|
+ $('.selectDept').val(deptItemName)
|
|
|
+ $('.selectDept ').attr('title',deptItemName)
|
|
|
+ $(".deptList").css("display", "none")
|
|
|
+ })
|
|
|
+ //科室下拉显示、选中事件
|
|
|
+ $('.selectDept').on("focus", function(e){
|
|
|
+ e.stopPropagation()
|
|
|
+ $(".deptList ").css("display","block")
|
|
|
+ })
|
|
|
+ $('.selectDept').on("blur", function(e){
|
|
|
+ $(".deptList ").css("display", "none")
|
|
|
+ $(".selectDept .arrow").attr("src",iconDown)
|
|
|
+ })
|
|
|
+ $('.selectDept').on("input", function(e){
|
|
|
+ let val = $(this).val().trim()
|
|
|
+ deptName = deptNameTemp = val
|
|
|
+ getDeptList(deptName)
|
|
|
+ })
|
|
|
}
|
|
|
-function loading(){
|
|
|
+/*function loading(){
|
|
|
const str = `
|
|
|
<div class="loadingBox">
|
|
|
<div class="mask"></div>
|
|
@@ -437,177 +259,66 @@ function loading(){
|
|
|
}
|
|
|
function hideLoading(){
|
|
|
$("#mainBox .loadingBox", parent.document).remove()
|
|
|
-}
|
|
|
-$('.recordScoreBtn').on("click",function(e){
|
|
|
- if(!hasData('FUNC000017')){
|
|
|
- return
|
|
|
- }
|
|
|
- let scoreList = []
|
|
|
- for(let i = 0; i <tabList.length; i++){
|
|
|
- if(tabList[i].hasSelect){
|
|
|
- scoreList.push(tabList[i].behospitalCode)
|
|
|
- }
|
|
|
- }
|
|
|
- if(scoreList.length === 0){
|
|
|
- $.alerModal({"message":'请选择要评分的项!',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
- return
|
|
|
- } else{
|
|
|
- loading()
|
|
|
- for(let j = 0; j < scoreList.length; j++){
|
|
|
- recordScore(scoreList[j],scoreList.length)
|
|
|
- }
|
|
|
- }
|
|
|
-})
|
|
|
-//给每一个标题绑定一个排序时间
|
|
|
-$("th[code]").on("click",function(e){
|
|
|
- const code=$(this).attr("code");
|
|
|
- if(data_asc==code){
|
|
|
- data_desc=code;
|
|
|
- data_asc="";
|
|
|
- $("th[code]").removeClass("asc desc");
|
|
|
- $(this).addClass("desc");
|
|
|
- }else{
|
|
|
- data_desc="";
|
|
|
- data_asc=code;
|
|
|
- $("th[code]").removeClass("asc desc");
|
|
|
- $(this).addClass("asc");
|
|
|
- }
|
|
|
- getTabData(1);
|
|
|
-});
|
|
|
-function recordScore(behospitalCode,totalNum){
|
|
|
- const param = {
|
|
|
- behospitalCode: behospitalCode
|
|
|
- }
|
|
|
- post(api.recordScore,param).then(res =>{
|
|
|
- if(res.data.code == '0'){
|
|
|
- scoreSum++
|
|
|
- if(scoreSum === totalNum){
|
|
|
- hideLoading()
|
|
|
- scoreSum = 0
|
|
|
- const activePage = $(".activePage").attr('data-page') || 1
|
|
|
-
|
|
|
- getTabData(activePage)
|
|
|
- }
|
|
|
-
|
|
|
- }else{}
|
|
|
- }).catch((e) =>{
|
|
|
-
|
|
|
- })
|
|
|
-}
|
|
|
-$(".patientNumInp").on("input", function(e){
|
|
|
- const val = $(this).val().trim()
|
|
|
- behospitalCodeTemp = val
|
|
|
-})
|
|
|
-$(".patientNameInp").on("input", function(e){
|
|
|
- const val = $(this).val().trim()
|
|
|
- nameTemp = val
|
|
|
-})
|
|
|
-$(".doctorInp").on("input", function(e){
|
|
|
- const val = $(this).val().trim()
|
|
|
- doctorNameTemp = val
|
|
|
-})
|
|
|
-$(".doctorNumInp").on("input", function(e){
|
|
|
- const val = $(this).val().trim();
|
|
|
- doctorNumTemp = val
|
|
|
-})
|
|
|
+}*/
|
|
|
|
|
|
//分页渲染
|
|
|
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>`
|
|
|
+ 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++){
|
|
|
|
|
|
- } 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'))
|
|
|
- getTabData(activePageNow)
|
|
|
- // renderPagination(totalPage,activePageNow,totalNum)
|
|
|
- })
|
|
|
- $(".prePage").on("click", function(e){
|
|
|
- let activePageNow = Number($(".activePage").attr('data-page'))
|
|
|
- if(activePageNow > 1){
|
|
|
- activePageNow--
|
|
|
- getTabData(activePageNow)
|
|
|
- // renderPagination(totalPage,activePageNow,totalNum)
|
|
|
- }
|
|
|
- })
|
|
|
- $(".nextPage").on("click", function(e){
|
|
|
- let activePageNow = Number($(".activePage").attr('data-page'))
|
|
|
- if(activePageNow < totalPage){
|
|
|
- activePageNow++
|
|
|
- getTabData(activePageNow)
|
|
|
- // renderPagination(totalPage,activePageNow,totalNum)
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
-}
|
|
|
+ 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'))
|
|
|
+ getTabData(activePageNow)
|
|
|
+ // renderPagination(totalPage,activePageNow,totalNum)
|
|
|
+ })
|
|
|
+ $(".prePage").on("click", function(e){
|
|
|
+ let activePageNow = Number($(".activePage").attr('data-page'))
|
|
|
+ if(activePageNow > 1){
|
|
|
+ activePageNow--
|
|
|
+ getTabData(activePageNow)
|
|
|
+ // renderPagination(totalPage,activePageNow,totalNum)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $(".nextPage").on("click", function(e){
|
|
|
+ let activePageNow = Number($(".activePage").attr('data-page'))
|
|
|
+ if(activePageNow < totalPage){
|
|
|
+ activePageNow++
|
|
|
+ getTabData(activePageNow)
|
|
|
+ // renderPagination(totalPage,activePageNow,totalNum)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+}
|
|
|
|
|
|
-$(function() {
|
|
|
- const iconCalenBlue= require("../../images/icon_calen_blue.png")
|
|
|
- const iconCalenGrey= require("../../images/icon_calen_grey.png")
|
|
|
- $('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
|
|
|
- $('.iconCalen').on("mouseenter", function(e){
|
|
|
- $(this).attr("src", iconCalenBlue)
|
|
|
- })
|
|
|
- $('.iconCalen').on("mouseleave", function(e){
|
|
|
- $(this).attr("src", iconCalenGrey)
|
|
|
- })
|
|
|
- $('.iconCalen').on("click", function(e){
|
|
|
- $(this).parent().find("input").focus()
|
|
|
- })
|
|
|
- $('.export').click(function(){
|
|
|
- const start = new Date(startDateParam).getTime()
|
|
|
- const end = new Date(endDateParam).getTime()
|
|
|
- if(start > end){
|
|
|
- $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
- return
|
|
|
- }
|
|
|
- const param = {
|
|
|
- "isPlacefile":isPlacefile,
|
|
|
- "level": "",
|
|
|
- "name": behospitalCode||"",
|
|
|
- "deptName": deptName=="全部"?"":deptName||"",
|
|
|
- "asc":data_asc, //升序
|
|
|
- "desc":data_desc, //降序
|
|
|
- "type": statisticsType||2, //1-本月,2-本年
|
|
|
- "startDate":startDateParam,
|
|
|
- "endDate":endDateParam
|
|
|
- }
|
|
|
- console.log('我是导出',param)
|
|
|
- expJson(api.exportIndexQualified,param).then(res =>{
|
|
|
- console.log(res)
|
|
|
- downloadExportedData(res.data,"病案首页合格率占比.xls")
|
|
|
- })
|
|
|
- })
|
|
|
-});
|