| | |
| | | <view v-for="(i, f) in c.children" :key="f">
|
| | | <u-button size="mini" type="primary" :color="$setLabelColor(i.color)"
|
| | | :style="{color: $setLabelColor(i.color) && '#fff'}" :text="i.name"
|
| | | @click="showLabelPopup(i,index,f)"></u-button>
|
| | | @click="showLabelPopup(i,index,f,true)"></u-button>
|
| | | </view>
|
| | | </view>
|
| | | </u-collapse-item>
|
| | |
| | | <view v-for="(item, k) in item.children" :key="k">
|
| | | <u-button size="mini" type="primary" :color="$setLabelColor(item.color)"
|
| | | :style="{color: $setLabelColor(item.color) && '#fff'}" :text="item.name"
|
| | | @click="showLabelPopup(item,index,k)"></u-button>
|
| | | @click="showLabelPopup(item,index,k,false)"></u-button>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | |
| | | },
|
| | | data() {
|
| | | return {
|
| | | showType: false,
|
| | | houseAddress: "",
|
| | | houseInfo: {},
|
| | | householdInfo: {},
|
| | |
| | | }
|
| | | },
|
| | | // 房屋弹窗
|
| | | showLabelPopup(item, fIndex, cIndex) {
|
| | | showLabelPopup(item, fIndex, cIndex, type) {
|
| | | // 先清空
|
| | | this.number = 0
|
| | | this.labelValue = ""
|
| | | this.remark = ""
|
| | | this.popupShow = true
|
| | | this.showType = type
|
| | | this.labelModelInfo.title = item.name
|
| | | this.currentLabelInfo = item;
|
| | | this.fIndex = fIndex;
|
| | |
| | | },
|
| | |
|
| | | removeLabel(id) {
|
| | | if (this.from) {
|
| | | let item = this.labelBtnList[this.fIndex];
|
| | | item.children[this.cIndex].color = "";
|
| | | this.$set(this.labelBtnList, this.fIndex, item);
|
| | | this.updatePrePageData()
|
| | | } else {
|
| | | // if (this.from) {
|
| | | // let item = this.labelBtnList[this.fIndex];
|
| | | // item.children[this.cIndex].color = "";
|
| | | // this.$set(this.labelBtnList, this.fIndex, item);
|
| | | // this.updatePrePageData()
|
| | | // } else
|
| | | {
|
| | | const data = {
|
| | | labelId: id,
|
| | | householdId: this.householdInfo.id
|
| | |
| | | },
|
| | |
|
| | | addLabel(id, color) {
|
| | | if (this.from) {
|
| | | let item = this.labelBtnList[this.fIndex];
|
| | | item.children[this.cIndex].color = color;
|
| | | item.children[this.cIndex].remark = this.remark;
|
| | | this.$set(this.labelBtnList, this.fIndex, item);
|
| | | this.updatePrePageData()
|
| | | } else {
|
| | | // if (this.from) {
|
| | | // let item = this.labelBtnList[this.fIndex];
|
| | | // console.log("**********" + color)
|
| | | // if (this.showType) {
|
| | | // item.children[this.fIndex].children[this.cIndex].color = color;
|
| | | // item.children[this.fIndex].children[this.cIndex].remark = this.remark;
|
| | | // this.$set(this.labelBtnList, this.fIndex, item);
|
| | | // } else {
|
| | | // item.children[this.cIndex].color = color;
|
| | | // item.children[this.cIndex].remark = this.remark;
|
| | | // this.$set(this.labelBtnList, this.fIndex, item);
|
| | | // }
|
| | | // this.updatePrePageData()
|
| | | // } else |
| | | {
|
| | | saveOrUpdateHouseholdLabel({
|
| | | householdId: this.householdInfo.id,
|
| | | labelId: id,
|