| | |
| | | <el-dialog title="标签管理" append-to-body :visible.sync="labelFlag" center width="600px"> |
| | | <div> |
| | | <div class="grid-container2"> |
| | | <div class="grid-item" :style="{ backgroundColor: item2.color }" v-for="(item2, index2) in labelData" |
| | | @click="changLabel(item2)" :key="index2"> |
| | | <div class="grid-item" :style="{ backgroundColor: item2.color,color: item2.fontColor}" |
| | | v-for="(item2, index2) in labelData" @click="changLabel(item2)" :key="index2"> |
| | | {{ item2.name }} |
| | | </div> |
| | | </div> |
| | |
| | | if (row.communityCode) { |
| | | this.query.regionCode = row.communityCode |
| | | } |
| | | if (row.parentId) { |
| | | this.query.parentId = row.parentId |
| | | } else { |
| | | this.query.parentId = 103 |
| | | } |
| | | this.query.labelId = row.labelId |
| | | this.query.parentId = 103 |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onsubmit() { |
| | |
| | | this.currentRow = item |
| | | this.labelFlag = true |
| | | let params = { |
| | | parentId: 103 |
| | | parentId: this.query.parentId |
| | | } |
| | | // 查询标签 |
| | | getLabelList(Object.assign(params)).then(res => { |
| | |
| | | getDetatils(item.id).then(res => { |
| | | this.householdLabelList = res.data.data.householdLabelList |
| | | // 将细类放到一起 |
| | | data.forEach(e => { |
| | | e.children.forEach(f => { |
| | | if (this.householdLabelList.length > 0) { |
| | | this.householdLabelList.forEach(h => { |
| | | if (Number(f.id) == h.labelId) { |
| | | f['color'] = h.color |
| | | f['remark'] = h.remark |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | console.log("*********123*********", res.data.data.householdLabelList) |
| | | data.forEach(f => { |
| | | if (this.householdLabelList.length > 0) { |
| | | this.householdLabelList.forEach(h => { |
| | | if (f.id == h.labelId) { |
| | | f.color = h.color |
| | | f.fontColor = '#080808' |
| | | // f['remark'] = h.remark |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | this.labelData = data |
| | | console.log("******************", data) |
| | | this.loading = false |
| | | }) |
| | | }) |
| | |
| | | .box .el-scrollbar__wrap { |
| | | overflow: scroll; |
| | | } |
| | | </style> |
| | | </style> |