| | |
| | | icon="el-icon-download" @click="handleExport">导出 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button type="text" icon="el-icon-circle-plus-outline" size="small" v-if="permission.househould_manager" |
| | | @click="handleHouseholdManager(scope.row)">住户管理 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row}" slot="tenantName"> |
| | | <el-tag>{{ row.tenantName }}</el-tag> |
| | | </template> |
| | |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | <el-dialog title="住户管理" append-to-body :visible.sync="householdManagerVisible" width="70%" height="60%"> |
| | | <householdManager ref="householdManager"/> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <script> |
| | | import { |
| | | getList, |
| | | getPageList, |
| | | remove, |
| | | add, |
| | | update, |
| | | getDetatil, |
| | | saveOrUpdateHouseLabel |
| | | getDetatil |
| | | } from "@/api/userHouse/list/house.js"; |
| | | import { |
| | | exportBlob |
| | |
| | | import NProgress from 'nprogress'; |
| | | import 'nprogress/nprogress.css'; |
| | | import func from "@/util/func"; |
| | | import householdManager from "./components/householdManager"; |
| | | import Qs from "qs"; |
| | | export default { |
| | | components: { |
| | | householdManager |
| | | }, |
| | | data() { |
| | | return { |
| | | householdManagerVisible:false, |
| | | form: {}, |
| | | search: {}, |
| | | excelBox: false, |
| | |
| | | viewBtn: true, |
| | | dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | | menuWidth:280, |
| | | column: [{ |
| | | label: "房屋编号", |
| | | prop: "houseCode", |
| | | width: 180, |
| | | hide: true, |
| | | disabled: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "地址", |
| | |
| | | label: "小区", |
| | | prop: "districtName", |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "楼层", |
| | | prop: "floor", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择小区", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "手机", |
| | | prop: "phone", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入绑定手机", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "服务到期", |
| | | prop: "serviceDue", |
| | | label: "幢", |
| | | prop: "building", |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "物业费", |
| | | prop: "propertyPrice", |
| | | label: "单元", |
| | | prop: "unit", |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "室", |
| | | prop: "room", |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "楼层", |
| | | prop: "floor", |
| | | type: "number", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入楼层", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "面积", |
| | | prop: "area", |
| | | type: "number", |
| | | }, |
| | | { |
| | | label: "物业费", |
| | | prop: "propertyPrice", |
| | | type: "number", |
| | | }, |
| | | { |
| | | label: "服务到期", |
| | | prop: "serviceDue", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | }, |
| | | ] |
| | | }, |
| | |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.user_add, false), |
| | | viewBtn: this.vaildData(this.permission.user_view, true), |
| | | delBtn: this.vaildData(this.permission.user_delete, true), |
| | | editBtn: this.vaildData(this.permission.user_edit, true) |
| | | addBtn: this.vaildData(this.permission.house_add, true), |
| | | viewBtn: this.vaildData(this.permission.house_view, true), |
| | | delBtn: this.vaildData(this.permission.house_delete, true), |
| | | editBtn: this.vaildData(this.permission.house_edit, true) |
| | | }; |
| | | } |
| | | }, |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | handleHouseholdManager(row){ |
| | | var that = this |
| | | this.householdManagerVisible = true |
| | | this.$nextTick(() => { |
| | | that.$refs.householdManager.init(row) |
| | | }) |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | this.initFlag = false; |
| | |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetatil(this.form.id).then(res => { |
| | | getDetatil({ |
| | | id: this.form.id |
| | | }).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => { |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |