zhangxc 5 年之前
父节点
当前提交
2d0aa9db8a
共有 4 个文件被更改,包括 24 次插入8 次删除
  1. 1 1
      src/html/singleVeto.html
  2. 1 1
      src/js/api.js
  3. 13 3
      src/js/itemDefectDetail.js
  4. 9 3
      src/js/singleVeto.js

+ 1 - 1
src/html/singleVeto.html

@@ -12,7 +12,7 @@
 <body>
     <div class="managerContainer tiaomu singleVeto">
         <div class="partTitle">
-          <p class="pices"><a href="console.html">控制台 / </a><span>条目缺陷占比</span></p>
+          <p class="pices"><a > </a><span></span></p>
           <!-- <div class="monthYear">
             <span class="mon">本月</span>
             <span class="year">本年</span>

+ 1 - 1
src/js/api.js

@@ -82,7 +82,7 @@ const api = {
     entryRejectPercent:'/console/entryRejectPercent',//单项否决占比
     qcResultLevelPercent:'/console/qcResultLevelPercent',//各科室甲乙丙级占比
     qcResultDefectList:'/console/qcResultShortPage',//条目缺陷质控评分
-
+    qcResultDefectListDept:'/consoleByDept/qcResultShortByDeptPage',//条目缺陷质控评分(科室)
     getQcListPageSet:'/sys/user/pageset/getPageSet',
     saveQcListPageSet:'/sys/user/pageset/savePageSet',
 }

+ 13 - 3
src/js/itemDefectDetail.js

@@ -24,6 +24,9 @@ let docName = getUrlArgObjectNew("docName",srcUrl)||""
 let startDateParam =  getUrlArgObjectNew("startDate",srcUrl)||""
 let endDateParam =  getUrlArgObjectNew("endDate",srcUrl)||""
 let defectName = getUrlArgObjectNew("defectName",srcUrl)||""
+let from = getUrlArgObjectNew("from",srcUrl)||""
+let isSingleReject = getUrlArgObjectNew("isSingleReject",srcUrl)||""
+let deptList = JSON.parse(getCookie("deptList"))||[]
 
 $(".selectLevel").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
 $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
@@ -101,8 +104,9 @@ function getTabData(activePage){
         endDate: behosDateEnd, //出院日期--结束时间
         casesEntryName: casesEntryName,
         size: pageSize,
+        isReject: isSingleReject
     }
-    post(api.qcResultDefectList,param).then(res =>{
+    post(from==2?api.qcResultDefectListDept:api.qcResultDefectList,param).then(res =>{
         if(res.data.code == '0'){
             const data = res.data.data;
             currentPage = data.current;
@@ -539,13 +543,19 @@ $(function() {
         dateFormat:"yy/mm/dd"
     }).datepicker( "setDate",endDate);
     $(".filter").click();   //初始查询
-    $(".partTitle .titlePic ").html(`<a class="consoleD" href="console.html">控制台 / </a><a class="consoleP" href="singleVeto.html?form=1">条目缺陷占比 / </a>缺陷详情`)
+    if(from==2){
+        $(".partTitle .titlePic ").html(`<a class="consoleD" href="deptConsole.html">控制台(科室) / </a><a class="consoleP" href="singleVeto.html?form=1">条目缺陷占比 / </a>缺陷详情`)
+
+    }else{
+        $(".partTitle .titlePic ").html(`<a class="consoleD" href="console.html">控制台 / </a><a class="consoleP" href="singleVeto.html?form=1">条目缺陷占比 / </a>缺陷详情`)
+
+    }
     $(".partTitle .consoleD").click(function(){
         $(".menu .page",parent.document).removeClass("active").eq(0).addClass("active");
         $(".container",parent.document).addClass("console-cont");
     })
     $(".partTitle .consoleP").click(function(){
-        $(parent.document).find("#contentIframe").attr("src",`./singleVeto.html?from=1`)
+        $(parent.document).find("#contentIframe").attr("src",`./singleVeto.html?from=${form}`)
        
     })
 });

+ 9 - 3
src/js/singleVeto.js

@@ -46,6 +46,10 @@ $(function(){
     }
     if(from == 2){
         $(".partTitle a").attr("href","deptConsole.html").html("控制台(科室) / ")
+        $(".partTitle .pices span").html("条目缺陷占比")
+    }else{
+        $(".partTitle a").attr("href","console.html").html("控制台 / ")
+        $(".partTitle .pices span").html("条目缺陷占比")
     }
     $(".partTitle a").click(function(){
         //初始菜单选中
@@ -302,14 +306,16 @@ function renderTab(data,activePage){
     }
     $('tbody').html(str?str:emptyBox())
     bindEdit(data,activePage)
-    goDetail()
+    goDetail(data)
 }
 
-function goDetail(){
+function goDetail(data){
     $(".goDetail").click(function(){
+        const index = $(this).parent().attr("data-index")
         let defectName = $(this).attr("data-name")
+        const item = data[index]
         // focusMenuItem("YH-ZKK-GKSQXZB_XQ");
-        $(parent.document).find("#contentIframe").attr("src",`./itemDefectDetail.html?defectName=${defectName}&startDate=${startDateParam}&endDate=${endDateParam}`)
+        $(parent.document).find("#contentIframe").attr("src",`./itemDefectDetail.html?defectName=${defectName}&startDate=${startDateParam}&endDate=${endDateParam}&from=${from}&isSingleReject=${item.isReject}`)
     })
 }