Bladeren bron

电子督察单对接+逻辑判断

ming 1 jaar geleden
bovenliggende
commit
b63f40fb55

+ 13 - 0
src/api/business/zhxf/fireInspect/index.js

@@ -0,0 +1,13 @@
+import { request } from "@/utils/request";
+
+/**
+ * @
+ */
+export function eleInspectList(param) {
+  return request({
+    url: "/service-fire/dataJinganAnalysis/analysisList",
+    method: "GET",
+    data: param,
+  });
+}
+

+ 51 - 16
src/pages/business/zhxf/fireInspect/inspectDetailsList/index.vue

@@ -39,12 +39,20 @@
             </image>
             <view
               style="width: calc(100% - 51px); display: flex; justify-content: space-between;align-items: center; padding-right: 10px">
-              <view class="deviceHeader">
+              <view class="deviceHeader" v-if="productName=='人工督察单'">
                 <view class="deviceName text-ellipsis">{{ base.productCode }}</view>
                 <view class="deviceName text-ellipsis"> {{ base.alarmAddress }}</view>
                 <view class="deviceName text-ellipsis">{{ base.alarmTime }}</view>
               </view>
 
+
+              <view class="deviceHeader" v-else>
+                <view class="deviceName text-ellipsis">{{ base.superviseCode }}</view>
+                <view class="deviceName text-ellipsis"> {{ base.content }}</view>
+                <view class="deviceName text-ellipsis">{{ base.timestamp }}</view>
+              </view>
+
+
               <view class="" v-if="base.handleStatus == 1" style="color: #16bf00;margin-right:10px"> 已处理 </view>
               <view class="" v-if="base.handleStatus == 0" style="color: red;margin-right:10px"> 未处理 </view>
             </view>
@@ -68,6 +76,7 @@ import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, on
 import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
 import { useStores, commonStores } from "@/store/modules/index";
 
+import { eleInspectList } from "@/api/business/zhxf/fireInspect/index.js";
 import { baseAlarmList } from "@/api/business/fireIot/alarmManage.js";
 
 const { proxy } = getCurrentInstance();
@@ -108,21 +117,47 @@ function init() {
  * @api接口查询
  */
 function selectListApi() {
-  baseAlarmList({
-    productCode: productCode.value,
-    handleStatus: tabsList.value[tabsCurrent.value].value,
-    current: current.value,
-    size: pageSize.value,
-  }).then((requset) => {
-    if (requset.status === "SUCCESS") {
-      dataList.value = requset.data.records;
-      total.value = requset.data.total;
-
-      uni.setNavigationBarTitle({
-        title: `${productName.value}(${total.value})`,
+  // alert(productName.value)
+  if(productName.value=='电子督察单'){
+      eleInspectList({
+        // productCode: productCode.value,
+        handleStatus: tabsList.value[tabsCurrent.value].value,
+        pageNum: current.value,
+        pageSize: pageSize.value,
+      }).then((requset) => {
+        if (requset.status === "SUCCESS") {
+          dataList.value = requset.data.records;
+          total.value = requset.data.total;
+
+          uni.setNavigationBarTitle({
+            title: `${productName.value}(${total.value})`,
+          });
+        }
       });
-    }
-  });
+
+
+  }else{
+
+      baseAlarmList({
+        productCode: productCode.value,
+        handleStatus: tabsList.value[tabsCurrent.value].value,
+        current: current.value,
+        size: pageSize.value,
+      }).then((requset) => {
+        if (requset.status === "SUCCESS") {
+        dataList.value = requset.data.records;
+        total.value = requset.data.total;
+        uni.setNavigationBarTitle({
+        title: `${productName.value}(${total.value})`,
+        });
+      }
+});
+
+
+
+
+  }
+  
 }
 
 /**
@@ -167,7 +202,7 @@ onShow(() => {
 onLoad((options) => {
   if ("productName" in options) {
     productName.value = options.productName;
-  }
+      }
   if ("productCode" in options) {
     productCode.value = options.productCode;
     init();