| | |
| | | <el-button :size="size" type="text" icon="el-icon-circle-plus-outline" |
| | | v-if="permission.house_manager" @click="handleHouseholdManager(row)">住户管理 |
| | | </el-button> |
| | | <el-button :size="size" type="text" icon="el-icon-circle-plus-outline" v-if="permission.house_tag" |
| | | @click="manageLabel(row)">标签 |
| | | <el-button :size="size" type="text" icon="el-icon-circle-plus-outline" |
| | | v-if="permission.house_tag" @click="manageLabel(row)">标签 |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { setLabelColor } from '@/util/util' |
| | | import { setHouseLabelColor } from '@/util/util' |
| | | |
| | | import { |
| | | getList, |
| | |
| | | } from "@/api/userHouse/list/house.js" |
| | | import { |
| | | removeHouseholdLabel, |
| | | saveOrUpdateHouseholdLabel |
| | | saveOrUpdateHouseLabelInfo |
| | | } from "@/api/userHouse/list/userHouseList.js" |
| | | import { |
| | | getLabelList, |
| | |
| | | |
| | | getColor () { |
| | | return (data) => { |
| | | return setLabelColor(data) |
| | | return setHouseLabelColor(data) |
| | | } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | |
| | | onsubmit () { |
| | | if (this.labelForm.color === '#EBEDF0') { |
| | | if (this.labelForm.color === '#999') { |
| | | let params = { |
| | | householdId: this.currentRow.id, |
| | | labelId: this.currentLabel.id |
| | |
| | | this.labelForm.householdId = this.currentRow.id |
| | | this.labelForm.labelId = this.currentLabel.id |
| | | this.labelForm.lableType = 2 |
| | | saveOrUpdateHouseholdLabel(this.labelForm).then(res => { |
| | | saveOrUpdateHouseLabelInfo(this.labelForm).then(res => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | |
| | | }, |
| | | |
| | | changLabel (item) { |
| | | this.editLabelFlge = true |
| | | // this.editLabelFlge = true |
| | | this.currentLabel = item |
| | | this.labelForm.color = item.color |
| | | this.labelForm.remark = item.remark |
| | | // this.labelForm.color = item.color |
| | | // this.labelForm.remark = item.remark |
| | | // console.log(item,9999) |
| | | if(item.name == '闲置'){ |
| | | this.labelForm.color = 'green' |
| | | } |
| | | if(item.name == '自住'){ |
| | | this.labelForm.color = 'blue' |
| | | } |
| | | if(item.name == '出租'){ |
| | | this.labelForm.color = 'yellow' |
| | | } |
| | | this.labelForm.houseCode = this.currentRow.houseCode |
| | | this.labelForm.labelId = this.currentLabel.id |
| | | this.labelForm.lableType = 2 |
| | | saveOrUpdateHouseLabelInfo(this.labelForm).then(res => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | // this.editLabelFlge = false |
| | | this.manageLabel(this.currentRow) |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | manageLabel (item) { |
| | | this.loading = true |