From fcfca196ac3c329ad83da49377e68424acf4c716 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 08 Jan 2025 16:07:12 +0800
Subject: [PATCH] 社区感知,户室或独栋点击弹窗中九大场景支持build

---
 src/api/dept/newIndex.js |  358 ++++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 231 insertions(+), 127 deletions(-)

diff --git a/src/api/dept/newIndex.js b/src/api/dept/newIndex.js
index 59fc5ee..96eaab8 100644
--- a/src/api/dept/newIndex.js
+++ b/src/api/dept/newIndex.js
@@ -6,14 +6,22 @@
  * @returns
  */
 
-export const getPlacePractitionerPage = (resBusId) => {
-    return request({
-        url: '/api/blade-placePractitioner/placePractitioner/page',
-        method: 'get',
-        params: {
-            resBusId
-        }
-    })
+export const getPlacePractitionerPage = (type = 1, resBusId) => {
+  let params = {
+    resBusId
+  }
+
+  if (type != 1) {
+    params = {
+      buildId: resBusId
+    }
+  }
+
+  return request({
+    url: '/api/blade-placePractitioner/placePractitioner/page',
+    method: 'get',
+    params
+  })
 }
 
 /**
@@ -22,14 +30,22 @@
  * @returns 
  */
 
-export const getTaskLabelReportingEventPage = (resBusId) => {
-    return request({
-        url: '/api/blade-taskLabelReportingEvent/taskLabelReportingEvent/page',
-        method: 'get',
-        params: {
-            resBusId
-        }
-    })
+export const getTaskLabelReportingEventPage = (type = 1, resBusId) => {
+  let params = {
+    resBusId
+  }
+
+  if (type != 1) {
+    params = {
+      buildId: resBusId
+    }
+  }
+
+  return request({
+    url: '/api/blade-taskLabelReportingEvent/taskLabelReportingEvent/page',
+    method: 'get',
+    params
+  })
 }
 
 /**
@@ -37,28 +53,44 @@
  * @param {*} resBusId 
  * @returns 
  */
-export const getTaskLabelAntiFraudPage = (resBusId) => {
-    return request({
-        url: '/api/blade-backblastPubRecord/backblastPubRecord/page',
-        method: 'get',
-        params: {
-            resBusId
-        }
-    })
+export const getTaskLabelAntiFraudPage = (type = 1, resBusId) => {
+  let params = {
+    resBusId
+  }
+
+  if (type != 1) {
+    params = {
+      buildId: resBusId
+    }
+  }
+
+  return request({
+    url: '/api/blade-backblastPubRecord/backblastPubRecord/page',
+    method: 'get',
+    params
+  })
 }
 /**
  * 反诈预警列表
  * @param {*} resBusId 
  * @returns 
  */
-export const getBackblastWarnHanRec = (resBusId) => {
-    return request({
-        url: '/api/blade-backblastWarnHanRec/backblastWarnHanRec/page',
-        method: 'get',
-        params: {
-            resBusId
-        }
-    })
+export const getBackblastWarnHanRec = (type = 1, resBusId) => {
+  let params = {
+    resBusId
+  }
+
+  if (type != 1) {
+    params = {
+      buildId: resBusId
+    }
+  }
+
+  return request({
+    url: '/api/blade-backblastWarnHanRec/backblastWarnHanRec/page',
+    method: 'get',
+    params
+  })
 }
 
 /**
@@ -68,16 +100,27 @@
  * @param {*} current 
  * @returns 
  */
-export const getPoliceAlarmRecordsPage = (resBusId, size, current) => {
-    return request({
-        url: '/api/blade-policeAlarmRecords/policeAlarmRecords/page',
-        method: 'get',
-        params: {
-            resBusId,
-            current,
-            size
-        }
-    })
+export const getPoliceAlarmRecordsPage = (type = 1, resBusId, size, current) => {
+  let params = {
+    resBusId
+  }
+
+  if (type != 1) {
+    params = {
+      buildId: resBusId
+    }
+  }
+
+
+  return request({
+    url: '/api/blade-policeAlarmRecords/policeAlarmRecords/page',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size
+    }
+  })
 }
 /**
  * 消防检查
@@ -87,16 +130,26 @@
  * @returns 
  */
 
-export const getPlaceCheckPage = (resBusId, size, current) => {
-    return request({
-        url: '/api/blade-placeCheck/placeCheck/page',
-        method: 'get',
-        params: {
-            resBusId,
-            current,
-            size
-        }
-    })
+export const getPlaceCheckPage = (type = 1, resBusId, size, current) => {
+  let params = {
+    resBusId
+  }
+
+  if (type != 1) {
+    params = {
+      buildId: resBusId
+    }
+  }
+
+  return request({
+    url: '/api/blade-placeCheck/placeCheck/page',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size
+    }
+  })
 }
 
 
@@ -108,17 +161,27 @@
  * @returns 
  */
 
-export const getTaskPlaceSelfCheckPage = (type, resBusId, size, current) => {
-    return request({
-        url: '/api/blade-taskPlaceSelfCheck/taskPlaceSelfCheck/page',
-        method: 'get',
-        params: {
-            type,
-            resBusId,
-            current,
-            size
-        }
-    })
+export const getTaskPlaceSelfCheckPage = (houseType = 1, type, resBusId, size, current) => {
+  let params = {
+    resBusId
+  }
+
+  if (houseType != 1) {
+    params = {
+      buildId: resBusId
+    }
+  }
+
+  return request({
+    url: '/api/blade-taskPlaceSelfCheck/taskPlaceSelfCheck/page',
+    method: 'get',
+    params: {
+      type,
+      ...params,
+      current,
+      size
+    }
+  })
 }
 
 
@@ -129,16 +192,27 @@
  * @param {*} current 
  * @returns 
  */
-export const getHouseRentalPage = (resBusId, size, current) => {
-    return request({
-        url: '/api/blade-houseRental/houseRental/page',
-        method: 'get',
-        params: {
-            resBusId,
-            current,
-            size
-        }
-    })
+export const getHouseRentalPage = (type = 1, resBusId, size, current) => {
+  let params = {
+    resBusId
+  }
+
+  if (type != 1) {
+    params = {
+      buildId: resBusId
+    }
+  }
+
+
+  return request({
+    url: '/api/blade-houseRental/houseRental/page',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size
+    }
+  })
 }
 /**
  *  居住证申请列表
@@ -147,17 +221,27 @@
  * @param {*} current 
  * @returns 
  */
-export const geTaskResidencePermitApplyPage = (reportType, resBusId, size, current) => {
-    return request({
-        url: '/api/blade-taskResidencePermitApply/taskResidencePermitApply/page',
-        method: 'get',
-        params: {
-            reportType,
-            resBusId,
-            current,
-            size
-        }
-    })
+export const geTaskResidencePermitApplyPage = (type = 1, reportType, resBusId, size, current) => {
+  let params = {
+    resBusId
+  }
+
+  if (type != 1) {
+    params = {
+      buildId: resBusId
+    }
+  }
+
+  return request({
+    url: '/api/blade-taskResidencePermitApply/taskResidencePermitApply/page',
+    method: 'get',
+    params: {
+      reportType,
+      ...params,
+      current,
+      size
+    }
+  })
 }
 /**
  * 租客列表
@@ -167,28 +251,48 @@
  * @param {*} current 
  * @returns 
  */
-export const getTenantPage = (relationship, resBusId, size, current) => {
-    return request({
-        url: '/api/blade-household/household/selectTenantPage',
-        method: 'get',
-        params: {
-            relationship,
-            resBusId,
-            current,
-            size
-        }
-    })
+export const getTenantPage = (type = 1, relationship, resBusId, size, current) => {
+  let params = {
+    resBusId
+  }
+
+  if (type != 1) {
+    params = {
+      buildId: resBusId
+    }
+  }
+
+  return request({
+    url: '/api/blade-household/household/selectTenantPage',
+    method: 'get',
+    params: {
+      relationship,
+      ...params,
+      current,
+      size
+    }
+  })
 }
-export const getTaskNoFraudReporting = (resBusId, size, current) => {
-    return request({
-        url: '/api/blade-taskNoFraudReporting/taskNoFraudReporting/page',
-        method: 'get',
-        params: {
-            resBusId,
-            current,
-            size
-        }
-    })
+export const getTaskNoFraudReporting = (type = 1, resBusId, size, current) => {
+  let params = {
+    resBusId
+  }
+
+  if (type != 1) {
+    params = {
+      buildId: resBusId
+    }
+  }
+
+  return request({
+    url: '/api/blade-taskNoFraudReporting/taskNoFraudReporting/page',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size
+    }
+  })
 }
 /**
  * 
@@ -196,13 +300,13 @@
  * @returns 
  */
 export const getTaskNoFraudReportingInfo = (id) => {
-    return request({
-        url: '/api/blade-taskNoFraudReporting/taskNoFraudReporting/getInfo',
-        method: 'get',
-        params: {
-            id
-        }
-    })
+  return request({
+    url: '/api/blade-taskNoFraudReporting/taskNoFraudReporting/getInfo',
+    method: 'get',
+    params: {
+      id
+    }
+  })
 }
 /**
  * 
@@ -210,13 +314,13 @@
  * @returns 
  */
 export const getHouseRentalDetail = (id) => {
-    return request({
-        url: '/api/blade-houseRental/houseRental/getDetail',
-        method: 'get',
-        params: {
-            id
-        }
-    })
+  return request({
+    url: '/api/blade-houseRental/houseRental/getDetail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
 }
 
 /**
@@ -227,12 +331,12 @@
  */
 
 export const getPatrolGroupTree = (type, childType) => {
-    return request({
-        url: '/api/patrol/patrolGroup/getPatrolGroupTree',
-        method: 'get',
-        params: {
-            type,
-            childType
-        }
-    })
+  return request({
+    url: '/api/patrol/patrolGroup/getPatrolGroupTree',
+    method: 'get',
+    params: {
+      type,
+      childType
+    }
+  })
 }
\ No newline at end of file

--
Gitblit v1.9.3