From 207076de7f2c7a73c66ad8c714c3f7d3ac71748d Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Tue, 05 Mar 2024 18:07:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/userHouse/hireInfoList.vue | 91 +++++++++++++++++++++++++++------------------
1 files changed, 55 insertions(+), 36 deletions(-)
diff --git a/src/views/userHouse/hireInfoList.vue b/src/views/userHouse/hireInfoList.vue
index 0380030..28b301d 100644
--- a/src/views/userHouse/hireInfoList.vue
+++ b/src/views/userHouse/hireInfoList.vue
@@ -17,9 +17,15 @@
<el-button type="danger" size="small" plain icon="el-icon-delete"
v-if="permission.houseRental_delete" @click="handleDelete">删 除
</el-button>
+
</template>
<template slot-scope="{row, size}" slot="menu">
+ <!-- <el-button type="text" :size="size" icon="el-icon-edit" v-if="permission.houseRental_edit"
+ @click="showEditMoel(row)">编 辑
+ </el-button> -->
+
+
<el-button :size="size" type="text" icon="el-icon-circle-plus-outline"
v-if="permission.househould_manager" @click="ManageTenants(row)">管理租户
</el-button>
@@ -31,16 +37,17 @@
</avue-crud>
<el-dialog title="租户管理" append-to-body :visible.sync="roleBox">
- <avue-crud :option="houseHoldOption" :search.sync="search" :table-loading="loading" :data="houseHold"
- ref="crud" v-model="houseHoldForm" :permission="permissionList" @row-del="houseHoldRowDel"
- @row-update="houseHoldRowUpdate" @row-save="houseHoldRowSave" :page.sync="holdPage"
- @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
- @current-change="currentChange" @size-change="sizeChange"
+ <avue-crud :option="houseHoldOption" :search.sync="search" :table-loading="loading"
+ :data="houseHold" ref="crud" v-model="houseHoldForm" :permission="permissionList"
+ @row-del="houseHoldRowDel" @row-update="houseHoldRowUpdate" @row-save="houseHoldRowSave"
+ :page.sync="holdPage" @search-change="searchChange" @search-reset="searchReset"
+ @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange"></avue-crud>
</el-dialog>
<el-dialog title="用户数据导入" append-to-body :visible.sync="excelBox" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+
<template slot="excelTemplate">
<el-button type="primary" @click="handleTemplate">
点击下载<i class="el-icon-download el-icon--right"></i>
@@ -48,6 +55,10 @@
</template>
</avue-form>
</el-dialog>
+
+
+ <retalInfo ref="RetalInfo"></retalInfo>
+
</basic-container>
</el-col>
</el-row>
@@ -93,8 +104,11 @@
import func from "@/util/func"
import Qs from "qs"
import website from '@/config/website'
+
+import retalInfo from './components/retalInfo'
export default {
- data () {
+ components: {retalInfo},
+ data() {
return {
roleBox: false,
form: {},
@@ -141,14 +155,14 @@
{
label: "电话",
prop: "phoneNumber",
- width:100,
+ width: 100,
// search: true,
searchSpan: 4,
},
{
label: "身份证号",
prop: "idCard",
- width:160,
+ width: 160,
// search: true,
searchSpan: 4,
},
@@ -194,8 +208,8 @@
{
label: "地址",
prop: "address",
- minWidth:160,
- overHidden:true,
+ minWidth: 160,
+ overHidden: true,
display: false
},
]
@@ -214,6 +228,7 @@
selection: true,
viewBtn: true,
addBtn: true,
+ // editBtn: false,
dialogType: 'drawer',
dialogClickModal: false,
column: [
@@ -512,7 +527,7 @@
watch: {},
computed: {
...mapGetters(["userInfo", "permission"]),
- permissionList () {
+ permissionList() {
return {
addBtn: this.vaildData(this.permission.houseRental_add, true),
viewBtn: this.vaildData(this.permission.houseRental_view, true),
@@ -520,7 +535,7 @@
editBtn: this.vaildData(this.permission.houseRental_edit, true)
}
},
- showConfirmFlag () {
+ showConfirmFlag() {
return (data) => {
let tags = {}
@@ -540,16 +555,16 @@
}
}
},
- mounted () { },
+ mounted() { },
methods: {
- ManageTenants (item) {
+ ManageTenants(item) {
this.roleBox = true
this.rowHouseHold = item
this.onLoadHouseHold()
},
- onLoadHouseHold () {
+ onLoadHouseHold() {
let params = {
housingRentalId: this.rowHouseHold.id,
}
@@ -561,7 +576,7 @@
})
},
- houseHoldRowSave (row, done, loading) {
+ houseHoldRowSave(row, done, loading) {
row.aoiName = this.rowHouseHold.aoiName
row.address = this.rowHouseHold.address
row.housingRentalId = this.rowHouseHold.id
@@ -579,7 +594,7 @@
loading()
})
},
- rowSave (row, done, loading) {
+ rowSave(row, done, loading) {
if (row.fileUrls.length > 0) {
var urls = []
var split = row.fileUrls.split(",")
@@ -602,7 +617,7 @@
loading()
})
},
- rowUpdate (row, index, done, loading) {
+ rowUpdate(row, index, done, loading) {
if (row.fileUrls.length > 0) {
var urls = []
var split = row.fileUrls.split(",")
@@ -625,7 +640,7 @@
loading()
})
},
- houseHoldRowUpdate (row, index, done, loading) {
+ houseHoldRowUpdate(row, index, done, loading) {
householdUpdate(row).then(() => {
this.initFlag = false
this.onLoadHouseHold()
@@ -639,7 +654,7 @@
loading()
})
},
- houseHoldRowDel (row) {
+ houseHoldRowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@@ -656,7 +671,7 @@
})
})
},
- rowDel (row) {
+ rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@@ -673,25 +688,25 @@
})
})
},
- searchReset () {
+ searchReset() {
this.query = {}
this.treeDeptId = ''
this.onLoad(this.page)
},
- searchChange (params, done) {
+ searchChange(params, done) {
this.query = params
this.page.currentPage = 1
this.onLoad(this.page, params)
done()
},
- selectionChange (list) {
+ selectionChange(list) {
this.selectionList = list
},
- selectionClear () {
+ selectionClear() {
this.selectionList = []
// this.$refs.crud.toggleSelection();
},
- handleDelete () {
+ handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据")
return
@@ -713,16 +728,16 @@
this.$refs.crud.toggleSelection()
})
},
- handleImport () {
+ handleImport() {
this.excelBox = true
},
- uploadAfter (res, done, loading, column) {
+ uploadAfter(res, done, loading, column) {
window.console.log(column)
this.excelBox = false
this.refreshChange()
done()
},
- handleExport () {
+ handleExport() {
const account = func.toStr(this.search.account)
const realName = func.toStr(this.search.realName)
this.$confirm("是否导出出租信息数据?", "提示", {
@@ -744,12 +759,12 @@
})
})
},
- handleTemplate () {
+ handleTemplate() {
exportBlob(`/api/blade-system/user/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => {
downloadXls(res.data, "出租信息数据模板.xlsx")
})
},
- beforeOpen (done, type) {
+ beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetatil(this.form.id).then(res => {
this.form = res.data.data
@@ -766,16 +781,16 @@
this.initFlag = true
done()
},
- currentChange (currentPage) {
+ currentChange(currentPage) {
this.page.currentPage = currentPage
},
- sizeChange (pageSize) {
+ sizeChange(pageSize) {
this.page.pageSize = pageSize
},
- refreshChange () {
+ refreshChange() {
this.onLoad(this.page, this.query)
},
- onLoad (page, params = {}) {
+ onLoad(page, params = {}) {
this.loading = true
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
@@ -795,7 +810,11 @@
this.loading = false
this.selectionClear()
})
- }
+ },
+
+ showEditMoel(item) {
+ this.$refs.RetalInfo.initOpen(item.id)
+ },
}
}
</script>
--
Gitblit v1.9.3