luolei 5 vuotta sitten
vanhempi
commit
ead6f98d96

+ 79 - 0
src/css/assertTypeDetail.less

@@ -7,4 +7,83 @@
 }
 .assertTypeDetail {
     
+    .filterBox{
+        margin-bottom: 15px;
+    }
+    .main-body{
+        margin: 20px 0;
+        padding: 0 35px;
+        min-width: 1090px;
+        /*width: 100%;*/
+    }
+    .filterItem{
+        position: relative;
+        height: 40px;
+        line-height: 40px;
+        margin: 0 20px 15px 0;
+        float: none !important;
+        span{
+            display: inline-block;
+            line-height: 40px;
+            position: relative;
+        }
+        .explainL:before {
+            content: "*";
+            color: #f56c6c;
+            margin-right: 4px;
+        }
+        input{
+            width:120px;
+            height:40px;
+            border-radius:4px;
+            border: 1px solid #E2E5EF;
+            outline: none;
+            margin-right: 10px;
+            padding: 0 10px;
+            box-sizing: border-box;
+        }
+    }
+    
+    .selectLevel,.selectDept{
+        display: inline-block;
+        position: relative;
+        width:120px;
+        padding: 0 10px;
+        height:40px;
+        border-radius:4px;
+        border: 1px solid #E2E5EF;
+        box-sizing: border-box;
+        cursor: pointer;
+    }
+    .selectDept{
+        width: 160px;
+    }
+    .filterDropList{
+        position: absolute;
+        right: 0;
+        max-height: 200px;
+        overflow-y: auto;
+        background: #fff;
+        display: none;
+        border: 1px solid #e4e7ed;
+        box-shadow: 0 2px 12px 0 #e4e7ed;
+        z-index: 2;
+        li{
+            padding: 0 10px;
+        }
+    }
+    
+    .deptList{
+        width: 160px;
+        max-height: 400px;
+    }
+    .listTypeAll {
+        li {
+            height: 48px;
+            line-height: 48px;
+            background-color: #fff;
+            cursor: pointer;
+            padding-bottom: 1px solid #ebeef5;
+        }
+    }
 }

+ 0 - 7
src/html/assertType.html

@@ -25,13 +25,6 @@
                     <span>质控类型:</span>
                     <input class="patientNumInp" style="width: 148px;" type="text" placeholder="请输入质控类型">
                 </span>
-                <!-- <span class="filterItem typeFilter deptListWrap">
-                    <span style="overflow:hidden">科室名称:</span>
-                    <span class="selectDept ellipsis" data-id=""><i>--</i></span>
-                    <ul class="deptList filterDropList">
-                        
-                    </ul>
-                </span> -->
                 <span class="filter">查询</span>
                 <span class="addTypeAssert"><a href="assertTypeDetail.html">添加质控类型</a></span>
             </div>

+ 28 - 1
src/html/assertTypeDetail.html

@@ -14,7 +14,34 @@
             </div>
           </div>
           <div class="partTitleT"></div>
-          <div class="grayLine"></div>
+          <div class="grayLine"></div>     
+          <div class="main-body">
+            <div class="filterBox clearfix">
+                <div class="filterItem typeFilter deptListWrap">
+                    <span class="explainL" style="overflow:hidden">科室名称:</span>
+                    <span class="selectDept ellipsis" data-id=""><i>--</i></span>
+                    <ul class="deptList filterDropList">
+                        
+                    </ul>
+                </div>   
+                <div class="filterItem typeFilter">
+                    <span class="explainL">质控类型:</span>
+                    <input class="patientNumInp" style="width: 148px;" type="text" placeholder="请输入质控类型">
+                </div>
+                <div class="filterItem typeFilter">
+                    <span class="explainL">质控条目:</span>
+                    <ul class="listTypeAll">
+                        <li>
+                            <span>病案首页</span><i></i>
+                        </li>
+                    </ul>
+                </div>
+                <!-- <span class="filter">查询</span>
+                <span class="addTypeAssert"><a href="assertTypeDetail.html">添加质控类型</a></span> -->
+            </div>
+
+            <div class="pagination"></div>
+        </div>
     </div>
 </body>
 </html>

+ 20 - 12
src/js/assertType.js

@@ -157,8 +157,12 @@ function getTabData(activePage){
     }
     post(api.qcType,param).then(res =>{
         if(res.data.code == '0'){
-            const data = res.data.data.records||[];
-            renderTab(data,data.hospitalId,activePage);
+            const data = res.data.data;
+            tabList = data.records||[];
+            const totalPage = data.pages;
+            const totalNum = data.total;
+            renderTab(tabList,data.hospitalId,activePage);
+            
             renderPagination(totalPage,Number(activePage),totalNum)
             if(totalPage > 1){
                 renderPagination(totalPage,Number(activePage),totalNum)
@@ -191,9 +195,9 @@ function renderTab(data,hisId,activePage){
                 <td >${item.id || "-"}</td>
                 <td >${item.name || "-"}</td>
                 <td class="assertTypeActive clearfix">
-                    <span class="assertTypeEdit" data-id="${item.id}">修改</span>
-                    <span class="assertTypeCopy" data-id="${item.id}">复制</span>
-                    <span class="assertTypeDel" data-id="${item.id}">删除</span> 
+                    <span class="assertTypeEdit" data-index="${i}" data-type="1" data-id="${item.id}">修改</span>
+                    <span class="assertTypeCopy" data-index="${i}" data-type="2" data-id="${item.id}">复制</span>
+                    <span class="assertTypeDel" data-index="${i}" data-type="3" data-id="${item.id}">删除</span> 
                 </td>
             </tr>
         `
@@ -213,11 +217,12 @@ 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){
+    $('.assertTypeDel').on('click',function(e){
         const index = $(this).attr("data-index")
+        const id = $(this).attr("data-id")
         const type = $(this).attr("data-type")
         const item = tabList[index]
-        midifyMsgBox(item,type)
+        midifyMsgBox(item,type,id)
     })
 }
 
@@ -250,7 +255,7 @@ function midifyMsgBox(item,type){
                 </div>
             </div>
         </div>`
-    }else{
+    }else if(type==3){
         msgBox = `<div class="midifyMsgBox">
             <div class="mask"></div>
             <div class="midifyMsgContent midifyMsgContentDel">
@@ -265,7 +270,10 @@ function midifyMsgBox(item,type){
     }
     $("#mainBox", parent.document).append(msgBox)
     $(".midifyEditDel", parent.document).on("click",function(){
-        delModifyOne(itemCopy)
+        let ids = []
+        ids.push(itemCopy.id)
+        console.log(ids)
+        delModifyOne(ids)
     })
     $(".midifyEditQuit", parent.document).on("click",function(){
         $("#mainBox .midifyMsgBox", parent.document).remove()
@@ -294,11 +302,11 @@ function midifyMsgBox(item,type){
     })
 }
 //保存修改
-function delModifyOne(itemCopy){
+function delModifyOne(ids){
     let param = {
-        "id": itemCopy.id
+        "ids": ids
     }
-    post(api.delQcAnnormal,param).then(res =>{
+    post(api.typeDelete,param).then(res =>{
         if(res.data.code == '0'){
             const data = res.data.data;
             getTabData(1)

+ 21 - 2
src/js/assertTypeDetail.js

@@ -1,5 +1,24 @@
 const $ = require('jquery');
-require("../css/assertType.less");
+require("../css/assertTypeDetail.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew} = require('./utils.js')
+
+
+$(function(){
+    getList()//获取条目列表
+
+})
+function getList(){
+    post(api.getEntryByHospital,{}).then(res =>{
+        let result = res.data
+        if(result.code == '0'){
+            const data = result.data;
+            console.log(data)
+        }else{
+            
+        }
+    }).catch((e) =>{
+    
+    })
+}