Commit f26c363c3ed4c4b9522c23b76a618406de83b2d4
Merge branch 'dev' of http://bj.gitlab.cnlive.com/cnlive_project/cnlive-community-web-vue into dev
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 | 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 | 175 | <el-form-item label="楼宇名称:" prop="buildingName"> |
| 176 | 176 | <el-input |
| 177 | 177 | v-model="props.formObj.buildingName" |
| 178 | + :disabled="!!props.formObj.id" | |
| 178 | 179 | placeholder="请输入楼宇名称" |
| 179 | 180 | ></el-input> |
| 180 | 181 | </el-form-item> |
| 181 | - <el-form-item label="单元数:" prop="unitCount"> | |
| 182 | + <el-form-item label="单元:" prop="unitCount"> | |
| 182 | 183 | <el-input |
| 183 | 184 | v-model="props.formObj.unitCount" |
| 184 | - placeholder="请输入单元数" | |
| 185 | + placeholder="请输入单元" | |
| 185 | 186 | onkeyup="value=value.replace(/[^\d]/g,'')" |
| 186 | 187 | ></el-input> |
| 187 | 188 | </el-form-item> | ... | ... |
src/views/community/housekeeper/index.vue
| 1 | 1 | <script setup lang="ts"> |
| 2 | -import { reactive, onMounted, ref, getCurrentInstance } from "vue"; | |
| 2 | +import { reactive, onMounted, ref, getCurrentInstance, watchEffect } from "vue"; | |
| 3 | 3 | import { getTableList, deleteBuilding } from "@/api/community/housekeeper.ts"; |
| 4 | 4 | import { parseTime } from "@/utils/tool.ts"; |
| 5 | 5 | import HouseDetail from "./houseDetail.vue"; |
| 6 | +import ChangeAdmin from "./changeAdmin.vue"; | |
| 6 | 7 | import Pagination from "@/components/Pagination/index.vue"; |
| 7 | 8 | import { useRoute } from "vue-router"; |
| 8 | 9 | |
| ... | ... | @@ -27,6 +28,12 @@ const data = reactive({ |
| 27 | 28 | title: "新增楼宇", |
| 28 | 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 | 94 | data.formObj = {}; |
| 88 | 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 | 115 | </script> |
| 95 | 116 | |
| ... | ... | @@ -128,7 +149,7 @@ onMounted(() => { |
| 128 | 149 | > |
| 129 | 150 | </el-table-column> |
| 130 | 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 | 153 | <el-table-column label="总房屋数量" prop="houseCount"></el-table-column> |
| 133 | 154 | <el-table-column label="建成日期" prop="createTime"> |
| 134 | 155 | <template #default="scope"> |
| ... | ... | @@ -137,17 +158,14 @@ onMounted(() => { |
| 137 | 158 | </el-table-column> |
| 138 | 159 | <el-table-column label="建筑面积" prop="grossArea"></el-table-column> |
| 139 | 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 | 165 | </el-table-column> |
| 148 | 166 | <el-table-column label="操作"> |
| 149 | 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 | 169 | <router-link |
| 152 | 170 | :to="{ |
| 153 | 171 | name: 'houses', |
| ... | ... | @@ -189,6 +207,15 @@ onMounted(() => { |
| 189 | 207 | :formObj="data.formObj" |
| 190 | 208 | ></HouseDetail> |
| 191 | 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 | 219 | </div> |
| 193 | 220 | </template> |
| 194 | 221 | ... | ... |
src/views/community/houses/index.vue
| 1 | 1 | <script setup lang="ts"> |
| 2 | -import { reactive, onMounted, getCurrentInstance } from "vue"; | |
| 2 | +import { reactive, onMounted, getCurrentInstance,watchEffect } from "vue"; | |
| 3 | 3 | import { getTableList, deleteHouse, getHouse } from "@/api/community/houses.ts"; |
| 4 | 4 | import { parseTime } from "@/utils/tool.ts"; |
| 5 | 5 | import Detail from "./detail.vue"; |
| ... | ... | @@ -35,7 +35,6 @@ const search = (): void => { |
| 35 | 35 | .then((res) => { |
| 36 | 36 | data.tableList = res.data.data.list; |
| 37 | 37 | data.total = res.data.data.total; |
| 38 | - searchData.pageSize = res.data.data.pageSize; | |
| 39 | 38 | data.loading = false; |
| 40 | 39 | }) |
| 41 | 40 | .catch((err) => { |
| ... | ... | @@ -72,10 +71,14 @@ const remove = (houseId: number) => { |
| 72 | 71 | }) |
| 73 | 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 | 83 | </script> |
| 81 | 84 | |
| ... | ... | @@ -127,10 +130,15 @@ onMounted(() => { |
| 127 | 130 | <el-button type="text" size="mini" @click="check(scope.row.id)" |
| 128 | 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 | 142 | <el-button type="text" size="mini" @click="remove(scope.row.id)" |
| 135 | 143 | >删除</el-button |
| 136 | 144 | > | ... | ... |
src/views/community/residence/communityDetail.vue
| ... | ... | @@ -105,7 +105,7 @@ const cancel: void = () => { |
| 105 | 105 | <template> |
| 106 | 106 | <el-form ref="ruleFormRef" :model="props.formObj" :rules="rules" label-width="100px"> |
| 107 | 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 | 109 | </el-form-item> |
| 110 | 110 | <el-form-item label="所在地区:" prop="locality"> |
| 111 | 111 | <el-input v-model="props.formObj.locality" placeholder="请输入所在地区"></el-input> | ... | ... |
src/views/housekeeper/buildinMganager/index.vue
src/views/ownerManagement/owner/detail.vue
| 1 | 1 | <script setup lang="ts"> |
| 2 | -import { reactive, onMounted, watchEffect } from "vue"; | |
| 2 | +import { reactive, onMounted, watchEffect,defineEmits } from "vue"; | |
| 3 | 3 | import { getResidentById, update } from "@/api/ownerManagement/owner.ts"; |
| 4 | 4 | |
| 5 | 5 | // 声明props |
| ... | ... | @@ -35,8 +35,16 @@ const data = reactive({ |
| 35 | 35 | { label: "城镇户口", value: 1 }, |
| 36 | 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 | 50 | * @param { number } id 住户id |
| ... | ... | @@ -54,10 +62,16 @@ const getData = (id: number) => { |
| 54 | 62 | */ |
| 55 | 63 | const submit = () => { |
| 56 | 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 | 77 | watchEffect((newValue, oldVlaue) => { |
| ... | ... | @@ -68,17 +82,17 @@ watchEffect((newValue, oldVlaue) => { |
| 68 | 82 | </script> |
| 69 | 83 | |
| 70 | 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 | 87 | <el-input v-model="data.formObj.neighborhoodName" disabled></el-input> |
| 74 | 88 | </el-form-item> |
| 75 | 89 | <el-form-item label="楼宇名称:" prop="buildingName"> |
| 76 | 90 | <el-input v-model="data.formObj.buildingName" disabled></el-input> |
| 77 | 91 | </el-form-item> |
| 78 | - <el-form-item label="姓名:" prop="unitCount"> | |
| 92 | + <el-form-item label="姓名:" prop="name"> | |
| 79 | 93 | <el-input v-model="data.formObj.name" :disabled="props.isEdit"></el-input> |
| 80 | 94 | </el-form-item> |
| 81 | - <el-form-item label="房间号:" prop="unitCount"> | |
| 95 | + <el-form-item label="房间号:" prop="houseName"> | |
| 82 | 96 | <el-input v-model="data.formObj.houseName" disabled></el-input> |
| 83 | 97 | </el-form-item> |
| 84 | 98 | <el-form-item label="身份证号:" prop="idcard"> |
| ... | ... | @@ -88,13 +102,13 @@ watchEffect((newValue, oldVlaue) => { |
| 88 | 102 | ></el-input> |
| 89 | 103 | </el-form-item> |
| 90 | 104 | |
| 91 | - <el-form-item label="手机号:" prop="grossArea"> | |
| 105 | + <el-form-item label="手机号:" prop="mobile"> | |
| 92 | 106 | <el-input |
| 93 | 107 | v-model="data.formObj.mobile" |
| 94 | 108 | :disabled="props.isEdit" |
| 95 | 109 | ></el-input> |
| 96 | 110 | </el-form-item> |
| 97 | - <el-form-item label="出生日期:" prop="employArea"> | |
| 111 | + <el-form-item label="出生日期:" prop="birthdate"> | |
| 98 | 112 | <el-date-picker |
| 99 | 113 | :disabled="props.isEdit" |
| 100 | 114 | style="width: 200px" |
| ... | ... | @@ -104,7 +118,7 @@ watchEffect((newValue, oldVlaue) => { |
| 104 | 118 | > |
| 105 | 119 | </el-date-picker> |
| 106 | 120 | </el-form-item> |
| 107 | - <el-form-item label="性别:" prop="employArea"> | |
| 121 | + <el-form-item label="性别:" prop="gender"> | |
| 108 | 122 | <el-select |
| 109 | 123 | disabled |
| 110 | 124 | v-model="data.formObj.gender" |
| ... | ... | @@ -120,16 +134,16 @@ watchEffect((newValue, oldVlaue) => { |
| 120 | 134 | </el-option> |
| 121 | 135 | </el-select> |
| 122 | 136 | </el-form-item> |
| 123 | - <el-form-item label="民族:" prop="employArea"> | |
| 137 | + <el-form-item label="民族:" prop="nationality"> | |
| 124 | 138 | <el-input v-model="data.formObj.nationality" disabled></el-input> |
| 125 | 139 | </el-form-item> |
| 126 | - <el-form-item label="户籍所在地:" prop="employArea"> | |
| 140 | + <el-form-item label="户籍所在地:" prop="censusRegister"> | |
| 127 | 141 | <el-input |
| 128 | 142 | v-model="data.formObj.censusRegister" |
| 129 | 143 | :disabled="props.isEdit" |
| 130 | 144 | ></el-input> |
| 131 | 145 | </el-form-item> |
| 132 | - <el-form-item label="婚姻状态:" prop="employArea"> | |
| 146 | + <el-form-item label="婚姻状态:" prop="isMarried"> | |
| 133 | 147 | <el-select |
| 134 | 148 | :disabled="props.isEdit" |
| 135 | 149 | v-model="data.formObj.isMarried" |
| ... | ... | @@ -145,7 +159,7 @@ watchEffect((newValue, oldVlaue) => { |
| 145 | 159 | </el-option> |
| 146 | 160 | </el-select> |
| 147 | 161 | </el-form-item> |
| 148 | - <el-form-item label="政治面貌:" prop="employArea"> | |
| 162 | + <el-form-item label="政治面貌:" prop="politicalStatus"> | |
| 149 | 163 | <el-select |
| 150 | 164 | v-model="data.formObj.politicalStatus" |
| 151 | 165 | placeholder="请选择" |
| ... | ... | @@ -161,7 +175,7 @@ watchEffect((newValue, oldVlaue) => { |
| 161 | 175 | </el-option> |
| 162 | 176 | </el-select> |
| 163 | 177 | </el-form-item> |
| 164 | - <el-form-item label="户口类型:" prop="employArea"> | |
| 178 | + <el-form-item label="户口类型:" prop="censusType"> | |
| 165 | 179 | <el-select |
| 166 | 180 | v-model="data.formObj.censusType" |
| 167 | 181 | placeholder="请选择" |
| ... | ... | @@ -177,19 +191,29 @@ watchEffect((newValue, oldVlaue) => { |
| 177 | 191 | </el-option> |
| 178 | 192 | </el-select> |
| 179 | 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 | 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 | 209 | </el-form-item> |
| 186 | - <el-form-item label="现住地址:" prop="employArea"> | |
| 210 | + <el-form-item label="现住地址:" prop="location"> | |
| 187 | 211 | <el-input |
| 188 | 212 | v-model="data.formObj.location" |
| 189 | 213 | :disabled="props.isEdit" |
| 190 | 214 | ></el-input> |
| 191 | 215 | </el-form-item> |
| 192 | - <el-form-item label="暂住证号:" prop="employArea"> | |
| 216 | + <el-form-item label="暂住证号:" prop="residencePermit"> | |
| 193 | 217 | <el-input |
| 194 | 218 | v-model="data.formObj.residencePermit" |
| 195 | 219 | :disabled="props.isEdit" |
| ... | ... | @@ -198,6 +222,7 @@ watchEffect((newValue, oldVlaue) => { |
| 198 | 222 | <el-row> |
| 199 | 223 | <el-form-item> |
| 200 | 224 | <el-button type="primary" @click="submit">保存</el-button> |
| 225 | + <el-button @click="cancel">取消</el-button> | |
| 201 | 226 | </el-form-item> |
| 202 | 227 | </el-row> |
| 203 | 228 | </el-form> | ... | ... |
src/views/ownerManagement/owner/index.vue
| ... | ... | @@ -6,6 +6,7 @@ import { |
| 6 | 6 | deleteResident, |
| 7 | 7 | changeBinding, |
| 8 | 8 | } from "@/api/ownerManagement/owner.ts"; |
| 9 | +import { parseTime } from "@/utils/tool.ts"; | |
| 9 | 10 | import Detail from "./detail.vue"; |
| 10 | 11 | import Pagination from "@/components/Pagination/index.vue"; |
| 11 | 12 | |
| ... | ... | @@ -165,6 +166,7 @@ onMounted(() => { |
| 165 | 166 | </el-form-item> |
| 166 | 167 | <el-form-item> |
| 167 | 168 | <el-input |
| 169 | + style="width:280px" | |
| 168 | 170 | v-model="searchData.condition" |
| 169 | 171 | placeholder="请输入/姓名/手机号/身份证号" |
| 170 | 172 | clearable |
| ... | ... | @@ -198,7 +200,11 @@ onMounted(() => { |
| 198 | 200 | <el-table-column label="姓名" prop="name"></el-table-column> |
| 199 | 201 | <el-table-column label="手机号" prop="mobile"></el-table-column> |
| 200 | 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 | 208 | <el-table-column label="类型" prop="isOwner"></el-table-column> |
| 203 | 209 | <el-table-column label="操作"> |
| 204 | 210 | <template #default="scope"> | ... | ... |