Przeglądaj źródła

设施采集-设施查看合并

fanghuisheng 1 rok temu
rodzic
commit
6f233eea80

+ 0 - 0
src/api/business/fireIot/facilitiesView/index.js → src/api/business/fireIot/facilitiesManage.js


+ 2 - 2
src/components/oa-dropdown/index.vue

@@ -41,11 +41,11 @@ function close() {
   overflow: hidden;
   z-index: 90;
   transition: max-height 0.4s ease-in-out;
+  box-shadow: 0px 1px 2px 0px rgba(141, 141, 141, 0.4);
 }
 
 .dropdown.show {
   max-height: 100%;
-  box-shadow: 0px 1px 4px 0px rgba(141, 141, 141, 0.4);
 }
 
 .dropdown.mask {
@@ -55,7 +55,7 @@ function close() {
   right: 0;
   bottom: 0;
   background-color: transparent;
-  max-height: 100%;
+  height: 100%;
   z-index: 50;
 }
 

+ 5 - 12
src/pages.json

@@ -487,13 +487,6 @@
             "enablePullDownRefresh": false
           }
         },
-        {
-          "path": "facilitiesManage/index",
-          "style": {
-            "navigationBarTitleText": "设施管理",
-            "enablePullDownRefresh": false
-          }
-        },
         {
           "path": "facilitiesGather/index",
           "style": {
@@ -509,28 +502,28 @@
           }
         },
         {
-          "path": "facilitiesView/index",
+          "path": "facilitiesManage/index",
           "style": {
-            "navigationBarTitleText": "设施查看",
+            "navigationBarTitleText": "设施管理",
             "enablePullDownRefresh": false
           }
         },
         {
-          "path": "facilitiesView/mapFacilitiesView",
+          "path": "facilitiesManage/mapFacilitiesView",
           "style": {
             "navigationBarTitleText": "设施查看",
             "enablePullDownRefresh": false
           }
         },
         {
-          "path": "facilitiesView/facilitiesDetailsList",
+          "path": "facilitiesManage/facilitiesDetailsList",
           "style": {
             "navigationBarTitleText": "",
             "enablePullDownRefresh": false
           }
         },
         {
-          "path": "facilitiesView/facilitiesDetails",
+          "path": "facilitiesManage/facilitiesDetails",
           "style": {
             "navigationBarTitleText": "设施详情",
             "enablePullDownRefresh": false

+ 1 - 1
src/pages/business/fireIot/facilitiesView/facilitiesDetails.vue → src/pages/business/fireIot/facilitiesManage/facilitiesDetails.vue

@@ -120,7 +120,7 @@ import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, on
 import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
 import { publicStores, useStores } from "@/store/modules/index";
 
-import { facilityInfo, deviceInfo, buildInfo } from "@/api/business/fireIot/facilitiesView/index";
+import { facilityInfo, deviceInfo, buildInfo } from "@/api/business/fireIot/facilitiesManage.js";
 
 const { proxy } = getCurrentInstance();
 

+ 15 - 16
src/pages/business/fireIot/facilitiesView/facilitiesDetailsList.vue → src/pages/business/fireIot/facilitiesManage/facilitiesDetailsList.vue

@@ -1,18 +1,4 @@
 <template>
-  <u-sticky class="example-body" style="top: 0px">
-    <view class="padding-sm padding-tb-10" :class="'bg-' + proxy.$settingStore.themeColor.name">
-      <u--input
-        v-model="facilityName"
-        placeholder="搜索"
-        prefixIcon="search"
-        prefixIconStyle="font-size: 22px;color: #909399"
-        customStyle="height:35px;background-color:#f5f6fa;"
-        @confirm="init()"
-        clearable
-      ></u--input>
-    </view>
-  </u-sticky>
-
   <oa-scroll
     customClass="scroll-height"
     :pageSize="pageSize"
@@ -28,6 +14,19 @@
   >
     <template #default>
       <view class="facilitiesDetailsList-container">
+        <view class="flex bg-white padding-10" style="position: relative">
+          <u--input
+            v-model="facilityName"
+            placeholder="请输入设施名称"
+            prefixIcon="search"
+            prefixIconStyle="font-size: 22px;color: #909399"
+            customStyle="height:30px;background-color:#f5f6fa;"
+            @confirm="init()"
+            clearable
+          ></u--input>
+          <view class="margin-l-10" style="margin-top: auto; margin-bottom: auto" @click="init()">筛选</view>
+        </view>
+
         <view class="menu-list margin-0">
           <view class="list-cell list-cell-arrow" v-for="(base, index) in dataList" :key="index" @click="handleToDevice(base.id)">
             <view class="menu-item-box">
@@ -45,7 +44,7 @@ import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, on
 import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
 import { publicStores, useStores } from "@/store/modules/index";
 
-import { baseGgpFacility } from "@/api/business/fireIot/facilitiesView/index";
+import { baseGgpFacility } from "@/api/business/fireIot/facilitiesManage.js";
 
 const { proxy } = getCurrentInstance();
 
@@ -87,7 +86,7 @@ function selectListApi() {
  * @设备详情跳转点击事件
  */
 function handleToDevice(id) {
-  proxy.$tab.navigateTo(`/pages/business/fireIot/facilitiesView/facilitiesDetails?id=${id}&typeName=${facilityTypeName.value}`);
+  proxy.$tab.navigateTo(`/pages/business/fireIot/facilitiesManage/facilitiesDetails?id=${id}&typeName=${facilityTypeName.value}`);
 }
 
 /**

+ 96 - 48
src/pages/business/fireIot/facilitiesManage/index.vue

@@ -1,21 +1,51 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view class="padding-sm">
-      <!-- 宫格列表 -->
-      <view class="section2 section bg-white">
-        <view class="cu-list grid col-4 no-border" style="padding-top: 0.3125rem">
-          <view class="cu-item justify-center align-center" v-for="(item, index) in inspectList" :key="index" @tap="navItemClick(item.redirectUrl, item.id)">
-            <image :src="item.imgUrl" style="width: 40px; height: 40px"></image>
-            <view class="cu-tag badge" v-if="item.badge != 0">
-              <block v-if="item.badge != 0">{{ item.badge > 99 ? "99+" : item.badge }}</block>
+  <oa-scroll
+    customClass="scroll-height"
+    :refresherLoad="false"
+    :refresherLoadTitle="false"
+    :refresherEnabled="true"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    @refresh="refresh"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <view class="flex padding-tb-sm bg-white">
+        <view class="padding-lr-sm text-center" style="width: 50%">设施类型:{{ typeNum || 0 }}</view>
+        <view class="divider-default"></view>
+        <view class="padding-lr-sm text-center" style="width: 50%">设施总数:{{ facilityNum || 0 }}</view>
+      </view>
+
+      <view class="flex bg-white margin-lr-sm margin-top-sm padding-sm shadow-default radius" v-for="(data, index) in dataList" :key="index">
+        <view class="margin-right-sm" style="margin-top: auto; margin-bottom: auto" @click="handleToDevice(data.id, data.typeName)">
+          <image style="width: 40px" :src="data.typeImg ? data.typeImg : '/static/images/404.png'" mode="widthFix"></image>
+        </view>
+
+        <view style="width: 100%" @click="handleToDevice(data.id, data.typeName)">
+          <view class="flex margin-bottom-xl">
+            <view class="text-dfl text-bold">{{ data.typeName }}</view>
+            <view style="font-size: 14px; margin-top: auto; margin-right: auto">({{ data.typeFacilityNum || 0 }})</view>
+          </view>
+          <view>
+            <view class="flex">
+              <view style="font-size: 14px; width: 33.33%">正常:{{ data.normalFacilityNum || 0 }}</view>
+              <view style="font-size: 14px; width: 33.33%">维修:{{ data.upkeepFacilityNum || 0 }}</view>
+              <view style="font-size: 14px; width: 33.33%">关闭:{{ data.closeFacilityNum || 0 }}</view>
             </view>
-            <text style="font-size: 14px">{{ item.title }}</text>
           </view>
         </view>
+
+        <view style="margin-top: auto; margin-bottom: auto" @click="handleToMap(data.typeCode)">
+          <view class="iconfont ucicon-app-map icon" :style="{ color: proxy.$settingStore.themeColor.color, fontSize: '22px' }"></view>
+        </view>
       </view>
-      <!-- 宫格列表 end -->
-    </view>
-  </scroll-view>
+    </template>
+  </oa-scroll>
+
+  <view style="position: fixed; right: 0; bottom: 50px">
+    <u-image width="67" height="67" src="@/static/images/add.png" shape="circle" @tap="handleToPage()"></u-image>
+  </view>
 </template>
 
 <script setup>
@@ -23,48 +53,66 @@ import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
 import { ref, reactive, computed, onMounted, getCurrentInstance, toRefs, inject } from "vue";
 import { xunJianStores, publicStores } from "@/store/modules/index";
 
+import { baseFacilityType } from "@/api/business/fireIot/facilitiesManage.js";
+
 const publicStore = publicStores(); //全局公共Store
 const xunJianStore = xunJianStores(); //全局变量值Store
 
 const { proxy } = getCurrentInstance();
 
-const inspectList = [
-  {
-    id: 1,
-    title: "设施采集",
-    badge: "0",
-    imgUrl: "/static/images/xunjian/xunJian-icon1.png",
-    redirectUrl: "/pages/business/fireIot/facilitiesGather/index",
-  },
-  {
-    id: 2,
-    title: "设施查看",
-    badge: "0",
-    imgUrl: "/static/images/xunjian/xunJian-icon2.png",
-    redirectUrl: "/pages/business/fireIot/facilitiesView/index",
-  },
-]; //九宫格json数据
-
-function navItemClick(url, id) {
-  if (url) {
-    uni.navigateTo({
-      url: url,
-    });
-  } else {
-    uni.showModal({
-      title: "Tips",
-      content: "此模块开发中~",
-      showCancel: false,
-      success: function (res) {
-        if (res.confirm) {
-        } else if (res.cancel) {
-        }
-      },
-    });
-  }
+const typeNum = ref(0);
+const facilityNum = ref(0);
+const dataList = ref([]);
+
+/**
+ * @页面初始化
+ */
+function init() {
+  baseFacilityType({
+    pageNum: 1,
+    pageSize: 20000,
+  }).then((requset) => {
+    if (requset.status === "SUCCESS") {
+      if (requset.data.length > 0) {
+        dataList.value = requset.data[0].baseGgpFacilityTypeNumVO;
+        typeNum.value = requset.data[0].typeNum;
+        facilityNum.value = requset.data[0].facilityNum;
+      }
+    }
+  });
 }
 
-onLoad(() => {});
+/**
+ * @scrollView刷新数据
+ */
+function refresh() {
+  init();
+}
+
+/**
+ * @设施详情列表跳转点击事件
+ */
+function handleToDevice(id, typeName) {
+  proxy.$tab.navigateTo(`/pages/business/fireIot/facilitiesManage/facilitiesDetailsList?id=${id}&typeName=${typeName}`);
+}
+
+/**
+ * @设施地图查看
+ */
+function handleToMap(typeCode) {
+  proxy.$tab.navigateTo(`/pages/business/fireIot/facilitiesManage/mapFacilitiesView?typeCode=${typeCode}`);
+}
+
+/**
+ * @设施地图采集
+ */
+function handleToPage() {
+  proxy.$tab.navigateTo(`/pages/business/fireIot/facilitiesGather/index`);
+}
+
+onLoad(() => {
+  init();
+});
 
 onShow(() => {
   //调用系统主题颜色

+ 1 - 1
src/pages/business/fireIot/facilitiesView/mapFacilitiesView.vue → src/pages/business/fireIot/facilitiesManage/mapFacilitiesView.vue

@@ -16,7 +16,7 @@ import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni
 import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs, nextTick } from "vue";
 import { publicStores, useStores } from "@/store/modules/index";
 
-import { baseFacilityType, baseGgpFacilityList } from "@/api/business/fireIot/facilitiesView/index";
+import { baseFacilityType, baseGgpFacilityList } from "@/api/business/fireIot/facilitiesManage.js";
 
 const publicStore = publicStores(); //全局公共Store
 

+ 0 - 112
src/pages/business/fireIot/facilitiesView/index.vue

@@ -1,112 +0,0 @@
-<template>
-  <oa-scroll
-    customClass="scroll-height"
-    :refresherLoad="false"
-    :refresherLoadTitle="false"
-    :refresherEnabled="true"
-    :refresherDefaultStyle="'none'"
-    :refresherThreshold="44"
-    :refresherBackground="'#f5f6f7'"
-    @refresh="refresh"
-    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
-  >
-    <template #default>
-      <view class="flex padding-tb-sm bg-white">
-        <view class="padding-lr-sm text-center" style="width: 50%">设施类型:{{ typeNum || 0 }}</view>
-        <view class="divider-default"></view>
-        <view class="padding-lr-sm text-center" style="width: 50%">设施总数:{{ facilityNum || 0 }}</view>
-      </view>
-
-      <view class="flex bg-white margin-lr-sm margin-top-sm padding-sm shadow-default radius" v-for="(data, index) in dataList" :key="index">
-        <view class="margin-right-sm" style="margin-top: auto; margin-bottom: auto" @click="handleToDevice(data.id, data.typeName)">
-          <image style="width: 40px" :src="data.typeImg ? data.typeImg : '/static/images/404.png'" mode="widthFix"></image>
-        </view>
-
-        <view style="width: 100%" @click="handleToDevice(data.id, data.typeName)">
-          <view class="flex margin-bottom-xl">
-            <view class="text-dfl text-bold">{{ data.typeName }}</view>
-            <view style="font-size: 14px; margin-top: auto; margin-right: auto">({{ data.typeFacilityNum || 0 }})</view>
-          </view>
-          <view>
-            <view class="flex">
-              <view style="font-size: 14px; width: 33.33%">正常:{{ data.normalFacilityNum || 0 }}</view>
-              <view style="font-size: 14px; width: 33.33%">维修:{{ data.upkeepFacilityNum || 0 }}</view>
-              <view style="font-size: 14px; width: 33.33%">关闭:{{ data.closeFacilityNum || 0 }}</view>
-            </view>
-          </view>
-        </view>
-
-        <view style="margin-top: auto; margin-bottom: auto" @click="handleToMap(data.typeCode)">
-          <view class="iconfont ucicon-app-map icon" :style="{ color: proxy.$settingStore.themeColor.color, fontSize: '22px' }"></view>
-        </view>
-      </view>
-    </template>
-  </oa-scroll>
-</template>
-
-<script setup>
-import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
-import { ref, reactive, computed, onMounted, getCurrentInstance, toRefs, inject } from "vue";
-import { xunJianStores, publicStores } from "@/store/modules/index";
-
-import { baseFacilityType } from "@/api/business/fireIot/facilitiesView/index";
-
-const publicStore = publicStores(); //全局公共Store
-const xunJianStore = xunJianStores(); //全局变量值Store
-
-const { proxy } = getCurrentInstance();
-
-const typeNum = ref(0);
-const facilityNum = ref(0);
-const dataList = ref([]);
-
-/**
- * @页面初始化
- */
-function init() {
-  baseFacilityType({
-    pageNum: 1,
-    pageSize: 20000,
-  }).then((requset) => {
-    if (requset.status === "SUCCESS") {
-      if (requset.data.length > 0) {
-        dataList.value = requset.data[0].baseGgpFacilityTypeNumVO;
-        typeNum.value = requset.data[0].typeNum;
-        facilityNum.value = requset.data[0].facilityNum;
-      }
-    }
-  });
-}
-
-/**
- * @scrollView刷新数据
- */
-function refresh() {
-  init();
-}
-
-/**
- * @设施详情列表跳转点击事件
- */
-function handleToDevice(id, typeName) {
-  proxy.$tab.navigateTo(`/pages/business/fireIot/facilitiesView/facilitiesDetailsList?id=${id}&typeName=${typeName}`);
-}
-
-/**
- * @设施地图查看
- */
-function handleToMap(typeCode) {
-  proxy.$tab.navigateTo(`/pages/business/fireIot/facilitiesView/mapFacilitiesView?typeCode=${typeCode}`);
-}
-
-onLoad(() => {
-  init();
-});
-
-onShow(() => {
-  //调用系统主题颜色
-  proxy.$settingStore.systemThemeColor([1]);
-});
-</script>
-
-<style lang="scss"></style>

+ 1 - 1
src/pages/business/mhxf/xunJian/collect/index.vue

@@ -36,7 +36,7 @@
     </uni-swipe-action>
 
     <view class="app-scan-fixed">
-      <u-image width="67" height="67" src="@/static/images/xunjian/plan-scan.png" shape="circle" @click="scanClick()"></u-image>
+      <u-image width="67" height="67" src="@/static/images/add.png" shape="circle" @click="scanClick()"></u-image>
     </view>
 
     <!-- 提示信息弹窗 -->

+ 1 - 1
src/pages/business/mhxf/xunJian/plan/components/report.vue

@@ -53,7 +53,7 @@
       </view>
     </view>
     <view class="app-scan-fixed">
-      <u-image width="67" height="67" src="@/static/images/xunjian/plan-scan.png" shape="circle" @click="scanClick()"></u-image>
+      <u-image width="67" height="67" src="@/static/images/add.png" shape="circle" @click="scanClick()"></u-image>
     </view>
   </scroll-view>
 </template>

+ 1 - 1
src/pages/business/mhxf/xunJian/plan/index.vue

@@ -94,7 +94,7 @@
     </view>
 
     <view class="app-scan-fixed">
-      <u-image width="67" height="67" src="@/static/images/xunjian/plan-scan.png" shape="circle" @click="scanClick()"></u-image>
+      <u-image width="67" height="67" src="@/static/images/add.png" shape="circle" @click="scanClick()"></u-image>
     </view>
 
     <drawer v-if="scanArray.length > 0" :scanArray="scanArray" :scanBool="scanBool" @scanClose="scanClose"></drawer>

+ 1 - 2
src/pages/business/zhxf/funReport/index.vue

@@ -58,9 +58,8 @@
 
     <!-- 新增按钮start -->
     <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>
+      <u-image width="67" height="67" src="@/static/images/add.png" shape="circle" @tap="goAddPage()"></u-image>
     </view>
-
     <!-- 新增按钮end -->
   </view>
 </template>

+ 5 - 1
src/pages/index.vue

@@ -340,7 +340,11 @@ function getAppRoutersData() {
     // domain :'172.16.120.165:13203'
   }).then((res) => {
     res.data.forEach((el) => {
-      el.meta.icon = `/static/icons/index/${el.meta.icon}.png`;
+      if (el.meta.icon === "APP-ssck") {
+        el.meta.icon = `/static/icons/index/APP-ssgl.png`;
+      } else {
+        el.meta.icon = `/static/icons/index/${el.meta.icon}.png`;
+      }
     });
 
     cuIconList.value = res.data;

BIN
src/static/icons/index/APP-ssgl.png


+ 0 - 0
src/static/images/xunjian/plan-scan.png → src/static/images/add.png