| | |
| | | const code = e.currentTarget.dataset.code |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { cateList, tagCodes, activeParam, activeIndex } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | |
| | | if(index === -1){ |
| | | // if(activeParam && activeParam.length > 0){ |
| | | // activeParam.forEach(item => { |
| | | // const indexTemp = tagCodes.indexOf(item.labelValueCode) |
| | | // if(indexTemp > -1){ |
| | | // tagCodes.splice(indexTemp, 1) |
| | | // } |
| | | // }) |
| | | // } |
| | | // tagCodes.push(code) |
| | | if( cateList[activeIndex].tempParamIndex==null || cateList[activeIndex].tempParamIndex != paramIndex){ |
| | | cateList[activeIndex].tempParamIndex = paramIndex |
| | | cateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName |
| | | cateList[activeIndex].tempParamCode = code |
| | | console.log(code) |
| | | }else{ |
| | | cateList[activeIndex].tempParamIndex = -1 |
| | | cateList[activeIndex].tempParamName = null |
| | | cateList[activeIndex].tempParamCode = null |
| | | console.log(1) |
| | | } |
| | | this.setData({ cateList }) |
| | | console.log(cateList) |
| | | }, |
| | | cancelParam() { |
| | | const { cateList } = this.data |