Commit 61384106d56827a0234dede2a8846cc0f57c1572
Merge branch 'dev' of http://bj.gitlab.cnlive.com/cnlive_project/cnlive-community-web-vue into dev
Showing
11 changed files
with
77 additions
and
26 deletions
src/views/community/housekeeper/houseDetail.vue
| ... | ... | @@ -89,7 +89,7 @@ const rules = reactive({ |
| 89 | 89 | { |
| 90 | 90 | type: "number", |
| 91 | 91 | message: "请输入正确的建筑面积", |
| 92 | - max: 1000, | |
| 92 | + max: 50000, | |
| 93 | 93 | transform: (value) => Number(value), |
| 94 | 94 | }, |
| 95 | 95 | { whitespace: true, message: "请输入正确的建筑面积", trigger: "blur" }, |
| ... | ... | @@ -111,7 +111,7 @@ const rules = reactive({ |
| 111 | 111 | { |
| 112 | 112 | type: "number", |
| 113 | 113 | message: "请输入正确的使用面积", |
| 114 | - max: 1000, | |
| 114 | + max: 50000, | |
| 115 | 115 | transform: (value) => Number(value), |
| 116 | 116 | }, |
| 117 | 117 | ], | ... | ... |
src/views/community/housekeeper/index.vue
| ... | ... | @@ -6,9 +6,10 @@ import HouseDetail from "./houseDetail.vue"; |
| 6 | 6 | import ChangeAdmin from "./changeAdmin.vue"; |
| 7 | 7 | import Pagination from "@/components/Pagination/index.vue"; |
| 8 | 8 | import { useRoute } from "vue-router"; |
| 9 | +import type { ElForm } from 'element-plus' | |
| 9 | 10 | |
| 10 | 11 | let instance: ComponentInternalInstance | null = getCurrentInstance(); //获取app实例 |
| 11 | -const houseDetailRef = ref<FormInstance>(); | |
| 12 | +const houseDetailRef = ref<InstanceType<typeof ElForm>>(); | |
| 12 | 13 | let route = useRoute(); // 路由 |
| 13 | 14 | |
| 14 | 15 | // 数据筛选 |
| ... | ... | @@ -92,6 +93,7 @@ const changeData: void = () => { |
| 92 | 93 | * 弹框关闭 |
| 93 | 94 | */ |
| 94 | 95 | const dialogClose: void = () => { |
| 96 | + console.log(111) | |
| 95 | 97 | data.title = "新增楼宇"; |
| 96 | 98 | data.formObj = {}; |
| 97 | 99 | houseDetailRef.value.resetForm(); |
| ... | ... | @@ -169,7 +171,7 @@ watchEffect(() => { |
| 169 | 171 | > |
| 170 | 172 | </el-table-column> |
| 171 | 173 | <el-table-column label="楼宇名称" prop="buildingName"></el-table-column> |
| 172 | - <el-table-column label="单元" prop="unitCount"></el-table-column> | |
| 174 | + <el-table-column label="单元数" prop="unitCount"></el-table-column> | |
| 173 | 175 | <el-table-column label="总房屋数量" prop="houseCount"></el-table-column> |
| 174 | 176 | <el-table-column label="建成日期" prop="createTime"> |
| 175 | 177 | <template #default="scope"> | ... | ... |
src/views/community/houses/buildOwner.vue
| ... | ... | @@ -42,10 +42,8 @@ const data = reactive({ |
| 42 | 42 | { label: "在住", value: 1 }, |
| 43 | 43 | ], |
| 44 | 44 | ownerList: [ |
| 45 | - { label: "租户", value: 0 }, | |
| 46 | - { label: "业主", value: 1 }, | |
| 47 | - { label: "家人", value: 2 }, | |
| 48 | - { label: "朋友", value: 3 }, | |
| 45 | + { label: "非业主", value: 0 }, | |
| 46 | + { label: "业主", value: 1 } | |
| 49 | 47 | ], |
| 50 | 48 | selectList: [], |
| 51 | 49 | }); |
| ... | ... | @@ -189,7 +187,7 @@ watchEffect(() => { |
| 189 | 187 | </el-select> |
| 190 | 188 | </template> |
| 191 | 189 | </el-table-column> |
| 192 | - <el-table-column label="类型" prop="isOwner"> | |
| 190 | + <el-table-column label="是否是业主" prop="isOwner"> | |
| 193 | 191 | <template #default="scope"> |
| 194 | 192 | <el-select v-model="scope.row.isOwner" placeholder="请选择"> |
| 195 | 193 | <el-option | ... | ... |
src/views/community/houses/index.vue
| ... | ... | @@ -161,7 +161,7 @@ watchEffect(() => { |
| 161 | 161 | <span>{{ scope.row.building?.buildingName }}</span></template |
| 162 | 162 | > |
| 163 | 163 | </el-table-column> |
| 164 | - <el-table-column label="单元数" prop="unitNumber"></el-table-column> | |
| 164 | + <el-table-column label="单元" prop="unitNumber"></el-table-column> | |
| 165 | 165 | <el-table-column label="房间号" prop="roomNumber"></el-table-column> |
| 166 | 166 | <el-table-column label="建筑面积" prop="grossArea"></el-table-column> |
| 167 | 167 | <el-table-column label="使用面积" prop="useArea"></el-table-column> | ... | ... |
src/views/community/residence/communityDetail.vue
| 1 | 1 | <script setup lang="ts"> |
| 2 | -import { reactive, ref, onMounted, getCurrentInstance } from "vue"; | |
| 2 | +import { reactive, ref, onMounted, getCurrentInstance,defineExpose } from "vue"; | |
| 3 | 3 | import type { ElForm } from "element-plus"; |
| 4 | 4 | import { addOrUpdate } from "@/api/community/residence.ts"; |
| 5 | 5 | |
| ... | ... | @@ -103,13 +103,22 @@ let submitForm = (formEl: InstanceType<typeof ElForm> | undefined) => { |
| 103 | 103 | } |
| 104 | 104 | }); |
| 105 | 105 | }; |
| 106 | - | |
| 106 | +/** | |
| 107 | + * 重置 | |
| 108 | + */ | |
| 109 | +let resetForm = () => { | |
| 110 | + ruleFormRef.value.resetFields(); | |
| 111 | +}; | |
| 107 | 112 | /** |
| 108 | 113 | * 取消提交 |
| 109 | 114 | */ |
| 110 | 115 | const cancel: void = () => { |
| 111 | 116 | emit("cancel"); |
| 112 | 117 | }; |
| 118 | + | |
| 119 | +defineExpose({ | |
| 120 | + resetForm, | |
| 121 | +}); | |
| 113 | 122 | </script> |
| 114 | 123 | |
| 115 | 124 | <template> | ... | ... |
src/views/community/residence/index.vue
| 1 | 1 | <script setup lang="ts"> |
| 2 | -import { reactive, onMounted, getCurrentInstance } from "vue"; | |
| 2 | +import { reactive, onMounted, getCurrentInstance,ref } from "vue"; | |
| 3 | 3 | import { getTableList, deleteNeighborhood } from "@/api/community/residence.ts"; |
| 4 | 4 | import CommunityDetail from "./communityDetail.vue"; |
| 5 | 5 | import Pagination from "@/components/Pagination/index.vue"; |
| 6 | +import type { ElForm } from 'element-plus' | |
| 6 | 7 | |
| 7 | 8 | let instance: ComponentInternalInstance | null = getCurrentInstance(); //获取app实例 |
| 9 | +const detailRef = ref<InstanceType<typeof ElForm>>(); | |
| 8 | 10 | // 数据筛选 |
| 9 | 11 | const searchData = reactive({ |
| 10 | 12 | type: 0, |
| ... | ... | @@ -80,6 +82,7 @@ const changeData: void = () => { |
| 80 | 82 | const dialogClose: void = () => { |
| 81 | 83 | data.title = "新增小区"; |
| 82 | 84 | data.formObj = {}; |
| 85 | + detailRef.value.resetForm(); | |
| 83 | 86 | }; |
| 84 | 87 | onMounted(() => { |
| 85 | 88 | search(); |
| ... | ... | @@ -157,6 +160,7 @@ onMounted(() => { |
| 157 | 160 | @close="dialogClose" |
| 158 | 161 | > |
| 159 | 162 | <CommunityDetail |
| 163 | + ref="detailRef" | |
| 160 | 164 | @cancel="data.dialogVisible = false" |
| 161 | 165 | @success="changeData" |
| 162 | 166 | :formObj="data.formObj" | ... | ... |
src/views/housekeeper/buildinMganager/index.vue
| ... | ... | @@ -3,10 +3,11 @@ import { reactive, onMounted,ref, getCurrentInstance } from "vue"; |
| 3 | 3 | import { getTableList,deleteHousekeeper } from "@/api/housekeeper/buildinMganager.ts"; |
| 4 | 4 | import Detail from "./detail.vue"; |
| 5 | 5 | import Pagination from "@/components/Pagination/index.vue"; |
| 6 | +import type { ElForm } from 'element-plus' | |
| 6 | 7 | |
| 7 | 8 | let instance: ComponentInternalInstance | null = getCurrentInstance(); //获取app实例 |
| 8 | 9 | |
| 9 | -const detailRef = ref<FormInstance>() | |
| 10 | +const detailRef = ref<InstanceType<typeof ElForm>>() | |
| 10 | 11 | // 数据筛选 |
| 11 | 12 | const searchData = reactive({ |
| 12 | 13 | type: "", | ... | ... |
src/views/maintain/index.vue
| ... | ... | @@ -4,11 +4,11 @@ import { getTableList, deleteMaintainById } from "@/api/notify/maintain.ts"; |
| 4 | 4 | import { parseTime } from "@/utils/tool.ts"; |
| 5 | 5 | import Detail from "./detail.vue"; |
| 6 | 6 | import Pagination from "@/components/Pagination/index.vue"; |
| 7 | -// import * as store from "@/pinia/index"; | |
| 8 | 7 | import { useLoginStore } from "@/pinia/login"; |
| 8 | +import type { ElForm } from 'element-plus' | |
| 9 | 9 | |
| 10 | 10 | let instance: ComponentInternalInstance | null = getCurrentInstance(); //获取app实例 |
| 11 | -const detailRef = ref<FormInstance>() | |
| 11 | +const detailRef = ref<InstanceType<typeof ElForm>>() | |
| 12 | 12 | // 数据筛选 |
| 13 | 13 | const searchData = reactive({ |
| 14 | 14 | name: null, | ... | ... |
src/views/ownerManagement/owner/detail.vue
| ... | ... | @@ -35,7 +35,8 @@ const data = reactive({ |
| 35 | 35 | { label: "城镇户口", value: 1 }, |
| 36 | 36 | { label: "外阜", value: 2 }, |
| 37 | 37 | ], |
| 38 | - livingList: [{ label: "自住" }, { label: "暂住" }, { label: "外租" }], | |
| 38 | + livingList: [{ label: "在住" }, { label: "不在住" }], | |
| 39 | + ownerList: [{ label: "业主" }, { label: "非业主" }], | |
| 39 | 40 | }); |
| 40 | 41 | const emit = defineEmits<{ |
| 41 | 42 | (e: "cancel"): void; |
| ... | ... | @@ -196,7 +197,22 @@ watchEffect((newValue, oldVlaue) => { |
| 196 | 197 | </el-option> |
| 197 | 198 | </el-select> |
| 198 | 199 | </el-form-item> |
| 199 | - <el-form-item label="居住类型:" prop="isLiving"> | |
| 200 | + <el-form-item label="是否是业主:" prop="isOwner"> | |
| 201 | + <el-select | |
| 202 | + v-model="data.formObj.isOwner" | |
| 203 | + placeholder="请选择" | |
| 204 | + :disabled="props.isEdit" | |
| 205 | + > | |
| 206 | + <el-option | |
| 207 | + v-for="item in data.ownerList" | |
| 208 | + :key="item.label" | |
| 209 | + :label="item.label" | |
| 210 | + :value="item.label" | |
| 211 | + > | |
| 212 | + </el-option> | |
| 213 | + </el-select> | |
| 214 | + </el-form-item> | |
| 215 | + <el-form-item label="是否居住:" prop="isLiving"> | |
| 200 | 216 | <el-select |
| 201 | 217 | v-model="data.formObj.isLiving" |
| 202 | 218 | placeholder="请选择" | ... | ... |
src/views/ownerManagement/owner/index.vue
| ... | ... | @@ -17,6 +17,7 @@ let route = useRoute(); // 路由 |
| 17 | 17 | // 数据筛选 |
| 18 | 18 | const searchData = reactive({ |
| 19 | 19 | isOwner: null, |
| 20 | + isLiving: null, | |
| 20 | 21 | startTime: "", |
| 21 | 22 | endTime: "", |
| 22 | 23 | houseId: null, |
| ... | ... | @@ -36,8 +37,11 @@ const data = reactive({ |
| 36 | 37 | isEdit:false, |
| 37 | 38 | options: [ |
| 38 | 39 | { label: "业主", value: 1 }, |
| 39 | - { label: "租户", value: 2 }, | |
| 40 | - { label: "住户", value: 3 }, | |
| 40 | + { label: "非业主", value: 0 } | |
| 41 | + ], | |
| 42 | + livingList: [ | |
| 43 | + { label: "在住", value: 1 }, | |
| 44 | + { label: "不在住", value: 0 } | |
| 41 | 45 | ], |
| 42 | 46 | }); |
| 43 | 47 | |
| ... | ... | @@ -49,7 +53,8 @@ const chengeType = (e: Event) => { |
| 49 | 53 | getTableList({ |
| 50 | 54 | page: searchData.page, |
| 51 | 55 | pageSize: searchData.pageSize, |
| 52 | - isOwner: e == "" ? null : e, | |
| 56 | + isOwner: searchData.isOwner, | |
| 57 | + isLiving: searchData.isLiving, | |
| 53 | 58 | houseId: searchData.houseId, |
| 54 | 59 | }) |
| 55 | 60 | .then((res) => { |
| ... | ... | @@ -159,7 +164,7 @@ watchEffect(() => { |
| 159 | 164 | <el-form-item> |
| 160 | 165 | <el-select |
| 161 | 166 | v-model="searchData.isOwner" |
| 162 | - placeholder="请选择类型" | |
| 167 | + placeholder="请选择是否是业主" | |
| 163 | 168 | clearable |
| 164 | 169 | @change="chengeType" |
| 165 | 170 | > |
| ... | ... | @@ -173,6 +178,22 @@ watchEffect(() => { |
| 173 | 178 | </el-select> |
| 174 | 179 | </el-form-item> |
| 175 | 180 | <el-form-item> |
| 181 | + <el-select | |
| 182 | + v-model="searchData.isLiving" | |
| 183 | + placeholder="请选择是否在住" | |
| 184 | + clearable | |
| 185 | + @change="chengeType" | |
| 186 | + > | |
| 187 | + <el-option | |
| 188 | + v-for="item in data.livingList" | |
| 189 | + :key="item.value" | |
| 190 | + :label="item.label" | |
| 191 | + :value="item.value" | |
| 192 | + > | |
| 193 | + </el-option> | |
| 194 | + </el-select> | |
| 195 | + </el-form-item> | |
| 196 | + <el-form-item> | |
| 176 | 197 | <el-date-picker |
| 177 | 198 | v-model="data.time" |
| 178 | 199 | type="datetimerange" | ... | ... |
src/views/serviceman/index.vue
| ... | ... | @@ -4,9 +4,10 @@ import { getTableList, deleteAccendant } from "@/api/notify/serviceman.ts"; |
| 4 | 4 | import Detail from "./detail.vue"; |
| 5 | 5 | import { parseTime } from "@/utils/tool.ts"; |
| 6 | 6 | import Pagination from "@/components/Pagination/index.vue"; |
| 7 | +import type { ElForm } from 'element-plus' | |
| 7 | 8 | |
| 8 | 9 | let instance: ComponentInternalInstance | null = getCurrentInstance(); //获取app实例 |
| 9 | -const detailRef = ref<FormInstance>(); | |
| 10 | +const detailRef = ref<InstanceType<typeof ElForm>>(); | |
| 10 | 11 | // 数据筛选 |
| 11 | 12 | const searchData = reactive({ |
| 12 | 13 | name: null, |
| ... | ... | @@ -31,9 +32,8 @@ const search = (): void => { |
| 31 | 32 | data.loading = true; |
| 32 | 33 | getTableList(searchData) |
| 33 | 34 | .then((res) => { |
| 34 | - data.tableList = res.data.data; | |
| 35 | - data.total = res.data.data.length; | |
| 36 | - searchData.pageSize = res.data.data.pageSize; | |
| 35 | + data.tableList = res.data.data.list; | |
| 36 | + data.total = res.data.data.total; | |
| 37 | 37 | data.loading = false; |
| 38 | 38 | }) |
| 39 | 39 | .catch((err) => { | ... | ... |