| | |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="grid-container2" v-if="item.children"> |
| | | |
| | | <el-collapse accordion @change="handleChange" v-if="item.children[0].children.length"> |
| | | <el-collapse-item :title="item2.name" :name="index2" v-for="(item2, index2) in item.children" :key="index2"> |
| | | <div class="grid-container2"> |
| | | <div class="grid-item" :style="{ backgroundColor: getColor(i.color) }" v-for="(i, k) in item2.children" |
| | | @click="changLabel(i)" :key="k"> |
| | | {{ i.name }} |
| | | </div> |
| | | </div> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | |
| | | |
| | | |
| | | <div class="grid-container2" v-else> |
| | | <div class="grid-item" :style="{ backgroundColor: getColor(item2.color) }" |
| | | v-for="(item2, index2) in item.children" @click="changLabel(item2)" :key="index2"> |
| | | {{ item2.name }} |
| | |
| | | // 查询详情 |
| | | getDetatils(item.id).then(res => { |
| | | this.householdLabelList = res.data.data.householdLabelList |
| | | console.log("===>", this.householdLabelList); |
| | | // 将细类放到一起 |
| | | data.forEach(e => { |
| | | e.children.forEach(f => { |
| | | if (this.householdLabelList.length > 0) { |
| | | if (f.children.length) { |
| | | f.children.forEach(k => { |
| | | this.householdLabelList.forEach(h => { |
| | | if (Number(k.id) == h.labelId) { |
| | | k['color'] = h.color |
| | | k['remark'] = h.remark |
| | | } |
| | | }) |
| | | }) |
| | | } else { |
| | | this.householdLabelList.forEach(h => { |
| | | if (Number(f.id) == h.labelId) { |
| | | f['color'] = h.color |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }) |
| | | }) |
| | | this.labelData = data |