|
@@ -5,6 +5,8 @@ const {api} = require('./api.js')
|
|
|
const {post,getCookie,getUrlArgObjectNew,getUrlArgObject} = require('./utils.js')
|
|
|
const iconCheck= require("./../images/icon_check.png")
|
|
|
const iconUnCheck = require("./../images/icon_unchecked.png")
|
|
|
+const arrowUp = require("./../images/arrow_up22.png")
|
|
|
+const arrowDown = require("./../images/arrow_down22.png")
|
|
|
|
|
|
let dataCopy,paramType,paramId,submitMsg="新增成功~"
|
|
|
$(function(){
|
|
@@ -14,6 +16,8 @@ $(function(){
|
|
|
getList(paramType)//获取条目列表
|
|
|
|
|
|
})
|
|
|
+const filterBoxWidth = $('.filterBox').width()
|
|
|
+$('.patientNumInp').css('width', filterBoxWidth-82-15 +'px')
|
|
|
function getList(type){
|
|
|
console.log('type',type)
|
|
|
if(!type){
|
|
@@ -64,13 +68,13 @@ function renderData(data){
|
|
|
const dataKeys = Object.keys(dataCopy)
|
|
|
let str = ""
|
|
|
for(let i = 0; i < dataKeys.length; i++){
|
|
|
- str += `<div class="caseEntryBlcok ${i===0 ? 'borderTop':''}"><div class="caseEntryName">${dataKeys[i]}</div>`
|
|
|
+ str += `<div class="caseEntryBlcok ${i===0 ? 'borderTop':''}"><div class="caseEntryName">${dataKeys[i]} <img class="arrow" src=${arrowDown}></div>`
|
|
|
if(dataCopy[dataKeys[i]].length > 0){
|
|
|
str += `<div class="caseEntryDetail"><div class="tabTitle"><span class="opera">操作</span><span class="qcItem">质控条目</span><span class="qcUsed">是否启用</span></div>`
|
|
|
}
|
|
|
for(let j = 0; j < dataCopy[dataKeys[i]].length; j++){
|
|
|
const dataItem = dataCopy[dataKeys[i]][j]
|
|
|
- str += `<div class="tabInfo"><span data-pIndex=${dataKeys[i]} data-index=${j} class="opera">${dataItem.sel == '1' ? `<img class="iconCheck" src=${iconCheck} />`:`<img class="iconCheck" src=${iconUnCheck} />`}</span><span class="qcItem">${dataItem.name}</span><span class="qcUsed">${dataItem.isUsed == '1' ? "是":"否"}</span></div>`
|
|
|
+ str += `<div class="tabInfo"><span data-pIndex=${dataKeys[i]} data-index=${j} class="opera">${dataItem.sel == '1' ? `<img class="iconCheck" src=${iconCheck} />`:`<img class="iconCheck" src=${iconUnCheck} />`}</span><span class="qcItem">${dataItem.name}</span><span class="qcUsed"><span class="usedRes">${dataItem.isUsed == '1' ? "是":"否"}</span></span></div>`
|
|
|
}
|
|
|
if(dataCopy[dataKeys[i]].length > 0){
|
|
|
str += `</div>`
|
|
@@ -86,9 +90,11 @@ function bindBlockSlideToggle(){
|
|
|
$('.caseEntryName').click(function(){
|
|
|
const display = $(this).parent().find('.caseEntryDetail').css("display");
|
|
|
if(display === "none"){
|
|
|
+ $(this).find('img').attr('src', arrowUp)
|
|
|
$('.caseEntryDetail').slideUp()
|
|
|
$(this).parent().find('.caseEntryDetail').slideDown()
|
|
|
} else{
|
|
|
+ $(this).find('img').attr('src', arrowDown)
|
|
|
$('.caseEntryDetail').slideUp()
|
|
|
}
|
|
|
|