|
@@ -21,30 +21,18 @@ $(function(){
|
|
|
"sex": getUrlArgObject('sex') || 1,
|
|
|
"diag": getUrlArgObject('diag') || "肺结核(复诊); ",
|
|
|
"lis": getUrlArgObject('lis')?JSON.parse(getUrlArgObject('lis')) : []
|
|
|
-
|
|
|
- // "age": 28,
|
|
|
- // "featureType": '21',
|
|
|
- // "scaleId": id,
|
|
|
- // "scaleName": name,
|
|
|
- // "sex": 1,
|
|
|
- // "diag": "肺结核(复诊); ",
|
|
|
- // "lis": []
|
|
|
-
|
|
|
}
|
|
|
|
|
|
if(id){
|
|
|
-
|
|
|
post(url, params).then((res) => {
|
|
|
const data = res.data.data
|
|
|
if(res.data.code==0){
|
|
|
scaleInfo = data.scale;
|
|
|
- // console.log('量表数据为:',scaleInfo);
|
|
|
for (var i = 0; i < scaleInfo.length; i++) {
|
|
|
if( scaleInfo[i].type == 1) {
|
|
|
var scaleList = JSON.parse(scaleInfo[i].content)
|
|
|
console.log('scaleList', scaleList)
|
|
|
renderCalcu(scaleList)
|
|
|
-
|
|
|
} else {
|
|
|
$('.content').append(scaleInfo[i].content)
|
|
|
}
|
|
@@ -56,19 +44,13 @@ $(function(){
|
|
|
scaleList.group[indexList[0]].rows[indexList[1]].row[indexList[2]].details[i].select = 0
|
|
|
}
|
|
|
scaleList.group[indexList[0]].rows[indexList[1]].row[indexList[2]].details[indexList[3]].select = 1
|
|
|
- // console.log('this',$(this).parent().parent().parent().attr('class'))
|
|
|
const className = $(this).parent().parent().parent().attr('data-group')
|
|
|
for(let i = 0; i < $('.'+className).length; i++) {
|
|
|
$('.'+className).eq(i).removeClass('noSelect')
|
|
|
}
|
|
|
- // for(let i = 0; i < $(this).parent().parent().parent().parent().find(className).length; i++) {
|
|
|
- // $(this).parent().parent().parent().parent().find(className).eq(i).removeClass('noSelect')
|
|
|
- // }
|
|
|
- // $(this).parent().parent().parent().removeClass('noSelect')
|
|
|
})
|
|
|
|
|
|
$('.calcuBtn').on('click', function() {
|
|
|
- // console.log('scaleList', scaleList)
|
|
|
let allSelect = true
|
|
|
for (let i = 0; i < scaleList.group.length; i++) {
|
|
|
for (let j = 0; j < scaleList.group[i].rows.length; j++) {
|
|
@@ -76,7 +58,6 @@ $(function(){
|
|
|
let itemSelect = false
|
|
|
for (let x = 0; x < scaleList.group[i].rows[j].row.length; x++) {
|
|
|
|
|
|
- // console.log('scaleList.group[i].rows[j].row[x].details', scaleList.group[i].rows[j].row[x].details)
|
|
|
for (let y = 0; y < scaleList.group[i].rows[j].row[x].details.length; y++) {
|
|
|
if (scaleList.group[i].rows[j].row[x].details[y].select == 1) {
|
|
|
itemSelect = true
|