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