Commit dfb62e8f327032ce1fec28dfe8270283120fccc3
Merge branch 'dev' of http://bj.gitlab.cnlive.com/cnlive_project/cnlive-community-web-vue into dev
Showing
5 changed files
with
372 additions
and
54 deletions
src/api/ownerManagement/owner.ts
| 1 | import request from '../request' | 1 | import request from '../request' |
| 2 | 2 | ||
| 3 | -// 列表查询 | 3 | +// 根据类型查询列表 |
| 4 | export function getTableList(params:any) { | 4 | export function getTableList(params:any) { |
| 5 | return request({ | 5 | return request({ |
| 6 | method: 'get', | 6 | method: 'get', |
| @@ -8,6 +8,14 @@ export function getTableList(params:any) { | @@ -8,6 +8,14 @@ export function getTableList(params:any) { | ||
| 8 | params: params | 8 | params: params |
| 9 | }) | 9 | }) |
| 10 | } | 10 | } |
| 11 | +// 根据条件查询列表 | ||
| 12 | +export function residentListByCondition(params:any) { | ||
| 13 | + return request({ | ||
| 14 | + method: 'get', | ||
| 15 | + url: '/resident/residentListByCondition', | ||
| 16 | + params: params | ||
| 17 | + }) | ||
| 18 | +} | ||
| 11 | 19 | ||
| 12 | // 房屋信息 | 20 | // 房屋信息 |
| 13 | export function getHouse(params:any) { | 21 | export function getHouse(params:any) { |
| @@ -18,10 +26,34 @@ export function getHouse(params:any) { | @@ -18,10 +26,34 @@ export function getHouse(params:any) { | ||
| 18 | }) | 26 | }) |
| 19 | } | 27 | } |
| 20 | // 删除 | 28 | // 删除 |
| 21 | -export function deleteHouse(params:any) { | 29 | +export function deleteResident(params:any) { |
| 22 | return request({ | 30 | return request({ |
| 23 | method: 'delete', | 31 | method: 'delete', |
| 24 | - url: '/house/deleteHouse', | 32 | + url: '/resident/deleteResident', |
| 33 | + params: params | ||
| 34 | + }) | ||
| 35 | +} | ||
| 36 | +// 删除 | ||
| 37 | +export function changeBinding(params:any) { | ||
| 38 | + return request({ | ||
| 39 | + method: 'PUT', | ||
| 40 | + url: '/resident/changeBinding', | ||
| 25 | params: params | 41 | params: params |
| 26 | }) | 42 | }) |
| 27 | } | 43 | } |
| 44 | +// 获取详情 | ||
| 45 | +export function getResidentById(params:any) { | ||
| 46 | + return request({ | ||
| 47 | + method: 'get', | ||
| 48 | + url: '/resident/getResidentById', | ||
| 49 | + params: params | ||
| 50 | + }) | ||
| 51 | +} | ||
| 52 | +// 修改 | ||
| 53 | +export function update(params:any) { | ||
| 54 | + return request({ | ||
| 55 | + method: 'post', | ||
| 56 | + url: '/resident/update', | ||
| 57 | + data: params | ||
| 58 | + }) | ||
| 59 | +} |
src/views/community/housekeeper/index.vue
| @@ -37,7 +37,6 @@ const search = (): void => { | @@ -37,7 +37,6 @@ const search = (): void => { | ||
| 37 | .then((res) => { | 37 | .then((res) => { |
| 38 | data.tableList = res.data.data.list; | 38 | data.tableList = res.data.data.list; |
| 39 | data.total = res.data.data.total; | 39 | data.total = res.data.data.total; |
| 40 | - searchData.pageSize = res.data.data.pageSize; | ||
| 41 | data.loading = false; | 40 | data.loading = false; |
| 42 | }) | 41 | }) |
| 43 | .catch((err) => { | 42 | .catch((err) => { |
| @@ -89,9 +88,7 @@ const dialogClose: void = () => { | @@ -89,9 +88,7 @@ const dialogClose: void = () => { | ||
| 89 | houseDetailRef.value.resetForm(); | 88 | houseDetailRef.value.resetForm(); |
| 90 | }; | 89 | }; |
| 91 | onMounted(() => { | 90 | onMounted(() => { |
| 92 | - searchData.neighborhoodId = route.query.neighborhoodId | ||
| 93 | - ? route.query.neighborhoodId | ||
| 94 | - : null; | 91 | + searchData.neighborhoodId = route.query.neighborhoodId??null; |
| 95 | search(); | 92 | search(); |
| 96 | }); | 93 | }); |
| 97 | </script> | 94 | </script> |
src/views/community/houses/index.vue
| @@ -74,9 +74,7 @@ const remove = (houseId: number) => { | @@ -74,9 +74,7 @@ const remove = (houseId: number) => { | ||
| 74 | }; | 74 | }; |
| 75 | 75 | ||
| 76 | onMounted(() => { | 76 | onMounted(() => { |
| 77 | - searchData.buildingId = route.query.buildingId | ||
| 78 | - ? route.query.buildingId | ||
| 79 | - : null; | 77 | + searchData.buildingId = route.query.buildingId??null; |
| 80 | search(); | 78 | search(); |
| 81 | }); | 79 | }); |
| 82 | </script> | 80 | </script> |
src/views/ownerManagement/owner/detail.vue
0 → 100644
| 1 | +<script setup lang="ts"> | ||
| 2 | +import { reactive, onMounted, watchEffect } from "vue"; | ||
| 3 | +import { getResidentById, update } from "@/api/ownerManagement/owner.ts"; | ||
| 4 | + | ||
| 5 | +// 声明props | ||
| 6 | +const props = defineProps({ | ||
| 7 | + id: { | ||
| 8 | + type: Number, | ||
| 9 | + default: null, | ||
| 10 | + }, | ||
| 11 | + isEdit: { | ||
| 12 | + type: Boolean, | ||
| 13 | + default: false, | ||
| 14 | + }, | ||
| 15 | +}); | ||
| 16 | +const data = reactive({ | ||
| 17 | + formObj: {}, | ||
| 18 | + genderList: [ | ||
| 19 | + { label: "男", value: 1 }, | ||
| 20 | + { label: "女", value: 0 }, | ||
| 21 | + ], | ||
| 22 | + isMarriedList: [ | ||
| 23 | + { label: "未婚", value: 0 }, | ||
| 24 | + { label: "已婚", value: 1 }, | ||
| 25 | + { label: "离异", value: 2 }, | ||
| 26 | + { label: "丧偶", value: 3 }, | ||
| 27 | + ], | ||
| 28 | + politicalList: [ | ||
| 29 | + { label: "群众", value: 0 }, | ||
| 30 | + { label: "党员", value: 1 }, | ||
| 31 | + { label: "团员", value: 2 }, | ||
| 32 | + ], | ||
| 33 | + censusList: [ | ||
| 34 | + { label: "非城镇户口", value: 0 }, | ||
| 35 | + { label: "城镇户口", value: 1 }, | ||
| 36 | + { label: "外阜", value: 2 }, | ||
| 37 | + ], | ||
| 38 | +}); | ||
| 39 | + | ||
| 40 | +/** | ||
| 41 | + * 获取详情 | ||
| 42 | + * @param { number } id 住户id | ||
| 43 | + * | ||
| 44 | + */ | ||
| 45 | +const getData = (id: number) => { | ||
| 46 | + getResidentById({ id: id }).then((res) => { | ||
| 47 | + data.formObj = res.data.data[0]; | ||
| 48 | + }); | ||
| 49 | +}; | ||
| 50 | + | ||
| 51 | +/** | ||
| 52 | + * | ||
| 53 | + * 数据提交 | ||
| 54 | + */ | ||
| 55 | +const submit = () => { | ||
| 56 | + update(data.formObj).then((res) => { | ||
| 57 | + console.log(res); | ||
| 58 | + }); | ||
| 59 | +}; | ||
| 60 | +/** | ||
| 61 | + * 监听改变 | ||
| 62 | + */ | ||
| 63 | +watchEffect((newValue, oldVlaue) => { | ||
| 64 | + if (props.id) { | ||
| 65 | + getData(props.id); | ||
| 66 | + } | ||
| 67 | +}); | ||
| 68 | +</script> | ||
| 69 | + | ||
| 70 | +<template> | ||
| 71 | + <el-form :model="formObj" label-width="120px" :inline="true"> | ||
| 72 | + <el-form-item label="所属小区:"> | ||
| 73 | + <el-input v-model="data.formObj.neighborhoodName" disabled></el-input> | ||
| 74 | + </el-form-item> | ||
| 75 | + <el-form-item label="楼宇名称:" prop="buildingName"> | ||
| 76 | + <el-input v-model="data.formObj.buildingName" disabled></el-input> | ||
| 77 | + </el-form-item> | ||
| 78 | + <el-form-item label="姓名:" prop="unitCount"> | ||
| 79 | + <el-input v-model="data.formObj.name" :disabled="props.isEdit"></el-input> | ||
| 80 | + </el-form-item> | ||
| 81 | + <el-form-item label="房间号:" prop="unitCount"> | ||
| 82 | + <el-input v-model="data.formObj.houseName" disabled></el-input> | ||
| 83 | + </el-form-item> | ||
| 84 | + <el-form-item label="身份证号:" prop="idcard"> | ||
| 85 | + <el-input | ||
| 86 | + v-model="data.formObj.idcard" | ||
| 87 | + :disabled="props.isEdit" | ||
| 88 | + ></el-input> | ||
| 89 | + </el-form-item> | ||
| 90 | + | ||
| 91 | + <el-form-item label="手机号:" prop="grossArea"> | ||
| 92 | + <el-input | ||
| 93 | + v-model="data.formObj.mobile" | ||
| 94 | + :disabled="props.isEdit" | ||
| 95 | + ></el-input> | ||
| 96 | + </el-form-item> | ||
| 97 | + <el-form-item label="出生日期:" prop="employArea"> | ||
| 98 | + <el-date-picker | ||
| 99 | + :disabled="props.isEdit" | ||
| 100 | + style="width: 200px" | ||
| 101 | + v-model="data.formObj.birthdate" | ||
| 102 | + type="date" | ||
| 103 | + placeholder="Select date and time" | ||
| 104 | + > | ||
| 105 | + </el-date-picker> | ||
| 106 | + </el-form-item> | ||
| 107 | + <el-form-item label="性别:" prop="employArea"> | ||
| 108 | + <el-select | ||
| 109 | + disabled | ||
| 110 | + v-model="data.formObj.gender" | ||
| 111 | + placeholder="请选择" | ||
| 112 | + style="width: 200px" | ||
| 113 | + > | ||
| 114 | + <el-option | ||
| 115 | + v-for="item in data.genderList" | ||
| 116 | + :key="item.value" | ||
| 117 | + :label="item.label" | ||
| 118 | + :value="item.value" | ||
| 119 | + > | ||
| 120 | + </el-option> | ||
| 121 | + </el-select> | ||
| 122 | + </el-form-item> | ||
| 123 | + <el-form-item label="民族:" prop="employArea"> | ||
| 124 | + <el-input v-model="data.formObj.nationality" disabled></el-input> | ||
| 125 | + </el-form-item> | ||
| 126 | + <el-form-item label="户籍所在地:" prop="employArea"> | ||
| 127 | + <el-input | ||
| 128 | + v-model="data.formObj.censusRegister" | ||
| 129 | + :disabled="props.isEdit" | ||
| 130 | + ></el-input> | ||
| 131 | + </el-form-item> | ||
| 132 | + <el-form-item label="婚姻状态:" prop="employArea"> | ||
| 133 | + <el-select | ||
| 134 | + :disabled="props.isEdit" | ||
| 135 | + v-model="data.formObj.isMarried" | ||
| 136 | + placeholder="请选择" | ||
| 137 | + style="width: 200px" | ||
| 138 | + > | ||
| 139 | + <el-option | ||
| 140 | + v-for="item in data.isMarriedList" | ||
| 141 | + :key="item.value" | ||
| 142 | + :label="item.label" | ||
| 143 | + :value="item.value" | ||
| 144 | + > | ||
| 145 | + </el-option> | ||
| 146 | + </el-select> | ||
| 147 | + </el-form-item> | ||
| 148 | + <el-form-item label="政治面貌:" prop="employArea"> | ||
| 149 | + <el-select | ||
| 150 | + v-model="data.formObj.politicalStatus" | ||
| 151 | + placeholder="请选择" | ||
| 152 | + style="width: 200px" | ||
| 153 | + :disabled="props.isEdit" | ||
| 154 | + > | ||
| 155 | + <el-option | ||
| 156 | + v-for="item in data.politicalList" | ||
| 157 | + :key="item.value" | ||
| 158 | + :label="item.label" | ||
| 159 | + :value="item.value" | ||
| 160 | + > | ||
| 161 | + </el-option> | ||
| 162 | + </el-select> | ||
| 163 | + </el-form-item> | ||
| 164 | + <el-form-item label="户口类型:" prop="employArea"> | ||
| 165 | + <el-select | ||
| 166 | + v-model="data.formObj.censusType" | ||
| 167 | + placeholder="请选择" | ||
| 168 | + style="width: 200px" | ||
| 169 | + :disabled="props.isEdit" | ||
| 170 | + > | ||
| 171 | + <el-option | ||
| 172 | + v-for="item in data.censusList" | ||
| 173 | + :key="item.value" | ||
| 174 | + :label="item.label" | ||
| 175 | + :value="item.value" | ||
| 176 | + > | ||
| 177 | + </el-option> | ||
| 178 | + </el-select> | ||
| 179 | + </el-form-item> | ||
| 180 | + <el-form-item label="居住类型:" prop="employArea"> | ||
| 181 | + <el-input | ||
| 182 | + v-model="data.formObj.useArea" | ||
| 183 | + :disabled="props.isEdit" | ||
| 184 | + ></el-input> | ||
| 185 | + </el-form-item> | ||
| 186 | + <el-form-item label="现住地址:" prop="employArea"> | ||
| 187 | + <el-input | ||
| 188 | + v-model="data.formObj.location" | ||
| 189 | + :disabled="props.isEdit" | ||
| 190 | + ></el-input> | ||
| 191 | + </el-form-item> | ||
| 192 | + <el-form-item label="暂住证号:" prop="employArea"> | ||
| 193 | + <el-input | ||
| 194 | + v-model="data.formObj.residencePermit" | ||
| 195 | + :disabled="props.isEdit" | ||
| 196 | + ></el-input> | ||
| 197 | + </el-form-item> | ||
| 198 | + <el-row> | ||
| 199 | + <el-form-item> | ||
| 200 | + <el-button type="primary" @click="submit">保存</el-button> | ||
| 201 | + </el-form-item> | ||
| 202 | + </el-row> | ||
| 203 | + </el-form> | ||
| 204 | +</template> |
src/views/ownerManagement/owner/index.vue
| 1 | <script setup lang="ts"> | 1 | <script setup lang="ts"> |
| 2 | import { reactive, onMounted, getCurrentInstance } from "vue"; | 2 | import { reactive, onMounted, getCurrentInstance } from "vue"; |
| 3 | -import { getTableList } from "@/api/ownerManagement/owner.ts"; | ||
| 4 | -// import CommunityDetail from "./communityDetail.vue"; | 3 | +import { |
| 4 | + getTableList, | ||
| 5 | + residentListByCondition, | ||
| 6 | + deleteResident, | ||
| 7 | + changeBinding, | ||
| 8 | +} from "@/api/ownerManagement/owner.ts"; | ||
| 9 | +import Detail from "./detail.vue"; | ||
| 5 | import Pagination from "@/components/Pagination/index.vue"; | 10 | import Pagination from "@/components/Pagination/index.vue"; |
| 6 | 11 | ||
| 7 | let instance: ComponentInternalInstance | null = getCurrentInstance(); //获取app实例 | 12 | let instance: ComponentInternalInstance | null = getCurrentInstance(); //获取app实例 |
| 8 | // 数据筛选 | 13 | // 数据筛选 |
| 9 | const searchData = reactive({ | 14 | const searchData = reactive({ |
| 10 | isOwner: null, | 15 | isOwner: null, |
| 11 | - pageNum: 1, | 16 | + startTime: "", |
| 17 | + endTime: "", | ||
| 18 | + houseId: null, | ||
| 19 | + condition: "", | ||
| 20 | + page: 1, | ||
| 12 | pageSize: 10, | 21 | pageSize: 10, |
| 13 | }); | 22 | }); |
| 14 | // 展示 | 23 | // 展示 |
| 15 | const data = reactive({ | 24 | const data = reactive({ |
| 16 | total: 0, | 25 | total: 0, |
| 17 | tableList: [], | 26 | tableList: [], |
| 27 | + time: [], | ||
| 18 | dialogVisible: false, | 28 | dialogVisible: false, |
| 19 | loading: false, | 29 | loading: false, |
| 20 | - title: "新增小区", | ||
| 21 | - formObj: {}, | ||
| 22 | - options:[ | ||
| 23 | - {label:'业主',value:1}, | ||
| 24 | - {label:'租户',value:2}, | ||
| 25 | - {label:'住户',value:3} | ||
| 26 | - ] | 30 | + title: "详情", |
| 31 | + currId: null, | ||
| 32 | + isEdit:false, | ||
| 33 | + options: [ | ||
| 34 | + { label: "业主", value: 1 }, | ||
| 35 | + { label: "租户", value: 2 }, | ||
| 36 | + { label: "住户", value: 3 }, | ||
| 37 | + ], | ||
| 27 | }); | 38 | }); |
| 28 | 39 | ||
| 29 | /** | 40 | /** |
| 41 | + * 类型变化监听 | ||
| 42 | + */ | ||
| 43 | +const chengeType = (e: Event) => { | ||
| 44 | + data.loading = true; | ||
| 45 | + getTableList({ | ||
| 46 | + page: searchData.page, | ||
| 47 | + pageSize: searchData.pageSize, | ||
| 48 | + isOwner: e == "" ? null : e, | ||
| 49 | + houseId: searchData.houseId, | ||
| 50 | + }) | ||
| 51 | + .then((res) => { | ||
| 52 | + data.tableList = res.data.data.list; | ||
| 53 | + data.total = res.data.data.total; | ||
| 54 | + data.loading = false; | ||
| 55 | + }) | ||
| 56 | + .catch((err) => { | ||
| 57 | + console.log(err); | ||
| 58 | + data.loading = false; | ||
| 59 | + }); | ||
| 60 | +}; | ||
| 61 | +/** | ||
| 30 | * 列表查询 | 62 | * 列表查询 |
| 31 | */ | 63 | */ |
| 32 | const search = (): void => { | 64 | const search = (): void => { |
| 33 | data.loading = true; | 65 | data.loading = true; |
| 34 | - getTableList(searchData) | 66 | + searchData.startTime = data.time?.[0] ?? null; |
| 67 | + searchData.endTime = data.time?.[1] ?? null; | ||
| 68 | + residentListByCondition(searchData) | ||
| 35 | .then((res) => { | 69 | .then((res) => { |
| 36 | data.tableList = res.data.data.list; | 70 | data.tableList = res.data.data.list; |
| 37 | data.total = res.data.data.total; | 71 | data.total = res.data.data.total; |
| 38 | - searchData.pageSize = res.data.data.pageSize; | ||
| 39 | data.loading = false; | 72 | data.loading = false; |
| 40 | }) | 73 | }) |
| 41 | .catch((err) => { | 74 | .catch((err) => { |
| @@ -43,24 +76,45 @@ const search = (): void => { | @@ -43,24 +76,45 @@ const search = (): void => { | ||
| 43 | data.loading = false; | 76 | data.loading = false; |
| 44 | }); | 77 | }); |
| 45 | }; | 78 | }; |
| 79 | + | ||
| 46 | /** | 80 | /** |
| 47 | * 编辑 | 81 | * 编辑 |
| 48 | - * @param { Object } 列表对象 | 82 | + * @param { number } id 唯一标识 |
| 83 | + * @param { Boolean } isEdit 是否可编辑 | ||
| 49 | */ | 84 | */ |
| 50 | -const edit = (row: Object) => { | ||
| 51 | - data.formObj = row; | 85 | +const checkDetail = (id: number,isEdit:Boolean) => { |
| 86 | + data.currId = id; | ||
| 87 | + data.isEdit = isEdit; | ||
| 52 | data.dialogVisible = true; | 88 | data.dialogVisible = true; |
| 53 | }; | 89 | }; |
| 54 | /** | 90 | /** |
| 55 | * 删除 | 91 | * 删除 |
| 56 | - * @param { number } neighborhoodId 小区ID | 92 | + * @param { number } houseResidentId 住户ID |
| 93 | + * @param { type } type 类型 0:删除操作 1:取消绑定 | ||
| 57 | */ | 94 | */ |
| 58 | -const remove = (neighborhoodId: number) => { | ||
| 59 | - // deleteNeighborhood({ neighborhoodId: neighborhoodId }).then((res) => { | ||
| 60 | - // instance?.proxy?.$message.success('操作成功')//调用 | ||
| 61 | - // search(); | ||
| 62 | - // }); | 95 | +const changeInfo = (houseResidentId: number, type: number) => { |
| 96 | + instance?.proxy?.$messageBox | ||
| 97 | + .confirm("确认要进行此操作?", "提示", { | ||
| 98 | + confirmButtonText: "确定", | ||
| 99 | + cancelButtonText: "取消", | ||
| 100 | + }) | ||
| 101 | + .then(() => { | ||
| 102 | + let pram = { houseResidentId: houseResidentId }; | ||
| 103 | + if (type == 0) { | ||
| 104 | + deleteResident({ houseResidentId: houseResidentId }).then((res) => { | ||
| 105 | + instance?.proxy?.$message.success("操作成功"); | ||
| 106 | + search(); | ||
| 107 | + }); | ||
| 108 | + } else { | ||
| 109 | + changeBinding({ houseResidentId: houseResidentId }).then((res) => { | ||
| 110 | + instance?.proxy?.$message.success("操作成功"); | ||
| 111 | + search(); | ||
| 112 | + }); | ||
| 113 | + } | ||
| 114 | + }) | ||
| 115 | + .catch((err) => {}); | ||
| 63 | }; | 116 | }; |
| 117 | + | ||
| 64 | /** | 118 | /** |
| 65 | * 组件操作成功回调 | 119 | * 组件操作成功回调 |
| 66 | */ | 120 | */ |
| @@ -73,10 +127,9 @@ const changeData: void = () => { | @@ -73,10 +127,9 @@ const changeData: void = () => { | ||
| 73 | * 弹框关闭 | 127 | * 弹框关闭 |
| 74 | */ | 128 | */ |
| 75 | const dialogClose: void = () => { | 129 | const dialogClose: void = () => { |
| 76 | - data.formObj = {}; | 130 | + data.currId=null |
| 77 | }; | 131 | }; |
| 78 | onMounted(() => { | 132 | onMounted(() => { |
| 79 | - console.log("11"); | ||
| 80 | search(); | 133 | search(); |
| 81 | }); | 134 | }); |
| 82 | </script> | 135 | </script> |
| @@ -85,7 +138,12 @@ onMounted(() => { | @@ -85,7 +138,12 @@ onMounted(() => { | ||
| 85 | <!-- 搜索 --> | 138 | <!-- 搜索 --> |
| 86 | <el-form :inline="true" :model="searchData" v-loading="data.loading"> | 139 | <el-form :inline="true" :model="searchData" v-loading="data.loading"> |
| 87 | <el-form-item> | 140 | <el-form-item> |
| 88 | - <el-select v-model="searchData.isOwner" placeholder="请选择类型"> | 141 | + <el-select |
| 142 | + v-model="searchData.isOwner" | ||
| 143 | + placeholder="请选择类型" | ||
| 144 | + clearable | ||
| 145 | + @change="chengeType" | ||
| 146 | + > | ||
| 89 | <el-option | 147 | <el-option |
| 90 | v-for="item in data.options" | 148 | v-for="item in data.options" |
| 91 | :key="item.value" | 149 | :key="item.value" |
| @@ -95,6 +153,23 @@ onMounted(() => { | @@ -95,6 +153,23 @@ onMounted(() => { | ||
| 95 | </el-option> | 153 | </el-option> |
| 96 | </el-select> | 154 | </el-select> |
| 97 | </el-form-item> | 155 | </el-form-item> |
| 156 | + <el-form-item> | ||
| 157 | + <el-date-picker | ||
| 158 | + v-model="data.time" | ||
| 159 | + type="datetimerange" | ||
| 160 | + range-separator="至" | ||
| 161 | + start-placeholder="开始时间" | ||
| 162 | + end-placeholder="结束时间" | ||
| 163 | + > | ||
| 164 | + </el-date-picker> | ||
| 165 | + </el-form-item> | ||
| 166 | + <el-form-item> | ||
| 167 | + <el-input | ||
| 168 | + v-model="searchData.condition" | ||
| 169 | + placeholder="请输入/姓名/手机号/身份证号" | ||
| 170 | + clearable | ||
| 171 | + ></el-input> | ||
| 172 | + </el-form-item> | ||
| 98 | <el-form-item | 173 | <el-form-item |
| 99 | ><el-button type="primary" @click="search" | 174 | ><el-button type="primary" @click="search" |
| 100 | >查询</el-button | 175 | >查询</el-button |
| @@ -102,32 +177,43 @@ onMounted(() => { | @@ -102,32 +177,43 @@ onMounted(() => { | ||
| 102 | > | 177 | > |
| 103 | <el-row> | 178 | <el-row> |
| 104 | <el-form-item> | 179 | <el-form-item> |
| 105 | - <el-button type="primary">导入</el-button> | 180 | + <!-- <el-button type="primary">导入</el-button> |
| 106 | <el-button type="primary">导出</el-button> | 181 | <el-button type="primary">导出</el-button> |
| 107 | <el-button type="primary" @click="data.dialogVisible = true" | 182 | <el-button type="primary" @click="data.dialogVisible = true" |
| 108 | >新增</el-button | 183 | >新增</el-button |
| 109 | - > | 184 | + > --> |
| 110 | </el-form-item> | 185 | </el-form-item> |
| 111 | </el-row> | 186 | </el-row> |
| 112 | </el-form> | 187 | </el-form> |
| 113 | 188 | ||
| 114 | <!-- 表格 --> | 189 | <!-- 表格 --> |
| 115 | <el-table border :data="data.tableList"> | 190 | <el-table border :data="data.tableList"> |
| 116 | - <el-table-column label="房产名称" prop="name"></el-table-column> | ||
| 117 | - <el-table-column label="姓名" prop="buildingCount"></el-table-column> | ||
| 118 | - <el-table-column label="手机号" prop="storeroomCount"></el-table-column> | ||
| 119 | - <el-table-column label="身份证" prop="truckSpaceCount"></el-table-column> | ||
| 120 | - <el-table-column label="绑定日期" prop="locality"></el-table-column> | ||
| 121 | - <el-table-column label="类型" prop="address"></el-table-column> | 191 | + <el-table-column label="房产名称"> |
| 192 | + <template #default="scope"> | ||
| 193 | + <span>{{ | ||
| 194 | + `${scope.row.neighborhoodName} ${scope.row.buildingName}${scope.row.houseName}` | ||
| 195 | + }}</span> | ||
| 196 | + </template> | ||
| 197 | + </el-table-column> | ||
| 198 | + <el-table-column label="姓名" prop="name"></el-table-column> | ||
| 199 | + <el-table-column label="手机号" prop="mobile"></el-table-column> | ||
| 200 | + <el-table-column label="身份证" prop="idcard"></el-table-column> | ||
| 201 | + <el-table-column label="绑定日期" prop="bindDate"></el-table-column> | ||
| 202 | + <el-table-column label="类型" prop="isOwner"></el-table-column> | ||
| 122 | <el-table-column label="操作"> | 203 | <el-table-column label="操作"> |
| 123 | <template #default="scope"> | 204 | <template #default="scope"> |
| 124 | - <el-button type="text" size="mini" @click="edit(scope.row)" | ||
| 125 | - >编辑</el-button | 205 | + <el-button type="text" size="mini" @click="checkDetail(scope.row.id,true)"> |
| 206 | + 查看</el-button | ||
| 207 | + > | ||
| 208 | + <el-button type="text" size="mini" @click="changeInfo(scope.row.id,1)" | ||
| 209 | + >取消绑定</el-button | ||
| 210 | + > | ||
| 211 | + <el-button type="text" size="mini" @click="checkDetail(scope.row.id,false)"> | ||
| 212 | + 编辑</el-button | ||
| 126 | > | 213 | > |
| 127 | - <el-button type="text" size="mini" @click="remove(scope.row.id)" | 214 | + <el-button type="text" size="mini" @click="changeInfo(scope.row.id,0)" |
| 128 | >删除</el-button | 215 | >删除</el-button |
| 129 | > | 216 | > |
| 130 | - <el-button type="text" size="mini">楼宇管理</el-button> | ||
| 131 | </template> | 217 | </template> |
| 132 | </el-table-column> | 218 | </el-table-column> |
| 133 | </el-table> | 219 | </el-table> |
| @@ -136,24 +222,25 @@ onMounted(() => { | @@ -136,24 +222,25 @@ onMounted(() => { | ||
| 136 | <Pagination | 222 | <Pagination |
| 137 | v-if="data.total > 0" | 223 | v-if="data.total > 0" |
| 138 | :total="data.total" | 224 | :total="data.total" |
| 139 | - :currentPage="searchData.pageNum" | 225 | + :currentPage="searchData.page" |
| 140 | :pageSize="searchData.pageSize" | 226 | :pageSize="searchData.pageSize" |
| 141 | @pageChange="search" | 227 | @pageChange="search" |
| 142 | ></Pagination> | 228 | ></Pagination> |
| 143 | 229 | ||
| 144 | <!-- 详情弹框 --> | 230 | <!-- 详情弹框 --> |
| 145 | - <!-- <el-dialog | 231 | + <el-dialog |
| 146 | v-model="data.dialogVisible" | 232 | v-model="data.dialogVisible" |
| 147 | :title="data.title" | 233 | :title="data.title" |
| 148 | - width="30%" | 234 | + width="80%" |
| 149 | @close="dialogClose" | 235 | @close="dialogClose" |
| 150 | - > --> | ||
| 151 | - <!-- <CommunityDetail | 236 | + > |
| 237 | + <Detail | ||
| 152 | @cancel="data.dialogVisible = false" | 238 | @cancel="data.dialogVisible = false" |
| 153 | @success="changeData" | 239 | @success="changeData" |
| 154 | - :formObj="data.formObj" | ||
| 155 | - ></CommunityDetail> --> | ||
| 156 | - <!-- </el-dialog> --> | 240 | + :id="data.currId" |
| 241 | + :isEdit="data.isEdit" | ||
| 242 | + ></Detail> | ||
| 243 | + </el-dialog> | ||
| 157 | </div> | 244 | </div> |
| 158 | </template> | 245 | </template> |
| 159 | 246 |