linwe
2024-06-03 202115a19024a8f221931954f2450560b1b1565d
标签保存失败
1 files modified
43 ■■■■■ changed files
subPackage/house/member/householdLabel.vue 43 ●●●●● patch | view | raw | blame | history
subPackage/house/member/householdLabel.vue
@@ -30,7 +30,7 @@
                                    <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>
@@ -40,7 +40,7 @@
                        <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>
@@ -91,6 +91,7 @@
        },
        data() {
            return {
                showType: false,
                houseAddress: "",
                houseInfo: {},
                householdInfo: {},
@@ -227,12 +228,13 @@
                }
            },
            // 房屋弹窗
            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;
@@ -285,12 +287,13 @@
            },
            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
@@ -310,13 +313,21 @@
            },
            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,