diff --git a/common/api.js b/common/api.js index 636cfde..fc5e17d 100644 --- a/common/api.js +++ b/common/api.js @@ -16,6 +16,15 @@ export function addInspection(data) { }); }; +// 我的巡检记录列表 +export function myInspection(data) { + return request({ + url: '/mz/inspection/myList', + method: 'get', + data, + }); +}; + // 房屋专属左侧组织树 export function getdeptList() { return request({ diff --git a/pages.json b/pages.json index 2caa9ba..85bbc1c 100644 --- a/pages.json +++ b/pages.json @@ -54,7 +54,9 @@ "path": "pages/tabBar/xjPage/xjRecord", "style": { "navigationBarTitleText": "巡检记录", - "disableScroll": true + "disableScroll": true, + "enablePullDownRefresh":true, + "onReachBottomDistance": 100 } }, { diff --git a/pages/tabBar/xjPage/xj.vue b/pages/tabBar/xjPage/xj.vue index 1ad2f97..214b23c 100644 --- a/pages/tabBar/xjPage/xj.vue +++ b/pages/tabBar/xjPage/xj.vue @@ -77,7 +77,7 @@ import { queryDeptDropdownList, } from "@/common/rec"; -import { getdeptList,addInspection,uploadFile } from '@/common/api.js'; +import { getdeptList,addInspection } from '@/common/api.js'; import { getDicts } from "@/common/system/dict/data"; import { baseUrl } from "@/utils/config"; export default { @@ -144,11 +144,9 @@ export default { "children", 2 ); - // console.log(this.deptOptions[0].children); - // console.log(this.deptOptions[0].children.map(item=> item.deptName)); - this.deptOptions = await this.getListByParentId("1", '156'); + this.form.areaId = this.deptOptions[0].children[0].deptId + this.deptOptions = await this.getListByParentId("1", this.deptOptions[0].children[0].deptId); console.log(this.deptOptions); - }); }, // 三级联动通用接口 @@ -195,6 +193,43 @@ export default { }) }, handleBtn () { + if(!this.form.apartmentId){ + uni.showToast({ + icon: 'none', + title: '请选择乐业社区' + }) + return + } else if(!this.form.questionType){ + uni.showToast({ + icon: 'none', + title: '巡检问题类型' + }) + return + } else if(!this.form.title){ + uni.showToast({ + icon: 'none', + title: '请输入标题内容' + }) + return + } else if(!this.form.content){ + uni.showToast({ + icon: 'none', + title: '请输入问题描述' + }) + return + } else if(!this.form.inspector){ + uni.showToast({ + icon: 'none', + title: '请输入巡检人姓名' + }) + return + } else if(!this.form.inspectorPhone){ + uni.showToast({ + icon: 'none', + title: '请输入巡检人电话' + }) + return + } // console.log(this.form); let parmas = JSON.parse(JSON.stringify(this.form)) delete parmas.apartmentName diff --git a/pages/tabBar/xjPage/xjRecord.vue b/pages/tabBar/xjPage/xjRecord.vue index b141158..a26b354 100644 --- a/pages/tabBar/xjPage/xjRecord.vue +++ b/pages/tabBar/xjPage/xjRecord.vue @@ -1,59 +1,126 @@