//json对象转数组 function jsontoarr(obj1){ arr1 = []; let linshiObj = {} for (let i in obj1) { linshiObj[i] = obj1[i]; } arr1.push(linshiObj); return arr1; } //xmSelect选中处理value 和 name相同情况 function setselect(dataarr,selectval){ var arrnew=dataarr; var flag=false; for (let prop in arrnew){ if(selectval==arrnew[prop]['value']){ arrnew[prop]['selected']=true; flag=true; } } if(!flag){ let linshiObj = {} linshiObj['value'] = selectval; linshiObj['name'] = selectval; linshiObj['selected'] = true; arrnew.push(linshiObj); } return arrnew; } //xmSelect选中处理value 和 name不相同情况 function setselectdiff(dataarr,select_val,select_name){ var arrnew=[]; var flag=false; for (let prop in dataarr){ let linshiObj = {} linshiObj['value'] = dataarr[prop]['value']; linshiObj['name'] = dataarr[prop]['name']; if(select_val==dataarr[prop]['value']){ linshiObj['selected'] = true; flag=true; } arrnew.push(linshiObj); } if(!flag){ let linshiObj = {} linshiObj['value'] = select_val; linshiObj['name'] = select_name; linshiObj['selected'] = true; arrnew.push(linshiObj); } return arrnew; } //转数字 function toNumber(str) { str=parseInt(str); if(isNaN(str)){ str=0; } return str; }
一片空白 5.8万
父爱如山,不善表达。回想十多年前,总记得父亲有个宽厚的肩膀,小小的自己跨坐在上面,越过人山人海去看更广阔的天空,那个时候期望自己有一双翅膀,能够像鸟儿一样飞得高,看得远。虽然父亲有时会和自己开玩笑,但在做错事的时候会受到严厉的训斥。父亲有双粗糙的大手掌。