From 84b3ae2034797df8d1a5d0b60068c670b970c4bb Mon Sep 17 00:00:00 2001
From: bibi <541660090@qq.com>
Date: Tue, 8 Feb 2022 17:08:41 +0800
Subject: [PATCH] =?UTF-8?q?=E6=88=BF=E5=B1=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/basic/estate/index.js | 34 +++-
src/api/public/login/index.js | 16 --
src/components/table/index.vue | 2 +-
src/views/Basic/Employee/depend/form.vue | 4 +-
src/views/Basic/Employee/index.vue | 2 +-
.../_houseHoldAudit/depend/config.js | 10 +-
.../EstateInfo/_houseHoldAudit/index.vue | 45 +++--
.../Basic/EstateInfo/_houseHoldInfo/index.vue | 2 +-
.../EstateInfo/_houseManage/depend/config.js | 4 +-
.../EstateInfo/_houseManage/depend/form.js | 17 +-
.../EstateInfo/_houseManage/depend/form.vue | 187 +++++++++++++++---
.../Basic/EstateInfo/_houseManage/index.vue | 61 +++++-
src/views/Basic/WorkOrder/index.vue | 2 +-
src/views/Login/index.vue | 16 +-
14 files changed, 320 insertions(+), 82 deletions(-)
diff --git a/src/api/basic/estate/index.js b/src/api/basic/estate/index.js
index cdf10c8..5a13639 100644
--- a/src/api/basic/estate/index.js
+++ b/src/api/basic/estate/index.js
@@ -17,7 +17,7 @@ export function buildInsert(params) {
data: params,
})
}
-// 楼栋新增
+// 楼栋详情
export function buildInfo(params) {
return httpService({
url: `/user/building/findById`,
@@ -41,6 +41,22 @@ export function buildingDel(params) {
data: params,
})
}
+// 全部楼栋
+export function allBuilding(params) {
+ return httpService({
+ url: `/user/building/findAllBuilding`,
+ method: 'get',
+ params: params,
+ })
+}
+// 楼栋查单元
+export function findByBuildingId(params) {
+ return httpService({
+ url: `/user/unit/findByBuildingId`,
+ method: 'get',
+ params: params,
+ })
+}
/**
* 单元
* list update del
@@ -83,6 +99,22 @@ export function houseInsert(params) {
data: params,
})
}
+// 房屋修改
+export function houseInfo(params) {
+ return httpService({
+ url: `/user/estate/findById`,
+ method: 'get',
+ params: params,
+ })
+}
+// 房屋修改
+export function houseUpdate(params) {
+ return httpService({
+ url: `/user/estate/update`,
+ method: 'post',
+ data: params,
+ })
+}
// 房屋删除
export function houseDel(params) {
return httpService({
diff --git a/src/api/public/login/index.js b/src/api/public/login/index.js
index 993c490..47bbaee 100644
--- a/src/api/public/login/index.js
+++ b/src/api/public/login/index.js
@@ -24,19 +24,3 @@ export function quit(params) {
data: params,
})
}
-// 省市区
-export function allCity(params) {
- return httpService({
- url: `/city/allCity`,
- method: 'get',
- params: params,
- })
-}
-// 查找所有小区【api不需要communityCode】
-export function findcommunity(params) {
- return httpService({
- url: `/community/findAll`,
- method: 'get',
- params: params,
- })
-}
\ No newline at end of file
diff --git a/src/components/table/index.vue b/src/components/table/index.vue
index 6509f7e..2a60d42 100644
--- a/src/components/table/index.vue
+++ b/src/components/table/index.vue
@@ -35,7 +35,7 @@
}"
:row-key="
(record, index) => {
- return index;
+ return record.id;
}
"
>
diff --git a/src/views/Basic/Employee/depend/form.vue b/src/views/Basic/Employee/depend/form.vue
index 30a34a9..6a8b7a0 100644
--- a/src/views/Basic/Employee/depend/form.vue
+++ b/src/views/Basic/Employee/depend/form.vue
@@ -85,8 +85,8 @@
-
-
+
+
单张最多不超过4M,最多上传2张,支持JPG,PNG格式
diff --git a/src/views/Basic/Employee/index.vue b/src/views/Basic/Employee/index.vue
index 189508a..9096a0e 100644
--- a/src/views/Basic/Employee/index.vue
+++ b/src/views/Basic/Employee/index.vue
@@ -82,7 +82,7 @@
}"
:row-key="
(record, index) => {
- return index;
+ return record.id;
}
"
>
diff --git a/src/views/Basic/EstateInfo/_houseHoldAudit/depend/config.js b/src/views/Basic/EstateInfo/_houseHoldAudit/depend/config.js
index 2a1231f..73866e5 100644
--- a/src/views/Basic/EstateInfo/_houseHoldAudit/depend/config.js
+++ b/src/views/Basic/EstateInfo/_houseHoldAudit/depend/config.js
@@ -40,9 +40,9 @@ export const columns = [
case 1:
return '审核中'
case 2:
- return '驳回'
+ return '已驳回'
case 3:
- return '通过'
+ return '已通过'
default:
break;
}
@@ -64,13 +64,11 @@ export const columns = [
]
// 搜索项
export const searchForm = {
- status:null,
- identity: null
+ identity: undefined,
}
export function reset() {
this.searchForm = {
- status:null,
- identity:null,
+ identity: undefined,
}
this.getData()
}
diff --git a/src/views/Basic/EstateInfo/_houseHoldAudit/index.vue b/src/views/Basic/EstateInfo/_houseHoldAudit/index.vue
index 0ac4410..6b8c733 100644
--- a/src/views/Basic/EstateInfo/_houseHoldAudit/index.vue
+++ b/src/views/Basic/EstateInfo/_houseHoldAudit/index.vue
@@ -7,11 +7,12 @@
default-value="1"
button-style="solid"
@change="tabsChange"
+ v-model="activeName"
>
待审核
已通过
已驳回
- 全部
+ 全部
@@ -19,7 +20,9 @@
-
+
+ {{item.name}}
+
查 询
重 置
@@ -61,7 +64,7 @@
}"
:row-key="
(record, index) => {
- return index;
+ return record.estateReviewId;
}
"
>
@@ -77,10 +80,10 @@
- 通过
- 驳回
@@ -137,6 +140,27 @@ export default {
tableChoosed: [],
tableData: [],
ActionsList: [],
+ activeName:'1',
+ options:{
+ identity:[
+ {
+ id:1,
+ name:'业主'
+ },
+ {
+ id:2,
+ name:'业主亲属'
+ },
+ {
+ id:3,
+ name:'租户'
+ },
+ {
+ id:4,
+ name:'租户亲属'
+ },
+ ]
+ }
};
},
mounted() {
@@ -147,17 +171,12 @@ export default {
const res = await reviewList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
- status: this.searchForm.status,
+ status: this.activeName,
identity: this.searchForm.identity,
});
this.tableData = res.data.rows;
},
- tabsChange(e) {
- if (e.target.value === "0") {
- this.searchForm.status = null;
- } else {
- this.searchForm.status = e.target.value;
- }
+ tabsChange() {
this.getData();
},
// 审核 1通过 2驳回
@@ -187,7 +206,7 @@ export default {
},
selectionChoosed(data) {
console.log(data);
- this.tableChoosed = data;
+ this.selectedRowKeys = data;
},
reset: reset,
},
diff --git a/src/views/Basic/EstateInfo/_houseHoldInfo/index.vue b/src/views/Basic/EstateInfo/_houseHoldInfo/index.vue
index 0fcf0b0..16a4c83 100644
--- a/src/views/Basic/EstateInfo/_houseHoldInfo/index.vue
+++ b/src/views/Basic/EstateInfo/_houseHoldInfo/index.vue
@@ -55,7 +55,7 @@
}"
:row-key="
(record, index) => {
- return index;
+ return record.id;
}
"
>
diff --git a/src/views/Basic/EstateInfo/_houseManage/depend/config.js b/src/views/Basic/EstateInfo/_houseManage/depend/config.js
index 89dcbd2..cd6f223 100644
--- a/src/views/Basic/EstateInfo/_houseManage/depend/config.js
+++ b/src/views/Basic/EstateInfo/_houseManage/depend/config.js
@@ -47,8 +47,8 @@ export const columns = [
// 搜索项
export const searchForm = {
name: "",
- isEnableLease: null,
- manageEstateTypeId:null
+ isEnableLease: undefined,
+ manageEstateTypeId:undefined
}
// 分页
export const pagination = {
diff --git a/src/views/Basic/EstateInfo/_houseManage/depend/form.js b/src/views/Basic/EstateInfo/_houseManage/depend/form.js
index 3eebb5a..f832c34 100644
--- a/src/views/Basic/EstateInfo/_houseManage/depend/form.js
+++ b/src/views/Basic/EstateInfo/_houseManage/depend/form.js
@@ -5,6 +5,7 @@
// 表单
export const form = {
+ id:undefined,
manageBuildingId:undefined,
manageUnitId:undefined,
floorLocation:undefined,
@@ -19,14 +20,28 @@ export const form = {
estateImgUrls:[],
remarks:undefined,
}
+// 校验
export const rules = {
+ manageBuildingId:[
+ { required: true, message: "请选择楼栋", trigger: "change" },
+ ],
+ manageUnitId:[
+ { required: true, message: "请选择单元", trigger: "change" },
+ ],
floorLocation: [
- { required: true, message: "楼层位置", trigger: "blur" },
+ { required: true, message: "请输入楼层位置", trigger: "blur" },
],
name: [
{ required: true, message: "请输入房屋名称", trigger: "blur" },
],
+ manageEstateTypeId: [
+ { required: true, message: "请选择房屋类型", trigger: "change" },
+ ],
+ isEnableLease: [
+ { required: true, message: "请选择是否开启租赁", trigger: "change" },
+ ],
}
+// 请求头
import store from "@/store";
export const uploadHeaders = {
"manage-login-token": store.getters.getToken,
diff --git a/src/views/Basic/EstateInfo/_houseManage/depend/form.vue b/src/views/Basic/EstateInfo/_houseManage/depend/form.vue
index 64106cf..99113ee 100644
--- a/src/views/Basic/EstateInfo/_houseManage/depend/form.vue
+++ b/src/views/Basic/EstateInfo/_houseManage/depend/form.vue
@@ -13,17 +13,22 @@
+ @change='changeBuild'
+ >
+ {{item.name}}
+
-
+
+ {{item.name}}
+
-
+
@@ -38,6 +43,7 @@
v-model="form.indoorArea"
placeholder="请输入室内面积"
suffix="㎡"
+ :min='0'
/>
@@ -48,21 +54,25 @@
type="number"
suffix="㎡"
placeholder="请输入建筑面积"
+ :min='0'
/>
+ >
+ {{item.name}}
+
-
+
+ {{item.name}}
+
@@ -84,27 +94,25 @@
-
- 房屋照片
+
-
-
-
Upload
+
-
-
-
-
+
+
+
@@ -118,6 +126,7 @@
diff --git a/src/views/Basic/EstateInfo/_houseManage/index.vue b/src/views/Basic/EstateInfo/_houseManage/index.vue
index 1bc7856..c25e712 100644
--- a/src/views/Basic/EstateInfo/_houseManage/index.vue
+++ b/src/views/Basic/EstateInfo/_houseManage/index.vue
@@ -5,11 +5,15 @@
-
-
-
+
+
+ {{item.name}}
+
+
+ {{item.name}}
+
查 询
- 重 置
+ 重 置
@@ -55,7 +59,7 @@
}"
:row-key="
(record, index) => {
- return index;
+ return record.id;
}
"
>
@@ -102,13 +106,13 @@
@@ -190,13 +194,27 @@ export default {
id: null,
name: ''
},
+ editId:null,
activeAction: undefined,
loading: false,
// 选择的index
selectedRowKeys: [],
tableChoosed: [],
tableData: [],
- typeList:[]
+ typeList:[],
+ options:{
+ houseType:[],//房屋类型
+ isEnableLease:[//开启租赁
+ {
+ id:1,
+ name:'开启'
+ },
+ {
+ id:2,
+ name:'关闭'
+ },
+ ],
+ }
};
},
created() {
@@ -204,6 +222,7 @@ export default {
this.getType()
},
methods: {
+ // 获取房屋
async getData() {
const res = await houseList({
pageNum: this.pagination.current,
@@ -214,19 +233,40 @@ export default {
});
this.tableData = res.data.rows;
},
+ // 获取类型
async getType() {
this.typeList = []
const res = await estateType();
+ this.options.houseType = res.data
const arr = res.data;
arr.forEach(ele => {
ele.show = false;
})
this.typeList = arr;
-
},
- addHouse() {},
+ reset(){
+ this.searchForm.name= "",
+ this.searchForm.isEnableLease = undefined,
+ this.searchForm.manageEstateTypeId = undefined
+ this.getData()
+ },
+ // 调用表单组件的提交
+ addHouse() {
+ this.$refs.form.addSubmit()
+ },
+ // 新增房屋后的回调
+ addSuccess(){
+ this.getData()
+ this.addClose()
+ },
addClose() {
this.drawerConfig.addShow = false;
+ this.editId = null;
+ this.$refs.form.close()
+ },
+ edit(data){
+ this.editId = data.id
+ this.drawerConfig.addShow = true;
},
// 新增类型
addShow(){
@@ -324,6 +364,7 @@ export default {
houseDel({ estateIds: ids }).then((res) => {
if (res.code === 200) {
this.$message.success(res.msg);
+ this.getData();
} else {
this.$message.error(res.msg);
}
diff --git a/src/views/Basic/WorkOrder/index.vue b/src/views/Basic/WorkOrder/index.vue
index 89c8cf4..2abd166 100644
--- a/src/views/Basic/WorkOrder/index.vue
+++ b/src/views/Basic/WorkOrder/index.vue
@@ -80,7 +80,7 @@
}"
:row-key="
(record, index) => {
- return index;
+ return record.id;
}
"
>
diff --git a/src/views/Login/index.vue b/src/views/Login/index.vue
index 58a24c6..59251c6 100644
--- a/src/views/Login/index.vue
+++ b/src/views/Login/index.vue
@@ -194,7 +194,7 @@