| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- import {http} from './service.js'
- const uploadBase64=p => http.post('common/file/uploadBase64', p)
- // 权限管理
- let permissionsUrl={
- login:'/permissions/authentication/login',
- menuList: "/permissions/account/getMyPermissionsTreeList",
- orgList:"/permissions/org/pagingQuery",
- orgListByName: "/permissions/org/getListByLikeName",
- getById: "/permissions/org/get/",
- carList:"/permissions/xq/device/admin/user/pagingQuery",
- subList:"/permissions/org/getSubListByPid"
- }
- const permissions = {
- login:(params,header) => http.post(permissionsUrl.login,params,{header: header}),
- menuList:(params,header) => http.get(permissionsUrl.menuList,{params:params,header: header}),
- orgList:(params,header) => http.get(permissionsUrl.orgList,{params:params,header: header}),
- orgListByName:(params,header) => http.get(permissionsUrl.orgListByName,{params:params,header: header}),
- getById: (params,header) => http.get(permissionsUrl.getById+params,{header: header}),
- getCarList:(params,header)=>http.get(permissionsUrl.carList,{params:params,header:header}),
- getSubListByPid:(params)=>http.get(permissionsUrl.subList,{params:params,header:header})
- }
- //字典
- const dict=(params,header) => http.get('/permissions/dict/getByCode/'+params,{params:{},header})
- //获取当前登录用户的身份
- const getCurrentAccount=(params,header) => http.get('/permissions/authentication/getCurrentAccount',{params,header})
- //修改密码
- const updatePsw= (params,header) => http.post('/permissions/account/modifyPassword',params,{header})
- //机构列表
- const agency={
- page:(params,header) => http.get("/estate/agency/showAgencyList",{params:params,header:header})
- }
- //数据统计
- let dataStatisticsUrl={
- //小区数
- getResidentialAccount:"home/getResidentialAccount",
- //单元数
- getUnitAccount:"home/getUnitAccount",
- //住户数
- getUserAccount:"home/getUserAccount",
- //住户待审核
- getApplyUserAccountWithCheckState:"home/getApplyUserAccountWithCheckState"
- }
- const dataStatistics={
- getResidentialAccount:(params,header) => http.get(dataStatisticsUrl.getResidentialAccount,{params:{'_':new Date().getTime()},header}),
- getUnitAccount:(params,header) => http.get(dataStatisticsUrl.getUnitAccount,{params:{'_':new Date().getTime()},header}),
- getUserAccount:(params,header) => http.get(dataStatisticsUrl.getUserAccount,{params:{'_':new Date().getTime()},header}),
- getApplyUserAccountWithCheckState:(params,header) => http.get(dataStatisticsUrl.getApplyUserAccountWithCheckState,{params:{'_':new Date().getTime(),'checkState':'0'},header})
- }
- //小区管理
- let residentialUrl={
- page:"estate/residential/getListByLikeName",
- pageBycondition: "estate/residential/showResidentialList",
- add: "/estate/residential/addResidential",
- update: "/estate/residential/updateResidential",
- del: "/estate/residential/deleteResidential",
- findListByPosition:"/estate/unit/findListByPosition",
- pageByconditionNew:"/community/residential/listByAgencyId",//条件获取小区列表
- }
- const residential={
- page:(params,header) => http.get(residentialUrl.page,{params:params,header: header}),
- pageBycondition:(params,header) => http.get(residentialUrl.pageBycondition,{params:params,header: header}),
- add: (params,header) => http.post(residentialUrl.add,params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- update: (params,header) => http.post(residentialUrl.update,params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- del: (params,header) => http.post(residentialUrl.del,params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- findListByPosition:(params,header) => http.get(residentialUrl.findListByPosition,{params:params,header: header}),
- pageByconditionNew:(params,header) => http.get(residentialUrl.pageByconditionNew,{params:params,header:header})
- }
- //楼栋管理
- let buildingUrl={
- page:'estate/building/showBuildingList',
- update:'estate/building/updateBuilding',
- del:'estate/building/deleteBuilding',
- add:'estate/building/addBuilding'
- }
- const building={
- page:(params,header) => http.get(buildingUrl.page,{params:params,header: header}),
- update: (params,header) => http.post(buildingUrl.update,params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- del: (params,header) => http.post(buildingUrl.del,params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- add: (params,header) => http.post(buildingUrl.add,params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- }
- //单元管理
- let unitUrl={
- page:"/estate/unit/findListByPosition"
- }
- const unit={
- page:(params,header) => http.get(unitUrl.page,{params:params,header: header}),
- }
- //房间管理
- let roomUrl={
- del:'estate/room/deleteRoom',
- add:'estate/room/addRoom',
- page: "/estate/room/showRoomList",
- pageBycondition: "estate/room/getListByLikeName",
- update:"estate/room/updateRoom",
- }
- const room = {
- del: (params,header) => http.post(roomUrl.del,params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- add: (params,header) => http.post(roomUrl.add,params,{header: header}),
- page:(params,header) => http.get(roomUrl.page,{params:params,header: header}),
- pageBycondition: (params,header) => http.get(roomUrl.pageBycondition,{params:params,header: header}),
- update: (params,header) => http.post(roomUrl.update,params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- }
- //住户管理
- let userUrl={
- page:'estate/user/showUserList',
- del:'estate/user/deleteUser',
- add:'estate/user/addUser',
- update:'estate/user/updateUser'
- }
- let user={
- page:(params,header) => http.get(userUrl.page,{params:params,header: header}),
- del: (params,header) => http.post(userUrl.del,params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- add: (params,header) => http.post(userUrl.add,params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- update: (params,header) => http.post(userUrl.update,params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- detail:(params,header) => http.get('/estate/user/getUserById/'+params,{params:{},header: header}),
- }
- //住户审核
- let userAuthUrl={
- //审核列表
- page:'apply/user/showApplyUserList',
- //认证审核
- updateCheckState:'apply/user/updateCheckState',
- }
- const userAuth={
- page: (params,header) => http.post(userAuthUrl.page,params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- updateCheckState: (params,header) => http.post(userAuthUrl.updateCheckState,params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- }
- //用户反馈
- let userFeedBackUrl={
- page:'estate/userFeedback/pagingQuery',
- }
- const userFeedBack={
- page:(params,header) => http.get(userFeedBackUrl.page,{params:params,header: header}),
- }
- //物业报修
- let estateRepairUrl={
- page:'estate/estateRepair/showRepairList',
- submit:'/estate/estateRepair/addOrEditEstateRepair',//新增修改
- detail:'/estate/estateRepair/findEstateRepairById/app/',
- userFeedback:'estate/userFeedback/pagingQuery',//用户反馈
- }
- const estateRepair={
- page:(params,header) => http.get(estateRepairUrl.page,{params:params,header: header}),
- submit: (params,header) => http.post(estateRepairUrl.submit,params,{header: header}),
- detail:(params,header) => http.get(estateRepairUrl.detail+params),
- }
- //车辆管理
- let carManageUrl={
- page:"/permissions/xq/device/admin/user/pagingQuery",
- pageBycondition:"/community/car/list",
- submit:"/community/car/submit",
- del:"/community/car/remove"
- }
- const carManage={
- page:(params,header) => http.get('/estate/car/page',{params:params,header: header}),
- pageBycondition:(params,header) => http.get(carManageUrl.pageBycondition,{params:params,header:header}),
- submit:(params,header) => http.post(carManageUrl.submit,params,{header:header}),
- del:(params,header) => http.post(carManage.del,params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- update:(params,header) => http.post('/estate/car/edit',params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}})
- }
- //服务人员管理
- const serverUser={
- page:(params,header) => http.get('estate/serverUser/showServerUserList',{params,header}),
- submit:(params,header) => http.post('estate/serverUser/addOrEditServerUser',params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- addOrEditOpenPermission:(params,header) => http.post('estate/serverUser/addOrEditOpenPermission',params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- accessDevicesManualPush:(params,header) => http.post('estate/serverUser/accessDevicesManualPush',params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- deleteServerUser:(params,header) => http.post('estate/serverUser/deleteServerUser/'+params,{},{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- }
- //公告管理
- const notice={
- page:(params,header) => http.get('estate/notice/showServerUserList',{params,header}),
- submit:(params,header) => http.post('estate/notice/addOrEditNotice',params,{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- remove:(params,header) => http.post('estate/notice/deleteNotice/'+params,{},{header: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}}),
- }
- export const api={
- //上传base64文件
- uploadBase64,
- //权限管理
- permissions,
- //字典
- dict,
- //获取当前用户的身份信息
- getCurrentAccount,
- //修改密码
- updatePsw,
- //机构列表
- agency,
- //数据统计
- dataStatistics,
- //小区管理
- residential,
- //楼栋管理
- building,
- //单元管理
- unit,
- //房间管理
- room,
- //住户管理
- user,
- //住户审核
- userAuth,
- //用户反馈
- userFeedBack,
- //物业报修
- estateRepair,
- //车辆管理
- carManage,
- //服务人员管理
- serverUser,
- //公告管理
- notice
- }
|