ming пре 1 година
родитељ
комит
0afdf66d76

+ 21 - 0
src/pages.json

@@ -497,6 +497,27 @@
             "enablePullDownRefresh": false
           }
         },
+        {
+          "path": "fireInspect/index",
+          "style": {
+            "navigationBarTitleText": "消防督察单",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "fireInspect/inspectDetailsList/index",
+          "style": {
+            "navigationBarTitleText": "",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "fireInspect/inspectDetails/index",
+          "style": {
+            "navigationBarTitleText": "消防督察单处理",
+            "enablePullDownRefresh": false
+          }
+        },
         {
           "path": "funReport/index",
           "style": {

+ 1 - 1
src/pages/business/videoMonitor/videoList.vue

@@ -26,7 +26,7 @@
               <view style="width: calc(100% - 51px); display: flex; justify-content: space-between; padding-right: 10px">
                 <view class="deviceHeader">
                   <view class="deviceName text-ellipsis">{{ base.deviceName }}</view>
-                  
+
                 </view>
                 <view class="" v-if="base.deviceStatus == 1" style="color: #16bf00;margin-right:10px"> 在线 </view>
                   <view class="" v-if="base.deviceStatus == 2" style="color: #333;margin-right:10px"> 离线 </view>

+ 149 - 0
src/pages/business/zhxf/fireInspect/index.vue

@@ -0,0 +1,149 @@
+<template>
+  <oa-scroll
+    customClass="bg-white scroll-height"
+    :pageSize="pageSize"
+    :total="total"
+    :refresherLoad="true"
+    :refresherLoadTitle="false"
+    :refresherEnabled="true"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    @load="load"
+    @refresh="refresh"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.type"
+  >
+    <!-- <template #default>
+      <view class="alarmManage">
+        <u-grid :border="true">
+          <u-grid-item v-for="(base, index) in dataList" :key="index" @click="handleToDetails(base.productCode, base.productName)">
+            <u-badge type="primary" max="9999" :value="base.total" :showZero="true" :absolute="true" :offset="[10, 10, 0, 0]"></u-badge>
+            <image class="mb15" style="width: 40px; height: 40px; margin-top: 35px" :src="base.typeImg" mode="aspectFill"></image>
+            <text class="mb15 grid-text text-ellipsis">{{ base.productName }}</text>
+          </u-grid-item>
+        </u-grid>
+      </view>
+    </template> -->
+
+
+    <template #default>
+      <view class="menu-list m0">
+        <view class="list-cell list-cell-arrow" style=" line-height: 25px" v-for="(base, index) in dataList" :key="index" @click="handleToDetails(base.productCode, base.productName)">
+          <view class="menu-item">
+              <image  class="image-bg" style="width: 80rpx; height: 80rpx; margin: auto 10px auto 0" :src="base.typeImg"></image>
+              <view style="width: calc(100% - 51px); display: flex; justify-content: space-between; padding-right: 10px">
+                <view class="deviceHeader">
+                  <view class="deviceName text-ellipsis">{{ base.productName }}</view>
+                </view>
+              </view>
+
+              <view>
+               
+              </view>
+            </view>
+        </view>
+      </view>
+    </template>
+
+
+  </oa-scroll>
+</template>
+
+<script setup>
+import { onReady, onLoad, onShow, onNavigationBarButtonTap, onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance } from "vue";
+import { useStores, commonStores } from "@/store/modules/index";
+
+import { dmpProductInfo, baseAlarmTypeList } from "@/api/business/fireIot/alarmManage.js";
+
+const { proxy } = getCurrentInstance();
+
+const dataList = ref( [
+    {
+  
+    "productName": "人工督察单",
+    "productCode": "501_JK",
+    "deviceType": 501,
+    "total": 819,
+    "untreated": 26,
+    "processed": 793,
+    "processRate": 96.82539,
+    "deviceCount": 661,
+    "offLineUntreated": 0,
+    "offLineProcessed": 0,
+    "offLineProcessRate": 0,
+    "typeImg": "/static/images/fireInspect/rg.png"
+
+            },
+            {
+    "productName": "电子督察单",
+    "productCode": "509_HJ",
+    "deviceType": 509,
+    "total": 3,
+    "untreated": 0,
+    "processed": 3,
+    "processRate": 100,
+    "deviceCount": 1,
+    "offLineUntreated": 0,
+    "offLineProcessed": 0,
+    "offLineProcessRate": 0,
+    "typeImg": "/static/images/fireInspect/dz.png"
+},
+]);
+const pageSize = ref(20);
+const current = ref(1);
+const total = ref(0);
+
+/**
+ * @页面初始化
+ */
+function init() {
+  baseAlarmTypeList({ productName: "", current: current.value, size: pageSize.value }).then((requset) => {
+    if (requset.status === "SUCCESS") {
+      dmpProductInfo({ current: current.value, size: 2000 }).then((requset1) => {
+        if (requset1.status === "SUCCESS") {
+          requset.data.records.forEach((e) => {
+            requset1.data.records.forEach((el) => {
+              if (e.productCode === el.productCode) {
+                e.typeImg = el.typeImg ? el.typeImg : "/static/images/404.png";
+              }
+            });
+          });
+
+          // dataList.value = requset.data.records;
+          total.value = requset.data.total;
+          console.log( dataList.value)
+        }
+      });
+    }
+  });
+}
+
+function handleToDetails(productCode, productName) {
+  proxy.$tab.navigateTo(`/pages/business/zhxf/fireInspect/inspectDetailsList/index?productCode=${productCode}&productName=${productName}`);
+}
+
+/**
+ * @scrollView加载数据
+ */
+function load() {
+  pageSize.value += 10;
+  init();
+}
+
+/**
+ * @scrollView刷新数据
+ */
+function refresh() {
+  pageSize.value = 20;
+  total.value = 0;
+  init();
+}
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+
+  init();
+});
+</script>

+ 207 - 0
src/pages/business/zhxf/fireInspect/inspectDetails/index.vue

@@ -0,0 +1,207 @@
+<template>
+  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
+    <view class="alarmDetails-container">
+      <view class="flex bg-white p15 mb15">
+        <image style="width: 40px; height: 40px; margin: auto 15px auto 0" :src="dataArray.typeImg ? dataArray.typeImg : '/static/images/404.png'" mode="aspectFill"></image>
+
+        <view style="margin: auto auto auto 0">
+          <view style="font-size: 15px"> {{ dataArray.deviceName }} </view>
+        </view>
+
+        <view style="margin: auto 0 auto 0">
+          <view style="font-size: 15px" :style="`color:${dataArray.handleStatus == 1 ? '#16bf00' : 'red'}`">
+            {{ dataArray.handleStatus == 1 ? "已处理" : dataArray.handleStatus == 0 ? "未处理" : "" }}
+          </view>
+        </view>
+      </view>
+
+      <view class="bg-white p15 mb15">
+        <uni-section class="block mb10" title="基本信息" type="line"></uni-section>
+
+        <view class="tableType3 padding-0">
+          <u-row v-for="da in dataList" :key="da">
+            <u-col span="4">
+              <view style="text-align: right; padding: 0px 5px 0px 5px">{{ da.title }}</view>
+            </u-col>
+            <u-col span="8">
+              <view style="text-align: left; padding: 0px 5px 0px 5px">{{ da.value }}</view>
+            </u-col>
+          </u-row>
+        </view>
+      </view>
+
+      <view class="bg-white p15 mb15">
+        <uni-section class="block mb10" title="处理内容" type="line"></uni-section>
+
+        <view>
+          <u-radio-group v-model="handleRange" placement="row" v-if="dataArray.handleStatus != 1">
+            <u-radio
+              v-for="han in handleRangeList"
+              :key="han"
+              :activeColor="proxy.$settingStore.themeColor.color"
+              :label="han.label"
+              :name="han.value"
+              style="margin: 0 15px 15px 0"
+              :labelSize="13"
+              :iconSize="10"
+            ></u-radio>
+          </u-radio-group>
+
+          <u--textarea v-model="handleContent" placeholder="备注信息,最多可输入50个字" :count="true" maxlength="50" style="margin: 0 0 15px 0" :disabled="dataArray.handleStatus == 1"></u--textarea>
+        </view>
+
+        <view class="flex" v-if="dataArray.handleStatus != 1">
+          <u-button
+            type="primary"
+            text="提交"
+            shape="circle"
+            :customStyle="{
+              width: '80px',
+              height: '30px',
+              marginRight: '15px',
+            }"
+            @click="handleSubmit(1)"
+          ></u-button>
+          <!-- <u-button
+            type="primary"
+            text="非误报"
+            shape="circle"
+            :customStyle="{
+              width: '80px',
+              height: '30px',
+              marginLeft: '15px',
+            }"
+            @click="handleSubmit(0)"
+          ></u-button> -->
+        </view>
+      </view>
+    </view>
+  </scroll-view>
+</template>
+
+<script setup>
+import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+import { useStores, commonStores } from "@/store/modules/index";
+
+import { baseAlarmList, baseAlarm } from "@/api/business/fireIot/alarmManage.js";
+
+const { proxy } = getCurrentInstance();
+
+const dataArray = ref({});
+const dataList = ref([
+  {
+    title: "设备名称",
+    value: "",
+  },
+  {
+    title: "设备地址",
+    value: "",
+  },
+  {
+    title: "告警等级",
+    value: "",
+  },
+  {
+    title: "告警信息",
+    value: "",
+  },
+  {
+    title: "告警时间",
+    value: "",
+  },
+]);
+
+const deviceName = ref("");
+const alarmTime = ref("");
+const pageSize = ref(20);
+const current = ref(1);
+const total = ref(0);
+
+const handleContent = ref("");
+const handleRange = ref(1);
+const handleRangeList = ref([
+  {
+    label: "单个处理",
+    value: 1,
+  },
+  {
+    label: "批量处理",
+    value: 0,
+  },
+]);
+
+/**
+ * @页面初始化
+ */
+function init() {
+  selectListApi();
+}
+
+/**
+ * @列表查询
+ * @api接口查询
+ */
+function selectListApi() {
+  baseAlarmList({
+    deviceName: deviceName.value,
+    startTime: alarmTime.value,
+    endTime: alarmTime.value,
+    current: current.value,
+    size: pageSize.value,
+  }).then((requset) => {
+    if (requset.status === "SUCCESS") {
+      dataArray.value = requset.data.records[0];
+      dataList.value[0].value = requset.data.records[0].deviceName;
+      dataList.value[1].value = requset.data.records[0].alarmAddress;
+      dataList.value[2].value = requset.data.records[0].alarmGrade + "级";
+      dataList.value[3].value = requset.data.records[0].alarmContent;
+      dataList.value[4].value = requset.data.records[0].alarmTime;
+      total.value = requset.data.total;
+    }
+  });
+}
+
+/**
+ * @提交
+ */
+function handleSubmit(alarmFalse) {
+  baseAlarm({
+    id: dataArray.value.id,
+    deviceId: dataArray.value.deviceId,
+    alarmType: dataArray.value.alarmType,
+    handleContent: handleContent.value,
+    alarmFalse: alarmFalse,
+    handleRange: handleRange.value,
+  }).then((requset) => {
+    if (requset.status === "SUCCESS") {
+      proxy.$tab.navigateTo(`/pages/common/success/index?codeName=提交成功`);
+    }
+  });
+}
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+onLoad((options) => {
+  if ("deviceName" in options) {
+    deviceName.value = options.deviceName;
+  }
+
+  if ("alarmTime" in options) {
+    alarmTime.value = options.alarmTime;
+  }
+
+  init();
+});
+</script>
+
+<style lang="scss" scoped>
+:deep(.u-textarea__field) {
+  font-size: 13px;
+}
+</style>

+ 180 - 0
src/pages/business/zhxf/fireInspect/inspectDetailsList/index.vue

@@ -0,0 +1,180 @@
+<template>
+  <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
+    <u-tabs :list="tabsList" :current="tabsCurrent" @click="tabsClick" lineColor="#333" :activeStyle="{ color: '#333' }"
+      :inactiveStyle="{ color: '#909399' }" :scrollable="false"></u-tabs>
+  </u-sticky>
+
+  <oa-scroll customClass="scroll-height" :pageSize="pageSize" :total="total" :refresherLoad="true"
+    :refresherEnabled="true" :refresherDefaultStyle="'none'" :refresherThreshold="44" :lowerThreshold="44"
+    :refresherBackground="'#f5f6f7'" @load="load" @refresh="refresh"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
+    <!-- <template #default>
+      <view class="alarmDetailsList-container">
+        <view class="menu-list margin-0">
+          <view class="list-cell list-cell-arrow" v-for="(base, index) in dataList" :key="index" @click="handleToDetails(base)">
+
+            <view class="menu-item" style="font-size: 13px; flex-flow: row wrap">
+              <view style="min-width: 80%; margin-bottom: 5px; color: #909399"> {{ base.alarmTime }}</view>
+              <view style="min-width: 20%; margin-bottom: 5px; color: #909399; text-align: right; padding-right: 15px"> {{ base.alarmGrade }}级</view>
+              <view style="min-width: 80%; margin-bottom: 5px; color: #909399">{{ base.deviceName }}</view>
+              <view style="min-width: 20%; margin-bottom: 5px; text-align: right; padding-right: 15px" :style="`color:${base.handleStatus == 1 ? '#16bf00' : 'red'}`">
+                {{ base.handleStatus == 1 ? "已处理" : "未处理" }}
+              </view>
+              <view style="min-width: 50%; padding-right: 15px">{{ base.alarmContent }}</view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </template> -->
+
+
+    <template #default>
+      <view class="menu-list m0">
+        <view class="list-cell list-cell-arrow" style=" line-height: 25px" v-for="(base, index) in dataList"
+          :key="index" @click="handleToDetails(base)">
+          <view class="menu-item">
+            <image class="image-bg"
+              style="width: 80rpx; height: 80rpx; margin: auto 10px auto 0"
+              :src="base.handleStatus == 1 ? '/static/images/fireInspect/processed-icon.png' : '/static/images/fireInspect/process-icon.png'">
+            </image>
+            <view
+              style="width: calc(100% - 51px); display: flex; justify-content: space-between;align-items: center; padding-right: 10px">
+              <view class="deviceHeader">
+                <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="" 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>
+
+            <view>
+
+            </view>
+          </view>
+        </view>
+      </view>
+    </template>
+
+
+
+
+  </oa-scroll>
+</template>
+
+<script setup>
+import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+import { useStores, commonStores } from "@/store/modules/index";
+
+import { baseAlarmList } from "@/api/business/fireIot/alarmManage.js";
+
+const { proxy } = getCurrentInstance();
+const commonStore = commonStores();
+
+const tabsList = ref([
+  {
+    name: "全部",
+    value: "",
+  },
+  {
+    name: "未处理",
+    value: 0,
+  },
+  {
+    name: "已处理",
+    value: 1,
+  },
+]);
+const tabsCurrent = ref(0);
+
+const dataList = ref([]);
+const productCode = ref("");
+const productName = ref("");
+const pageSize = ref(20);
+const current = ref(1);
+const total = ref(0);
+
+/**
+ * @页面初始化
+ */
+function init() {
+  selectListApi();
+}
+
+/**
+ * @列表查询
+ * @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})`,
+      });
+    }
+  });
+}
+
+/**
+ * @跳转详情事件
+ */
+function handleToDetails(e) {
+  proxy.$tab.navigateTo(`/pages/business/zhxf/fireInspect/inspectDetails/index?deviceName=${e.deviceName}&alarmTime=${e.alarmTime}`);
+}
+
+/**
+ * @scrollView加载数据
+ */
+function load() {
+  pageSize.value += 10;
+  init();
+}
+
+/**
+ * @scrollView刷新数据
+ */
+function refresh() {
+  pageSize.value = 20;
+  total.value = 0;
+  init();
+}
+
+/**
+ * @tabs点击事件
+ */
+function tabsClick(e) {
+  tabsCurrent.value = e.index;
+  init();
+}
+
+onReady(() => { });
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+onLoad((options) => {
+  if ("productName" in options) {
+    productName.value = options.productName;
+  }
+  if ("productCode" in options) {
+    productCode.value = options.productCode;
+    init();
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+.alarmDetailsList-container {}
+</style>

BIN
src/static/images/fireInspect/dz.png


BIN
src/static/images/fireInspect/process-icon.png


BIN
src/static/images/fireInspect/processed-icon.png


BIN
src/static/images/fireInspect/rg.png