Bläddra i källkod

Merge branch 'wangtao', remote-tracking branch 'origin' into 165

13127578837 9 månader sedan
förälder
incheckning
3179405e37
100 ändrade filer med 4577 tillägg och 4130 borttagningar
  1. BIN
      nativeplugins/Fvv-AutoStart/android/autostart-release.aar
  2. 20 0
      nativeplugins/Fvv-AutoStart/package.json
  3. 90 81
      src/App.vue
  4. 0 10
      src/api/business/mhxf/xunJian/index.js
  5. 0 0
      src/api/business/zhaf/xunJian/collect.js
  6. 42 0
      src/api/business/zhaf/xunJian/index.js
  7. 1 1
      src/api/business/zhaf/xunJian/plan.js
  8. 0 0
      src/api/business/zhaf/xunJian/record.js
  9. 9 0
      src/api/common/index.js
  10. 1 3
      src/api/login.js
  11. 18 0
      src/api/mine/index.js
  12. 54 0
      src/api/mine/info.js
  13. 52 0
      src/api/system/dict.js
  14. 27 10
      src/components/oa-calendar/uni-calendar.vue
  15. 1 1
      src/components/oa-movable/index.vue
  16. 33 15
      src/components/oa-scroll/index.vue
  17. 10 5
      src/components/oa-transForm/index.vue
  18. 25 16
      src/components/oa-upgrade/index.vue
  19. 15 15
      src/components/oa-upload/index.vue
  20. 111 0
      src/components/oa-weather/index.vue
  21. 1 1
      src/components/zzlb-mutiselect/zzlb-mutiselect.vue
  22. 9 5
      src/config.js
  23. 3 12
      src/main.js
  24. 32 9
      src/manifest.json
  25. 66 49
      src/pages.json
  26. 8 8
      src/pages/business/analyse/index.vue
  27. 27 31
      src/pages/business/common/fastMail/index.vue
  28. 85 0
      src/pages/business/common/videoMonitor/videoDetail.vue
  29. 166 0
      src/pages/business/common/videoMonitor/videoList.vue
  30. 72 80
      src/pages/business/fireIot/alarmManage/alarmDetails/index.vue
  31. 47 50
      src/pages/business/fireIot/alarmManage/alarmDetailsList/index.vue
  32. 1 2
      src/pages/business/fireIot/alarmManage/index.vue
  33. 35 24
      src/pages/business/fireIot/deviceManage/components/deviceDetails.vue
  34. 6 19
      src/pages/business/fireIot/deviceManage/components/deviceDetailsList.vue
  35. 1 2
      src/pages/business/fireIot/deviceManage/index.vue
  36. 24 143
      src/pages/business/fireIot/facilitiesGather/index.vue
  37. 4 4
      src/pages/business/fireIot/facilitiesGather/mapGather.vue
  38. 39 36
      src/pages/business/fireIot/facilitiesManage/facilitiesDetails.vue
  39. 1 2
      src/pages/business/fireIot/facilitiesManage/facilitiesDetailsList.vue
  40. 9 8
      src/pages/business/fireIot/facilitiesManage/index.vue
  41. 2 2
      src/pages/business/fireIot/repairManage/index.vue
  42. 58 69
      src/pages/business/fireIot/repairManage/repairDetails.vue
  43. 33 34
      src/pages/business/fireIot/repairManage/repairDetailsList.vue
  44. 104 110
      src/pages/business/mhxf/deviceManage/index.vue
  45. 67 240
      src/pages/business/mhxf/fireReport/components/detailed.vue
  46. 31 49
      src/pages/business/mhxf/fireReport/index.vue
  47. 139 206
      src/pages/business/mhxf/informationSelect/index.vue
  48. 131 118
      src/pages/business/mhxf/needMatter/index.vue
  49. 77 308
      src/pages/business/mhxf/unitInfoCollection/index.vue
  50. 0 95
      src/pages/business/videoMonitor/index.vue
  51. 0 165
      src/pages/business/videoMonitor/videoDetail.vue
  52. 0 209
      src/pages/business/videoMonitor/videoList.vue
  53. 12 20
      src/pages/business/zhaf/signIn/index.vue
  54. 40 40
      src/pages/business/zhaf/xunJian/collect/components/collectDetail.vue
  55. 129 68
      src/pages/business/zhaf/xunJian/collect/components/collectRecord.vue
  56. 149 114
      src/pages/business/zhaf/xunJian/collect/index.vue
  57. 0 0
      src/pages/business/zhaf/xunJian/components/index.vue
  58. 113 0
      src/pages/business/zhaf/xunJian/error/errorDisposition.vue
  59. 164 0
      src/pages/business/zhaf/xunJian/error/errorList.vue
  60. 191 0
      src/pages/business/zhaf/xunJian/error/errorListDetail.vue
  61. 234 0
      src/pages/business/zhaf/xunJian/error/index.vue
  62. 50 33
      src/pages/business/zhaf/xunJian/plan/components/content.vue
  63. 106 88
      src/pages/business/zhaf/xunJian/plan/components/report.vue
  64. 123 85
      src/pages/business/zhaf/xunJian/plan/components/siteDetails.vue
  65. 110 72
      src/pages/business/zhaf/xunJian/plan/index.vue
  66. 3 10
      src/pages/business/zhaf/xunJian/record/index.vue
  67. 9 9
      src/pages/business/zhaf/xunJian/record/recordDetail/index.vue
  68. 41 45
      src/pages/business/zhaf/xunJian/xunJian.vue
  69. 6 6
      src/pages/business/zhxf/building/index.vue
  70. 1 0
      src/pages/business/zhxf/fireInspect/index.vue
  71. 67 111
      src/pages/business/zhxf/fireInspect/inspectDetails/index.vue
  72. 43 45
      src/pages/business/zhxf/fireInspect/inspectDetailsList/index.vue
  73. 1 1
      src/pages/business/zhxf/funReport/funcAdd/index.vue
  74. 1 1
      src/pages/business/zhxf/funReport/index.vue
  75. 14 54
      src/pages/business/zhxf/messagePush/index.vue
  76. 37 45
      src/pages/common/alarmMessage/index.vue
  77. 63 0
      src/pages/common/appMessage/details.vue
  78. 115 99
      src/pages/common/appMessage/index.vue
  79. 7 20
      src/pages/common/customManage/index.vue
  80. 0 1
      src/pages/common/evaluate/index.vue
  81. 31 105
      src/pages/common/invoicing/index.vue
  82. 1 7
      src/pages/common/nfc/index.vue
  83. 2 2
      src/pages/common/phoneVerify/index.vue
  84. 18 51
      src/pages/common/repairReport/index.vue
  85. 1 2
      src/pages/common/repairReport/record.vue
  86. 57 0
      src/pages/common/searchSelect/index.vue
  87. 1 1
      src/pages/common/square/index.vue
  88. 13 23
      src/pages/common/success/index.vue
  89. 26 24
      src/pages/common/textview/index.vue
  90. 0 51
      src/pages/common/textview/index1.vue
  91. 10 6
      src/pages/common/webview/index.vue
  92. 152 160
      src/pages/index.vue
  93. 170 0
      src/pages/info copy.vue
  94. 135 72
      src/pages/info.vue
  95. 8 6
      src/pages/info/fireBase/fireBase.vue
  96. 16 14
      src/pages/info/fireBashDetail/fireBashDetail.vue
  97. 12 57
      src/pages/info/pushList/pushList.vue
  98. 82 47
      src/pages/login.vue
  99. 173 260
      src/pages/mine.vue
  100. 53 28
      src/pages/mine/about/index.vue

BIN
nativeplugins/Fvv-AutoStart/android/autostart-release.aar


+ 20 - 0
nativeplugins/Fvv-AutoStart/package.json

@@ -0,0 +1,20 @@
+{
+    "name": "AutoStart",
+    "id": "Fvv-AutoStart",
+    "version": "1.0.0",
+    "description": "安卓开机自启动",
+    "_dp_type":"nativeplugin",
+    "_dp_nativeplugin":{
+        "android": {
+            "plugins": [
+                {
+                    "type": "module",
+                    "name": "Fvv-AutoStart",
+                    "class": "uni.fvv.autostart"
+                }
+            ],
+			"integrateType": "aar",
+            "minSdkVersion": "17"
+        }
+    }
+}

+ 90 - 81
src/App.vue

@@ -1,81 +1,110 @@
 <script setup>
-import config from "./config";
-import { getToken, setToken, removeToken } from "@/utils/auth";
-import { defineComponent, getCurrentInstance, inject, nextTick, onMounted, watchEffect, ref } from "vue";
+/*----------------------------------依赖引入-----------------------------------*/
 import { onLoad, onShow, onHide, onLaunch, onReady } from "@dcloudio/uni-app";
-
-let tab = inject("$tab");
+import { defineComponent, getCurrentInstance, inject, nextTick, onMounted, watchEffect, ref } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+import config from "./config";
+import { storageSystem } from "@/utils/storage";
+import JKeyListen from "@/utils/keyListen.js";
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
 
 function initApp() {
-  //初始化获取安全区高度
-  proxy.$settingStore.systemHeightTop();
-  //隐藏自带tabbar
-  uni.hideTabBar();
+  proxy.$settingStore.initThemeColor(); //初始化默认主题
+  proxy.$settingStore.systemHeightTop(); //初始化获取安全区高度
+  uni.hideTabBar(); //隐藏自带tabbar
 
   //#ifdef APP-PLUS
   plus.screen.lockOrientation("portrait-primary"); //设置不可横屏
-  pushListener(); //开启消息推送监听
-  proxy.$setting.clearBadge(0); // 清除数字
+  proxy.$settingStore.pushListener(); //开启消息推送监听
+  // JKeyListen.startListen(true); //开启物理按钮监听
   //#endif
 }
 
-/**
- * @消息推送监听
- */
-function pushMessage() {
-  uni.onPushMessage((res) => {
-    const platform = uni.getSystemInfoSync().platform;
-    console.log("收到推送消息:", res); //监听推送消息
 
-    if (res.type === "click") {
-      if (platform == "android") {
-      } else {
-      }
-    } else if (res.type === "receive") {
-      if (platform == "android") {
-      } else {
-      }
+// 设置手机通知权限
+function setPermissions() {
+  // #ifdef APP-PLUS
+  if (plus.os.name == "Android") {
+    // 判断是Android
+    var main = plus.android.runtimeMainActivity();
+    var pkName = main.getPackageName();
+    var uid = main.getApplicationInfo().plusGetAttribute("uid");
+    var NotificationManagerCompat = plus.android.importClass("android.support.v4.app.NotificationManagerCompat");
+    //android.support.v4升级为androidx
+    if (NotificationManagerCompat == null) {
+      NotificationManagerCompat = plus.android.importClass("androidx.core.app.NotificationManagerCompat");
     }
-  });
-}
-
-/**
- * @消息推送监听
- */
-function pushListener() {
-  //获取应用的CID
-  uni.getPushClientId({
-    success: (res) => {
-      console.log(res.cid);
-    },
-    fail(err) {
-      console.log(err);
-    },
-  });
-
-  const platform = uni.getSystemInfoSync().platform;
-  // 点击推送信息
-  plus.push.addEventListener("click", (res) => {
-    console.log(res);
-    if (res.aps) {
-      if ("url" in res.payload) {
-      } else {
-      }
-      console.log(res.payload);
+    var areNotificationsEnabled = NotificationManagerCompat.from(main).areNotificationsEnabled();
+    // 未开通‘允许通知’权限,则弹窗提醒开通,并点击确认后,跳转到系统设置页面进行设置
+    if (!areNotificationsEnabled) {
+      uni.showModal({
+        title: "通知权限开启提醒",
+        content: "您还没有开启通知权限,无法接受到消息通知,请前往设置!",
+        showCancel: false,
+        confirmText: "去设置",
+        success: function (res) {
+          if (res.confirm) {
+            var Intent = plus.android.importClass("android.content.Intent");
+            var Build = plus.android.importClass("android.os.Build");
+            //android 8.0引导
+            if (Build.VERSION.SDK_INT >= 26) {
+              var intent = new Intent("android.settings.APP_NOTIFICATION_SETTINGS");
+              intent.putExtra("android.provider.extra.APP_PACKAGE", pkName);
+            } else if (Build.VERSION.SDK_INT >= 21) {
+              //android 5.0-7.0
+              var intent = new Intent("android.settings.APP_NOTIFICATION_SETTINGS");
+              intent.putExtra("app_package", pkName);
+              intent.putExtra("app_uid", uid);
+            } else {
+              //(<21)其他--跳转到该应用管理的详情页
+              intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
+              var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
+              intent.setData(uri);
+            }
+            // 跳转到该应用的系统通知设置页
+            main.startActivity(intent);
+          }
+        },
+      });
     }
-  });
-  // 接收推送信息  在线
-  plus.push.addEventListener("receive", (res) => {
-    console.log(res);
-    if (platform == "android") {
+  } else if (plus.os.name == "iOS") {
+    // 判断是ISO
+    var isOn = undefined;
+    var types = 0;
+    var app = plus.ios.invoke("UIApplication", "sharedApplication");
+    var settings = plus.ios.invoke(app, "currentUserNotificationSettings");
+    if (settings) {
+      types = settings.plusGetAttribute("types");
+      plus.ios.deleteObject(settings);
     } else {
-      uni.createPushMessage({
-        title: res.title,
-        content: res.content,
+      types = plus.ios.invoke(app, "enabledRemoteNotificationTypes");
+    }
+    plus.ios.deleteObject(app);
+    isOn = 0 != types;
+    if (isOn == false) {
+      uni.showModal({
+        title: "通知权限开启提醒",
+        content: "您还没有开启通知权限,无法接受到消息通知,请前往设置!",
+        showCancel: false,
+        confirmText: "去设置",
+        success: function (res) {
+          if (res.confirm) {
+            var app = plus.ios.invoke("UIApplication", "sharedApplication");
+            var setting = plus.ios.invoke("NSURL", "URLWithString:", "app-settings:");
+            plus.ios.invoke(app, "openURL:", setting);
+            plus.ios.deleteObject(setting);
+            plus.ios.deleteObject(app);
+          }
+        },
       });
     }
-  });
+  }
+  // #endif
 }
 
 watchEffect(() => {
@@ -88,19 +117,9 @@ watchEffect(() => {
 
 onLaunch(() => {
   console.log("App Launch");
-
-  //初始化默认主题
-  if (!proxy.$settingStore.$state.themeColor) {
-    proxy.$settingStore.SET_THEMECOLOR(proxy.$constData.themeList[0]);
-  } else {
-    proxy.$settingStore.SET_THEMECOLOR(proxy.$settingStore.$state.themeColor);
-  }
-
   initApp();
 });
 
-onLoad(() => {});
-
 onReady(() => {});
 
 onShow(() => {
@@ -134,14 +153,4 @@ uni-page-refresh {
   font-size: $uni-font-size-lg;
   font-weight: bold;
 }
-
-//uview-plus导航栏title样式
-:deep(.u-navbar__content__title) {
-  font-size: $uni-font-size-lg;
-  font-weight: bold;
-}
-
-:deep(.u-nav-slot .u-navbar__content__title) {
-  font-size: 18px;
-}
 </style>

+ 0 - 10
src/api/business/mhxf/xunJian/index.js

@@ -1,10 +0,0 @@
-import { request } from "@/utils/request";
-
-// ehcarts接口请求
-export function appPlanStatistics(param) {
-  return request({
-    url: "/service-fire/appPatrolInspection/appPlanStatistics",
-    method: "GET",
-    data: param,
-  });
-}

+ 0 - 0
src/api/business/mhxf/xunJian/collect.js → src/api/business/zhaf/xunJian/collect.js


+ 42 - 0
src/api/business/zhaf/xunJian/index.js

@@ -0,0 +1,42 @@
+import { request } from "@/utils/request";
+
+// ehcarts接口请求
+export function appPlanStatistics(param) {
+  return request({
+    url: "/service-fire/appPatrolInspection/appPlanStatistics",
+    method: "GET",
+    data: param,
+  });
+}
+
+/**
+ * 异常上报接口集合
+ * @method Select 查询
+ * @method Insert 新增
+ * @method Update 修改
+ */
+export function errorApi() {
+  return {
+    Select(data) {
+      return request({
+        url: "/service-fire/patrolInspectionEvent/patrolInspectionEventList",
+        method: "POST",
+        data: data,
+      });
+    },
+    Insert(data) {
+      return request({
+        url: "/service-fire/patrolInspectionEvent/add",
+        method: "POST",
+        data: data,
+      });
+    },
+    Update(data) {
+      return request({
+        url: "/service-fire/patrolInspectionEvent/edit",
+        method: "PUT",
+        data: data,
+      });
+    },
+  };
+}

+ 1 - 1
src/api/business/mhxf/xunJian/plan.js → src/api/business/zhaf/xunJian/plan.js

@@ -9,7 +9,7 @@ export function recordList(param) {
   });
 }
 
-//
+//巡检记录-查看巡检项
 export function recordOption(param) {
   return request({
     url: "/service-fire/appPatrolInspection/recordOption",

+ 0 - 0
src/api/business/mhxf/xunJian/record.js → src/api/business/zhaf/xunJian/record.js


+ 9 - 0
src/api/common/index.js

@@ -17,3 +17,12 @@ export function score(param) {
         data: param,
     });
 }
+
+//APP心跳
+export function baseAppInfoApi(param) {
+    return request({
+        url: "/service-iot/baseAppInfo/add",
+        method: "POST",
+        data: param,
+    });
+}

+ 1 - 3
src/api/login.js

@@ -50,6 +50,4 @@ export function getMobileTenantConfig(data) {
     method: "GET",
     data: data,
   });
-}
-
-
+}

+ 18 - 0
src/api/mine/index.js

@@ -0,0 +1,18 @@
+
+import { request } from "@/utils/request";
+
+/**
+ * 消息通知配置接口集合
+ * @method WxLogin 微信登录
+ */
+export function msgApi() {
+    return {
+        Select(data) {
+            return request({
+                url: "/system/mceSetting/mceSettingInfo",
+                method: "GET",
+                data: data,
+            });
+        },
+    };
+}

+ 54 - 0
src/api/mine/info.js

@@ -21,3 +21,57 @@ export function getKnowledgeBaseDetails(param) {
     data: param,
   });
 }
+
+/**
+ * @消息接收分类统计接口
+ */
+export function getMceReceiveStatic(param) {
+  return request({
+    url: "/system/mceReceive/mceReceiveStatic",
+    method: "GET",
+    data: param,
+  });
+}
+/**
+ * @消息列表接口
+ */
+export function getMceList(param) {
+  return request({
+    url: "/system/mceReceive/mceList",
+    method: "GET",
+    data: param,
+  });
+}
+/**
+ * @消息设置详情查询
+ */
+export function getMceSettingInfo(params) {
+  return request({
+    url: '/system/mceSetting/mceSettingInfo',
+    method: 'get',
+    data: params,
+  })
+}
+/**
+ * @消息设置详情查询
+ */
+export function updateMceReceiveStatus(params) {
+  return request({
+    url: '/system/mceReceive',
+    method: 'put',
+    data: params,
+  })
+}
+
+/**
+ * @消息设置接口
+ * @新增
+ * @修改
+ */
+export function addMceSetting(data) {
+  return request({
+    url: '/system/mceSetting/addMceSetting',
+    method: 'post',
+    data
+  })
+}

+ 52 - 0
src/api/system/dict.js

@@ -0,0 +1,52 @@
+import { request } from "@/utils/request";
+
+// 查询字典数据列表
+export function listData(query) {
+  return request({
+    url: '/system/dict/data/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询字典数据详细
+export function getData(dictCode) {
+  return request({
+    url: '/system/dict/data/' + dictCode,
+    method: 'get'
+  })
+}
+
+// 根据字典类型查询字典数据信息
+export function getDicts(dictType) {
+  return request({
+    url: '/system/dict/data/type/' + dictType,
+    method: 'get'
+  })
+}
+
+// 新增字典数据
+export function addData(data) {
+  return request({
+    url: '/system/dict/data',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改字典数据
+export function updateData(data) {
+  return request({
+    url: '/system/dict/data',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除字典数据
+export function delData(dictCode) {
+  return request({
+    url: '/system/dict/data/' + dictCode,
+    method: 'delete'
+  })
+}

+ 27 - 10
src/components/oa-calendar/uni-calendar.vue

@@ -24,14 +24,14 @@
 
         <view style="margin: auto"></view>
 
-        <view style="display: flex">
-          <view style="margin: 0px 10px">
-            <span style="margin-right: 5px">巡检</span>
-            <span style="color: #00cdac">{{ JSON.stringify(currentDateList) === "{}" ? 0 : currentDateList.patrolledCount }}</span>
+        <view class="uni-calendar__header-right">
+          <view class="item">
+            <span class="item_title">巡检</span>
+            <span class="item_cont" style="color: #00cdac">{{ JSON.stringify(currentDateList) === "{}" ? 0 : currentDateList.patrolledCount }}</span>
           </view>
-          <view class="margin-left-xs">
-            <span style="margin-right: 5px">漏检</span>
-            <span style="color: #f07d28">{{ JSON.stringify(currentDateList) === "{}" ? 0 : currentDateList.undetectedCount }}</span>
+          <view class="item">
+            <span class="item_title">漏检</span>
+            <span class="item_cont" style="color: #f07d28">{{ JSON.stringify(currentDateList) === "{}" ? 0 : currentDateList.undetectedCount }}</span>
           </view>
         </view>
       </view>
@@ -413,6 +413,7 @@ $uni-bg-color-mask: rgba(
 $uni-border-color: #ededed;
 $uni-text-color: #333;
 $uni-bg-color-hover: #f1f1f1;
+$uni-font-size-sm:12px;
 $uni-font-size-base: 14px;
 $uni-text-color-placeholder: #808080;
 $uni-color-subtitle: #555555;
@@ -475,7 +476,8 @@ $uni-text-color-grey: #999;
   flex-direction: row;
   // justify-content: center;
   align-items: center;
-  height: 50px;
+  // height: 50px;
+  line-height: 40px;
   padding: 0 15px;
   border-bottom-color: $uni-border-color;
   border-bottom-style: solid;
@@ -506,7 +508,7 @@ $uni-text-color-grey: #999;
   padding-left: 10px;
   height: 25px;
   line-height: 25px;
-  font-size: 12px;
+  font-size: $uni-font-size-sm;
   border-top-left-radius: 25px;
   border-bottom-left-radius: 25px;
   color: $uni-text-color;
@@ -520,6 +522,21 @@ $uni-text-color-grey: #999;
   color: $uni-text-color;
 }
 
+.uni-calendar__header-right {
+  display: flex;
+
+  .item {
+    font-size: $uni-font-size-base;
+    .item_title {
+      margin-right: 5px;
+    }
+  }
+
+  .item + .item {
+    margin-left: 10px;
+  }
+}
+
 .uni-calendar__header-btn-box {
   /* #ifndef APP-NVUE */
   display: flex;
@@ -577,7 +594,7 @@ $uni-text-color-grey: #999;
 }
 
 .uni-calendar__weeks-day-text {
-  font-size: 14px;
+  font-size: $uni-font-size-base;
 }
 
 .uni-calendar__box {

+ 1 - 1
src/components/oa-movable/index.vue

@@ -2,7 +2,7 @@
   <movable-area class="fixed-box">
     <movable-view class="fixed-button" direction="all" :inertia="true" y="100px">
       <view class="menuBox">
-        <view class="mainMenu iconfont ucicon-jiahao menu-item-icon" :style="{ background: themesColor }" @click="declick"></view>
+        <view class="mainMenu iconfont oaIcon-jiahao menu-item-icon" :style="{ background: themesColor }" @click="declick"></view>
         <view class="posi" :animation="animationData">
           <slot name="content"> </slot>
         </view>

+ 33 - 15
src/components/oa-scroll/index.vue

@@ -1,7 +1,15 @@
 <template>
   <scroll-view
     :class="customClass"
-    :style="customStyle"
+    :style="{
+      //#ifdef APP-PLUS || MP-WEIXIN
+      height: !isSticky ? 'calc(100vh - 0px)' : 'calc(100vh - 44px)',
+      //#endif
+      //#ifdef H5
+      height: !isSticky ? 'calc(100vh - 44px)' : 'calc(100vh - 88px)',
+      //#endif
+      ...customStyle,
+    }"
     :scroll-y="true"
     scroll-with-animation
     :refresher-threshold="refresherThreshold"
@@ -32,11 +40,14 @@
     </slot>
     <slot name="default"> </slot>
     <slot name="bottomLoading">
-      <div class="bottoBox" :style="`margin-top:20px;padding-bottom:${lowerThreshold + 'px'}`" v-if="refresherLoad">
-        <span v-show="total != 0 && refresherLoadTitle">
+      <div class="bottoBox" :style="`margin-top:20px;padding-bottom:${lowerThreshold + 'px'}`">
+        <span v-show="total != 0 && refresherLoad && refresherLoadTitle">
           {{ pageSize >= total ? "没有更多啦~" : isScrolltolower }}
         </span>
-        <span v-show="total == 0"> 暂无数据 </span>
+        <span v-show="total == 0 && refresherEnabled && refresherEnabledTitle && !triggered">
+          <image style="width: 160px; height: 160px" src="@/static/images/data.png"></image>
+          <view>暂无数据</view>
+        </span>
       </div>
     </slot>
   </scroll-view>
@@ -57,7 +68,6 @@ const props = defineProps({
     type: Number,
     default: 0,
   },
-
   //设置滚动条位置
   scrollTop: {
     type: String,
@@ -71,7 +81,12 @@ const props = defineProps({
   //设置外部style
   customStyle: {
     type: [String, Object],
-    default: "",
+    default: {},
+  },
+  //是否开启吸顶高度自适应
+  isSticky: {
+    type: Boolean,
+    default: false,
   },
   //是否开启上拉加载
   refresherLoad: {
@@ -93,6 +108,11 @@ const props = defineProps({
     type: Boolean,
     default: false,
   },
+  //是否显示下拉刷新文字
+  refresherEnabledTitle: {
+    type: Boolean,
+    default: true,
+  },
   //距离顶部下拉刷新距离
   refresherThreshold: {
     type: Number,
@@ -115,11 +135,8 @@ const props = defineProps({
   },
 });
 
-const { pageSize, total, scrollTop, customClass, customStyle, refresherLoad, lowerThreshold, refresherEnabled, refresherThreshold, refresherDefaultStyle, refresherBackground } = toRefs(props);
-
-const defaultOption = reactive({});
-
-const {} = toRefs(defaultOption);
+const { pageSize, total, scrollTop, customClass, customStyle, refresherLoad, lowerThreshold, refresherEnabled, refresherEnabledTitle, refresherThreshold, refresherDefaultStyle, refresherBackground } =
+  toRefs(props);
 
 const defaultArray = reactive({
   triggered: false,
@@ -194,8 +211,8 @@ onLoad((option) => {});
 .topBox .title {
   position: relative;
   margin-left: 35rpx;
-  color: #909399;
-  font-size: 0.75rem;
+  color: #c0c4cc;
+  font-size: 14px;
 }
 
 @keyframes color-change {
@@ -211,8 +228,9 @@ onLoad((option) => {});
 .bottoBox {
   display: flex;
   align-items: center;
+  text-align: center;
   justify-content: center;
-  color: #909399;
-  font-size: 0.75rem;
+  color: #c0c4cc;
+  font-size: 14px;
 }
 </style>

+ 10 - 5
src/components/oa-transForm/index.vue

@@ -16,18 +16,23 @@
   </view>
 </template>
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onReady, onLoad, onShow, onNavigationBarButtonTap, onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, watchEffect, toRefs } from "vue";
-
+/*----------------------------------接口引入-----------------------------------*/
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
-const data = reactive({
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
   coverTransform: "translateY(0px)",
   coverTransition: "0s",
   moving: false,
 });
 
-const { coverTransform, coverTransition, moving } = toRefs(data);
+const { coverTransform, coverTransition, moving } = toRefs(state);
 
 let startY = 0,
   moveY = 0,
@@ -89,7 +94,7 @@ onLoad((option) => {});
     left: 0;
     top: -16px;
     width: 100%;
-    height: 36upx;
+    height: 18px;
   }
 
   .mine-actions {

+ 25 - 16
src/components/oa-upgrade/index.vue

@@ -1,8 +1,8 @@
 <template>
-  <view class="upgrade-popup">
+  <view class="upgrade-popup" v-if="isModalShow">
     <image class="header-bg" src="@/static/images/common/oa-upgrade.png" mode="widthFix"></image>
     <view
-      class="iconfont ucicon-oa-upgrade header-bg"
+      class="iconfont oaIcon-upgrade header-bg"
       style="font-size: 110px; margin-top: -110px"
       :style="{
         color: themesColor,
@@ -54,7 +54,7 @@
       </view>
     </view>
   </view>
-  <view class="upgrade-show"></view>
+  <view class="upgrade-show" v-if="isModalShow"></view>
 </template>
 <script setup>
 import { onReady, onLoad, onShow, onNavigationBarButtonTap, onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
@@ -64,25 +64,21 @@ import { downloadApp, installApp } from "@/utils/upgrade.js";
 
 const { proxy } = getCurrentInstance();
 const props = defineProps({
-  //弹窗数据
-  modalArray: {
-    type: Object,
-    default: {},
-  },
   //主题颜色
   themesColor: {
     type: String,
     default: "#3f99ff",
   },
 });
-const emits = defineEmits(["closeModal"]);
-const { modalArra, themesColor } = toRefs(props);
+const emits = defineEmits([]);
+const { themesColor } = toRefs(props);
 
 const checkInfo = reactive({
+  isModalShow: false, //是否打开弹窗
   isForceUpdate: false, //是否强制更新
-  versionName: props.modalArray.buildVersion, //版本名称
-  versionDesc: props.modalArray.buildUpdateDescription.replace(/\\n/, "\n"), //更新说明
-  downloadUrl: props.modalArray.downloadURL, //APP下载链接
+  versionName: undefined, //版本名称
+  versionDesc: undefined, //更新说明
+  downloadUrl: undefined, //APP下载链接
   isDownloadFinish: false, //是否下载完成
   hasProgress: false, //是否能显示进度条
   currentPercent: 0, //当前下载百分比
@@ -90,7 +86,7 @@ const checkInfo = reactive({
   newFileName: "", //下载后app本地路径名称
 });
 
-const { modalTitle, modalContent, isForceUpdate, versionName, versionDesc, downloadUrl, isDownloadFinish, hasProgress, currentPercent, isStartDownload, newFileName } = toRefs(checkInfo);
+const { isModalShow, isForceUpdate, versionName, versionDesc, downloadUrl, isDownloadFinish, hasProgress, currentPercent, isStartDownload, newFileName } = toRefs(checkInfo);
 
 //设置进度条样式,实时更新进度位置
 const setProStyle = computed(() => {
@@ -143,17 +139,30 @@ function handleInstallApp() {
   if (isDownloadFinish.value && newFileName.value) {
     installApp(newFileName.value, () => {
       //安装成功,关闭升级弹窗
-      emits("closeModal", false);
+      isModalShow.value = false;
     });
   }
 }
 
+/** 打开弹窗 */
+function openUpgrade(e) {
+  isModalShow.value = true;
+
+  versionName.value = e.modalArray.buildVersion;
+  versionDesc.value = e.modalArray.buildUpdateDescription.replace(/\\n/, "\n");
+  downloadUrl.value = e.modalArray.downloadURL;
+}
+
 /** 取消按钮 */
 function handleCancel() {
-  emits("closeModal", false);
+  isModalShow.value = false;
 }
 
 onLoad((option) => {});
+
+defineExpose({
+  openUpgrade,
+});
 </script>
 
 <style lang="scss" scoped>

+ 15 - 15
src/components/oa-upload/index.vue

@@ -17,16 +17,16 @@
 
   <!-- 图片上传数量大于1显示 -->
   <view class="oa-upload" v-if="uploadCount > 1">
-    <view class="uploadView" :style="uploadStyle" v-for="up in uploadList" :key="up">
+    <view class="uploadView" :style="uploadStyle" v-for="(up, index) in uploadList" :key="index">
       <view class="uploadUimage">
         <u-image width="100%" height="100%" :src="up[uploadListSrc]" @click="handlePreviewImage(up[uploadListSrc])"></u-image>
       </view>
 
-      <view v-if="!uploadCloseStatus" class="uploadViewClose" @click="uploadViewClose(up)">
+      <view v-if="!uploadCloseStatus" class="uploadViewClose" @click="uploadViewClose(index)">
         <u-icon name="close" color="#ffffff" size="12"></u-icon>
       </view>
     </view>
-    <view :class="uploadCloseStatus ? 'uploadView upload-buttom uploadDisabled' : 'uploadView upload-buttom'" :style="uploadStyle" @click="uploadClick()">
+    <view v-if="uploadCount > uploadList.length" :class="uploadCloseStatus ? 'uploadView upload-buttom uploadDisabled' : 'uploadView upload-buttom'" :style="uploadStyle" @click="uploadClick()">
       <u-icon style="margin: auto" name="plus" color="#909399" :size="uploadIconSize"></u-icon>
     </view>
   </view>
@@ -60,7 +60,6 @@ const props = defineProps({
     default: {
       width: "80px",
       height: "80px",
-      marginBottom: "0px",
     },
   },
   //icon大小
@@ -103,7 +102,11 @@ function uploadClick() {
     sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
     sourceType: ["album", "camera"], //从相册选择、摄像头
     success: function (res) {
-      uploadApi(res);
+      res.tempFilePaths.forEach((url) => {
+        if (uploadCount.value >= uploadList.value.length) {
+          uploadApi(url);
+        }
+      });
     },
   });
 }
@@ -112,9 +115,8 @@ function uploadClick() {
  * @upload图片上传
  * @api接口请求
  */
-function uploadApi(res) {
-  let data = { name: "file", filePath: res.tempFilePaths[0] };
-
+function uploadApi(url) {
+  let data = { name: "file", filePath: url };
   uploadAvatar(data).then((response) => {
     emit("uploadSuccessChange", response.data);
   });
@@ -125,9 +127,10 @@ function uploadApi(res) {
  * @点击事件
  * @删除事件
  */
-function uploadViewClose(el) {
+function uploadViewClose(index) {
   if (uploadCount.value > 1) {
-    emit("uploadDeleteChange", uploadList.value.splice(uploadList.value.indexOf(el), 1));
+    uploadList.value.splice(index, 1);
+    emit("uploadDeleteChange", uploadList.value);
   } else {
     emit("uploadDeleteChange", "");
   }
@@ -136,6 +139,7 @@ function uploadViewClose(el) {
 
 <style scoped>
 .oa-upload {
+  width: 100%;
   display: flex;
   flex-wrap: wrap;
 }
@@ -145,7 +149,7 @@ function uploadViewClose(el) {
   overflow: hidden;
   width: calc(33% - 10px);
   height: 110px;
-  margin: 0 15px 15px 0;
+  margin: 0 10px 10px 0;
   border: 1px solid #d9d9d9;
   border-radius: 6px;
   cursor: pointer;
@@ -183,10 +187,6 @@ function uploadViewClose(el) {
   width: 100%;
 }
 
-.uploadView:nth-child(3n) {
-  margin: 0 !important;
-}
-
 .upload-buttom {
   display: flex;
   font-size: 28px;

+ 111 - 0
src/components/oa-weather/index.vue

@@ -0,0 +1,111 @@
+<template>
+  <!-- 天气 -->
+  <view class="app-common-window bg-white radius shadow-default" v-if="state.weatherData.length != 0">
+    <view class="weather radius">
+      <view class="weather-header">
+        <view class="iconfont oaIcon-address"></view>
+        <view class="weather-header-location">{{ state.weatherData[0].location || "上海" }}</view>
+        <view class="weather-header-day">今天</view>
+        <view class="weather-header-text">{{ state.weatherData[0].text || "未知" }}</view>
+      </view>
+      <view class="weather-center">
+        <view class="weather-center-temperature">{{ state.weatherData[0].today.low + "/" + state.weatherData[0].today.high || "0℃" }}</view>
+        <image class="weather-center-image" :src="`${'/static/icons/white/' + state.weatherData[0].code.now + '.png'}`" mode="heightFix"></image>
+      </view>
+    </view>
+  </view>
+</template>
+<script setup>
+import { onReady, onLoad, onShow, onNavigationBarButtonTap, onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, watchEffect, toRefs, toRef, watch } from "vue";
+
+const emit = defineEmits(["load", "refresh"]);
+const props = defineProps({});
+
+const state = reactive({
+  weatherData: [],
+});
+
+/**
+ * @获取天气信息
+ */
+function getWeather(string) {
+  uni.request({
+    url: `https://widget-v3.seniverse.com/api/weather/7b8a7d89-f01d-4b14-bdec-5ae0b82c857f?unit=c&language=zh-Hans&location=${string}`,
+    success: (res) => {
+      if (res.statusCode == 200) {
+        state.weatherData = res.data.results[0].data;
+      } else {
+        console.log("获取天气信息失败");
+      }
+    },
+    fail: (err) => {
+      console.log("获取天气信息失败", err);
+    },
+  });
+}
+
+onLoad((option) => {});
+
+onShow(() => {});
+
+// 暴露变量
+defineExpose({
+  getWeather,
+});
+</script>
+
+<style lang="scss" scoped>
+.app-common-window {
+  position: relative;
+  margin-top: -20px;
+  margin: -20px 20upx 20upx 20upx;
+  z-index: 50;
+
+  .weather {
+    padding: 10px;
+    background-image: url("@/static/images/index/weather.png");
+    background-size: 100% 100%;
+    background-position: center center;
+    background-repeat: no-repeat;
+
+    .weather-header {
+      display: flex;
+      margin-bottom: 10px;
+      font-size: 14px;
+
+      &-location {
+        margin-right: 15px;
+      }
+
+      &-day {
+        margin: 0 auto 0 0;
+      }
+
+      &-text {
+        margin: 0;
+      }
+
+      .iconfont {
+        margin: auto 5px auto 0;
+        color: #0c83fa;
+      }
+    }
+
+    .weather-center {
+      display: flex;
+
+      &-temperature {
+        margin: auto auto auto 0;
+        font-size: 18px;
+        font-weight: 600;
+      }
+
+      &-image {
+        margin: 0 0 0 0;
+        height: 30px !important;
+      }
+    }
+  }
+}
+</style>

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

@@ -3,7 +3,7 @@
     <view class="flex flex-wrap">
       <view v-for="(item, index) in items" :key="index" class="cu-tag bg-cyan radius">
         <slot name="default" v-bind:item="item">{{ item }}</slot>
-        <text class="margin-left line-blue cuIcon-close round bg-red" @click="onremove(index)"></text>
+        <text class="ml15 line-blue cuIcon-close round bg-red" @click="onremove(index)"></text>
       </view>
       <view class="flex">
         <uni-easyinput type="text" v-model="query" placeholder="输入..." prefixIcon="search" @input="onshuru" @click="onquery" @keyup="onquery" style="width: 60px;" />

+ 9 - 5
src/config.js

@@ -1,15 +1,14 @@
 // 应用全局配置
 export default {
   //#ifdef APP-PLUS || MP-WEIXIN
-  baseUrl: "http://manager.usky.cn/prod-api",
+  baseUrl: "https://gateWay.usky.cn/prod-api",
   //#endif
 
   //#ifdef H5
-  baseUrl: import.meta.env.MODE === "production" ? `http://${window.location.host}/prod-api` : `http://172.16.120.165:13200/dev-api`,
+  baseUrl: import.meta.env.MODE === "production" ? `https://${window.location.host}/prod-api` : `http://172.16.120.165:13200/dev-api`,
   //#endif
 
   websiteUrl: "https://qhome.usky.cn",
-  // NODE_ENV=devlopment
   // 应用信息
   appInfo: {
     // 应用名称
@@ -26,17 +25,22 @@ export default {
     site_url: "http://www.usky.cn/",
     // 版权
     copyright: "Copyright © 2021- 2025 Usky. All Rights Reserved. 永天股份 版权所有",
+    // 备案编号
+    filingInfo: {
+      code: "ICP备案号:沪ICP备09005762号-15A",
+      href: "https://beian.miit.gov.cn/#/Integrated/index"
+    },
     // 政策协议
     agreements: [
       {
         title: "用户服务协议",
         content: "暂无数据",
-        url: "http://file.usky.cn/statics/protocol.html",
+        url: "http://file.usky.cn/uskycloud/user_protocol.html",
       },
       {
         title: "隐私政策",
         content: "暂无数据",
-        url: "http://file.usky.cn/statics/protocol.html",
+        url: "http://file.usky.cn/uskycloud/privacy_protocol.html",
       },
     ],
   },

+ 3 - 12
src/main.js

@@ -3,14 +3,10 @@ import App from "./App";
 import store from "./store"; // store
 import plugins from "./plugins"; // plugins
 import "./permission"; // permission
-import config from "@/config"; // config
 
 // 引入json导出组件
 import JsonExcel from "vue-json-excel";
 
-// 引入微信js-sdk
-// import jweixin from 'weixin-js-sdk'
-
 // 引入UI组件
 import uviewPlus from "@/uni_modules/uview-plus";
 import oaCalendar from "@/components/oa-calendar/uni-calendar";
@@ -24,6 +20,7 @@ import oaDropdown from "@/components/oa-dropdown/index"
 import oaUpgrade from "@/components/oa-upgrade/index"
 import oaTransForm from "@/components/oa-transForm/index"
 import oaTtsAudio from "@/components/oa-ttsAudio/index"
+import oaWeather from "@/components/oa-weather/index"
 
 export function createApp() {
   const app = createSSRApp(App);
@@ -40,21 +37,15 @@ export function createApp() {
   app.component('oa-upgrade', oaUpgrade)
   app.component('oa-transForm', oaTransForm)
   app.component('oa-ttsAudio', oaTtsAudio)
+  app.component('oa-weather', oaWeather)
+  
 
   // 挂载全局json导出
   app.component("downloadExcel", JsonExcel);
-
-
   // 添加全局变量
   app.provide("$store", store);
   app.config.globalProperties.$store = store;
 
-  app.provide("$BASE_URL", config.baseUrl);
-  app.config.globalProperties.$BASE_URL = config.baseUrl;
-
-  app.provide("$websiteUrl", config.websiteUrl);
-  app.config.globalProperties.$websiteUrl = config.websiteUrl;
-
   app
     .use(uviewPlus)
     .use(store)

+ 32 - 9
src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "综合智慧云",
     "appid" : "__UNI__36DE3A0",
     "description" : "综合智慧云app,助力企业数字化转型升级",
-    "versionName" : "2.1.4",
-    "versionCode" : 12,
+    "versionName" : "2.1.3",
+    "versionCode" : 13,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {
@@ -29,10 +29,9 @@
             "Geolocation" : {},
             "Maps" : {},
             "Barcode" : {},
-            "Camera" : {},
             "Fingerprint" : {},
-            "Contacts" : {},
-            "Push" : {}
+            "Push" : {},
+            "Camera" : {}
         },
         /* 应用发布信息 */
         "distribute" : {
@@ -47,8 +46,6 @@
                     "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
                     "<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\"/>",
                     "<uses-permission android:name=\"android.permission.CAMERA\"/>",
                     "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
@@ -72,7 +69,13 @@
                     "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SMS\"/>"
+                    "<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
+                    "<uses-permission android:name=\"android.permission.FOREGROUND_SERVICE\"/>",
+                    "<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
+                    "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
+                    "<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
+                    "<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>"
                 ],
                 "minSdkVersion" : "",
                 "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ],
@@ -94,7 +97,8 @@
                     "NSBluetoothPeripheralUsageDescription" : "该应用需要你的蓝牙,以便读取相关蓝牙设备",
                     "NFCReaderUsageDescription" : "",
                     "NSBluetoothAlwaysUsageDescription" : "该应用需要你的蓝牙,以便读取相关蓝牙设备"
-                }
+                },
+                "UIBackgroundModes" : "location"
             },
             /* SDK配置 */
             "sdkConfigs" : {
@@ -169,6 +173,23 @@
                 "androidStyle" : "default",
                 "android" : {
                     "hdpi" : "src/static/images/wt/bg.png"
+                },
+                "iosStyle" : "common"
+            }
+        },
+        "nativePlugins" : {
+            "Fvv-AutoStart" : {
+                "__plugin_info__" : {
+                    "name" : "AutoStart",
+                    "description" : "安卓开机自启动",
+                    "platforms" : "Android",
+                    "url" : "",
+                    "android_package_name" : "android.dcloud.uskyMobile",
+                    "ios_bundle_id" : "",
+                    "isCloud" : false,
+                    "bought" : -1,
+                    "pid" : "",
+                    "parameters" : {}
                 }
             }
         },
@@ -229,3 +250,5 @@
     "vueVersion" : "3",
     "locale" : "zh-Hans"
 }
+/* ios打包配置 *//* SDK配置 */
+

+ 66 - 49
src/pages.json

@@ -93,12 +93,6 @@
             "navigationBarTitleText": "浏览文本"
           }
         },
-        {
-          "path": "textview/index1",
-          "style": {
-            "navigationBarTitleText": "浏览文本"
-          }
-        },
         {
           "path": "square/index",
           "style": {
@@ -139,7 +133,14 @@
         {
           "path": "appMessage/index",
           "style": {
-            "navigationBarTitleText": "应用消息",
+            "navigationBarTitleText": "消息列表",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "appMessage/details",
+          "style": {
+            "navigationBarTitleText": "消息详情",
             "enablePullDownRefresh": false
           }
         },
@@ -177,6 +178,18 @@
             "navigationBarTitleText": "NFC读取",
             "enablePullDownRefresh": false
           }
+        },
+        {
+          "path": "searchSelect/index",
+          "style": {
+            "navigationBarTitleText": "搜索",
+            "navigationStyle": "custom",
+            "enablePullDownRefresh": false,
+            "app-plus": {
+              "bounce": "none",
+              "titleNView": false
+            }
+          }
         }
       ]
     },
@@ -188,16 +201,12 @@
           "path": "info/index",
           "style": {
             "navigationBarTitleText": "我的信息"
-            // "app-plus": {
-            //   "bounce": "none",
-            //   "titleNView": {
-            //     "type": "transparent",
-            //     "autoBackButton": true,
-            //     "backButton": { //自定义 backButton
-            //       "background": "rgba(0,0,0,0)"
-            //     }
-            //   }
-            // }
+          }
+        },
+        {
+          "path": "msg/index",
+          "style": {
+            "navigationBarTitleText": "消息设置"
           }
         },
         {
@@ -287,7 +296,7 @@
     },
     // 智慧安防
     {
-      "root": "pages/business/zhaf",
+      "root": "pages/business/zhaf/",
       "pages": [
         //巡检模块 开始
         {
@@ -343,20 +352,11 @@
           "path": "xunJian/collect/index",
           "style": {
             "navigationBarTitleText": "点位采集",
+            "navigationStyle": "custom",
             "enablePullDownRefresh": false,
             "app-plus": {
-              "titleNView": {
-                "buttons": [
-                  {
-                    "text": "采集记录",
-                    "fontSize": "12px",
-                    // "redDot": true,
-                    "float": "right",
-                    "fontSrc": "/static/iconfont/iconfont.ttf",
-                    "width": "auto"
-                  }
-                ]
-              }
+              "bounce": "none",
+              "titleNView": false
             }
           }
         },
@@ -371,23 +371,42 @@
           "path": "xunJian/collect/components/collectRecord",
           "style": {
             "navigationBarTitleText": "采集记录",
+            "navigationStyle": "custom",
             "enablePullDownRefresh": false,
             "app-plus": {
-              "titleNView": {
-                "buttons": [
-                  {
-                    "text": "\ue7c7",
-                    "fontSize": "18px",
-                    // "redDot": true,
-                    "float": "right",
-                    "fontSrc": "/static/iconfont/iconfont.ttf",
-                    "width": "auto"
-                  }
-                ]
-              }
+              "bounce": "none",
+              "titleNView": false
             }
           }
         },
+        {
+          "path": "xunJian/error/index",
+          "style": {
+            "navigationBarTitleText": "异常上报",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "xunJian/error/errorList",
+          "style": {
+            "navigationBarTitleText": "异常列表",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "xunJian/error/errorListDetail",
+          "style": {
+            "navigationBarTitleText": "事件详情",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "xunJian/error/errorDisposition",
+          "style": {
+            "navigationBarTitleText": "处置内容",
+            "enablePullDownRefresh": false
+          }
+        },
         //巡检模块 结束
         //人员签到 开始
         {
@@ -400,11 +419,9 @@
         //人员签到 签退
       ]
     },
-    // 智慧安防
-
     // 闵行消防
     {
-      "root": "pages/business/mhxf",
+      "root": "pages/business/mhxf/",
       "pages": [
         //消防督察单模块 开始
         //消防督察单模块 结束
@@ -481,7 +498,7 @@
     },
     // 智慧消防
     {
-      "root": "pages/business/zhxf",
+      "root": "pages/business/zhxf/",
       "pages": [
         {
           "path": "messagePush/index",
@@ -537,7 +554,7 @@
     },
     // 消防物联网
     {
-      "root": "pages/business/fireIot",
+      "root": "pages/business/fireIot/",
       "pages": [
         {
           "path": "deviceManage/index",
@@ -641,7 +658,7 @@
     },
     // 业务模块
     {
-      "root": "pages/business",
+      "root": "pages/business/common/",
       "pages": [
         {
           "path": "fastMail/index",
@@ -686,7 +703,7 @@
         "text": "工作台"
       },
       // {
-      //   "pagePath": "pages/analyse/analyse",
+      //   "pagePath": "pages/business/analyse/index",
       //   "iconPath": "/static/images/tabBar/analyse.png",
       //   "selectedIconPath": "/static/images/tabBar/analyse-selected.png",
       //   "text": "分析"

+ 8 - 8
src/pages/business/analyse/index.vue

@@ -4,7 +4,7 @@
       <u-image src="@/static/images/analyse/analyse-bg.png" width="100%" height="273rpx" :showLoading="false" :fade="false"></u-image>
     </view>
     <view class="cu-list menu-avatar padding-lr-sm padding-top-sm" style="height: calc(100% - 8.53125rem)">
-      <view class="cu-item margin-bottom-sm" @tap="goMonthReport()">
+      <view class="cu-item mb10" @tap="goMonthReport()">
         <view class="cu-avatar">
           <image class="image-bg" src="@/static/images/analyse/yb-icon.png" />
         </view>
@@ -13,11 +13,11 @@
         </view>
         <view class="nav-right">
           <view class="text-grey">
-            <text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
+            <text class="icon iconfont mr5 ml20">&#xe629;</text>
           </view>
         </view>
       </view>
-      <view class="cu-item margin-bottom-sm" @tap="goBuildingCheck()">
+      <view class="cu-item mb10" @tap="goBuildingCheck()">
         <view class="cu-avatar">
           <image class="image-bg" src="@/static/images/analyse/build-icon.png" />
         </view>
@@ -26,7 +26,7 @@
         </view>
         <view class="nav-right">
           <view class="text-grey">
-            <text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
+            <text class="icon iconfont mr5 ml20">&#xe629;</text>
           </view>
         </view>
       </view>
@@ -65,16 +65,16 @@ export default {
 .analyse-wrapper {
   .cu-list.menu-avatar .cu-item {
     border-radius: 5px;
-    padding: 30rpx 0;
+    padding: 15px 0;
     box-shadow: 1px 1px 4px rgb(26 26 26 / 10%);
     .cu-avatar {
       background-color: rgba(0, 0, 0, 0);
-      left: 26rpx;
+      left: 13px;
     }
 
     .content {
-      left: 130rpx;
-      font-size: 32rpx;
+      left: 65px;
+      font-size: 16px;
     }
   }
 }

+ 27 - 31
src/pages/business/fastMail/index.vue → src/pages/business/common/fastMail/index.vue

@@ -5,6 +5,7 @@
 
   <oa-scroll
     customClass="fastMail-container scroll-height"
+    :isSticky="true"
     :pageSize="pageSize"
     :total="total"
     :refresherLoad="true"
@@ -22,18 +23,18 @@
           <view class="content-area-top menu-item"> </view>
           <view class="content-area-row_wrap menu-item">
             <view class="content-area-row_wrap-view" style="margin-right: auto">
-              <view class="mr5" style="font-weight: 600">{{ data.pickupCode }}</view>
-              <view class="iconfont ucicon-a-copy menu-item-icon" @click="copy(data.pickupCode)"> </view>
+              <view style="font-weight: 600; margin-right: 5px">{{ data.pickupCode }}</view>
+              <view class="iconfont oaIcon-copy menu-item-icon" @click="copy(data.pickupCode)"> </view>
             </view>
             <view class="content-area-row_wrap-view" style="min-width: auto; max-width: 50%">
               {{ data.pickupAddress }}
             </view>
             <view class="content-area-row_wrap-view" style="margin-right: auto">
-              <image class="mr5" style="width: 15px; height: 15px; margin: auto 0" mode="widthFix" src="@/static/images/common/ydkd.png" />
+              <image style="width: 15px; height: 15px; margin: auto 5px auto 0" mode="widthFix" src="@/static/images/common/ydkd.png" />
               韵达快递:{{ data.packNo }}
             </view>
             <view class="content-area-row_wrap-view" style="min-width: auto">
-              <view class="iconfont ucicon-dial menu-item-icon mr0" @click="proxy.$common.makePhoneCall(data.contactPhone)"> </view>
+              <view class="iconfont oaIcon-dial menu-item-icon mr0" @click="proxy.$common.makePhoneCall(data.contactPhone)"> </view>
             </view>
             <view class="content-area-row_wrap-view">{{ data.dataTime ? data.dataTime.replace("T", " ") : "" }}</view>
           </view>
@@ -47,18 +48,18 @@
           <view class="content-area-top menu-item"> </view>
           <view class="content-area-row_wrap menu-item">
             <view class="content-area-row_wrap-view" style="margin-right: auto">
-              <view class="mr5" style="font-weight: 600">{{ data.pickupCode }}</view>
-              <view class="iconfont ucicon-a-copy menu-item-icon" @click="copy(data.pickupCode)"> </view>
+              <view style="font-weight: 600; margin-right: 5px">{{ data.pickupCode }}</view>
+              <view class="iconfont oaIcon-copy menu-item-icon" @click="copy(data.pickupCode)"> </view>
             </view>
             <view class="content-area-row_wrap-view" style="min-width: auto; max-width: 50%">
               {{ data.pickupAddress }}
             </view>
             <view class="content-area-row_wrap-view" style="margin-right: auto">
-              <image class="mr5" style="width: 15px; height: 15px; margin: auto 0" mode="widthFix" src="@/static/images/common/ydkd.png" />
+              <image style="width: 15px; height: 15px; margin: auto 5px auto 0" mode="widthFix" src="@/static/images/common/ydkd.png" />
               韵达快递:{{ data.packNo }}
             </view>
             <view class="content-area-row_wrap-view" style="min-width: auto">
-              <view class="iconfont ucicon-dial menu-item-icon mr0" @click="proxy.$common.makePhoneCall(data.contactPhone)"> </view>
+              <view class="iconfont oaIcon-dial menu-item-icon mr0" @click="proxy.$common.makePhoneCall(data.contactPhone)"> </view>
             </view>
             <view class="content-area-row_wrap-view">{{ data.dataTime ? data.dataTime.replace("T", " ") : "" }}</view>
           </view>
@@ -69,35 +70,31 @@
 </template>
 
 <script setup>
-import config from "@/config";
-import storage from "@/utils/storage";
+/*----------------------------------依赖引入-----------------------------------*/
 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 { pageQuery } from "@/api/business/fastMail.js";
-
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
+const useStore = useStores();
 const commonStore = commonStores();
-
-const dataList = ref([]);
-const pageSize = ref(20);
-const current = ref(1);
-const total = ref(0);
-
-const data = reactive({
-  tabsList: [
-    {
-      name: "待取件",
-    },
-    {
-      name: "已取件",
-    },
-  ],
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  dataList: [],
+  pageSize: 20,
+  current: 1,
+  total: 0,
+
+  tabsList: [{ name: "待取件" }, { name: "已取件" }],
   tabsCurrent: 0,
 });
 
-const { tabsList, tabsCurrent } = toRefs(data);
+const { dataList, pageSize, current, total, tabsList, tabsCurrent } = toRefs(state);
 
 /**
  * @页面初始化
@@ -163,7 +160,6 @@ function load() {
  */
 function refresh() {
   pageSize.value = 20;
-  total.value = 0;
   init();
 }
 
@@ -199,7 +195,7 @@ onNavigationBarButtonTap((e) => {
     }
 
     &-row_wrap {
-      font-size: 13px;
+      font-size: 14px;
       flex-flow: row wrap;
 
       &-view {

+ 85 - 0
src/pages/business/common/videoMonitor/videoDetail.vue

@@ -0,0 +1,85 @@
+<template>
+  <oa-scroll
+    customClass="videoDetail-container scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <view class="bg-white p15 mb15">
+        <uni-section class="block mb10" :title="'设备名称:' + state.deviceName" type="line"></uni-section>
+        <view class="tableType3 p0">
+          <video id="myVideo" :src="state.videoUrl" style="width: 100%" loop="loop" autoplay="autoplay"></video>
+        </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";
+/*----------------------------------接口引入-----------------------------------*/
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+const useStore = useStores();
+const commonStore = commonStores();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  dataArray: {},
+  dataList: [],
+  deviceName: "",
+  pageSize: 20,
+  current: 1,
+  total: "",
+
+  videoUrl: "http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8",
+});
+
+/**
+ * @页面初始化
+ */
+function init() {
+  selectListApi();
+}
+
+/**
+ * @列表查询
+ * @api接口查询
+ */
+function selectListApi() {}
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+onLoad((options) => {
+  if ("deviceName" in options) {
+    state.deviceName = options.deviceName;
+  }
+
+  init();
+});
+</script>
+
+<style lang="scss" scoped>
+:deep(.u-input__content__field-wrapper__field) {
+  font-size: 13px !important;
+}
+
+:deep(.u-textarea__field) {
+  font-size: 13px;
+}
+</style>

+ 166 - 0
src/pages/business/common/videoMonitor/videoList.vue

@@ -0,0 +1,166 @@
+<template>
+  <oa-scroll
+    customClass="repairManage-container scroll-height"
+    :pageSize="state.pageSize"
+    :total="state.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="menu-list m0">
+        <view class="list-cell list-cell-arrow" style="line-height: 25px" v-for="(base, index) in state.dataList" :key="index" @click="handleToDetails(base)">
+          <view class="menu-item">
+            <image v-if="base.deviceStatus == 1" class="image-bg" style="width: 80rpx; height: 80rpx; margin: auto 10px auto 0" src="@/static/images/videoMonitor/video-icon-on.png"></image>
+            <image v-if="base.deviceStatus == 2" class="image-bg" style="width: 80rpx; height: 80rpx; margin: auto 10px auto 0" src="@/static/images/videoMonitor/video-icon-off.png"></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.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>
+            </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 { pageQuery } from "@/api/business/videoMonitor.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+const commonStore = commonStores();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  dataList: [],
+  pageSize: 20,
+  current: 1,
+  total: 0,
+});
+
+/**
+ * @页面初始化
+ */
+function init() {
+  selectListApi();
+}
+
+/**
+ * @列表查询
+ * @api接口查询
+ */
+function selectListApi() {
+  pageQuery({
+    current: state.current,
+    size: state.pageSize,
+  }).then((requset) => {
+    if (requset.status === "SUCCESS") {
+      state.dataList = requset.data.records;
+      state.total = requset.data.total;
+    }
+  });
+}
+
+/**
+ * @跳转详情事件
+ */
+function handleToDetails(e) {
+  proxy.$tab.navigateTo(`/pages/business/common/videoMonitor/videoDetail?deviceName=${e.deviceName}`);
+  if (e.deviceStatus == 1) {
+  }
+}
+
+/**
+ * @scrollView加载数据
+ */
+function load() {
+  state.pageSize += 10;
+  init();
+}
+
+/**
+ * @scrollView刷新数据
+ */
+function refresh() {
+  state.pageSize = 20;
+  init();
+}
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+onLoad((options) => {
+  init();
+});
+</script>
+
+<style lang="scss" scoped>
+.repairManage-container {
+  .content-area {
+    &-top {
+      padding-right: 10px;
+      font-size: 16px;
+      font-weight: 600;
+      color: #000000;
+
+      &-time {
+        max-width: 70%;
+        margin: auto 0;
+        font-size: 14px;
+        color: rgb(102, 102, 102);
+      }
+
+      &-name {
+        max-width: 70%;
+        color: #000;
+      }
+
+      &-status {
+        max-width: 30%;
+        margin: auto 0 auto auto;
+        font-size: 12px;
+        color: #ffffff;
+        padding: 0 5px;
+        border-radius: 20px;
+        line-height: 20px;
+      }
+    }
+
+    &-row_wrap {
+      padding-right: 10px;
+      font-size: 13px;
+      flex-flow: row wrap;
+
+      &-view {
+        display: flex;
+        min-width: 50%;
+        > .iconfont {
+          font-size: 14px;
+          color: #909399;
+          margin-left: 5px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 72 - 80
src/pages/business/fireIot/alarmManage/alarmDetails/index.vue

@@ -1,25 +1,33 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view class="alarmDetails-container">
+  <oa-scroll
+    customClass="alarmDetails-container scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
       <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>
+        <image style="width: 40px; height: 40px; margin: auto 15px auto 0" :src="array.typeImg ? array.typeImg : '/static/images/404.png'" mode="aspectFill"></image>
 
         <view style="margin: auto auto auto 0">
-          <view style="font-size: 15px"> {{ dataArray.deviceName }} </view>
+          <view style="font-size: 15px"> {{ array.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 style="font-size: 15px" :style="`color:${array.handleStatus == 1 ? '#16bf00' : 'red'}`">
+            {{ array.handleStatus == 1 ? "已处理" : array.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">
+        <view class="tableType3 p0">
+          <u-row v-for="da in state.dataList" :key="da">
             <u-col span="4">
               <view style="text-align: right; padding: 0px 5px 0px 5px">{{ da.title }}</view>
             </u-col>
@@ -34,9 +42,9 @@
         <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-group v-model="state.handleRange" placement="row" v-if="array.handleStatus != 1">
             <u-radio
-              v-for="han in handleRangeList"
+              v-for="han in state.handleRangeList"
               :key="han"
               :activeColor="proxy.$settingStore.themeColor.color"
               :label="han.label"
@@ -47,10 +55,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>
+          <u--textarea v-model="state.handleContent" placeholder="备注信息,最多可输入50个字" :count="true" maxlength="50" style="margin: 0 0 15px 0" :disabled="array.handleStatus == 1"></u--textarea>
         </view>
 
-        <view class="flex" v-if="dataArray.handleStatus != 1">
+        <view class="flex" v-if="array.handleStatus != 1">
           <u-button
             type="primary"
             text="误报"
@@ -75,61 +83,47 @@
           ></u-button>
         </view>
       </view>
-    </view>
-  </scroll-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, baseAlarm } from "@/api/business/fireIot/alarmManage.js";
-
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  array: {},
+  dataList: [
+    { title: "设备名称", value: "", unit: "", key: "deviceName" },
+    { title: "设备地址", value: "", unit: "", key: "alarmAddress" },
+    { title: "告警等级", value: "", unit: "级", key: "alarmGrade" },
+    { title: "告警信息", value: "", unit: "", key: "alarmContent" },
+    { title: "告警时间", value: "", unit: "", key: "alarmTime" },
+  ],
+
+  deviceId: "",
+  alarmTime: "",
+  pageSize: 20,
+  current: 1,
+  total: 0,
+
+  handleContent: "",
+  handleRange: 1,
+  handleRangeList: [
+    { label: "单个处理", value: 1 },
+    { label: "批量处理", value: 0 },
+  ],
+});
 
-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,
-  },
-]);
+const { array } = toRefs(state);
 
 /**
  * @页面初始化
@@ -144,20 +138,18 @@ function init() {
  */
 function selectListApi() {
   baseAlarmList({
-    deviceName: deviceName.value,
-    startTime: alarmTime.value,
-    endTime: alarmTime.value,
-    current: current.value,
-    size: pageSize.value,
+    deviceId: state.deviceId,
+    startTime: state.alarmTime,
+    endTime: state.alarmTime,
+    current: state.current,
+    size: state.pageSize,
   }).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;
+      state.array = requset.data.records[0];
+      state.dataList.forEach((e) => {
+        e.value = requset.data.records[0][e.key] + e.unit;
+      });
+      state.total = requset.data.total;
     }
   });
 }
@@ -167,12 +159,12 @@ function selectListApi() {
  */
 function handleSubmit(alarmFalse) {
   baseAlarm({
-    id: dataArray.value.id,
-    deviceId: dataArray.value.deviceId,
-    alarmType: dataArray.value.alarmType,
-    handleContent: handleContent.value,
+    id: state.array.id,
+    deviceId: state.array.deviceId,
+    alarmType: state.array.alarmType,
+    handleContent: state.handleContent,
     alarmFalse: alarmFalse,
-    handleRange: handleRange.value,
+    handleRange: state.handleRange,
   }).then((requset) => {
     if (requset.status === "SUCCESS") {
       proxy.$tab.navigateTo(`/pages/common/success/index?codeName=提交成功`);
@@ -188,12 +180,12 @@ onShow(() => {
 });
 
 onLoad((options) => {
-  if ("deviceName" in options) {
-    deviceName.value = options.deviceName;
+  if ("deviceId" in options) {
+    state.deviceId = options.deviceId;
   }
 
   if ("alarmTime" in options) {
-    alarmTime.value = options.alarmTime;
+    state.alarmTime = options.alarmTime;
   }
 
   init();

+ 47 - 50
src/pages/business/fireIot/alarmManage/alarmDetailsList/index.vue

@@ -1,12 +1,13 @@
 <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-tabs :list="state.tabsList" :current="state.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"
+    :pageSize="state.pageSize"
+    :total="state.total"
+    :isSticky="true"
     :refresherLoad="true"
     :refresherEnabled="true"
     :refresherDefaultStyle="'none'"
@@ -19,16 +20,16 @@
   >
     <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-list m0">
+          <view class="list-cell list-cell-arrow" v-for="(base, index) in state.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'}`">
+              <view class="mb5" style="min-width: 80%; color: #909399"> {{ base.alarmTime }}</view>
+              <view class="mb5 pr15" style="min-width: 20%; color: #909399; text-align: right"> {{ base.alarmGrade }}级</view>
+              <view class="mb5" style="min-width: 80%; color: #909399">{{ base.deviceName }}</view>
+              <view class="mb5 pr15" style="min-width: 20%; text-align: right" :style="`color:${base.handleStatus == 1 ? '#16bf00' : 'red'}`">
                 {{ base.handleStatus == 1 ? "已处理" : "未处理" }}
               </view>
-              <view style="min-width: 50%; padding-right: 15px">{{ base.alarmContent }}</view>
+              <view class="pr15" style="min-width: 50%">{{ base.alarmContent }}</view>
             </view>
           </view>
         </view>
@@ -38,37 +39,34 @@
 </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";
-
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 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);
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  tabsList: [
+    { name: "全部", value: "" },
+    { name: "未处理", value: 0 },
+    { name: "已处理", value: 1 },
+  ],
+  tabsCurrent: 0,
+
+  dataList: [],
+  productCode: "",
+  productName: "",
+  pageSize: 20,
+  current: 1,
+  total: 0,
+});
 
 /**
  * @页面初始化
@@ -83,17 +81,17 @@ function init() {
  */
 function selectListApi() {
   baseAlarmList({
-    productCode: productCode.value,
-    handleStatus: tabsList.value[tabsCurrent.value].value,
-    current: current.value,
-    size: pageSize.value,
+    productCode: state.productCode,
+    handleStatus: state.tabsList[state.tabsCurrent].value,
+    current: state.current,
+    size: state.pageSize,
   }).then((requset) => {
     if (requset.status === "SUCCESS") {
-      dataList.value = requset.data.records;
-      total.value = requset.data.total;
+      state.dataList = requset.data.records;
+      state.total = requset.data.total;
 
       uni.setNavigationBarTitle({
-        title: `${productName.value}(${total.value})`,
+        title: `${state.productName}(${state.total})`,
       });
     }
   });
@@ -103,14 +101,14 @@ function selectListApi() {
  * @跳转详情事件
  */
 function handleToDetails(e) {
-  proxy.$tab.navigateTo(`/pages/business/fireIot/alarmManage/alarmDetails/index?deviceName=${e.deviceName}&alarmTime=${e.alarmTime}`);
+  proxy.$tab.navigateTo(`/pages/business/fireIot/alarmManage/alarmDetails/index?deviceId=${e.deviceId}&alarmTime=${e.alarmTime}`);
 }
 
 /**
  * @scrollView加载数据
  */
 function load() {
-  pageSize.value += 10;
+  state.pageSize += 10;
   init();
 }
 
@@ -118,8 +116,7 @@ function load() {
  * @scrollView刷新数据
  */
 function refresh() {
-  pageSize.value = 20;
-  total.value = 0;
+  state.pageSize = 20;
   init();
 }
 
@@ -127,7 +124,7 @@ function refresh() {
  * @tabs点击事件
  */
 function tabsClick(e) {
-  tabsCurrent.value = e.index;
+  state.tabsCurrent = e.index;
   init();
 }
 
@@ -140,10 +137,10 @@ onShow(() => {
 
 onLoad((options) => {
   if ("productName" in options) {
-    productName.value = options.productName;
+    state.productName = options.productName;
   }
   if ("productCode" in options) {
-    productCode.value = options.productCode;
+    state.productCode = options.productCode;
     init();
   }
 });

+ 1 - 2
src/pages/business/fireIot/alarmManage/index.vue

@@ -18,7 +18,7 @@
         <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>
+            <image class="mb15 mt35" style="width: 40px; height: 40px" :src="base.typeImg" mode="aspectFill"></image>
             <text class="mb15 grid-text text-ellipsis">{{ base.productName }}</text>
           </u-grid-item>
         </u-grid>
@@ -82,7 +82,6 @@ function load() {
  */
 function refresh() {
   pageSize.value = 20;
-  total.value = 0;
   init();
 }
 

+ 35 - 24
src/pages/business/fireIot/deviceManage/components/deviceDetails.vue

@@ -1,24 +1,32 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view class="deviceDetails-container">
+  <oa-scroll
+    customClass="deviceDetails-container scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
       <view class="flex bg-white p15 mb15">
         <image style="width: 40px; height: 40px; margin: auto 15px auto 0" :src="'/static/images/404.png'" mode="aspectFill"></image>
 
         <view style="margin: auto auto auto 0">
-          <view style="font-size: 15px"> {{ commonStore.$state.deviceDetailsArray.deviceName }} </view>
+          <view style="font-size: 15px"> {{ commonStore.deviceDetailsArray.deviceName }} </view>
         </view>
 
         <view style="margin: auto 0 auto 0">
-          <view :style="{ fontSize: '15px', color: commonStore.$state.deviceDetailsArray.deviceStatus == 1 ? '#16bf00' : 'red' }">
-            {{ commonStore.$state.deviceDetailsArray.deviceStatus == 1 ? "在线" : "离线" }}
+          <view :style="{ fontSize: '15px', color: commonStore.deviceDetailsArray.deviceStatus == 1 ? '#16bf00' : 'red' }">
+            {{ commonStore.deviceDetailsArray.deviceStatus == 1 ? "在线" : "离线" }}
           </view>
         </view>
       </view>
 
       <view class="bg-white p15 mb15">
         <uni-section class="block mb10" title="基本信息" type="line"></uni-section>
-
-        <view class="tableType3 padding-0">
+        <view class="tableType3 p0">
           <u-empty v-if="dataList.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
 
           <u-row v-for="po in dataList" :key="po">
@@ -88,42 +96,45 @@
       </u-modal>
 
       <uni-calendar ref="calendar" class="uni-calendar--hook" :clearDate="false" :insert="false" :lunar="false" :range="true" @confirm="calendarConfirm" />
-    </view>
-  </scroll-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 chart from "./chart.vue";
-
+/*----------------------------------接口引入-----------------------------------*/
 import { dmpProductAttribute, historyMetrics, last } from "@/api/business/fireIot/deviceManage.js";
-
+/*----------------------------------组件引入-----------------------------------*/
+import chart from "./chart.vue";
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
 const commonStore = commonStores();
-
+/*----------------------------------变量声明-----------------------------------*/
 const dataList = ref([
   {
     title: "设备类型",
-    value: commonStore.$state.deviceDetailsArray.productName,
+    value: commonStore.deviceDetailsArray.productName,
   },
   {
     title: "设备编号",
-    value: commonStore.$state.deviceDetailsArray.deviceId,
+    value: commonStore.deviceDetailsArray.deviceId,
   },
   {
     title: "物联网卡号",
-    value: commonStore.$state.deviceDetailsArray.simCode,
+    value: commonStore.deviceDetailsArray.simCode,
   },
   {
     title: "安装位置",
-    value: commonStore.$state.deviceDetailsArray.installAddress,
+    value: commonStore.deviceDetailsArray.installAddress,
   },
   {
     title: "添加时间",
-    value: commonStore.$state.deviceDetailsArray.createdTime ? commonStore.$state.deviceDetailsArray.createdTime.replace("T", " ") : "",
+    value: commonStore.deviceDetailsArray.createdTime ? commonStore.deviceDetailsArray.createdTime.replace("T", " ") : "",
   },
 ]);
 
@@ -151,7 +162,7 @@ function init() {
     current: 1,
     size: 100,
     attributeName: "",
-    productId: commonStore.$state.deviceDetailsArray.productId,
+    productId: commonStore.deviceDetailsArray.productId,
   }).then((requset) => {
     if (requset.status === "SUCCESS") {
       checkboxDataList.value = requset.data.records;
@@ -164,7 +175,7 @@ function init() {
       });
 
       last({
-        deviceId: commonStore.$state.deviceDetailsArray.deviceId,
+        deviceId: commonStore.deviceDetailsArray.deviceId,
         metrics: array,
       }).then((requsets) => {
         if (requsets.status === "SUCCESS") {
@@ -217,8 +228,8 @@ function historyMetricsApi() {
   historyMetrics({
     startTime: calendarStartTime.value,
     endTime: calendarEndTime.value,
-    deviceId: commonStore.$state.deviceDetailsArray.deviceId,
-    deviceType: commonStore.$state.deviceDetailsArray.deviceType,
+    deviceId: commonStore.deviceDetailsArray.deviceId,
+    deviceType: commonStore.deviceDetailsArray.deviceType,
     metrics: checkboxValueList.value,
   }).then((requset) => {
     if (requset.status === "SUCCESS") {

+ 6 - 19
src/pages/business/fireIot/deviceManage/components/deviceDetailsList.vue

@@ -36,7 +36,7 @@
           </template>
         </oa-dropdown>
 
-        <view class="menu-list margin-0">
+        <view class="menu-list m0">
           <view class="list-cell list-cell-arrow" v-for="(base, index) in dataList" :key="index" @click="handleToDevice(base)">
             <view class="menu-item">
               <image class="image-bg" style="width: 80rpx; height: 80rpx; margin: auto 10px auto 0" src="@/static/images/deviceManage/1.png"></image>
@@ -79,18 +79,9 @@ const total = ref(0);
 
 const data = reactive({
   radioList: [
-    {
-      label: "全部",
-      value: "",
-    },
-    {
-      label: "在线",
-      value: "1",
-    },
-    {
-      label: "离线",
-      value: "2",
-    },
+    { label: "全部", value: "" },
+    { label: "在线", value: "1" },
+    { label: "离线", value: "2" },
   ],
   radioValue: "",
   dropdownShow: false,
@@ -129,8 +120,8 @@ function dmpDeviceInfoApi() {
 function handleToDevice(array) {
   proxy.$tab.navigateTo("/pages/business/fireIot/deviceManage/components/deviceDetails");
 
-  commonStore.$state.deviceDetailsArray = array;
-  commonStore.$state.deviceDetailsArray.productName = productName.value;
+  commonStore.deviceDetailsArray = array;
+  commonStore.deviceDetailsArray.productName = productName.value;
 }
 
 /**
@@ -155,7 +146,6 @@ function load() {
 function refresh() {
   deviceName.value = "";
   pageSize.value = 20;
-  total.value = 0;
   init();
 }
 
@@ -179,9 +169,6 @@ onLoad((options) => {
 
 <style lang="scss" scoped>
 .deviceDetailsList-container {
-  .menu-item {
-  }
-
   .deviceHeader {
     min-width: 100%;
     font-size: 15px;

+ 1 - 2
src/pages/business/fireIot/deviceManage/index.vue

@@ -18,7 +18,7 @@
         <u-grid :border="true">
           <u-grid-item v-for="(base, index) in dataList" :key="index" @click="handleToDevice(base.id, base.productName)">
             <u-badge type="primary" max="9999" :value="base.deviceCount" :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>
+            <image class="mb15 mt35" style="width: 40px; height: 40px" :src="base.typeImg" mode="aspectFill"></image>
             <view class="mb15 text-ellipsis" style="width: 100%; text-align: center">{{ base.productName }}</view>
           </u-grid-item>
         </u-grid>
@@ -80,7 +80,6 @@ function load() {
  */
 function refresh() {
   pageSize.value = 20;
-  total.value = 0;
   init();
 }
 

+ 24 - 143
src/pages/business/fireIot/facilitiesGather/index.vue

@@ -34,7 +34,7 @@
               <u-form-item label="设施地址" prop="address" :borderBottom="true" required>
                 <u-input v-model="form.address" placeholder="请选择设施地址" border="none" disabledColor="transparent" disabled @click="handleAction('设施地址')">
                   <template #suffix>
-                    <view class="iconfont ucicon-map menu-item-icon" style="font-size: 18px; color: #909399"> </view>
+                    <view class="iconfont oaIcon-map menu-item-icon" style="font-size: 18px; color: #909399"> </view>
                   </template>
                 </u-input>
               </u-form-item>
@@ -48,7 +48,7 @@
                 <view style="font-size: 15px">{{ form.typeGuise == 1 ? "点" : form.typeGuise == 2 ? "线" : form.typeGuise == 3 ? "面" : "" }}</view>
                 <view v-if="form.gpsAreas.length <= 0" style="font-size: 15px; margin: auto; color: #ff0000">未编辑</view>
                 <view v-if="form.gpsAreas.length > 0" style="font-size: 15px; margin: auto; color: #30bb00">已编辑</view>
-                <view class="iconfont ucicon-bianji1 menu-item-icon" style="font-size: 14px; color: #909399"> </view>
+                <view class="iconfont oaIcon-bianji menu-item-icon" style="font-size: 18px; color: #909399"> </view>
               </u-form-item>
               <u-form-item label="联系人" prop="contact" :borderBottom="true">
                 <u-input v-model="form.contact" placeholder="请输入联系人" border="none" />
@@ -91,7 +91,7 @@
         <view class="app-button-padding"></view>
         <view class="app-button-fixed">
           <view class="app-flex">
-            <u-button class="app-buttom" style="margin-right: 15px" @click="handleSubmit('取消')" shape="circle"> 取消 </u-button>
+            <u-button class="app-buttom" @click="handleSubmit('取消')" shape="circle"> 取消 </u-button>
             <u-button class="app-buttom" type="primary" @click="handleSubmit('提交')" shape="circle"> 提交 </u-button>
           </view>
         </view>
@@ -133,101 +133,27 @@ const childrenList1 = ref([[]]);
 
 const dataList = reactive({
   sexList: [
-    {
-      text: "正常",
-      value: "0",
-    },
-    {
-      text: "维修",
-      value: "1",
-    },
-    {
-      text: "关闭",
-      value: "2",
-    },
+    { text: "正常", value: "0" },
+    { text: "维修", value: "1" },
+    { text: "关闭", value: "2" },
   ],
 
-  form: commonStore.$state.facilitiesGatherArray,
+  form: commonStore.facilitiesGatherArray,
 
   rules: {
-    department: [
-      {
-        required: false,
-        message: "请选择所属部门",
-        trigger: ["blur", "change"],
-      },
-    ],
-    facilityTypeName: [
-      {
-        required: true,
-        message: "请选择设施类型",
-        trigger: ["blur", "change"],
-      },
-    ],
-    facilityName: [
-      {
-        required: true,
-        message: "请输入设施名称",
-        trigger: ["blur", "change"],
-      },
-    ],
-    status: [
-      {
-        required: true,
-        message: "请选择设施状态",
-        trigger: ["blur", "change"],
-      },
-    ],
-    address: [
-      {
-        required: false,
-        message: "请选择设施地址",
-        trigger: ["blur", "change"],
-      },
-    ],
-    facilityAddress: [
-      {
-        required: true,
-        message: "请输入详细地址",
-        trigger: ["blur", "change"],
-      },
-    ],
-    // contact: [
-    //   {
-    //     required: true,
-    //     message: "请输入联系人",
-    //     trigger: ["blur", "change"],
-    //   },
-    // ],
+    department: [{ required: false, message: "请选择所属部门", trigger: ["blur", "change"] }],
+    facilityTypeName: [{ required: true, message: "请选择设施类型", trigger: ["blur", "change"] }],
+    facilityName: [{ required: true, message: "请输入设施名称", trigger: ["blur", "change"] }],
+    status: [{ required: true, message: "请选择设施状态", trigger: ["blur", "change"] }],
+    address: [{ required: false, message: "请选择设施地址", trigger: ["blur", "change"] }],
+    facilityAddress: [{ required: true, message: "请输入详细地址", trigger: ["blur", "change"] }],
+    // contact: [{ required: true, message: "请输入联系人", trigger: ["blur", "change"] }],
     // contactPhone: [
-    //   {
-    //     required: true,
-    //     message: "请输入联系人电话",
-    //     trigger: ["blur", "change"],
-    //   },
-    //   {
-    //     type: "string",
-    //     min: 11,
-    //     required: true,
-    //     message: "请输入正确11位联系人电话",
-    //     pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
-    //     trigger: ["blur", "change"],
-    //   },
-    // ],
-    // imagesUrl: [
-    //   {
-    //     required: true,
-    //     message: "请选择图片",
-    //     trigger: ["blur", "change"],
-    //   },
-    // ],
-    // facilityDesc: [
-    //   {
-    //     required: true,
-    //     message: "请输入备注",
-    //     trigger: ["blur", "change"],
-    //   },
+    //   { required: true, message: "请输入联系人电话", trigger: ["blur", "change"] },
+    //   { type: "string", min: 11, required: true, message: "请输入正确11位联系人电话", pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, trigger: ["blur", "change"] },
     // ],
+    // imagesUrl: [{ required: true, message: "请选择图片", trigger: ["blur", "change"] }],
+    // facilityDesc: [{ required: true, message: "请输入备注", trigger: ["blur", "change"] }],
   },
 
   actionIndex: 0,
@@ -261,54 +187,9 @@ function init() {
       });
 
       var data = [
-        {
-          id: 124,
-          label: "公司",
-          children: [
-            {
-              id: 125,
-              label: "it",
-              children: [
-                {
-                  id: 126,
-                  label: "二组",
-                },
-              ],
-            },
-          ],
-        },
-        {
-          id: 124,
-          label: "公司",
-          children: [
-            {
-              id: 125,
-              label: "it1",
-              children: [
-                {
-                  id: 126,
-                  label: "1组",
-                },
-              ],
-            },
-          ],
-        },
-        {
-          id: 124,
-          label: "公司",
-          children: [
-            {
-              id: 125,
-              label: "it2",
-              children: [
-                {
-                  id: 126,
-                  label: "3组",
-                },
-              ],
-            },
-          ],
-        },
+        { id: 124, label: "公司", children: [{ id: 125, label: "it", children: [{ id: 126, label: "二组" }] }] },
+        { id: 124, label: "公司", children: [{ id: 125, label: "it1", children: [{ id: 126, label: "1组" }] }] },
+        { id: 124, label: "公司", children: [{ id: 125, label: "it2", children: [{ id: 126, label: "3组" }] }] },
       ];
 
       data.forEach((el) => {
@@ -426,16 +307,16 @@ function handleAction(value, array) {
   }
 
   if (value == "设施地址") {
-    commonStore.$state.facilitiesGatherType = "点";
+    commonStore.facilitiesGatherType = "点";
     proxy.$tab.navigateTo("/pages/business/fireIot/facilitiesGather/mapGather");
     return;
   }
 
   if (value == "类型") {
     if (form.value.typeGuise === 2) {
-      commonStore.$state.facilitiesGatherType = "线";
+      commonStore.facilitiesGatherType = "线";
     } else if (form.value.typeGuise === 3) {
-      commonStore.$state.facilitiesGatherType = "面";
+      commonStore.facilitiesGatherType = "面";
     }
     proxy.$tab.navigateTo("/pages/business/fireIot/facilitiesGather/mapGather");
 

+ 4 - 4
src/pages/business/fireIot/facilitiesGather/mapGather.vue

@@ -22,8 +22,8 @@ const { proxy } = getCurrentInstance();
 
 const pages = getCurrentPages();
 
-const dataArray = commonStore.$state.facilitiesGatherArray;
-const dataType = commonStore.$state.facilitiesGatherType;
+const dataArray = commonStore.facilitiesGatherArray;
+const dataType = commonStore.facilitiesGatherType;
 
 // #ifdef APP-PLUS
 setTimeout(() => {
@@ -35,7 +35,7 @@ setTimeout(() => {
 
 function onMessage(e) {
   console.log("父页面:", e.detail.data);
-  commonStore.$state.facilitiesGatherArray = JSON.parse(e.detail.data);
+  commonStore.facilitiesGatherArray = JSON.parse(e.detail.data);
   uni.redirectTo({
     url: "/pages/business/fireIot/facilitiesGather/index",
   });
@@ -56,7 +56,7 @@ setTimeout(() => {
 window.onmessage = function (event) {
   if ("funcName" in event.data) {
     console.log("父页面:", event);
-    commonStore.$state.facilitiesGatherArray = JSON.parse(event.data.param);
+    commonStore.facilitiesGatherArray = JSON.parse(event.data.param);
     uni.redirectTo({
       url: "/pages/business/fireIot/facilitiesGather/index",
     });

+ 39 - 36
src/pages/business/fireIot/facilitiesManage/facilitiesDetails.vue

@@ -1,6 +1,15 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view class="facilitiesDetails-container">
+  <oa-scroll
+    customClass="facilitiesDetails-container scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
       <view class="flex bg-white p15 mb15">
         <image style="width: 40px; height: 40px; margin: auto 15px auto 0" :src="dataArray.imagesUrl ? dataArray.imagesUrl : '/static/images/404.png'" mode="aspectFill"></image>
 
@@ -19,8 +28,7 @@
 
       <view class="bg-white p15 mb15">
         <uni-section class="block mb10" title="基本信息" type="line"></uni-section>
-
-        <view class="tableType3 padding-0">
+        <view class="tableType3 p0">
           <u-empty v-if="dataList.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
 
           <u-row v-for="po in dataList" :key="po">
@@ -37,8 +45,8 @@
       <view class="bg-white p15 mb15">
         <uni-section class="block mb10" title="关联设备" type="line"></uni-section>
 
-        <view class="flex margin-bottom-sm" style="height: 35px; line-height: 35px">
-          <u-input v-model="deviceId" placeholder="设备编号" @change="deviceInfoApi()" disabledColor="transparent" prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" clearable />
+        <view class="flex mb10" style="height: 35px; line-height: 35px">
+          <u-input v-model="state.deviceId" placeholder="设备编号" @change="deviceInfoApi()" disabledColor="transparent" prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" clearable />
         </view>
 
         <view class="tableType1">
@@ -76,8 +84,8 @@
       <view class="bg-white p15 mb15">
         <uni-section class="block mb10" title="关联建筑" type="line"></uni-section>
 
-        <view class="flex margin-bottom-sm" style="height: 35px; line-height: 35px">
-          <u-input v-model="buildNum" placeholder="建筑编号" @change="buildInfoApi()" disabledColor="transparent" prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" clearable />
+        <view class="flex mb10" style="height: 35px; line-height: 35px">
+          <u-input v-model="state.buildNum" placeholder="建筑编号" @change="buildInfoApi()" disabledColor="transparent" prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" clearable />
         </view>
 
         <view class="tableType1">
@@ -111,40 +119,35 @@
           </u-row>
         </view>
       </view>
-    </view>
-  </scroll-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 { facilityInfo, deviceInfo, buildInfo } from "@/api/business/fireIot/facilitiesManage.js";
-
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  id: undefined,
+  deviceId: undefined,
+  buildNum: undefined,
+});
 
-const id = ref(undefined);
-const deviceId = ref(undefined);
-const buildNum = ref(undefined);
 const dataArray = ref({});
 const dataList = ref([
-  {
-    title: "设施类型",
-    value: "",
-  },
-  {
-    title: "设施编号",
-    value: "",
-  },
-  {
-    title: "设施位置",
-    value: "",
-  },
-  {
-    title: "创建时间",
-    value: "",
-  },
+  { title: "设施类型", value: "" },
+  { title: "设施编号", value: "" },
+  { title: "设施位置", value: "" },
+  { title: "创建时间", value: "" },
 ]);
 
 const dataList1 = ref([]);
@@ -154,7 +157,7 @@ const dataList2 = ref([]);
  * @页面初始化
  */
 function init() {
-  facilityInfo({ id: id.value }).then((requset) => {
+  facilityInfo({ id: state.id }).then((requset) => {
     if (requset.status === "SUCCESS") {
       dataArray.value = requset.data[0];
       dataList.value[1].value = requset.data[0].facilityNum ? requset.data[0].facilityNum : "无";
@@ -172,7 +175,7 @@ function init() {
  * @api接口请求
  */
 function deviceInfoApi() {
-  deviceInfo({ id: id.value, deviceId: deviceId.value, current: 1, size: 1000 }).then((requset) => {
+  deviceInfo({ id: state.id, deviceId: state.deviceId, current: 1, size: 1000 }).then((requset) => {
     if (requset.status === "SUCCESS") {
       dataList1.value = requset.data.records;
     }
@@ -184,7 +187,7 @@ function deviceInfoApi() {
  * @api接口请求
  */
 function buildInfoApi() {
-  buildInfo({ id: id.value, buildNum: buildNum.value, current: 1, size: 1000 }).then((requset) => {
+  buildInfo({ id: state.id, buildNum: state.buildNum, current: 1, size: 1000 }).then((requset) => {
     if (requset.status === "SUCCESS") {
       dataList2.value = requset.data.records;
     }
@@ -203,7 +206,7 @@ onLoad((options) => {
     dataList.value[0].value = options.typeName;
   }
   if ("id" in options) {
-    id.value = parseInt(options.id);
+    state.id = parseInt(options.id);
     init();
   }
 });

+ 1 - 2
src/pages/business/fireIot/facilitiesManage/facilitiesDetailsList.vue

@@ -28,7 +28,7 @@
           <view class="ml10" style="margin-top: auto; margin-bottom: auto; white-space: nowrap" @click="init()">筛选</view>
         </view>
 
-        <view class="menu-list margin-0">
+        <view class="menu-list m0">
           <view class="list-cell list-cell-arrow" v-for="(base, index) in dataList" :key="index" @click="handleToDevice(base.id)">
             <view class="menu-item">
               <view class="title">{{ base.facilityName }}</view>
@@ -104,7 +104,6 @@ function load() {
 function refresh() {
   facilityName.value = "";
   pageSize.value = 20;
-  total.value = 0;
   init();
 }
 

+ 9 - 8
src/pages/business/fireIot/facilitiesManage/index.vue

@@ -4,6 +4,7 @@
     :refresherLoad="false"
     :refresherLoadTitle="false"
     :refresherEnabled="true"
+    :refresherEnabledTitle="false"
     :refresherDefaultStyle="'none'"
     :refresherThreshold="44"
     :refresherBackground="'#f5f6f7'"
@@ -11,20 +12,20 @@
     :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="flex ptb10 bg-white">
+        <view class="plr10 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 class="plr10 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)">
+      <view class="flex bg-white mlr10 mt10 p10 shadow-default radius" v-for="(data, index) in dataList" :key="index">
+        <view class="mr10" 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.typeCode, data.typeName)">
-          <view class="flex margin-bottom-xl">
-            <view class="font30 text-bold">{{ data.typeName }}</view>
+          <view class="flex mb25">
+            <view class="font15 text-bold">{{ data.typeName }}</view>
             <view style="font-size: 14px; margin-top: auto; margin-right: auto">({{ data.typeFacilityNum || 0 }})</view>
           </view>
           <view>
@@ -37,7 +38,7 @@
         </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 class="iconfont oaIcon-app-map icon" :style="{ color: proxy.$settingStore.themeColor.color, fontSize: '22px' }"></view>
         </view>
       </view>
     </template>

+ 2 - 2
src/pages/business/fireIot/repairManage/index.vue

@@ -6,6 +6,7 @@
     :refresherLoad="true"
     :refresherLoadTitle="false"
     :refresherEnabled="true"
+    :refresherEnabledTitle="false"
     :refresherDefaultStyle="'none'"
     :refresherThreshold="44"
     :refresherBackground="'#f5f6f7'"
@@ -18,7 +19,7 @@
         <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>
+            <image class="mb15 pt35" style="width: 40px; height: 40px" :src="base.typeImg" mode="aspectFill"></image>
             <text class="mb15 grid-text text-ellipsis">{{ base.productName }}</text>
           </u-grid-item>
         </u-grid>
@@ -82,7 +83,6 @@ function load() {
  */
 function refresh() {
   pageSize.value = 20;
-  total.value = 0;
   init();
 }
 

+ 58 - 69
src/pages/business/fireIot/repairManage/repairDetails.vue

@@ -1,6 +1,15 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view class="alarmDetails-container">
+  <oa-scroll
+    customClass="repairDetails-container scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
       <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>
 
@@ -18,7 +27,7 @@
       <view class="bg-white p15 mb15">
         <uni-section class="block mb10" title="基本信息" type="line"></uni-section>
 
-        <view class="tableType3 padding-0">
+        <view class="tableType3 p0">
           <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>
@@ -73,52 +82,41 @@
           ></u-button>
         </view>
       </view>
-    </view>
-  </scroll-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 { page, fill } from "@/api/business/fireIot/repairManage.js";
-
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
 const useStore = useStores();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  dataArray: {},
+  dataList: [
+    { title: "报修日期", value: "" },
+    { title: "项目名称", value: "" },
+    { title: "报修人", value: "" },
+    { title: "报修电话", value: "" },
+    { title: "问题描述", value: "" },
+    { title: "报修地址", value: "" },
+  ],
+  repairCode: "",
+  pageSize: 20,
+  current: 1,
+  total: 0,
+});
 
-const dataArray = ref({});
-const dataList = ref([
-  {
-    title: "报修日期",
-    value: "",
-  },
-  {
-    title: "项目名称",
-    value: "",
-  },
-  {
-    title: "报修人",
-    value: "",
-  },
-  {
-    title: "报修电话",
-    value: "",
-  },
-  {
-    title: "问题描述",
-    value: "",
-  },
-  {
-    title: "报修地址",
-    value: "",
-  },
-]);
-
-const repairCode = ref("");
-const pageSize = ref(20);
-const current = ref(1);
-const total = ref(0);
+const { dataArray, dataList, repairCode, pageSize, current, total } = toRefs(state);
 
 /**
  * @页面初始化
@@ -133,35 +131,26 @@ function init() {
  */
 function selectListApi() {
   page({
-    repairCode: repairCode.value,
-    current: current.value,
-    size: pageSize.value,
+    repairCode: state.repairCode,
+    current: state.current,
+    size: state.pageSize,
   }).then((requset) => {
     if (requset.status === "SUCCESS") {
-      dataArray.value = requset.data.records[0];
-      dataArray.value.handleName = requset.data.records[0].handleName ? requset.data.records[0].handleName : useStore.nickName ? useStore.nickName : "";
-      dataArray.value.handleContent = requset.data.records[0].handleContent ? requset.data.records[0].handleContent : "";
+      state.dataArray = requset.data.records[0];
+      state.dataArray.handleName = requset.data.records[0].handleName ? requset.data.records[0].handleName : useStore.nickName ? useStore.nickName : "";
+      state.dataArray.handleContent = requset.data.records[0].handleContent ? requset.data.records[0].handleContent : "";
 
-      dataList.value[0].value = requset.data.records[0].createTime ? requset.data.records[0].createTime.replace("T", " ") : requset.data[0].createTime;
-      dataList.value[1].value = requset.data.records[0].projectName;
-      dataList.value[2].value = requset.data.records[0].reflectName;
-      dataList.value[3].value = requset.data.records[0].reflectPhone;
-      dataList.value[4].value = requset.data.records[0].repairContent;
-      dataList.value[5].value = requset.data.records[0].projectAddress;
+      state.dataList[0].value = requset.data.records[0].createTime ? requset.data.records[0].createTime.replace("T", " ") : requset.data[0].createTime;
+      state.dataList[1].value = requset.data.records[0].projectName;
+      state.dataList[2].value = requset.data.records[0].reflectName;
+      state.dataList[3].value = requset.data.records[0].reflectPhone;
+      state.dataList[4].value = requset.data.records[0].repairContent;
+      state.dataList[5].value = requset.data.records[0].projectAddress;
 
       if (requset.data.records[0].repairStatus === 2) {
-        dataList.value.push(
-          {
-            title: "评分",
-            value: 0,
-          },
-          {
-            title: "评分内容",
-            value: "",
-          }
-        );
-        dataList.value[6].value = requset.data.records[0].score ? requset.data.records[0].score : 0;
-        dataList.value[7].value = requset.data.records[0].appraiseContent;
+        state.dataList.push({ title: "评分", value: 0 }, { title: "评分内容", value: "" });
+        state.dataList[6].value = requset.data.records[0].score ? requset.data.records[0].score : 0;
+        state.dataList[7].value = requset.data.records[0].appraiseContent;
       }
 
       total.value = requset.data.total;
@@ -176,15 +165,15 @@ function handleSubmit(type) {
   if (type == 1) {
     proxy.$tab.navigateBack(1);
   } else {
-    if (!dataArray.value.handleName) {
+    if (!state.dataArray.handleName) {
       proxy.$modal.msg("请输入报修人");
       return;
     }
 
     fill({
-      id: dataArray.value.id,
-      handleName: dataArray.value.handleName,
-      handleContent: dataArray.value.handleContent,
+      id: state.dataArray.id,
+      handleName: state.dataArray.handleName,
+      handleContent: state.dataArray.handleContent,
     }).then((res) => {
       if (requset.status === "SUCCESS") {
         proxy.$tab.navigateTo(`/pages/common/success/index?codeName=提交成功`);
@@ -202,7 +191,7 @@ onShow(() => {
 
 onLoad((options) => {
   if ("repairCode" in options) {
-    repairCode.value = options.repairCode;
+    state.repairCode = options.repairCode;
   }
 
   init();

+ 33 - 34
src/pages/business/fireIot/repairManage/repairDetailsList.vue

@@ -7,6 +7,7 @@
     customClass="repairManage-container scroll-height"
     :pageSize="pageSize"
     :total="total"
+    :isSticky="true"
     :refresherLoad="true"
     :refresherEnabled="true"
     :refresherDefaultStyle="'none'"
@@ -41,35 +42,34 @@
 </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 { page } from "@/api/business/fireIot/repairManage.js";
-
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-const commonStore = commonStores();
-
-const tabsList = ref([
-  {
-    name: "全部",
-    value: "",
-  },
-  {
-    name: "受理中",
-    value: 1,
-  },
-  {
-    name: "处理完成",
-    value: 2,
-  },
-]);
-const tabsCurrent = ref(1);
-
-const dataList = ref([]);
-const pageSize = ref(20);
-const current = ref(1);
-const total = ref(0);
+const commonStore = commonStores(); //全局公共Store
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  tabsList: [
+    { name: "全部", value: "" },
+    { name: "受理中", value: 1 },
+    { name: "处理完成", value: 2 },
+  ],
+  tabsCurrent: 1,
+
+  dataList: [],
+  pageSize: 20,
+  current: 1,
+  total: 0,
+});
+
+const { tabsList, tabsCurrent, dataList, pageSize, current, total } = toRefs(state);
 
 /**
  * @页面初始化
@@ -84,13 +84,13 @@ function init() {
  */
 function selectListApi() {
   page({
-    repairStatus: tabsList.value[tabsCurrent.value].value,
-    current: current.value,
-    size: pageSize.value,
+    repairStatus: state.tabsList[state.tabsCurrent].value,
+    current: state.current,
+    size: state.pageSize,
   }).then((requset) => {
     if (requset.status === "SUCCESS") {
-      dataList.value = requset.data.records;
-      total.value = requset.data.total;
+      state.dataList = requset.data.records;
+      state.total = requset.data.total;
     }
   });
 }
@@ -106,7 +106,7 @@ function handleToDetails(e) {
  * @scrollView加载数据
  */
 function load() {
-  pageSize.value += 10;
+  state.pageSize += 10;
   init();
 }
 
@@ -114,8 +114,7 @@ function load() {
  * @scrollView刷新数据
  */
 function refresh() {
-  pageSize.value = 20;
-  total.value = 0;
+  state.pageSize = 20;
   init();
 }
 
@@ -123,7 +122,7 @@ function refresh() {
  * @tabs点击事件
  */
 function tabsClick(e) {
-  tabsCurrent.value = e.index;
+  state.tabsCurrent = e.index;
   init();
 }
 

+ 104 - 110
src/pages/business/mhxf/deviceManage/index.vue

@@ -1,122 +1,126 @@
 <template>
   <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
     <u-tabs
-      :list="list"
-      :current="current"
+      :list="tabsList"
+      :current="tabsCurrent"
       @click="tabsClick"
-      :scrollable="list.length >= 5 ? true : false"
+      :scrollable="tabsList.length >= 5 ? true : false"
       lineColor="#333"
       :activeStyle="{ color: '#333' }"
       :inactiveStyle="{ color: '#909399' }"
     ></u-tabs>
   </u-sticky>
 
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name" style="padding-bottom: 44px">
-    <oa-touch class="deviceManage" @change="touchChange">
-      <template #content>
-        <uni-swipe-action>
-          <uni-swipe-action-item class="bg-white">
-            <view class="content">
-              <view class="block p10">
-                <u-input v-model="dataInput" placeholder="请输入设备编号" @blur="blur" shape="circle" prefixIcon="search" prefixIconStyle="color: #0c7bf9"> </u-input>
-              </view>
-
-              <u-empty v-if="dataList.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
-
-              <u-collapse @change="change" @close="close" @open="open" accordion v-else>
-                <u-collapse-item class="uCollapseItem" v-for="da in dataList" :key="da">
-                  <template #title>
-                    <view class="flex">
-                      <view class="cu-avatar lg" style="margin: 0 10px auto 0; background-color: rgba(0, 0, 0, 0)">
-                        <image class="image-bg" style="width: 80rpx; height: 80rpx" src="@/static/images/deviceManage/1.png"></image>
-                      </view>
-                      <view style="width: 100%">
-                        <view class="flex" style="color: #000000">
-                          <view>设备编号:{{ da.deviceCode }}</view>
-                          <view class="deviceStatus" v-if="da.deviceStatus == 0" style="background-color: #aeaeae"> 离线 </view>
-                          <view class="deviceStatus" v-else-if="da.deviceStatus == 1" style="background-color: #12c100"> 正常 </view>
-                          <view class="deviceStatus" v-else-if="da.deviceStatus == 2" style="background-color: #ff1313"> 故障 </view>
-                          <view class="deviceStatus" v-else style="background-color: #0d88f0"> 告警 </view>
-                        </view>
-                        <view style="display: flex; font-size: 14px; color: #666666; margin: 10px 0">
-                          <view style="width: 50%; word-break: break-all">监测对象:{{ da.installAddress }}</view>
-                          <view style="width: 50%; word-break: break-all; padding-left: 10px">所属单位:{{ da.companyName }}</view>
+  <oa-scroll
+    customClass="bg-white scroll-height"
+    :isSticky="true"
+    :refresherLoad="false"
+    :refresherLoadTitle="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <oa-touch class="deviceManage" @change="touchChange">
+        <template #content>
+          <uni-swipe-action>
+            <uni-swipe-action-item class="bg-white">
+              <view class="content">
+                <view class="block p10">
+                  <u-input v-model="deviceCode" placeholder="请输入设备编号" @blur="blur" shape="circle" prefixIcon="search" prefixIconStyle="color: #0c7bf9"> </u-input>
+                </view>
+
+                <u-empty v-if="dataList.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
+
+                <u-collapse @change="change" @close="close" @open="open" accordion v-else>
+                  <u-collapse-item class="uCollapseItem" v-for="da in dataList" :key="da">
+                    <template #title>
+                      <view class="flex">
+                        <view class="cu-avatar lg" style="margin: 0 10px auto 0; background-color: rgba(0, 0, 0, 0)">
+                          <image class="image-bg" style="width: 80rpx; height: 80rpx" src="@/static/images/deviceManage/1.png"></image>
                         </view>
-                        <view style="display: flex; font-size: 14px; color: #666666">
-                          <view style="width: 50%; word-break: break-all">负责人:{{ da.linkPerson }}</view>
-                          <view style="width: 50%; word-break: break-all; padding-left: 10px">联系电话:{{ da.linkPhone }}</view>
+                        <view style="width: 100%">
+                          <view class="flex" style="color: #000000">
+                            <view>设备编号:{{ da.deviceCode }}</view>
+                            <view class="deviceStatus" v-if="da.deviceStatus == 0" style="background-color: #aeaeae"> 离线 </view>
+                            <view class="deviceStatus" v-else-if="da.deviceStatus == 1" style="background-color: #12c100"> 正常 </view>
+                            <view class="deviceStatus" v-else-if="da.deviceStatus == 2" style="background-color: #ff1313"> 故障 </view>
+                            <view class="deviceStatus" v-else style="background-color: #0d88f0"> 告警 </view>
+                          </view>
+                          <view style="display: flex; font-size: 14px; color: #666666; margin: 10px 0">
+                            <view style="width: 50%; word-break: break-all">监测对象:{{ da.installAddress }}</view>
+                            <view style="width: 50%; word-break: break-all; padding-left: 10px">所属单位:{{ da.companyName }}</view>
+                          </view>
+                          <view style="display: flex; font-size: 14px; color: #666666">
+                            <view style="width: 50%; word-break: break-all">负责人:{{ da.linkPerson }}</view>
+                            <view style="width: 50%; word-break: break-all; padding-left: 10px">联系电话:{{ da.linkPhone }}</view>
+                          </view>
                         </view>
                       </view>
-                    </view>
-                  </template>
+                    </template>
 
-                  <view class="u-collapse-content">
-                    <!-- <view style="display: flex; flex-wrap: wrap; margin-left: 5%">
+                    <view class="u-collapse-content">
+                      <!-- <view style="display: flex; flex-wrap: wrap; margin-left: 5%">
                     <view style="width: 50%; height: 30px; line-height: 30px" v-for="ch in da.dataList" :key="ch">
                       <span>{{ ch.label }}:</span>
                       <span :style="ch.value === '正常' ? 'color:#12C100' : 'color:#FF0101'">{{ ch.value }}</span>
                     </view>
                   </view> -->
-                    <view style="display: flex; flex-wrap: wrap; margin-left: 5%">
-                      <view style="width: 50%; height: 30px; line-height: 30px" v-for="ch in da.dataList" :key="ch">
-                        <span>{{ ch.portName }}:</span>
-                        <span>{{ ch.portData }}</span>
+                      <view style="display: flex; flex-wrap: wrap; margin-left: 5%">
+                        <view style="width: 50%; height: 30px; line-height: 30px" v-for="ch in da.dataList" :key="ch">
+                          <span>{{ ch.portName }}:</span>
+                          <span>{{ ch.portData }}</span>
+                        </view>
                       </view>
                     </view>
-                  </view>
-                </u-collapse-item>
-              </u-collapse>
-            </view>
-          </uni-swipe-action-item>
-        </uni-swipe-action>
-      </template>
-    </oa-touch>
-  </scroll-view>
+                  </u-collapse-item>
+                </u-collapse>
+              </view>
+            </uni-swipe-action-item>
+          </uni-swipe-action>
+        </template>
+      </oa-touch>
+    </template>
+  </oa-scroll>
 </template>
 
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, watchEffect, getCurrentInstance, toRefs } from "vue";
-import { useStores, commonStores } from "@/store/modules/index";
-
+/*----------------------------------接口引入-----------------------------------*/
 import { dataRtList } from "@/api/business/mhxf/deviceManage";
-
-const commonStore = commonStores(); //全局公共Store
-
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
+const commonStore = commonStores(); //全局公共Store
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  deviceCode: "",
+  systemTypeNo: 5,
+  dataList: [],
+  tabsCurrent: 0,
+  tabsList: [
+    { id: 5, name: "电气火灾" },
+    { id: 4, name: "烟感" },
+    { id: 3, name: "水系统" },
+  ], //设备管理数据存储
+});
 
-const dataInput = ref("");
-
-const dataRes = ref(0);
-const systemTypeNo = ref(5);
-const dataList = ref([]); //设备管理数据存储
-
-const current = ref(0);
-const list = ref([
-  {
-    id: 5,
-    name: "电气火灾",
-  },
-  {
-    id: 4,
-    name: "烟感",
-  },
-  {
-    id: 3,
-    name: "水系统",
-    badge: {
-      // isDot: true,
-      // value: 5,
-    },
-  },
-]);
+const { deviceCode, systemTypeNo, dataList, tabsCurrent, tabsList } = toRefs(state);
 
 /**
  * @tabs点击事件
  */
 function tabsClick(e) {
-  current.value = e.index;
-  dataInput.value = "";
+  state.tabsCurrent = e.index;
+  state.deviceCode = "";
 }
 
 /**
@@ -124,50 +128,42 @@ function tabsClick(e) {
  */
 function touchChange(e) {
   if (e == "右滑") {
-    if (current.value >= 1) {
-      current.value--;
+    if (state.tabsCurrent >= 1) {
+      state.tabsCurrent--;
     } else {
-      current.value = list.value.length - 1;
+      state.tabsCurrent = state.tabsList.length - 1;
     }
   } else if (e == "左滑") {
-    if (current.value < list.value.length - 1) {
-      current.value++;
+    if (state.tabsCurrent < state.tabsList.length - 1) {
+      state.tabsCurrent++;
     } else {
-      current.value = 0;
+      state.tabsCurrent = 0;
     }
   }
 }
 
 function blur(e) {
-  if (dataInput.value) {
-    classifySearch({ systemType: 5, deviceCode: dataInput.value });
+  if (state.deviceCode) {
+    classifySearch({ systemType: 5, deviceCode: state.deviceCode });
   }
 }
 
 //分类信息查询 start
 function classifySearch(params) {
-  // classifyData.value = []
-
   dataRtList(params).then((res) => {
-    console.log("------");
-    console.log(res.data.records);
-
-    dataList.value = res.data.records;
+    state.dataList = res.data.records;
   });
 }
 // end
 function goSearch() {
-  if (current.value == 0) {
-    console.log(current.value);
+  if (state.tabsCurrent == 0) {
     systemTypeNo.value = 5;
-  } else if (current.value == 1) {
+  } else if (state.tabsCurrent == 1) {
     systemTypeNo.value = 1;
-    console.log(current.value);
-  } else if (current.value == 2) {
+  } else if (state.tabsCurrent == 2) {
     systemTypeNo.value = 2;
-    console.log(current.value);
   }
-  classifySearch({ systemType: systemTypeNo.value, deviceCode: dataInput.value, pageNum: "", pageSize: "" });
+  classifySearch({ systemType: systemTypeNo.value, deviceCode: state.deviceCode, pageNum: "", pageSize: "" });
 }
 
 watchEffect(() => {
@@ -187,15 +183,13 @@ function change(e) {
 // 自定义导航事件
 onNavigationBarButtonTap((e) => {
   if (e.float == "right") {
-    uni.navigateTo({
-      url: "/pages/business/zhaf/xunJian/collect/components/collectRecord",
-    });
+    proxy.$tab.navigateTo("/pages/business/zhaf/xunJian/collect/components/collectRecord");
   } else {
   }
 });
 
 onLoad((options) => {
-  // classifySearch({systemType:5,deviceCode:dataInput.value})
+  // classifySearch({systemType:5,deviceCode:state.deviceCode})
 });
 
 onShow(() => {

+ 67 - 240
src/pages/business/mhxf/fireReport/components/detailed.vue

@@ -57,18 +57,10 @@
         <uni-section class="block mb10" title="基本情况" type="line" titleFontSize="15px"></uni-section>
         <view class="tableType2 price2">
           <u-row>
-            <u-col span="3">
-              <view>单位名称</view>
-            </u-col>
-            <u-col span="3">
-              <view>上海XXX公司</view>
-            </u-col>
-            <u-col span="3">
-              <view>整体风险</view>
-            </u-col>
-            <u-col span="3">
-              <view>一般风险</view>
-            </u-col>
+            <u-col span="3"> <view>单位名称</view> </u-col>
+            <u-col span="3"> <view>上海XXX公司</view> </u-col>
+            <u-col span="3"> <view>整体风险</view> </u-col>
+            <u-col span="3"> <view>一般风险</view> </u-col>
           </u-row>
         </view>
         <view class="price2">
@@ -84,15 +76,9 @@
         </uni-section>
         <view class="tableType1 price2">
           <u-row>
-            <u-col span="2">
-              <view>序号</view>
-            </u-col>
-            <u-col span="5">
-              <view>整改项</view>
-            </u-col>
-            <u-col span="5">
-              <view>原因</view>
-            </u-col>
+            <u-col span="2"> <view>序号</view> </u-col>
+            <u-col span="5"> <view>整改项</view> </u-col>
+            <u-col span="5"> <view>原因</view> </u-col>
           </u-row>
           <u-row v-for="(co, index) in content3" :key="index">
             <u-col span="2">
@@ -112,18 +98,10 @@
         <uni-section class="block mb10" title="整体指数分析" type="line" titleFontSize="15px"> </uni-section>
         <view class="tableType1 price2">
           <u-row>
-            <u-col span="4">
-              <view>指数</view>
-            </u-col>
-            <u-col span="2.5">
-              <view>得分</view>
-            </u-col>
-            <u-col span="2.5">
-              <view>排名</view>
-            </u-col>
-            <u-col span="3">
-              <view>得分同比</view>
-            </u-col>
+            <u-col span="4"> <view>指数</view> </u-col>
+            <u-col span="2.5"> <view>得分</view> </u-col>
+            <u-col span="2.5"> <view>排名</view> </u-col>
+            <u-col span="3"> <view>得分同比</view> </u-col>
           </u-row>
           <u-row v-for="(co, index) in content4" :key="index">
             <u-col span="4">
@@ -172,24 +150,12 @@
 
         <view class="tableType1 price2">
           <u-row>
-            <u-col span="2.4">
-              <view>报告分类</view>
-            </u-col>
-            <u-col span="2.4">
-              <view>报告属性</view>
-            </u-col>
-            <u-col span="2.4">
-              <view>报告总数</view>
-            </u-col>
-            <u-col span="1.6">
-              <view>已处理</view>
-            </u-col>
-            <u-col span="1.6">
-              <view>未处理</view>
-            </u-col>
-            <u-col span="1.6">
-              <view>处置率</view>
-            </u-col>
+            <u-col span="2.4"> <view>报告分类</view> </u-col>
+            <u-col span="2.4"> <view>报告属性</view> </u-col>
+            <u-col span="2.4"> <view>报告总数</view> </u-col>
+            <u-col span="1.6"> <view>已处理</view> </u-col>
+            <u-col span="1.6"> <view>未处理</view> </u-col>
+            <u-col span="1.6"> <view>处置率</view> </u-col>
           </u-row>
           <u-row v-for="(co, index) in content5" :key="index">
             <u-col span="2.4">
@@ -228,95 +194,47 @@
 
         <view class="tableType2 price2">
           <u-row>
-            <u-col span="3">
-              <view>检查名称</view>
-            </u-col>
-            <u-col span="3">
-              <view>消防检查抽查</view>
-            </u-col>
-            <u-col span="3">
-              <view>检查时间</view>
-            </u-col>
-            <u-col span="3">
-              <view>2023-02-05</view>
-            </u-col>
+            <u-col span="3"> <view>检查名称</view> </u-col>
+            <u-col span="3"> <view>消防检查抽查</view> </u-col>
+            <u-col span="3"> <view>检查时间</view> </u-col>
+            <u-col span="3"> <view>2023-02-05</view> </u-col>
           </u-row>
           <u-row>
-            <u-col span="3">
-              <view>消防监督检查</view>
-            </u-col>
-            <u-col span="3">
-              <view>刘军、张磊</view>
-            </u-col>
-            <u-col span="3">
-              <view>是否合格</view>
-            </u-col>
-            <u-col span="3">
-              <view>不合格</view>
-            </u-col>
+            <u-col span="3"> <view>消防监督检查</view> </u-col>
+            <u-col span="3"> <view>刘军、张磊</view> </u-col>
+            <u-col span="3"> <view>是否合格</view> </u-col>
+            <u-col span="3"> <view>不合格</view> </u-col>
           </u-row>
           <u-row>
-            <u-col span="3">
-              <view>问题描述</view>
-            </u-col>
-            <u-col span="9">
-              <view>消防通道不同,机房堆有可燃物</view>
-            </u-col>
+            <u-col span="3"> <view>问题描述</view> </u-col>
+            <u-col span="9"> <view>消防通道不同,机房堆有可燃物</view> </u-col>
           </u-row>
           <u-row>
-            <u-col span="3">
-              <view>建议</view>
-            </u-col>
-            <u-col span="9">
-              <view>清理消防通道,机房可燃物清理恢复</view>
-            </u-col>
+            <u-col span="3"> <view>建议</view> </u-col>
+            <u-col span="9"> <view>清理消防通道,机房可燃物清理恢复</view> </u-col>
           </u-row>
         </view>
 
         <view class="tableType2 price2">
           <u-row>
-            <u-col span="3">
-              <view>检查名称</view>
-            </u-col>
-            <u-col span="3">
-              <view>消防检查抽查</view>
-            </u-col>
-            <u-col span="3">
-              <view>检查时间</view>
-            </u-col>
-            <u-col span="3">
-              <view>2023-02-05</view>
-            </u-col>
+            <u-col span="3"> <view>检查名称</view> </u-col>
+            <u-col span="3"> <view>消防检查抽查</view> </u-col>
+            <u-col span="3"> <view>检查时间</view> </u-col>
+            <u-col span="3"> <view>2023-02-05</view> </u-col>
           </u-row>
           <u-row>
-            <u-col span="3">
-              <view>消防监督检查</view>
-            </u-col>
-            <u-col span="3">
-              <view>刘军、张磊</view>
-            </u-col>
-            <u-col span="3">
-              <view>是否合格</view>
-            </u-col>
-            <u-col span="3">
-              <view>不合格</view>
-            </u-col>
+            <u-col span="3"> <view>消防监督检查</view> </u-col>
+            <u-col span="3"> <view>刘军、张磊</view> </u-col>
+            <u-col span="3"> <view>是否合格</view> </u-col>
+            <u-col span="3"> <view>不合格</view> </u-col>
           </u-row>
           <u-row>
-            <u-col span="3">
-              <view>问题描述</view>
-            </u-col>
-            <u-col span="9">
-              <view>消防通道不同,机房堆有可燃物</view>
-            </u-col>
+            <u-col span="3"> <view>问题描述</view> </u-col>
+            <u-col span="9"> <view>消防通道不同,机房堆有可燃物</view> </u-col>
           </u-row>
           <u-row>
-            <u-col span="3">
-              <view>建议</view>
-            </u-col>
-            <u-col span="9">
-              <view>清理消防通道,机房可燃物清理恢复</view>
-            </u-col>
+            <u-col span="3"> <view>建议</view> </u-col>
+            <u-col span="9"> <view>清理消防通道,机房可燃物清理恢复</view> </u-col>
           </u-row>
         </view>
       </view>
@@ -326,48 +244,24 @@
 
         <view class="tableType2 price2">
           <u-row>
-            <u-col span="3">
-              <view>火灾原因</view>
-            </u-col>
-            <u-col span="3">
-              <view>电气火灾</view>
-            </u-col>
-            <u-col span="3">
-              <view>发生时间</view>
-            </u-col>
-            <u-col span="3">
-              <view>2023-02-05</view>
-            </u-col>
+            <u-col span="3"> <view>火灾原因</view> </u-col>
+            <u-col span="3"> <view>电气火灾</view> </u-col>
+            <u-col span="3"> <view>发生时间</view> </u-col>
+            <u-col span="3"><view>2023-02-05</view> </u-col>
           </u-row>
           <u-row>
-            <u-col span="3">
-              <view>起火场所</view>
-            </u-col>
-            <u-col span="3">
-              <view>厂房</view>
-            </u-col>
-            <u-col span="3">
-              <view>火灾等级</view>
-            </u-col>
-            <u-col span="3">
-              <view>1</view>
-            </u-col>
+            <u-col span="3"><view>起火场所</view> </u-col>
+            <u-col span="3"> <view>厂房</view> </u-col>
+            <u-col span="3"><view>火灾等级</view> </u-col>
+            <u-col span="3"><view>1</view> </u-col>
           </u-row>
           <u-row>
-            <u-col span="3">
-              <view>火灾描述</view>
-            </u-col>
-            <u-col span="9">
-              <view>厂房电缆线路老化,使用功率较大电器引发火灾</view>
-            </u-col>
+            <u-col span="3"> <view>火灾描述</view> </u-col>
+            <u-col span="9"><view>厂房电缆线路老化,使用功率较大电器引发火灾</view> </u-col>
           </u-row>
           <u-row>
-            <u-col span="3">
-              <view>建议</view>
-            </u-col>
-            <u-col span="9">
-              <view>定期检查线路,做好消防安全教育,不违规使 用大功率电器</view>
-            </u-col>
+            <u-col span="3"><view>建议</view> </u-col>
+            <u-col span="9"> <view>定期检查线路,做好消防安全教育,不违规使 用大功率电器</view> </u-col>
           </u-row>
         </view>
       </view>
@@ -392,93 +286,26 @@ const dataList = reactive({
   content1: [],
   content2: [],
   content3: [
-    {
-      value: 1,
-      name1: "火灾报警系统",
-      name2: "存在报警未处置",
-    },
-    {
-      value: 2,
-      name1: "消防水系统",
-      name2: "存在报警未处置",
-    },
-    {
-      value: 3,
-      name1: "燃气、电气系统监测",
-      name2: "存在报警未处置",
-    },
-    {
-      value: 4,
-      name1: "组织制度情况",
-      name2: "制度不完善",
-    },
-    {
-      value: 5,
-      name1: "日常值班情况",
-      name2: "值班落实不到位",
-    },
-    {
-      value: 6,
-      name1: "预案、培训落地情况",
-      name2: "培训不到位",
-    },
-    {
-      value: 7,
-      name1: "微站实体化运行",
-      name2: "制度人员不到位",
-    },
+    { value: 1, name1: "火灾报警系统", name2: "存在报警未处置" },
+    { value: 2, name1: "消防水系统", name2: "存在报警未处置" },
+    { value: 3, name1: "燃气、电气系统监测", name2: "存在报警未处置" },
+    { value: 4, name1: "组织制度情况", name2: "制度不完善" },
+    { value: 5, name1: "日常值班情况", name2: "值班落实不到位" },
+    { value: 6, name1: "预案、培训落地情况", name2: "培训不到位" },
+    { value: 7, name1: "微站实体化运行", name2: "制度人员不到位" },
   ],
 
   content4: [
-    {
-      name1: "建筑整体指数",
-      name2: 10,
-      name3: 6,
-      name4: "-1",
-    },
-    {
-      name1: "火灾风险指数",
-      name2: 14,
-      name3: 5,
-      name4: "+5",
-    },
-    {
-      name1: "监督执法指数",
-      name2: 25,
-      name3: 1,
-      name4: "+2",
-    },
-    {
-      name1: "自主管理指数",
-      name2: 20,
-      name3: 3,
-      name4: "-1",
-    },
-    {
-      name1: "设施状况指数",
-      name2: 25,
-      name3: 8,
-      name4: "+3",
-    },
+    { name1: "建筑整体指数", name2: 10, name3: 6, name4: "-1" },
+    { name1: "火灾风险指数", name2: 14, name3: 5, name4: "+5" },
+    { name1: "监督执法指数", name2: 25, name3: 1, name4: "+2" },
+    { name1: "自主管理指数", name2: 20, name3: 3, name4: "-1" },
+    { name1: "设施状况指数", name2: 25, name3: 8, name4: "+3" },
   ],
 
   content5: [
-    {
-      name1: "火灾监测",
-      name2: "报警",
-      name3: 5,
-      name4: 2,
-      name5: 3,
-      name6: "40%",
-    },
-    {
-      name1: "消防水系统",
-      name2: "设备离线",
-      name3: 7,
-      name4: 3,
-      name5: 4,
-      name6: "42%",
-    },
+    { name1: "火灾监测", name2: "报警", name3: 5, name4: 2, name5: 3, name6: "40%" },
+    { name1: "消防水系统", name2: "设备离线", name3: 7, name4: 3, name5: 4, name6: "42%" },
   ],
 });
 

+ 31 - 49
src/pages/business/mhxf/fireReport/index.vue

@@ -13,19 +13,16 @@
     :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
   >
     <template #default>
-      <view class="fireReport">
-        <view class="reportContent">
-          <view class="contentDom" v-for="(li, index) in dataList" :key="index">
-            <view style="margin: auto 10px auto 0" @click="handleSelect()">
-              <u-image src="@/static/images/fireReport/icon1.png" width="13px" height="13px"></u-image>
-            </view>
-            <view style="margin: 0 auto 0 0" @click="handleSelect(li.reportPath)">
-              <view>{{ li.reportName }}</view>
-            </view>
-            <view>
-              <view style="color: #3c9cff; cursor: pointer" @click="handleDownload(li.reportPath)">下载报告</view>
-            </view>
+      <view class="fireReport-area">
+        <view class="fireReport-area_center" v-for="(li, index) in dataList" :key="index">
+          <view class="fireReport-area_center_img" @click="handleSelect()">
+            <u-image src="@/static/images/fireReport/icon1.png" width="13px" height="13px"></u-image>
           </view>
+          <view class="fireReport-area_center_title" @click="handleSelect(li.reportPath)">
+            <view>{{ li.reportName }}</view>
+          </view>
+
+          <view class="fireReport-area_center_button" @click="handleDownload(li.reportPath)">下载报告</view>
         </view>
       </view>
     </template>
@@ -35,12 +32,8 @@
 <script setup>
 import { onReady, onLoad, onShow, onReachBottom, onNavigationBarButtonTap } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, watchEffect, getCurrentInstance } from "vue";
-import { useStores, commonStores } from "@/store/modules/index";
-
 import { reportInfoList } from "@/api/business/mhxf/fireReport";
 
-const commonStore = commonStores(); //全局公共Store
-
 const { proxy } = getCurrentInstance();
 
 const dataRes = ref(true);
@@ -54,7 +47,6 @@ const total = ref(0);
  */
 function handleSelect(reportPath) {
   proxy.$tab.navigateTo("/pages/business/mhxf/fireReport/components/detailedPath?reportPath=" + reportPath);
-  // proxy.$tab.navigateTo("/pages/business/mhxf/fireReport/components/detailed");
 }
 
 /**
@@ -159,7 +151,6 @@ function load() {
  */
 function refresh() {
   pageSize.value = 20;
-  total.value = 0;
   reportInfoListApi();
 }
 
@@ -188,45 +179,36 @@ onMounted(() => {});
 </script>
 
 <style lang="scss">
-.fireReport {
+.fireReport-area {
   background-color: #f7f7f7;
-  .reportContent {
-    .contentDom {
-      display: flex;
-      height: 45px;
-      line-height: 45px;
-      background: #fff;
-      padding: 0 10px;
+
+  &_center {
+    display: flex;
+    height: 45px;
+    background: #fff;
+    padding: 0 10px;
+
+    &_img {
+      margin: auto 10px auto 0;
     }
 
-    > uni-view {
-      margin-bottom: 10px;
+    &_title {
+      margin: auto auto auto 0px;
     }
 
-    > uni-view:last-child {
-      margin-bottom: 0px;
+    &_button {
+      margin: auto 0px auto 0px;
+      color: #3c9cff;
+      cursor: pointer;
     }
   }
 
-  .progress-container {
-    position: fixed;
-    top: 0;
-    left: 0;
-    z-index: 99;
-    background: rgba(0, 0, 0, 0.2);
-    width: 750rpx;
-    height: 100vh;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    .progress-box {
-      background: #ffffff;
-      border-radius: 20rpx;
-      padding: 30rpx;
-      .text {
-        margin-bottom: 20rpx;
-      }
-    }
+  > uni-view {
+    margin-bottom: 10px;
+  }
+
+  > uni-view:last-child {
+    margin-bottom: 0px;
   }
 }
 </style>

+ 139 - 206
src/pages/business/mhxf/informationSelect/index.vue

@@ -1,116 +1,88 @@
 <template>
   <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
-    <u-tabs :list="list" :current="current" @click="tabsClick" lineColor="#333" :activeStyle="{ color: '#333' }" :inactiveStyle="{ color: '#909399' }"></u-tabs>
+    <u-tabs :list="list" :current="state.current" @click="tabsClick" lineColor="#333" :activeStyle="{ color: '#333' }" :inactiveStyle="{ color: '#909399' }"></u-tabs>
   </u-sticky>
 
-  <scroll-view class="bg-white scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name" style="padding-bottom: 44px">
-    <oa-touch class="informationSelect" @change="touchChange">
-      <template #content>
-        <uni-swipe-action>
-          <uni-swipe-action-item>
-            <!-- 各类查询 start -->
-            <view class="tableType3">
-              <u-input class="block mb10" v-model="dataInput" :placeholder="placeholderText" @blur="blur" shape="circle" prefixIcon="search" prefixIconStyle="color: #0c7bf9"> </u-input>
-              <u-empty v-if="!dataRes" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
-              <view class="con" v-if="current == 8">
-                <view class="time">{{ newTime }}</view>
-                <video src="http://file.usky.cn/statics/video/20230203.mp4" autoplay :controls="false" :show-center-play-btn="false" :loop="true" style="width: 100%"></video>
+  <oa-scroll
+    customClass="bg-white scroll-height"
+    :isSticky="true"
+    :refresherLoad="false"
+    :refresherLoadTitle="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <oa-touch class="informationSelect" @change="touchChange">
+        <template #content>
+          <uni-swipe-action>
+            <uni-swipe-action-item>
+              <!-- 各类查询 start -->
+              <view class="tableType3">
+                <u-input class="block mb10" v-model="state.dataInput" :placeholder="state.placeholderText" @blur="blur" shape="circle" prefixIcon="search" prefixIconStyle="color: #0c7bf9"> </u-input>
+                <u-empty v-if="state.classifyData == undefined" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
+                <view class="con" v-if="state.current == 8">
+                  <view class="time">{{ state.operateDate }}</view>
+                  <video src="http://file.usky.cn/statics/video/20230203.mp4" autoplay :controls="false" :show-center-play-btn="false" :loop="true" style="width: 100%"></video>
+                </view>
+                <u-row v-for="po in state.classifyData" :key="po" v-else>
+                  <u-col span="4">
+                    <view style="text-align: right; padding: 0px 5px 0px 5px">{{ po.title }}</view>
+                  </u-col>
+                  <u-col span="8">
+                    <view style="text-align: left; padding: 0px 5px 0px 5px">{{ po.value }}</view>
+                  </u-col>
+                </u-row>
               </view>
-              <u-row v-for="po in classifyData" :key="po" v-else>
-                <u-col span="4">
-                  <view style="text-align: right; padding: 0px 5px 0px 5px">{{ po.title }}</view>
-                </u-col>
-                <u-col span="8">
-                  <view style="text-align: left; padding: 0px 5px 0px 5px">{{ po.value }}</view>
-                </u-col>
-              </u-row>
-            </view>
-            <!-- 各类查询 end -->
-          </uni-swipe-action-item>
-        </uni-swipe-action>
-      </template>
-    </oa-touch>
-  </scroll-view>
+              <!-- 各类查询 end -->
+            </uni-swipe-action-item>
+          </uni-swipe-action>
+        </template>
+      </oa-touch>
+    </template>
+  </oa-scroll>
 </template>
 
 <script setup>
-import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
+/*----------------------------------依赖引入-----------------------------------*/
+import { onReady, onLoad, onUnload, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, watchEffect, getCurrentInstance } from "vue";
-import { useStores, commonStores } from "@/store/modules/index";
-
+/*----------------------------------接口引入-----------------------------------*/
 import { dataList } from "@/api/business/mhxf/informationSelect";
-
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
 const commonStore = commonStores(); //全局公共Store
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  dataInput: "",
+  current: 0,
+  classifyUrl: "",
+  placeholderText: "",
+  classifyData: undefined, //警情查询数据存储
+  operateDate: proxy.$common.formatterDateTime(new Date()), //操作时间
+});
 
-const dataInput = ref("");
-const current = ref(0);
-const classifyUrl = ref("");
-const placeholderText = ref("");
-const dataRes = ref(1);
-const classifyData = ref([]); //警情查询数据存储
+const inter = reactive({
+  interOperateDate: null,
+});
 
 const list = ref([
-  {
-    id: 1,
-    name: "警情查询",
-  },
-  {
-    id: 2,
-    name: "火灾查询",
-  },
-  {
-    id: 3,
-    name: "人员查询",
-    badge: {
-      // isDot: true,
-      // value: 5,
-    },
-  },
-  {
-    id: 4,
-    name: "车辆查询",
-    badge: {
-      // value: 5,
-    },
-  },
-  {
-    id: 5,
-    name: "站点查询",
-    badge: {
-      // value: 5,
-    },
-  },
-  {
-    id: 6,
-    name: "消火栓",
-    badge: {
-      // value: 5,
-    },
-  },
-
-  {
-    id: 7,
-    name: "重点单位",
-    badge: {
-      // value: 5,
-    },
-  },
-  {
-    id: 8,
-    name: "消防检查信息",
-    badge: {
-      // value: 5,
-    },
-  },
-  {
-    id: 9,
-    name: "视频监控",
-    badge: {
-      // value: 5,
-    },
-  },
+  { id: 1, name: "警情查询" },
+  { id: 2, name: "火灾查询" },
+  { id: 3, name: "人员查询" },
+  { id: 4, name: "车辆查询" },
+  { id: 5, name: "站点查询" },
+  { id: 6, name: "消火栓" },
+  { id: 7, name: "重点单位" },
+  { id: 8, name: "消防检查信息" },
+  { id: 9, name: "视频监控" },
 ]);
 
 /**
@@ -118,22 +90,22 @@ const list = ref([
  */
 function touchChange(e) {
   if (e == "右滑") {
-    if (current.value >= 1) {
-      current.value--;
+    if (state.current >= 1) {
+      state.current--;
     } else {
-      current.value = list.value.length - 1;
+      state.current = list.value.length - 1;
     }
   } else if (e == "左滑") {
-    if (current.value < list.value.length - 1) {
-      current.value++;
+    if (state.current < list.value.length - 1) {
+      state.current++;
     } else {
-      current.value = 0;
+      state.current = 0;
     }
   }
 }
 
 function blur(e) {
-  if (dataInput.value) {
+  if (state.dataInput) {
     goSearch();
   }
 }
@@ -142,75 +114,73 @@ function blur(e) {
  * @tabs点击事件
  */
 function tabsClick(e) {
-  current.value = e.index;
-  console.log(current.value);
-  dataInput.value = "";
-  dataRes.value = 1;
+  state.current = e.index;
+  state.dataInput = "";
 }
 
 function goSearch() {
-  if (current.value == 0) {
+  if (state.current == 0) {
     //警情查询
-    classifyUrl.value = "/service-fire/demPoliceInfo/page";
-    placeholderText.value = "请输入案件编号";
-    classifySearch(classifyUrl.value, {
-      caseCode: dataInput.value,
+    state.classifyUrl = "/service-fire/demPoliceInfo/page";
+    state.placeholderText = "请输入案件编号";
+    classifySearch(state.classifyUrl, {
+      caseCode: state.dataInput,
     });
-  } else if (current.value == 1) {
+  } else if (state.current == 1) {
     //火灾查询
-    placeholderText.value = "请输入火灾地址";
-    classifyUrl.value = "/service-fire/demFireStatisticsAttach/page";
-    classifySearch(classifyUrl.value, {
-      address: dataInput.value,
+    state.placeholderText = "请输入火灾地址";
+    state.classifyUrl = "/service-fire/demFireStatisticsAttach/page";
+    classifySearch(state.classifyUrl, {
+      address: state.dataInput,
     });
-  } else if (current.value == 2) {
+  } else if (state.current == 2) {
     //人员查询
-    placeholderText.value = "请输入值班人员名称";
-    classifyUrl.value = "/service-fire/unitBeOnDuty/list";
-    classifySearch(classifyUrl.value, {
-      name: dataInput.value,
+    state.placeholderText = "请输入值班人员名称";
+    state.classifyUrl = "/service-fire/unitBeOnDuty/list";
+    classifySearch(state.classifyUrl, {
+      name: state.dataInput,
     });
-  } else if (current.value == 3) {
+  } else if (state.current == 3) {
     //车辆信息
-    placeholderText.value = "请输入车牌号";
-    classifyUrl.value = "/service-fire/unitBeOnDuty/vehiclelist";
-    classifySearch(classifyUrl.value, {
-      licensePlate: dataInput.value,
+    state.placeholderText = "请输入车牌号";
+    state.classifyUrl = "/service-fire/unitBeOnDuty/vehiclelist";
+    classifySearch(state.classifyUrl, {
+      licensePlate: state.dataInput,
     });
-  } else if (current.value == 4) {
+  } else if (state.current == 4) {
     //站点查询
-    placeholderText.value = "请输入站点名称";
-    classifyUrl.value = "/service-fire/unitBeOnDuty/page";
-    classifySearch(classifyUrl.value, {
-      stationName: dataInput.value,
+    state.placeholderText = "请输入站点名称";
+    state.classifyUrl = "/service-fire/unitBeOnDuty/page";
+    classifySearch(state.classifyUrl, {
+      stationName: state.dataInput,
     });
-  } else if (current.value == 5) {
+  } else if (state.current == 5) {
     //消火栓
-    placeholderText.value = "请输入水源名称";
-    classifyUrl.value = "/service-fire/demWaterSource/waterSourceList";
-    classifySearch(classifyUrl.value, {
-      waterName: dataInput.value,
+    state.placeholderText = "请输入水源名称";
+    state.classifyUrl = "/service-fire/demWaterSource/waterSourceList";
+    classifySearch(state.classifyUrl, {
+      waterName: state.dataInput,
     });
-  } else if (current.value == 6) {
+  } else if (state.current == 6) {
     //重点单位
-    placeholderText.value = "请输入单位名称";
-    classifyUrl.value = "/service-fire/baseCompany/companyList";
-    classifySearch(classifyUrl.value, {
-      companyName: dataInput.value,
+    state.placeholderText = "请输入单位名称";
+    state.classifyUrl = "/service-fire/baseCompany/companyList";
+    classifySearch(state.classifyUrl, {
+      companyName: state.dataInput,
     });
-  } else if (current.value == 7) {
+  } else if (state.current == 7) {
     //消防检查信息
-    placeholderText.value = "请输入单位ID";
-    classifyUrl.value = "/service-fire/demFireInspect/fireInspectList";
-    classifySearch(classifyUrl.value, {
-      companyId: dataInput.value,
+    state.placeholderText = "请输入单位ID";
+    state.classifyUrl = "/service-fire/demFireInspect/fireInspectList";
+    classifySearch(state.classifyUrl, {
+      companyId: state.dataInput,
     });
-  } else if (current.value == 8) {
+  } else if (state.current == 8) {
     //消防检查信息
-    placeholderText.value = "";
-    // classifyUrl.value = "/service-fire/demFireInspect/fireInspectList";
-    // classifySearch(classifyUrl.value, {
-    //   companyId: dataInput.value,
+    state.placeholderText = "";
+    // state.classifyUrl = "/service-fire/demFireInspect/fireInspectList";
+    // classifySearch(state.classifyUrl, {
+    //   companyId: state.dataInput,
     // });
   }
 }
@@ -218,35 +188,23 @@ function goSearch() {
 //分类信息查询 start
 async function classifySearch(URL, params) {
   proxy.$modal.loading("加载中");
-  classifyData.value = [];
+  state.classifyData = [];
   dataList(URL, params).then((res) => {
     proxy.$modal.closeLoading();
     if (res.status == "SUCCESS") {
-      if (current.value == 2) {
-        if (res.data.length) {
-          dataRes.value = 1;
-        } else {
-          dataRes.value = 0;
-        }
+      if (state.current == 2) {
         var records = res.data[0][0];
-      } else if (current.value == 3) {
-        if (res.data.length) {
-          dataRes.value = 1;
-        } else {
-          dataRes.value = 0;
-        }
-
+      } else if (state.current == 3) {
         var records = res.data[0];
       } else {
-        if (res.data.total) {
-          dataRes.value = 1;
-        } else {
-          dataRes.value = 0;
-        }
         var records = res.data.records[0];
       }
 
-      switch (current.value) {
+      if (JSON.stringify(records) === "{}") {
+        state.classifyData = undefined;
+      }
+
+      switch (state.current) {
         case 0: //警情查询
           var classifyTitle = [
             "案件编号",
@@ -531,7 +489,7 @@ async function classifySearch(URL, params) {
         var obj = {};
         obj.title = classifyTitle[i];
         obj.value = classifyValue[i];
-        classifyData.value.push(obj);
+        state.classifyData.push(obj);
       }
     } else {
     }
@@ -543,41 +501,16 @@ watchEffect(() => {
   goSearch();
 });
 
-// start
-
-const newTime = ref("");
-function getNowTime() {
-  var date = new Date();
-  var time =
-    addZero(date.getFullYear()) +
-    "-" +
-    addZero(date.getMonth() + 1) +
-    "-" +
-    addZero(date.getDate()) +
-    " " +
-    addZero(date.getHours()) +
-    ":" +
-    addZero(date.getMinutes()) +
-    ":" +
-    addZero(date.getSeconds());
-  newTime.value = time;
-}
-//根据自己的需求,看要不要在时间不大于10的时候在前面补0,如果需要直接addZero(date.getMinutes()),其它与之相同,如果不需要删掉addZero()方法即可。
-//小于10的拼接上0字符串
-function addZero(s) {
-  return s < 10 ? "0" + s : s;
-}
-
-// end
-
 onLoad((options) => {
-  getNowTime(); //进入页面调用该方法获取当前时间
-  clearInterval(myTimeDisplay); //销毁之前定时器
-  var myTimeDisplay = setInterval(() => {
-    getNowTime(); //每秒更新一次时间
+  inter.interOperateDate = setInterval(() => {
+    state.operateDate = proxy.$common.formatterDateTime(new Date());
   }, 1000);
 });
 
+onUnload(() => {
+  clearInterval(inter.interOperateDate); //销毁之前定时器
+});
+
 onShow(() => {
   //调用系统主题颜色
   proxy.$settingStore.systemThemeColor([1]);

+ 131 - 118
src/pages/business/mhxf/needMatter/index.vue

@@ -1,27 +1,37 @@
 <template>
   <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
-    <u-tabs :list="list" :current="current" @click="tabsClick" lineColor="#333" :activeStyle="{ color: '#333' }" :inactiveStyle="{ color: '#909399' }"></u-tabs>
+    <u-tabs :list="state.tabsList" :current="state.current" @click="tabsClick" lineColor="#333" :activeStyle="{ color: '#333' }" :inactiveStyle="{ color: '#909399' }"></u-tabs>
   </u-sticky>
 
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name" style="padding-bottom: 44px">
-    <oa-touch class="needMatter" @change="touchChange">
-      <template #content>
-        <u-empty v-if="classifyData.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
-
-        <view class="content" v-else>
-          <u-collapse>
+  <oa-scroll
+    customClass="scroll-height"
+    :isSticky="true"
+    :refresherLoad="false"
+    :refresherLoadTitle="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <oa-touch class="needMatter" @change="touchChange">
+        <template #content>
+          <u-empty v-if="classifyData.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
+
+          <u-collapse v-else>
             <u-collapse-item v-for="(cl, index) in classifyData" :key="index">
               <template #title>
-                <view style="display: flex; line-height: 25px">
-                  <view style="padding-top: 4px">
-                    <u--image src="/static/images/needMatter/icon1.png" width="14px" height="15px"></u--image>
-                  </view>
-                  <view style="padding: 0 10px; white-space: nowrap; font-size: 16px">
+                <view class="collapse-header-area">
+                  <u--image class="collapse-header-area-image" src="/static/images/needMatter/icon1.png" width="13px" height="14px"></u--image>
+
+                  <view class="collapse-header-area-lable">
                     <view>待办通知</view>
                     <view>建议完成限期:</view>
-                    <view style="font-size: 14px; color: #666666">{{ cl.reformId }}</view>
+                    <view style="color: #666666">{{ cl.reformId }}</view>
                   </view>
-                  <view style="width: 100%; text-align: center; font-size: 16px">
+                  <view class="collapse-header-area-value">
                     <view
                       :style="{
                         color:
@@ -53,12 +63,12 @@
                       }}
                     </view>
                     <view style="text-align: left">{{ cl.limitTime }}</view>
-                    <view style="font-size: 14px; color: #666666">{{ cl.sendTime }}</view>
+                    <view style="color: #666666">{{ cl.sendTime }}</view>
                   </view>
                 </view>
               </template>
-              <view class="u-collapse-content">
-                <view class="tableType1" style="margin-bottom: 10px">
+              <view class="collapse-center-area">
+                <view class="tableType1 mb10">
                   <u-row>
                     <u-col span="2">
                       <view>序号</view>
@@ -83,31 +93,31 @@
                   </u-row>
                 </view>
 
-                <view v-if="cl.reformStatus == 1">
+                <view class="collapse-center-area-item" v-if="cl.reformStatus == 1">
                   <u-steps current="0" dot>
                     <u-steps-item style="text-align: center" title="已接收" :desc="cl.sendTime ? cl.sendTime.replace(' ', '\n') : ''"> </u-steps-item>
                     <u-steps-item style="text-align: center" title="进行中" :desc="cl.reformTime ? cl.reformTime.replace(' ', '\n') : ''"></u-steps-item>
                     <u-steps-item style="text-align: center" title="待审核" :desc="cl.reviewTime ? cl.reviewTime.replace(' ', '\n') : ''"></u-steps-item>
                   </u-steps>
 
-                  <view style="font-size: 14px; line-height: 20px; margin-top: 10px">
+                  <view class="collapse-center-area-item-child">
                     <u-button type="primary" text="去整改" shape="circle" @click="handleSubmit(cl, '去整改')" customStyle="width: 60px; height: 23px"></u-button>
                   </view>
                 </view>
 
-                <view v-if="cl.reformStatus == 2">
+                <view class="collapse-center-area-item" v-if="cl.reformStatus == 2">
                   <u-steps current="1" dot>
                     <u-steps-item style="text-align: center" title="已接收" :desc="cl.sendTime ? cl.sendTime.replace(' ', '\n') : ''"> </u-steps-item>
                     <u-steps-item style="text-align: center" title="进行中" :desc="cl.reformTime ? cl.reformTime.replace(' ', '\n') : ''"></u-steps-item>
                     <u-steps-item style="text-align: center" title="待审核" :desc="cl.reviewTime ? cl.reviewTime.replace(' ', '\n') : ''"></u-steps-item>
                   </u-steps>
 
-                  <view style="font-size: 14px; line-height: 20px; margin-top: 10px">
+                  <view class="collapse-center-area-item-child">
                     <u-button type="primary" text="填报" shape="circle" @click="handleSubmit(cl, '填报')" customStyle="width: 60px; height: 23px"></u-button>
                   </view>
                 </view>
 
-                <view v-if="cl.reformStatus == 3">
+                <view class="collapse-center-area-item" v-if="cl.reformStatus == 3">
                   <u-steps current="1" dot>
                     <u-steps-item style="text-align: center" title="已接收" :desc="cl.sendTime ? cl.sendTime.replace(' ', '\n') : ''"> </u-steps-item>
                     <u-steps-item style="text-align: center" title="待办完成" :desc="cl.reformTime ? cl.reformTime.replace(' ', '\n') : ''"></u-steps-item>
@@ -115,38 +125,38 @@
                   </u-steps>
                 </view>
 
-                <view v-if="cl.reformStatus == 4">
+                <view class="collapse-center-area-item" v-if="cl.reformStatus == 4">
                   <u-steps current="2" dot>
                     <u-steps-item style="text-align: center" title="已接收" :desc="cl.sendTime ? cl.sendTime.replace(' ', '\n') : ''"> </u-steps-item>
                     <u-steps-item style="text-align: center" title="待办完成" :desc="cl.reformTime ? cl.reformTime.replace(' ', '\n') : ''"></u-steps-item>
                     <u-steps-item style="text-align: center" title="审核不通过" :desc="cl.reviewTime ? cl.reviewTime.replace(' ', '\n') : ''" error></u-steps-item>
                   </u-steps>
 
-                  <view style="font-size: 14px; line-height: 20px; margin-top: 10px">
+                  <view class="collapse-center-area-item-child">
                     <view>备注:{{ cl.reviewRemark ? cl.reviewRemark : "无" }}</view>
                   </view>
 
-                  <view style="font-size: 14px; line-height: 20px; margin-top: 10px">
+                  <view class="collapse-center-area-item-child">
                     <u-button type="primary" text="去整改" shape="circle" @click="handleSubmit(cl, '去整改')" customStyle="width: 60px; height: 23px"></u-button>
                   </view>
                 </view>
 
-                <view v-if="cl.reformStatus == 5">
+                <view class="collapse-center-area-item" v-if="cl.reformStatus == 5">
                   <u-steps current="2" dot>
                     <u-steps-item style="text-align: center" title="已接收" :desc="cl.sendTime ? cl.sendTime.replace(' ', '\n') : ''"> </u-steps-item>
                     <u-steps-item style="text-align: center" title="待办完成" :desc="cl.reformTime ? cl.reformTime.replace(' ', '\n') : ''"></u-steps-item>
                     <u-steps-item style="text-align: center" title="审核通过" :desc="cl.reviewTime ? cl.reviewTime.replace(' ', '\n') : ''"></u-steps-item>
                   </u-steps>
 
-                  <view style="font-size: 14px; line-height: 20px; margin-top: 10px">
+                  <view class="collapse-center-area-item-child">
                     <view style="display: flex">
                       <view style="white-space: nowrap">整改资料:</view>
                       <view style="width: 100%">
                         <view style="display: flex" v-for="(i, index) in 5" :key="index">
                           <view>{{ cl["reformPathName" + (index + 1)] }}</view>
                           <!-- <view style="margin: auto 0 auto auto">
-                        <u--image src="/static/images/needMatter/icon2.png" width="15px" height="15px"></u--image>
-                      </view> -->
+                            <u--image src="/static/images/needMatter/icon2.png" width="15px" height="15px"></u--image>
+                          </view> -->
                         </view>
                       </view>
                     </view>
@@ -160,81 +170,66 @@
 
           <view>
             <u-modal
-              :show="modalShow"
+              :show="state.modalShow"
               title="填报(火灾报警系统)"
               :showCancelButton="true"
               :showConfirmButton="true"
               :closeOnClickOverlay="true"
-              @close="modalShow = false"
-              @cancel="modalShow = false"
+              @close="state.modalShow = false"
+              @cancel="state.modalShow = false"
               @confirm="handleConfirm"
             >
               <view style="width: 100%">
-                <uni-section class="block mb10" title="图片上传:" type="line">
-                  <u-upload :fileList="fileList" name="6" @afterRead="afterRead" multiple :maxCount="5" width="80" height="80"> </u-upload>
+                <uni-section class="block mb20" title="图片上传:" type="line">
+                  <u-upload :fileList="state.fileList" name="6" @afterRead="afterRead" multiple :maxCount="5" width="80" height="80"> </u-upload>
                 </uni-section>
-                <uni-section class="block mb10" title="备注:" type="line">
-                  <u--textarea v-model="textValue" placeholder="请输入内容"></u--textarea>
+                <uni-section class="block mb20" title="备注:" type="line">
+                  <u-textarea v-model="state.textValue" placeholder="请输入内容"></u-textarea>
                 </uni-section>
               </view>
             </u-modal>
           </view>
-        </view>
-      </template>
-    </oa-touch>
-  </scroll-view>
+        </template>
+      </oa-touch>
+    </template>
+  </oa-scroll>
 </template>
 
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
-import { ref, onMounted, inject, shallowRef, reactive, watchEffect, getCurrentInstance } from "vue";
-import { useStores, commonStores } from "@/store/modules/index";
-
+import { ref, toRefs, onMounted, inject, shallowRef, reactive, watchEffect, getCurrentInstance } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
 import { mobileScheduleList, updateMobileReformStatus, uploadAvatar, addReformMaterial } from "@/api/business/mhxf/needMatter";
-
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
 const useStore = useStores();
 const commonStore = commonStores(); //全局公共Store
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  current: 0,
+  classifyData: [],
+  modalShow: false,
+
+  arrList: {},
+  fileList: [],
+  textValue: "",
+
+  tabsList: [
+    { id: 0, name: "全部" },
+    { id: 1, name: "已接收" },
+    { id: 2, name: "进行中" },
+    { id: 3, name: "待办完成" },
+    { id: 4, name: "审核不通过" },
+    { id: 5, name: "审核通过" },
+  ],
+});
 
-const current = ref(0);
-const classifyData = ref([]);
-const modalShow = ref(false);
-
-const arrayList = ref({});
-const fileList = ref([]);
-const textValue = ref("");
-
-const list = ref([
-  {
-    id: 0,
-    name: "全部",
-  },
-  {
-    id: 1,
-    name: "已接收",
-  },
-  {
-    id: 2,
-    name: "进行中",
-    badge: {
-      // isDot: true,
-      // value: 5,
-    },
-  },
-  {
-    id: 3,
-    name: "待办完成",
-  },
-  {
-    id: 4,
-    name: "审核不通过",
-  },
-  {
-    id: 5,
-    name: "审核通过",
-  },
-]);
+const { classifyData } = toRefs(state);
 
 /**
  * @填报
@@ -250,10 +245,10 @@ function handleSubmit(el, type) {
       }
     });
   } else if (type === "填报") {
-    arrayList.value = el;
-    fileList.value = [];
-    textValue.value = "";
-    modalShow.value = true;
+    state.arrList = el;
+    state.fileList = [];
+    state.textValue = "";
+    state.modalShow = true;
   }
 }
 
@@ -265,9 +260,9 @@ function handleConfirm() {
   proxy.$modal.loading("加载中");
 
   let params = {
-    reformId: arrayList.value.reformId, //整改单编号
-    reformPerson: useStore.$state.nickName, //整改提交人
-    reformRemark: textValue.value, //整改备注
+    reformId: state.arrList.reformId, //整改单编号
+    reformPerson: useStore.nickName, //整改提交人
+    reformRemark: state.textValue, //整改备注
     reformPath1: "", //整改相关图片或文件路径1
     reformPath2: "", //整改相关图片或文件路径2
     reformPath3: "", //整改相关图片或文件路径3
@@ -275,18 +270,15 @@ function handleConfirm() {
     reformPath5: "", //整改相关图片或文件路径5
   };
 
-  fileList.value.forEach((el, index) => {
+  state.fileList.forEach((el, index) => {
     params[`reformPath${index + 1}`] = el.url;
   });
 
   addReformMaterial(params).then((res) => {
     if (res.status === "SUCCESS") {
       proxy.$modal.closeLoading();
-
       proxy.$modal.msgSuccess("提交成功");
-
-      modalShow.value = false;
-
+      state.modalShow = false;
       goSearch();
     }
   });
@@ -328,7 +320,7 @@ function afterRead(event) {
 function uploadFilePromise(el) {
   let data = { name: "file", filePath: el.url };
   uploadAvatar(data).then((res) => {
-    fileList.value.push(res.data);
+    state.fileList.push(res.data);
   });
 }
 
@@ -337,17 +329,17 @@ function uploadFilePromise(el) {
  */
 function touchChange(e) {
   if (e == "右滑") {
-    if (current.value >= 1) {
-      current.value--;
+    if (state.current >= 1) {
+      state.current--;
     } else {
-      current.value = list.value.length - 1;
+      state.current = state.tabsList.length - 1;
     }
     goSearch();
   } else if (e == "左滑") {
-    if (current.value < list.value.length - 1) {
-      current.value++;
+    if (state.current < state.tabsList.length - 1) {
+      state.current++;
     } else {
-      current.value = 0;
+      state.current = 0;
     }
     goSearch();
   }
@@ -357,7 +349,7 @@ function touchChange(e) {
  * @tabs点击事件
  */
 function tabsClick(e) {
-  current.value = e.index;
+  state.current = e.index;
   goSearch();
 }
 
@@ -368,7 +360,7 @@ function goSearch() {
   classifySearch({
     companyId: "", //	单位Id
     reformId: "", //整改单编号
-    reformStatus: current.value == 0 ? "" : current.value, //整改状态(1 已接收、2 整改中、3 整改完成、4 审核不通过、5 审核通过)
+    reformStatus: state.current, //整改状态(1 已接收、2 整改中、3 整改完成、4 审核不通过、5 审核通过)
     pageNum: 1, //当前页
     pageSize: 20, //每页条数
   });
@@ -427,21 +419,42 @@ onMounted(() => {});
 </script>
 
 <style lang="scss">
-.uni-swipe {
-  overflow: visible;
-}
-.is-selected {
-  color: #1989fa;
-}
-
 .needMatter {
   height: calc(100vh - 88px);
-  .content {
-    // padding: 10px;
-    .u-collapse {
-      .u-collapse-item {
-        background: #ffffff;
-        margin-bottom: 10px;
+
+  .u-collapse {
+    .u-collapse-item {
+      background: #ffffff;
+      margin-bottom: 10px;
+
+      .collapse-header-area {
+        display: flex;
+        line-height: 25px;
+        font-size: 14px;
+
+        &-image {
+          padding-top: 2px;
+        }
+
+        &-lable {
+          padding: 0 10px;
+          white-space: nowrap;
+        }
+
+        &-value {
+          width: 100%;
+          text-align: center;
+        }
+      }
+
+      .collapse-center-area {
+        &-item {
+          &-child {
+            font-size: 14px;
+            line-height: 20px;
+            margin-top: 10px;
+          }
+        }
       }
     }
   }

+ 77 - 308
src/pages/business/mhxf/unitInfoCollection/index.vue

@@ -1,6 +1,15 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view id="unitInfoCollection">
+  <oa-scroll
+    customClass="unitInfoCollection-container scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
       <view>
         <u-notice-bar text="注:信息提交后不可修改,提交前请核对填写是否有误" :duration="7000" color="#FF0000" bgColor="#FFFFFF"></u-notice-bar>
       </view>
@@ -251,7 +260,7 @@
           </view>
           <view class="app-button-fixed">
             <view class="app-flex">
-              <u-button class="app-buttom" style="margin-right: 15px" @click="handleSubmit('上一步')" shape="circle"> 上一步 </u-button>
+              <u-button class="app-buttom" @click="handleSubmit('上一步')" shape="circle"> 上一步 </u-button>
               <u-button class="app-buttom" type="primary" @click="handleSubmit('提交')" shape="circle"> 提交 </u-button>
             </view>
           </view>
@@ -300,23 +309,25 @@
           <view style="text-align: center; font-size: 13px; color: #ff0000">注:“修改”则点击修改,“新增”将提交一条新的记录,如需“取消”操作可点击空白区域</view>
         </view>
       </u-modal>
-    </view>
-  </scroll-view>
+    </template>
+  </oa-scroll>
 </template>
 
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onLoad, onShow, onHide, onLaunch, onReady } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, toRefs, getCurrentInstance } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { companyByNameSelect, addBaseCompany, delBaseBuild, delBaseBuildExtinguish } from "@/api/business/mhxf/unitInfoCollection";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
 import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
 import { getToken } from "@/utils/auth";
-
-import { companyByNameSelect, addBaseCompany, delBaseBuild, delBaseBuildExtinguish } from "@/api/business/mhxf/unitInfoCollection";
-
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
 const commonStore = commonStores();
-
-const checkboxValue = ref([]);
+/*----------------------------------变量声明-----------------------------------*/
 
 //基本信息-单位使用性质下拉数据存储
 const companyNatureList = ref([
@@ -473,185 +484,45 @@ const dataList = reactive({
   },
 
   rules: {
-    companyName: [
-      {
-        required: true,
-        message: "请输入营业执照单位名称",
-        trigger: ["blur", "change"],
-      },
-    ],
+    companyName: [{ required: true, message: "请输入营业执照单位名称", trigger: ["blur", "change"] }],
     organization: [
-      {
-        required: true,
-        message: "请输入统一社会信用代码",
-        trigger: ["blur", "change"],
-      },
-      {
-        type: "string",
-        min: 18,
-        required: true,
-        message: "请输入18位统一社会信用代码",
-        trigger: ["change"],
-      },
-    ],
-    delegateName: [
-      {
-        required: true,
-        message: "请输入法人代表",
-        trigger: ["blur", "change"],
-      },
-    ],
-    streetTown: [
-      {
-        required: true,
-        message: "请选择所属街镇",
-        trigger: ["blur", "change"],
-      },
-    ],
-    address: [
-      {
-        required: true,
-        message: "请输入单位地址",
-        trigger: ["blur", "change"],
-      },
+      { required: true, message: "请输入统一社会信用代码", trigger: ["blur", "change"] },
+      { type: "string", min: 18, required: true, message: "请输入18位统一社会信用代码", trigger: ["change"] },
     ],
+    delegateName: [{ required: true, message: "请输入法人代表", trigger: ["blur", "change"] }],
+    streetTown: [{ required: true, message: "请选择所属街镇", trigger: ["blur", "change"] }],
+    address: [{ required: true, message: "请输入单位地址", trigger: ["blur", "change"] }],
     fireManagePhone: [
-      {
-        required: true,
-        message: "请输入消防管理人电话",
-        trigger: ["blur", "change"],
-      },
-      {
-        type: "string",
-        min: 11,
-        required: true,
-        message: "请输入正确11位消防管理人电话",
-        pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
-        trigger: ["blur", "change"],
-      },
-    ],
-    foundTime: [
-      {
-        required: true,
-        message: "请选择成立时间",
-        trigger: ["blur", "change"],
-      },
-    ],
-    companyNature: [
-      {
-        required: true,
-        message: "请选择单位使用性质",
-        trigger: ["blur", "change"],
-      },
-    ],
-    birthCert: [
-      {
-        required: true,
-        message: "请选择产证",
-        trigger: ["blur", "change"],
-      },
-    ],
-    buildArea: [
-      {
-        required: true,
-        message: "请输入单位建筑面积",
-        trigger: ["blur", "change"],
-      },
+      { required: true, message: "请输入消防管理人电话", trigger: ["blur", "change"] },
+      { type: "string", min: 11, required: true, message: "请输入正确11位消防管理人电话", pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, trigger: ["blur", "change"] },
     ],
+    foundTime: [{ required: true, message: "请选择成立时间", trigger: ["blur", "change"] }],
+    companyNature: [{ required: true, message: "请选择单位使用性质", trigger: ["blur", "change"] }],
+    birthCert: [{ required: true, message: "请选择产证", trigger: ["blur", "change"] }],
+    buildArea: [{ required: true, message: "请输入单位建筑面积", trigger: ["blur", "change"] }],
 
     baseBuildList: [],
   },
 
   baseBuildListRules: {
     baseBuild: {
-      buildName: [
-        {
-          required: true,
-          message: "请输入建筑名称",
-          trigger: ["blur", "change"],
-        },
-      ],
-      address: [
-        {
-          required: true,
-          message: "请输入建筑地址",
-          trigger: ["blur", "change"],
-        },
-      ],
-      buildStructure: [
-        {
-          required: true,
-          message: "请选择建筑结构",
-          trigger: ["blur", "change"],
-        },
-      ],
-      buildHigh: [
-        {
-          type: "number",
-          required: true,
-          message: "请输入建筑高度",
-          trigger: ["blur", "change"],
-        },
-      ],
-      aboveFloor: [
-        {
-          type: "number",
-          required: true,
-          message: "请输入地上层数",
-          trigger: ["blur", "change"],
-        },
-      ],
-      buildArea: [
-        {
-          type: "number",
-          required: true,
-          message: "请输入建筑面积",
-          trigger: ["blur", "change"],
-        },
-      ],
-      completeYear: [
-        {
-          required: true,
-          message: "请选择建成年份",
-          trigger: ["blur", "change"],
-        },
-      ],
-      useCharacter: [
-        {
-          required: true,
-          message: "请输入使用性质",
-          trigger: ["blur", "change"],
-        },
-      ],
-
-      fireFacilitySystem: [
-        {
-          type: "array",
-          required: true,
-          message: "请选择消防设施设置",
-          trigger: ["change"],
-        },
-      ],
+      buildName: [{ required: true, message: "请输入建筑名称", trigger: ["blur", "change"] }],
+      address: [{ required: true, message: "请输入建筑地址", trigger: ["blur", "change"] }],
+      buildStructure: [{ required: true, message: "请选择建筑结构", trigger: ["blur", "change"] }],
+      buildHigh: [{ type: "number", required: true, message: "请输入建筑高度", trigger: ["blur", "change"] }],
+      aboveFloor: [{ type: "number", required: true, message: "请输入地上层数", trigger: ["blur", "change"] }],
+      buildArea: [{ type: "number", required: true, message: "请输入建筑面积", trigger: ["blur", "change"] }],
+      completeYear: [{ required: true, message: "请选择建成年份", trigger: ["blur", "change"] }],
+      useCharacter: [{ required: true, message: "请输入使用性质", trigger: ["blur", "change"] }],
+
+      fireFacilitySystem: [{ type: "array", required: true, message: "请选择消防设施设置", trigger: ["change"] }],
     },
     baseBuildExtinguishList: [],
   },
 
   baseBuildExtinguishRules: {
-    extinguishType: [
-      {
-        required: true,
-        message: "请选择灭火器类型",
-        trigger: ["blur", "change"],
-      },
-    ],
-    extinguishNum: [
-      {
-        type: "number",
-        required: true,
-        message: "请输入灭火器数量",
-        trigger: ["blur", "change"],
-      },
-    ],
+    extinguishType: [{ required: true, message: "请选择灭火器类型", trigger: ["blur", "change"] }],
+    extinguishNum: [{ type: "number", required: true, message: "请输入灭火器数量", trigger: ["blur", "change"] }],
   },
 
   pagingBool: true,
@@ -691,8 +562,6 @@ const {
   modalShow,
 } = toRefs(dataList);
 
-const uForm = ref(null);
-const uForm1 = ref(null);
 const newCompanyName = ref("");
 const scanBool = ref(false);
 
@@ -731,14 +600,14 @@ function handleSubmit(value) {
   if (value === "上一步") {
     pagingBool.value = true;
   } else if (value === "下一步") {
-    uForm.value
+    proxy.$refs["uForm"]
       .validate()
       .then((res) => {
-        uni.$u.toast("校验通过");
+        proxy.$modal.msg("校验通过");
         pagingBool.value = false;
       })
       .catch((errors) => {
-        uni.$u.toast("校验失败");
+        proxy.$modal.msg("校验失败");
       });
   } else if (value === "提交") {
     if (newCompanyName.value == "") {
@@ -755,10 +624,10 @@ function handleSubmit(value) {
 function handleSubmitApi(value) {
   let param = {};
 
-  uForm1.value
+  proxy.$refs["uForm1"]
     .validate()
     .then((res) => {
-      uni.$u.toast("校验通过");
+      proxy.$modal.msg("校验通过");
 
       param = {
         baseCompany: {
@@ -853,9 +722,7 @@ function handleSubmitApi(value) {
           if (scanBool.value) {
             proxy.$tab.reLaunch(`/pages/common/success/index?codeName=提交成功&showNow=${false}`);
           } else {
-            uni.showToast({
-              title: "提交成功",
-            });
+            proxy.$modal.msg("提交成功");
             setTimeout(() => {
               proxy.$tab.reLaunch("/pages/index");
             }, 2000);
@@ -864,7 +731,7 @@ function handleSubmitApi(value) {
       });
     })
     .catch((errors) => {
-      uni.$u.toast("校验失败");
+      proxy.$modal.msg("校验失败");
     });
 }
 
@@ -884,90 +751,20 @@ function handleAction(value, index, ind) {
 
     actionsList.value = [
       [
-        {
-          name: "江川路街道",
-          value: 1201,
-          x: 121.399126538181,
-          y: 31.0099719391863,
-        },
-        {
-          name: "新虹街道",
-          value: 1217,
-          x: 121.319329296294,
-          y: 31.1983901916889,
-        },
-        {
-          name: "古美路街道",
-          value: 1206,
-          x: 121.388451866936,
-          y: 31.1478233480159,
-        },
-        {
-          name: "浦锦街道",
-          value: 1218,
-          x: 121.483929120352,
-          y: 31.089967318558,
-        },
-        {
-          name: "浦江镇",
-          value: 1215,
-          x: 121.524058543447,
-          y: 31.0540039472667,
-        },
-        {
-          name: "吴泾镇",
-          value: 1213,
-          x: 121.454076463728,
-          y: 31.04860402113,
-        },
-        {
-          name: "马桥镇",
-          value: 1214,
-          x: 121.352680027718,
-          y: 31.0213512298508,
-        },
-        {
-          name: "颛桥镇",
-          value: 1209,
-          x: 121.40607138504,
-          y: 31.0612972443508,
-        },
-        {
-          name: "莘庄镇",
-          value: 1207,
-          x: 121.37064864047,
-          y: 31.1154549548722,
-        },
-        {
-          name: "梅陇镇",
-          value: 1212,
-          x: 121.421346814491,
-          y: 31.1069718313722,
-        },
-        {
-          name: "七宝镇",
-          value: 1208,
-          x: 121.350366186317,
-          y: 31.1553292680362,
-        },
-        {
-          name: "虹桥镇",
-          value: 1211,
-          x: 121.37956256207,
-          y: 31.1806219953212,
-        },
-        {
-          name: "华漕镇",
-          value: 1210,
-          x: 121.277541517147,
-          y: 31.2289121171624,
-        },
-        {
-          name: "莘庄工业区",
-          value: 1216,
-          x: 121.376508452784,
-          y: 31.0678185611843,
-        },
+        { name: "江川路街道", value: 1201, x: 121.399126538181, y: 31.0099719391863 },
+        { name: "新虹街道", value: 1217, x: 121.319329296294, y: 31.1983901916889 },
+        { name: "古美路街道", value: 1206, x: 121.388451866936, y: 31.1478233480159 },
+        { name: "浦锦街道", value: 1218, x: 121.483929120352, y: 31.089967318558 },
+        { name: "浦江镇", value: 1215, x: 121.524058543447, y: 31.0540039472667 },
+        { name: "吴泾镇", value: 1213, x: 121.454076463728, y: 31.04860402113 },
+        { name: "马桥镇", value: 1214, x: 121.352680027718, y: 31.0213512298508 },
+        { name: "颛桥镇", value: 1209, x: 121.40607138504, y: 31.0612972443508 },
+        { name: "莘庄镇", value: 1207, x: 121.37064864047, y: 31.1154549548722 },
+        { name: "梅陇镇", value: 1212, x: 121.421346814491, y: 31.1069718313722 },
+        { name: "七宝镇", value: 1208, x: 121.350366186317, y: 31.1553292680362 },
+        { name: "虹桥镇", value: 1211, x: 121.37956256207, y: 31.1806219953212 },
+        { name: "华漕镇", value: 1210, x: 121.277541517147, y: 31.2289121171624 },
+        { name: "莘庄工业区", value: 1216, x: 121.376508452784, y: 31.0678185611843 },
       ],
     ];
 
@@ -984,52 +781,24 @@ function handleAction(value, index, ind) {
 
   if (value == "单位使用性质") {
     actionTitle.value = "单位使用性质";
-
     actionsList.value = companyNatureList.value;
-
     actionDefaultIndex.value = 0;
   }
 
   if (value == "产证") {
     actionTitle.value = "产证";
-
     actionsList.value = [
       [
-        {
-          value: 1,
-          name: "商业服务业设施用地(商业设施、商务设施、娱乐康体设施、公用设施营业网点、其它服务设施等)",
-        },
-        {
-          value: 2,
-          name: "工业用地",
-        },
-        {
-          value: 3,
-          name: "居住用地",
-        },
-        {
-          value: 4,
-          name: "公共管理与公共服务用地(行政办公、文化设施、教育科研、体育、医疗卫生、社会福利设施、文物古迹、外事、宗教设施等",
-        },
-        {
-          value: 5,
-          name: "物流仓储用地",
-        },
-        {
-          value: 6,
-          name: "道路与交通设施用地",
-        },
-        {
-          value: 7,
-          name: "公用设施用地",
-        },
-        {
-          value: 8,
-          name: "绿地与广场用地",
-        },
+        { value: 1, name: "商业服务业设施用地(商业设施、商务设施、娱乐康体设施、公用设施营业网点、其它服务设施等)" },
+        { value: 2, name: "工业用地" },
+        { value: 3, name: "居住用地" },
+        { value: 4, name: "公共管理与公共服务用地(行政办公、文化设施、教育科研、体育、医疗卫生、社会福利设施、文物古迹、外事、宗教设施等" },
+        { value: 5, name: "物流仓储用地" },
+        { value: 6, name: "道路与交通设施用地" },
+        { value: 7, name: "公用设施用地" },
+        { value: 8, name: "绿地与广场用地" },
       ],
     ];
-
     actionDefaultIndex.value = 0;
   }
 
@@ -1194,7 +963,7 @@ function handleDateTime(value, index, time) {
  * @确定按钮事件
  */
 function timeSubmit(data) {
-  let time = commonStore.formatterDateTime(data.value);
+  let time = proxy.$common.formatterDateTime(data.value);
   let timeData = time.split(" ")[0];
   if (timeTitle.value == "成立时间") {
     form.value.foundTime = timeData;
@@ -1272,7 +1041,7 @@ onShow(() => {
 </script>
 
 <style lang="scss">
-#unitInfoCollection {
+.unitInfoCollection-container {
   .centerOne,
   .centerTwo {
     .title {

+ 0 - 95
src/pages/business/videoMonitor/index.vue

@@ -1,95 +0,0 @@
-<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>
-  </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([]);
-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;
-        }
-      });
-    }
-  });
-}
-
-function handleToDetails(productCode, productName) {
-  proxy.$tab.navigateTo(`/pages/business/videoMonitor/videoList?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>

+ 0 - 165
src/pages/business/videoMonitor/videoDetail.vue

@@ -1,165 +0,0 @@
-<template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view class="alarmDetails-container">
- 
-
-      <view class="bg-white p15 mb15">
-        <uni-section class="block mb10" :title="'设备名称:'+deviceName" type="line"></uni-section>
-        <!-- <view class="mb15">{{ deviceName}}</view> -->
-        <view class="tableType3 padding-0">
-          
-
-          <video id="myVideo" :src="videoUrl" style="width:100%" loop="loop" autoplay="autoplay"></video>
-
-        </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 { page, fill } from "@/api/business/fireIot/repairManage.js";
-
-const { proxy } = getCurrentInstance();
-const useStore = useStores();
-const commonStore = commonStores();
-
-
-const dataArray = ref({});
-const dataList = ref([
-  {
-    title: "报修日期",
-    value: "",
-  },
-  {
-    title: "项目名称",
-    value: "",
-  },
-  {
-    title: "报修人",
-    value: "",
-  },
-  {
-    title: "报修电话",
-    value: "",
-  },
-  {
-    title: "问题描述",
-    value: "",
-  },
-  {
-    title: "报修地址",
-    value: "",
-  },
-]);
-
-const deviceName = ref("");
-const pageSize = ref(20);
-const current = ref(1);
-const total = ref(0);
-const videoUrl=ref('http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8');
-
-/**
- * @页面初始化
- */
-function init() {
-  selectListApi();
-}
-
-/**
- * @列表查询
- * @api接口查询
- */
-function selectListApi() {
-  page({
-    repairCode: repairCode.value,
-    current: current.value,
-    size: pageSize.value,
-  }).then((requset) => {
-    if (requset.status === "SUCCESS") {
-      dataArray.value = requset.data.records[0];
-      dataArray.value.handleName = requset.data.records[0].handleName ? requset.data.records[0].handleName : useStore.nickName ? useStore.nickName : "";
-      dataArray.value.handleContent = requset.data.records[0].handleContent ? requset.data.records[0].handleContent : "";
-
-      dataList.value[0].value = requset.data.records[0].createTime ? requset.data.records[0].createTime.replace("T", " ") : requset.data[0].createTime;
-      dataList.value[1].value = requset.data.records[0].projectName;
-      dataList.value[2].value = requset.data.records[0].reflectName;
-      dataList.value[3].value = requset.data.records[0].reflectPhone;
-      dataList.value[4].value = requset.data.records[0].repairContent;
-      dataList.value[5].value = requset.data.records[0].projectAddress;
-
-      if (requset.data.records[0].repairStatus === 2) {
-        dataList.value.push(
-          {
-            title: "评分",
-            value: 0,
-          },
-          {
-            title: "评分内容",
-            value: "",
-          }
-        );
-        dataList.value[6].value = requset.data.records[0].score ? requset.data.records[0].score : 0;
-        dataList.value[7].value = requset.data.records[0].appraiseContent;
-      }
-
-      total.value = requset.data.total;
-    }
-  });
-}
-
-/**
- * @提交
- */
-function handleSubmit(type) {
-  if (type == 1) {
-    proxy.$tab.navigateBack(1);
-  } else {
-    if (!dataArray.value.handleName) {
-      proxy.$modal.msg("请输入报修人");
-      return;
-    }
-
-    fill({
-      id: dataArray.value.id,
-      handleName: dataArray.value.handleName,
-      handleContent: dataArray.value.handleContent,
-    }).then((res) => {
-      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;
-  }
-
-  // init();
-});
-</script>
-
-<style lang="scss" scoped>
-:deep(.u-input__content__field-wrapper__field) {
-  font-size: 13px !important;
-}
-
-:deep(.u-textarea__field) {
-  font-size: 13px;
-}
-</style>

+ 0 - 209
src/pages/business/videoMonitor/videoList.vue

@@ -1,209 +0,0 @@
-<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="repairManage-container 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="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  v-if="base.deviceStatus == 1" class="image-bg" style="width: 80rpx; height: 80rpx; margin: auto 10px auto 0" src="@/static/images/videoMonitor/video-icon-on.png"></image>
-              <image  v-if="base.deviceStatus == 2" class="image-bg" style="width: 80rpx; height: 80rpx; margin: auto 10px auto 0" src="@/static/images/videoMonitor/video-icon-off.png"></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.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>
-               
-              </view>
-
-              <view>
-               
-              </view>
-            </view>
-          
-          
-          <!-- <view class="content-area-top menu-item">
-       
-            <view class="content-area-top-status" v-if="base.deviceStatus == 1" style="background-color: #23dedc"> 在线 </view>
-            <view class="content-area-top-status" v-if="base.deviceStatus == 2" style="background-color: #16bf00"> 离线 </view>
-          </view>
-          <view class="content-area-row_wrap menu-item">
-           
-            <view class="content-area-row_wrap-view"> {{ base.reflectPhone }} </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 { pageQuery } from "@/api/business/videoMonitor.js";
-
-const { proxy } = getCurrentInstance();
-const commonStore = commonStores();
-
-const tabsList = ref([
-  {
-    name: "全部",
-    value: "",
-  },
-  {
-    name: "受理中",
-    value: 1,
-  },
-  {
-    name: "处理完成",
-    value: 2,
-  },
-]);
-const tabsCurrent = ref(1);
-
-const dataList = ref([]);
-const pageSize = ref(20);
-const current = ref(1);
-const total = ref(0);
-
-/**
- * @页面初始化
- */
-function init() {
-  selectListApi();
-}
-
-/**
- * @列表查询
- * @api接口查询
- */
-function selectListApi() {
-  pageQuery({
-    // deviceStatus: 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;
-    }
-  });
-}
-
-/**
- * @跳转详情事件
- */
-function handleToDetails(e) {
-  proxy.$tab.navigateTo(`/pages/business/videoMonitor/videoDetail?deviceName=${e.deviceName}`);
-  if(e.deviceStatus==1){
-   
-  }
-  
-}
-
-/**
- * @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) => {
-  init();
-});
-</script>
-
-<style lang="scss" scoped>
-.repairManage-container {
-  .content-area {
-    &-top {
-      padding-right: 10px;
-      font-size: 16px;
-      font-weight: 600;
-      color: #000000;
-
-      &-time {
-        max-width: 70%;
-        margin: auto 0;
-        font-size: 14px;
-        color: rgb(102, 102, 102);
-      }
-
-      &-name {
-        max-width: 70%;
-        color: #000;
-      }
-
-      &-status {
-        max-width: 30%;
-        margin: auto 0 auto auto;
-        font-size: 12px;
-        color: #ffffff;
-        padding: 0 5px;
-        border-radius: 20px;
-        line-height: 20px;
-      }
-    }
-
-    &-row_wrap {
-      padding-right: 10px;
-      font-size: 13px;
-      flex-flow: row wrap;
-
-      &-view {
-        display: flex;
-        min-width: 50%;
-        > .iconfont {
-          font-size: 14px;
-          color: #909399;
-          margin-left: 5px;
-        }
-      }
-    }
-  }
-}
-</style>

+ 12 - 20
src/pages/business/zhaf/signIn/index.vue

@@ -14,15 +14,15 @@
           class="signIn-button round mb30"
           :class="`bg-${themeColor.name}`"
           :style="{
-            background: state.signInType === 0 ? themeColor.color : '#999999',
+            background: state.signInType === 1 ? themeColor.color : '#999999',
           }"
           @click="handleInsert()"
         >
-          <view class="pt40 font40">{{ state.signInType === 0 ? "签到" : "签退" }}</view>
+          <view class="pt40 font20">{{ state.signInType === 1 ? "签到" : "签退" }}</view>
           <view class="mt5">{{ state.operateDate.split(" ")[1] }}</view>
         </view>
         <view class="signIn-address" v-if="state.address">
-          <view class="iconfont ucicon-address icon mt2" :class="`text-${themeColor.name}`"></view>
+          <view class="iconfont oaIcon-address icon mt2" :class="`text-${themeColor.name}`"></view>
           <view class="ml5">{{ state.address }}</view>
         </view>
       </view>
@@ -33,12 +33,9 @@
 <script setup>
 import { onLoad, onShow, onHide, onLaunch, onUnload } from "@dcloudio/uni-app";
 import { ref, reactive, computed, onMounted, getCurrentInstance, toRefs, inject } from "vue";
-import { useStores, commonStores } from "@/store/modules/index";
 import { add, getStatus } from "@/api/business/zhaf/signIn.js";
 
-const commonStore = commonStores();
 const { proxy } = getCurrentInstance();
-
 const themeColor = computed(() => {
   return proxy.$settingStore.themeColor;
 });
@@ -46,8 +43,8 @@ const themeColor = computed(() => {
 const state = reactive({
   address: "", //准确位置信息
   deviceCode: uni.getSystemInfoSync().deviceId, //设备编号
-  signInType: 0, //签到类型(0:已签到 1:已签退)
-  operateDate: commonStore.formatterDateTime(new Date()), //操作时间
+  signInType: 1, //签到类型(0:已签到 1:已签退)
+  operateDate: proxy.$common.formatterDateTime(new Date()), //操作时间
   operateCode: 0, //操作类型
   longitude: "", //经度
   latitude: "", //纬度
@@ -68,7 +65,7 @@ function handleInsert() {
     remarks: state.remarks,
   }).then((res) => {
     if (res.status == "SUCCESS") {
-      proxy.$modal.msgSuccess(state.signInType === 0 ? "签到成功" : "签退成功");
+      proxy.$modal.msgSuccess(state.signInType === 1 ? "签到成功" : "签退成功");
       getStatusApi(); //调用人员状态查询接口
     }
   });
@@ -91,16 +88,14 @@ function getLocation() {
     type: "gcj02",
     geocode: true,
     highAccuracyExpireTime: 5000,
-    success: function (res) {
+    success: (res) => {
+      console.log(res);
       state.longitude = res.longitude;
       state.latitude = res.latitude;
       state.address = res.address.city + res.address.district + res.address.street + res.address.streetNum + res.address.poiName;
     },
-    fail: function (res) {
-      uni.showToast({
-        title: "请打开手机定位或相关应用权限定位!",
-        icon: "none",
-      });
+    fail: (res) => {
+      console.log(res);
     },
   });
 }
@@ -109,13 +104,10 @@ onLoad(() => {
   getStatusApi(); //调用人员状态查询接口
 
   //#ifdef APP-PLUS
-  getLocation();
-  inter.interLocation = setInterval(() => {
-    getLocation();
-  }, 1000 * 10);
+  inter.interLocation = setInterval(getLocation(), 1000 * 10);
   //#endif
   inter.interOperateDate = setInterval(() => {
-    state.operateDate = commonStore.formatterDateTime(new Date());
+    state.operateDate = proxy.$common.formatterDateTime(new Date());
   }, 1000);
 });
 

+ 40 - 40
src/pages/business/zhaf/xunJian/collect/components/collectDetail.vue

@@ -1,41 +1,47 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view class="bg-white p15">
-      <u-form ref="form" labelPosition="left" :model="model" :rules="rules" labelWidth="82">
-        <u-form-item label="地点号码:" prop="siteNubmber">
-          <u-input v-model="model.siteNubmber" disabled></u-input>
-        </u-form-item>
-        <u-form-item label="地点名称:" prop="siteName">
-          <u-input v-model="model.siteName"></u-input>
-        </u-form-item>
-        <u-form-item label="备注:" prop="siteDescribe">
-          <u-input v-model="model.siteDescribe"></u-input>
-        </u-form-item>
-      </u-form>
-
-      <u-button type="primary" class="mt15" style="width: 100%; height: 40px; font-size: 14px" @click="handleInsert()" shape="circle"> 保存 </u-button>
-    </view>
-  </scroll-view>
+  <oa-scroll
+    customClass="scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <view class="bg-white p15">
+        <u-form ref="uForm" labelPosition="left" :model="model" :rules="rules" labelWidth="82">
+          <u-form-item label="地点号码:" prop="siteNubmber">
+            <u-input v-model="model.siteNubmber" disabled></u-input>
+          </u-form-item>
+          <u-form-item label="地点名称:" prop="siteName">
+            <u-input v-model="model.siteName"></u-input>
+          </u-form-item>
+          <u-form-item label="备注:" prop="siteDescribe">
+            <u-input v-model="model.siteDescribe"></u-input>
+          </u-form-item>
+        </u-form>
+
+        <u-button type="primary" class="mt15" style="width: 100%; height: 40px; font-size: 14px" @click="handleInsert()" shape="circle"> 保存 </u-button>
+      </view>
+    </template>
+  </oa-scroll>
 </template>
 
 <script setup>
-import {
-  onReady,
-  onLoad,
-  onShow,
-  onPullDownRefresh, //下拉刷新
-  onReachBottom, // 上拉加载
-  onNavigationBarButtonTap,
-} from "@dcloudio/uni-app";
+/*----------------------------------依赖引入-----------------------------------*/
+import { onReady, onLoad, onShow } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
 import { useStores, commonStores, xunJianStores } from "@/store/modules/index";
-
-const commonStore = commonStores(); //全局公共Store
-const xunJianStore = xunJianStores(); //全局变量值Store
-
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
-const form = ref(null); //表单refs获取
+const xunJianStore = xunJianStores(); //全局变量值Store
+/*----------------------------------变量声明-----------------------------------*/
 const model = reactive({
   siteType: 1,
   siteTime: "",
@@ -51,9 +57,7 @@ const rules = ref({
     message: "地点名称不能为空",
     trigger: ["blur", "change"],
   },
-
   siteNubmber: [{ required: true, message: "地点编号不能为空", trigger: "blur" }],
-
   siteDescribe: [{ min: 1, max: 30, message: "长度在 1 到 30 个字符", trigger: "blur" }],
 }); //form表单校验
 
@@ -61,16 +65,14 @@ const rules = ref({
  * @保存按钮点击事件
  */
 function handleInsert() {
-  form.value
+  proxy.$refs["uForm"]
     .validate()
     .then((res) => {
       let endTime = new Date();
-      model.siteTime = commonStore.formatterDate(endTime, "yyyy-MM-dd hh:mm:ss");
+      model.siteTime = proxy.$common.formatterDate(endTime, "yyyy-MM-dd hh:mm:ss");
 
       xunJianStore.collectDataList.push(model);
-      uni.navigateBack({
-        delta: 1, //返回到需要执行方法的页面
-      });
+      proxy.$tab.navigateBack(1); //返回到需要执行方法的页面
     })
     .catch((errors) => {
       uni.$u.toast("校验失败");
@@ -86,8 +88,6 @@ onShow(() => {
   //调用系统主题颜色
   proxy.$settingStore.systemThemeColor([1]);
 });
-
-onMounted(() => {});
 </script>
 
 <style lang="scss">

+ 129 - 68
src/pages/business/zhaf/xunJian/collect/components/collectRecord.vue

@@ -1,50 +1,71 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view class="example-body" v-if="show">
-      <uni-datetime-picker v-model="datetimerange" type="daterange" rangeSeparator="~" @change="confirm" />
-    </view>
-    <view v-for="(cu, index) in dataList.siteList" :key="index" class="flex bg-white p15 pt0 mb15">
-      <view class="flex mr15">
-        <u-image style="margin: auto" width="40" height="40" src="@/static/images/xunjian/scan.png" v-if="cu.siteType == 1" shape="circle"></u-image>
-
-        <u-image style="margin: auto" width="40" height="40" src="@/static/images/xunjian/NFC.png" v-if="cu.siteType == 2" shape="circle"></u-image>
+  <u-navbar leftIconColor="#fff" :autoBack="false" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color" @leftClick="handleToBack()">
+    <template #center>
+      <view class="u-navbar__content__center__item"> 采集记录 </view>
+    </template>
+    <template #right>
+      <view class="u-navbar__content__right__item">
+        <text class="iconfont oaIcon-shaixuan" @click="handleIconClick('筛选')"></text>
       </view>
-      <view class="reportCenter">
-        <view class="centerSiteName">
-          {{ cu.siteName }}
-        </view>
+    </template>
+  </u-navbar>
+
+  <oa-scroll
+    customClass="scroll-height"
+    :total="state.total"
+    :refresherEnabled="true"
+    :refresherEnabledTitle="true"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    @refresh="refresh"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <view v-if="show">
+        <uni-datetime-picker v-model="dateTimeRange" type="daterange" rangeSeparator="~" @change="confirm" />
+      </view>
+      <view class="collect-area bg-white" v-for="(cu, index) in state.siteList" :key="index">
+        <view class="collect-area_left">
+          <u-image style="margin: auto" width="40" height="40" src="@/static/images/xunjian/scan.png" v-if="cu.siteType == 1" shape="circle"></u-image>
 
-        <view style="font-size: 13px; color: #a1a1a1">
-          {{ cu.createTime == "" || cu.createTime == null ? "无" : cu.createTime }}
+          <u-image style="margin: auto" width="40" height="40" src="@/static/images/xunjian/NFC.png" v-if="cu.siteType == 2" shape="circle"></u-image>
         </view>
-      </view>
-      <view style="margin: auto"></view>
-      <view class="reportRight">
-        <view style="margin: auto">
-          <view class="padding-0" style="font-size: 14px; color: #a1a1a1"> 已提交 </view>
+        <view class="collect-area_center">
+          <view class="collect-area_center_title">
+            {{ cu.siteName }}
+          </view>
+
+          <view class="collect-area_center_time">
+            {{ cu.createTime == "" || cu.createTime == null ? "无" : cu.createTime }}
+          </view>
+        </view>
+        <view style="margin: auto"></view>
+        <view class="collect-area_right">
+          <view class="collect-area_right_item"> 已提交 </view>
         </view>
       </view>
-    </view>
-
-    <u-empty marginTop="20%" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="dataList.siteList.length <= 0"> </u-empty>
-  </scroll-view>
+    </template>
+  </oa-scroll>
 </template>
 
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
-import { xunJianStores } from "@/store/modules/index";
-
-import { siteList } from "@/api/business/mhxf/xunJian/collect.js";
-
-const xunJianStore = xunJianStores(); //全局变量值Store
-
+/*----------------------------------接口引入-----------------------------------*/
+import { siteList } from "@/api/business/zhaf/xunJian/collect.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
+/*----------------------------------变量声明-----------------------------------*/
 const show = ref(false);
-const datetimerange = ref("");
-const dataList = reactive({
+const dateTimeRange = ref("");
+const state = reactive({
   siteList: [],
+  total: 0,
   startTime: "",
   endTime: "",
 });
@@ -53,8 +74,8 @@ const dataList = reactive({
  * @日期选中事件回调
  */
 function confirm(e) {
-  dataList.startTime = e[0];
-  dataList.endTime = e[1];
+  state.startTime = e[0];
+  state.endTime = e[1];
   handleSelectApi();
 }
 
@@ -63,26 +84,50 @@ function confirm(e) {
  * @api请求
  */
 async function handleSelectApi() {
+  if (!proxy.$common.isNetwork()) {
+    return false;
+  }
+
   siteList({
-    startTime: dataList.startTime, //开始时间
-    endTime: dataList.endTime, //结束时间
-  }).then((res) => {
-    if (res.status == "SUCCESS") {
-      dataList.siteList = res.data;
-    } else {
-    }
-  });
+    startTime: state.startTime, //开始时间
+    endTime: state.endTime, //结束时间
+  })
+    .then((res) => {
+      if (res.status == "SUCCESS") {
+        state.siteList = res.data;
+        state.total = res.data.length;
+      } else {
+      }
+    })
+    .catch((err) => {
+      proxy.$modal.msg(err);
+    });
+}
+
+/**
+ * @scrollView刷新数据
+ */
+function refresh() {
+  state.startTime = "";
+  state.endTime = "";
+  handleSelectApi();
 }
 
-// 自定义导航事件
-onNavigationBarButtonTap((e) => {
-  if (e.float == "right") {
+//右侧按钮点击事件
+function handleIconClick(type) {
+  if (type === "筛选") {
     show.value = !show.value;
-  } else {
   }
-});
+}
 
-onLoad((options) => {});
+//返回
+function handleToBack() {
+  proxy.$tab.navigateBack(1); //返回到需要执行方法的页面
+}
+
+onLoad((options) => {
+  handleSelectApi();
+});
 
 onShow(() => {
   //调用系统主题颜色
@@ -90,32 +135,48 @@ onShow(() => {
 });
 
 onReady(() => {});
-
-onMounted(() => {
-  handleSelectApi();
-});
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
 .is-selected {
   color: #1989fa;
 }
-</style>
-
-<style scoped>
-.reportCenter {
-}
 
-.reportCenter .centerSiteName {
-  font-size: 15px;
-  margin-bottom: 5px;
-  height: 20px;
-  line-height: 20px;
+.collect-area {
   display: flex;
-}
+  padding: 15px;
+  margin-bottom: 15px;
 
-.reportRight {
-  display: flex;
-  padding: 0 15px;
+  &_left {
+    display: flex;
+    margin-right: 15px;
+  }
+
+  &_center {
+    &_title {
+      display: flex;
+      font-size: 15px;
+      margin-bottom: 5px;
+      height: 20px;
+      line-height: 20px;
+    }
+
+    &_time {
+      font-size: 13px;
+      color: #a1a1a1;
+    }
+  }
+
+  &_right {
+    display: flex;
+    padding: 0 15px;
+
+    &_item {
+      padding: 0;
+      margin: auto;
+      font-size: 14px;
+      color: #a1a1a1;
+    }
+  }
 }
 </style>

+ 149 - 114
src/pages/business/zhaf/xunJian/collect/index.vue

@@ -1,72 +1,96 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <!-- 按组使用 -->
-    <uni-swipe-action>
-      <uni-swipe-action-item
-        class="mb15"
-        v-for="(cu, index) in xunJianStore.collectDataList"
-        :key="index"
-        :right-options="options"
-        @click="bindClick($event, index)"
-        @change="swipeChange($event, index)"
-      >
-        <view class="flex bg-white p15 pt0">
-          <view class="flex mr15">
-            <u-image style="margin: auto" width="40" height="40" src="@/static/images/xunjian/scan.png" v-if="cu.siteType == 1" shape="circle"></u-image>
-
-            <u-image style="margin: auto" width="40" height="40" src="@/static/images/xunjian/NFC.png" v-if="cu.siteType == 2" shape="circle"></u-image>
-          </view>
-          <view class="reportCenter">
-            <view class="centerSiteName">
-              {{ cu.siteName }}
+  <u-navbar leftIconColor="#fff" :autoBack="false" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color" @leftClick="handleToBack()">
+    <template #center>
+      <view class="u-navbar__content__center__item"> 点位采集 </view>
+    </template>
+    <template #right>
+      <view class="u-navbar__content__right__item">
+        <span @click="handleIconClick('采集记录')">采集记录</span>
+      </view>
+    </template>
+  </u-navbar>
+
+  <oa-scroll
+    customClass="scroll-height"
+    :total="xunJianStore.collectDataList.length"
+    :refresherEnabled="true"
+    :refresherEnabledTitle="true"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <!-- 按组使用 -->
+      <uni-swipe-action>
+        <uni-swipe-action-item
+          v-for="(cu, index) in xunJianStore.collectDataList"
+          :key="index"
+          :right-options="options"
+          @click="bindClick($event, index)"
+          @change="swipeChange($event, index)"
+          style="margin-bottom: 15px"
+        >
+          <view class="collect-area bg-white">
+            <view class="collect-area_left">
+              <u-image style="margin: auto" width="40" height="40" src="@/static/images/xunjian/scan.png" v-if="cu.siteType == 1" shape="circle"></u-image>
+
+              <u-image style="margin: auto" width="40" height="40" src="@/static/images/xunjian/NFC.png" v-if="cu.siteType == 2" shape="circle"></u-image>
             </view>
+            <view class="collect-area_center">
+              <view class="collect-area_center_title">
+                {{ cu.siteName }}
+              </view>
 
-            <view style="font-size: 13px; color: #a1a1a1">
-              {{ cu.siteTime == "" || cu.siteTime == null ? "无" : cu.siteTime }}
+              <view class="collect-area_center_time">
+                {{ cu.siteTime }}
+              </view>
             </view>
-          </view>
-          <view style="margin: auto"></view>
-          <view class="reportRight">
-            <view style="margin: auto" v-if="cu.swipeBool == false">
-              <view style="padding: 0; font-size: 14px; color: #409eff" @click="handleInsert(cu)"> 提交 </view>
+            <view style="margin: auto"></view>
+            <view class="collect-area_right">
+              <view v-if="cu.swipeBool == false" class="collect-area_right_item" @click="handleInsert(cu)"> 提交 </view>
             </view>
           </view>
-        </view>
-      </uni-swipe-action-item>
-    </uni-swipe-action>
-
-    <oaMovable :themesColor="proxy.$settingStore.themeColor.color">
-      <template #content>
-        <view class="iconfont ucicon-nfc menu-item-icon" @click="nfcClick()"></view>
-        <view class="iconfont ucicon-saoyisao menu-item-icon" @click="scanClick()"></view>
-      </template>
-    </oaMovable>
-
-    <!-- 提示信息弹窗 -->
-    <uni-popup ref="message" type="message">
-      <uni-popup-message
-        :style="{
-          color: messageList.color,
-        }"
-        :type="messageList.type"
-        :message="messageList.message"
-        :duration="messageList.duration"
-      ></uni-popup-message>
-    </uni-popup>
-
-    <u-empty marginTop="20%" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="xunJianStore.collectDataList.length <= 0"> </u-empty>
-  </scroll-view>
+        </uni-swipe-action-item>
+      </uni-swipe-action>
+
+      <oaMovable :themesColor="proxy.$settingStore.themeColor.color">
+        <template #content>
+          <view class="iconfont oaIcon-nfc menu-item-icon" @click="nfcClick()"></view>
+          <view class="iconfont oaIcon-saoyisao menu-item-icon" @click="scanClick()"></view>
+        </template>
+      </oaMovable>
+
+      <!-- 提示信息弹窗 -->
+      <uni-popup ref="message" type="message">
+        <uni-popup-message
+          :style="{
+            color: messageList.color,
+          }"
+          :type="messageList.type"
+          :message="messageList.message"
+          :duration="messageList.duration"
+        ></uni-popup-message>
+      </uni-popup>
+    </template>
+  </oa-scroll>
 </template>
 
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onReady, onLoad, onShow, onUnload, onNavigationBarButtonTap } from "@dcloudio/uni-app";
 import { ref, onMounted, reactive, computed, getCurrentInstance, toRefs, inject, shallowRef, watch } from "vue";
-import { xunJianStores } from "@/store/modules/index";
-import { addSite } from "@/api/business/mhxf/xunJian/collect.js";
+/*----------------------------------接口引入-----------------------------------*/
+import { addSite } from "@/api/business/zhaf/xunJian/collect.js";
+/*----------------------------------组件引入-----------------------------------*/
 import oaMovable from "@/components/oa-movable/index.vue"; // 引入组件
-
+/*----------------------------------store引入-----------------------------------*/
+import { xunJianStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
 const xunJianStore = xunJianStores(); //全局变量值Store
+/*----------------------------------变量声明-----------------------------------*/
 
 /**
  * @NFC
@@ -85,20 +109,11 @@ function scanClick() {
   uni.scanCode({
     autoZoom: false,
     success: (e) => {
-      uni.showToast({
-        title: "扫码成功",
-        icon: "none",
-      });
-      uni.navigateTo({
-        url: `/pages/business/zhaf/xunJian/collect/components/collectDetail?siteNubmber=${e.result}&siteType=${1}`,
-      });
+      proxy.$modal.msg("扫码成功");
+      proxy.$tab.navigateTo(`/pages/business/zhaf/xunJian/collect/components/collectDetail?siteNubmber=${e.result}&siteType=${1}`);
     },
     fail: (err) => {
-      uni.showToast({
-        title: "扫码失败",
-        icon: "none",
-      });
-      console.log("扫码失败", err);
+      proxy.$modal.msg("扫码失败");
     },
     complete: () => {
       console.log("扫码结束");
@@ -118,20 +133,19 @@ const messageList = reactive({
   color: "",
 });
 function handleInsert(e) {
+  if (!proxy.$common.isNetwork()) {
+    return false;
+  }
+
   uni.getLocation({
     type: "gcj02",
     geocode: true,
     highAccuracyExpireTime: 5000,
     success: function (res) {
-      console.log("当前位置的经度:" + res.longitude);
-      console.log("当前位置的纬度:" + res.latitude);
       api(res.longitude, res.latitude);
     },
     fail: function (res) {
-      uni.showToast({
-        title: "请打开手机定位或相关应用权限定位!",
-        icon: "none",
-      });
+      proxy.$modal.msg("请打开手机定位或相关应用权限定位!");
     },
   });
 
@@ -147,18 +161,23 @@ function handleInsert(e) {
       distanceRange: 10, //误差范围
       // areaId: 0, //区域id
       // companyId: 0, //单位ID
-    }).then((res) => {
-      if (res.status == "SUCCESS") {
-        messageList.type = "SUCCESS";
-        messageList.message = "提交成功";
-        messageList.duration = 2000;
-        messageList.color = "#09bb07";
-        message.value.open();
-
-        xunJianStore.collectDataList.splice(xunJianStore.collectDataList.indexOf(e), 1);
-      } else {
-      }
-    });
+      collectTime: e.siteTime ? e.siteTime.replace(" ", "T") : e.siteTime,
+    })
+      .then((res) => {
+        if (res.status == "SUCCESS") {
+          messageList.type = "SUCCESS";
+          messageList.message = "提交成功";
+          messageList.duration = 2000;
+          messageList.color = "#09bb07";
+          message.value.open();
+
+          xunJianStore.collectDataList.splice(xunJianStore.collectDataList.indexOf(e), 1);
+        } else {
+        }
+      })
+      .catch((err) => {
+        proxy.$modal.msg(err);
+      });
   }
 }
 
@@ -189,15 +208,17 @@ function swipeChange(e, index) {
   }
 }
 
-// 自定义导航事件
-onNavigationBarButtonTap((e) => {
-  if (e.float == "right") {
-    uni.navigateTo({
-      url: "/pages/business/zhaf/xunJian/collect/components/collectRecord",
-    });
-  } else {
+//右侧按钮点击事件
+function handleIconClick(type) {
+  if (type === "采集记录") {
+    proxy.$tab.navigateTo("/pages/business/zhaf/xunJian/collect/components/collectRecord");
   }
-});
+}
+
+//返回
+function handleToBack() {
+  proxy.$tab.navigateBack(1); //返回到需要执行方法的页面
+}
 
 onLoad((options) => {});
 
@@ -207,9 +228,7 @@ onShow(() => {
 
   uni.$on("tagid", function (value) {
     setTimeout(() => {
-      uni.navigateTo({
-        url: `/pages/business/zhaf/xunJian/collect/components/collectDetail?siteNubmber=${value}&siteType=${2}`,
-      });
+      proxy.$tab.navigateTo(`/pages/business/zhaf/xunJian/collect/components/collectDetail?siteNubmber=${value}&siteType=${2}`);
       uni.$off("tagid"); //将值删除监听器
     }, 0);
   });
@@ -220,27 +239,43 @@ onUnload(() => {
 });
 
 onReady(() => {});
-
-onMounted(() => {});
 </script>
 
-<style lang="scss">
-.is-selected {
-  color: #1989fa;
-}
-</style>
-
-<style scoped>
-.reportCenter .centerSiteName {
-  font-size: 15px;
-  margin-bottom: 5px;
-  height: 20px;
-  line-height: 20px;
+<style lang="scss" scoped>
+.collect-area {
   display: flex;
-}
+  padding: 15px;
 
-.reportRight {
-  display: flex;
-  padding: 0 15px;
+  &_left {
+    display: flex;
+    margin-right: 15px;
+  }
+
+  &_center {
+    &_title {
+      display: flex;
+      font-size: 15px;
+      margin-bottom: 5px;
+      height: 20px;
+      line-height: 20px;
+    }
+
+    &_time {
+      font-size: 13px;
+      color: #a1a1a1;
+    }
+  }
+
+  &_right {
+    display: flex;
+    padding: 0 15px;
+
+    &_item {
+      margin: auto;
+      padding: 0;
+      font-size: 14px;
+      color: #409eff;
+    }
+  }
 }
 </style>

+ 0 - 0
src/pages/business/zhaf/xunJian/components/index.vue


+ 113 - 0
src/pages/business/zhaf/xunJian/error/errorDisposition.vue

@@ -0,0 +1,113 @@
+<template>
+  <oa-scroll
+    customClass="errorDisposition-container scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <u--form ref="uForm" :model="form" :rules="rules" labelWidth="90">
+        <view style="padding: 10px 10px 20px 20px; background: #ffffff">
+          <u-form-item label="事件名称" prop="eventName" :borderBottom="true" required>
+            <view style="color: #666666">{{ form.eventName }}</view>
+          </u-form-item>
+          <u-form-item label="处置图片" :borderBottom="true">
+            <oa-upload :uploadCount="5" :uploadList="form.imageList" :uploadListSrc="'url'" @uploadSuccessChange="uploadSuccessChange" @uploadDeleteChange="uploadDeleteChange"></oa-upload>
+          </u-form-item>
+          <u-form-item label="备注" prop="remark" :borderBottom="true">
+            <u--textarea v-model="form.handleContent" placeholder="备注信息,最多可输入50个字" :count="true" border="none" maxlength="50"></u--textarea>
+          </u-form-item>
+        </view>
+      </u--form>
+
+      <view class="app-button">
+        <view class="app-button-padding"></view>
+        <view class="app-button-fixed">
+          <u-button class="app-buttom" type="primary" @click="handleSubmit()" shape="circle"> 提交 </u-button>
+        </view>
+      </view>
+    </template>
+  </oa-scroll>
+</template>
+
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow } from "@dcloudio/uni-app";
+import { reactive, toRefs, getCurrentInstance } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { errorApi } from "@/api/business/zhaf/xunJian/index.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  form: {
+    eventName: "", //事件名称
+    imageList: [],
+    handleImage: "",
+    handleContent: "",
+    id: undefined,
+  },
+});
+
+const { form } = toRefs(state);
+
+/**
+ * @按钮点击事件
+ */
+function handleSubmit() {
+  if (!proxy.$common.isNetwork()) {
+    return false;
+  }
+
+  var param = {
+    eventName: state.form.eventName, //事件名称
+    handleImage: JSON.stringify(state.form.imageList),
+    handleContent: state.form.handleContent,
+    id: state.form.id,
+  };
+  errorApi()
+    .Update(param)
+    .then(() => {
+      proxy.$modal.msg("提交成功");
+      proxy.$tab.navigateBack(2);
+    })
+    .catch((err) => {
+      proxy.$modal.msg(err);
+    });
+}
+
+/**
+ * @图片上传成功回调
+ */
+function uploadSuccessChange(e) {
+  state.form.imageList.push({
+    name: e.name,
+    url: e.url,
+  });
+}
+
+/**
+ * @图片删除回调
+ */
+function uploadDeleteChange(e) {
+  state.form.imageList = e;
+}
+
+onLoad((options) => {
+  state.form.id = options.id;
+  state.form.eventName = options.eventName;
+});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+</script>
+
+<style lang="scss"></style>

+ 164 - 0
src/pages/business/zhaf/xunJian/error/errorList.vue

@@ -0,0 +1,164 @@
+<template>
+  <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
+    <u-tabs :list="state.tabsList" :current="state.tabsCurrent" @click="tabsClick" lineColor="#333" :activeStyle="{ color: '#333' }" :inactiveStyle="{ color: '#909399' }" :scrollable="false"></u-tabs>
+  </u-sticky>
+
+  <oa-scroll
+    customClass="fastMail-container scroll-height"
+    :pageSize="state.pageSize"
+    :total="state.total"
+    :isSticky="true"
+    :refresherLoad="true"
+    :refresherEnabled="true"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    @load="load"
+    @refresh="refresh"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <view v-show="state.tabsCurrent == 1 || state.tabsCurrent == 0">
+      <view class="content-area menu-list mlr0" v-for="data in state.dataList" :key="data">
+        <view class="list-cell" style="color: #666666; line-height: 30px" @click="toDetail(data)">
+          <view class="content-area-row_wrap menu-item">
+            <view class="content-area-row_wrap-view" style="margin-right: auto">
+              {{ data.eventName }}
+            </view>
+            <view class="content-area-row_wrap-view flexend">{{ data.createTime ? data.createTime.replace("T", " ") : "" }}</view>
+            <view class="content-area-row_wrap-view">{{ proxy.$common.mapping("label", "value", data.eventType, patrol_event_type) }} </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </oa-scroll>
+</template>
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, getCurrentInstance, toRefs } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { errorApi } from "@/api/business/zhaf/xunJian";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+const { patrol_event_classify, patrol_event_grade, patrol_event_type } = proxy.useDict("patrol_event_classify", "patrol_event_grade", "patrol_event_type");
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  tabsList: [{ name: "未完成事件" }, { name: "已完成事件" }],
+  tabsCurrent: 0,
+
+  dataList: [],
+  pageSize: 20,
+  current: 1,
+  total: 0,
+});
+
+/**
+ * @页面初始化
+ */
+function init() {
+  pageQueryApi();
+}
+
+function pageQueryApi() {
+  errorApi()
+    .Select({
+      pageNum: state.current,
+      pageSize: state.pageSize,
+      handleStatus: state.tabsCurrent,
+    })
+    .then((res) => {
+      state.dataList = res.data.records;
+      state.total = res.data.total;
+    });
+}
+
+/**
+ * @复制粘贴板
+ */
+function toDetail(row) {
+  proxy.$tab.navigateTo(`/pages/business/zhaf/xunJian/error/errorListDetail?id=${row.id}`)
+}
+
+/**
+ * @tabs点击事件
+ */
+function tabsClick(e) {
+  state.tabsCurrent = e.index;
+  pageQueryApi();
+}
+
+/**
+ * @scrollView加载数据
+ */
+function load() {
+  state.pageSize += 10;
+  init();
+}
+
+/**
+ * @scrollView刷新数据
+ */
+function refresh() {
+  state.pageSize = 20;
+  init();
+}
+
+onLoad((options) => {
+  init();
+});
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+  init();
+});
+
+// 自定义导航事件
+onNavigationBarButtonTap((e) => {
+  if (e.float == "right") {
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+:deep(.uni-page-head__title) {
+  opacity: 1 !important;
+}
+
+.fastMail-container {
+  .content-area {
+    &-top {
+      font-size: 16px;
+      font-weight: 600;
+      color: #000000;
+    }
+
+    &-row_wrap {
+      font-size: 13px;
+      flex-flow: row wrap;
+
+      &-view {
+        min-width: 50%;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        > .iconfont {
+          font-size: 14px;
+          color: #909399;
+          margin-left: 5px;
+        }
+      }
+    }
+  }
+}
+.flexend {
+  flex: 1;
+  display: block;
+  text-align: right;
+}
+</style>

+ 191 - 0
src/pages/business/zhaf/xunJian/error/errorListDetail.vue

@@ -0,0 +1,191 @@
+<template>
+  <oa-scroll
+    customClass="invoicing-container scroll-height"
+    :customStyle="{}"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :scrollIntoView="scrollIntoView"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <view>
+      <view class="menu-list mt0 mlr0" style="padding: 0.625rem">
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">事件名称</view>
+            <view style="color: #666666">{{ dataList.eventName }}</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">事件上传图片</view>
+            <view v-if="dataList.eventImage && dataList.eventImage != '[]'" @click="proxy.$common.imgEnlarge(2, JSON.parse(dataList.eventImage))">
+              <image
+                style="width: 20px; height: 20px; margin: auto 15px auto 0"
+                v-for="(item, index) in JSON.parse(dataList.eventImage)"
+                :key="index"
+                :src="item.url ? item.url : '/static/images/404.png'"
+                mode="aspectFill"
+              ></image>
+            </view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">事件备注</view>
+            <view style="color: #666666">{{ dataList.remark }}</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">上报人</view>
+            <view style="color: #666666">{{ dataList.personnelName }}</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">事件类型</view>
+            <view style="color: #666666">{{ proxy.$common.mapping("label", "value", dataList.eventType, patrol_event_type) }}</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">事件等级</view>
+            <view style="color: #666666">{{ proxy.$common.mapping("label", "value", dataList.eventLevel, patrol_event_grade) }}</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">事件分类</view>
+            <view style="color: #666666">{{ proxy.$common.mapping("label", "value", dataList.eventCategory, patrol_event_classify) }}</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">事件类型</view>
+            <view style="color: #666666">{{ proxy.$common.mapping("label", "value", dataList.eventType, patrol_event_type) }}</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">创建人</view>
+            <view style="color: #666666">{{ dataList.createBy }}</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">创建时间</view>
+            <view style="color: #666666">{{ dataList.createTime }}</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">处置状态</view>
+            <view :style="{ color: dataList.handleStatus == 0 ? 'red' : '#666666' }">{{ dataList.handleStatus == 0 ? "未处置" : dataList.handleStatus == 1 ? "已处置" : "" }}</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">处置图片</view>
+            <view v-if="dataList.handleImage && dataList.handleImage != '[]'" @click="proxy.$common.imgEnlarge(2, JSON.parse(dataList.handleImage))">
+              <image
+                style="width: 20px; height: 20px; margin: auto 15px auto 0"
+                v-for="(item, index) in JSON.parse(dataList.handleImage)"
+                :key="index"
+                :src="item.url ? item.url : '/static/images/404.png'"
+                mode="aspectFill"
+              ></image>
+            </view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">处置备注</view>
+            <view style="color: #666666">{{ dataList.handleContent }}</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">处置人</view>
+            <view style="color: #666666">{{ dataList.handleName }}</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item">
+            <view style="width: 90px">处置时间</view>
+            <view style="color: #666666"> {{ dataList.handleTime ? dataList.handleTime.replace("T", " ") : "" }}</view>
+          </view>
+        </view>
+      </view>
+      <view class="app-button" v-if="dataList.handleStatus == 0">
+        <view class="app-button-padding"></view>
+        <view class="app-button-fixed">
+          <u-button class="app-buttom" type="primary" @click="handleSubmit(dataList)" shape="circle"> 处置填报 </u-button>
+        </view>
+      </view>
+    </view>
+  </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 { errorApi } from "@/api/business/zhaf/xunJian";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+const { patrol_event_classify, patrol_event_grade, patrol_event_type } = proxy.useDict("patrol_event_classify", "patrol_event_grade", "patrol_event_type");
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  dataList: {},
+  id: undefined,
+  scrollIntoView: "",
+});
+
+const { dataList, id, scrollIntoView } = toRefs(state);
+
+function pageQueryApi() {
+  errorApi()
+    .Select({
+      pageNum: 1,
+      pageSize: 1,
+      id: id.value,
+    })
+    .then((res) => {
+      dataList.value = res.data.records[0];
+    });
+}
+
+function handleSubmit(row) {
+  proxy.$tab.navigateTo(`/pages/business/zhaf/xunJian/error/errorDisposition?id=${row.id}&eventName=${row.eventName}`);
+}
+
+onLoad((options) => {
+  id.value = options.id;
+  pageQueryApi();
+});
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+// 自定义导航事件
+onNavigationBarButtonTap((e) => {
+  if (e.float == "right") {
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+:deep(.uni-page-head__title) {
+  opacity: 1 !important;
+}
+</style>

+ 234 - 0
src/pages/business/zhaf/xunJian/error/index.vue

@@ -0,0 +1,234 @@
+<template>
+  <oa-scroll
+    customClass="error-container scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <u--form ref="uForm" :model="form" :rules="rules" labelWidth="90">
+        <view style="padding: 10px 10px 20px 20px; background: #ffffff">
+          <u-form-item label="姓名" prop="nickName" required :borderBottom="true">
+            <u-input v-model="form.nickName" placeholder="姓名(必填)" border="none" maxlength="50" disabledColor="transparent" disabled />
+          </u-form-item>
+          <u-form-item label="事件名称" prop="eventName" required :borderBottom="true">
+            <u-input v-model="form.eventName" placeholder="事件名称(必填)" border="none" maxlength="50" />
+          </u-form-item>
+          <u-form-item label="事件分类" prop="eventCategory" required :borderBottom="true" @click="handleAction('事件分类')">
+            <u-input v-model="form.eventCategoryName" placeholder="事件分类(必选)" suffixIcon="arrow-right" suffixIconStyle="color: #909399" border="none" disabledColor="transparent" disabled />
+          </u-form-item>
+          <u-form-item label="事件类型" prop="eventType" required :borderBottom="true" @click="handleAction('事件类型')">
+            <u-input v-model="form.eventTypeName" placeholder="事件类型(必选)" suffixIcon="arrow-right" suffixIconStyle="color: #909399" border="none" disabledColor="transparent" disabled />
+          </u-form-item>
+          <u-form-item label="事件等级" prop="eventLevel" required :borderBottom="true" @click="handleAction('事件等级')">
+            <u-input v-model="form.eventLevelName" placeholder="事件类型(必选)" suffixIcon="arrow-right" suffixIconStyle="color: #909399" border="none" disabledColor="transparent" disabled />
+          </u-form-item>
+          <u-form-item label="现场图片" prop="pictureUrl" :borderBottom="true">
+            <oa-upload :uploadCount="5" :uploadList="form.imageList" :uploadListSrc="'url'" @uploadSuccessChange="uploadSuccessChange" @uploadDeleteChange="uploadDeleteChange"></oa-upload>
+          </u-form-item>
+          <u-form-item label="备注" prop="remark" :borderBottom="true">
+            <u--textarea v-model="form.remark" placeholder="备注信息,最多可输入50个字" :count="true" border="none" maxlength="50"></u--textarea>
+          </u-form-item>
+        </view>
+      </u--form>
+
+      <view class="app-button">
+        <view class="app-button-padding"></view>
+        <view class="app-button-fixed">
+          <u-button class="app-buttom" type="primary" @click="handleSubmit()" shape="circle"> 上报异常 </u-button>
+        </view>
+      </view>
+
+      <u-picker
+        :show="actionShow"
+        :columns="actionsList"
+        :title="'请选择' + actionTitle"
+        keyName="label"
+        visibleItemCount="6"
+        :defaultIndex="[actionDefaultIndex]"
+        :closeOnClickOverlay="true"
+        @close="actionShow = false"
+        @cancel="actionShow = false"
+        @confirm="selectAction"
+      ></u-picker>
+    </template>
+  </oa-scroll>
+</template>
+
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow, onHide, onLaunch, onReady } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, toRefs, getCurrentInstance, computed } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { errorApi } from "@/api/business/zhaf/xunJian/index.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+const useStore = useStores();
+const commonStore = commonStores();
+const { patrol_event_classify, patrol_event_grade, patrol_event_type } = proxy.useDict("patrol_event_classify", "patrol_event_grade", "patrol_event_type");
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  form: {
+    nickName: computed(() => {
+      return useStore.nickName;
+    }),
+    eventCategory: "", //事件分类
+    eventCategoryName: "", //事件分类名称
+    eventType: "", //事件类型
+    eventTypeName: "", //事件类型名称
+    eventLevel: "", //事件等级
+    eventLevelName: "", //事件等级名称
+    remark: "", //备注
+    deviceId: computed(() => {
+      return proxy.$settingStore.deviceList.deviceId;
+    }), //设备Id
+    planId: undefined, //计划Id
+    imageList: [],
+  },
+
+  rules: {
+    nickName: [{ required: true, message: "请输入姓名", trigger: ["blur", "change"] }],
+    eventCategory: [{ required: true, message: "请选择事件分类", trigger: ["blur", "change"] }],
+    eventType: [{ required: true, message: "请选择事件类型", trigger: ["blur", "change"] }],
+    eventLevel: [{ required: true, message: "请选择事件等级", trigger: ["blur", "change"] }],
+  },
+
+  actionIndex: 0,
+  actionTitle: "",
+  actionShow: false,
+  actionDefaultIndex: 0,
+  actionsList: [[]],
+});
+
+const { form, rules, actionTitle, actionIndex, actionsList, actionShow, actionDefaultIndex } = toRefs(state);
+
+/**
+ * @按钮点击事件
+ */
+function handleSubmit(value) {
+  if (!proxy.$common.isNetwork()) {
+    return false;
+  }
+
+  proxy.$refs["uForm"]
+    .validate()
+    .then((res) => {
+      var param = {
+        eventName: state.form.eventName, //事件名称
+        eventType: state.form.eventType, //事件类型
+        eventLevel: state.form.eventLevel, //事件等级
+        eventCategory: state.form.eventCategory, //事件分类
+        deviceId: state.form.deviceId, //设备Id
+        planId: state.form.planId, //计划Id
+        eventImage: JSON.stringify(state.form.imageList),
+        remark: state.form.remark,
+      };
+
+      errorApi()
+        .Insert(param)
+        .then(() => {
+          proxy.$modal.msg("提交成功");
+          proxy.$tab.navigateBack(1);
+        })
+        .catch((err) => {
+          proxy.$modal.msg(err);
+        });
+    })
+    .catch((errors) => {
+      proxy.$modal.msg("校验失败");
+    });
+}
+
+/**
+ * @action弹出框点击事件
+ */
+function handleAction(value, index, ind) {
+  if (value == "事件分类") {
+    state.actionTitle = "事件分类";
+    state.actionIndex = index;
+
+    state.actionsList[0] = patrol_event_classify.value;
+    state.actionDefaultIndex = 0;
+  }
+
+  if (value == "事件类型") {
+    state.actionTitle = "事件类型";
+    state.actionIndex = index;
+
+    state.actionsList[0] = patrol_event_type.value;
+    state.actionDefaultIndex = 0;
+  }
+
+  if (value == "事件等级") {
+    state.actionTitle = "事件等级";
+    state.actionIndex = index;
+
+    state.actionsList[0] = patrol_event_grade.value;
+    state.actionDefaultIndex = 0;
+  }
+
+  state.actionShow = true;
+}
+
+/**
+ * @action弹出框选择事件
+ */
+function selectAction(e) {
+  if (state.actionTitle == "事件分类") {
+    state.form.eventCategory = e.value[0].value;
+    state.form.eventCategoryName = e.value[0].label;
+  }
+
+  if (state.actionTitle == "事件类型") {
+    state.form.eventType = e.value[0].value;
+    state.form.eventTypeName = e.value[0].label;
+  }
+
+  if (state.actionTitle == "事件等级") {
+    state.form.eventLevel = e.value[0].value;
+    state.form.eventLevelName = e.value[0].label;
+  }
+
+  state.actionShow = false;
+}
+
+/**
+ * @图片上传成功回调
+ */
+function uploadSuccessChange(e) {
+  state.form.imageList.push({
+    name: e.name,
+    url: e.url,
+  });
+}
+
+/**
+ * @图片删除回调
+ */
+function uploadDeleteChange(e) {
+  state.form.imageList = e;
+}
+
+onLoad((options) => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+</script>
+
+<style lang="scss">
+.error-container {
+  :deep(.u-picker__view__column__item) {
+    font-size: 13px;
+  }
+}
+</style>

+ 50 - 33
src/pages/business/zhaf/xunJian/plan/components/content.vue

@@ -1,6 +1,15 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view class="xunjian-plan-content">
+  <oa-scroll
+    customClass="xunjian-plan-content scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
       <view class="bg-white p15 mb15" v-for="(con, index) in contentList" :key="index">
         <view class="flex mb10">
           <uni-section class="block mb10" :title="con.contentTitle" type="line"></uni-section>
@@ -60,35 +69,38 @@
           </view>
         </view>
       </view>
-    </view>
 
-    <view style="margin-bottom: 125px" v-if="xunJianStore.inspectionStatus == 1"></view>
+      <view style="margin-bottom: 125px" v-if="xunJianStore.inspectionStatus == 1"></view>
 
-    <view class="app-button-fixed" v-if="xunJianStore.inspectionStatus == 1">
-      <view class="app-flex">
-        <u-button class="app-buttom" style="margin-right: 15px" shape="circle" @click="buttonClick(1)"> 上一步 </u-button>
-
-        <u-button class="app-buttom" type="primary" shape="circle" @click="buttonClick(2)"> 提交 </u-button>
+      <view class="app-button-fixed" v-if="xunJianStore.inspectionStatus == 1">
+        <view class="app-flex">
+          <u-button class="app-buttom" shape="circle" @click="buttonClick(1)"> 上一步 </u-button>
+          <u-button class="app-buttom" type="primary" shape="circle" @click="buttonClick(2)"> 提交 </u-button>
+        </view>
       </view>
-    </view>
 
-    <u-modal ref="uModal" :show="show" :title="title" :content="content" @confirm="confirm"></u-modal>
+      <u-modal ref="uModal" :show="show" :title="title" :content="content" @confirm="confirm"></u-modal>
 
-    <!-- 巡检完成提示 -->
-    <oa-ttsAudio v-if="audioUrl" :audioUrl="audioUrl" :audioBool="true"></oa-ttsAudio>
-  </scroll-view>
+      <!-- 巡检完成提示 -->
+      <oa-ttsAudio v-if="audioUrl" :audioUrl="audioUrl" :audioBool="true"></oa-ttsAudio>
+    </template>
+  </oa-scroll>
 </template>
 
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onLoad, onShow } from "@dcloudio/uni-app";
 import { ref, onMounted, reactive, computed, getCurrentInstance, toRefs, inject, shallowRef } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { updatePlan } from "@/api/business/zhaf/xunJian/plan.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
 import { useStores, commonStores, xunJianStores } from "@/store/modules/index";
-import { updatePlan } from "@/api/business/mhxf/xunJian/plan.js";
-
-const BASE_URL = inject("$BASE_URL");
-const xunJianStore = xunJianStores(); //全局变量值Store
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
+const xunJianStore = xunJianStores(); //全局变量值Store
+/*----------------------------------变量声明-----------------------------------*/
 const contentList = ref([]);
 function checkboxChange(value, index) {
   contentList.value[index].contentOptionListValue1 = value;
@@ -114,9 +126,7 @@ function confirm() {
   audioUrl.value = "/static/mp3/XJWC.mp3";
   show.value = false;
   uni.$emit("planSelect"); //执行页面中的自定义方法
-  uni.navigateBack({
-    delta: 3, //返回到需要执行方法的页面
-  });
+  proxy.$tab.navigateBack(3); //返回到需要执行方法的页面
 }
 
 /**
@@ -127,9 +137,7 @@ function confirm() {
 async function buttonClick(type) {
   if (type == 1) {
     //上一步
-    uni.navigateBack({
-      delta: 1,
-    });
+    proxy.$tab.navigateBack(1); //返回到需要执行方法的页面
   } else if (type == 2) {
     //提交
 
@@ -165,6 +173,7 @@ async function buttonClick(type) {
     }
 
     const array = {
+      deviceId: uni.getSystemInfoSync().deviceId,
       siteType: xunJianStore.contentArray.siteList.siteType,
       siteNubmber: xunJianStore.contentArray.siteList.siteNubmber,
       siteName: xunJianStore.contentArray.siteList.siteName,
@@ -178,14 +187,22 @@ async function buttonClick(type) {
       recordOptionList: recordOptionList,
     };
 
-    updatePlan(array).then((res) => {
-      if (res.status == "SUCCESS") {
-        title.value = "消息";
-        content.value = "提交成功,确定后返回!";
-        show.value = true;
-      } else {
-      }
-    });
+    if (!proxy.$common.isNetwork()) {
+      xunJianStore.planDataList.push(array);
+      return false;
+    }
+
+    updatePlan(array)
+      .then((res) => {
+        if (res.status == "SUCCESS") {
+          title.value = "消息";
+          content.value = "提交成功,确定后返回!";
+          show.value = true;
+        }
+      })
+      .catch((err) => {
+        proxy.$modal.msg(err);
+      });
   }
 }
 

+ 106 - 88
src/pages/business/zhaf/xunJian/plan/components/report.vue

@@ -1,74 +1,91 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view class="flex mb15 bg-white" style="padding: 15px 0px 15px 15px" v-for="cu in currentDateList" :key="cu">
-      <view class="flex mr15" @click="pulicClick(cu)">
-        <u-image style="margin: auto" width="40" height="40" src="@/static/images/xunjian/scan.png" v-if="cu.siteType == 1" shape="circle"></u-image>
-
-        <u-image style="margin: auto" width="40" height="40" src="@/static/images/xunjian/NFC.png" v-if="cu.siteType == 2" shape="circle"></u-image>
-      </view>
-      <view class="reportCenter" @click="pulicClick(cu)">
-        <view class="centerSiteName">
-          {{ cu.siteName }}
+  <oa-scroll
+    customClass="scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <view class="flex bg-white mb15 ptb15 pl15" v-for="cu in currentDateList" :key="cu">
+        <view class="flex mr15" @click="pulicClick(cu)">
+          <u-image style="margin: auto" width="40" height="40" src="@/static/images/xunjian/scan.png" v-if="cu.siteType == 1" shape="circle"></u-image>
+
+          <u-image style="margin: auto" width="40" height="40" src="@/static/images/xunjian/NFC.png" v-if="cu.siteType == 2" shape="circle"></u-image>
+        </view>
+        <view class="reportCenter" @click="pulicClick(cu)">
+          <view class="centerSiteName">
+            {{ cu.siteName }}
+            <view
+              :style="{
+                margin: 'auto auto auto 15px',
+                fontSize: '5px',
+                backgroundColor: cu.inspectionStatus == 1 ? '#ffbebb' : '#ABE399',
+                color: cu.inspectionStatus == 1 ? '#FF3128' : '#189400',
+                borderRadius: '10px',
+                padding: '0px 5px',
+              }"
+            >
+              {{ cu.inspectionStatus == 1 ? "未巡检" : "已巡检" }}
+            </view>
+          </view>
+          <view style="font-size: 13px; color: #a1a1a1; margin-bottom: 5px"> 描述:{{ cu.siteDescribe == "" || cu.siteDescribe == null ? "无" : cu.siteDescribe }} </view>
+          <view style="font-size: 13px; color: #a1a1a1">
+            完成时间:
+            {{ cu.inspectionTime ? cu.inspectionTime.replace("T", " ") : "无" }}
+          </view>
+        </view>
+        <view class="reportRight">
           <view
+            class="rightChild"
             :style="{
-              margin: 'auto auto auto 15px',
-              fontSize: '5px',
-              backgroundColor: cu.inspectionStatus == 1 ? '#ffbebb' : '#ABE399',
-              color: cu.inspectionStatus == 1 ? '#FF3128' : '#189400',
-              borderRadius: '10px',
-              padding: '0px 5px',
+              color: cu.siteStatus == null || cu.siteStatus == 0 ? '#a0a0a0' : '#1989fa',
             }"
           >
-            {{ cu.inspectionStatus == 1 ? "未巡检" : "已巡检" }}
+            <text class="iconfont oaIcon-map" style="font-size: 18px"></text>
+            <view>定位</view>
+          </view>
+          <view
+            class="rightChild"
+            :style="{
+              color: cu.siteStatus == null || cu.siteStatus == 0 ? '#a0a0a0' : '#1989fa',
+            }"
+          >
+            <text class="iconfont oaIcon-appstore" style="font-size: 18px"></text>
+
+            <view>状态</view>
           </view>
-        </view>
-        <view style="font-size: 13px; color: #a1a1a1; margin-bottom: 5px"> 描述:{{ cu.siteDescribe == "" || cu.siteDescribe == null ? "无" : cu.siteDescribe }} </view>
-        <view style="font-size: 13px; color: #a1a1a1">
-          完成时间:
-          {{ cu.inspectionTime == "" || cu.inspectionTime == null ? "无" : cu.inspectionTime }}
-        </view>
-      </view>
-      <view class="reportRight">
-        <view
-          class="rightChild"
-          :style="{
-            color: cu.siteStatus == null || cu.siteStatus == 0 ? '#a0a0a0' : '#1989fa',
-          }"
-        >
-          <text class="iconfont ucicon-map" style="font-size: 22px"></text>
-          <view>定位</view>
-        </view>
-        <view
-          class="rightChild"
-          :style="{
-            color: cu.siteStatus == null || cu.siteStatus == 0 ? '#a0a0a0' : '#1989fa',
-          }"
-        >
-          <text class="iconfont ucicon-appstore" style="font-size: 22px"></text>
-
-          <view>状态</view>
         </view>
       </view>
-    </view>
-
-    <oaMovable :themesColor="proxy.$settingStore.themeColor.color">
-      <template #content>
-        <view class="iconfont ucicon-nfc menu-item-icon" @click="nfcClick()"></view>
-        <view class="iconfont ucicon-saoyisao menu-item-icon" @click="scanClick()"></view>
-      </template>
-    </oaMovable>
-  </scroll-view>
+
+      <oaMovable :themesColor="proxy.$settingStore.themeColor.color">
+        <template #content>
+          <view class="iconfont oaIcon-nfc menu-item-icon" @click="nfcClick()"></view>
+          <view class="iconfont oaIcon-saoyisao menu-item-icon" @click="scanClick()"></view>
+        </template>
+      </oaMovable>
+    </template>
+  </oa-scroll>
 </template>
 
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onLoad, onShow, onUnload } from "@dcloudio/uni-app";
 import { ref, onMounted, reactive, computed, getCurrentInstance, toRefs, inject, shallowRef } from "vue";
-import { useStores, commonStores, xunJianStores } from "@/store/modules/index";
-import { recordList, recordOption, siteDetails, planSonSiteDetails } from "@/api/business/mhxf/xunJian/plan.js";
+/*----------------------------------接口引入-----------------------------------*/
+import { recordList, recordOption, siteDetails, planSonSiteDetails } from "@/api/business/zhaf/xunJian/plan.js";
+/*----------------------------------组件引入-----------------------------------*/
 import oaMovable from "@/components/oa-movable/index.vue"; // 引入组件
-
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores, xunJianStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
 const xunJianStore = xunJianStores(); //全局变量值Store
+/*----------------------------------变量声明-----------------------------------*/
 
 function pulicClick(obj) {
   if (obj.inspectionStatus == 2) {
@@ -108,18 +125,11 @@ async function scanClick() {
   uni.scanCode({
     autoZoom: false,
     success: async (e) => {
-      uni.showToast({
-        title: "扫码成功",
-        icon: "none",
-      });
-
+      proxy.$modal.msg("扫码成功");
       siteDetailsApi(e.result);
     },
     fail: (err) => {
-      uni.showToast({
-        title: "扫码失败",
-        icon: "none",
-      });
+      proxy.$modal.msg("扫码失败");
       console.log("扫码失败", err);
     },
     complete: () => {
@@ -137,22 +147,29 @@ function siteDetailsApi(value) {
   xunJianStore.siteId = "";
   xunJianStore.siteNubmber = value;
 
+  if (!proxy.$common.isNetwork()) {
+    return false;
+  }
+
   siteDetails({
     siteId: xunJianStore.siteId,
     siteNubmber: xunJianStore.siteNubmber,
     planSonId: xunJianStore.planSonId,
-  }).then((res) => {
-    if (res.status == "SUCCESS") {
-      currentDateList.value.forEach((res1) => {
-        if (res1.id == res.data.siteList[0].id) {
-          uni.navigateTo({
-            url: "/pages/business/zhaf/xunJian/plan/components/siteDetails",
-          });
-        }
-      });
-    } else {
-    }
-  });
+  })
+    .then((res) => {
+      if (res.status == "SUCCESS") {
+        currentDateList.value.forEach((res1) => {
+          if (res1.id == res.data.siteList[0].id) {
+            uni.navigateTo({
+              url: "/pages/business/zhaf/xunJian/plan/components/siteDetails",
+            });
+          }
+        });
+      }
+    })
+    .catch((err) => {
+      proxy.$modal.msg(err);
+    });
 }
 
 /**
@@ -161,20 +178,21 @@ function siteDetailsApi(value) {
  */
 const currentDateList = ref([]); //地点列表list数据存储
 function currentApi() {
+  if (!proxy.$common.isNetwork()) {
+    return false;
+  }
+
   planSonSiteDetails({
     planSonId: xunJianStore.planSonId,
-  }).then((res) => {
-    if (res.status == "SUCCESS") {
-      currentDateList.value = res.data;
-
-      currentDateList.value.forEach((e) => {
-        if (e.inspectionTime) {
-          e.inspectionTime = e.inspectionTime.replace("T", " ");
-        }
-      });
-    } else {
-    }
-  });
+  })
+    .then((res) => {
+      if (res.status == "SUCCESS") {
+        currentDateList.value = res.data;
+      }
+    })
+    .catch((err) => {
+      proxy.$modal.msg(err);
+    });
 }
 
 onLoad((options) => {

+ 123 - 85
src/pages/business/zhaf/xunJian/plan/components/siteDetails.vue

@@ -1,75 +1,89 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view class="xunjian-plan-siteDetails">
-      <view class="flex bg-white p15 mb15">
-        <u-image style="margin: auto 15px auto 0" width="40" height="40" src="@/static/images/xunjian/scan.png" v-if="siteList.siteType == 1" shape="circle"></u-image>
-        <u-image style="margin: auto 15px auto 0" width="40" height="40" src="@/static/images/xunjian/NFC.png" v-if="siteList.siteType == 2" shape="circle"></u-image>
-
-        <view style="margin: auto auto auto 0">
-          <view style="font-size: 15px; margin-bottom: 2px"> {{ siteList.siteName }} </view>
-          <view style="font-size: 13px; color: #a1a1a1"> {{ siteList.contentCount }}项内容 </view>
+  <oa-scroll
+    customClass="scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <view class="xunjian-plan-siteDetails">
+        <view class="flex bg-white p15 mb15">
+          <u-image style="margin: auto 15px auto 0" width="40" height="40" src="@/static/images/xunjian/scan.png" v-if="siteList.siteType == 1" shape="circle"></u-image>
+          <u-image style="margin: auto 15px auto 0" width="40" height="40" src="@/static/images/xunjian/NFC.png" v-if="siteList.siteType == 2" shape="circle"></u-image>
+
+          <view style="margin: auto auto auto 0">
+            <view style="font-size: 15px; margin-bottom: 2px"> {{ siteList.siteName }} </view>
+            <view style="font-size: 13px; color: #a1a1a1"> {{ siteList.contentCount }}项内容 </view>
+          </view>
+
+          <view style="margin: auto 0 auto 0">
+            <!-- {{ siteList.siteStatus == null }} -->
+            <view style="font-size: 15px; color: #30bb00">已定位</view>
+            <!-- #f07d28 -->
+          </view>
         </view>
 
-        <view style="margin: auto 0 auto 0">
-          <!-- {{ siteList.siteStatus == null }} -->
-          <view style="font-size: 15px; color: #30bb00">已定位</view>
-          <!-- #f07d28 -->
+        <view class="bg-white p15 mb15">
+          <uni-section class="block mb10" title="上报现场" type="line"></uni-section>
+
+          <oa-upload
+            :uploadCount="5"
+            :uploadList="siteList.recordPictureList"
+            :uploadListSrc="'pictureUrl'"
+            :uploadStyle="{
+              width: 'calc(33% - 10px)',
+              height: '110px',
+            }"
+            :uploadCloseStatus="xunJianStore.inspectionStatus == 2"
+            @uploadSuccessChange="uploadSuccessChange"
+            @uploadDeleteChange="uploadDeleteChange"
+          ></oa-upload>
         </view>
-      </view>
-
-      <view class="bg-white p15 mb15">
-        <uni-section class="block mb10" title="上报现场" type="line"></uni-section>
-
-        <oa-upload
-          :uploadCount="9"
-          :uploadList="siteList.recordPictureList"
-          :uploadListSrc="'pictureUrl'"
-          :uploadStyle="{
-            width: 'calc(33% - 10px)',
-            height: '110px',
-          }"
-          :uploadCloseStatus="xunJianStore.inspectionStatus == 2"
-          @uploadSuccessChange="uploadSuccessChange"
-          @uploadDeleteChange="uploadDeleteChange"
-        ></oa-upload>
-      </view>
 
-      <view class="bg-white p15 mb15" style="height: 170px; max-height: 170px">
-        <uni-section class="block mb10" title="备注" type="line"></uni-section>
+        <view class="bg-white p15 mb15" style="height: 170px; max-height: 170px">
+          <uni-section class="block mb10" title="备注" type="line"></uni-section>
 
-        <view style="height: calc(100% - 25px)">
-          <span v-if="xunJianStore.inspectionStatus == 2">
-            {{ siteList.remarks }}
-          </span>
+          <view style="height: calc(100% - 25px)">
+            <span v-if="xunJianStore.inspectionStatus == 2">
+              {{ siteList.remarks }}
+            </span>
 
-          <u-textarea v-if="xunJianStore.inspectionStatus == 1" style="height: 100%" v-model="siteList.remarks" placeholder="请输入备注" maxlength="50"></u-textarea>
+            <u-textarea v-if="xunJianStore.inspectionStatus == 1" style="height: 100%" v-model="siteList.remarks" placeholder="请输入备注" maxlength="50"></u-textarea>
+          </view>
         </view>
-      </view>
 
-      <view class="bg-white p15 mb15">
-        <uni-section class="block mb10" title="点位分布" type="line"></uni-section>
+        <view class="bg-white p15 mb15">
+          <uni-section class="block mb10" title="点位分布" type="line"></uni-section>
 
-        <u-image width="100%" :src="siteList.pictureUrl"></u-image>
+          <u-image width="100%" :src="siteList.pictureUrl"></u-image>
+        </view>
       </view>
-    </view>
-    <view class="app-button-fixed">
-      <u-button v-if="xunJianStore.inspectionStatus == 1" class="app-buttom" type="primary" @click="buttonClick()" shape="circle"> 下一步 </u-button>
-
-      <u-button v-if="xunJianStore.inspectionStatus == 2" class="app-buttom" type="primary" @click="buttonClick()" shape="circle"> 查看巡检项 </u-button>
-    </view>
-  </scroll-view>
+      <view class="app-button-fixed">
+        <u-button v-if="xunJianStore.inspectionStatus == 1" class="app-buttom" type="primary" @click="buttonClick()" shape="circle"> 下一步 </u-button>
+        <u-button v-if="xunJianStore.inspectionStatus == 2" class="app-buttom" type="primary" @click="buttonClick()" shape="circle"> 查看巡检项 </u-button>
+      </view>
+    </template>
+  </oa-scroll>
 </template>
 
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onLoad, onShow } from "@dcloudio/uni-app";
 import { ref, onMounted, reactive, computed, getCurrentInstance, toRefs, inject, shallowRef } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { recordList, recordOption, siteDetails } from "@/api/business/zhaf/xunJian/plan.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
 import { useStores, commonStores, xunJianStores } from "@/store/modules/index";
-
-import { recordList, recordOption, siteDetails } from "@/api/business/mhxf/xunJian/plan.js";
-
-const xunJianStore = xunJianStores(); //全局变量值Store
-
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
+const xunJianStore = xunJianStores(); //全局变量值Store
+/*----------------------------------变量声明-----------------------------------*/
 
 /**
  * @站点详情
@@ -80,24 +94,64 @@ const { proxy } = getCurrentInstance();
 const siteList = ref([]);
 const contentList = ref([]);
 function selectAPI() {
+  if (!proxy.$common.isNetwork()) {
+    return false;
+  }
+
   siteDetails({
     siteId: xunJianStore.siteId,
     siteNubmber: xunJianStore.siteNubmber,
     planSonId: xunJianStore.planSonId,
-  }).then((res) => {
-    if (res.status == "SUCCESS") {
-      contentList.value = res.data.contentList;
-      siteList.value = res.data.siteList[0];
-      siteList.value.recordPictureList = [];
-
-      contentList.value.forEach((el) => {
-        el.remarksBool = false;
-        el.contentOptionListValue = "";
-        el.contentOptionListValue1 = [];
-      });
-    } else {
-    }
-  });
+  })
+    .then((res) => {
+      if (res.status == "SUCCESS") {
+        contentList.value = res.data.contentList;
+        siteList.value = res.data.siteList[0];
+        siteList.value.recordPictureList = [];
+
+        contentList.value.forEach((el) => {
+          el.remarksBool = false;
+          el.contentOptionListValue = "";
+          el.contentOptionListValue1 = [];
+        });
+      }
+    })
+    .catch((err) => {
+      proxy.$modal.msg(err);
+    });
+}
+
+/**
+ * @巡检记录 recordList
+ * @查看巡检项 recordOption
+ * @api接口查询
+ */
+function recordAPI() {
+  if (!proxy.$common.isNetwork()) {
+    return false;
+  }
+
+  recordList({
+    siteId: xunJianStore.siteId,
+    planSonId: xunJianStore.planSonId,
+  })
+    .then((res) => {
+      if (res.status == "SUCCESS") {
+        if (res.data.length > 0) {
+          recordOption({
+            siteId: res.data[0].siteId,
+            recordId: res.data[0].id,
+          }).then((res1) => {
+            contentList.value = res1.data.contentList;
+            siteList.value = res.data[0];
+          });
+        }
+      } else {
+      }
+    })
+    .catch((err) => {
+      proxy.$modal.msg(err);
+    });
 }
 
 /**
@@ -137,23 +191,7 @@ onLoad((options) => {
   if (xunJianStore.inspectionStatus == 1) {
     selectAPI();
   } else if (xunJianStore.inspectionStatus == 2) {
-    recordList({
-      siteId: xunJianStore.siteId,
-      planSonId: xunJianStore.planSonId,
-    }).then((res) => {
-      if (res.status == "SUCCESS") {
-        if (res.data.length > 0) {
-          recordOption({
-            siteId: res.data[0].siteId,
-            recordId: res.data[0].id,
-          }).then((res1) => {
-            contentList.value = res1.data.contentList;
-            siteList.value = res.data[0];
-          });
-        }
-      } else {
-      }
-    });
+    recordAPI();
   }
 });
 

+ 110 - 72
src/pages/business/zhaf/xunJian/plan/index.vue

@@ -1,6 +1,15 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view class="xunjian-plan-container">
+  <oa-scroll
+    customClass="xunjian-plan-container scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
       <!-- 日历组件 -->
       <oa-calendar class="uni-calendar--hook" :selected="info.selected" :showMonth="false" @change="change" @monthSwitch="monthSwitch" :currentDate="currentDateList" />
 
@@ -69,7 +78,7 @@
         <oa-timeLine-item
           v-for="(ac, index) in activities"
           :key="index"
-          :titleValue="ac.areaName"
+          :titleValue="ac.siteName"
           :timeValue="ac.createTime"
           :iconColor="proxy.$settingStore.themeColor.color"
           v-show="tabPosition == 1"
@@ -91,32 +100,35 @@
       </oa-timeLine>
 
       <view id="planTimeline" style="text-align: center; color: #bdbdbd; font-size: 14px" v-else> 暂无数据 </view>
-    </view>
 
-    <oaMovable v-if="scanArray.length <= 0" :themesColor="proxy.$settingStore.themeColor.color">
-      <template #content>
-        <view class="iconfont ucicon-nfc menu-item-icon" @click="nfcClick()"></view>
-        <view class="iconfont ucicon-saoyisao menu-item-icon" @click="scanClick()"></view>
-      </template>
-    </oaMovable>
+      <oaMovable v-if="scanArray.length <= 0" :themesColor="proxy.$settingStore.themeColor.color">
+        <template #content>
+          <view class="iconfont oaIcon-nfc menu-item-icon" @click="nfcClick()"></view>
+          <view class="iconfont oaIcon-saoyisao menu-item-icon" @click="scanClick()"></view>
+        </template>
+      </oaMovable>
 
-    <drawer v-if="scanArray.length > 0" :scanArray="scanArray" :scanBool="scanBool" @scanClose="scanClose"></drawer>
-  </scroll-view>
+      <drawer v-if="scanArray.length > 0" :scanArray="scanArray" :scanBool="scanBool" @scanClose="scanClose"></drawer>
+    </template>
+  </oa-scroll>
 </template>
 
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onLoad, onShow, onLaunch, onUnload } from "@dcloudio/uni-app";
 import { ref, onMounted, reactive, computed, getCurrentInstance, toRefs, inject, shallowRef, defineAsyncComponent } from "vue";
-import { useStores, commonStores, xunJianStores } from "@/store/modules/index";
-import { recordList, recordOption, planList, patrolInspectionPlan, appPlanStatistics } from "@/api/business/mhxf/xunJian/plan.js";
+/*----------------------------------接口引入-----------------------------------*/
+import { recordList, recordOption, planList, patrolInspectionPlan, appPlanStatistics } from "@/api/business/zhaf/xunJian/plan.js";
+/*----------------------------------组件引入-----------------------------------*/
 import drawer from "./components/drawer.vue"; // 引入组件
 import oaMovable from "@/components/oa-movable/index.vue"; // 引入组件
-
-const commonStore = commonStores(); //全局公共Store
-const xunJianStore = xunJianStores(); //全局变量值Store
-
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores, xunJianStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
+const xunJianStore = xunJianStores(); //全局变量值Store
+/*----------------------------------变量声明-----------------------------------*/
 const info = ref({
   lunar: true,
   range: true,
@@ -207,22 +219,29 @@ function scanClick() {
 function planListApi(value) {
   xunJianStore.inspectionStatus = 1;
 
+  if (!proxy.$common.isNetwork()) {
+    return false;
+  }
+
   planList({
     siteNubmber: value,
-  }).then((res) => {
-    if (res.status == "SUCCESS") {
-      if (res.data.length > 0) {
-        scanArray.value = res.data;
-        scanBool.value = true;
-      } else {
-        uni.showToast({
-          title: "此点位下暂无数据,请切换点位重试!",
-          icon: "none",
-        });
+  })
+    .then((res) => {
+      if (res.status == "SUCCESS") {
+        if (res.data.length > 0) {
+          scanArray.value = res.data;
+          scanBool.value = true;
+        } else {
+          uni.showToast({
+            title: "此点位下暂无数据,请切换点位重试!",
+            icon: "none",
+          });
+        }
       }
-    } else {
-    }
-  });
+    })
+    .catch((err) => {
+      proxy.$modal.msg(err);
+    });
 }
 
 /**
@@ -242,49 +261,59 @@ function scanClose(flag) {
 const activities = ref([]);
 function activitiesApi() {
   activities.value = [];
+
+  if (!proxy.$common.isNetwork()) {
+    return false;
+  }
+
   if (tabPosition.value == 0) {
     patrolInspectionPlan({
       currentDate: currentDate.value,
       sort: activitiesSort.value,
-    }).then((res) => {
-      if (res.status == "SUCCESS") {
-        res.data.forEach((el) => {
-          activities.value.push({
-            id: el.id,
-            planName: el.planName,
-            timestamp:
-              (el.startTime == null || el.startTime == "" ? "" : el.startTime.split(":")[0] + ":" + el.startTime.split(":")[1] + "~") +
-              (el.endTime == null || el.endTime == "" ? "" : el.endTime.split(":")[0] + ":" + el.endTime.split(":")[1]),
-
-            planStatus: el.planStatus,
-            completion: el.completion,
-            patrolledSiteCount: el.patrolledSiteCount,
-            undetectedSiteCount: el.undetectedSiteCount,
+    })
+      .then((res) => {
+        if (res.status == "SUCCESS") {
+          res.data.forEach((el) => {
+            activities.value.push({
+              id: el.id,
+              planName: el.planName,
+              timestamp: (el.startTime ? el.startTime.split(":")[0] + ":" + el.startTime.split(":")[1] + "~" : "") + (el.endTime ? el.endTime.split(":")[0] + ":" + el.endTime.split(":")[1] : ""),
+              planStatus: el.planStatus,
+              completion: el.completion,
+              patrolledSiteCount: el.patrolledSiteCount,
+              undetectedSiteCount: el.undetectedSiteCount,
+            });
           });
-        });
-      } else {
-      }
-    });
+        } else {
+        }
+      })
+      .catch((err) => {
+        proxy.$modal.msg(err);
+      });
   } else if (tabPosition.value == 1) {
     recordList({
       currentDate: currentDate.value,
       sort: activitiesSort.value,
-    }).then((res) => {
-      if (res.status == "SUCCESS") {
-        res.data.forEach((el) => {
-          activities.value.push({
-            siteId: el.siteId,
-            planSonId: el.planSonId,
-            areaName: el.areaName,
-            siteName: el.siteName,
-            contentCount: el.contentCount,
-            createTime: el.createTime ? el.createTime.replace("T", " ") : el.createTime,
-            siteStatus: el.siteStatus,
+    })
+      .then((res) => {
+        if (res.status == "SUCCESS") {
+          res.data.forEach((el) => {
+            activities.value.push({
+              siteId: el.siteId,
+              planSonId: el.planSonId,
+              areaName: el.areaName,
+              siteName: el.siteName,
+              contentCount: el.contentCount,
+              createTime: el.createTime ? el.createTime.replace("T", " ") : el.createTime,
+              siteStatus: el.siteStatus,
+            });
           });
-        });
-      } else {
-      }
-    });
+        } else {
+        }
+      })
+      .catch((err) => {
+        proxy.$modal.msg(err);
+      });
   }
 }
 
@@ -292,18 +321,26 @@ function activitiesApi() {
  * @统计
  * @api接口请求
  */
-const currentDate = ref(commonStore.getDate().year + "-" + commonStore.getDate().month + "-" + commonStore.getDate().dates); //统计时间数据存储
+const currentDate = ref(proxy.$common.getDate().year + "-" + proxy.$common.getDate().month + "-" + proxy.$common.getDate().dates); //统计时间数据存储
 const currentDatevalue = ref(new Date());
 const currentDateList = ref({}); //统计list数据存储
 function currentApi() {
+  if (!proxy.$common.isNetwork()) {
+    return false;
+  }
+
   appPlanStatistics({
     currentDate: currentDate.value,
-  }).then((res) => {
-    if (res.status == "SUCCESS") {
-      currentDateList.value = res.data;
-    } else {
-    }
-  });
+  })
+    .then((res) => {
+      if (res.status == "SUCCESS") {
+        currentDateList.value = res.data;
+      } else {
+      }
+    })
+    .catch((err) => {
+      proxy.$modal.msg(err);
+    });
 }
 
 /**
@@ -333,6 +370,7 @@ onLoad((options) => {
 
   currentApi();
   activitiesApi();
+  xunJianStore.planForSubmit(); //调用巡检计划循环提交
 
   // 从详情页返回该页面的获取数据
   uni.$on("planSelect", () => {

+ 3 - 10
src/pages/business/zhaf/xunJian/record/index.vue

@@ -11,7 +11,7 @@
           </view>
           <view class="pro-date">{{ item.wc_time }}</view>
         </view>
-        <view class="nav-right num margin-right-sm">
+        <view class="nav-right num mr10">
           <view class="text-grey">
             <button class="cu-btn radius bg-green sm" v-if="item.spot_abnormal == 0">正常</button>
             <button class="cu-btn radius bg-orange sm" v-if="item.spot_abnormal == 1">异常</button>
@@ -28,17 +28,10 @@
 import { ref, onMounted, reactive, computed, getCurrentInstance, toRefs, inject, shallowRef } from "vue";
 import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
 
-import { getInspectionRecordList } from "@/api/business/mhxf/xunJian/record.js";
+import { getInspectionRecordList } from "@/api/business/zhaf/xunJian/record.js";
 
 const modalName = ref(null);
-const getData = ref([
-  {
-    plan_name: "计划咦",
-    spot_name: "点位1",
-    wc_time: "2023-10-22 14:14:14",
-    spot_abnormal: 0,
-  },
-]);
+const getData = ref([]);
 
 const { proxy } = getCurrentInstance();
 

+ 9 - 9
src/pages/business/zhaf/xunJian/record/recordDetail/index.vue

@@ -1,6 +1,6 @@
 <template>
   <view>
-    <view class="timeBox flex justify-between align-center padding-lr-sm">
+    <view class="timeBox flex justify-between align-center plr10">
       <view class="time">{{ getData.plan_name }}</view>
       <button class="cu-btn radius bg-green sm" v-if="getData.spot_abnormal == 0">正常</button>
       <button class="cu-btn radius bg-orange sm" v-if="getData.spot_abnormal == 1">异常</button>
@@ -10,8 +10,8 @@
 
     <view>
       <view class="basic-info">
-        <view class="info-tit margin-left-xs">
-          <text class="cuIcon-titles margin-right-xs"></text>
+        <view class="info-tit ml5">
+          <text class="cuIcon-titles mr5"></text>
           基本信息
         </view>
         <view class="info-content">
@@ -45,8 +45,8 @@
 
       <!-- 巡检信息 -->
       <view class="basic-info">
-        <view class="info-tit margin-left-xs">
-          <text class="cuIcon-titles margin-right-xs"></text>
+        <view class="info-tit ml5">
+          <text class="cuIcon-titles mr5"></text>
           巡检信息
         </view>
         <view class="info-content">
@@ -67,11 +67,11 @@
       </view>
       <!-- 处理状态start -->
       <view class="processStatus">
-        <view class="info-tit margin-left-xs">
-          <text class="cuIcon-titles margin-right-xs"></text>
+        <view class="info-tit ml5">
+          <text class="cuIcon-titles mr5"></text>
           巡检图片
         </view>
-        <view class="padding-lr padding-bottom-lg imgPic">
+        <view class="plr15 pb20 imgPic">
           <image v-if="!getData.report_photos && dataRes == 1" mode="widthFix" src="@/static/images/defaultImg.jpg" width="100%" />
           <image v-else mode="widthFix" :src="`${websiteUrl}${getData.report_photos}`" width="100%" />
         </view>
@@ -86,7 +86,7 @@ import { onLoad, onShow, onLaunch } from "@dcloudio/uni-app";
 import { ref, onMounted, reactive, computed, getCurrentInstance, toRefs, inject, shallowRef } from "vue";
 import { useStores, commonStores, xunJianStores } from "@/store/modules/index";
 
-import { getInspectionRecordDetails } from "@/api/business/mhxf/xunJian/record.js";
+import { getInspectionRecordDetails } from "@/api/business/zhaf/xunJian/record.js";
 
 const { proxy } = getCurrentInstance();
 

+ 41 - 45
src/pages/business/zhaf/xunJian/xunJian.vue

@@ -1,63 +1,59 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view class="padding-sm">
-      <!-- 图表 -->
-      <view class="section1 section bg-white padding-xs">
-        <chart :currentDateList="currentDateList"></chart>
-      </view>
-      <!-- 图表 end-->
-
-      <!-- <view class="cu-list menu-avatar">
-				<view class="cu-item deviceTypeItem" v-for="(item,index) in inspectList" :key="index"
-					@tap="goRecordPage(index)">
-					<view class="cu-avatar round">
-						<image class="image-bg" :src=item.imgUrl />
-					</view>
-					<view class="content">
-						<view class="title">{{item.title}}</view>
-					</view>
-					<view class="nav-right num">
-						<view>
-							<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
-						</view>
-					</view>
-				</view>
-			</view> -->
+  <oa-scroll
+    customClass="scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <view class="p10">
+        <!-- 图表 -->
+        <view class="bg-white p5">
+          <chart :currentDateList="currentDateList"></chart>
+        </view>
+        <!-- 图表 end-->
 
-      <!-- 宫格列表 -->
-      <view class=" section bg-white margin-top-sm">
-        <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.num != 0">
-              <block v-if="item.num != 0">{{ item.num > 99 ? "99+" : item.num }}</block>
+        <!-- 宫格列表 -->
+        <view class="bg-white mt10">
+          <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.num != 0">
+                <block v-if="item.num != 0">{{ item.num > 99 ? "99+" : item.num }}</block>
+              </view>
+              <text style="font-size: 14px">{{ item.title }}</text>
             </view>
-            <text style="font-size: 14px">{{ item.title }}</text>
           </view>
         </view>
+        <!-- 宫格列表 end -->
       </view>
-      <!-- 宫格列表 end -->
-    </view>
-  </scroll-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, commonStores } from "@/store/modules/index";
-
+/*----------------------------------接口引入-----------------------------------*/
+import { appPlanStatistics } from "@/api/business/zhaf/xunJian/index.js";
+/*----------------------------------组件引入-----------------------------------*/
 import chart from "./components/chart.vue";
-
-import { appPlanStatistics } from "@/api/business/mhxf/xunJian/index.js";
-
+/*----------------------------------store引入-----------------------------------*/
+import { xunJianStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
 const commonStore = commonStores(); //全局公共Store
 const xunJianStore = xunJianStores(); //全局变量值Store
+/*----------------------------------变量声明-----------------------------------*/
+const inspectList = proxy.$constData.xunJianList; //九宫格json数据
 
-const { proxy } = getCurrentInstance();
-
-const inspectList = proxy.$grid.xunJianList; //九宫格json数据
-
-const currentDate = commonStore.getDate().year + "-" + commonStore.getDate().month + "-" + commonStore.getDate().dates;
+const currentDate = proxy.$common.getDate().year + "-" + proxy.$common.getDate().month + "-" + proxy.$common.getDate().dates;
 const currentDateList = ref([]);
 
 function navItemClick(url, id) {

+ 6 - 6
src/pages/business/zhxf/building/index.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="setting-building">
-    <uni-section class="block mb-10" title="基本信息" type="line" titleFontSize="16px" titleColor="#4074E7"></uni-section>
-    <view class="basic-info padding-lr">
+    <uni-section class="block mb10" title="基本信息" type="line" titleFontSize="16px" titleColor="#4074E7"></uni-section>
+    <view class="basic-info p10">
       <u-row>
         <u-col span="5"> 建筑物名称 </u-col>
         <u-col span="7"> {{ getDetailData.build_name }} </u-col>
@@ -76,18 +76,18 @@
       </u-row>
     </view>
 
-    <uni-section class="block mb-10" title="消防设施平面布置图" type="line" titleFontSize="16px" titleColor="#4074E7"></uni-section>
+    <uni-section class="block mb10" title="消防设施平面布置图" type="line" titleFontSize="16px" titleColor="#4074E7"></uni-section>
     <view class="processStatus">
-      <view class="padding-lr imgPic">
+      <view class="plr10 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="block mb-10" title="建筑平面图" type="line" titleFontSize="16px" titleColor="#4074E7"></uni-section>
+    <uni-section class="block mb10" title="建筑平面图" type="line" titleFontSize="16px" titleColor="#4074E7"></uni-section>
 
     <view class="processStatus">
-      <view class="padding-lr padding-bottom-lg imgPic">
+      <view class="plr10 pb20 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>

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

@@ -6,6 +6,7 @@
     :refresherLoad="true"
     :refresherLoadTitle="false"
     :refresherEnabled="true"
+    :refresherEnabledTitle="false"
     :refresherDefaultStyle="'none'"
     :refresherThreshold="44"
     :refresherBackground="'#f5f6f7'"

+ 67 - 111
src/pages/business/zhxf/fireInspect/inspectDetails/index.vue

@@ -1,6 +1,15 @@
 <template>
-  <scroll-view class="scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view class="alarmDetails-container">
+  <oa-scroll
+    customClass="inspectDetails-container scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
       <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>
 
@@ -17,7 +26,7 @@
 
       <view class="bg-white p15 mb15">
         <uni-section class="block mb10" title="基本信息" type="line"></uni-section>
-        <view class="tableType3 padding-0">
+        <view class="tableType3 p0">
           <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>
@@ -31,7 +40,7 @@
 
       <view class="bg-white p15 mb15" v-if="dataArray.handleStatus == 1">
         <uni-section class="block mb10" title="处理信息" type="line"></uni-section>
-        <view class="tableType3 padding-0">
+        <view class="tableType3 p0">
           <u-row v-for="da in dataList2" :key="da">
             <u-col span="4">
               <view style="text-align: right; padding: 0px 5px 0px 5px">{{ da.title }}</view>
@@ -84,61 +93,46 @@
           ></u-button>
         </view>
       </view>
-    </view>
-  </scroll-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 { eleInspectList, dealPutEle, persInspectList, dealPutPer } from "@/api/business/zhxf/fireInspect/index.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
 
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
-const dataArray = ref({});
-const dataList = ref([
-  {
-    title: "督察单编号",
-    value: "",
-  },
-  {
-    title: "督察单内容",
-    value: "",
-  },
-]);
-const dataList2 = ref([
-  {
-    title: "处理账号/电话",
-    value: "",
-  },
-  {
-    title: "处理时间",
-    value: "",
-  },
-  // {
-  //   title: "处理内容",
-  //   value: "",
-  // },
-]);
-
-const deviceName = ref("");
-const alarmTime = ref("");
-const id = ref("");
-const productName = ref("");
-const pageSize = ref(20);
-const current = ref(1);
-const total = ref(0);
-const handleRange = ref(1);
-const handleRangeList = ref([
-  {
-    label: "单个处理",
-    value: 1,
-  },
-  {
-    label: "批量处理",
-    value: 0,
-  },
-]);
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  id: "",
+  productName: "",
+  pageSize: 20,
+  current: 1,
+  total: 0,
+
+  dataArray: {},
+  dataList: [
+    { title: "督察单编号", value: "" },
+    { title: "督察单内容", value: "" },
+  ],
+  dataList2: [
+    { title: "处理账号/电话", value: "" },
+    { title: "处理时间", value: "" },
+  ],
+  handleRange: 1,
+  handleRangeList: [
+    { label: "单个处理", value: 1 },
+    { label: "批量处理", value: 0 },
+  ],
+});
+const { dataArray, dataList, dataList2, handleRange, handleRangeList } = toRefs(state);
 
 /**
  * @页面初始化
@@ -152,55 +146,25 @@ function init() {
  * @api接口查询
  */
 function selectListApi() {
-
-  if (productName.value == "电子督察单") {
-
-    getDetail(eleInspectList,'电子')
-    // eleInspectList({
-    //   id: id.value,
-    //   pageNum: current.value,
-    //   pageSize: pageSize.value,
-    // }).then((requset) => {
-    //   if (requset.status === "SUCCESS") {
-    //     dataArray.value = requset.data.records[0];
-    //     dataList.value[0].value = requset.data.records[0].superviseCode;
-    //     dataList.value[1].value = requset.data.records[0].content;
-    //     dataList2.value[0].value = requset.data.records[0].handlePhone;
-    //     dataList2.value[1].value = requset.data.records[0].handleTime;
-    //     total.value = requset.data.total;
-    //   }
-    // });
+  if (state.productName == "电子督察单") {
+    getDetail(eleInspectList, "电子");
   } else {
-    getDetail(persInspectList,'人工')
-    // persInspectList({
-    //   id: id.value,
-    //   pageNum: current.value,
-    //   pageSize: pageSize.value,
-    // }).then((requset) => {
-    //   if (requset.status === "SUCCESS") {
-    //     dataArray.value = requset.data.records[0];
-    //     dataList.value[0].value = requset.data.records[0].artificialCode;
-    //     dataList.value[1].value = requset.data.records[0].content;
-    //     dataList2.value[0].value = requset.data.records[0].handlePhone;
-    //     dataList2.value[1].value = requset.data.records[0].handleTime;
-    //     total.value = requset.data.total;
-    //   }
-    // });
+    getDetail(persInspectList, "人工");
   }
 
-  function getDetail(param,param2){
+  function getDetail(param, param2) {
     param({
-      id: id.value,
-      pageNum: current.value,
-      pageSize: pageSize.value,
+      id: state.id,
+      pageNum: state.current,
+      pageSize: state.pageSize,
     }).then((requset) => {
       if (requset.status === "SUCCESS") {
-        dataArray.value = requset.data.records[0];
-        dataList.value[0].value = param2=='电子'?requset.data.records[0].superviseCode:requset.data.records[0].artificialCode;
-        dataList.value[1].value = requset.data.records[0].content;
-        dataList2.value[0].value = requset.data.records[0].handlePhone;
-        dataList2.value[1].value = requset.data.records[0].handleTime;
-        total.value = requset.data.total;
+        state.dataArray = requset.data.records[0];
+        state.dataList.value[0] = param2 == "电子" ? requset.data.records[0].superviseCode : requset.data.records[0].artificialCode;
+        state.dataList.value[1] = requset.data.records[0].content;
+        state.dataList2.value[0] = requset.data.records[0].handlePhone;
+        state.dataList2.value[1] = requset.data.records[0].handleTime;
+        state.total = requset.data.total;
       }
     });
   }
@@ -210,12 +174,11 @@ function selectListApi() {
  * @提交
  */
 function handleSubmit() {
- 
-  if (productName.value == "电子督察单") {
+  if (state.productName == "电子督察单") {
     dealPutEle({
-      id: dataArray.value.id,
-      handleContent: dataArray.value.handleContent,
-      handleRange: handleRange.value,
+      id: state.dataArray.id,
+      handleContent: state.dataArray.handleContent,
+      handleRange: state.handleRange,
     }).then((requset) => {
       if (requset.status === "SUCCESS") {
         proxy.$tab.navigateTo(`/pages/common/success/index?codeName=提交成功`);
@@ -223,9 +186,9 @@ function handleSubmit() {
     });
   } else {
     dealPutPer({
-      id: dataArray.value.id,
-      handleContent: dataArray.value.handleContent,
-      handleRange: handleRange.value,
+      id: state.dataArray.id,
+      handleContent: state.dataArray.handleContent,
+      handleRange: state.handleRange,
     }).then((requset) => {
       if (requset.status === "SUCCESS") {
         proxy.$tab.navigateTo(`/pages/common/success/index?codeName=提交成功`);
@@ -242,18 +205,11 @@ onShow(() => {
 });
 
 onLoad((options) => {
-  if ("deviceName" in options) {
-    deviceName.value = options.deviceName;
-  }
-
-  if ("alarmTime" in options) {
-    alarmTime.value = options.alarmTime;
-  }
   if ("id" in options) {
-    id.value = options.id;
+    state.id = options.id;
   }
   if ("productName" in options) {
-    productName.value = options.productName;
+    state.productName = options.productName;
   }
   init();
 });

+ 43 - 45
src/pages/business/zhxf/fireInspect/inspectDetailsList/index.vue

@@ -1,12 +1,13 @@
 <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-tabs :list="state.tabsList" :current="state.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"
+    :pageSize="state.pageSize"
+    :total="state.total"
+    :isSticky="true"
     :refresherLoad="true"
     :refresherEnabled="true"
     :refresherDefaultStyle="'none'"
@@ -19,7 +20,7 @@
   >
     <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="list-cell list-cell-arrow" style="line-height: 25px" v-for="(base, index) in state.dataList" :key="index" @click="handleToDetails(base)">
           <view class="menu-item">
             <image
               class="image-bg"
@@ -44,33 +45,32 @@
 </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 { eleInspectList, persInspectList } from "@/api/business/zhxf/fireInspect/index.js";
-
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
-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);
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  tabsList: [
+    { name: "全部", value: "" },
+    { name: "未处理", value: 0 },
+    { name: "已处理", value: 1 },
+  ],
+  tabsCurrent: 0,
+
+  dataList: [],
+  productCode: "",
+  productName: "",
+  pageSize: 20,
+  current: 1,
+  total: 0,
+});
 
 /**
  * @页面初始化
@@ -84,24 +84,23 @@ function init() {
  * @api接口查询
  */
 function selectListApi() {
-  if (productName.value == "电子督察单") {
-    getList(eleInspectList)
+  if (state.productName == "电子督察单") {
+    getList(eleInspectList);
   } else {
-    getList(persInspectList)
+    getList(persInspectList);
   }
 
-
-  function getList(param){
+  function getList(param) {
     param({
-      handleStatus: tabsList.value[tabsCurrent.value].value,
-      pageNum: current.value,
-      pageSize: pageSize.value,
+      handleStatus: state.tabsList[state.tabsCurrent].value,
+      pageNum: state.current,
+      pageSize: state.pageSize,
     }).then((requset) => {
       if (requset.status === "SUCCESS") {
-        dataList.value = requset.data.records;
-        total.value = requset.data.total;
+        state.dataList = requset.data.records;
+        state.total = requset.data.total;
         uni.setNavigationBarTitle({
-          title: `${productName.value}(${total.value})`,
+          title: `${state.productName}(${state.total})`,
         });
       }
     });
@@ -113,14 +112,14 @@ function selectListApi() {
  */
 function handleToDetails(e) {
   console.log(e);
-  proxy.$tab.navigateTo(`/pages/business/zhxf/fireInspect/inspectDetails/index?id=${e.id}&productName=${productName.value}`);
+  proxy.$tab.navigateTo(`/pages/business/zhxf/fireInspect/inspectDetails/index?id=${e.id}&productName=${state.productName}`);
 }
 
 /**
  * @scrollView加载数据
  */
 function load() {
-  pageSize.value += 10;
+  state.pageSize += 10;
   init();
 }
 
@@ -128,8 +127,7 @@ function load() {
  * @scrollView刷新数据
  */
 function refresh() {
-  pageSize.value = 20;
-  total.value = 0;
+  state.pageSize = 20;
   init();
 }
 
@@ -137,7 +135,7 @@ function refresh() {
  * @tabs点击事件
  */
 function tabsClick(e) {
-  tabsCurrent.value = e.index;
+  state.tabsCurrent = e.index;
   init();
 }
 
@@ -151,10 +149,10 @@ onShow(() => {
 
 onLoad((options) => {
   if ("productName" in options) {
-    productName.value = options.productName;
+    state.productName = options.productName;
   }
   if ("productCode" in options) {
-    productCode.value = options.productCode;
+    state.productCode = options.productCode;
     init();
   }
 });

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

@@ -42,7 +42,7 @@
     </uni-forms>
 
     <view class="buttom">
-      <button class="bg-blue round margin-top" @tap="submit()">提 交</button>
+      <button class="bg-blue round mt15" @tap="submit()">提 交</button>
     </view>
   </view>
 </template>

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

@@ -41,7 +41,7 @@
           </view>
           <view class="nav-right num">
             <view class="text-grey">
-              <text class="icon iconfont margin-right-sm margin-left-lg">&#xe629;</text>
+              <text class="icon iconfont mr10 ml20">&#xe629;</text>
             </view>
           </view>
           <view class="move">

+ 14 - 54
src/pages/business/zhxf/messagePush/index.vue

@@ -1,8 +1,8 @@
 <template>
-  <view class="padding-sm setting-messagePush">
+  <view class="p10 setting-messagePush">
     <form action="">
       <checkbox-group class="block" @change="CheckboxChange">
-        <view class="margin-top">
+        <view class="mt15">
           <view class="flex align-center checkItems" v-for="(item, index) in checkbox" :key="index">
             <checkbox class="blue" :class="item.checked == 1 ? 'checked' : ''" :checked="item.checked == 1 ? true : false" :value="item.value"></checkbox>
             <view class="title">{{ item.title }}</view>
@@ -11,7 +11,7 @@
       </checkbox-group>
 
       <view class="btn-area submitBottomBtn">
-        <button class="bg-blue round margin-top" @click="$noMultipleClicks(btnSubmit)">提 交</button>
+        <button class="bg-blue round mt15" @click="$noMultipleClicks(btnSubmit)">提 交</button>
       </view>
     </form>
   </view>
@@ -34,56 +34,16 @@ const data = reactive({
   getData: {},
   checkedValue: [],
   checkbox: [
-    {
-      value: "m1",
-      checked: false,
-      title: "火警报警",
-    },
-    {
-      value: "m2",
-      checked: false,
-      title: "火警故障",
-    },
-    {
-      value: "m3",
-      checked: false,
-      title: "水压越线",
-    },
-    {
-      value: "m4",
-      checked: false,
-      title: "开关变化",
-    },
-    {
-      value: "m5",
-      checked: false,
-      title: "设备离线",
-    },
-    {
-      value: "m6",
-      checked: false,
-      title: "烟感报警",
-    },
-    {
-      value: "m7",
-      checked: false,
-      title: "电气火灾",
-    },
-    {
-      value: "m8",
-      checked: false,
-      title: "视频报警",
-    },
-    {
-      value: "m9",
-      checked: false,
-      title: "电梯监测",
-    },
-    {
-      value: "m10",
-      checked: false,
-      title: "井盖监测",
-    },
+    { value: "m1", checked: false, title: "火警报警" },
+    { value: "m2", checked: false, title: "火警故障" },
+    { value: "m3", checked: false, title: "水压越线" },
+    { value: "m4", checked: false, title: "开关变化" },
+    { value: "m5", checked: false, title: "设备离线" },
+    { value: "m6", checked: false, title: "烟感报警" },
+    { value: "m7", checked: false, title: "电气火灾" },
+    { value: "m8", checked: false, title: "视频报警" },
+    { value: "m9", checked: false, title: "电梯监测" },
+    { value: "m10", checked: false, title: "井盖监测" },
   ],
 });
 
@@ -128,7 +88,7 @@ function getCheckList(params = {}) {
 //提交
 async function btnSubmit() {
   // 提交验证
-  
+
   let mingParams = {};
   if (!flag.value) {
     //不点击默认传参

+ 37 - 45
src/pages/common/alarmMessage/index.vue

@@ -1,8 +1,8 @@
 <template>
   <oa-scroll
     customClass="alarmMessage-container scroll-height"
-    :pageSize="pageSize"
-    :total="total"
+    :pageSize="state.pageSize"
+    :total="state.total"
     :refresherLoad="true"
     :refresherEnabled="true"
     :refresherDefaultStyle="'none'"
@@ -13,9 +13,10 @@
     :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
   >
     <template #default>
+      <u-loading-page :loading="state.loading" fontSize="16" style="z-index: 99"></u-loading-page>
       <view class="content-area">
         <view :id="ind == allInfoList.length - 1 ? 'bottomInfo' : ''" v-for="(el, ind) in allInfoList" :key="ind" v-show="allInfoList.length > 0" @click="goContentDetails(el)">
-          <view class="content-area-time font24">{{ el.time }}</view>
+          <view class="content-area-time font12">{{ el.time }}</view>
           <view class="content-area-center radius bg-white">
             <image class="content-area-center-img radius mb10" v-if="el.sitePhoto" :src="el.sitePhoto" />
             <view class="content-area-center-title mb10">{{ el.deviceName }}</view>
@@ -25,13 +26,13 @@
             </view>
             <view class="content-area-center-cont">
               <span class="label">告警类型:</span>
-              {{ mapping("typeName", el.alarmType, alarmTypeData) }}
+              {{ proxy.$common.mapping("typeName", "typeCode", el.alarmType, alarmTypeData) }}
             </view>
             <view class="content-area-center-cont">
               <span class="label">告警时间:</span>
               {{ el.alarmTime }}
             </view>
-            <view class="content-area-center-buttom font24">查看详情 </view>
+            <view class="content-area-center-buttom font12">查看详情 </view>
           </view>
         </view>
       </view>
@@ -42,23 +43,21 @@
 <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 { infoList } from "@/api/common/message.js";
 import { baseAlarmList, getTypePage } from "@/api/business/fireIot/alarmManage.js";
 
-const useStore = useStores();
 const { proxy } = getCurrentInstance();
 
-const pageSize = ref(20);
-const current = ref(1);
-const total = ref(0);
-const data = reactive({
+const state = reactive({
+  loading: false,
+  pageSize: 20,
+  current: 1,
+  total: 0,
   allInfoList: [],
   alarmTypeData: [],
 });
 
-const { allInfoList, alarmTypeData } = toRefs(data);
+const { allInfoList, alarmTypeData } = toRefs(state);
 
 /**
  * @初始化
@@ -69,41 +68,35 @@ function init() {
     size: 1000,
   }).then((requset) => {
     if (requset.status === "SUCCESS") {
-      alarmTypeData.value = requset.data.records;
+      state.alarmTypeData = requset.data.records;
     }
   });
 
-  proxy.$modal.loading("加载中");
+  state.loading = true;
   baseAlarmList({
     productCode: "",
-    current: current.value,
-    size: pageSize.value,
-  }).then((requset) => {
-    if (requset.status === "SUCCESS") {
-      requset.data.records.forEach((el) => {
-        allInfoList.value.push({
-          sitePhoto: el.sitePhoto,
-          time: proxy.$common.jktTimes(el.alarmTime),
-          deviceId: el.deviceId,
-          deviceName: el.deviceName,
-          alarmType: el.alarmType,
-          alarmTime: el.alarmTime,
+    current: state.current,
+    size: state.pageSize,
+  })
+    .then((requset) => {
+      if (requset.status === "SUCCESS") {
+        requset.data.records.forEach((el) => {
+          state.allInfoList.push({
+            sitePhoto: el.sitePhoto,
+            time: proxy.$common.jktTimes(el.alarmTime),
+            deviceId: el.deviceId,
+            deviceName: el.deviceName,
+            alarmType: el.alarmType,
+            alarmTime: el.alarmTime,
+          });
         });
-      });
-      total.value = requset.data.total;
-
-      proxy.$modal.closeLoading();
-    }
-  });
-}
-
-/** 映射 */
-function mapping(type, val, data) {
-  for (let i = 0; i < data.length; i++) {
-    if (val == data[i].typeCode) {
-      return data[i][type];
-    }
-  }
+        state.total = requset.data.total;
+        state.loading = false;
+      }
+    })
+    .catch((err) => {
+      state.loading = false;
+    });
 }
 
 /**
@@ -117,7 +110,7 @@ function goContentDetails(e) {
  * @scrollView加载数据
  */
 function load() {
-  pageSize.value += 10;
+  state.pageSize += 10;
   init();
 }
 
@@ -125,8 +118,7 @@ function load() {
  * @scrollView刷新数据
  */
 function refresh() {
-  pageSize.value = 20;
-  total.value = 0;
+  state.pageSize = 20;
   init();
 }
 

+ 63 - 0
src/pages/common/appMessage/details.vue

@@ -0,0 +1,63 @@
+<template>
+  <view>
+    <uni-card class="view-title" :title="data?.infoTitle || ''">
+      <view class="uni-body view-content">{{ data?.infoContent || "" }}</view>
+      <text class="uni-body view-time">{{ data?.createTime ? data.createTime.replace("T", " ") : "" }}</text>
+    </uni-card>
+    <oa-tabbar :tabbarValue="1"></oa-tabbar>
+  </view>
+</template>
+
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { getMceList } from "@/api/mine/info.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
+const data = ref();
+
+function init(options) {
+  getMceList({
+    current: 1,
+    size: 10,
+    id: options?.contentId,
+  }).then((requset) => {
+    data.value = requset.data.records[0];
+  });
+}
+
+onLoad((options) => {
+  init(options);
+});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+</script>
+
+<style scoped>
+.view-title {
+  font-weight: bold;
+}
+
+.view-content {
+  font-size: 12px;
+  padding: 12px 0 0;
+  color: #333;
+  line-height: 24px;
+  font-weight: normal;
+  text-indent: 20px;
+}
+.view-time {
+  margin: 30px 0 10px;
+  font-size: 12px;
+  float: right;
+}
+</style>

+ 115 - 99
src/pages/common/appMessage/index.vue

@@ -1,71 +1,57 @@
 <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="true"></u-tabs>
-  </u-sticky>
-
-  <scroll-view class="scroll-height" :scroll-y="true" :scroll-into-view="scrollIntoView" :data-theme="'theme-' + proxy.$settingStore.themeColor.name" style="padding-bottom: 44px">
-    <view class="appMessage-container">
-      <view class="content-area" v-show="tabsCurrent == 0">
-        <u-empty v-show="allInfoList.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
-        <view :id="index == allInfoList.length - 1 ? 'bottomInfo' : ''" v-for="(all, index) in allInfoList" :key="index" v-show="allInfoList.length > 0" @click="goContentDetails(all)">
-          <view class="content-area-time font24">{{ all.listTime }}</view>
-          <view class="content-area-center radius bg-white">
-            <view class="content-area-center-title">{{ all.typeTitle }}</view>
-            <view class="content-area-center-cont">{{ all.listTitle }}</view>
-            <view class="content-area-center-buttom font24">查看详情 </view>
-          </view>
-        </view>
-      </view>
-      <view class="content-area" v-show="tabsCurrent == 1">
-        <u-empty v-show="noticeList.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
+  <oa-scroll
+    customClass="appMessage-container scroll-height"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <view class="content-area">
+        <u-empty v-if="noticeList.length <= 0 && state.loading" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
         <view :id="index == noticeList.length - 1 ? 'bottomInfo' : ''" v-for="(all, index) in noticeList" :key="index" v-show="noticeList.length > 0" @click="goContentDetails(all)">
-          <view class="content-area-time font24">{{ all.listTime }}</view>
-          <view class="content-area-center radius bg-white">
-            <view class="content-area-center-title">{{ all.typeTitle }}</view>
-            <view class="content-area-center-cont">{{ all.listTitle }}</view>
-            <view class="content-area-center-buttom font24">查看详情 </view>
+          <view class="content-area-center radius bg-white list-cell list-cell-arrow">
+            <view class="">
+              <!-- <image class="content-area-center-image-bg" :src="all.img" /> -->
+              <view class="content-area-center-title font16">{{ all.infoTitle }}</view>
+              <view class="content-area-center-time font14">{{ all.createTime.substring(5, 10) }} {{ all.createTime.substring(11, 16) }}</view>
+            </view>
+            <view class="content-area-center-cont font14">{{ all.infoContent }}</view>
+            <view class="content-area-center-status font12" :style="{ color: all.readFlag == 0 ? 'rgb(20, 158, 255)' : '#ccc' }">{{ all.readFlag == 0 ? "未读" : "已读" }}</view>
           </view>
         </view>
       </view>
-    </view>
-  </scroll-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 { infoList } from "@/api/common/message.js";
-
-const useStore = useStores();
+/*----------------------------------接口引入-----------------------------------*/
+import { getMceList, updateMceReceiveStatus } from "@/api/mine/info.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  loading: false,
+  infoType: undefined, //消息类型
 
-const data = reactive({
   scrollIntoView: "",
-
-  tabsList: [
-    {
-      name: "全部",
-    },
-    {
-      name: "通知公告",
-    },
-  ],
   tabsCurrent: 0,
 
   allInfoList: [],
   noticeList: [],
 });
 
-const { scrollIntoView, scrollIntoViewBool, tabsList, tabsCurrent, allInfoList, noticeList } = toRefs(data);
-
-/**
- * @初始化
- */
-function init() {
-  infoListApi();
-}
+const { scrollIntoView, tabsCurrent, noticeList } = toRefs(state);
 
 /**
  * @tabs点击事件
@@ -75,11 +61,21 @@ function tabsClick(e) {
 }
 
 /**
- * @跳转
+ * @跳转相应类型系统
  */
 function goContentDetails(e) {
-  if (e.type == "通知公告") {
-    proxy.$tab.navigateTo(`/pages/common/textview/index1?title=${e.typeTitle}&content=${e.listContent}&contentTitle=${e.listTitle}`);
+  if (e.infoType == 4) {
+    proxy.$tab.navigateTo(`/pages/business/fireIot/alarmManage/alarmDetails/index?contentId=${e.contentId}`).then(() => {
+      if (!e.readFlag) {
+        updateMceReceiveStatus({ id: e.id });
+      }
+    });
+  } else {
+    proxy.$tab.navigateTo(`/pages/common/appMessage/details?contentId=${e.contentId}`).then(() => {
+      if (!e.readFlag) {
+        updateMceReceiveStatus({ id: e.id });
+      }
+    });
   }
 }
 
@@ -87,46 +83,41 @@ function goContentDetails(e) {
  * @通知公告列表
  * @api接口调用
  */
-function infoListApi() {
+function infoListApi(options) {
   proxy.$modal.loading("加载中");
-  infoList({
-    pageNum: 1,
-    pageSize: 20000,
+
+  uni.setNavigationBarTitle({
+    title: options?.typeName ? options?.typeName : "消息列表",
+  });
+
+  getMceList({
+    infoType: options?.type,
   }).then((requset) => {
+    let data = requset.data.records;
     if (requset.status === "SUCCESS") {
-      requset.data.rows.forEach((el) => {
-        allInfoList.value.push({
-          type: "通知公告",
-          typeTitle: el.noticeType === "1" ? "系统通知" : el.noticeType === "2" ? "系统公告" : "系统消息",
-          listTime: proxy.$common.jktTimes(el.createTime),
-          listCreateTime: el.createTime,
-          listTitle: el.noticeTitle,
-          listContent: el.noticeContent,
-        });
-
-        noticeList.value.push({
-          type: "通知公告",
-          typeTitle: el.noticeType === "1" ? "系统通知" : el.noticeType === "2" ? "系统公告" : "系统消息",
-          listTime: proxy.$common.jktTimes(el.createTime),
-          listCreateTime: proxy.$common.jktTimes(el.createTime),
-          listTitle: el.noticeTitle,
-          listContent: el.noticeContent,
-        });
+      state.noticeList = data;
+      state.loading = true;
+    }
+    setTimeout(() => {
+      scrollIntoView.value = "bottomInfo";
+    }, 0);
+
+    setTimeout(() => {
+      proxy.$modal.closeLoading();
+    }, 100);
+
+    if ("id" in options) {
+      state.noticeList.forEach((e) => {
+        if (e.id == options.id) {
+          goContentDetails(e);
+        }
       });
-
-      setTimeout(() => {
-        scrollIntoView.value = "bottomInfo";
-      }, 0);
-
-      setTimeout(() => {
-        proxy.$modal.closeLoading();
-      }, 100);
     }
   });
 }
 
 onLoad((options) => {
-  init();
+  infoListApi(options);
 });
 
 onReady(() => {});
@@ -153,32 +144,57 @@ onNavigationBarButtonTap((e) => {
   padding-bottom: 1px;
 
   .content-area {
-    &-time {
-      padding: 10px 0;
-      text-align: center;
-      color: #909399;
+    > div {
+      vertical-align: middle;
     }
-
     &-center {
-      margin: 0 10px 20px 10px;
-      padding: 15px;
+      margin: 14px 10px -2px;
+      width: calc(100% - 20px);
+      padding: 10px;
       overflow: hidden;
-
+      position: relative;
+      &-image-bg {
+        width: 40px;
+        height: 40px;
+        display: inline-block;
+        vertical-align: middle;
+      }
       &-title {
-        margin: 0 0 15px 0;
+        color: #000;
+        display: inline-block;
+        vertical-align: middle;
+        white-space: nowrap; /* 确保文本在一行内显示 */
+        overflow: hidden; /* 隐藏超出容器的内容 */
+        text-overflow: ellipsis; /* 使用省略号表示被截断的文本 */
+        width: 70%; /* 定义容器宽度 */
+      }
+      &-time {
         color: #909399;
+        float: right;
+        margin-right: 14px;
       }
-
       &-cont {
-        font-weight: 600;
-        color: #000000;
+        color: #ccc;
+        margin-top: 16px;
+        white-space: nowrap; /* 确保文本在一行内显示 */
+        overflow: hidden; /* 隐藏超出容器的内容 */
+        text-overflow: ellipsis; /* 使用省略号表示被截断的文本 */
+        width: 100%; /* 定义容器宽度 */
       }
-
-      &-buttom {
-        float: right;
-        color: #2a98ff;
+      &-status {
+        margin-top: 16px;
+        text-align: right;
+        width: 100%;
       }
     }
   }
 }
+.list-cell::after {
+  position: absolute;
+}
+.list-cell-arrow::before {
+  position: absolute;
+  top: 18px;
+  right: 10px;
+}
 </style>

+ 7 - 20
src/pages/common/customManage/index.vue

@@ -49,8 +49,8 @@
             </view>
             <view class="content-area-row_wrap-view">
               <view style="margin-right: 5px">客户电话:{{ data.phone }}</view>
-              <view class="iconfont ucicon-a-copy menu-item-icon" @click="copy(data.phone)"> </view>
-              <view class="iconfont ucicon-dial menu-item-icon" @click="proxy.$common.makePhoneCall(data.phone)"> </view>
+              <view class="iconfont oaIcon-copy menu-item-icon" @click="copy(data.phone)"> </view>
+              <view class="iconfont oaIcon-dial menu-item-icon" @click="proxy.$common.makePhoneCall(data.phone)"> </view>
             </view>
             <view class="content-area-row_wrap-view">
               <view>状态:</view>
@@ -81,22 +81,10 @@ const total = ref(0);
 
 const data = reactive({
   radioList: [
-    {
-      label: "全部",
-      value: "",
-    },
-    {
-      label: "30天内到期",
-      value: 30,
-    },
-    {
-      label: "60天内到期",
-      value: 60,
-    },
-    {
-      label: "90天内到期",
-      value: 90,
-    },
+    { label: "全部", value: "" },
+    { label: "30天内到期", value: 30 },
+    { label: "60天内到期", value: 60 },
+    { label: "90天内到期", value: 90 },
   ],
   radioValue: "",
   projectName: "",
@@ -176,7 +164,6 @@ function load() {
 function refresh() {
   radioValue.value = "";
   pageSize.value = 20;
-  total.value = 0;
   selectListApi();
 }
 
@@ -230,7 +217,7 @@ onNavigationBarButtonTap((e) => {
         min-width: 50%;
         white-space: nowrap;
         > .iconfont {
-          font-size: 14px;
+          font-size: 16px;
           color: #909399;
           margin-left: 5px;
         }

+ 0 - 1
src/pages/common/evaluate/index.vue

@@ -51,7 +51,6 @@
 
 <script setup>
 import config from "@/config";
-import storage from "@/utils/storage";
 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";

+ 31 - 105
src/pages/common/invoicing/index.vue

@@ -6,6 +6,7 @@
   <oa-scroll
     customClass="invoicing-container scroll-height"
     :customStyle="{}"
+    :isSticky="true"
     :refresherLoad="false"
     :refresherEnabled="false"
     :refresherDefaultStyle="'none'"
@@ -33,15 +34,15 @@
           </view>
           <view class="menu-item">
             <view> 联系方式:18621761642(同微信) </view>
-            <view class="iconfont ucicon-a-copy menu-item-icon" style="font-size: 14px; color: #909399" @click="copy('18621761642')"> </view>
+            <view class="iconfont oaIcon-copy menu-item-icon" @click="copy('18621761642')"> </view>
           </view>
           <view class="menu-item">
-            <view style="margin-right: 10px"> 邮箱:seven.li@chinausky.com </view>
-            <view class="iconfont ucicon-a-copy menu-item-icon" style="font-size: 14px; color: #909399" @click="copy('seven.li@chinausky.com')"> </view>
+            <view class="mr10"> 邮箱:seven.li@chinausky.com </view>
+            <view class="iconfont oaIcon-copy menu-item-icon" @click="copy('seven.li@chinausky.com')"> </view>
           </view>
           <view class="menu-item">
-            <view> 客服电话:021-65376655</view>
-            <view class="iconfont ucicon-dial menu-item-icon" style="font-size: 14px; color: #909399; margin-left: 5px" @click="proxy.$common.makePhoneCall('02165376655')"> </view>
+            <view class="mr10"> 客服电话:021-65376655</view>
+            <view class="iconfont oaIcon-dial menu-item-icon" @click="proxy.$common.makePhoneCall('02165376655')"> </view>
           </view>
           <view class="menu-item">
             <view> 公司邮箱:admin@chinausky.com</view>
@@ -99,7 +100,7 @@
                     <u-input placeholder="点击上传" border="none" maxlength="10" disabledColor="transparent" disabled>
                       <template #prefix>
                         <view
-                          class="iconfont ucicon-a-shangchuan menu-item-icon"
+                          class="iconfont oaIcon-shangchuan menu-item-icon"
                           :style="{
                             fontSize: '14px',
                             color: proxy.$settingStore.themeColor.color,
@@ -167,27 +168,20 @@
 </template>
 
 <script setup>
-import config from "@/config";
-import storage from "@/utils/storage";
+/*----------------------------------依赖引入-----------------------------------*/
 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 { crmInvoiceInfo, page } from "@/api/common/invoicing.js";
-
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-const commonStore = commonStores();
-
+/*----------------------------------变量声明-----------------------------------*/
 const uForm = ref(null);
-const data = reactive({
-  tabsList: [
-    {
-      name: "开票申请",
-    },
-    {
-      name: "汇款信息",
-    },
-  ],
+const state = reactive({
+  tabsList: [{ name: "开票申请" }, { name: "汇款信息" }],
   tabsCurrent: 0,
 
   form: {
@@ -205,99 +199,31 @@ const data = reactive({
   },
 
   rules: {
-    invoiceTitle: [
-      {
-        required: true,
-        message: "请填写发票抬头",
-        trigger: ["blur", "change"],
-      },
-    ],
+    invoiceTitle: [{ required: true, message: "请填写发票抬头", trigger: ["blur", "change"] }],
     dutyId: [
-      {
-        required: true,
-        message: "请填写税号",
-        trigger: ["blur", "change"],
-      },
-      {
-        type: "string",
-        min: 18,
-        required: true,
-        message: "请填写18位税号",
-        trigger: ["change"],
-      },
+      { required: true, message: "请填写税号", trigger: ["blur", "change"] },
+      { type: "string", min: 18, required: true, message: "请填写18位税号", trigger: ["change"] },
     ],
     email: [
-      {
-        required: true,
-        message: "请填写电子邮箱",
-        trigger: ["blur", "change"],
-      },
-      {
-        type: "string",
-        min: 11,
-        required: true,
-        message: "请填写正确的邮箱格式",
-        pattern: /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/,
-        trigger: ["blur", "change"],
-      },
-    ],
-    applicant: [
-      {
-        required: true,
-        message: "请填写申请人",
-        trigger: ["blur", "change"],
-      },
+      { required: true, message: "请填写电子邮箱", trigger: ["blur", "change"] },
+      { type: "string", min: 11, required: true, message: "请填写正确的邮箱格式", pattern: /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/, trigger: ["blur", "change"] },
     ],
+    applicant: [{ required: true, message: "请填写申请人", trigger: ["blur", "change"] }],
     phone: [
-      {
-        required: true,
-        message: "请填写手机号",
-        trigger: ["blur", "change"],
-      },
-      {
-        type: "string",
-        min: 11,
-        required: true,
-        message: "请填写正确11位手机号",
-        pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
-        trigger: ["blur", "change"],
-      },
-    ],
-    amount: [
-      {
-        required: true,
-        message: "请填写金额",
-        trigger: ["blur", "change"],
-      },
-    ],
-    invoiceType: [
-      {
-        required: true,
-        message: "请选择发票类型",
-        trigger: ["blur", "change"],
-      },
-    ],
-    invoiceAttribute: [
-      {
-        required: true,
-        message: "请选择发票性质",
-        trigger: ["blur", "change"],
-      },
-    ],
-    sendAddress: [
-      {
-        required: true,
-        message: "请填写邮寄地址",
-        trigger: ["blur", "change"],
-      },
+      { required: true, message: "请填写手机号", trigger: ["blur", "change"] },
+      { type: "string", min: 11, required: true, message: "请填写正确11位手机号", pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, trigger: ["blur", "change"] },
     ],
+    amount: [{ required: true, message: "请填写金额", trigger: ["blur", "change"] }],
+    invoiceType: [{ required: true, message: "请选择发票类型", trigger: ["blur", "change"] }],
+    invoiceAttribute: [{ required: true, message: "请选择发票性质", trigger: ["blur", "change"] }],
+    sendAddress: [{ required: true, message: "请填写邮寄地址", trigger: ["blur", "change"] }],
   },
 
   scrollIntoView: "",
   promptStatus: false,
 });
 
-const { tabsList, tabsCurrent, form, rules, scrollIntoView, promptStatus } = toRefs(data);
+const { tabsList, tabsCurrent, form, rules, scrollIntoView, promptStatus } = toRefs(state);
 
 /**
  * @提交
@@ -313,8 +239,8 @@ function handleSubmit(value) {
         current: 1,
         size: 10,
         invoiceTitle: form.value.invoiceTitle,
-        startTime: commonStore.getYearLast(new Date()),
-        endTime: commonStore.formatterDateTime(new Date()),
+        startTime: proxy.$common.getYearLast(new Date()),
+        endTime: proxy.$common.formatterDateTime(new Date()),
       }).then((requset) => {
         if (requset.status === "SUCCESS") {
           proxy.$modal.closeLoading();

+ 1 - 7
src/pages/common/nfc/index.vue

@@ -3,22 +3,16 @@
     <view class="nfc-container-image">
       <image class="nfc-gif" src="@/static/images/common/nfc-flash.gif" mode="aspectFit" style="width: 230px"></image>
     </view>
-    <view class="nfc-container-text">{{ commonStore.nfcWaiting }}</view>
+    <view class="nfc-container-text">{{ proxy.$settingStore.nfcWaiting }}</view>
   </view>
 </template>
 
 <script setup>
 import config from "@/config";
-import storage from "@/utils/storage";
 import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
 import { ref, reactive, computed, getCurrentInstance, toRefs, inject, watch } from "vue";
-import { useStores, commonStores, xunJianStores } from "@/store/modules/index";
 
 const { proxy } = getCurrentInstance();
-const commonStore = commonStores();
-
-const data = reactive({});
-const {} = toRefs(data);
 
 onLoad((options) => {
   // 开启nfc监听

+ 2 - 2
src/pages/common/phoneVerify/index.vue

@@ -2,7 +2,7 @@
   <view class="phoneVerify-container">
     <view class="content-area">
       <view class="content-area-top">
-        <text class="content-area-top-icon iconfont ucicon-phone"></text>
+        <text class="content-area-top-icon iconfont oaIcon-phone"></text>
       </view>
 
       <view class="content-area-text">
@@ -103,7 +103,7 @@ onLoad((options) => {
       margin-bottom: 15px;
 
       &-icon {
-        font-size: 50px;
+        font-size: 40px;
         color: #2a98ff;
       }
     }

+ 18 - 51
src/pages/common/repairReport/index.vue

@@ -9,9 +9,9 @@
     :refresherBackground="'#f5f6f7'"
     :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
   >
-    <view class="menu-list margin-0">
+    <view class="menu-list m0">
       <view class="list-cell">
-        <view class="menu-item" style="font-size: 15px">
+        <view class="menu-item font14">
           <view style="margin-right: auto; color: #666666"></view>
           <view style="color: #149eff" @click="proxy.$tab.navigateTo(`/pages/common/repairReport/record`)">报修历史</view>
         </view>
@@ -71,19 +71,21 @@
 </template>
 
 <script setup>
-import config from "@/config";
-import storage from "@/utils/storage";
+/*----------------------------------依赖引入-----------------------------------*/
 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 { add, getAddHistoryInfo } from "@/api/common/repairReport.js";
-
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
 const commonStore = commonStores();
-
+/*----------------------------------变量声明-----------------------------------*/
 const uForm = ref(null);
-const data = reactive({
+const state = reactive({
   form: {
     projectName: "", //项目名称
     projectAddress: "", //项目地址
@@ -94,49 +96,14 @@ const data = reactive({
   },
 
   rules: {
-    projectName: [
-      {
-        required: true,
-        message: "请填写项目名称",
-        trigger: ["blur", "change"],
-      },
-    ],
-    projectName: [
-      {
-        required: true,
-        message: "请填写项目地址",
-        trigger: ["blur", "change"],
-      },
-    ],
-    reflectName: [
-      {
-        required: true,
-        message: "请填写报修人",
-        trigger: ["blur", "change"],
-      },
-    ],
+    projectName: [{ required: true, message: "请填写项目名称", trigger: ["blur", "change"] }],
+    projectName: [{ required: true, message: "请填写项目地址", trigger: ["blur", "change"] }],
+    reflectName: [{ required: true, message: "请填写报修人", trigger: ["blur", "change"] }],
     reflectPhone: [
-      {
-        required: true,
-        message: "请填写手机号",
-        trigger: ["blur", "change"],
-      },
-      {
-        type: "string",
-        min: 11,
-        required: true,
-        message: "请填写正确11位手机号",
-        pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
-        trigger: ["blur", "change"],
-      },
-    ],
-    repairContent: [
-      {
-        required: true,
-        message: "请填写问题描述",
-        trigger: ["blur", "change"],
-      },
+      { required: true, message: "请填写手机号", trigger: ["blur", "change"] },
+      { type: "string", min: 11, required: true, message: "请填写正确11位手机号", pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, trigger: ["blur", "change"] },
     ],
+    repairContent: [{ required: true, message: "请填写问题描述", trigger: ["blur", "change"] }],
   },
 
   actionShow: false,
@@ -145,7 +112,7 @@ const data = reactive({
   actionDefaultIndex: 0,
 });
 
-const { form, rules, actionShow, actionTitle, actionsList, actionDefaultIndex } = toRefs(data);
+const { form, rules, actionShow, actionTitle, actionsList, actionDefaultIndex } = toRefs(state);
 
 /**
  * @项目名称

+ 1 - 2
src/pages/common/repairReport/record.vue

@@ -55,7 +55,7 @@ const current = ref(1);
 const total = ref(0);
 
 const data = reactive({
-  phone: getToken() ? useStore.$state.phonenumber : undefined,
+  phone: getToken() ? useStore.phonenumber : undefined,
   verify: undefined,
 });
 const { phone, verify } = toRefs(data);
@@ -99,7 +99,6 @@ function load() {
  */
 function refresh() {
   pageSize.value = 20;
-  total.value = 0;
   init();
 }
 

+ 57 - 0
src/pages/common/searchSelect/index.vue

@@ -0,0 +1,57 @@
+<template>
+  <u-navbar :autoBack="false" :placeholder="true" :safeAreaInsetTop="true">
+    <template #left>
+      <view class="u-navbar__content__left__item" style="width: 100%">
+        <u-search v-model="state.search" placeholder="搜索" :show-action="true" actionText="取消" :animation="false" @custom="handleToCancel" @search="handleToSearch"></u-search>
+      </view>
+    </template>
+  </u-navbar>
+
+  <oa-scroll
+    customClass="info-container scroll-height"
+    :customStyle="{ height: `calc(100vh - (${proxy.$settingStore.barHightTop} + ${proxy.$settingStore.tabBarHeight}))` }"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default> </template>
+  </oa-scroll>
+</template>
+
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  search: "",
+});
+
+//搜索
+function handleToSearch() {
+  console.log(2);
+}
+
+//取消
+function handleToCancel() {
+  proxy.$tab.navigateBack(1); //返回到需要执行方法的页面
+}
+
+onShow(() => {});
+</script>
+
+<style lang="scss" scoped>
+:deep(.u-navbar__content__left) {
+  width: 100%;
+}
+</style>

+ 1 - 1
src/pages/common/square/index.vue

@@ -1,6 +1,6 @@
 <template>
   <view>
-    <view class="section bg-white margin-top-sm">
+    <view class="section bg-white mt10">
       <view class="cu-list grid col-3 no-border">
         <view class="cu-item justify-center align-center" @tap="goSiteList(item.redirectUrl)" v-for="(item, index) in cuIconList" :key="index">
           <image :src="`${item.imgUrl}`" style="width: 100rpx; height: 100rpx"></image>

+ 13 - 23
src/pages/common/success/index.vue

@@ -1,10 +1,8 @@
 <template>
   <view id="success-container" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <view>
-      <view style="display: flex">
-        <image style="width: 120px; height: 120px; margin: 50px auto 20px auto" src="@/static/images/common/success.png" />
-      </view>
-      <view style="text-align: center; font-weight: 600">{{ codeName }}</view>
+    <view class="content-section">
+      <image class="content-section-image" src="@/static/images/common/success.png" />
+      <view class="content-section-text">{{ codeName }}</view>
     </view>
 
     <view class="app-button-fixed" v-if="showNow" style="box-shadow: 0px 0px 15px 0 rgba(0, 0, 0, 0)">
@@ -61,26 +59,18 @@ onLoad((options) => {
   //#endif
   background-color: #ffffff;
 
-  .top {
-  }
-
-  .content {
-    display: flex;
-    margin: 30px 0;
-
-    .title {
-      margin: auto auto auto 0;
-      color: #000;
-      font-size: 18px;
-    }
-
-    .icons {
-      margin: auto 5px auto 0;
+  .content-section {
+    &-image {
+      display: flex;
+      width: 120px;
+      height: 120px;
+      margin: 50px auto 20px auto;
     }
 
-    .setting {
-      color: #2a98ff;
-      margin: auto 0;
+    &-text {
+      font-size: 16px;
+      text-align: center;
+      font-weight: 600;
     }
   }
 }

+ 26 - 24
src/pages/common/textview/index.vue

@@ -1,30 +1,34 @@
 <template>
-  <view>
-    <uni-card class="view-title" :title="title">
-      <text class="uni-body view-content">{{ content }}</text>
-    </uni-card>
+  <view class="view-text">
+    <!-- <u-parse class="uni-body view-content" :content="content"></u-parse> -->
+    <h3 style="text-align: center; line-height: 45px">{{ state.contentTitle }}</h3>
+    <view>{{ state.content }}</view>
   </view>
 </template>
 
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
 import { useStores, commonStores } from "@/store/modules/index";
-
-const useStore = useStores();
-
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
-const data = reactive({
+const useStore = useStores();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
   title: "",
   content: "",
+  contentTitle: "",
 });
 
-const { title, content } = toRefs(data);
-
 onLoad((options) => {
-  title.value = options.title;
-  content.value = options.content;
+  state.title = options.title;
+  state.content = options.content;
+  state.contentTitle = options.contentTitle;
   uni.setNavigationBarTitle({
     title: options.title,
   });
@@ -36,16 +40,14 @@ onShow(() => {
 });
 </script>
 
-<style scoped>
-.view-title {
-  font-weight: bold;
-}
-
-.view-content {
-  font-size: 26rpx;
-  padding: 12px 5px 0;
-  color: #333;
-  line-height: 24px;
-  font-weight: normal;
+<style lang="scss" scoped>
+.view-text {
+  padding: 5px;
+  .view-content {
+    font-size: 12px;
+    color: #333;
+    line-height: 24px;
+    word-wrap: break-word;
+  }
 }
 </style>

+ 0 - 51
src/pages/common/textview/index1.vue

@@ -1,51 +0,0 @@
-<template>
-  <view class="view-text">
-    <!-- <u-parse class="uni-body view-content" :content="content"></u-parse> -->
-    <h3 style="text-align: center; line-height: 45px">{{ contentTitle }}</h3>
-    <view>{{ content }}</view>
-  </view>
-</template>
-
-<script setup>
-import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
-import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
-import { useStores, commonStores } from "@/store/modules/index";
-
-const useStore = useStores();
-
-const { proxy } = getCurrentInstance();
-
-const data = reactive({
-  title: "",
-  content: "",
-  contentTitle: "",
-});
-
-const { title, content, contentTitle } = toRefs(data);
-
-onLoad((options) => {
-  title.value = options.title;
-  content.value = options.content;
-  contentTitle.value = options.contentTitle;
-  uni.setNavigationBarTitle({
-    title: options.title,
-  });
-});
-
-onShow(() => {
-  //调用系统主题颜色
-  proxy.$settingStore.systemThemeColor([1]);
-});
-</script>
-
-<style lang="scss" scoped>
-.view-text {
-  padding: 5px;
-  .view-content {
-    font-size: 26rpx;
-    color: #333;
-    line-height: 24px;
-    word-wrap: break-word;
-  }
-}
-</style>

+ 10 - 6
src/pages/common/webview/index.vue

@@ -5,14 +5,18 @@
 </template>
 
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
 import { useStores, commonStores } from "@/store/modules/index";
-
-const useStore = useStores();
-
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
+const useStore = useStores();
+/*----------------------------------变量声明-----------------------------------*/
 const props = defineProps({
   // 数据
   src: {
@@ -21,7 +25,7 @@ const props = defineProps({
   },
 });
 
-const data = reactive({
+const state = reactive({
   params: {},
   webviewStyles: {
     progress: {
@@ -30,7 +34,7 @@ const data = reactive({
   },
 });
 
-const { params, webviewStyles } = toRefs(data);
+const { params, webviewStyles } = toRefs(state);
 
 onLoad((event) => {
   params.value = event;

+ 152 - 160
src/pages/index.vue

@@ -1,26 +1,28 @@
 <template>
-  <u-navbar :autoBack="false" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color" @rightClick="rightButtonClick()">
+  <u-navbar :autoBack="false" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color">
     <template #left>
-      <view class="u-nav-slot">
-        <!-- <u-icon name="arrow-left" size="19" color="#fff" style="display: none"></u-icon> -->
-        <view class="u-navbar__content__title" style="color: #fff">应用中心</view>
+      <view class="u-navbar__content__left__item">
+        <view class="u-navbar__content__left__item__title">应用中心</view>
       </view>
     </template>
     <template #center>
-      <view class="u-nav-slot"> </view>
+      <view class="u-navbar__content__left__item"> </view>
     </template>
     <template #right>
-      <view class="u-nav-slot">
-        <u-icon name="plus" size="19" color="#fff"></u-icon>
+      <view class="u-navbar__content__left__item">
+        <text class="iconfont oaIcon-jiahao" @click="rightButtonClick()"></text>
       </view>
     </template>
   </u-navbar>
 
+  <!-- <u-no-network :zIndex="10080" @disconnected="disconnected" @connected="connected" @retry="retry"></u-no-network> -->
+
   <oa-scroll
     customClass="scroll-height"
     :customStyle="{ height: `calc(100vh - (50px + ${proxy.$settingStore.barHightTop} + ${proxy.$settingStore.tabBarHeight}))` }"
     :refresherLoad="false"
     :refresherEnabled="true"
+    :refresherEnabledTitle="false"
     :refresherDefaultStyle="'none'"
     :refresherThreshold="44"
     :refresherBackground="'#f5f6f7'"
@@ -33,71 +35,39 @@
           <view class="transition" @click="rightButtonClick()">
             <view class="transition-section" :style="{ top: proxy.$settingStore.barHightTop }">
               <view class="transition-section-content" @click="scanCode()">
-                <text class="transition-section-content-icon iconfont ucicon-saoyisao"></text>
+                <text class="transition-section-content-icon iconfont oaIcon-saoyisao"></text>
                 <view class="transition-section-content-text"> 扫一扫 </view>
               </view>
-              <!-- <div class="transition-section-divider"></div>
-              <view class="transition-section-content">
-                <text class="transition-section-content-icon iconfont ucicon-saoyisao"></text>
-                <view class="transition-section-content-text">发起群聊 </view>
-              </view> -->
             </view>
           </view>
         </u-transition>
 
         <!-- 轮播图 -->
-        <u-swiper v-if="swiperBool" :list="swiperList" :interval="swiperTime" indicatorMode="line" radius="0" height="160" indicator circular keyName="url" @click="swiperClick" @change="swiperChange">
+        <u-swiper v-if="state.swiperBool" :list="state.swiperList" :interval="state.swiperTime" indicatorMode="line" radius="0" height="160" indicator circular keyName="url" @click="swiperClick">
         </u-swiper>
-        <image v-if="!swiperBool" style="width: 100%; height: 160px" src="@/static/images/index/banner1.png"></image>
+        <image v-if="!state.swiperBool" style="width: 100%; height: 160px" src="@/static/images/index/banner1.png"></image>
 
         <!-- 天气 -->
-        <view class="app-common-notice bg-white radius shadow-default margin-lr-sm margin-bottom-sm" v-if="weatherData.length != 0">
-          <!-- <view class="info">
-            <view class="info-header">
-              <view class="info-title font28">综合智慧云</view>
-              <view class="info-time font24">07-25 19:23</view>
-            </view>
-            <view class="info-center font24">综合智慧云app,助力企业数字化转型升级,超多业务功能,全新部署上线,操作简单流畅...</view>
-          </view> -->
-
-          <view class="weather radius">
-            <view class="weather-header">
-              <view class="iconfont ucicon-address icon"></view>
-              <view class="mr15">{{ weatherData[0].location || "上海" }}</view>
-              <view style="margin: 0 auto 0 0">今天</view>
-              <view class="m0">{{ weatherData[0].text || "未知" }}</view>
-            </view>
-            <view class="weather-center">
-              <view class="temperature">{{ weatherData[0].today.low + "/" + weatherData[0].today.high || "0℃" }}</view>
-              <image class="image" :src="`${'/static/icons/white/' + weatherData[0].code.now + '.png'}`" mode="heightFix" style="height: 30px"></image>
-            </view>
-          </view>
-        </view>
+        <oa-weather ref="oaWeatherRef"></oa-weather>
 
         <!-- 最近使用宫格 -->
-        <view class="bg-white margin-bottom-sm" v-if="recentlyUsed.length > 0">
-          <view class="plr10 pt10 pb5" style="color: #000000; font-size: 14px">最近使用</view>
-          <view class="cu-list grid col-5 no-border">
-            <view class="cu-item justify-center align-center" @tap="navItemClick(item)" v-for="(item, index) in recentlyUsed.slice(0, 5)" :key="index">
-              <image :src="item.meta.icon" 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>
-              </view> -->
-              <text style="font-size: 12px">{{ item.meta.aliasTitle ? item.meta.aliasTitle : item.meta.title }}</text>
+        <view class="grid-area bg-white" v-if="state.recentlyUsed.length > 0">
+          <view class="grid-area_title">最近使用</view>
+          <view class="grid-area_center cu-list grid col-5 no-border">
+            <view class="grid-area_center_item cu-item justify-center align-center" @tap="navItemClick(item)" v-for="(item, index) in state.recentlyUsed.slice(0, 5)" :key="index">
+              <image class="grid-area_center_item_image" :src="item.meta.icon"></image>
+              <text class="grid-area_center_item_title">{{ item.meta.aliasTitle ? item.meta.aliasTitle : item.meta.title }}</text>
             </view>
           </view>
         </view>
 
         <!-- 常用功能宫格 -->
-        <view class="bg-white">
-          <view class="plr10 pt10 pb5" style="color: #000000; font-size: 14px">常用功能</view>
-          <view class="cu-list grid col-5 no-border">
-            <view class="cu-item justify-center align-center" @tap="navItemClick(item)" v-for="(item, index) in cuIconList" :key="index">
-              <image :src="item.meta.icon" 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>
-              </view> -->
-              <text style="font-size: 12px">{{ item.meta.aliasTitle ? item.meta.aliasTitle : item.meta.title }}</text>
+        <view class="grid-area bg-white">
+          <view class="grid-area_title">常用功能</view>
+          <view class="grid-area_center cu-list grid col-5 no-border">
+            <view class="grid-area_center_item cu-item justify-center align-center" @tap="navItemClick(item)" v-for="(item, index) in state.cuIconList" :key="index">
+              <image class="grid-area_center_item_image" :src="item.meta.icon"></image>
+              <text class="grid-area_center_item_title">{{ item.meta.aliasTitle ? item.meta.aliasTitle : item.meta.title }}</text>
             </view>
           </view>
         </view>
@@ -109,20 +79,22 @@
 </template>
 
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onReady, onLoad, onShow, onNavigationBarButtonTap, onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
-import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
-import { getToken } from "@/utils/auth";
-import { useStores, commonStores } from "@/store/modules/index";
-
+import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs, nextTick } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
 import { scan_push, getHomePageData, getFunctionalModuleStatistics, getAppRouters, qrCodeSend, getMobileBanner } from "@/api/index";
-import searchSelect from "@/components/searchSelect/searchSelect.vue";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
 import * as jwx from "@/utils/jssdk.js"; //引入js sdk的封装
-
-const useStore = useStores();
-const commonStore = commonStores(); //全局公共Store
+import { storageSystem } from "@/utils/storage"; // 公共方法引用
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
-const arrayList = reactive({
+const useStore = useStores();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
   dialogFlag: false,
 
   swiperBool: false,
@@ -132,27 +104,37 @@ const arrayList = reactive({
 
   cuIconList: [],
   recentlyUsed: [],
-
-  weatherData: [], //天气信息值存储
 });
 
-const { dialogFlag, swiperBool, swiperIndex, swiperTime, swiperList, cuIconList, recentlyUsed, weatherData } = toRefs(arrayList);
+const { dialogFlag } = toRefs(state);
 
 /**
- * @获取轮播图下标
- * @change事件
+ * @初始化
  */
-function swiperChange(e) {
-  swiperIndex.value = e.current;
+function init() {
+  //#ifdef H5
+  useStore.GetWxOpenId(2); //调用获取微信公众号openId
+  //#endif
+
+  setTimeout(() => {
+    getAppRoutersData(); //调用路由信息接口
+    getMobileBannerApi(); //调用banner图接口
+    getLocation(); //调用获取地理位置方法
+  }, 1000);
+
+  //#ifdef APP-PLUS
+  proxy.$settingStore.baseAppInfo(), setInterval(proxy.$settingStore.baseAppInfo, 1000 * 60 * 5); //动态获取用户设备信息
+  proxy.$settingStore.openWebSocket(); //开启WebSocket
+  //#endif
 }
 
 /**
  * @轮播图点击事件
  */
 function swiperClick(list) {
-  if (typeof list == "object") {
-    let linkType = swiperList.value[swiperIndex.value].linkType;
-    let url = swiperList.value[swiperIndex.value].link;
+  if (typeof state.swiperList[list] == "object") {
+    let linkType = state.swiperList[list].linkType;
+    let url = state.swiperList[list].link;
 
     if (url) {
       if (linkType == 1) {
@@ -169,24 +151,60 @@ function swiperClick(list) {
 }
 
 /**
- * @获取天气信息
+ * @九宫格页面跳转
  */
-function getWeather(string) {
-  uni.request({
-    url: `https://widget-v3.seniverse.com/api/weather/7b8a7d89-f01d-4b14-bdec-5ae0b82c857f?unit=c&language=zh-Hans&location=${string}`,
-    success: (res) => {
-      if (res.statusCode == 200) {
-        weatherData.value = res.data.results[0].data;
-      } else {
-        console.log("获取天气信息失败");
+function navItemClick(item) {
+  if (item.path) {
+    item.sort = 0;
+
+    state.recentlyUsed.push(item);
+    state.recentlyUsed = proxy.$common.uniq(state.recentlyUsed, "path");
+    state.recentlyUsed.filter((el) => {
+      if (el.path === item.path) {
+        el.meta.icon = item.meta.icon;
+        el.sort++;
       }
-    },
-    fail: (err) => {
-      console.log("获取天气信息失败", err);
-    },
-  });
+    });
+    state.recentlyUsed = proxy.$common.sortEvent(state.recentlyUsed, 1);
+
+    storageSystem.set("homeList", state);
+
+    if (item.path.indexOf("http") != -1) {
+      uni.navigateTo({
+        url: "/pages/common/webview/index?url=" + item.path,
+      });
+    } else {
+      uni.navigateTo({
+        url: item.path,
+      });
+    }
+  } else {
+    uni.showModal({
+      title: "Tips",
+      content: "此模块开发中~",
+      showCancel: false,
+      success: function (res) {
+        if (res.confirm) {
+        } else if (res.cancel) {
+        }
+      },
+    });
+  }
 }
 
+// function connected() {
+//   refresh();
+//   uni.setNavigationBarColor({
+//     frontColor: "#FFFFFF", //字体颜色
+//   });
+// }
+
+// function disconnected() {
+//   uni.setNavigationBarColor({
+//     frontColor: "#000000", //字体颜色
+//   });
+// }
+
 /**
  * @scrollView刷新数据
  */
@@ -202,7 +220,6 @@ function refresh() {
 function scanCode() {
   //#ifdef H5 || MP-WEIXIN
   jwx.configWeiXin((jweixin) => {
-    console.log(2);
     jweixin.scanQRCode({
       needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
       scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有
@@ -234,8 +251,8 @@ function scanCode() {
       });
       qrCodeSend({
         qrCode: list.uid,
-        tenantId: useStore.$state.tenantId,
-        userName: useStore.$state.name,
+        tenantId: useStore.tenantId,
+        userName: useStore.name,
       }).then((res) => {});
     },
     fail: (err) => {
@@ -252,6 +269,9 @@ function scanCode() {
  * @获取地理位置
  */
 function getLocation() {
+  var latitude = proxy.$settingStore.deviceList.latitude;
+  var longitude = proxy.$settingStore.deviceList.longitude;
+
   //#ifdef H5 || MP-WEIXIN
   // jwx.configWeiXin((jweixin) => {
   //   // 微信公众号获取位置
@@ -262,64 +282,16 @@ function getLocation() {
   //     },
   //   });
   // });
-  getWeather("上海");
+  proxy.$refs["oaWeatherRef"].getWeather("上海");
   //#endif
 
   //#ifdef APP-PLUS
-  uni.getLocation({
-    type: "gcj02",
-    geocode: true,
-    highAccuracyExpireTime: 5000,
-    success: function (res) {
-      getWeather(res.latitude + ":" + res.longitude);
-    },
-    fail: function (res) {
-      getWeather("上海");
-    },
-  });
-  //#endif
-}
-
-/**
- * @九宫格页面跳转
- */
-function navItemClick(item) {
-  if (item.path) {
-    item.sort = 0;
-
-    recentlyUsed.value.push(item);
-    recentlyUsed.value = proxy.$common.uniq(recentlyUsed.value, "path");
-    recentlyUsed.value.filter((el) => {
-      if (el.path === item.path) {
-        el.meta.icon = item.meta.icon;
-        el.sort++;
-      }
-    });
-    recentlyUsed.value = commonStore.sortEvent(recentlyUsed.value, 1);
-
-    uni.setStorageSync(useStore.$state.nickName + useStore.$state.tenantId, recentlyUsed.value);
-
-    if (item.path.indexOf("http") != -1) {
-      uni.navigateTo({
-        url: "/pages/common/webview/index?url=" + item.path,
-      });
-    } else {
-      uni.navigateTo({
-        url: item.path,
-      });
-    }
+  if (latitude && longitude) {
+    proxy.$refs["oaWeatherRef"].getWeather(latitude + ":" + longitude);
   } else {
-    uni.showModal({
-      title: "Tips",
-      content: "此模块开发中~",
-      showCancel: false,
-      success: function (res) {
-        if (res.confirm) {
-        } else if (res.cancel) {
-        }
-      },
-    });
+    proxy.$refs["oaWeatherRef"].getWeather("上海");
   }
+  //#endif
 }
 
 /**
@@ -335,16 +307,16 @@ function rightButtonClick() {
  */
 function getMobileBannerApi() {
   getMobileBanner({
-    tenantId: useStore.$state.tenantId,
+    tenantId: useStore.tenantId,
   }).then((res) => {
     if (res.data.length > 0) {
-      swiperList.value = [];
-      swiperBool.value = res.data[0].openNot == 1 ? true : false;
-      swiperTime.value = res.data[0].carouselTime * 1000;
+      state.swiperList = [];
+      state.swiperBool = res.data[0].openNot == 1 ? true : false;
+      state.swiperTime = res.data[0].carouselTime * 1000;
 
       for (let i = 1; i <= 5; i++) {
         if (res.data[0]["bannerPath" + i]) {
-          swiperList.value.push({
+          state.swiperList.push({
             url: res.data[0]["bannerPath" + i],
             link: res.data[0]["linkUrl" + i],
             linkType: res.data[0]["linkType" + i],
@@ -362,24 +334,21 @@ function getMobileBannerApi() {
  */
 function getAppRoutersData() {
   getAppRouters().then((res) => {
-    cuIconList.value = res.data;
+    state.cuIconList = res.data;
+    storageSystem.set("homeList", state);
   });
 }
 
 onLoad((option) => {
   uni.hideTabBar(); //隐藏自带tabbar
-
-  getAppRoutersData(); //调用路由信息接口
-  getMobileBannerApi(); //调用banner图接口
-  getLocation(); //调用获取地理位置方法
+  init();
 });
 
 onShow(() => {
-  if (uni.getStorageSync(useStore.$state.nickName + useStore.$state.tenantId)) {
-    recentlyUsed.value = uni.getStorageSync(useStore.$state.nickName + useStore.$state.tenantId);
-  } else {
-    recentlyUsed.value = [];
-  }
+  var storages = storageSystem.get("homeList");
+  Object.keys(storages).forEach((key) => {
+    state[key] = storages[key];
+  });
 });
 </script>
 
@@ -438,5 +407,28 @@ onShow(() => {
       }
     }
   }
+
+  .grid-area {
+    margin-bottom: 10px;
+
+    &_title {
+      padding: 10px 10px 5px 10px;
+      color: #000000;
+      font-size: $uni-font-size-base;
+    }
+
+    &_center {
+      &_item {
+        &_image {
+          width: 40px;
+          height: 40px;
+        }
+
+        &_title {
+          font-size: $uni-font-size-sm;
+        }
+      }
+    }
+  }
 }
 </style>

+ 170 - 0
src/pages/info copy.vue

@@ -0,0 +1,170 @@
+<template>
+  <u-navbar :autoBack="false" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color">
+    <template #left>
+      <view class="u-navbar__content__left__item">
+        <view class="u-navbar__content__left__item__title" style="color: #fff">消息</view>
+      </view>
+    </template>
+    <template #right>
+      <view class="u-navbar__content__right__item">
+        <text class="iconfont oaIcon-qingchu" @click="handleIconClick('清除')"></text>
+      </view>
+      <view class="u-navbar__content__right__item">
+        <text class="iconfont oaIcon-sousuo" @click="handleIconClick('搜索')"></text>
+      </view>
+      <view class="u-navbar__content__right__item">
+        <text class="iconfont oaIcon-jiahao" @click="handleIconClick('加号')"></text>
+      </view>
+    </template>
+  </u-navbar>
+
+  <oa-scroll
+    customClass="info-container  scroll-height bg-white"
+    :customStyle="{ height: `calc(100vh - (50px + ${proxy.$settingStore.barHightTop} + ${proxy.$settingStore.tabBarHeight}))` }"
+    :refresherLoad="false"
+    :refresherEnabled="true"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    @refresh="init()"
+  >
+    <template #default>
+      <view class="content-area" v-for="item in infoList" :key="item" @tap="goAppMessage(item.path)">
+        <view class="content-area-avatar">
+          <image class="image-bg" :src="item.img" />
+        </view>
+        <view class="content-area-child">
+          <view class="uni-item mb5">
+            <view class="uni-item-text font14" style="color: #000000">{{ item.label }}</view>
+            <view class="uni-item-right font12" style="color: #909399">{{ item.time }}</view>
+          </view>
+          <view class="uni-item">
+            <view class="uni-item-text font12" style="color: #909399">{{ item.cont }}</view>
+            <view class="uni-item-right font12" style="margin: auto 0">
+              <u-badge numberType="overflow" max="99" :value="item.badge"></u-badge>
+            </view>
+          </view>
+        </view>
+      </view>
+    </template>
+  </oa-scroll>
+
+  <oa-tabbar :tabbarValue="1"></oa-tabbar>
+</template>
+
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { getMceReceiveStatic } from "@/api/mine/info.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { systemStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+const systemStore = systemStores();
+const { message_type } = proxy.useDict("message_type");
+/*----------------------------------变量声明-----------------------------------*/
+
+const data = reactive({
+  infoList: [
+    {
+      id: 1,
+      label: "应用消息",
+      img: "/static/images/common/appMessage.png",
+      time: "5月15日",
+      cont: "您收到一条最新消息,请及时查看",
+      badge: 1,
+      path: "/pages/common/appMessage/index",
+    },
+    // {
+    //   id: 2,
+    //   label: "消防知识库",
+    //   time: "5月15日",
+    //   cont: "您收到一条最新消息,请及时查看",
+    //   badge: 0,
+    // },
+    {
+      id: 3,
+      label: "告警通知",
+      img: "/static/images/common/alarmMessage.png",
+      time: "5月15日",
+      cont: "您收到一条最新消息,请及时查看",
+      badge: 0,
+      path: "/pages/common/alarmMessage/index",
+    },
+  ],
+});
+
+const { infoList } = toRefs(data);
+
+function init() {
+  getMceReceiveStatic().then((res) => {
+    systemStore.infoList.messageCountData = res.data;
+    systemStore.infoList.messageTypeData = message_type.value;
+    res.data.infoTypeStatic.forEach((e) => {});
+  });
+}
+
+function goAppMessage(path) {
+  proxy.$tab.navigateTo(path);
+}
+
+function handleIconClick(type) {
+  if (type === "清除") {
+  } else if (type === "搜索") {
+    proxy.$tab.navigateTo("/pages/common/searchSelect/index");
+  } else if (type === "加号") {
+  }
+}
+
+onShow(() => {
+  init();
+});
+
+onLoad((options) => {
+  uni.hideTabBar(); //隐藏自带tabbar
+});
+</script>
+
+<style lang="scss" scoped>
+.info-container {
+  .content-area {
+    display: flex;
+    padding: 13px 13px 0 13px;
+
+    &-avatar {
+      display: flex;
+      margin: auto 20upx auto 0;
+      .image-bg {
+        width: 40px;
+        height: 40px;
+      }
+    }
+
+    &-child {
+      width: calc(100% - (32px + 0.625rem));
+      justify-content: center;
+      margin: auto;
+      .uni-item {
+        display: flex;
+        white-space: nowrap;
+
+        .uni-item-text {
+          margin-right: auto;
+          overflow: hidden;
+          text-overflow: ellipsis;
+        }
+
+        .uni-item-right {
+          width: auto;
+          text-align: right;
+        }
+      }
+    }
+  }
+}
+</style>

+ 135 - 72
src/pages/info.vue

@@ -1,122 +1,185 @@
 <template>
-  <u-navbar :autoBack="false" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color" @rightClick="rightButtonClick()">
+  <u-navbar :autoBack="false" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color">
     <template #left>
-      <view class="u-nav-slot">
-        <view class="u-navbar__content__title" style="color: #fff">消息</view>
+      <view class="u-navbar__content__left__item">
+        <view class="u-navbar__content__left__item__title" style="color: #fff"> 消息中心 </view>
+      </view>
+      <view class="u-navbar__content__left__item topBadge">
+        <u-badge numberType="overflow" max="99" :value="infoList.total || 0"></u-badge>
+      </view>
+      <view class="u-navbar__content__left__item" @click="clearMsg" v-if="infoList.total > 0">
+        <image class="image-bg-top" src="/static/images/common/clear.png" />
+      </view>
+    </template>
+    <template #right>
+      <!-- <view class="u-navbar__content__right__item">
+        <text class="iconfont oaIcon-qingchu" @click="handleIconClick('清除')"></text>
+      </view>
+      <view class="u-navbar__content__right__item">
+        <text class="iconfont oaIcon-sousuo" @click="handleIconClick('搜索')"></text>
+      </view> -->
+      <view class="u-navbar__content__right__item">
+        <text class="iconfont oaIcon-shezhi" @click="handleIconClick('设置')"></text>
       </view>
     </template>
   </u-navbar>
 
-  <u-sticky style="top: 0px">
-    <view class="plr13 ptb10" :class="'bg-' + proxy.$settingStore.themeColor.name">
-      <u--input placeholder="搜索" prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" customStyle="height:35px;background-color:#f5f6fa;"></u--input>
-    </view>
-  </u-sticky>
-
-  <scroll-view class="info-container bg-white" scroll-y :style="`height: calc(100vh - (105px + ${proxy.$settingStore.barHightTop} + ${proxy.$settingStore.tabBarHeight}))`">
-    <view class="content-area plr13 pt13" v-for="item in infoList" :key="item" @tap="goAppMessage(item.id)">
-      <view class="content-area-avatar">
-        <image class="image-bg" :src="item.img" />
-      </view>
-      <view class="content-area-child">
-        <view class="uni-item">
-          <view class="uni-item-text font30" style="color: #000000">{{ item.label }}</view>
-          <!-- <view class="uni-item-right font24" style="color: #909399">{{ item.time }}</view> -->
+  <oa-scroll
+    customClass="info-container  scroll-height bg-white"
+    :customStyle="{ height: `calc(100vh - (50px + ${proxy.$settingStore.barHightTop} + ${proxy.$settingStore.tabBarHeight}))`, position: 'relative' }"
+    :refresherLoad="false"
+    :refresherEnabled="true"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    @refresh="init()"
+  >
+    <template #default>
+      <view class="content-area list-cell list-cell-arrow" v-for="item in infoList.infoTypeStatic" :key="item" @tap="goAppMessage(item)">
+        <view class="content-area-avatar">
+          <image class="image-bg" :src="item.img" />
+          <view class="uni_top_right font12" style="margin: auto 0">
+            <u-badge numberType="overflow" max="99" :value="item.notReadCount"></u-badge>
+          </view>
         </view>
-        <view class="uni-item">
-          <view class="uni-item-text font28" style="color: #909399">{{ item.cont }}</view>
-          <view class="uni-item-right font28" style="margin: auto 0">
-            <u-badge numberType="overflow" max="99" :value="item.badge"></u-badge>
+        <view class="content-area-child">
+          <view class="uni-item mb5 ml10">
+            <view class="uni-item-text font14" style="color: #000000">{{ item.label }}</view>
+          </view>
+          <view class="uni-item">
+            <view class="uni-item-text font12" style="color: #909399">{{ item.cont }}</view>
           </view>
         </view>
       </view>
-    </view>
-  </scroll-view>
+    </template>
+  </oa-scroll>
 
   <oa-tabbar :tabbarValue="1"></oa-tabbar>
 </template>
 
 <script setup>
-import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
-import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
-
-//引用API
-import {} from "@/api/mine/info.js";
-
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow } from "@dcloudio/uni-app";
+import { reactive, getCurrentInstance, toRefs } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { getMceReceiveStatic, updateMceReceiveStatus } from "@/api/mine/info.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+import { storageSystem } from "@/utils/storage";
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
-const data = reactive({
-  infoList: [
-    {
-      id: 1,
-      label: "应用消息",
-      img: "/static/images/common/appMessage.png",
-      time: "5月15日",
-      cont: "您收到一条最新消息,请及时查看",
-      badge: 0,
-    },
-    // {
-    //   id: 2,
-    //   label: "消防知识库",
-    //   time: "5月15日",
-    //   cont: "您收到一条最新消息,请及时查看",
-    //   badge: 0,
-    // },
-    {
-      id: 3,
-      label: "告警通知",
-      img: "/static/images/common/alarmMessage.png",
-      time: "5月15日",
-      cont: "您收到一条最新消息,请及时查看",
-      badge: 0,
-    },
-  ],
+const { message_type } = proxy.useDict("message_type");
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  infoList: {
+    infoTypeStatic: [],
+    total: 0,
+  },
 });
+const { infoList } = toRefs(state);
+
+function init() {
+  getMceReceiveStatic().then((res) => {
+    let receiveStatic = { infoTypeStatic: res.data.infoTypeStatic, total: res.data.notReadCount };
+    let dictList = message_type.value;
+    if (receiveStatic.infoTypeStatic.length > 0) {
+      for (let i = 0; i < receiveStatic.infoTypeStatic.length; i++) {
+        for (let j = 0; j < dictList.length; j++) {
+          if (receiveStatic.infoTypeStatic[i].infoType == dictList[j].value) {
+            receiveStatic.infoTypeStatic[i].label = dictList[j].label;
+            receiveStatic.infoTypeStatic[i].type = dictList[j].value;
+            if (receiveStatic.infoTypeStatic[i].infoType == 1) {
+              receiveStatic.infoTypeStatic[i].img = "/static/images/common/noticeMessage.png";
+            }
+            if (receiveStatic.infoTypeStatic[i].infoType == 2) {
+              receiveStatic.infoTypeStatic[i].img = "/static/images/common/inspectionMessage.png";
+            }
+            if (receiveStatic.infoTypeStatic[i].infoType == 3) {
+              receiveStatic.infoTypeStatic[i].img = "/static/images/common/meetingMessage.png";
+            }
+            if (receiveStatic.infoTypeStatic[i].infoType == 4) {
+              receiveStatic.infoTypeStatic[i].img = "/static/images/common/alarmMessage.png";
+            }
+            if (receiveStatic.infoTypeStatic[i].infoType == 5) {
+              receiveStatic.infoTypeStatic[i].img = "/static/images/common/reportMessage.png";
+            }
+            
+          }
+        }
+      }
+    }
 
-const { infoList } = toRefs(data);
+    proxy.$setting.setBadge(res.data.notReadCount); // 设置角标值
+    state.infoList = receiveStatic;
+    storageSystem.set("infoList", receiveStatic);
+  });
+}
 
-function goAppMessage(id) {
-  if (id == 1) {
-    proxy.$tab.navigateTo("/pages/common/appMessage/index");
-  } else if (id == 3) {
-    proxy.$tab.navigateTo("/pages/common/alarmMessage/index");
-  }
+/**
+ * 清除消息
+ */
+function clearMsg() {
+  updateMceReceiveStatus({ id: 0 }).then(() => {
+    proxy.$setting.setBadge(0); // 设置角标值
+    init();
+  });
 }
 
-function goFireBase() {
-  proxy.$tab.navigateTo("/pages/info/fireBase/fireBase");
+function goAppMessage(item) {
+  proxy.$tab.navigateTo(`/pages/common/appMessage/index?type=${item.type}&typeName=${item.label}`);
 }
 
-function goPushList() {
-  proxy.$tab.navigateTo("/pages/info/pushList/pushList");
+function handleIconClick(type) {
+  if (type === "设置") {
+    proxy.$tab.navigateTo("/pages/mine/msg/index");
+  }
 }
 
-onShow(() => {});
+onShow(() => {
+  init();
+});
 
-onLoad((options) => {
+onLoad(() => {
   uni.hideTabBar(); //隐藏自带tabbar
 });
 </script>
 
 <style lang="scss" scoped>
+.topBadge {
+  margin-top: -14px;
+  margin-left: 0px;
+}
+.image-bg-top {
+  width: 15px;
+  height: 19px;
+}
 .info-container {
   .content-area {
     display: flex;
-
+    padding: 13px 13px 13px 13px;
     &-avatar {
       display: flex;
       margin: auto 20upx auto 0;
+      position: relative;
       .image-bg {
         width: 40px;
         height: 40px;
       }
+      .uni_top_right {
+        position: absolute;
+        right: -10px;
+        top: -4px;
+      }
     }
 
     &-child {
       width: calc(100% - (32px + 0.625rem));
+      justify-content: center;
+      margin: auto;
       .uni-item {
         display: flex;
-        line-height: 25px;
         white-space: nowrap;
 
         .uni-item-text {

+ 8 - 6
src/pages/info/fireBase/fireBase.vue

@@ -27,25 +27,27 @@
 </template>
 
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance } from "vue";
-
+/*----------------------------------接口引入-----------------------------------*/
 import { getKnowledgeBaseList } from "@/api/mine/info.js";
-
-const getData = ref([]);
-
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
+const getData = ref([]);
 
 // 列表数据请求
 function getFireBaseList(params = {}) {
   getKnowledgeBaseList(params).then((res) => {
     getData.value = res.data;
-    console.log(getData.value);
   });
 }
 
 // 页面跳转
-
 function goDetail(item) {
   proxy.$tab.navigateTo("/pages/info/fireBashDetail/fireBashDetail?id=" + item.id + "&title=" + item.title);
 }

+ 16 - 14
src/pages/info/fireBashDetail/fireBashDetail.vue

@@ -1,19 +1,19 @@
 <template>
-  <view class="padding fireBashDetailWrapper">
-    <view class="margin-bottom fireD-tit">{{ getData.title }}</view>
+  <view class="p15 fireBashDetailWrapper">
+    <view class="mb15 fireD-tit">{{ getData.title }}</view>
     <view class="flex justify-between align-center">
       <view>
         <!-- <view class="cu-avatar round" style="background-image:url(@/static/images/info/fireBase.png)"></view> -->
 
         <image class="cu-avatar round" src="@/static/images/info/fireBase.png" />
 
-        <text class="margin-left-sm margin-right-sm font24">{{ getData.author }}</text>
+        <text class="ml10 mr10 font14">{{ getData.author }}</text>
         <text>{{ getData.release_time }}</text>
       </view>
       <view style="color: #999">阅读:{{ getData.frequency }}</view>
     </view>
 
-    <view class="fireD-content margin-top padding-top-xs">
+    <view class="fireD-content mt15 pt5">
       <view class="">
         <view v-html="getData.content"></view>
       </view>
@@ -32,34 +32,38 @@
 
     <!-- <view class="share grid col-3">
 			<view class="share-item align">
-				<text class="icon iconfont margin-right-xs margin-left-lg">&#xe60c;</text>
+				<text class="icon iconfont mr10 ml40">&#xe60c;</text>
 				分享
 			</view>
-			<view class="share-item" @click="clickPraise()" :class="[praise?'active':'']"><text class="icon iconfont margin-right-xs margin-left-lg"  >&#xe62a;</text>收藏</view>
-			<view class="share-item"  @click="clickZan()" :class="[zan?'active':'']"><text class="icon iconfont margin-right-xs margin-left-lg">&#xe600;</text>点赞</view>
+			<view class="share-item" @click="clickPraise()" :class="[praise?'active':'']"><text class="icon iconfont mr10 ml40"  >&#xe62a;</text>收藏</view>
+			<view class="share-item"  @click="clickZan()" :class="[zan?'active':'']"><text class="icon iconfont mr10 ml40">&#xe600;</text>点赞</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 { getKnowledgeBaseDetails } from "@/api/mine/info.js";
-
-const data = reactive({
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
   praise: false,
   zan: false,
   getData: {},
 });
 
-const { praise, zan, getData } = toRefs(data);
+const { praise, zan, getData } = toRefs(state);
 
 // 详情页数据请求
 function getFireBaseDetail(params = {}) {
   getKnowledgeBaseDetails(params).then((res) => {
     getData.value = res.data[0];
-    console.log(getDgetData.valueata);
   });
 }
 
@@ -75,8 +79,6 @@ onLoad((option) => {
     company_code: uni.getStorageSync("selectedCode"),
     id: option.id,
   });
-  console.log("option");
-  console.log(option);
   uni.setNavigationBarTitle({
     title: option.title,
   });

+ 12 - 57
src/pages/info/pushList/pushList.vue

@@ -56,68 +56,24 @@
 </template>
 
 <script setup>
+/*----------------------------------依赖引入-----------------------------------*/
 import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, toRefs, getCurrentInstance } from "vue";
-
+/*----------------------------------接口引入-----------------------------------*/
 import {} from "@/api/mine/info.js";
-
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
-const data = reactive({
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
   unporcessList: [
-    {
-      title: "火灾逃生九大要诀",
-      time: "2020-02-12",
-      subtit: "admin",
-    },
-    {
-      title: "火灾逃生九大要诀",
-      time: "2020-02-12",
-      subtit: "admin",
-    },
-    {
-      title: "火灾逃生九大要诀",
-      time: "2020-02-12",
-      subtit: "admin",
-    },
-    {
-      title: "火灾逃生九大要诀",
-      time: "2020-02-12",
-      subtit: "admin",
-    },
-    {
-      title: "火灾逃生九大要诀",
-      time: "2020-02-12",
-      subtit: "admin",
-    },
-    {
-      title: "火灾逃生九大要诀",
-      time: "2020-02-12",
-      subtit: "admin",
-    },
-    {
-      title: "火灾逃生九大要诀",
-      time: "2020-02-12",
-      subtit: "admin",
-    },
-    {
-      title: "火灾逃生九大要诀",
-      time: "2020-02-12",
-      subtit: "admin",
-    },
-    {
-      title: "火灾逃生九大要诀",
-      time: "2020-02-12",
-      subtit: "admin",
-    },
-    {
-      title: "火灾逃生九大要诀",
-      time: "2020-02-12",
-      subtit: "admin",
-    },
+    { title: "火灾逃生九大要诀", time: "2020-02-12", subtit: "admin" },
+    { title: "火灾逃生九大要诀", time: "2020-02-12", subtit: "admin" },
   ],
 
-  processedList: proxy.$grid.processedList,
+  processedList: proxy.$constData.processedList,
 
   type: "0",
   modalName: null,
@@ -128,7 +84,7 @@ const data = reactive({
   tabNav: ["未读", "已读"],
 });
 
-const { unporcessList, processedList, type, modalName, listTouchStart, listTouchDirection, CustomBar, TabCur, tabNav } = toRefs(data);
+const { unporcessList, processedList, type, modalName, listTouchStart, listTouchDirection, CustomBar, TabCur, tabNav } = toRefs(state);
 
 function tabSelect(e) {
   TabCur.value = e.currentTarget.dataset.id;
@@ -172,7 +128,6 @@ function goVideoProcessedDetail() {
 
 <style lang="scss">
 //已处理未处理消息个数样式
-
 .nav .cu-item.cur {
   position: relative;
   border-bottom: 8rpx solid;

+ 82 - 47
src/pages/login.vue

@@ -1,25 +1,23 @@
 <template>
   <view id="login-container" class="login-container">
-    <image class="bgImage" :src="useStore.$state.loginBg" v-if="useStore.$state.loginBg" />
+    <image class="bgImage" :src="useStore.loginBg" v-if="useStore.loginBg" />
 
     <view class="middle">
       <view class="middle-top">
-        <image class="logo" mode="heightFix" :src="useStore.$state.loginLogo" v-if="useStore.$state.loginLogo" />
-        <text class="title" :style="{ color: useStore.$state.loginBg ? '#FFFFFF' : '#000000' }" v-if="useStore.$state.loginTitle">{{ useStore.$state.loginTitle }}</text>
+        <image class="logo" mode="heightFix" :src="useStore.loginLogo" v-if="useStore.loginLogo" />
+        <text class="title" :style="{ color: useStore.loginBg ? '#FFFFFF' : '#000000' }" v-if="useStore.loginTitle">{{ useStore.loginTitle }}</text>
       </view>
 
       <view class="middle-content">
-        <text class="title" :style="{ color: useStore.$state.loginBg ? '#FFFFFF' : '#000000' }">请登录</text>
-
+        <text class="title" :style="{ color: useStore.loginBg ? '#FFFFFF' : '#000000' }">请登录</text>
         <!-- #ifdef APP-PLUS || MP-WEIXIN -->
         <view class="prompt" v-if="!linkUrl">首次账号登录请先配置服务器</view>
         <view class="setting" @tap="goSeverConfig"> 配置服务器 </view>
         <!--#endif-->
       </view>
 
-      <view class="middle-input" v-if="switchText == '账号密码登录'">
+      <view class="middle-input" v-if="switchText == '验证码登录'">
         <u-input v-model="phone" prefixIcon="phone" placeholder="请输入手机号" :maxlength="11" />
-
         <u-input v-model="verify" prefixIcon="email" placeholder="请输入验证码" :maxlength="6">
           <template #suffix>
             <button class="verify" @click="getVerifyCode">{{ !useStore.codeTime ? "获取验证码" : useStore.codeTime + "s" }}</button>
@@ -27,70 +25,97 @@
         </u-input>
       </view>
 
-      <view class="middle-input" v-if="switchText == '验证码登录'">
+      <view class="middle-input" v-if="switchText == '账号密码登录'">
         <u-input type="text" v-model="username" prefixIcon="account" placeholder="请输入账号" />
-
-        <u-input v-model="password" prefixIcon="lock" placeholder="请输入密码" :password="inputIconBool">
+        <u-input v-model="password" prefixIcon="lock" placeholder="请输入密码" :password="isPassword">
           <template #suffix>
-            <text :class="!inputIconBool ? 'iconfont ucicon-eye' : 'iconfont ucicon-eye-close'" @click="inputIconBool = !inputIconBool"></text>
+            <text :class="!isPassword ? 'iconfont oaIcon-eye' : 'iconfont oaIcon-eye-close'" @click="isPassword = !isPassword"></text>
           </template>
         </u-input>
       </view>
 
       <button class="middle-submit" @click="submitRes">登 录</button>
 
-      <view class="middle-switch">
-        <text class="switch-loginMethod" @click="switchMode(1)">{{ switchText }}</text>
-        <div style="margin: auto"></div>
+      <!-- #ifdef APP-PLUS || MP-WEIXIN || H5 -->
+      <view class="middle-switch" v-if="proxy.$common.isVisible()">
+        <text class="switch-loginMethod" @click="switchMode(1)">{{ switchText === "验证码登录" ? "账号密码登录" : "验证码登录" }}</text>
+        <view style="margin: auto"></view>
         <text class="switch-register" @click="switchMode(2)">注册账号</text>
       </view>
+      <!--#endif-->
 
       <!-- #ifdef APP-PLUS || MP-WEIXIN -->
       <view class="middle-agreed text-center">
-        <u-checkbox-group v-model="userChecked">
-          <u-checkbox :name="true" shape="circle" inactiveColor="#0081ff" size="13"></u-checkbox>
-        </u-checkbox-group>
-        <text>登录即已代表阅读并同意</text>
-        <!-- <text>我已阅读并同意</text> -->
+        <u-checkbox shape="circle" inactiveColor="#0081ff" size="13" :usedAlone="true" :checked="uChecked" @change="uCheckedChange"></u-checkbox>
+        <!-- <text>登录即已代表阅读并同意</text> -->
+        <text>我已阅读并同意</text>
         <text @click="handleUserAgrement" class="text-blue">用户协议</text>
         <text>和</text>
-        <text @click="handlePrivacy" class="text-blue">隐私协议</text>
+        <text @click="handlePrivacy" class="text-blue">隐私政策</text>
       </view>
       <!--#endif-->
     </view>
 
     <view class="bottom">
-      <div class="title">{{ useStore.$state.loginBottomTitle }}</div>
+      <div class="title">{{ useStore.loginBottomTitle }}</div>
     </view>
   </view>
+
+  <u-modal
+    :show="modalShow"
+    title="用户协议及隐私政策"
+    :confirmText="'同意'"
+    :cancelText="'不同意'"
+    :zoom="false"
+    :showCancelButton="true"
+    @confirm="(uChecked = true), (modalShow = false)"
+    @cancel="modalShow = false"
+  >
+    <view class="slot-content">
+      <view>
+        您在使用我们的服务时,我们可能会收集和使用您的相关信息。我们希望通过本
+        <text class="text-blue underline">《用户协议及隐私政策》</text>
+        向您说明,在使用我们的服务时,我们如何收集、使用、 储存和分享这些信息,以及我们为您提供的访问、更新、控制和保护这些信息的方式。本
+        <text @click="handleUserAgrement" class="text-blue underline">《用户协议</text>
+        <text class="text-blue">及</text>
+        <text @click="handlePrivacy" class="text-blue underline">隐私政策》</text>,希望您仔细阅读,充分理解协议中的内容后再点击同意。
+      </view>
+    </view>
+  </u-modal>
 </template>
 
 <script setup>
-import config from "@/config";
+/*----------------------------------依赖引入-----------------------------------*/
 import { onLoad, onShow, onHide, onLaunch, onReady } from "@dcloudio/uni-app";
-import { reactive, getCurrentInstance, toRefs, inject } from "vue";
+import { reactive, getCurrentInstance, toRefs, inject, nextTick } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
 import { useStores, commonStores } from "@/store/modules/index";
-
+/*----------------------------------公共方法引入-----------------------------------*/
+import config from "@/config";
+import { storageSystem } from "@/utils/storage";
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
 const useStore = useStores();
 const commonStore = commonStores();
-
-const { proxy } = getCurrentInstance();
-
-const data = reactive({
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
   /** login数据 */
   phone: undefined,
   verify: undefined,
   switchText: "验证码登录",
   username: undefined,
   password: undefined,
-  inputIconBool: true,
+  isPassword: true,
   /** 服务器配置数据 */
   linkUrl: uni.getStorageSync("serveUrl"),
   /** 用户隐私协议数据 */
-  userChecked: [true],
+  uChecked: false,
+  modalShow: false,
 });
 
-const { phone, verify, switchText, username, password, inputIconBool, linkUrl, userChecked } = toRefs(data);
+const { phone, verify, switchText, username, password, isPassword, linkUrl, uChecked, modalShow } = toRefs(state);
 
 /**
  * @跳转服务器配置
@@ -104,7 +129,7 @@ function goSeverConfig() {
  */
 function switchMode(value) {
   if (value == 1) {
-    switchText.value == "验证码登录" ? (switchText.value = "账号密码登录") : (switchText.value = "验证码登录");
+    switchText.value = switchText.value == "验证码登录" ? "账号密码登录" : "验证码登录";
   } else if (value == 2) {
     proxy.$tab.navigateTo("/pages/register");
   }
@@ -135,20 +160,14 @@ function getVerifyCode() {
  */
 function init() {
   useStore.SetInterval("codeTime"); //调用倒计时定时器
-  useStore.SET_LOGINMOBILELIST({
-    loginTitle: "",
-    loginBottomTitle: "",
-    loginBg: "",
-    loginLogo: "",
-    tenantId: "",
-  });
 
   //#ifdef H5
+  useStore.GetWxOpenId(1); //调用获取微信公众号openId
+
   if (window.location.host) {
     linkUrl.value = window.location.host;
     // linkUrl.value = "172.16.120.165:13200";
     // linkUrl.value = "localhost:81";
-
     useStore.GetMobileTenantConfig({ url: linkUrl.value });
   }
   //#endif
@@ -156,11 +175,13 @@ function init() {
   //#ifdef APP-PLUS || MP-WEIXIN
   if (uni.getStorageSync("serveUrl")) {
     linkUrl.value = uni.getStorageSync("serveUrl");
+    // linkUrl.value = "localhost:81";
     useStore.GetMobileTenantConfig({ url: linkUrl.value });
   } else {
     uni.setStorageSync("serveUrl", "manager.usky.cn");
     commonStore.setServeList("manager.usky.cn", "");
     linkUrl.value = uni.getStorageSync("serveUrl");
+    // linkUrl.value = "localhost:81";
     useStore.GetMobileTenantConfig({ url: linkUrl.value });
   }
   //#endif
@@ -174,13 +195,13 @@ function submitRes() {
     return;
   }
 
-  if (!userChecked.value[0]) {
-    proxy.$modal.msg("请在阅读并同意 用户协议和隐私协议后登录");
+  if (!uChecked.value) {
+    modalShow.value = true;
     return;
   }
   //#endif
 
-  if (switchText.value == "账号密码登录") {
+  if (switchText.value == "验证码登录") {
     if (!phone.value) {
       proxy.$modal.msg("请输入手机号");
       return;
@@ -193,10 +214,14 @@ function submitRes() {
       proxy.$modal.msg("请输入验证码");
       return;
     }
+
     login({
       phone: phone.value,
       verify: verify.value,
-      tenantId: useStore.$state.tenantId,
+      tenantId: useStore.tenantId,
+      cids: proxy.$settingStore.pushClientId || undefined,
+      type: proxy.$common.isWechatMp() ? "wx" : "app",
+      openId: useStore.wxOpenId || undefined,
     });
   } else {
     if (!username.value) {
@@ -211,7 +236,10 @@ function submitRes() {
     login({
       username: username.value,
       password: password.value,
-      tenantId: useStore.$state.tenantId,
+      tenantId: useStore.tenantId,
+      cids: proxy.$settingStore.pushClientId || undefined,
+      type: proxy.$common.isWechatMp() ? "wx" : "app",
+      openId: useStore.wxOpenId || undefined,
     });
   }
 }
@@ -225,10 +253,16 @@ function login(data) {
     proxy.$modal.closeLoading();
     useStore.GetInfo().then((res) => {
       proxy.$tab.reLaunch("/pages/index");
+      proxy.$settingStore.initThemeColor(storageSystem.get("themeColor")); //初始化默认主题
     });
   });
 }
 
+// 复选框chage事件
+function uCheckedChange(e) {
+  uChecked.value = e;
+}
+
 // 用户协议
 function handleUserAgrement() {
   let site = config.appInfo.agreements[0];
@@ -242,9 +276,9 @@ function handlePrivacy() {
 }
 
 onShow(() => {
-  setTimeout(() => {
+  nextTick(() => {
     init();
-  }, 50);
+  });
 });
 
 onLoad((options) => {});
@@ -408,6 +442,7 @@ onLoad((options) => {});
       color: #96a6b5;
       margin-top: 30px;
       display: flex;
+      flex-wrap: wrap;
       justify-content: center;
       > uni-view {
         margin: auto 0;

+ 173 - 260
src/pages/mine.vue

@@ -1,244 +1,227 @@
 <template>
-  <view class="mine-container" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
-    <!--顶部个人信息栏-->
-    <view class="top-area" :class="'bg-' + themeColor.name" :style="{ paddingTop: proxy.$settingStore.StatusBar ? proxy.$settingStore.StatusBar + 20 + 'px' : '55px' }">
-      <view class="flex padding justify-between">
-        <view class="flex align-center">
-          <view class="cu-avatar xl round bg-white" v-if="!avatar" @click="!data.nickName ? handleToLogin() : handleToAvatar(1)">
-            <view class="iconfont ucicon-people text-gray icon"></view>
-          </view>
-          <image class="cu-avatar xl round" v-if="avatar" :src="avatar" @click="handleToAvatar(2)"> </image>
-          <view class="login-tip" v-if="!data.nickName" @click="handleToLogin()"> 点击登录 </view>
-          <view class="user-info" v-if="data.nickName">
-            <view class="u_title"> {{ data.nickName }} </view>
-            <view class="u_title"> {{ data.phone }} </view>
+  <oa-scroll
+    customClass="mine-container scroll-height"
+    :customStyle="{ height: `calc(100vh - (50px + ${proxy.$settingStore.tabBarHeight}))`, position: 'relative' }"
+    :isSticky="false"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherEnabledTitle="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+  >
+    <template #default>
+      <!--顶部个人信息栏-->
+      <view class="top-area" :class="'bg-' + themeColor.name" :style="{ paddingTop: proxy.$settingStore.StatusBar ? proxy.$settingStore.StatusBar + 20 + 'px' : '55px' }">
+        <view class="flex justify-between p15">
+          <view class="flex align-center">
+            <view class="cu-avatar xl round border bg-white" v-if="!avatar" @click="!state.nickName ? proxy.$settingStore.handleToLogin() : proxy.$settingStore.handleToAvatar(1)">
+              <view class="iconfont oaIcon-people text-gray"></view>
+            </view>
+            <image class="cu-avatar xl round border bg-white" v-if="avatar" :src="avatar" @click="proxy.$settingStore.handleToAvatar(2)"> </image>
+            <view class="login-tip" v-if="!state.nickName" @click="proxy.$settingStore.handleToLogin()"> 点击登录 </view>
+            <view class="user-info" v-if="state.nickName">
+              <view class="u_title"> {{ state.nickName }} </view>
+              <view class="u_title"> {{ state.phone ? state.phone.substr(0, 3) + "******" + state.phone.substr(9) : "" }} </view>
+            </view>
           </view>
+          <view class="flex align-center"> </view>
         </view>
-        <view class="flex align-center"> </view>
-      </view>
 
-      <view class="vip-card-box"> </view>
-    </view>
+        <view class="vip-card-box"> </view>
+      </view>
 
-    <oa-transForm>
-      <template #content>
-        <view class="menu-list">
-          <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleToEditInfo()">
-            <view class="menu-item">
-              <view class="iconfont ucicon-user menu-item-icon"></view>
-              <view>我的信息</view>
+      <oa-transForm>
+        <template #content>
+          <view class="menu-list">
+            <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleToEditInfo()">
+              <view class="menu-item">
+                <view class="iconfont oaIcon-user menu-item-icon"></view>
+                <view>我的信息</view>
+              </view>
             </view>
-          </view>
-          <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleToSecure()">
-            <view class="menu-item">
-              <view class="iconfont ucicon-yanzheng menu-item-icon"></view>
-              <view>账号与安全</view>
+            <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleToSecure()" v-if="proxy.$common.isVisible()">
+              <view class="menu-item">
+                <view class="iconfont oaIcon-yanzheng menu-item-icon"></view>
+                <view>账号与安全</view>
+              </view>
             </view>
-          </view>
-          <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleAbout()">
-            <view class="menu-item">
-              <view class="iconfont ucicon-aixin menu-item-icon"></view>
-              <view>关于我们</view>
+            <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleToMessage()">
+              <view class="menu-item">
+                <view class="iconfont oaIcon-tongzhi menu-item-icon"></view>
+                <view>新消息通知</view>
+              </view>
             </view>
-          </view>
-          <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleHelp()">
-            <view class="menu-item">
-              <view class="iconfont ucicon-Help menu-item-icon"></view>
-              <view>常见问题</view>
+            <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleAbout()">
+              <view class="menu-item">
+                <view class="iconfont oaIcon-aixin menu-item-icon"></view>
+                <view>关于我们</view>
+              </view>
             </view>
-          </view>
-          <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleCleanTmp()">
-            <view class="menu-item">
-              <view class="iconfont ucicon-qinglihuancun menu-item-icon"></view>
-              <view>清理缓存</view>
-              <view style="margin: 0 15px 0 auto; font-size: 14px; color: #909399">{{ proxy.$settingStore.currentSize }}</view>
+            <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleHelp()">
+              <view class="menu-item">
+                <view class="iconfont oaIcon-Help menu-item-icon"></view>
+                <view>常见问题</view>
+              </view>
             </view>
-          </view>
-
-          <view class="list-cell list-cell-arrow" @click="handleToUpgrade">
-            <view class="menu-item">
-              <view class="iconfont ucicon-jianchagengxin menu-item-icon"></view>
-              <view>检查更新</view>
+            <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleCleanTmp()">
+              <view class="menu-item">
+                <view class="iconfont oaIcon-qinglihuancun menu-item-icon"></view>
+                <view>清理缓存</view>
+                <view class="text-right">{{ proxy.$settingStore.currentSize }}</view>
+              </view>
             </view>
-          </view>
-          <!-- <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleSetting()">
-            <view class="menu-item">
-              <view class="iconfont ucicon-shezhi menu-item-icon"></view>
-              <view>设置</view>
+            <view class="list-cell list-cell-arrow" @click="handleToUpgrade" v-if="proxy.$common.isVisible()">
+              <view class="menu-item">
+                <view class="iconfont oaIcon-jianchagengxin menu-item-icon"></view>
+                <view>检查更新</view>
+              </view>
             </view>
-          </view> -->
-        </view>
+            <!-- <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleSetting()">
+              <view class="menu-item">
+                <view class="iconfont oaIcon-shezhi menu-item-icon"></view>
+                <view>设置</view>
+              </view>
+            </view> -->
+          </view>
 
-        <!-- <view class="menu-list">
-          <view class="list-cell list-cell-arrow" @click="goMessagePush()">
-            <view class="menu-item">
-              <view class="iconfont ucicon-aixin menu-item-icon"></view>
-              <view>推送设置</view>
+          <!-- <view class="menu-list">
+            <view class="list-cell list-cell-arrow" @click="goMessagePush()">
+              <view class="menu-item">
+                <view class="iconfont oaIcon-aixin menu-item-icon"></view>
+                <view>推送设置</view>
+              </view>
             </view>
-          </view>
-          <view class="list-cell list-cell-arrow" @click="goBuilding()">
-            <view class="menu-item">
-              <view class="iconfont ucicon-aixin menu-item-icon"></view>
-              <view>建筑管理</view>
+            <view class="list-cell list-cell-arrow" @click="goBuilding()">
+              <view class="menu-item">
+                <view class="iconfont oaIcon-aixin menu-item-icon"></view>
+                <view>建筑管理</view>
+              </view>
             </view>
-          </view>
-          <view class="list-cell list-cell-arrow" @click="goFunReport()">
-            <view class="menu-item">
-              <view class="iconfont ucicon-aixin menu-item-icon"></view>
-              <view>功能报备</view>
+            <view class="list-cell list-cell-arrow" @click="goFunReport()">
+              <view class="menu-item">
+                <view class="iconfont oaIcon-aixin menu-item-icon"></view>
+                <view>功能报备</view>
+              </view>
             </view>
-          </view>
-        </view> -->
+          </view> -->
 
-        <view class="cu-list menu">
-          <view class="cu-item mt0">
-            <view class="content flex align-center">
-              <text class="iconfont ucicon-colorlens" :class="'text-' + themeColor.name"></text>
-              <view class="padding solid radius shadow-blur ml10" :class="'bg-' + themeColor.name"></view>
-              <view class="title ml10">
-                主题色:<text :class="'text-' + themeColor.name">{{ themeColor.title }}</text>
+          <view class="cu-list menu">
+            <view class="cu-item mt0">
+              <view class="content flex align-center">
+                <text class="iconfont oaIcon-colorlens" :class="'text-' + themeColor.name"></text>
+                <view class="padding solid radius shadow-blur ml10" :class="'bg-' + themeColor.name"></view>
+                <view class="title ml10">
+                  主题色:<text :class="'text-' + themeColor.name">{{ themeColor.title }}</text>
+                </view>
+              </view>
+              <view class="action">
+                <button class="cu-btn round shadow" @click="colorModal = true" :class="'bg-' + themeColor.name">
+                  <text class="iconfont oaIcon-colorlens"></text>
+                  选择主题
+                </button>
               </view>
-            </view>
-            <view class="action">
-              <button class="cu-btn round shadow" @click="colorModal = true" :class="'bg-' + themeColor.name">
-                <text class="iconfont ucicon-colorlens"></text>
-                选择主题
-              </button>
             </view>
           </view>
-        </view>
 
-        <view class="menu-list" @click="proxy.$settingStore.handleLogout">
-          <view class="list-cell">
-            <view class="menu-item">
-              <view class="button">退 出 登 录</view>
+          <view class="menu-list" @click="proxy.$settingStore.handleLogout">
+            <view class="list-cell">
+              <view class="menu-item">
+                <view class="button">退 出 登 录</view>
+              </view>
             </view>
           </view>
-        </view>
 
-        <!-- <view class="menu-list">
-          <view class="list-cell list-cell-arrow" @tap="goSiteManage" v-if="permissionLabel == 1">
-            <view class="menu-item">
-              <image class="menu-item-image" src="@/static/images/setting/setting-icon2.png" style="width: 15px; height: 15px"></image>
-              <view>站点管理</view>
+          <!-- <view class="menu-list">
+            <view class="list-cell list-cell-arrow" @tap="goSiteManage" v-if="permissionLabel == 1">
+              <view class="menu-item">
+                <image class="menu-item-image" src="@/static/images/setting/setting-icon2.png" style="width: 15px; height: 15px"></image>
+                <view>站点管理</view>
+              </view>
             </view>
-          </view>
-          <view class="list-cell list-cell-arrow" @tap="goAuthManage" v-if="permissionLabel == 1">
-            <view class="menu-item">
-              <image class="menu-item-image" src="@/static/images/setting/setting-icon4.png" style="width: 15px; height: 15px"></image>
-              <view>权限管理</view>
+            <view class="list-cell list-cell-arrow" @tap="goAuthManage" v-if="permissionLabel == 1">
+              <view class="menu-item">
+                <image class="menu-item-image" src="@/static/images/setting/setting-icon4.png" style="width: 15px; height: 15px"></image>
+                <view>权限管理</view>
+              </view>
             </view>
-          </view>
-        </view> -->
-      </template>
-    </oa-transForm>
-
-    <!-- 选择颜色模态框 -->
-    <view class="cu-modal" :class="{ show: colorModal }">
-      <view class="cu-dialog">
-        <view class="cu-bar justify-end solid-bottom">
-          <view class="content">选择颜色</view>
-          <view class="action" @tap="colorModal = false">
-            <u-icon name="close" size="14"></u-icon>
-            <text class="cuIcon-close text-red"></text>
-          </view>
+          </view> -->
+        </template>
+      </oa-transForm>
+    </template>
+  </oa-scroll>
+
+  <!-- 选择颜色模态框 -->
+  <view class="cu-modal" :class="{ show: colorModal }">
+    <view class="cu-dialog">
+      <view class="cu-bar justify-end solid-bottom">
+        <view class="content">选择颜色</view>
+        <view class="action" @tap="colorModal = false">
+          <u-icon name="close" size="14"></u-icon>
+          <text class="cuIcon-close text-red"></text>
         </view>
-        <view class="grid col-5 padding">
-          <view class="padding-xs" v-for="(item, index) in themeList" :key="index" @tap="SetColor(item)" :data-color="item.name">
-            <view class="padding-tb radius" :class="'bg-' + item.name">
-              {{ item.title }}
-            </view>
+      </view>
+      <view class="grid col-5 padding">
+        <view class="padding-xs" v-for="(item, index) in themeList" :key="index" @tap="SetColor(item)" :data-color="item.name">
+          <view class="padding-tb radius" :class="'bg-' + item.name">
+            {{ item.title }}
           </view>
         </view>
       </view>
     </view>
-
-    <oa-upgrade v-if="modalShow" :modalArray="modalArray" :themesColor="proxy.$settingStore.themeColor.color" @closeModal="closeModal" />
   </view>
 
+  <oa-upgrade ref="oaUpgradeRef" :themesColor="proxy.$settingStore.themeColor.color" />
+
   <oa-tabbar :tabbarValue="2"></oa-tabbar>
 </template>
 
 <script setup>
-import config from "@/config";
-import storage from "@/utils/storage";
+/*----------------------------------依赖引入-----------------------------------*/
 import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
 import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
 import { useStores, commonStores } from "@/store/modules/index";
-
-import { checkUpdates } from "@/api/system/setting";
-import { uploadAvatar, updateUserProfile } from "@/api/system/user";
-import { getAuthorization } from "@/api/business/zhxf/messagePush/index.js";
-
-const useStore = useStores();
+/*----------------------------------公共方法引入-----------------------------------*/
+import config from "@/config";
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
-const avatar = computed(() => {
-  return useStore.$state.avatar;
-});
-const themeColor = computed(() => {
-  return proxy.$settingStore.themeColor;
-});
-
-const data = reactive({
-  nickName: useStore.$state.nickName,
-  phone: useStore.$state.phonenumber,
+const useStore = useStores();
+const commonStore = commonStores();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  avatar: computed(() => {
+    return useStore.avatar;
+  }),
+  themeColor: computed(() => {
+    return proxy.$settingStore.themeColor;
+  }),
+
+  nickName: useStore.nickName,
+  phone: useStore.phonenumber,
   version: config.appInfo.version,
 
   colorModal: false,
   themeList: proxy.$constData.themeList,
-
-  modalShow: false,
-  modalArray: {},
 });
 
-const { colorModal, themeList, modalShow, modalArray } = toRefs(data);
+const { avatar, themeColor, colorModal, themeList } = toRefs(state);
 
 /**
  * @检查更新
  */
 function handleToUpgrade() {
-  proxy.$modal.loading("加载中");
-
-  let data = {
-    _api_key: "fba7440cd37400b6ff46e303896af4df",
-    appKey: "cbd3508235d03365f4253f6aae6b68ab",
-    buildVersion: config.appInfo.version,
-  };
-  checkUpdates(data).then((res) => {
-    if (res.code == 0) {
-      let platform = uni.getSystemInfoSync().platform; //手机平台
-
-      if (res.data.buildHaveNewVersion == true) {
-        //安卓手机弹窗升级
-        if (platform === "android") {
-          modalShow.value = true;
-          modalArray.value = res.data;
-        }
-        //IOS无法在线升级提示到商店下载
-        else {
-          uni.showModal({
-            title: "发现新版本 " + res.data.buildVersion,
-            content: "请到App store进行升级",
-            showCancel: false,
-          });
-        }
-      } else {
-        proxy.$modal.msg("您的软件版本已是最新");
-      }
-
-      proxy.$modal.closeLoading();
-    }
+  proxy.$settingStore.handleToUpgrade({
+    success: (res) => {
+      proxy.$refs["oaUpgradeRef"].openUpgrade({
+        modalArray: res.data,
+      });
+    },
   });
 }
 
-/**
- * @关闭弹窗
- */
-function closeModal(flag) {
-  modalShow.value = flag;
-}
-
 /**
  * @推送设置
  */
@@ -265,49 +248,10 @@ function goFunReport() {
  */
 function SetColor(item) {
   colorModal.value = false;
-  proxy.$settingStore.SET_THEMECOLOR(item);
+  proxy.$settingStore.initThemeColor(item);
   proxy.$settingStore.systemThemeColor([1, 2]);
 }
 
-/**
- * @点击登录
- */
-function handleToLogin() {
-  proxy.$tab.reLaunch("/pages/login");
-}
-
-/**
- * @点击头像
- */
-function handleToAvatar(type) {
-  if (type == 1) {
-    uni.chooseImage({
-      count: 1, //默认9
-      sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
-      sourceType: ["album", "camera"], //从相册选择、摄像头
-      success: function (res) {
-        uploadApi(res);
-      },
-    });
-  } else if (type == 2) {
-    proxy.$tab.navigateTo("/pages/mine/avatar/index");
-  }
-}
-
-/**
- * @upload上传头像
- * @api接口请求
- */
-function uploadApi(res) {
-  let data = { name: "file", filePath: res.tempFilePaths[0] };
-  uploadAvatar(data).then((response) => {
-    useStore.$state.avatar = response.data.url;
-    updateUserProfile({
-      avatar: response.data.url,
-    }).then(() => {});
-  });
-}
-
 onShow(() => {});
 
 onReady(() => {});
@@ -338,14 +282,6 @@ onNavigationBarButtonTap((e) => {
       margin-left: 10px;
     }
 
-    .cu-avatar {
-      border: 2px solid #eaeaea;
-
-      .icon {
-        font-size: 40px;
-      }
-    }
-
     .user-info {
       margin-left: 15px;
 
@@ -369,32 +305,9 @@ onNavigationBarButtonTap((e) => {
     }
   }
 
-  .cu-list.menu-avatar .cu-item {
-    border-radius: 5px;
-    padding: 30rpx 0;
-    box-shadow: 1px 1px 4px rgb(26 26 26 / 10%);
-    .cu-avatar {
-      background-color: rgba(0, 0, 0, 0);
-      background-size: 100% 100%;
-      left: 26rpx;
-    }
-    .content {
-      left: 130rpx;
-      font-size: 32rpx;
-    }
+  .scrollView {
+    height: calc(100vh - (50px + constant(safe-area-inset-bottom) + 55px + 0.9375rem + 0.9375rem + 4rem + 47px));
+    height: calc(100vh - (50px + env(safe-area-inset-bottom) + 55px + 0.9375rem + 0.9375rem + 4rem + 47px));
   }
 }
-
-.item-box {
-  background-color: #ffffff;
-  margin: 30rpx;
-  display: flex;
-  flex-direction: row;
-  justify-content: center;
-  align-items: center;
-  padding: 10rpx;
-  border-radius: 8rpx;
-  color: #303133;
-  font-size: 32rpx;
-}
 </style>

+ 53 - 28
src/pages/mine/about/index.vue

@@ -2,21 +2,20 @@
   <view class="about-container">
     <u-navbar :titleStyle="{ color: '#fff' }" :autoBack="true" title="关于我们" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color">
       <template #left>
-        <view class="u-nav-slot">
+        <view class="u-navbar__content__left__item">
           <u-icon name="arrow-left" size="19" color="#fff"></u-icon>
         </view>
       </template>
     </u-navbar>
 
-    <view class="uni-content-header"></view>
-    <view class="header-section text-center">
-      <image style="width: 150rpx; height: 150rpx" mode="heightFix" :src="useStore.$state.loginLogo" v-if="useStore.$state.loginLogo" />
-      <image style="width: 150rpx; height: 150rpx" mode="heightFix" src="@/static/logo200.png" v-else />
-      <uni-title type="h2" :title="useStore.$state.loginTitle"></uni-title>
+    <view class="oa-header-section text-center">
+      <image style="width: 130rpx; height: 130rpx" mode="heightFix" :src="useStore.loginLogo" v-if="useStore.loginLogo" />
+      <image style="width: 130rpx; height: 130rpx" mode="heightFix" src="@/static/logo200.png" v-else />
+      <uni-title type="h2" :title="useStore.loginTitle"></uni-title>
     </view>
 
-    <view class="content-section">
-      <view class="menu-list">
+    <view class="oa-content-section">
+      <view class="menu-list mt0 mlr0">
         <view class="list-cell list-cell-arrow">
           <view class="menu-item">
             <view>版本信息</view>
@@ -46,28 +45,49 @@
       </view>
     </view>
 
-    <view class="copyright">
-      <!-- <view>Copyright &copy; 2021 - 2025 Usky. All Rights Reserved. 永天股份 版权所有</view> -->
+    <view class="oa-footer-section">
       <view>{{ copyright }}</view>
+      <u-text :text="filingInfo.code" :href="filingInfo.href" mode="link" align="center" size="12"></u-text>
     </view>
   </view>
 </template>
 
 <script setup>
-import config from "@/config";
+/*----------------------------------依赖引入-----------------------------------*/
 import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
 import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
 import { useStores, commonStores } from "@/store/modules/index";
-
-const useStore = useStores();
-
+/*----------------------------------公共方法引入-----------------------------------*/
+import config from "@/config";
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
+const useStore = useStores();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  url: computed(() => {
+    return config.appInfo.site_url;
+  }),
+  version: computed(() => {
+    return config.appInfo.version;
+  }),
+  email: computed(() => {
+    return config.appInfo.email;
+  }),
+  hotline: computed(() => {
+    return config.appInfo.hotline;
+  }),
+  copyright: computed(() => {
+    return config.appInfo.copyright;
+  }),
+  filingInfo: computed(() => {
+    return config.appInfo.filingInfo;
+  }),
+});
 
-const url = ref(config.appInfo.site_url);
-const version = ref(config.appInfo.version);
-const email = ref(config.appInfo.email);
-const hotline = ref(config.appInfo.hotline);
-const copyright = ref(config.appInfo.copyright);
+const { url, version, email, hotline, copyright, filingInfo } = toRefs(state);
 
 onShow(() => {
   //调用系统主题颜色
@@ -77,18 +97,23 @@ onShow(() => {
 
 <style lang="scss" scoped>
 .about-container {
-  .copyright {
-    margin-top: 50rpx;
-    text-align: center;
-    line-height: 60rpx;
-    color: #999;
-  }
-
-  .header-section {
+  .oa-header-section {
     display: flex;
-    padding: 30rpx 0 0;
+    padding: 15px 0;
     flex-direction: column;
     align-items: center;
   }
+
+  .oa-footer-section {
+    margin-top: 25px;
+    text-align: center;
+    line-height: 30px;
+    color: #999;
+    font-size: 12px;
+
+    :deep(.u-text__value) {
+      justify-content: center;
+    }
+  }
 }
 </style>

Vissa filer visades inte eftersom för många filer har ändrats