Commit f5e486847d9a3bd5670f3d6e7e6bcb3cfb294d27
1 parent
edd59199
fix bug
Showing
9 changed files
with
251 additions
and
48 deletions
src/api/community/housekeeper.ts
| @@ -25,3 +25,11 @@ export function deleteBuilding(params:any) { | @@ -25,3 +25,11 @@ export function deleteBuilding(params:any) { | ||
| 25 | params: params | 25 | params: params |
| 26 | }) | 26 | }) |
| 27 | } | 27 | } |
| 28 | +// 更换楼管 | ||
| 29 | +export function addOrUpBuildingHouseKeeper(params:any) { | ||
| 30 | + return request({ | ||
| 31 | + method: 'PUT', | ||
| 32 | + url: '/building/addOrUpBuildingHouseKeeper', | ||
| 33 | + params: params | ||
| 34 | + }) | ||
| 35 | +} |
src/views/community/housekeeper/changeAdmin.vue
0 → 100644
| 1 | +<script setup lang="ts"> | ||
| 2 | +import { reactive, onMounted, ref, getCurrentInstance, defineProps } from "vue"; | ||
| 3 | +import { getTableList } from "@/api/housekeeper/buildinMganager.ts"; | ||
| 4 | +import { addOrUpBuildingHouseKeeper } from "@/api/community/housekeeper.ts"; | ||
| 5 | +import Pagination from "@/components/Pagination/index.vue"; | ||
| 6 | + | ||
| 7 | +let instance: ComponentInternalInstance | null = getCurrentInstance(); //获取app实例 | ||
| 8 | +// 声明props | ||
| 9 | +const props = defineProps({ | ||
| 10 | + buildingId: { | ||
| 11 | + type: Number, | ||
| 12 | + default: null, | ||
| 13 | + }, | ||
| 14 | + originalIds: { | ||
| 15 | + type: Number, | ||
| 16 | + default: null, | ||
| 17 | + }, | ||
| 18 | +}); | ||
| 19 | + | ||
| 20 | +// 数据筛选 | ||
| 21 | +const searchData = reactive({ | ||
| 22 | + condition: "", | ||
| 23 | + page: 1, | ||
| 24 | + pageSize: 10, | ||
| 25 | +}); | ||
| 26 | +// 展示 | ||
| 27 | +const data = reactive({ | ||
| 28 | + total: 0, | ||
| 29 | + tableList: [], | ||
| 30 | + loading: false, | ||
| 31 | + options: [ | ||
| 32 | + { label: "选举", value: 0 }, | ||
| 33 | + { label: "派驻", value: 1 }, | ||
| 34 | + ], | ||
| 35 | + selectList: [] | ||
| 36 | +}); | ||
| 37 | + | ||
| 38 | +/** | ||
| 39 | + * 列表查询 | ||
| 40 | + */ | ||
| 41 | +const search = (): void => { | ||
| 42 | + data.loading = true; | ||
| 43 | + getTableList(searchData) | ||
| 44 | + .then((res) => { | ||
| 45 | + console.log(res); | ||
| 46 | + data.tableList = res.data.data; | ||
| 47 | + data.total = res.data.data.length; | ||
| 48 | + data.loading = false; | ||
| 49 | + }) | ||
| 50 | + .catch((err) => { | ||
| 51 | + console.log(err); | ||
| 52 | + data.loading = false; | ||
| 53 | + }); | ||
| 54 | +}; | ||
| 55 | +/** | ||
| 56 | + * 表格选择回调 | ||
| 57 | + */ | ||
| 58 | +const handleSelectionChange = (val:Array) => { | ||
| 59 | + data.selectList=val.map((val: any) =>{ | ||
| 60 | + return val.id | ||
| 61 | + }) | ||
| 62 | +} | ||
| 63 | + | ||
| 64 | +const submit=()=>{ | ||
| 65 | + console.log(data.selectList.length) | ||
| 66 | + if(data.selectList.length==0){ | ||
| 67 | + instance?.proxy?.$message.error('请选择新的楼管') | ||
| 68 | + }else{ | ||
| 69 | + addOrUpBuildingHouseKeeper({buildingId:props.buildingId,houseKeeperIds:data.selectList[0],originalIds:props.originalIds}).then((res)=>{ | ||
| 70 | + console.log(res) | ||
| 71 | + }) | ||
| 72 | + } | ||
| 73 | +} | ||
| 74 | + | ||
| 75 | +onMounted(() => { | ||
| 76 | + search(); | ||
| 77 | +}); | ||
| 78 | +</script> | ||
| 79 | +<template> | ||
| 80 | + <div> | ||
| 81 | + <!-- 搜索 --> | ||
| 82 | + <el-form :inline="true" :model="searchData" v-loading="data.loading"> | ||
| 83 | + <el-form-item> | ||
| 84 | + <el-input | ||
| 85 | + style="width: 280px" | ||
| 86 | + placeholder="请输入姓名/手机号/身份证号" | ||
| 87 | + v-model="searchData.condition" | ||
| 88 | + clearable | ||
| 89 | + ></el-input> | ||
| 90 | + </el-form-item> | ||
| 91 | + <el-form-item | ||
| 92 | + ><el-button type="primary" @click="search" | ||
| 93 | + >查询</el-button | ||
| 94 | + ></el-form-item | ||
| 95 | + > | ||
| 96 | + <el-form-item | ||
| 97 | + ><el-button type="primary" @click="submit" | ||
| 98 | + >确认选择</el-button | ||
| 99 | + ></el-form-item | ||
| 100 | + > | ||
| 101 | + </el-form> | ||
| 102 | + | ||
| 103 | + <!-- 表格 --> | ||
| 104 | + <el-table border :data="data.tableList" @selection-change="handleSelectionChange"> | ||
| 105 | + <el-table-column type="selection" width="55"/> | ||
| 106 | + <el-table-column label="姓名" prop="name"></el-table-column> | ||
| 107 | + <el-table-column label="手机号" prop="mobile"></el-table-column> | ||
| 108 | + <el-table-column label="身份证号" prop="idcard"></el-table-column> | ||
| 109 | + <el-table-column label="类型"> | ||
| 110 | + <template #default="scope"> | ||
| 111 | + <span>{{ scope.row.type == 0 ? "选举" : "派驻" }}</span></template | ||
| 112 | + > | ||
| 113 | + </el-table-column> | ||
| 114 | + </el-table> | ||
| 115 | + | ||
| 116 | + <!-- 分页 --> | ||
| 117 | + <Pagination | ||
| 118 | + v-if="data.total > 0" | ||
| 119 | + :total="data.total" | ||
| 120 | + :currentPage="searchData.pageNum" | ||
| 121 | + :pageSize="searchData.pageSize" | ||
| 122 | + @pageChange="search" | ||
| 123 | + ></Pagination> | ||
| 124 | + </div> | ||
| 125 | +</template> | ||
| 126 | + | ||
| 127 | +<style></style> |
src/views/community/housekeeper/houseDetail.vue
| @@ -175,13 +175,14 @@ defineExpose({ | @@ -175,13 +175,14 @@ defineExpose({ | ||
| 175 | <el-form-item label="楼宇名称:" prop="buildingName"> | 175 | <el-form-item label="楼宇名称:" prop="buildingName"> |
| 176 | <el-input | 176 | <el-input |
| 177 | v-model="props.formObj.buildingName" | 177 | v-model="props.formObj.buildingName" |
| 178 | + :disabled="!!props.formObj.id" | ||
| 178 | placeholder="请输入楼宇名称" | 179 | placeholder="请输入楼宇名称" |
| 179 | ></el-input> | 180 | ></el-input> |
| 180 | </el-form-item> | 181 | </el-form-item> |
| 181 | - <el-form-item label="单元数:" prop="unitCount"> | 182 | + <el-form-item label="单元:" prop="unitCount"> |
| 182 | <el-input | 183 | <el-input |
| 183 | v-model="props.formObj.unitCount" | 184 | v-model="props.formObj.unitCount" |
| 184 | - placeholder="请输入单元数" | 185 | + placeholder="请输入单元" |
| 185 | onkeyup="value=value.replace(/[^\d]/g,'')" | 186 | onkeyup="value=value.replace(/[^\d]/g,'')" |
| 186 | ></el-input> | 187 | ></el-input> |
| 187 | </el-form-item> | 188 | </el-form-item> |
src/views/community/housekeeper/index.vue
| 1 | <script setup lang="ts"> | 1 | <script setup lang="ts"> |
| 2 | -import { reactive, onMounted, ref, getCurrentInstance } from "vue"; | 2 | +import { reactive, onMounted, ref, getCurrentInstance, watchEffect } from "vue"; |
| 3 | import { getTableList, deleteBuilding } from "@/api/community/housekeeper.ts"; | 3 | import { getTableList, deleteBuilding } from "@/api/community/housekeeper.ts"; |
| 4 | import { parseTime } from "@/utils/tool.ts"; | 4 | import { parseTime } from "@/utils/tool.ts"; |
| 5 | import HouseDetail from "./houseDetail.vue"; | 5 | import HouseDetail from "./houseDetail.vue"; |
| 6 | +import ChangeAdmin from "./changeAdmin.vue"; | ||
| 6 | import Pagination from "@/components/Pagination/index.vue"; | 7 | import Pagination from "@/components/Pagination/index.vue"; |
| 7 | import { useRoute } from "vue-router"; | 8 | import { useRoute } from "vue-router"; |
| 8 | 9 | ||
| @@ -27,6 +28,12 @@ const data = reactive({ | @@ -27,6 +28,12 @@ const data = reactive({ | ||
| 27 | title: "新增楼宇", | 28 | title: "新增楼宇", |
| 28 | formObj: {}, | 29 | formObj: {}, |
| 29 | }); | 30 | }); |
| 31 | +// 更换楼管相关数据属性 | ||
| 32 | +const changeObj = reactive({ | ||
| 33 | + currBuildingId:null, | ||
| 34 | + originalId:null, | ||
| 35 | + changeVisible: false, | ||
| 36 | +}); | ||
| 30 | 37 | ||
| 31 | /** | 38 | /** |
| 32 | * 列表查询 | 39 | * 列表查询 |
| @@ -87,9 +94,23 @@ const dialogClose: void = () => { | @@ -87,9 +94,23 @@ const dialogClose: void = () => { | ||
| 87 | data.formObj = {}; | 94 | data.formObj = {}; |
| 88 | houseDetailRef.value.resetForm(); | 95 | houseDetailRef.value.resetForm(); |
| 89 | }; | 96 | }; |
| 90 | -onMounted(() => { | ||
| 91 | - searchData.neighborhoodId = route.query.neighborhoodId??null; | ||
| 92 | - search(); | 97 | +/** |
| 98 | + * 更换楼管 | ||
| 99 | + * @param { Object } row 操作对象 | ||
| 100 | + */ | ||
| 101 | +const changeManage:void = (row:Object) => { | ||
| 102 | + changeObj.currBuildingId=row.id; | ||
| 103 | + changeObj.originalId=row.housekeeper.id | ||
| 104 | + changeObj.changeVisible=true | ||
| 105 | +} | ||
| 106 | +/** | ||
| 107 | + * 监听路由参数变换 | ||
| 108 | + */ | ||
| 109 | +watchEffect(() => { | ||
| 110 | + if (route.path == "/housekeeper") { | ||
| 111 | + searchData.neighborhoodId = route.query.neighborhoodId ?? null; | ||
| 112 | + search(); | ||
| 113 | + } | ||
| 93 | }); | 114 | }); |
| 94 | </script> | 115 | </script> |
| 95 | 116 | ||
| @@ -128,7 +149,7 @@ onMounted(() => { | @@ -128,7 +149,7 @@ onMounted(() => { | ||
| 128 | > | 149 | > |
| 129 | </el-table-column> | 150 | </el-table-column> |
| 130 | <el-table-column label="楼宇名称" prop="buildingName"></el-table-column> | 151 | <el-table-column label="楼宇名称" prop="buildingName"></el-table-column> |
| 131 | - <el-table-column label="单元数" prop="unitCount"></el-table-column> | 152 | + <el-table-column label="单元" prop="unitCount"></el-table-column> |
| 132 | <el-table-column label="总房屋数量" prop="houseCount"></el-table-column> | 153 | <el-table-column label="总房屋数量" prop="houseCount"></el-table-column> |
| 133 | <el-table-column label="建成日期" prop="createTime"> | 154 | <el-table-column label="建成日期" prop="createTime"> |
| 134 | <template #default="scope"> | 155 | <template #default="scope"> |
| @@ -137,17 +158,14 @@ onMounted(() => { | @@ -137,17 +158,14 @@ onMounted(() => { | ||
| 137 | </el-table-column> | 158 | </el-table-column> |
| 138 | <el-table-column label="建筑面积" prop="grossArea"></el-table-column> | 159 | <el-table-column label="建筑面积" prop="grossArea"></el-table-column> |
| 139 | <el-table-column label="使用面积" prop="employArea"></el-table-column> | 160 | <el-table-column label="使用面积" prop="employArea"></el-table-column> |
| 140 | - <el-table-column | ||
| 141 | - label="楼管姓名" | ||
| 142 | - | ||
| 143 | - > | ||
| 144 | - <template #default="scope"> | ||
| 145 | - <span>{{ scope.row.housekeeper?.name }}</span> | ||
| 146 | - </template> | 161 | + <el-table-column label="楼管姓名"> |
| 162 | + <template #default="scope"> | ||
| 163 | + <span>{{ scope.row.housekeeper?.name }}</span> | ||
| 164 | + </template> | ||
| 147 | </el-table-column> | 165 | </el-table-column> |
| 148 | <el-table-column label="操作"> | 166 | <el-table-column label="操作"> |
| 149 | <template #default="scope"> | 167 | <template #default="scope"> |
| 150 | - <el-button type="text" size="mini">更换楼管</el-button> | 168 | + <el-button type="text" size="mini" @click="changeManage(scope.row)">更换楼管</el-button> |
| 151 | <router-link | 169 | <router-link |
| 152 | :to="{ | 170 | :to="{ |
| 153 | name: 'houses', | 171 | name: 'houses', |
| @@ -189,6 +207,15 @@ onMounted(() => { | @@ -189,6 +207,15 @@ onMounted(() => { | ||
| 189 | :formObj="data.formObj" | 207 | :formObj="data.formObj" |
| 190 | ></HouseDetail> | 208 | ></HouseDetail> |
| 191 | </el-dialog> | 209 | </el-dialog> |
| 210 | + | ||
| 211 | + <!-- 更换楼管 --> | ||
| 212 | + <el-dialog | ||
| 213 | + v-model="changeObj.changeVisible" | ||
| 214 | + title="更换楼管" | ||
| 215 | + width="60%" | ||
| 216 | + > | ||
| 217 | + <ChangeAdmin :buildingId="changeObj.currBuildingId" :originalIds="changeObj.originalId"></ChangeAdmin> | ||
| 218 | + </el-dialog> | ||
| 192 | </div> | 219 | </div> |
| 193 | </template> | 220 | </template> |
| 194 | 221 |
src/views/community/houses/index.vue
| 1 | <script setup lang="ts"> | 1 | <script setup lang="ts"> |
| 2 | -import { reactive, onMounted, getCurrentInstance } from "vue"; | 2 | +import { reactive, onMounted, getCurrentInstance,watchEffect } from "vue"; |
| 3 | import { getTableList, deleteHouse, getHouse } from "@/api/community/houses.ts"; | 3 | import { getTableList, deleteHouse, getHouse } from "@/api/community/houses.ts"; |
| 4 | import { parseTime } from "@/utils/tool.ts"; | 4 | import { parseTime } from "@/utils/tool.ts"; |
| 5 | import Detail from "./detail.vue"; | 5 | import Detail from "./detail.vue"; |
| @@ -35,7 +35,6 @@ const search = (): void => { | @@ -35,7 +35,6 @@ const search = (): void => { | ||
| 35 | .then((res) => { | 35 | .then((res) => { |
| 36 | data.tableList = res.data.data.list; | 36 | data.tableList = res.data.data.list; |
| 37 | data.total = res.data.data.total; | 37 | data.total = res.data.data.total; |
| 38 | - searchData.pageSize = res.data.data.pageSize; | ||
| 39 | data.loading = false; | 38 | data.loading = false; |
| 40 | }) | 39 | }) |
| 41 | .catch((err) => { | 40 | .catch((err) => { |
| @@ -72,10 +71,14 @@ const remove = (houseId: number) => { | @@ -72,10 +71,14 @@ const remove = (houseId: number) => { | ||
| 72 | }) | 71 | }) |
| 73 | .catch((err) => {}); | 72 | .catch((err) => {}); |
| 74 | }; | 73 | }; |
| 75 | - | ||
| 76 | -onMounted(() => { | ||
| 77 | - searchData.buildingId = route.query.buildingId??null; | ||
| 78 | - search(); | 74 | +/** |
| 75 | + * 监听路由参数变换 | ||
| 76 | + */ | ||
| 77 | +watchEffect(() => { | ||
| 78 | + if (route.path == "/houses") { | ||
| 79 | + searchData.buildingId = route.query.buildingId ?? null; | ||
| 80 | + search(); | ||
| 81 | + } | ||
| 79 | }); | 82 | }); |
| 80 | </script> | 83 | </script> |
| 81 | 84 | ||
| @@ -127,10 +130,15 @@ onMounted(() => { | @@ -127,10 +130,15 @@ onMounted(() => { | ||
| 127 | <el-button type="text" size="mini" @click="check(scope.row.id)" | 130 | <el-button type="text" size="mini" @click="check(scope.row.id)" |
| 128 | >查看房屋</el-button | 131 | >查看房屋</el-button |
| 129 | > | 132 | > |
| 130 | - <el-button type="text" size="mini">查看业主</el-button> | ||
| 131 | - <!-- <el-button type="text" size="mini" @click="edit(scope.row)" | ||
| 132 | - >编辑</el-button | ||
| 133 | - > --> | 133 | + <router-link |
| 134 | + :to="{ | ||
| 135 | + name: 'owner', | ||
| 136 | + query: { houseId: scope.row.id }, | ||
| 137 | + }" | ||
| 138 | + > | ||
| 139 | + <el-button type="text" size="mini">查看业主</el-button> | ||
| 140 | + </router-link> | ||
| 141 | + | ||
| 134 | <el-button type="text" size="mini" @click="remove(scope.row.id)" | 142 | <el-button type="text" size="mini" @click="remove(scope.row.id)" |
| 135 | >删除</el-button | 143 | >删除</el-button |
| 136 | > | 144 | > |
src/views/community/residence/communityDetail.vue
| @@ -105,7 +105,7 @@ const cancel: void = () => { | @@ -105,7 +105,7 @@ const cancel: void = () => { | ||
| 105 | <template> | 105 | <template> |
| 106 | <el-form ref="ruleFormRef" :model="props.formObj" :rules="rules" label-width="100px"> | 106 | <el-form ref="ruleFormRef" :model="props.formObj" :rules="rules" label-width="100px"> |
| 107 | <el-form-item label="小区名称:" prop="name"> | 107 | <el-form-item label="小区名称:" prop="name"> |
| 108 | - <el-input v-model="props.formObj.name" placeholder="请输入名称"></el-input> | 108 | + <el-input v-model="props.formObj.name" placeholder="请输入名称" :disabled="!!props.formObj.id"></el-input> |
| 109 | </el-form-item> | 109 | </el-form-item> |
| 110 | <el-form-item label="所在地区:" prop="locality"> | 110 | <el-form-item label="所在地区:" prop="locality"> |
| 111 | <el-input v-model="props.formObj.locality" placeholder="请输入所在地区"></el-input> | 111 | <el-input v-model="props.formObj.locality" placeholder="请输入所在地区"></el-input> |
src/views/housekeeper/buildinMganager/index.vue
| @@ -109,6 +109,7 @@ onMounted(() => { | @@ -109,6 +109,7 @@ onMounted(() => { | ||
| 109 | </el-form-item> | 109 | </el-form-item> |
| 110 | <el-form-item> | 110 | <el-form-item> |
| 111 | <el-input | 111 | <el-input |
| 112 | + style="width:280px" | ||
| 112 | placeholder="请输入姓名/手机号/身份证号" | 113 | placeholder="请输入姓名/手机号/身份证号" |
| 113 | v-model="searchData.condition" | 114 | v-model="searchData.condition" |
| 114 | clearable | 115 | clearable |
src/views/ownerManagement/owner/detail.vue
| 1 | <script setup lang="ts"> | 1 | <script setup lang="ts"> |
| 2 | -import { reactive, onMounted, watchEffect } from "vue"; | 2 | +import { reactive, onMounted, watchEffect,defineEmits } from "vue"; |
| 3 | import { getResidentById, update } from "@/api/ownerManagement/owner.ts"; | 3 | import { getResidentById, update } from "@/api/ownerManagement/owner.ts"; |
| 4 | 4 | ||
| 5 | // 声明props | 5 | // 声明props |
| @@ -35,8 +35,16 @@ const data = reactive({ | @@ -35,8 +35,16 @@ const data = reactive({ | ||
| 35 | { label: "城镇户口", value: 1 }, | 35 | { label: "城镇户口", value: 1 }, |
| 36 | { label: "外阜", value: 2 }, | 36 | { label: "外阜", value: 2 }, |
| 37 | ], | 37 | ], |
| 38 | + livingList: [ | ||
| 39 | + { label: "自住"}, | ||
| 40 | + { label: "暂住" }, | ||
| 41 | + { label: "外租" }, | ||
| 42 | + ], | ||
| 38 | }); | 43 | }); |
| 39 | - | 44 | +const emit = defineEmits<{ |
| 45 | + (e: "cancel"): void; | ||
| 46 | + (e: "success"): void; | ||
| 47 | +}>(); | ||
| 40 | /** | 48 | /** |
| 41 | * 获取详情 | 49 | * 获取详情 |
| 42 | * @param { number } id 住户id | 50 | * @param { number } id 住户id |
| @@ -54,10 +62,16 @@ const getData = (id: number) => { | @@ -54,10 +62,16 @@ const getData = (id: number) => { | ||
| 54 | */ | 62 | */ |
| 55 | const submit = () => { | 63 | const submit = () => { |
| 56 | update(data.formObj).then((res) => { | 64 | update(data.formObj).then((res) => { |
| 57 | - console.log(res); | 65 | + emit("success") |
| 58 | }); | 66 | }); |
| 59 | }; | 67 | }; |
| 60 | /** | 68 | /** |
| 69 | + * 取消提交 | ||
| 70 | + */ | ||
| 71 | +const cancel: void = () => { | ||
| 72 | + emit("cancel"); | ||
| 73 | +}; | ||
| 74 | +/** | ||
| 61 | * 监听改变 | 75 | * 监听改变 |
| 62 | */ | 76 | */ |
| 63 | watchEffect((newValue, oldVlaue) => { | 77 | watchEffect((newValue, oldVlaue) => { |
| @@ -68,17 +82,17 @@ watchEffect((newValue, oldVlaue) => { | @@ -68,17 +82,17 @@ watchEffect((newValue, oldVlaue) => { | ||
| 68 | </script> | 82 | </script> |
| 69 | 83 | ||
| 70 | <template> | 84 | <template> |
| 71 | - <el-form :model="formObj" label-width="120px" :inline="true"> | ||
| 72 | - <el-form-item label="所属小区:"> | 85 | + <el-form :model="data.formObj" label-width="120px" :inline="true"> |
| 86 | + <el-form-item label="所属小区:" prop="neighborhoodName"> | ||
| 73 | <el-input v-model="data.formObj.neighborhoodName" disabled></el-input> | 87 | <el-input v-model="data.formObj.neighborhoodName" disabled></el-input> |
| 74 | </el-form-item> | 88 | </el-form-item> |
| 75 | <el-form-item label="楼宇名称:" prop="buildingName"> | 89 | <el-form-item label="楼宇名称:" prop="buildingName"> |
| 76 | <el-input v-model="data.formObj.buildingName" disabled></el-input> | 90 | <el-input v-model="data.formObj.buildingName" disabled></el-input> |
| 77 | </el-form-item> | 91 | </el-form-item> |
| 78 | - <el-form-item label="姓名:" prop="unitCount"> | 92 | + <el-form-item label="姓名:" prop="name"> |
| 79 | <el-input v-model="data.formObj.name" :disabled="props.isEdit"></el-input> | 93 | <el-input v-model="data.formObj.name" :disabled="props.isEdit"></el-input> |
| 80 | </el-form-item> | 94 | </el-form-item> |
| 81 | - <el-form-item label="房间号:" prop="unitCount"> | 95 | + <el-form-item label="房间号:" prop="houseName"> |
| 82 | <el-input v-model="data.formObj.houseName" disabled></el-input> | 96 | <el-input v-model="data.formObj.houseName" disabled></el-input> |
| 83 | </el-form-item> | 97 | </el-form-item> |
| 84 | <el-form-item label="身份证号:" prop="idcard"> | 98 | <el-form-item label="身份证号:" prop="idcard"> |
| @@ -88,13 +102,13 @@ watchEffect((newValue, oldVlaue) => { | @@ -88,13 +102,13 @@ watchEffect((newValue, oldVlaue) => { | ||
| 88 | ></el-input> | 102 | ></el-input> |
| 89 | </el-form-item> | 103 | </el-form-item> |
| 90 | 104 | ||
| 91 | - <el-form-item label="手机号:" prop="grossArea"> | 105 | + <el-form-item label="手机号:" prop="mobile"> |
| 92 | <el-input | 106 | <el-input |
| 93 | v-model="data.formObj.mobile" | 107 | v-model="data.formObj.mobile" |
| 94 | :disabled="props.isEdit" | 108 | :disabled="props.isEdit" |
| 95 | ></el-input> | 109 | ></el-input> |
| 96 | </el-form-item> | 110 | </el-form-item> |
| 97 | - <el-form-item label="出生日期:" prop="employArea"> | 111 | + <el-form-item label="出生日期:" prop="birthdate"> |
| 98 | <el-date-picker | 112 | <el-date-picker |
| 99 | :disabled="props.isEdit" | 113 | :disabled="props.isEdit" |
| 100 | style="width: 200px" | 114 | style="width: 200px" |
| @@ -104,7 +118,7 @@ watchEffect((newValue, oldVlaue) => { | @@ -104,7 +118,7 @@ watchEffect((newValue, oldVlaue) => { | ||
| 104 | > | 118 | > |
| 105 | </el-date-picker> | 119 | </el-date-picker> |
| 106 | </el-form-item> | 120 | </el-form-item> |
| 107 | - <el-form-item label="性别:" prop="employArea"> | 121 | + <el-form-item label="性别:" prop="gender"> |
| 108 | <el-select | 122 | <el-select |
| 109 | disabled | 123 | disabled |
| 110 | v-model="data.formObj.gender" | 124 | v-model="data.formObj.gender" |
| @@ -120,16 +134,16 @@ watchEffect((newValue, oldVlaue) => { | @@ -120,16 +134,16 @@ watchEffect((newValue, oldVlaue) => { | ||
| 120 | </el-option> | 134 | </el-option> |
| 121 | </el-select> | 135 | </el-select> |
| 122 | </el-form-item> | 136 | </el-form-item> |
| 123 | - <el-form-item label="民族:" prop="employArea"> | 137 | + <el-form-item label="民族:" prop="nationality"> |
| 124 | <el-input v-model="data.formObj.nationality" disabled></el-input> | 138 | <el-input v-model="data.formObj.nationality" disabled></el-input> |
| 125 | </el-form-item> | 139 | </el-form-item> |
| 126 | - <el-form-item label="户籍所在地:" prop="employArea"> | 140 | + <el-form-item label="户籍所在地:" prop="censusRegister"> |
| 127 | <el-input | 141 | <el-input |
| 128 | v-model="data.formObj.censusRegister" | 142 | v-model="data.formObj.censusRegister" |
| 129 | :disabled="props.isEdit" | 143 | :disabled="props.isEdit" |
| 130 | ></el-input> | 144 | ></el-input> |
| 131 | </el-form-item> | 145 | </el-form-item> |
| 132 | - <el-form-item label="婚姻状态:" prop="employArea"> | 146 | + <el-form-item label="婚姻状态:" prop="isMarried"> |
| 133 | <el-select | 147 | <el-select |
| 134 | :disabled="props.isEdit" | 148 | :disabled="props.isEdit" |
| 135 | v-model="data.formObj.isMarried" | 149 | v-model="data.formObj.isMarried" |
| @@ -145,7 +159,7 @@ watchEffect((newValue, oldVlaue) => { | @@ -145,7 +159,7 @@ watchEffect((newValue, oldVlaue) => { | ||
| 145 | </el-option> | 159 | </el-option> |
| 146 | </el-select> | 160 | </el-select> |
| 147 | </el-form-item> | 161 | </el-form-item> |
| 148 | - <el-form-item label="政治面貌:" prop="employArea"> | 162 | + <el-form-item label="政治面貌:" prop="politicalStatus"> |
| 149 | <el-select | 163 | <el-select |
| 150 | v-model="data.formObj.politicalStatus" | 164 | v-model="data.formObj.politicalStatus" |
| 151 | placeholder="请选择" | 165 | placeholder="请选择" |
| @@ -161,7 +175,7 @@ watchEffect((newValue, oldVlaue) => { | @@ -161,7 +175,7 @@ watchEffect((newValue, oldVlaue) => { | ||
| 161 | </el-option> | 175 | </el-option> |
| 162 | </el-select> | 176 | </el-select> |
| 163 | </el-form-item> | 177 | </el-form-item> |
| 164 | - <el-form-item label="户口类型:" prop="employArea"> | 178 | + <el-form-item label="户口类型:" prop="censusType"> |
| 165 | <el-select | 179 | <el-select |
| 166 | v-model="data.formObj.censusType" | 180 | v-model="data.formObj.censusType" |
| 167 | placeholder="请选择" | 181 | placeholder="请选择" |
| @@ -177,19 +191,29 @@ watchEffect((newValue, oldVlaue) => { | @@ -177,19 +191,29 @@ watchEffect((newValue, oldVlaue) => { | ||
| 177 | </el-option> | 191 | </el-option> |
| 178 | </el-select> | 192 | </el-select> |
| 179 | </el-form-item> | 193 | </el-form-item> |
| 180 | - <el-form-item label="居住类型:" prop="employArea"> | ||
| 181 | - <el-input | ||
| 182 | - v-model="data.formObj.useArea" | 194 | + <el-form-item label="居住类型:" prop="isLiving"> |
| 195 | + <el-select | ||
| 196 | + v-model="data.formObj.isLiving" | ||
| 197 | + placeholder="请选择" | ||
| 198 | + style="width: 200px" | ||
| 183 | :disabled="props.isEdit" | 199 | :disabled="props.isEdit" |
| 184 | - ></el-input> | 200 | + > |
| 201 | + <el-option | ||
| 202 | + v-for="item in data.livingList" | ||
| 203 | + :key="item.label" | ||
| 204 | + :label="item.label" | ||
| 205 | + :value="item.label" | ||
| 206 | + > | ||
| 207 | + </el-option> | ||
| 208 | + </el-select> | ||
| 185 | </el-form-item> | 209 | </el-form-item> |
| 186 | - <el-form-item label="现住地址:" prop="employArea"> | 210 | + <el-form-item label="现住地址:" prop="location"> |
| 187 | <el-input | 211 | <el-input |
| 188 | v-model="data.formObj.location" | 212 | v-model="data.formObj.location" |
| 189 | :disabled="props.isEdit" | 213 | :disabled="props.isEdit" |
| 190 | ></el-input> | 214 | ></el-input> |
| 191 | </el-form-item> | 215 | </el-form-item> |
| 192 | - <el-form-item label="暂住证号:" prop="employArea"> | 216 | + <el-form-item label="暂住证号:" prop="residencePermit"> |
| 193 | <el-input | 217 | <el-input |
| 194 | v-model="data.formObj.residencePermit" | 218 | v-model="data.formObj.residencePermit" |
| 195 | :disabled="props.isEdit" | 219 | :disabled="props.isEdit" |
| @@ -198,6 +222,7 @@ watchEffect((newValue, oldVlaue) => { | @@ -198,6 +222,7 @@ watchEffect((newValue, oldVlaue) => { | ||
| 198 | <el-row> | 222 | <el-row> |
| 199 | <el-form-item> | 223 | <el-form-item> |
| 200 | <el-button type="primary" @click="submit">保存</el-button> | 224 | <el-button type="primary" @click="submit">保存</el-button> |
| 225 | + <el-button @click="cancel">取消</el-button> | ||
| 201 | </el-form-item> | 226 | </el-form-item> |
| 202 | </el-row> | 227 | </el-row> |
| 203 | </el-form> | 228 | </el-form> |
src/views/ownerManagement/owner/index.vue
| @@ -6,6 +6,7 @@ import { | @@ -6,6 +6,7 @@ import { | ||
| 6 | deleteResident, | 6 | deleteResident, |
| 7 | changeBinding, | 7 | changeBinding, |
| 8 | } from "@/api/ownerManagement/owner.ts"; | 8 | } from "@/api/ownerManagement/owner.ts"; |
| 9 | +import { parseTime } from "@/utils/tool.ts"; | ||
| 9 | import Detail from "./detail.vue"; | 10 | import Detail from "./detail.vue"; |
| 10 | import Pagination from "@/components/Pagination/index.vue"; | 11 | import Pagination from "@/components/Pagination/index.vue"; |
| 11 | 12 | ||
| @@ -165,6 +166,7 @@ onMounted(() => { | @@ -165,6 +166,7 @@ onMounted(() => { | ||
| 165 | </el-form-item> | 166 | </el-form-item> |
| 166 | <el-form-item> | 167 | <el-form-item> |
| 167 | <el-input | 168 | <el-input |
| 169 | + style="width:280px" | ||
| 168 | v-model="searchData.condition" | 170 | v-model="searchData.condition" |
| 169 | placeholder="请输入/姓名/手机号/身份证号" | 171 | placeholder="请输入/姓名/手机号/身份证号" |
| 170 | clearable | 172 | clearable |
| @@ -198,7 +200,11 @@ onMounted(() => { | @@ -198,7 +200,11 @@ onMounted(() => { | ||
| 198 | <el-table-column label="姓名" prop="name"></el-table-column> | 200 | <el-table-column label="姓名" prop="name"></el-table-column> |
| 199 | <el-table-column label="手机号" prop="mobile"></el-table-column> | 201 | <el-table-column label="手机号" prop="mobile"></el-table-column> |
| 200 | <el-table-column label="身份证" prop="idcard"></el-table-column> | 202 | <el-table-column label="身份证" prop="idcard"></el-table-column> |
| 201 | - <el-table-column label="绑定日期" prop="bindDate"></el-table-column> | 203 | + <el-table-column label="绑定日期" prop="bindDate"> |
| 204 | + <template #default="scope"> | ||
| 205 | + <span>{{ parseTime(new Date(scope.row.bindDate).getTime()) }}</span> | ||
| 206 | + </template> | ||
| 207 | + </el-table-column> | ||
| 202 | <el-table-column label="类型" prop="isOwner"></el-table-column> | 208 | <el-table-column label="类型" prop="isOwner"></el-table-column> |
| 203 | <el-table-column label="操作"> | 209 | <el-table-column label="操作"> |
| 204 | <template #default="scope"> | 210 | <template #default="scope"> |