Jelajahi Sumber

智慧消防/消防报告pdf在线访问

fanghuisheng 1 tahun lalu
induk
melakukan
6a4efd6297

+ 1 - 1
src/components/list-test/list-test.vue

@@ -5,7 +5,7 @@
       <view class="cu-bar search bg-gray filter-section">
         <view class="search-form round bg-white">
           <text class="cuIcon-search"></text>
-          <input class="" @focus="InputFocus" @blur="InputBlur" :adjust-position="false" type="text" placeholder="请输入站点名称" confirm-type="search" v-model="nowSiteName" />
+          <uni-easyinput v-model="nowSiteName" placeholder="请输入站点名称" prefixIcon="search" @focus="InputFocus" @blur="InputBlur" />
         </view>
         <view class="action">
           <button class="cu-btn bg-blue round" @click="searchData">查询</button>

+ 4 - 23
src/components/searchSelect/searchSelect.vue

@@ -3,28 +3,12 @@
     <view class="searchSelect shadow" v-if="flag">
       <view class="cu-bar search bg-white">
         <view class="search-form round" style="margin-top: 0">
-          <input
-            @focus="InputFocus"
-            @blur="InputBlur"
-            @input="handleInput()"
-            v-model="searchInput"
-            :adjust-position="false"
-            type="text"
-            placeholder=""
-            confirm-type="search"
-            style="border: none"
-          />
+          <uni-easyinput type="text" v-model="searchInput" placeholder="" prefixIcon="search" @focus="InputFocus" @blur="InputBlur" @input="handleInput()" style="border: none" />
           <text class="cuIcon-search"></text>
         </view>
       </view>
       <view class="select-items">
-        <view
-          class="select-item"
-          v-for="(item, index) in searchList"
-          @click="clickSelectItem(item, index)"
-          :key="index"
-          >{{ item }}</view
-        >
+        <view class="select-item" v-for="(item, index) in searchList" @click="clickSelectItem(item, index)" :key="index">{{ item }}</view>
       </view>
     </view>
   </view>
@@ -78,9 +62,7 @@ export default {
       this.flag = false;
     },
     handleInput() {
-      var newlist = this.searchList2.filter(
-        (item) => item.indexOf(this.searchInput) > -1
-      );
+      var newlist = this.searchList2.filter((item) => item.indexOf(this.searchInput) > -1);
       this.searchList = newlist;
     },
 
@@ -98,5 +80,4 @@ export default {
 };
 </script>
 
-<style>
-</style>
+<style></style>

+ 1 - 1
src/components/yealuo-select/yealuo-select.vue

@@ -3,7 +3,7 @@
 		<view class="yealuo-background" @tap="isShow=false" v-show="isShow"></view>
 		<view class="yealuo-con" :style="inputStyle" @tap='isShow=isShow?false:nowData.length'>
 			<slot name='left'></slot>
-			<input :disabled="theDisabled" :placeholder="placeholder" v-model="theValue" @input="theInput"  @focus="theFocus" @blur="theBlur" autocomplete="off" />
+			<uni-easyinput type="text" v-model="theValue" :placeholder="placeholder" prefixIcon="search" @input="theInput"  @focus="theFocus" @blur="theBlur" :disabled="theDisabled"/>
 			<slot name='right' v-if="selectIco">
 				<svg class="icon" v-if="!isShow" style="width: 1.5em; height: 1.5em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="530"><path d="M512 714.666667c-8.533333 0-17.066667-2.133333-23.466667-8.533334l-341.333333-341.333333c-12.8-12.8-12.8-32 0-44.8 12.8-12.8 32-12.8 44.8 0l320 317.866667 317.866667-320c12.8-12.8 32-12.8 44.8 0 12.8 12.8 12.8 32 0 44.8L533.333333 704c-4.266667 8.533333-12.8 10.666667-21.333333 10.666667z" p-id="531"></path></svg>
 				<svg class="icon" v-else style="width: 1.5em; height: 1.5em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1927"><path d="M904.533333 674.133333l-362.666666-362.666666c-17.066667-17.066667-42.666667-17.066667-59.733334 0l-362.666666 362.666666c-17.066667 17.066667-17.066667 42.666667 0 59.733334 17.066667 17.066667 42.666667 17.066667 59.733333 0L512 401.066667l332.8 332.8c8.533333 8.533333 19.2 12.8 29.866667 12.8s21.333333-4.266667 29.866666-12.8c17.066667-17.066667 17.066667-42.666667 0-59.733334z" p-id="1928"></path></svg>

+ 1 - 1
src/components/zzlb-mutiselect/zzlb-mutiselect.vue

@@ -6,7 +6,7 @@
         <text class="margin-left line-blue cuIcon-close round bg-red" @click="onremove(index)"></text>
       </view>
       <view class="flex">
-        <input style1="width: 60px;" placeholder="输入..." type="text" v-model="query" @input="onshuru" @click="onquery" @keyup="onquery" />
+        <uni-easyinput type="text" v-model="query" placeholder="输入..." prefixIcon="search" @input="onshuru" @click="onquery" @keyup="onquery" style="width: 60px;" />
         <text
           v-if="query"
           class="cuIcon-close"

+ 6 - 2
src/config.js

@@ -1,7 +1,7 @@
 // 应用全局配置
 export default {
   //#ifdef APP-PLUS
-  baseUrl: import.meta.env.MODE === "production" ? "http://mobile.usky.cn:8099/prod-api" : "http://172.16.120.165:13200/prod-api",
+  baseUrl: "http://mobile.usky.cn:8099/prod-api",
   //#endif
 
   //#ifdef H5
@@ -18,6 +18,10 @@ export default {
     version: "2.0.0",
     // 应用logo
     logo: "/static/logo.png",
+    // 官网邮箱
+    email: "admin@chinausky.com",
+    // 服务热线
+    hotline: "021-65376655",
     // 官方网站
     site_url: "http://www.usky.cn/",
     // 政策协议
@@ -30,7 +34,7 @@ export default {
       {
         title: "隐私政策",
         content: "暂无数据",
-        url: "https://ruoyi.vip/protocol.html",
+        url: "http://file.usky.cn/statics/protocol.html",
       },
     ],
   },

+ 10 - 2
src/manifest.json

@@ -27,7 +27,11 @@
             "VideoPlayer" : {},
             "iBeacon" : {},
             "Geolocation" : {},
-            "Maps" : {}
+            "Maps" : {},
+            "Barcode" : {},
+            "Camera" : {},
+            "Fingerprint" : {},
+            "Contacts" : {}
         },
         /* 应用发布信息 */
         "distribute" : {
@@ -40,8 +44,8 @@
                     "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.BIND_NFC_SERVICE\"/>",
                     "<uses-permission android:name=\"android.permission.BIND_DREAM_SERVICE\"/>",
+                    "<uses-permission android:name=\"android.permission.BIND_NFC_SERVICE\"/>",
                     "<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
                     "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
                     "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
@@ -58,6 +62,7 @@
                     "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+                    "<uses-permission android:name=\"android.permission.USE_FINGERPRINT\"/>",
                     "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
@@ -105,6 +110,9 @@
                         "appkey_ios" : "ffc71dfd4e576596027f8f45a1b8fb2f",
                         "appkey_android" : "ffc71dfd4e576596027f8f45a1b8fb2f"
                     }
+                },
+                "push" : {
+                    "unipush" : null
                 }
             },
             "icons" : {

+ 35 - 29
src/pages.json

@@ -189,36 +189,7 @@
               "titleNView": false
             }
           }
-        },
-        {
-          "path": "/setting/messagePush/messagePush",
-          "style": {
-            "navigationBarTitleText": "消息推送设置",
-            "enablePullDownRefresh": false
-          }
-        },
-        {
-          "path": "/setting/building/building",
-          "style": {
-            "navigationBarTitleText": "建筑管理",
-            "enablePullDownRefresh": false
-          }
-        },
-        {
-          "path": "/setting/funReport/funReport",
-          "style": {
-            "navigationBarTitleText": "功能报备",
-            "enablePullDownRefresh": false,
-            "onReachBottomDistance": 100 //距离底部多远时触发 单位px
-          }
         }
-        // {
-        //   "path": "pages/setting/funReport/funcAdd/funcAdd",
-        //   "style": {
-        //     "navigationBarTitleText": "功能报备新增",
-        //     "enablePullDownRefresh": false
-        //   }
-        // },
       ]
     },
     // 消息
@@ -442,6 +413,41 @@
         }
         //待办事项 结束
       ]
+    },
+    // 智慧消防
+    {
+      "root": "pages/business/zhxf",
+      "pages": [
+        {
+          "path": "/messagePush/index",
+          "style": {
+            "navigationBarTitleText": "消息推送设置",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "/building/index",
+          "style": {
+            "navigationBarTitleText": "建筑管理",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "/funReport/index",
+          "style": {
+            "navigationBarTitleText": "功能报备",
+            "enablePullDownRefresh": false,
+            "onReachBottomDistance": 100 //距离底部多远时触发 单位px
+          }
+        },
+        {
+          "path": "/funReport/funcAdd/index",
+          "style": {
+            "navigationBarTitleText": "功能报备新增",
+            "enablePullDownRefresh": false
+          }
+        }
+      ]
     }
   ],
   "globalStyle": {

+ 16 - 1
src/pages/business/mhxf/fireReport/components/detailedPath.vue

@@ -21,11 +21,26 @@ const publicStores = publicStore(); //全局公共Store
 
 const dataList = reactive({
   pathUrl: "",
-  viewerUrl: "/static/pdf/web/viewer.html",
+  viewerUrl: import.meta.env.MODE === "production" ? "http://file.usky.cn/statics/pdf_js/web/viewer.html" : "http://172.16.120.165:9300/statics/pdf_js/web/viewer.html",
 });
 
 const { pathUrl, viewerUrl } = toRefs(dataList);
 
+let host;
+//#ifdef APP-PLUS
+host = uni.getStorageSync("serveUrl");
+//#endif
+
+//#ifdef H5
+host = window.location.host;
+//#endif
+
+if (host.indexOf("172.16.120") != -1) {
+  viewerUrl.value = "http://172.16.120.165:13200/prod-api";
+} else {
+  viewerUrl.value = "http://mobile.usky.cn:8099/prod-api";
+}
+
 watchEffect(() => {});
 
 // 自定义导航事件

+ 165 - 0
src/pages/business/zhxf/building/index.vue

@@ -0,0 +1,165 @@
+<template>
+  <view class="setting-building">
+    <uni-section class="mb-10" title="基本信息" type="line" titleFontSize="16px" titleColor="#4074E7"></uni-section>
+    <view class="basic-info padding-lr">
+      <u-row>
+        <u-col span="5"> 建筑物名称 </u-col>
+        <u-col span="7"> {{ getDetailData.build_name }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 建筑物类别 </u-col>
+        <u-col span="7"> {{ getDetailData.build_type }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 建造日期 </u-col>
+        <u-col span="7"> {{ getDetailData.build_time }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 使用性质 </u-col>
+        <u-col span="7"> {{ getDetailData.nature_use }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 火灾危险级 </u-col>
+        <u-col span="7"> {{ getDetailData.fire_risk_level }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 耐火等级 </u-col>
+        <u-col span="7"> {{ getDetailData.fire_resistance_rating }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 结构类型 </u-col>
+        <u-col span="7"> {{ getDetailData.structure_type }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 建筑高度 </u-col>
+        <u-col span="7"> {{ getDetailData.build_height }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 建筑面积 </u-col>
+        <u-col span="7"> {{ getDetailData.build_area }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 占地面积 </u-col>
+        <u-col span="7"> {{ getDetailData.land_occupation_area }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 标准层面积 </u-col>
+        <u-col span="7"> {{ getDetailData.standard_area }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 地上层数 </u-col>
+        <u-col span="7"> {{ getDetailData.aboveground_layer }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 地上层面积 </u-col>
+        <u-col span="7"> {{ getDetailData.aboveground_area }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 地下层数 </u-col>
+        <u-col span="7"> {{ getDetailData.underground_floor }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 地下层面积 </u-col>
+        <u-col span="7"> {{ getDetailData.underground_area }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 消防控制室位置 </u-col>
+        <u-col span="7"> {{ getDetailData.control_room }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 避难层数量 </u-col>
+        <u-col span="7"> {{ getDetailData.refuge_layer }} </u-col>
+      </u-row>
+      <u-row>
+        <u-col span="5"> 消防电梯数量 </u-col>
+        <u-col span="7"> {{ getDetailData.fire_elevator }} </u-col>
+      </u-row>
+    </view>
+
+    <uni-section class="mb-10" title="消防设施平面布置图" type="line" titleFontSize="16px" titleColor="#4074E7"></uni-section>
+    <view class="processStatus">
+      <view class="padding-lr imgPic">
+        <image v-if="!getDetailData.build_plan && dataRes == 1" mode="widthFix" src="@/static/images/defaultImg.jpg" />
+        <image v-else mode="widthFix" :src="getDetailData.layout_plan" />
+      </view>
+    </view>
+
+    <uni-section class="mb-10" title="建筑平面图" type="line" titleFontSize="16px" titleColor="#4074E7"></uni-section>
+
+    <view class="processStatus">
+      <view class="padding-lr padding-bottom-lg imgPic">
+        <image v-if="!getDetailData.build_plan && dataRes == 1" mode="widthFix" src="@/static/images/defaultImg.jpg" />
+        <image v-else :src="getDetailData.build_plan" mode="widthFix" />
+      </view>
+    </view>
+  </view>
+</template>
+
+<script setup>
+import { onLoad, onShow, onReady, onHide, onLaunch } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, toRefs, getCurrentInstance } from "vue";
+
+import { getBuildingManagement } from "@/api/setting/building.js";
+
+import useStores from "@/store/modules/user.js";
+const useStore = useStores();
+
+const { proxy } = getCurrentInstance();
+
+const getDetailData = ref({});
+const dataRes = ref(0);
+
+// 建筑基础数据请求
+function getDetails(params = {}) {
+  getBuildingManagement(params).then((res) => {
+    getDetailData.value = res.data[0];
+    console.log(getDetailData.value);
+    dataRes.value = 1;
+  });
+}
+
+onLoad((option) => {
+  // getDetails({ company_code: uni.getStorageSync("selectedCode") });
+});
+
+onReady(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+</script>
+
+<style lang="scss" scoped>
+:deep(.image-bg > div) {
+  background-size: cover !important;
+}
+
+.setting-building {
+  background: #fff;
+  .basic-info {
+    .u-row {
+      border: 1px #e5e5e5 solid;
+      border-bottom: 0px;
+
+      > .u-col {
+        height: 33px;
+        line-height: 33px;
+        font-size: 13px;
+        border-right: 1px #e5e5e5 solid;
+      }
+
+      > .u-col:last-child {
+        border-right: 0px #e5e5e5 solid;
+      }
+    }
+
+    .u-row:last-child {
+      .u-col {
+        border-bottom: 1px #e5e5e5 solid;
+      }
+    }
+
+    .processStatus {
+    }
+  }
+}
+</style>

+ 355 - 0
src/pages/business/zhxf/funReport/funcAdd/index.vue

@@ -0,0 +1,355 @@
+<template>
+  <view class="setting-funReport-funcAdd">
+    <uni-forms ref="baseForm" :label-width="90" label-align="right" :modelValue="baseFormData">
+      <uni-forms-item label="报备类型" required>
+        <uni-data-select v-model="report_type" :localdata="report_type_select"></uni-data-select>
+      </uni-forms-item>
+
+      <view v-if="report_type == 2 || report_type == 3">
+        <uni-forms-item label="设备类型" required>
+          <uni-data-select v-model="device_type" :localdata="device_type_select"></uni-data-select>
+        </uni-forms-item>
+      </view>
+
+      <view v-if="report_type">
+        <uni-forms-item label="开始时间" required>
+          <uni-datetime-picker v-model="start_time" :start="id ? '' : now" />
+        </uni-forms-item>
+
+        <uni-forms-item label="结束时间" required>
+          <uni-datetime-picker v-model="end_time" :start="start_time" />
+        </uni-forms-item>
+      </view>
+
+      <view v-if="report_type == 3 && device_type == 6">
+        <uni-forms-item label="端口号" required>
+          <uni-easyinput v-model="device_port" />
+        </uni-forms-item>
+        <uni-forms-item label="端口类型">
+          <uni-data-select v-model="port_type" :localdata="port_type_select"></uni-data-select>
+        </uni-forms-item>
+      </view>
+
+      <view v-if="report_type == 3 && device_type">
+        <uni-forms-item label="报备设备">
+          <uni-data-select v-model="device_code" :localdata="deviceListData"></uni-data-select>
+        </uni-forms-item>
+      </view>
+
+      <uni-forms-item label="备注" v-if="report_type">
+        <uni-easyinput v-model="remarks" />
+      </uni-forms-item>
+    </uni-forms>
+
+    <view class="buttom">
+      <button class="bg-blue round margin-top" @tap="submit()">提 交</button>
+    </view>
+  </view>
+</template>
+<script setup>
+import { onLoad, onShow, onReady, onHide, onLaunch, onReachBottom, onNavigationBarButtonTap } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, toRefs, watchEffect, getCurrentInstance, watch } from "vue";
+
+import { del, index } from "@/api/setting/funReport.js";
+
+import useStores from "@/store/modules/user.js";
+const useStore = useStores();
+
+const { proxy } = getCurrentInstance();
+
+const array = reactive({
+  id: "",
+
+  report_type: "",
+  report_type_select: [
+    { value: "1", text: "单位" },
+    { value: "2", text: "类型" },
+    { value: "3", text: "设备" },
+  ],
+
+  device_type: "",
+  device_type_select: [
+    { value: "1", text: "火系统" },
+    { value: "2", text: "水系统" },
+    { value: "3", text: "烟感系统" },
+    { value: "4", text: "消防栓" },
+    { value: "5", text: "液位" },
+    { value: "6", text: "RTU" },
+    { value: "7", text: "电气火灾" },
+    { value: "16", text: "视频监控" },
+    { value: "128", text: "井盖" },
+    { value: "131", text: "可燃气体" },
+    { value: "130", text: "门禁监测" },
+    { value: "129", text: "地磁监测" },
+    { value: "17", text: "电梯监测" },
+  ],
+
+  start_time: "",
+  end_time: "",
+  remarks: "",
+  device_port: "",
+
+  port_type: "",
+  port_type_select: [
+    { value: "1", text: "数字量" },
+    { value: "2", text: "模拟量" },
+  ],
+
+  device_code: "",
+  now: "",
+
+  deviceListData: [],
+  detailsData: "",
+
+  // 基础表单数据
+  baseFormData: {},
+});
+
+const { id, report_type, report_type_select, device_type, device_type_select, start_time, end_time, remarks, device_port, port_type, device_code, now, deviceListData, detailsData, baseFormData } =
+  toRefs(array);
+
+// 回显信息请求
+function getDetailsData(params = {}) {
+  const res = $myRequest({
+    url: "AlarmReport/editData",
+    data: params,
+    showLoading: true,
+  });
+
+  detailsData.value = res.data.data[0];
+  console.log(detailsData.value);
+  report_type.value = detailsData.value.report_type;
+  device_type.value = detailsData.value.device_type;
+  start_time.value = detailsData.value.start_time;
+  end_time.value = detailsData.value.end_time;
+  remarks.value = detailsData.value.remarks;
+  port_type.value = detailsData.value.port_type;
+  device_port.value = detailsData.value.device_port;
+  device_code.value = detailsData.value.device_code;
+}
+
+function submit() {
+  //提交验证
+
+  if (!report_type.value) {
+    uni.showToast({
+      title: "请输入报备类型",
+      icon: "none",
+    });
+    return;
+  }
+  if (report_type.value == 1) {
+    if (!start_time.value.replace(/^\s*/g, "")) {
+      uni.showToast({
+        title: "请选择开始时间",
+        icon: "none",
+      });
+      return;
+    }
+    if (!end_time.value.replace(/^\s*/g, "")) {
+      uni.showToast({
+        title: "请选择结束时间",
+        icon: "none",
+      });
+      return;
+    }
+  }
+  if (report_type.value == 2 || report_type.value == 3) {
+    if (!device_type.value) {
+      uni.showToast({
+        title: "请选择设备类型",
+        icon: "none",
+      });
+      return;
+    }
+    if (!start_time.value.replace(/^\s*/g, "")) {
+      uni.showToast({
+        title: "请输入开始时间",
+        icon: "none",
+      });
+      return;
+    }
+    if (!end_time.value.replace(/^\s*/g, "")) {
+      uni.showToast({
+        title: "请输入结束时间",
+        icon: "none",
+      });
+      return;
+    }
+  }
+
+  if (report_type.value == 3 && device_type.value) {
+    if (device_type.value == 6) {
+      if (!device_port.value.replace(/^\s*/g, "")) {
+        uni.showToast({
+          title: "请输入端口号",
+          icon: "none",
+        });
+        return;
+      }
+      if (!port_type.value) {
+        uni.showToast({
+          title: "请选择端口类型",
+          icon: "none",
+        });
+        return;
+      }
+      if (!device_code.value) {
+        uni.showToast({
+          title: "请选择报备设备",
+          icon: "none",
+        });
+        return;
+      }
+    }
+    if (!device_code.value) {
+      uni.showToast({
+        title: "请选择报备设备",
+        icon: "none",
+      });
+      return;
+    }
+  }
+
+  let queryParam = {};
+  if (id.value) {
+    queryParam.id = id.value;
+  }
+  queryParam.report_type = report_type.value;
+  queryParam.company_code = uni.getStorageSync("selectedCode");
+  queryParam.remarks = remarks.value;
+  queryParam.start_time = start_time.value;
+  queryParam.end_time = end_time.value;
+
+  if (id.value) {
+    queryParam.id = id.value;
+  }
+
+  if (report_type.value == 1) {
+    addDevice(queryParam);
+    return;
+  }
+  if (report_type.value == 2) {
+    queryParam.device_type = device_type.value;
+    addDevice(queryParam);
+    return;
+  }
+  if (report_type.value == 3) {
+    queryParam.device_type = device_type.value;
+    if (device_type.value == 6) {
+      queryParam.port_type = port_type.value;
+      queryParam.device_port = device_port.value;
+    }
+    queryParam.device_code = device_code.value;
+    addDevice(queryParam);
+    return;
+  }
+
+  addDevice(queryParam);
+}
+
+function addDevice(params = {}) {
+  const res = $myRequest({
+    url: id.value ? "AlarmReport/edit" : "AlarmReport/add",
+    data: params,
+  });
+
+  if (!res.data.flag) {
+    uni.showToast({
+      title: "提交失败",
+      icon: "none",
+    });
+  } else {
+    uni.showToast({
+      title: "提交成功",
+    });
+  }
+  setTimeout(() => {
+    uni.redirectTo({
+      url: "/pages/business/zhxf/funReport/index",
+    });
+  }, 1000);
+}
+
+function radioChange(e) {
+  console.log("type:" + e.detail.value);
+  radioOne.value = e.detail.value;
+}
+
+//报备设备下拉请求数据
+function deviceList(params = {}) {
+  const res = $myRequest({
+    url: "AlarmReport/deviceList",
+    data: params,
+  });
+  deviceListData.value = res.data.data;
+
+  var arr = [];
+  deviceListData.value.forEach(function (item) {
+    arr.push(item.owner_code);
+  });
+  if (arr.indexOf(device_code.value) == -1) {
+    device_code.value = "";
+  }
+}
+
+onLoad((option) => {
+  id.value = option.id;
+  uni.setNavigationBarTitle({
+    title: option.id ? "编辑" : "新增",
+  });
+
+  var nowTemp = new Date();
+  now.value = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);
+
+  if (option.id) {
+    getDetailsData({ id: option.id });
+  }
+});
+
+onReady(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+watch(
+  () => start_time.value,
+  (val) => {
+    // alert(start_time.value)
+  }
+);
+
+watch(
+  () => report_type.value,
+  (newVal) => {
+    if (newVal) {
+      var array123 = ["", "1", "2", "3", "4", "5", "6", "7", "16", "128", "131", "130", "129", "17"];
+      if (array123.indexOf(device_type.value) == -1) {
+        device_type.value = "";
+      }
+    }
+  }
+);
+
+watch(
+  () => device_type.value,
+  (newVal) => {
+    if (newVal) {
+      deviceList({
+        company_code: uni.getStorageSync("selectedCode"),
+        device_type: device_type.value,
+      });
+    }
+  }
+);
+</script>
+
+<style lang="scss" scoped>
+.setting-funReport-funcAdd {
+  position: relative;
+  height: 100%;
+  padding: 10px;
+  overflow: scroll;
+  background: #fff;
+}
+</style>

+ 47 - 58
src/pages/mine/setting/funReport/funReport.vue → src/pages/business/zhxf/funReport/index.vue

@@ -1,23 +1,19 @@
 <template>
-  <view class="">
+  <view class="setting-funReport">
     <!-- 筛选框start -->
-    <view style="height: 98rpx"></view>
     <view class="ding">
-      <!-- <calendar></calendar> -->
-      <view class="example-body">
-        <uni-datetime-picker
-          v-model="datetimerange"
-          type="daterange"
-          start-placeholder="请选择开始时间"
-          end-placeholder="请选择结束时间"
-          start="2000-3-20 12:00:00"
-          end="2025-10-20 20:00:00"
-          rangeSeparator="至"
-        />
-      </view>
+      <uni-datetime-picker
+        v-model="datetimerange"
+        type="daterange"
+        start-placeholder="请选择开始时间"
+        end-placeholder="请选择结束时间"
+        start="2000-3-20 12:00:00"
+        end="2025-10-20 20:00:00"
+        rangeSeparator="至"
+      />
     </view>
     <!-- 筛选框end -->
-    <view class="site-items" style="margin-top: 0; height: calc(100vh - 286rpx)">
+    <view class="site-items" style="margin-top: 0; height: calc(100vh - 80.33px)">
       <view class="cu-list menu-avatar">
         <view
           class="cu-item"
@@ -29,8 +25,8 @@
           @touchend="ListTouchEnd"
           :data-target="'move-box-' + index"
         >
-          <view class="cu-avatar round lg">
-            <image class="image-bg" src="@/static/images/setting/funcList.png" />
+          <view class="cu-avatar round lg" style="background: transparent">
+            <image class="image-bg" style="width: 46px; height: 46px" src="@/static/images/setting/funcList.png" />
           </view>
           <view class="content">
             <view class="pro-title">
@@ -54,19 +50,15 @@
           </view>
         </view>
       </view>
-      <view v-if="!funcReport.length && authListRes == 1" class="text-center margin-top"> 暂无数据</view>
-      <view v-show="isLoadMore && pages > 1" style="padding-bottom: 60px">
+      <u-empty v-if="funcReport.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
+      <view v-show="isLoadMore && pages > 1">
         <uni-load-more :status="loadStatus"></uni-load-more>
       </view>
-
-      <view style="padding-bottom: 60px"></view>
     </view>
 
     <!-- 新增按钮start -->
-    <view style="width: 100%; position: fixed; bottom: 0px; right: 0px; height: 64px; background: #fff">
-      <view class="plus">
-        <image src="@/static/images/setting/plus.png" style="width: 100rpx; height: 100rpx" @tap="goAddPage()"></image>
-      </view>
+    <view style="position: fixed; right: 0; bottom: 50px">
+      <u-image width="67" height="67" src="@/static/images/xunjian/plan-scan.png" shape="circle" @tap="goAddPage()"></u-image>
     </view>
 
     <!-- 新增按钮end -->
@@ -75,17 +67,18 @@
 
 <script setup>
 import json from "@/static/js/json.js";
-import { onLoad, onShow, onHide, onLaunch, onReachBottom, onNavigationBarButtonTap } from "@dcloudio/uni-app";
-import { ref, onMounted, inject, shallowRef, reactive, toRefs, watchEffect } from "vue";
-
-import useStore from "@/store/modules/user";
-import xunJianStore from "@/store/modules/xunJian";
+import { onLoad, onShow, onReady, onHide, onLaunch, onReachBottom, onNavigationBarButtonTap } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, toRefs, watchEffect, getCurrentInstance } from "vue";
 
 import { del, index } from "@/api/setting/funReport.js";
 
+import useStores from "@/store/modules/user.js";
+const useStore = useStores();
+
+const { proxy } = getCurrentInstance();
+
 const funcReport = ref([]);
 const modalName = ref(null);
-const getData = ref([]);
 const dwtype = ref(0);
 const datetimerange = ref(["", ""]);
 
@@ -94,8 +87,6 @@ const listTouchDirection = ref(null);
 
 const flag = ref(false);
 
-const authListRes = ref(0);
-
 const pages = ref(1);
 const size = ref(12);
 const loadStatus = ref("loading"); //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
@@ -103,13 +94,13 @@ const isLoadMore = ref(false); //是否加载中
 const deleteStatus = ref(false);
 
 function loadData() {
-  getDeviceList({
-    company_code: uni.getStorageSync("selectedCode"),
-    start_time: datetimerange.value[0],
-    end_time: datetimerange.value[1],
-    pages: pages.value,
-    size: size.value,
-  });
+  // getDeviceList({
+  //   company_code: uni.getStorageSync("selectedCode"),
+  //   start_time: datetimerange.value[0],
+  //   end_time: datetimerange.value[1],
+  //   pages: pages.value,
+  //   size: size.value,
+  // });
 }
 
 // 设备类型数据请求
@@ -119,7 +110,6 @@ function getDeviceList(params = {}) {
       funcReport.value = [];
       deleteStatus.value = false;
     }
-    authListRes.value = 1;
 
     if (res.data.totalcount) {
       funcReport = res.data;
@@ -141,7 +131,17 @@ function getDeviceList(params = {}) {
 //编辑
 function editItem(item) {
   uni.redirectTo({
-    url: "/pages/setting/funReport/funcAdd/funcAdd?id=" + item.id + "",
+    url: "/pages/mine/setting/funReport/funcAdd/index?id=" + item.id + "",
+  });
+}
+
+// 新增
+function goAddPage(type) {
+  uni.redirectTo({
+    url: "/pages/mine/setting/funReport/funcAdd/index",
+    success: (res) => {},
+    fail: () => {},
+    complete: () => {},
   });
 }
 
@@ -170,16 +170,6 @@ function deleteItem(item) {
   });
 }
 
-// 新增
-function goAddPage(type) {
-  uni.redirectTo({
-    url: "/pages/setting/funReport/funcAdd/funcAdd",
-    success: (res) => {},
-    fail: () => {},
-    complete: () => {},
-  });
-}
-
 // ListTouch触摸开始
 function ListTouchStartCange(e) {
   listTouchStart.value = e.touches[0].pageX;
@@ -203,7 +193,6 @@ function ListTouchEnd(e) {
 function datetimerangeChage() {
   funcReport.value = [];
   pages.value = 1;
-  authListRes.value = [];
   loadData();
 }
 
@@ -216,6 +205,11 @@ onLoad((option) => {
   loadData();
 });
 
+onReady(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
 onReachBottom(() => {
   //上拉触底函数
   if (!isLoadMore.value) {
@@ -238,9 +232,4 @@ onNavigationBarButtonTap((e) => {
 .cu-item {
   height: 180rpx !important;
 }
-.plus {
-  position: fixed;
-  bottom: 3px;
-  right: 3px;
-}
 </style>

+ 15 - 8
src/pages/mine/setting/messagePush/messagePush.vue → src/pages/business/zhxf/messagePush/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <view class="padding-sm messagePush">
+  <view class="padding-sm setting-messagePush">
     <form action="">
       <checkbox-group class="block" @change="CheckboxChange">
         <view class="margin-top">
@@ -10,7 +10,7 @@
         </view>
       </checkbox-group>
 
-      <view class="btn-area submitBottomBtn padding-lr-sm">
+      <view class="btn-area submitBottomBtn">
         <button class="bg-blue round margin-top" @click="$noMultipleClicks(btnSubmit)">提 交</button>
       </view>
     </form>
@@ -18,14 +18,16 @@
 </template>
 
 <script setup>
-import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
-import { ref, onMounted, inject, shallowRef, reactive, toRefs } from "vue";
-
-import useStore from "@/store/modules/user";
-import xunJianStore from "@/store/modules/xunJian";
+import { onLoad, onShow, onHide, onLaunch, onReady } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, toRefs, getCurrentInstance } from "vue";
 
 import { setperm } from "@/api/setting/index.js";
 
+import useStores from "@/store/modules/user.js";
+const useStore = useStores();
+
+const { proxy } = getCurrentInstance();
+
 const data = reactive({
   noClick: true,
   flag: false,
@@ -183,9 +185,14 @@ async function btnSubmit() {
   });
 }
 
-onload((option) => {
+onLoad((option) => {
   getCheckList();
 });
+
+onReady(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
 </script>
 
 <style lang="scss">

+ 4 - 2
src/pages/mine/about/index.vue

@@ -26,13 +26,13 @@
         <view class="list-cell list-cell-arrow">
           <view class="menu-item-box">
             <view>官方邮箱</view>
-            <view class="text-right"></view>
+            <view class="text-right">{{ email }}</view>
           </view>
         </view>
         <view class="list-cell list-cell-arrow">
           <view class="menu-item-box">
             <view>服务热线</view>
-            <view class="text-right">021-65376655</view>
+            <view class="text-right">{{ hotline }}</view>
           </view>
         </view>
         <view class="list-cell list-cell-arrow">
@@ -63,6 +63,8 @@ const { proxy } = getCurrentInstance();
 
 const url = ref(getApp().globalData.config.appInfo.site_url);
 const version = ref(getApp().globalData.config.appInfo.version);
+const email = ref(getApp().globalData.config.appInfo.email);
+const hotline = ref(getApp().globalData.config.appInfo.hotline);
 
 onShow(() => {
   //调用系统主题颜色

+ 18 - 22
src/pages/mine/index.vue

@@ -83,14 +83,14 @@
             <view class="iconfont icon-aixin menu-icon"></view>
             <view>推送设置</view>
           </view>
-        </view>
-        <view class="list-cell list-cell-arrow" @click="goBuilding()">
+        </view> -->
+        <!-- <view class="list-cell list-cell-arrow" @click="goBuilding()">
           <view class="menu-item-box">
             <view class="iconfont icon-help menu-icon"></view>
             <view>建筑管理</view>
           </view>
-        </view>
-        <view class="list-cell list-cell-arrow" @click="goFunReport()">
+        </view> -->
+        <!-- <view class="list-cell list-cell-arrow" @click="goFunReport()">
           <view class="menu-item-box">
             <view class="iconfont icon-clean menu-icon"></view>
             <view>功能报备</view>
@@ -217,29 +217,25 @@ function getAuthorizationApi(params) {
   });
 }
 
+/**
+ * @推送设置
+ */
 function goMessagePush() {
-  uni.navigateTo({
-    url: "/pages/setting/messagePush/messagePush",
-    success: (res) => {},
-    fail: () => {},
-    complete: () => {},
-  });
+  proxy.$tab.navigateTo("/pages/business/zhxf/messagePush/index");
 }
+
+/**
+ * @建筑管理
+ */
 function goBuilding() {
-  uni.navigateTo({
-    url: "/pages/setting/building/building",
-    success: (res) => {},
-    fail: () => {},
-    complete: () => {},
-  });
+  proxy.$tab.navigateTo("/pages/business/zhxf/building/index");
 }
+
+/**
+ * @功能报备
+ */
 function goFunReport() {
-  uni.navigateTo({
-    url: "/pages/setting/funReport/funReport",
-    success: (res) => {},
-    fail: () => {},
-    complete: () => {},
-  });
+  proxy.$tab.navigateTo("/pages/business/zhxf/funReport/index");
 }
 
 /**

+ 0 - 138
src/pages/mine/setting/building/building.vue

@@ -1,138 +0,0 @@
-<template>
-  <view>
-    <view class="basic-info">
-      <view class="info-tit margin-left-xs">
-        <text class="cuIcon-titles margin-right-xs"></text>
-        基本信息
-      </view>
-      <view class="info-content padding-lr">
-        <table style="border: 1px solid #ccc" cellspacing="0" cellpadding="0" align="center">
-          <tr>
-            <td>建筑物名称</td>
-            <td>{{ contentgetDetailData.build_name }}</td>
-          </tr>
-          <tr>
-            <td>建筑物类别</td>
-            <td>{{ contentgetDetailData.build_type }}</td>
-          </tr>
-          <tr>
-            <td>建造日期</td>
-            <td>{{ contentgetDetailData.build_time }}</td>
-          </tr>
-          <tr>
-            <td>使用性质</td>
-            <td>{{ contentgetDetailData.nature_use }}</td>
-          </tr>
-          <tr>
-            <td>火灾危险级</td>
-            <td>{{ contentgetDetailData.fire_risk_level }}</td>
-          </tr>
-          <tr>
-            <td>耐火等级</td>
-            <td>{{ contentgetDetailData.fire_resistance_rating }}</td>
-          </tr>
-          <tr>
-            <td>结构类型</td>
-            <td>{{ contentgetDetailData.structure_type }}</td>
-          </tr>
-          <tr>
-            <td>建筑高度</td>
-            <td>{{ contentgetDetailData.build_height }}</td>
-          </tr>
-          <tr>
-            <td>建筑面积</td>
-            <td>{{ contentgetDetailData.build_area }}</td>
-          </tr>
-          <tr>
-            <td>占地面积</td>
-            <td>{{ contentgetDetailData.land_occupation_area }}</td>
-          </tr>
-
-          <tr>
-            <td>标准层面积</td>
-            <td>{{ contentgetDetailData.standard_area }}</td>
-          </tr>
-          <tr>
-            <td>地上层数</td>
-            <td>{{ contentgetDetailData.aboveground_layer }}</td>
-          </tr>
-          <tr>
-            <td>地上层面积</td>
-            <td>{{ contentgetDetailData.aboveground_area }}</td>
-          </tr>
-
-          <tr>
-            <td>地下层数</td>
-            <td>{{ contentgetDetailData.underground_floor }}</td>
-          </tr>
-          <tr>
-            <td>地下层面积</td>
-            <td>{{ contentgetDetailData.underground_area }}</td>
-          </tr>
-          <tr>
-            <td>消防控制室位置</td>
-            <td>{{ contentgetDetailData.control_room }}</td>
-          </tr>
-          <tr>
-            <td>避难层数量</td>
-            <td>{{ contentgetDetailData.refuge_layer }}</td>
-          </tr>
-          <tr>
-            <td>消防电梯数量</td>
-            <td>{{ contentgetDetailData.fire_elevator }}</td>
-          </tr>
-        </table>
-      </view>
-    </view>
-
-    <view class="processStatus">
-      <view class="info-tit margin-left-xs">
-        <text class="cuIcon-titles margin-right-xs"></text>
-        消防设施平面布置图
-      </view>
-      <view class="padding-lr imgPic">
-        <image v-if="!contentgetDetailData.build_plan && contentdataRes == 1" mode="widthFix" src="@/static/images/defaultImg.jpg" />
-        <image v-else mode="widthFix" :src="contentgetDetailData.layout_plan" />
-      </view>
-    </view>
-
-    <view class="processStatus">
-      <view class="info-tit margin-left-xs">
-        <text class="cuIcon-titles margin-right-xs"></text>
-        建筑平面图
-      </view>
-      <view class="padding-lr padding-bottom-lg imgPic">
-        <image v-if="!contentgetDetailData.build_plan && contentdataRes == 1" mode="widthFix" src="@/static/images/defaultImg.jpg" />
-        <image v-else :src="contentgetDetailData.build_plan" mode="widthFix" />
-      </view>
-    </view>
-  </view>
-</template>
-
-<script setup>
-import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
-import { ref, onMounted, inject, shallowRef, reactive, toRefs } from "vue";
-
-import { getBuildingManagement } from "@/api/setting/building.js";
-
-const getDetailData = ref({});
-const dataRes = ref(0);
-
-// 建筑基础数据请求
-function getDetails(params = {}) {
-  getBuildingManagement(params).then((res) => {
-    getDetailData.value = res.data[0];
-    console.log(getDetailData.value);
-    dataRes.value = 1;
-  });
-}
-onload((option) => {
-  getDetails({ company_code: uni.getStorageSync("selectedCode") });
-});
-</script>
-
-<style lang="scss" scoped>
-:deep(.image-bg > div) {
-  background-size: cover !important;
-}
-</style>