Browse Source

Merge branch '165' of uskycloud/usky-web-mobile into master

gez 11 months ago
parent
commit
a4fe5e9864
100 changed files with 5877 additions and 3534 deletions
  1. BIN
      nativeplugins/Fvv-AutoStart/android/autostart-release.aar
  2. 20 0
      nativeplugins/Fvv-AutoStart/package.json
  3. 25 22
      package.json
  4. 89 82
      src/App.vue
  5. 0 0
      src/api/business/fireIot/customManage.js
  6. 0 0
      src/api/business/fireIot/repairReport.js
  7. 0 10
      src/api/business/mhxf/xunJian/index.js
  8. 65 0
      src/api/business/project.js
  9. 0 0
      src/api/business/zhaf/xunJian/collect.js
  10. 42 0
      src/api/business/zhaf/xunJian/index.js
  11. 1 1
      src/api/business/zhaf/xunJian/plan.js
  12. 0 0
      src/api/business/zhaf/xunJian/record.js
  13. 9 0
      src/api/common/index.js
  14. 1 3
      src/api/login.js
  15. 18 0
      src/api/mine/index.js
  16. 54 0
      src/api/mine/info.js
  17. 52 0
      src/api/system/dict.js
  18. 27 0
      src/api/system/user.js
  19. 27 10
      src/components/oa-calendar/uni-calendar.vue
  20. 1 1
      src/components/oa-movable/index.vue
  21. 33 15
      src/components/oa-scroll/index.vue
  22. 26 37
      src/components/oa-tabbar/index.vue
  23. 10 5
      src/components/oa-transForm/index.vue
  24. 25 16
      src/components/oa-upgrade/index.vue
  25. 15 15
      src/components/oa-upload/index.vue
  26. 111 0
      src/components/oa-weather/index.vue
  27. 1 1
      src/components/zzlb-mutiselect/zzlb-mutiselect.vue
  28. 9 5
      src/config.js
  29. 3 12
      src/main.js
  30. 40 17
      src/manifest.json
  31. 164 92
      src/pages.json
  32. 8 8
      src/pages/business/analyse/index.vue
  33. 36 32
      src/pages/business/common/fastMail/index.vue
  34. 179 0
      src/pages/business/common/projectMange/components/mall-head.vue
  35. 296 0
      src/pages/business/common/projectMange/components/mall-list.vue
  36. 226 0
      src/pages/business/common/projectMange/list/index.vue
  37. 89 0
      src/pages/business/common/projectMange/mall/index.vue
  38. 168 0
      src/pages/business/common/projectMange/record/details.vue
  39. 219 0
      src/pages/business/common/projectMange/record/index.vue
  40. 429 0
      src/pages/business/common/projectMange/write/components/template1.vue
  41. 115 0
      src/pages/business/common/projectMange/write/index.vue
  42. 110 0
      src/pages/business/common/projectMange/write/insert.vue
  43. 85 0
      src/pages/business/common/videoMonitor/videoDetail.vue
  44. 166 0
      src/pages/business/common/videoMonitor/videoList.vue
  45. 72 80
      src/pages/business/fireIot/alarmManage/alarmDetails/index.vue
  46. 55 50
      src/pages/business/fireIot/alarmManage/alarmDetailsList/index.vue
  47. 1 2
      src/pages/business/fireIot/alarmManage/index.vue
  48. 17 26
      src/pages/business/fireIot/customManage/index.vue
  49. 36 24
      src/pages/business/fireIot/deviceManage/components/deviceDetails.vue
  50. 6 19
      src/pages/business/fireIot/deviceManage/components/deviceDetailsList.vue
  51. 1 2
      src/pages/business/fireIot/deviceManage/index.vue
  52. 24 143
      src/pages/business/fireIot/facilitiesGather/index.vue
  53. 4 4
      src/pages/business/fireIot/facilitiesGather/mapGather.vue
  54. 39 36
      src/pages/business/fireIot/facilitiesManage/facilitiesDetails.vue
  55. 1 2
      src/pages/business/fireIot/facilitiesManage/facilitiesDetailsList.vue
  56. 9 8
      src/pages/business/fireIot/facilitiesManage/index.vue
  57. 2 2
      src/pages/business/fireIot/repairManage/index.vue
  58. 58 69
      src/pages/business/fireIot/repairManage/repairDetails.vue
  59. 42 35
      src/pages/business/fireIot/repairManage/repairDetailsList.vue
  60. 19 52
      src/pages/business/fireIot/repairReport/index.vue
  61. 3 4
      src/pages/business/fireIot/repairReport/record.vue
  62. 104 110
      src/pages/business/mhxf/deviceManage/index.vue
  63. 67 240
      src/pages/business/mhxf/fireReport/components/detailed.vue
  64. 31 49
      src/pages/business/mhxf/fireReport/index.vue
  65. 146 206
      src/pages/business/mhxf/informationSelect/index.vue
  66. 138 118
      src/pages/business/mhxf/needMatter/index.vue
  67. 79 310
      src/pages/business/mhxf/unitInfoCollection/index.vue
  68. 0 95
      src/pages/business/videoMonitor/index.vue
  69. 0 165
      src/pages/business/videoMonitor/videoDetail.vue
  70. 0 209
      src/pages/business/videoMonitor/videoList.vue
  71. 12 20
      src/pages/business/zhaf/signIn/index.vue
  72. 40 40
      src/pages/business/zhaf/xunJian/collect/components/collectDetail.vue
  73. 129 68
      src/pages/business/zhaf/xunJian/collect/components/collectRecord.vue
  74. 152 117
      src/pages/business/zhaf/xunJian/collect/index.vue
  75. 0 0
      src/pages/business/zhaf/xunJian/components/index.vue
  76. 113 0
      src/pages/business/zhaf/xunJian/error/errorDisposition.vue
  77. 172 0
      src/pages/business/zhaf/xunJian/error/errorList.vue
  78. 191 0
      src/pages/business/zhaf/xunJian/error/errorListDetail.vue
  79. 234 0
      src/pages/business/zhaf/xunJian/error/index.vue
  80. 51 33
      src/pages/business/zhaf/xunJian/plan/components/content.vue
  81. 108 90
      src/pages/business/zhaf/xunJian/plan/components/report.vue
  82. 123 85
      src/pages/business/zhaf/xunJian/plan/components/siteDetails.vue
  83. 112 74
      src/pages/business/zhaf/xunJian/plan/index.vue
  84. 3 10
      src/pages/business/zhaf/xunJian/record/index.vue
  85. 9 9
      src/pages/business/zhaf/xunJian/record/recordDetail/index.vue
  86. 41 45
      src/pages/business/zhaf/xunJian/xunJian.vue
  87. 6 6
      src/pages/business/zhxf/building/index.vue
  88. 1 0
      src/pages/business/zhxf/fireInspect/index.vue
  89. 67 111
      src/pages/business/zhxf/fireInspect/inspectDetails/index.vue
  90. 51 45
      src/pages/business/zhxf/fireInspect/inspectDetailsList/index.vue
  91. 1 1
      src/pages/business/zhxf/funReport/funcAdd/index.vue
  92. 1 1
      src/pages/business/zhxf/funReport/index.vue
  93. 14 54
      src/pages/business/zhxf/messagePush/index.vue
  94. 37 45
      src/pages/common/alarmMessage/index.vue
  95. 62 0
      src/pages/common/appMessage/details.vue
  96. 156 120
      src/pages/common/appMessage/index.vue
  97. 0 1
      src/pages/common/evaluate/index.vue
  98. 40 106
      src/pages/common/invoicing/index.vue
  99. 1 7
      src/pages/common/nfc/index.vue
  100. 2 2
      src/pages/common/phoneVerify/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"
+        }
+    }
+}

+ 25 - 22
package.json

@@ -32,28 +32,30 @@
         "build:quickapp-webview": "uni build -p quickapp-webview",
         "build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
         "build:quickapp-webview-union": "uni build -p quickapp-webview-union",
-        "clear": "rimraf node_modules && npm install",
+        "clear": "rimraf node_modules && npm install --force",
         "clean": "npm cache clean --force"
     },
     "dependencies": {
         "@amap/amap-jsapi-loader": "^1.0.1",
-        "@dcloudio/uni-app": "3.0.0-alpha-3050320220729001",
-        "@dcloudio/uni-app-plus": "3.0.0-alpha-3050320220729001",
-        "@dcloudio/uni-components": "3.0.0-alpha-3050320220729001",
-        "@dcloudio/uni-h5": "3.0.0-alpha-3050320220729001",
-        "@dcloudio/uni-mp-alipay": "3.0.0-alpha-3050320220729001",
-        "@dcloudio/uni-mp-baidu": "3.0.0-alpha-3050320220729001",
-        "@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-3050320220729001",
-        "@dcloudio/uni-mp-lark": "3.0.0-alpha-3050320220729001",
-        "@dcloudio/uni-mp-qq": "3.0.0-alpha-3050320220729001",
-        "@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3050320220729001",
-        "@dcloudio/uni-mp-weixin": "3.0.0-alpha-3050320220729001",
-        "@dcloudio/uni-quickapp-webview": "3.0.0-alpha-3050320220729001",
+        "@dcloudio/uni-app": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-app-harmony": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-app-plus": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-components": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-h5": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-mp-alipay": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-mp-baidu": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-mp-jd": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-mp-lark": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-mp-qq": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-mp-toutiao": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-mp-weixin": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-mp-xhs": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-quickapp-webview": "3.0.0-alpha-4020320240703001",
         "echarts": "^5.3.3",
-        "node-sass": "^7.0.1",
         "pinia": "2.0.14",
         "pinia-plugin-persistedstate": "^3.1.0",
-        "vue": "^3.2.47",
+        "vue": "^3.4.21",
         "vue-echarts": "^6.2.3",
         "vue-i18n": "^9.1.9",
         "vue-json-excel": "^0.3.0",
@@ -61,15 +63,16 @@
         "weixin-js-sdk": "^1.6.0"
     },
     "devDependencies": {
-        "@dcloudio/types": "^3.0.7",
-        "@dcloudio/uni-automator": "3.0.0-alpha-3050320220729001",
-        "@dcloudio/uni-cli-shared": "3.0.0-alpha-3050320220729001",
-        "@dcloudio/uni-stacktracey": "3.0.0-alpha-3050320220729001",
-        "@dcloudio/vite-plugin-uni": "3.0.0-alpha-3050320220729001",
+        "@dcloudio/types": "^3.4.8",
+        "@dcloudio/uni-automator": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-cli-shared": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/uni-stacktracey": "3.0.0-alpha-4020320240703001",
+        "@dcloudio/vite-plugin-uni": "3.0.0-alpha-4020320240703001",
         "@vitejs/plugin-vue": "^2.3.3",
+        "@vue/runtime-core": "^3.4.21",
         "cross-env": "^7.0.3",
         "dayjs": "^1.11.7",
-        "sass": "^1.54.3",
-        "vite": "^2.9.14"
+        "sass": "1.57.1",
+        "vite": "5.2.8"
     }
 }

+ 89 - 82
src/App.vue

@@ -1,81 +1,108 @@
 <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 JKeyListen from "@/utils/keyListen.js";
+import { storageSystem } from "@/utils/storage";
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
 
 function initApp() {
-  //初始化获取安全区高度
-  proxy.$settingStore.systemHeightTop();
-  //隐藏自带tabbar
-  uni.hideTabBar();
+  proxy.$settingStore.initThemeColor(storageSystem.get("themeColor")); //初始化默认主题
+  proxy.$settingStore.systemHeightTop(); //初始化获取安全区高度
 
   //#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 +115,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 +151,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 - 0
src/api/common/customManage.js → src/api/business/fireIot/customManage.js


+ 0 - 0
src/api/common/repairReport.js → src/api/business/fireIot/repairReport.js


+ 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,
-  });
-}

+ 65 - 0
src/api/business/project.js

@@ -0,0 +1,65 @@
+import { request } from "@/utils/request";
+
+/**
+ * 项目管理接口集合
+ * @method ReportRecord 报告记录列表
+ * @method ReportRecordDetails 报告记录详情
+ * @method ReportRecordReadFlag 报告记录已读
+ * @method ReportInsert 报告提交
+ * @method ProjectsSelect 项目下拉
+ * @method ProjectsWeekList 导入上一篇
+ * @method ProjectsList 项目列表
+ */
+export function projectApi() {
+    return {
+        ReportRecord(data) {
+            return request({
+                url: "/service-iot/pmWorkContent/page",
+                method: "GET",
+                data: data,
+            });
+        },
+        ReportRecordDetails(data) {
+            return request({
+                url: "/service-iot/pmWorkContent/reportRecord",
+                method: "GET",
+                data: data,
+            });
+        },
+        ReportRecordReadFlag(data) {
+            return request({
+                url: "/service-iot/pmReceive/updateReadFlag",
+                method: "GET",
+                data: data,
+            });
+        },
+        ReportInsert(data) {
+            return request({
+                url: '/service-iot/pmWorkReport/add',
+                method: 'POST',
+                data: data
+            })
+        },
+        ProjectsSelect(data) {
+            return request({
+                url: '/service-iot/pmProject/projects',
+                method: 'GET',
+                data: data
+            })
+        },
+        ProjectsWeekList(data) {
+            return request({
+                url: '/service-iot/pmWorkReport/week',
+                method: 'GET',
+                data: data
+            })
+        },
+        ProjectsList(data) {
+            return request({
+                url: '/service-iot/pmProject/page',
+                method: 'GET',
+                data: data
+            })
+        }
+    };
+}

+ 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 - 0
src/api/system/user.js

@@ -55,3 +55,30 @@ export function appDel(data) {
     method: 'DELETE',
   })
 }
+
+// 树结构查询部门--用户列表
+export function deptUserTreeSelect(query) {
+  return request({
+    url: '/system/dept/deptUserTreeSelect',
+    method: 'GET',
+    params: query
+  })
+}
+
+// 用户列表
+export function UserList(query) {
+  return request({
+    url: '/system//user/list',
+    method: 'GET',
+    params: query
+  })
+}
+
+// 微信用户验证
+export function getPageAuthorization(data) {
+  return request({
+    url: '/service-iot/weChat/getPageAuthorization',
+    method: 'GET',
+    data: data,
+  })
+}

+ 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>

+ 26 - 37
src/components/oa-tabbar/index.vue

@@ -1,62 +1,51 @@
 <template>
-  <u-tabbar :value="tabbarValue" @change="tabbarChange" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true" :border="false" :activeColor="proxy.$settingStore.themeColor.color">
+  <u-tabbar :value="tabbarValue" @change="tabbarChange" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true" :border="true" :activeColor="proxy.$settingStore.themeColor.color">
     <u-tabbar-item :text="tab.text" v-for="(tab, index) in tabbarList" :key="index" :dot="tab.dot">
       <template #active-icon>
-        <image style="width: 24px; height: 24px" :src="proxy.$settingStore.themeColor.tabList[index]"></image>
+        <!-- <image style="width: 24px; height: 24px" :src="proxy.$settingStore.themeColor.tabList[index]"></image> -->
+        <text class="iconfont font20" :class="tab.iconClass" :style="{ color: proxy.$settingStore.themeColor.color }"></text>
       </template>
       <template #inactive-icon>
-        <image style="width: 24px; height: 24px" :src="tab.iconPath"></image>
+        <!-- <image style="width: 24px; height: 24px" :src="tab.iconPath"></image> -->
+        <text class="iconfont font20" :class="tab.iconClass" style="color: #7d7e80"></text>
       </template>
     </u-tabbar-item>
   </u-tabbar>
 </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 props = defineProps({
   tabbarValue: {
     type: Number,
     default: 0,
   },
-});
-
-const { tabbarValue } = toRefs(props);
-
-const tabbarList = ref([
-  {
-    pagePath: "/pages/index",
-    iconPath: "/static/images/tabBar/tab-home.png",
-    selectedIconPath: "/static/images/tabBar/tab-home-blue.png",
-    text: "工作台",
-    dot: false,
-  },
-  // {
-  //   "pagePath": "pages/analyse/analyse",
-  //   "iconPath": "/static/images/tabBar/analyse.png",
-  //   "selectedIconPath": "/static/images/tabBar/analyse-selected.png",
-  //   "text": "分析"
-  // },
-  {
-    pagePath: "/pages/info",
-    iconPath: "/static/images/tabBar/tab-info.png",
-    selectedIconPath: "/static/images/tabBar/tab-info-blue.png",
-    text: "消息",
-    dot: false,
+  tabbarList: {
+    type: Object,
+    default: [],
   },
-  {
-    pagePath: "/pages/mine",
-    iconPath: "/static/images/tabBar/tab-my.png",
-    selectedIconPath: "/static/images/tabBar/tab-my-blue.png",
-    text: "我的",
-    dot: false,
+  isTabbar: {
+    type: Boolean,
+    default: true,
   },
-]);
+});
+
+const { tabbarValue, tabbarList, isTabbar } = toRefs(props);
 
 function tabbarChange(e) {
-  proxy.$tab.switchTab(tabbarList.value[e].pagePath);
+  if (isTabbar.value) {
+    proxy.$tab.switchTab(tabbarList.value[e].pagePath);
+  } else {
+    proxy.$tab.redirectTo(tabbarList.value[e].pagePath);
+  }
 }
 
 onLoad((option) => {});

+ 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)

+ 40 - 17
src/manifest.json

@@ -1,9 +1,9 @@
 {
     "name" : "综合智慧云",
     "appid" : "__UNI__36DE3A0",
-    "description" : "综合智慧云app,助力企业数字化转型升级",
-    "versionName" : "2.1.4",
-    "versionCode" : 12,
+    "description" : "综合智慧云APP,是一款助力于企业数字化的应用平台,帮助企业提升办公效率,实现组织数字化和业务数字化。",
+    "versionName" : "2.1.6",
+    "versionCode" : 16,
     "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" ],
@@ -82,19 +85,20 @@
             "ios" : {
                 "dSYMs" : false,
                 "privacyDescription" : {
-                    "NSPhotoLibraryUsageDescription" : "该应用需要读取你的相册,以便为你上传头像",
-                    "NSPhotoLibraryAddUsageDescription" : "该应用需要读取你的相册,以便拍照保存图片",
-                    "NSCameraUsageDescription" : "该应用需要你的相机,以便你拍摄上传头像信息",
-                    "NSMicrophoneUsageDescription" : "该应用需要使用你的麦克风,以便语音播放",
-                    "NSLocationWhenInUseUsageDescription" : "该应用需要你的地理位置,以便为你提供当前位置信息",
-                    "NSLocationAlwaysUsageDescription" : "该应用需要持续获取用户地理位置,以便为你进行导航",
-                    "NSLocationAlwaysAndWhenInUseUsageDescription" : "该应用需要你的地理位置,以便为你提供当前位置信息",
+                    "NSPhotoLibraryUsageDescription" : "该应用需要读取你的相册,用于上传头像",
+                    "NSPhotoLibraryAddUsageDescription" : "该应用需要读取你的相册,用于拍照保存图片",
+                    "NSCameraUsageDescription" : "该应用需要你的相机,用于你拍摄上传头像信息",
+                    "NSMicrophoneUsageDescription" : "该应用需要使用你的麦克风,用于语音播放",
+                    "NSLocationWhenInUseUsageDescription" : "该应用需要你的地理位置,用于天气、签到等功能",
+                    "NSLocationAlwaysUsageDescription" : "该应用需要持续获取用户地理位置,用于天气、签到等功能",
+                    "NSLocationAlwaysAndWhenInUseUsageDescription" : "该应用需要你的地理位置,用于天气、签到等功能",
                     "NSCalendarsUsageDescription" : "该应用需要获取你的日历,以便更好的体验",
                     "NSContactsUsageDescription" : "该应用需要读取你的通讯录,以便联系同事",
                     "NSBluetoothPeripheralUsageDescription" : "该应用需要你的蓝牙,以便读取相关蓝牙设备",
                     "NFCReaderUsageDescription" : "",
                     "NSBluetoothAlwaysUsageDescription" : "该应用需要你的蓝牙,以便读取相关蓝牙设备"
-                }
+                },
+                "UIBackgroundModes" : ""
             },
             /* 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配置 */
+

+ 164 - 92
src/pages.json

@@ -93,12 +93,6 @@
             "navigationBarTitleText": "浏览文本"
           }
         },
-        {
-          "path": "textview/index1",
-          "style": {
-            "navigationBarTitleText": "浏览文本"
-          }
-        },
         {
           "path": "square/index",
           "style": {
@@ -121,13 +115,6 @@
             "navigationBarBackgroundColor": "#FFFFFF"
           }
         },
-        {
-          "path": "customManage/index",
-          "style": {
-            "navigationBarTitleText": "客户管理",
-            "enablePullDownRefresh": false
-          }
-        },
         {
           "path": "success/index",
           "style": {
@@ -139,28 +126,21 @@
         {
           "path": "appMessage/index",
           "style": {
-            "navigationBarTitleText": "应用消息",
+            "navigationBarTitleText": "消息列表",
             "enablePullDownRefresh": false
           }
         },
         {
-          "path": "alarmMessage/index",
+          "path": "appMessage/details",
           "style": {
-            "navigationBarTitleText": "告警通知",
+            "navigationBarTitleText": "消息详情",
             "enablePullDownRefresh": false
           }
         },
         {
-          "path": "repairReport/index",
-          "style": {
-            "navigationBarTitleText": "报修申请",
-            "enablePullDownRefresh": false
-          }
-        },
-        {
-          "path": "repairReport/record",
+          "path": "alarmMessage/index",
           "style": {
-            "navigationBarTitleText": "报修历史",
+            "navigationBarTitleText": "告警通知",
             "enablePullDownRefresh": false
           }
         },
@@ -177,6 +157,18 @@
             "navigationBarTitleText": "NFC读取",
             "enablePullDownRefresh": false
           }
+        },
+        {
+          "path": "searchSelect/index",
+          "style": {
+            "navigationBarTitleText": "搜索",
+            "navigationStyle": "custom",
+            "enablePullDownRefresh": false,
+            "app-plus": {
+              "bounce": "none",
+              "titleNView": false
+            }
+          }
         }
       ]
     },
@@ -188,16 +180,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 +275,7 @@
     },
     // 智慧安防
     {
-      "root": "pages/business/zhaf",
+      "root": "pages/business/zhaf/",
       "pages": [
         //巡检模块 开始
         {
@@ -343,20 +331,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 +350,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,16 +398,10 @@
         //人员签到 签退
       ]
     },
-    // 智慧安防
-
     // 闵行消防
     {
-      "root": "pages/business/mhxf",
+      "root": "pages/business/mhxf/",
       "pages": [
-        //消防督察单模块 开始
-        //消防督察单模块 结束
-
-        //信息查询 开始
         {
           "path": "informationSelect/index",
           "style": {
@@ -417,8 +409,6 @@
             "enablePullDownRefresh": false
           }
         },
-        //信息查询 结束
-        //设备管理 开始
         {
           "path": "deviceManage/index",
           "style": {
@@ -426,8 +416,6 @@
             "enablePullDownRefresh": false
           }
         },
-        //设备管理 结束
-        //协同作战地图 开始
         {
           "path": "coordination/index",
           "style": {
@@ -435,8 +423,6 @@
             "enablePullDownRefresh": false
           }
         },
-        //协同作战地图 结束
-        //单位信息采集 开始
         {
           "path": "unitInfoCollection/index",
           "style": {
@@ -444,8 +430,6 @@
             "enablePullDownRefresh": false
           }
         },
-        //单位信息采集 结束
-        //消防报告 开始
         {
           "path": "fireReport/index",
           "style": {
@@ -467,8 +451,6 @@
             "enablePullDownRefresh": false
           }
         },
-        //消防报告 结束
-        //待办事项 开始
         {
           "path": "needMatter/index",
           "style": {
@@ -476,12 +458,11 @@
             "enablePullDownRefresh": false
           }
         }
-        //待办事项 结束
       ]
     },
     // 智慧消防
     {
-      "root": "pages/business/zhxf",
+      "root": "pages/business/zhxf/",
       "pages": [
         {
           "path": "messagePush/index",
@@ -537,7 +518,7 @@
     },
     // 消防物联网
     {
-      "root": "pages/business/fireIot",
+      "root": "pages/business/fireIot/",
       "pages": [
         {
           "path": "deviceManage/index",
@@ -636,12 +617,33 @@
             "navigationBarTitleText": "报修处理",
             "enablePullDownRefresh": false
           }
+        },
+        {
+          "path": "customManage/index",
+          "style": {
+            "navigationBarTitleText": "客户管理",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "repairReport/index",
+          "style": {
+            "navigationBarTitleText": "报修申请",
+            "enablePullDownRefresh": false
+          }
+        },
+        {
+          "path": "repairReport/record",
+          "style": {
+            "navigationBarTitleText": "报修历史",
+            "enablePullDownRefresh": false
+          }
         }
       ]
     },
-    // 业务模块
+    // 业务公共模块
     {
-      "root": "pages/business",
+      "root": "pages/business/common/",
       "pages": [
         {
           "path": "fastMail/index",
@@ -663,6 +665,78 @@
             "navigationBarTitleText": "实时监控",
             "enablePullDownRefresh": false
           }
+        },
+        {
+          "path": "projectMange/record/index",
+          "style": {
+            "navigationBarTitleText": "报告记录",
+            "enablePullDownRefresh": false,
+            "navigationStyle": "custom",
+            "app-plus": {
+              "bounce": "none",
+              "titleNView": false
+            }
+          }
+        },
+        {
+          "path": "projectMange/record/details",
+          "style": {
+            "navigationBarTitleText": "报告详情",
+            "enablePullDownRefresh": false,
+            "navigationStyle": "custom",
+            "app-plus": {
+              "bounce": "none",
+              "titleNView": false
+            }
+          }
+        },
+        {
+          "path": "projectMange/write/index",
+          "style": {
+            "navigationBarTitleText": "模板选择",
+            "enablePullDownRefresh": false,
+            "navigationStyle": "custom",
+            "app-plus": {
+              "bounce": "none",
+              "titleNView": false
+            }
+          }
+        },
+        {
+          "path": "projectMange/write/insert",
+          "style": {
+            "navigationBarTitleText": "报告填写",
+            "enablePullDownRefresh": false,
+            "navigationStyle": "custom",
+            "app-plus": {
+              "bounce": "none",
+              "titleNView": false
+            }
+          }
+        },
+        {
+          "path": "projectMange/list/index",
+          "style": {
+            "navigationBarTitleText": "项目列表",
+            "enablePullDownRefresh": false,
+            "navigationStyle": "custom",
+            "app-plus": {
+              "bounce": "none",
+              "titleNView": false
+            }
+          }
+        },
+        {
+          "path": "projectMange/mall/index",
+          "style": {
+            "navigationBarTitleText": "选择接收人",
+            "enablePullDownRefresh": false,
+            "navigationStyle": "custom",
+            "app-plus": {
+              "bounce": "none",
+              "titleNView": false
+            }
+          }
         }
       ]
     }
@@ -674,6 +748,7 @@
     "backgroundColor": "#F8F8F8"
   },
   "tabBar": {
+    "fontSize": "12px",
     "color": "#a9a9a9",
     "selectedColor": "#000000",
     "borderStyle": "white",
@@ -683,25 +758,22 @@
         "pagePath": "pages/index",
         "iconPath": "/static/images/tabBar/tab-home.png",
         "selectedIconPath": "/static/images/tabBar/tab-home-blue.png",
-        "text": "工作台"
+        "text": "工作台",
+        "visible": false
       },
-      // {
-      //   "pagePath": "pages/analyse/analyse",
-      //   "iconPath": "/static/images/tabBar/analyse.png",
-      //   "selectedIconPath": "/static/images/tabBar/analyse-selected.png",
-      //   "text": "分析"
-      // },
       {
         "pagePath": "pages/info",
         "iconPath": "/static/images/tabBar/tab-info.png",
         "selectedIconPath": "/static/images/tabBar/tab-info-blue.png",
-        "text": "消息"
+        "text": "消息",
+        "visible": false
       },
       {
         "pagePath": "pages/mine",
         "iconPath": "/static/images/tabBar/tab-my.png",
         "selectedIconPath": "/static/images/tabBar/tab-my-blue.png",
-        "text": "我的"
+        "text": "我的",
+        "visible": false
       }
     ]
   },
@@ -716,4 +788,4 @@
       }
     ]
   }
-}
+}

+ 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;
     }
   }
 }

+ 36 - 32
src/pages/business/fastMail/index.vue → src/pages/business/common/fastMail/index.vue

@@ -1,10 +1,19 @@
 <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="tabsList"
+      :current="tabsCurrent"
+      @click="tabsClick"
+      lineColor="#333"
+      :activeStyle="{ color: '#333', fontSize: '14px' }"
+      :inactiveStyle="{ color: '#909399', fontSize: '14px' }"
+      :scrollable="false"
+    ></u-tabs>
   </u-sticky>
 
   <oa-scroll
     customClass="fastMail-container scroll-height"
+    :isSticky="true"
     :pageSize="pageSize"
     :total="total"
     :refresherLoad="true"
@@ -22,18 +31,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 +56,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 +78,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 +168,6 @@ function load() {
  */
 function refresh() {
   pageSize.value = 20;
-  total.value = 0;
   init();
 }
 
@@ -199,7 +203,7 @@ onNavigationBarButtonTap((e) => {
     }
 
     &-row_wrap {
-      font-size: 13px;
+      font-size: 14px;
       flex-flow: row wrap;
 
       &-view {

+ 179 - 0
src/pages/business/common/projectMange/components/mall-head.vue

@@ -0,0 +1,179 @@
+<template>
+  <view class="me-tabs">
+    <scroll-view :id="viewId" :scroll-left="scrollLeft" scroll-x scroll-with-animation :scroll-animation-duration="300">
+      <view class="tabs-item tabs-flex tabs-scroll">
+        <view class="tab-item" v-for="(tab, i) in tabs" :key="i" @click="tabClick(i)" :ref="'refTabItem' + i" :style="{ color: $settingStore.themeColor.color }">{{ tab.label }}</view>
+      </view>
+    </scroll-view>
+  </view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      tabs: [],
+      viewId: "id_" + Math.random().toString(36).substr(2, 16),
+      scrollLeft: 0,
+      warpWidth: 0,
+    };
+  },
+  computed: {
+    isScroll() {
+      return this.tabWidth && this.tabs.length; // 指定了tabWidth的宽度,则支持水平滑动
+    },
+    tabHeightPx() {
+      return uni.upx2px(this.height);
+    },
+    tabHeightVal() {
+      return 48 + "px";
+    },
+    tabWidthPx() {
+      return uni.upx2px(this.tabWidth);
+    },
+    tabWidthVal() {
+      return this.isScroll ? this.tabWidthPx + "px" : "";
+    },
+    lineLeft() {
+      if (this.isScroll) {
+        return this.tabWidthPx * this.value + this.tabWidthPx / 2 + "px"; // 需转为px (用rpx的话iOS真机显示有误差)
+      } else {
+        return (100 / this.tabs.length) * (this.value + 1) - 100 / (this.tabs.length * 2) + "%";
+      }
+    },
+  },
+  watch: {
+    value() {
+      this.scrollCenter(); // 水平滚动到中间
+    },
+  },
+  methods: {
+    tabClick(i) {
+      this.tabs.splice(i + 1, this.tabs.length);
+      this.$emit("change", this.tabs[i]);
+    },
+    async addTab(item) {
+      this.tabs.push(item);
+      setTimeout(() => {
+        let query = uni.createSelectorQuery();
+        query = query.in(this); // 支付宝小程序不支持in(this),而字节跳动小程序必须写in(this), 否则都取不到值
+        query
+          .select(".tab-item")
+          .boundingClientRect((data) => {
+            this.warpWidth += data.width;
+            this.scrollLeft = this.warpWidth;
+          })
+          .exec();
+      }, 100);
+    },
+    async scrollCenter() {
+      if (!this.isScroll) return;
+      if (!this.warpWidth) {
+        // tabs容器的宽度
+        let rect = await this.initWarpRect();
+        this.warpWidth = rect ? rect.width : uni.getSystemInfoSync().windowWidth; // 某些情况下取不到宽度,暂时取屏幕宽度
+      }
+      let tabLeft = this.tabWidthPx * this.value + this.tabWidthPx / 2; // 当前tab中心点到左边的距离
+      let diff = tabLeft - this.warpWidth / 2; // 如果超过tabs容器的一半,则滚动差值
+      this.scrollLeft = diff;
+      // #ifdef MP-TOUTIAO
+      this.scrollTimer && clearTimeout(this.scrollTimer);
+      this.scrollTimer = setTimeout(() => {
+        // 字节跳动小程序,需延时再次设置scrollLeft,否则tab切换跨度较大时不生效
+        this.scrollLeft = Math.ceil(diff);
+      }, 400);
+      // #endif
+    },
+    initWarpRect() {
+      return new Promise((resolve) => {
+        setTimeout(() => {
+          // 延时确保dom已渲染, 不使用$nextclick
+          let query = uni.createSelectorQuery();
+          // #ifndef MP-ALIPAY
+          query = query.in(this); // 支付宝小程序不支持in(this),而字节跳动小程序必须写in(this), 否则都取不到值
+          // #endif
+          query
+            .select("#" + this.viewId)
+            .boundingClientRect((data) => {
+              resolve(data);
+            })
+            .exec();
+        }, 20);
+      });
+    },
+  },
+  mounted() {
+    this.scrollCenter(); // 滚动到当前下标
+  },
+};
+</script>
+
+<style lang="scss">
+.me-tabs {
+  position: relative;
+  font-size: 12px;
+  background-color: #fff;
+  box-sizing: border-box;
+  overflow-y: hidden;
+  height: 48px;
+  &.tabs-fixed {
+    z-index: 990;
+    position: fixed;
+    top: var(--window-top);
+    left: 0;
+    width: 100%;
+  }
+
+  .tabs-item {
+    position: relative;
+    white-space: nowrap;
+    box-sizing: border-box;
+  }
+
+  // 平分的方式显示item
+  .tabs-flex {
+    display: flex;
+    .tab-item {
+      color: #666;
+      font-size: 14px;
+      margin-right: 10px;
+      position: relative;
+      padding-right: 22px;
+      color: #3173ff;
+      position: relative;
+      text-align: center;
+      box-sizing: border-box;
+      height: 48px;
+      line-height: 48px;
+
+      &::before {
+        content: " ";
+        height: 33px;
+        width: 33px;
+        border-width: 1.5px 1.5px 0 0;
+        border-color: #f2f2f2;
+        border-style: solid;
+        transform: matrix(0.5, 0.7, -0.5, 0.7, 0, 6);
+        position: absolute;
+        top: 0;
+        margin-top: 0;
+        right: 0;
+      }
+
+      &:last-child {
+        margin-right: 0px;
+        color: #999 !important;
+
+        &::before {
+          content: none;
+        }
+      }
+    }
+  }
+  .tabs-scroll {
+    .tab-item {
+      display: inline-block;
+    }
+  }
+}
+</style>

+ 296 - 0
src/pages/business/common/projectMange/components/mall-list.vue

@@ -0,0 +1,296 @@
+<template>
+  <view>
+    <view class="box-head"><uni-mall-head ref="refUniMallHead" @change="tabChange"></uni-mall-head></view>
+    <view class="box-list">
+      <u-checkbox-group v-model="checkboxList" placement="column" :activeColor="$settingStore.themeColor.color" @change="checkboxChange">
+        <view
+          v-for="item in currentData"
+          class="box-list-item"
+          :class="[item.children && item.children.length >= 0 ? 'box-list-item-department-icon' : 'box-list-item-user']"
+          :key="item.id"
+          @click="handelClickItem(item)"
+        >
+          <view class="box-list-item-department-pic" v-if="item.children && item.children.length >= 0"><image src="@/static/department-icon.png"></image></view>
+          <view class="box-list-item-user-pic flex" v-else>
+            <u-checkbox class="box-list-item-user-pic-checkbox mr9" :name="item.id"> </u-checkbox>
+            <u-avatar
+              class="box-list-item-user-pic-avatar mr10"
+              :src="item.avatar"
+              shape="square"
+              size="40"
+              fontSize="12"
+              color="#ffffff"
+              :bgColor="$settingStore.themeColor.color"
+              v-if="item.avatar"
+            ></u-avatar>
+            <u-avatar
+              class="box-list-item-user-pic-avatar mr10"
+              :text="item.label.length > 2 ? item.label.slice(1, 3) : item.label"
+              shape="square"
+              size="40"
+              fontSize="12"
+              color="#ffffff"
+              :bgColor="$settingStore.themeColor.color"
+              v-else
+            ></u-avatar>
+          </view>
+
+          <view class="box-list-item-right">
+            <view class="box-list-item-text">{{ item.label }} {{ item.children && item.children.length > 0 ? `(${item.children.length})` : "" }}</view>
+            <view class="box-list-item-user-tag" v-if="!item.children && item.post">
+              <text>{{ item.post }}</text>
+            </view>
+          </view>
+        </view>
+      </u-checkbox-group>
+    </view>
+    <view class="box-foot">
+      <view class="box-foot-left" style="justify-self: center">
+        <view class="box-foot-left-count" :style="{ color: $settingStore.themeColor.color }">已选择:{{ checkboxUserList.length }}人</view>
+        <view class="box-foot-left-people"> {{ checkboxUserList.toString() || "最多选择200人" }}</view>
+      </view>
+      <view class="box-foot-right">
+        <u-button class="app-buttom" type="primary" @click="handleSubmit()" shape="square" :color="$settingStore.themeColor.color"> 确定({{ checkboxUserList.length + "/200" }}) </u-button>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import uniMallHead from "./mall-head.vue";
+import common from "@/plugins/common.plugins.js";
+import { storageSystem } from "@/utils/storage"; // 公共方法引用
+export default {
+  props: {
+    dataList: {
+      type: Array,
+      default: () => [],
+    },
+    defaultHeadList: {
+      type: Object,
+      default: () => {},
+    },
+  },
+  components: {
+    uniMallHead,
+  },
+  data() {
+    return {
+      checkboxList: [],
+      currentData: [],
+      checkboxUserData: [],
+      checkboxUserList: [],
+    };
+  },
+  mounted() {
+    this.init();
+  },
+  methods: {
+    init() {
+      if (Object.keys(this.defaultHeadList).length > 0) {
+        this.$refs.refUniMallHead.addTab(this.defaultHeadList);
+      }
+      this.currentData = this.dataList;
+
+      var userList = storageSystem.get("project").userList;
+      if (userList) {
+        userList.forEach((e) => {
+          this.checkboxList.push(e.id);
+          this.checkboxUserData.push(e);
+          this.checkboxUserList.push(e.label);
+        });
+      }
+    },
+    tabChange(obj) {
+      this.getCurrentData(obj.id, this.dataList);
+    },
+    handelClickItem(item) {
+      if (item.children && item.children.length > 0) {
+        this.$refs.refUniMallHead.addTab({ label: item.label, id: item.id });
+        this.currentData = item.children;
+
+        this.currentData.forEach((e) => {
+          this.checkboxUserData.forEach((f) => {
+            if (e.id === f.id) {
+              this.checkboxList.push(f.id);
+            }
+          });
+        });
+      } else {
+        this.$modal.msg("该部门下暂无可选择人员!");
+      }
+      // this.$emit("change", item);
+    },
+    getCurrentData(id, data) {
+      if (id === this.defaultHeadList.id) {
+        this.currentData = this.dataList;
+      } else {
+        if (data.length > 0) {
+          data.map((item) => {
+            if (item.id === id) {
+              this.currentData = item.children;
+            }
+            if (item.children && item.children.length > 0) {
+              this.getCurrentData(id, item.children);
+            }
+          });
+        }
+      }
+    },
+    handleSubmit() {
+      this.$emit("submit", this.checkboxUserData);
+    },
+    checkboxChange(event) {
+      this.currentData.forEach((f) => {
+        if (event.includes(f.id)) {
+          this.checkboxUserData.push(f);
+        } else {
+          this.checkboxUserData.forEach((e, index) => {
+            if (e.id === f.id) {
+              delete this.checkboxUserData[index];
+            }
+          });
+        }
+      });
+
+      this.checkboxUserList = [];
+      this.checkboxUserData = common.uniq(this.checkboxUserData, "id");
+      this.checkboxUserData.forEach((e) => {
+        this.checkboxUserList.push(e.label);
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.box-head {
+  position: fixed;
+  left: 0px;
+  width: 100%;
+  height: 48px;
+  background: #ffffff;
+  padding-left: 17px;
+  box-sizing: border-box;
+  overflow-y: hidden;
+  z-index: 999;
+}
+.box-list {
+  padding-top: 52px;
+  //#ifdef APP-PLUS || MP-WEIXIN
+  padding-bottom: 60px;
+  //#endif
+  .box-list-item {
+    position: relative;
+    height: 60px;
+    display: flex;
+    align-items: center;
+    padding: 0 15px;
+    box-sizing: border-box;
+    background: #ffffff;
+    margin-bottom: 1px;
+    &:active {
+      background: #f2f3f4;
+    }
+    &:last-child {
+      margin-bottom: 0px;
+    }
+    .box-list-item-department-pic {
+      width: 40px;
+      height: 40px;
+      background: rgba(55, 127, 255, 0.1);
+      border-radius: 4px;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      margin-right: 15px;
+      overflow: hidden;
+      image {
+        width: 20px;
+        height: 20px;
+      }
+    }
+    .box-list-item-right {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      flex: 1;
+    }
+    .box-list-item-text {
+      color: #333333;
+      font-size: 14px;
+    }
+    .box-list-item-user-tag {
+      text {
+        box-sizing: border-box;
+        border-radius: 8px;
+        padding: 4px 8px;
+        font-size: 10px;
+        margin-left: 5px;
+        &:first-child {
+          margin-left: 0px;
+        }
+        &:nth-child(1) {
+          background: rgba(49, 210, 144, 0.05);
+          border: 1px solid #31d290;
+          color: #31d290;
+        }
+        &:nth-child(2) {
+          background: rgba(55, 127, 255, 0.05);
+          border: 1px solid #377fff;
+          color: #377fff;
+        }
+      }
+    }
+    &.box-list-item-department-icon {
+      &::before {
+        content: " ";
+        height: 10px;
+        width: 10px;
+        border-width: 2px 2px 0 0;
+        border-color: #c0c0c0;
+        border-style: solid;
+        transform: matrix(0.5, 0.5, -0.5, 0.5, 0, 0);
+        position: absolute;
+        top: 50%;
+        margin-top: -6px;
+        right: 14px;
+      }
+    }
+  }
+  .box-list-item-department + .box-list-item-user {
+    margin-top: 10px;
+  }
+}
+
+.box-foot {
+  position: fixed;
+  bottom: 0px;
+  width: 100%;
+  height: 60px;
+  background: #ffffff;
+  z-index: 999;
+  box-shadow: 1px 1px 4px rgb(26 26 26 / 10%);
+  display: flex;
+  padding: 0 15px;
+
+  &-left {
+    margin: auto auto auto 0;
+
+    &-count {
+      color: #377fff;
+      font-size: 14px;
+      margin-bottom: 5px;
+    }
+
+    &-people {
+      color: #999;
+      font-size: 12px;
+    }
+  }
+
+  &-right {
+    margin: auto 0 auto 15px;
+  }
+}
+</style>

+ 226 - 0
src/pages/business/common/projectMange/list/index.vue

@@ -0,0 +1,226 @@
+<template>
+  <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
+    <u-navbar :titleStyle="{ color: '#000' }" :autoBack="true" title="项目列表" :placeholder="true" :safeAreaInsetTop="true" bgColor="#fff">
+      <template #left>
+        <view class="u-navbar__content__left__item">
+          <u-icon name="arrow-left" size="20" color="#000"></u-icon>
+        </view>
+      </template>
+    </u-navbar>
+    <u-tabs
+      :list="tabsList"
+      :current="tabsCurrent"
+      @click="tabsClick"
+      lineColor="#333"
+      :activeStyle="{ color: '#333', fontSize: '14px' }"
+      :inactiveStyle="{ color: '#909399', fontSize: '14px' }"
+      :scrollable="false"
+    ></u-tabs>
+  </u-sticky>
+
+  <oa-scroll
+    customClass="list-container scroll-height"
+    :pageSize="pageSize"
+    :total="total"
+    :isSticky="true"
+    :customStyle="{
+      //#ifdef APP-PLUS || MP-WEIXIN
+      height: 'calc(100vh - 132px)',
+      //#endif
+      //#ifdef H5
+      height: 'calc(100vh - 132px)',
+      //#endif
+    }"
+    :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" style="color: #666666; line-height: 25px" v-for="(base, index) in dataList" :key="index" @click="handleToDetails(base)">
+          <view class="content-area-top menu-item">
+            <view class="content-area-top-time">
+              {{ base.createTime ? base.createTime.replace("T", " ") : "" }}
+            </view>
+            <view class="content-area-top-status" v-if="base.projectStatus == 1" style="background-color: #909399"> 未开始 </view>
+            <view class="content-area-top-status" v-if="base.projectStatus == 2" style="background-color: #23dedc"> 进行中 </view>
+            <view class="content-area-top-status" v-if="base.projectStatus == 3" style="background-color: #16bf00"> 已完成 </view>
+            <view class="content-area-top-status" v-if="base.projectStatus == 4" style="background-color: #f9ae3d"> 已暂停 </view>
+            <view class="content-area-top-status" v-if="base.projectStatus == 5" style="background-color: #f56c6c"> 已作废 </view>
+          </view>
+          <view class="content-area-row_wrap menu-item">
+            <view class="content-area-row_wrap-view"> 项目名称:{{ base.projectName }} </view>
+            <view class="content-area-row_wrap-view"> 项目负责人: {{ proxy.$common.mapping("nickName", "userId", base.projectHead, userDate) }} </view>
+            <view class="content-area-row_wrap-view" style="display: block">
+              项目成员:
+              <span v-for="(userId, index) in base.projectMember.length > 0 ? base.projectMember.split(',') : []" :key="userId">
+                {{ proxy.$common.mapping("nickName", "userId", userId, userDate) }}{{ base.projectMember.split(",").length > index + 1 ? "," : "" }}
+              </span>
+            </view>
+          </view>
+        </view>
+      </view>
+    </template>
+  </oa-scroll>
+
+  <oa-tabbar :tabbarValue="2" :tabbarList="proxy.$constData.projectTabbar" :isTabbar="false"></oa-tabbar>
+</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 { projectApi } from "@/api/business/project.js";
+import { UserList } from "@/api/system/user.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+const commonStore = commonStores(); //全局公共Store
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  loading: false,
+  tabsList: [
+    { name: "全部", value: "" },
+    { name: "我负责", value: 1 },
+    { name: "我参与", value: 2 },
+  ],
+  tabsCurrent: 0,
+
+  dataList: [],
+  pageSize: 20,
+  current: 1,
+  total: 0,
+  userDate: [],
+});
+
+const { tabsList, tabsCurrent, dataList, pageSize, current, total, userDate } = toRefs(state);
+
+/**
+ * @页面初始化
+ */
+function init() {
+  UserList({ pageNum: "1", pageSize: "10000" }).then((res) => {
+    state.userDate = res.data.rows;
+  });
+
+  selectListApi();
+}
+
+/**
+ * @列表查询
+ * @api接口查询
+ */
+function selectListApi() {
+  state.dataList = [];
+  state.loading = true;
+
+  projectApi()
+    .ProjectsList({
+      projectAscription: state.tabsList[state.tabsCurrent].value,
+      pageNum: state.current,
+      pageSize: state.pageSize,
+    })
+    .then((requset) => {
+      state.dataList = requset.data.records;
+      state.total = requset.data.total;
+      state.loading = false;
+    })
+    .catch((err) => {
+      state.loading = false;
+    });
+}
+
+/**
+ * @scrollView加载数据
+ */
+function load() {
+  state.pageSize += 10;
+  init();
+}
+
+/**
+ * @scrollView刷新数据
+ */
+function refresh() {
+  state.pageSize = 20;
+  init();
+}
+
+/**
+ * @tabs点击事件
+ */
+function tabsClick(e) {
+  state.tabsCurrent = e.index;
+  init();
+}
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+onLoad((options) => {
+  init();
+});
+</script>
+
+<style lang="scss" scoped>
+.list-container {
+  .content-area {
+    &-top {
+      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 {
+      font-size: 13px;
+      flex-flow: row wrap;
+
+      &-view {
+        display: flex;
+        min-width: 50%;
+        > .iconfont {
+          font-size: 14px;
+          color: #909399;
+          margin-left: 5px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 89 - 0
src/pages/business/common/projectMange/mall/index.vue

@@ -0,0 +1,89 @@
+<template>
+  <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
+    <u-navbar :titleStyle="{ color: '#000' }" :autoBack="true" title="选择接收人" :placeholder="true" :safeAreaInsetTop="true" bgColor="#fff">
+      <template #left>
+        <view class="u-navbar__content__left__item">
+          <u-icon name="arrow-left" size="20" color="#000"></u-icon>
+        </view>
+      </template>
+      <template #right>
+        <view class="u-navbar__content__right__item">
+          <u-icon name="more-dot-fill" size="20" color="#000"></u-icon>
+        </view>
+      </template>
+    </u-navbar>
+  </u-sticky>
+
+  <oa-scroll
+    customClass="record-container scroll-height"
+    :isSticky="false"
+    :customStyle="{
+      //#ifdef APP-PLUS || MP-WEIXIN
+      height: 'calc(100vh - 44px)',
+      //#endif
+    }"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :lowerThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <uni-mall-list v-if="dataList.length > 0" :dataList="dataList" :defaultHeadList="defaultHeadList" @change="handleChange" @submit="handleSubmit"></uni-mall-list>
+    </template>
+  </oa-scroll>
+</template>
+
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { deptUserTreeSelect } from "@/api/system/user.js";
+/*----------------------------------组件引入-----------------------------------*/
+import uniMallList from "../components/mall-list.vue";
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+import { storageSystem } from "@/utils/storage"; // 公共方法引用
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  defaultHeadList: { label: "通讯录", id: "18AF75C3-330A-53AC-270E-EAD060BC0E1A" },
+  dataList: [],
+});
+const { defaultHeadList, dataList } = toRefs(state);
+
+function init() {
+  deptUserTreeSelect({ pageNum: "1", pageSize: "10000" }).then((res) => {
+    state.dataList = JSON.parse(JSON.stringify(res.data).replace(/value/g, "id"))[0].children;
+  });
+}
+
+function handleChange(item) {
+  //   if (item.type === "user") {
+  //     uni.navigateTo({
+  //       url: "/pages/datails/datails?user=" + JSON.stringify(item),
+  //     });
+  //   }
+}
+
+function handleSubmit(event) {
+  proxy.$tab.navigateBack(1); //返回到需要执行方法的页面
+  uni.$emit("UserMall", event); //将值存储监听器
+}
+
+onReady(() => {});
+
+onShow(() => {});
+
+onLoad((options) => {
+  init();
+});
+
+onUnload(() => {});
+</script>
+
+<style></style>

+ 168 - 0
src/pages/business/common/projectMange/record/details.vue

@@ -0,0 +1,168 @@
+<template>
+  <u-navbar :titleStyle="{ color: '#000' }" :autoBack="true" :title="state.options.createBy + '的日报'" :placeholder="true" :safeAreaInsetTop="true" bgColor="#fff" @leftClick="goRecordDataRefresh()">
+    <template #left>
+      <view class="u-navbar__content__left__item">
+        <u-icon name="arrow-left" size="20" color="#000"></u-icon>
+      </view>
+    </template>
+  </u-navbar>
+
+  <oa-scroll
+    customClass="record-details-container scroll-height"
+    :style="{
+      //#ifdef APP-PLUS || MP-WEIXIN
+      height: 'calc(100vh - 88px)',
+      //#endif
+      //#ifdef H5
+      height: 'calc(100vh - 44px)',
+      //#endif
+    }"
+    :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 radius bg-white" v-for="(item, ind) in state.dataList" :key="ind">
+        <view class="content-area-header flex mb10">
+          <u-avatar
+            class="content-area-header-avatar mr10"
+            :text="item.createBy.length > 2 ? item.createBy.slice(1, 3) : item.createBy"
+            shape="square"
+            size="40"
+            fontSize="12"
+            color="#ffffff"
+            :bgColor="proxy.$settingStore.themeColor.color"
+          ></u-avatar>
+          <view>
+            <view class="content-area-header-title font16 mb5">{{ item.createBy }}</view>
+            <view class="content-area-header-time font14">{{ item.createTime.replace("T", " ") }}</view>
+          </view>
+        </view>
+
+        <view class="content-area-center mb10" v-for="child in item.workContents" :key="child">
+          <view class="content-area-center-top flex">
+            <view class="content-area-center-top-title mr10">{{ child.projectName }}</view>
+            <view class="content-area-center-top-time" :style="{ color: proxy.$settingStore.themeColor.color }">{{ child.workTime }}h</view>
+          </view>
+          <u-text :text="child.workContent" color="#000000" size="14"></u-text>
+        </view>
+        <view class="content-area-center mb10">
+          <view class="content-area-center-top"> 明日计划 </view>
+          <u-text :text="item.tomorrowPlan" color="#000000" size="14"></u-text>
+        </view>
+        <view class="content-area-center mb10">
+          <view class="content-area-center-top"> 工作协调 </view>
+          <u-text :text="item.coordinateWork" color="#000000" size="14"></u-text>
+        </view>
+        <view class="content-area-center mb10">
+          <view class="content-area-center-top">抄送人 </view>
+          <u-text :text="item.ccTo" color="#000000" size="14"></u-text>
+        </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 { projectApi } from "@/api/business/project.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  loading: true,
+  dataList: [],
+  pageSize: 10,
+  current: 1,
+  total: 0,
+
+  options: {
+    reportId: "",
+    createBy: "",
+  },
+});
+
+const { dataList, pageSize, current, total } = toRefs(state);
+
+/**
+ * @初始化
+ */
+function init() {
+  state.dataList = [];
+  state.loading = true;
+  projectApi()
+    .ReportRecordDetails({
+      reportId: state.options.reportId,
+    })
+    .then((requset) => {
+      state.options.createBy = requset.data[0].createBy;
+      state.dataList = requset.data;
+      state.loading = false;
+    })
+    .catch((err) => {
+      state.loading = false;
+    });
+}
+
+/** 返回列表页数据刷新 */
+function goRecordDataRefresh() {
+  projectApi()
+    .ReportRecordReadFlag({ reportId: state.options.reportId })
+    .then((requset) => {
+      uni.$emit("projectMange_record", true); //监听器
+    })
+    .catch((err) => {
+      uni.$emit("projectMange_record", true); //监听器
+    });
+}
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+onLoad((options) => {
+  state.options.reportId = options?.reportId;
+  init();
+});
+</script>
+
+<style lang="scss" scoped>
+.content-area {
+  margin: 0;
+  padding: 15px 20px;
+  overflow: hidden;
+
+  &-header {
+    &-avatar {
+      margin: auto 0;
+    }
+
+    &-title {
+      margin: 0 0 15px 0;
+      font-weight: 600;
+      color: #000000;
+    }
+  }
+
+  &-center {
+    line-height: 25px;
+    &-top {
+      color: #000000;
+      font-weight: 600;
+    }
+  }
+}
+</style>

+ 219 - 0
src/pages/business/common/projectMange/record/index.vue

@@ -0,0 +1,219 @@
+<template>
+  <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
+    <u-navbar :titleStyle="{ color: '#000' }" :autoBack="true" title="工作报告" :placeholder="true" :safeAreaInsetTop="true" bgColor="#fff">
+      <template #left>
+        <view class="u-navbar__content__left__item">
+          <u-icon name="arrow-left" size="20" color="#000"></u-icon>
+        </view>
+      </template>
+    </u-navbar>
+    <u-tabs
+      :list="tabsList"
+      :current="tabsCurrent"
+      @click="tabsClick"
+      lineColor="#333"
+      :activeStyle="{ color: '#333', fontSize: '14px' }"
+      :inactiveStyle="{ color: '#909399', fontSize: '14px' }"
+      :scrollable="false"
+    ></u-tabs>
+  </u-sticky>
+
+  <oa-scroll
+    customClass="record-container scroll-height"
+    :pageSize="pageSize"
+    :total="total"
+    :isSticky="true"
+    :customStyle="{
+      //#ifdef APP-PLUS || MP-WEIXIN
+      height: 'calc(100vh - 132px)',
+      //#endif
+      //#ifdef H5
+      height: 'calc(100vh - 132px)',
+      //#endif
+    }"
+    :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>
+      <u-loading-page :loading="state.loading" fontSize="16" style="z-index: 99"></u-loading-page>
+      <view class="content-area" v-for="(group, date) in proxy.$common.groupedItems(state.dataList, 'submitDate')" :key="date">
+        <view class="content-area-time font14">{{ proxy.$time.jktTimes(date, "否") }}</view>
+        <view class="content-area-center bg-white" v-for="(el, ind) in group" :key="ind" @click="goContentDetails(el)">
+          <view class="flex mb10">
+            <u-avatar
+              class="content-area-center-avatar mr10"
+              :text="el.createBy.length > 2 ? el.createBy.slice(1, 3) : el.createBy"
+              shape="square"
+              size="35"
+              fontSize="10"
+              color="#ffffff"
+              :bgColor="proxy.$settingStore.themeColor.color"
+            ></u-avatar>
+            <view>
+              <view class="content-area-center-title font14 mb5">{{ el.createBy }}的日报</view>
+              <view class="content-area-center-time font12">{{ proxy.$time.jktTimes(el.submitDate.replace("T", " ")) }}</view>
+            </view>
+          </view>
+          <view class="mb5">
+            <u-text :text="el.contentText.length >= 100 ? el.contentText.slice(0, 100) + '···' : el.contentText" color="#666666" size="14"></u-text>
+          </view>
+          <view class="flex" v-if="el.createBy != useStore.nickName">
+            <u-tag class="mr10" type="info" text="已读" size="mini" plain v-if="el.readFlag === 1" style="margin: 0 auto"></u-tag>
+            <u-tag class="mr10" type="error" text="未读" size="mini" plain v-if="el.readFlag === 0" style="margin: 0 auto"></u-tag>
+            <u-text text="全文" :color="proxy.$settingStore.themeColor.color" size="14"></u-text>
+          </view>
+        </view>
+      </view>
+    </template>
+  </oa-scroll>
+
+  <oa-tabbar :tabbarValue="0" :tabbarList="proxy.$constData.projectTabbar" :isTabbar="false"></oa-tabbar>
+</template>
+
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { projectApi } from "@/api/business/project.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { useStores, commonStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+const useStore = useStores();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  tabsList: [
+    { name: "我收到的", value: 2 },
+    { name: "我发出的", value: 3 },
+    { name: "我负责的", value: 1 },
+  ],
+  tabsCurrent: 0,
+
+  loading: false,
+  dataList: [],
+  pageSize: 20,
+  current: 1,
+  total: 0,
+});
+
+const { tabsList, tabsCurrent, dataList, pageSize, current, total } = toRefs(state);
+
+/**
+ * @初始化
+ */
+function init() {
+  projectApi()
+    .ReportRecord({
+      // startDate: "2024-07-10",
+      // endDate: "2024-07-10",
+      pageNum: state.current,
+      pageSize: state.pageSize,
+      projectAscription: state.tabsList[state.tabsCurrent].value,
+    })
+    .then((requset) => {
+      requset.data.records.forEach((el) => {
+        el.contentText = "";
+        el.workContents.forEach((cl) => {
+          el.contentText += `${cl.projectName} ${cl.workTime}h \n ${cl.workContent}`;
+        });
+      });
+      state.dataList = requset.data.records;
+      state.total = requset.data.total;
+      state.loading = false;
+    })
+    .catch((err) => {
+      state.loading = false;
+    });
+}
+
+/**
+ * @跳转详情
+ */
+function goContentDetails(e) {
+  proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/details?reportId=${e.id}`);
+}
+
+/**
+ * @scrollView加载数据
+ */
+function load() {
+  state.pageSize += 10;
+  init();
+}
+
+/**
+ * @scrollView刷新数据
+ */
+function refresh() {
+  state.pageSize = 20;
+  init();
+}
+
+/**
+ * @tabs点击事件
+ */
+function tabsClick(e) {
+  state.tabsCurrent = e.index;
+  init();
+}
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+onLoad((options) => {
+  init();
+  uni.$on("projectMange_record", function (value) {
+    init();
+  });
+});
+
+onUnload(() => {
+  uni.$off("projectMange_record"); //将值删除监听器
+});
+</script>
+
+<style lang="scss" scoped>
+.content-area {
+  &-time {
+    padding: 10px;
+    text-align: left;
+    color: #000000;
+    font-weight: 600;
+  }
+
+  &-center {
+    margin: 0;
+    padding: 15px;
+    overflow: hidden;
+    border-bottom: 1px solid #eaeef1;
+
+    &:last-child {
+      border-bottom: 0px solid #eaeef1;
+    }
+
+    &-avatar {
+      margin: auto 0;
+    }
+
+    &-title {
+      margin: 0 0 15px 0;
+      font-weight: 600;
+      color: #000000;
+    }
+  }
+}
+</style>

+ 429 - 0
src/pages/business/common/projectMange/write/components/template1.vue

@@ -0,0 +1,429 @@
+<template>
+  <view class="content-area">
+    <view class="content-area-title font12 mtb5 plr10">实时保存,保存时间 {{ saveTime }}</view>
+
+    <view class="content-area-item p10 bg-white">
+      <view class="font14 weight mb10">工作内容</view>
+
+      <u-collapse v-if="form.workContents.length > 0" :accordion="true">
+        <u-collapse-item :title="item.projectName + ' ' + (item.workTime ? item.workTime + 'h' : '0h')" :name="item.projectId" v-for="(item, index) in form.workContents" :key="index">
+          <u-input
+            v-model="item.workTime"
+            placeholder="请输入工作耗时"
+            placeholderStyle="color:#909399;font-size:12px"
+            suffixIcon="h"
+            suffixIconStyle="color:#909399;font-size:12px;width:10px"
+            border="none"
+            type="digit"
+            style="padding: 0px; margin: 10px 0"
+            @change="realTimeSaving()"
+          />
+          <u-textarea
+            v-model="item.workContent"
+            placeholder="请输入工作内容"
+            placeholderStyle="color:#909399;font-size:12px"
+            confirmType="return"
+            :autoHeight="true"
+            :maxlength="-1"
+            :height="'100%'"
+            border="none"
+            style="padding: 0px; margin: 10px 0"
+            @change="realTimeSaving()"
+          ></u-textarea>
+        </u-collapse-item>
+      </u-collapse>
+
+      <u-button class="mt20" type="primary" style="width: 100px; height: 25px" @click="insertProjects()" shape="circle" icon="plus" size="mini"> 添加项目 </u-button>
+    </view>
+    <view class="content-area-item mt20 p10 bg-white">
+      <view class="font14 weight mb10">明日计划</view>
+      <u-textarea
+        v-model="form.tomorrowPlan"
+        placeholder="请输入"
+        placeholderStyle="color:#909399;font-size:12px"
+        confirmType="return"
+        :autoHeight="true"
+        :maxlength="-1"
+        :height="'100%'"
+        border="none"
+        style="padding: 0px"
+        @change="realTimeSaving()"
+      ></u-textarea>
+    </view>
+    <view class="content-area-item mt20 p10 bg-white">
+      <view class="font14 weight mb10">工作协调</view>
+      <u-textarea
+        v-model="form.coordinateWork"
+        placeholder="请输入"
+        placeholderStyle="color:#909399;font-size:12px"
+        confirmType="return"
+        :autoHeight="true"
+        :maxlength="-1"
+        :height="'100%'"
+        border="none"
+        style="padding: 0px"
+        @change="realTimeSaving()"
+      ></u-textarea>
+    </view>
+    <view class="content-area-item mt20 p10 bg-white">
+      <view class="font14 weight mb10">抄送到人</view>
+      <view class="flex flex-wrap">
+        <view class="mr10 mb10" v-for="(user, index) in userList" :key="index" @click="deleteUsers(index)">
+          <u-avatar
+            class="content-area-item-avatar"
+            :src="user.avatar ? user.avatar : '/static/images/404.png'"
+            shape="square"
+            size="40"
+            fontSize="12"
+            color="#ffffff"
+            :bgColor="$settingStore.themeColor.color"
+            v-if="user.avatar"
+          ></u-avatar>
+          <u-avatar
+            class="content-area-item-avatar"
+            :text="user.label.length > 2 ? user.label.slice(1, 3) : user.label"
+            shape="square"
+            size="40"
+            fontSize="12"
+            color="#ffffff"
+            :bgColor="$settingStore.themeColor.color"
+            v-else
+          ></u-avatar>
+          <view class="font12 text-center mt5">{{ user.label }}</view>
+        </view>
+      </view>
+
+      <u-button class="mt20" type="primary" style="width: 100px; height: 25px" @click="insertUsers()" shape="circle" icon="plus" size="mini"> 选择人员 </u-button>
+    </view>
+  </view>
+
+  <view class="content-area-item mt20 p10 bg-white">
+    <view class="flex">
+      <view class="font14 weight">同步钉钉</view>
+      <u-switch
+        style="margin-left: auto"
+        :modelValue="form.sendDingTalk == 0 ? false : true"
+        :ctiveColor="proxy.$settingStore.themeColor.color"
+        size="20"
+        @change="(event) => switchChage(event, 'sendDingTalk')"
+        asyncChange
+      ></u-switch>
+    </view>
+    <view class="flex"> </view>
+  </view>
+
+  <view class="content-area-item mt20 p10 bg-white">
+    <view class="flex">
+      <view class="font14 weight">定时发送</view>
+      <u-switch
+        style="margin-left: auto"
+        :modelValue="form.isRegularlySend == 0 ? false : true"
+        :ctiveColor="proxy.$settingStore.themeColor.color"
+        size="20"
+        @change="(event) => switchChage(event, 'isRegularlySend')"
+        asyncChange
+      ></u-switch>
+    </view>
+    <view class="flex" v-if="form.isRegularlySend == 0 ? false : true" @click="timeShow = true">
+      <u-input
+        v-model="form.timingTime"
+        placeholder="请选择时间"
+        placeholderStyle="color:#909399;font-size:12px"
+        suffixIcon="arrow-right"
+        suffixIconStyle="color:#909399;font-size:12px;width:10px"
+        border="none"
+        style="padding: 0px; margin: 10px 0"
+        @change="realTimeSaving()"
+        disabledColor="transparent"
+        disabled
+      />
+    </view>
+  </view>
+
+  <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-datetime-picker :show="timeShow" v-model="timeValue" mode="datetime" :closeOnClickOverlay="true" @cancel="timeShow = false" @confirm="timeConfirm"></u-datetime-picker>
+
+  <u-modal :show="modalShow" title="" :confirmText="'确定'" :cancelText="'取消'" :zoom="false" :showCancelButton="true" @confirm="modalConfirm" @cancel="modalShow = false">
+    <view class="slot-content">
+      <u-checkbox-group v-model="projectsCheck" placement="row" :size="14" v-if="projectsList.length > 0">
+        <u-checkbox
+          :customStyle="{ marginBottom: '8px', width: '50%' }"
+          v-for="(item, index) in projectsList"
+          :key="index"
+          :label="item.projectName"
+          :name="item.id"
+          :activeColor="proxy.$settingStore.themeColor.color"
+        >
+        </u-checkbox>
+      </u-checkbox-group>
+      <view v-else>请联系项目管理人员给您分配项目后重试!</view>
+    </view>
+  </u-modal>
+</template>
+
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject, watchEffect } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { projectApi } from "@/api/business/project.js";
+import { UserList } from "@/api/system/user.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+import { storageSystem } from "@/utils/storage"; // 公共方法引用
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+const props = defineProps({
+  projectList: {
+    type: Object,
+    default: {},
+  },
+});
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  timeShow: false,
+  timeValue: Number(new Date()),
+  modalShow: false,
+  form: {
+    reportDate: null,
+    tomorrowPlan: "",
+    ccTo: "",
+    coordinateWork: null,
+    workContents: [],
+    sendDingTalk: 1,
+    isRegularlySend: 0,
+    timingTime: null,
+    reportStatus: null,
+  },
+  projectsCheck: [],
+  projectsList: [],
+  userList: [],
+  userDate: [],
+  saveTime: "",
+});
+const { timeShow, timeValue, modalShow, form, projectsCheck, projectsList, userList, userDate, saveTime } = toRefs(state);
+
+/**
+ * @初始化
+ */
+function init() {
+  UserList({ pageNum: "1", pageSize: "10000" }).then((res) => {
+    state.userDate = res.data.rows;
+  });
+
+  projectApi()
+    .ProjectsSelect()
+    .then((requset) => {
+      state.projectsList = requset.data;
+    });
+}
+
+/** 时间选择器确定按钮点击事件 */
+function timeConfirm() {
+  state.form.timingTime = proxy.$time.getFormatterDate(state.timeValue);
+  state.timeShow = false;
+}
+
+/** 开关按钮change事件 */
+function switchChage(e, key) {
+  state.form[key] = e == true ? 1 : 0;
+  if (key === "isRegularlySend") {
+    state.form.timingTime = null;
+  }
+  realTimeSaving();
+}
+
+/** 添加人员按钮事件 */
+function insertUsers() {
+  proxy.$tab.navigateTo(`/pages/business/common/projectMange/mall/index`);
+}
+
+/** 删除人员按钮事件 */
+function deleteUsers(index) {
+  state.userList.splice(index, 1);
+  realTimeSaving();
+}
+
+/** 添加项目按钮事件 */
+function insertProjects() {
+  state.modalShow = true;
+}
+
+/** 实时保存填写数据 */
+function realTimeSaving() {
+  state.saveTime = proxy.$time.formatterDate(new Date(), "hh:mm");
+  storageSystem.set("project", state);
+}
+
+/** 弹窗确定 */
+function modalConfirm() {
+  var newWorkContents = JSON.parse(JSON.stringify(state.form.workContents));
+  state.form.workContents = [];
+
+  state.projectsCheck.forEach((e) => {
+    state.form.workContents.push({
+      projectId: e,
+      projectName: proxy.$common.mapping("projectName", "id", e, state.projectsList),
+      workTime: "",
+      workContent: "",
+    });
+  });
+
+  newWorkContents.forEach((e) => {
+    state.form.workContents.forEach((f) => {
+      if (e.projectId == f.projectId) {
+        f.workTime = e.workTime;
+        f.workContent = e.workContent;
+      }
+    });
+  });
+
+  state.modalShow = false;
+  realTimeSaving();
+}
+
+/** 提交 */
+function handleSubmit() {
+  if (!state.form.tomorrowPlan) {
+    proxy.$modal.showToast("请输入明日计划");
+  }
+
+  state.form.ccTo = state.userList.map((obj) => `${obj.id}`).join(",");
+  state.form.reportDate = proxy.$time.formatterDate(new Date(), "yyyy-MM-dd");
+  state.form.workContents.forEach((e) => {
+    e.workTime = parseInt(e.workTime);
+  });
+
+  projectApi()
+    .ReportInsert(state.form)
+    .then((requset) => {
+      proxy.$tab.redirectTo("/pages/business/common/projectMange/record/index"); //返回到需要执行方法的页面
+      state.form.workContents = [];
+      state.form.tomorrowPlan = "";
+      state.form.coordinateWork = null;
+      state.form.isRegularlySend = 0;
+      state.form.timingTime = null;
+      storageSystem.set("project", state);
+    });
+}
+
+watchEffect(() => {
+  if (JSON.stringify(props.projectList) != "{}") {
+    state.userList = [];
+    state.projectsCheck = [];
+
+    Object.keys(props.projectList).forEach((key) => {
+      state.form[key] = props.projectList[key];
+    });
+
+    var ccTo = state.form.ccTo.length > 0 ? state.form.ccTo.split(",").map((num) => Number(num)) : [];
+    state.userDate.forEach((e) => {
+      if (ccTo.includes(e.userId)) {
+        state.userList.push({
+          address: e.address,
+          avatar: e.avatar,
+          deptId: e.deptId,
+          email: e.email,
+          id: e.userId,
+          label: e.nickName,
+          nickName: e.nickName,
+          phonenumber: e.phonenumber,
+          post: e.post,
+          sex: e.sex,
+          userId: e.userId,
+          userName: e.userName,
+        });
+      }
+    });
+
+    state.form.workContents.forEach((e) => {
+      state.projectsCheck.push(e.projectId);
+    });
+
+    storageSystem.set("project", state);
+  }
+});
+
+onReady(() => {});
+
+onShow(() => {
+  //循环将缓存数据遍历
+  var storages = storageSystem.get("project");
+  Object.keys(storages).forEach((key) => {
+    state[key] = storages[key];
+  });
+
+  //监听组件返回数据
+  uni.$on("UserMall", function (value) {
+    state.userList = value;
+    realTimeSaving();
+  });
+});
+
+onLoad((options) => {
+  init();
+});
+
+onUnload(() => {
+  uni.$off("UserMall"); //将值删除监听器
+});
+</script>
+
+<style lang="scss" scoped>
+:deep(.u-cell__body) {
+  color: #000000;
+  font-size: 12px;
+  padding: 10px 0px !important;
+}
+
+:deep(.u-collapse-item__content) {
+  overflow: auto;
+}
+
+:deep(.u-collapse-item__content__text) {
+  padding: 0;
+}
+
+:deep(.u-cell__left-icon-wrap) {
+  margin: 0;
+}
+
+.content-area {
+  &-title {
+    text-align: right;
+    color: #909399;
+  }
+
+  &-item {
+    &-avatar {
+      position: relative;
+
+      &::after {
+        position: absolute;
+        content: "✖";
+        display: inline-block;
+        padding: 2px 4px;
+        border-radius: 100%;
+        cursor: pointer;
+        font-size: 8px;
+        text-align: center;
+        background-color: #ccc;
+        color: #fff;
+        top: -5px;
+        right: -5px;
+      }
+
+      &::after:hover {
+        background-color: #ccc;
+      }
+    }
+  }
+}
+</style>

+ 115 - 0
src/pages/business/common/projectMange/write/index.vue

@@ -0,0 +1,115 @@
+<template>
+  <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
+    <u-navbar :titleStyle="{ color: '#000' }" :autoBack="true" title="模板选择" :placeholder="true" :safeAreaInsetTop="true" bgColor="#fff">
+      <template #left>
+        <view class="u-navbar__content__left__item">
+          <u-icon name="arrow-left" size="20" color="#000"></u-icon>
+        </view>
+      </template>
+      <!-- <template #right>
+        <view class="u-navbar__content__right__item">
+          <u-icon name="more-dot-fill" size="19" color="#000"></u-icon>
+        </view>
+      </template> -->
+    </u-navbar>
+  </u-sticky>
+
+  <oa-scroll
+    customClass="record-container scroll-height bg-white"
+    :isSticky="true"
+    :customStyle="{
+      //#ifdef APP-PLUS || MP-WEIXIN
+      height: 'calc(100vh - 88px)',
+      //#endif
+    }"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :lowerThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :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 p20">
+        <!-- <view class="content-area-title font16 mb20">可使用模板</view> -->
+        <u-row class="content-area-row" gutter="10">
+          <u-col class="content-area-row-col" :span="4" v-for="item in moreData" :key="item">
+            <view class="content-area-row-col-item shadow-default plr10 ptb10" @click="goNavigateTo(item)">
+              <div class="font14 mb10" style="font-weight: 600">{{ item.title }}</div>
+              <div class="font10 mb10" style="line-height: 16px" v-for="child in item.valueData" :key="child">
+                <div style="color: #606266">{{ child.title }}</div>
+                <div style="color: #a8abb2">{{ child.value }}</div>
+              </div>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+    </template>
+  </oa-scroll>
+
+  <oa-tabbar :tabbarValue="1" :tabbarList="proxy.$constData.projectTabbar" :isTabbar="false"></oa-tabbar>
+</template>
+
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { projectApi } from "@/api/business/project.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  moreData: [
+    {
+      id: 1,
+      title: "项目报告",
+      valueData: [
+        { title: "今日工作内容", value: "请填写" },
+        { title: "明日工作计划", value: "请输入" },
+        { title: "需协调工作", value: "请输入" },
+      ],
+    },
+    // {
+    //   id: 2,
+    //   title: "日志",
+    //   valueData: [
+    //     { title: "今日工作内容", value: "请输入" },
+    //     { title: "明日工作计划", value: "请输入" },
+    //     { title: "需协调工作", value: "请输入" },
+    //   ],
+    // },
+  ],
+});
+
+const { moreData } = toRefs(state);
+
+/**
+ * @跳转详情
+ */
+function goNavigateTo(e) {
+  proxy.$tab.navigateTo(`/pages/business/common/projectMange/write/insert?templateId=${e.id}`);
+}
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+onLoad((options) => {});
+
+onUnload(() => {});
+</script>
+
+<style lang="scss" scoped>
+.content-area {
+  color: #000000;
+}
+</style>

+ 110 - 0
src/pages/business/common/projectMange/write/insert.vue

@@ -0,0 +1,110 @@
+<template>
+  <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
+    <u-navbar :titleStyle="{ color: '#000' }" :autoBack="true" title="报告填写" :placeholder="true" :safeAreaInsetTop="true" bgColor="#fff">
+      <template #left>
+        <view class="u-navbar__content__left__item">
+          <u-icon name="arrow-left" size="20" color="#000"></u-icon>
+        </view>
+      </template>
+      <template #right>
+        <view class="u-navbar__content__right__item">
+          <u-icon name="more-dot-fill" size="20" color="#000" @click="moreClick()"></u-icon>
+        </view>
+      </template>
+    </u-navbar>
+  </u-sticky>
+
+  <oa-scroll
+    customClass="record-container scroll-height"
+    :isSticky="false"
+    :customStyle="{
+      //#ifdef APP-PLUS || MP-WEIXIN
+      height: 'calc(100vh - 44px)',
+      //#endif
+    }"
+    :refresherLoad="false"
+    :refresherEnabled="false"
+    :refresherDefaultStyle="'none'"
+    :refresherThreshold="44"
+    :lowerThreshold="44"
+    :refresherBackground="'#f5f6f7'"
+    :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
+  >
+    <template #default>
+      <template1 v-if="templateId == 1" :projectList="newProjectList" />
+    </template>
+  </oa-scroll>
+
+  <u-modal :show="modalShow" title="" :cancelText="'取消'" :zoom="false" :showConfirmButton="false" :showCancelButton="true" @cancel="modalShow = false">
+    <view class="slot-content">
+      <view @click="handleSubmit('importPrevious')">导入上一篇</view>
+    </view>
+  </u-modal>
+</template>
+
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { projectApi } from "@/api/business/project.js";
+/*----------------------------------组件引入-----------------------------------*/
+import template1 from "./components/template1.vue";
+/*----------------------------------store引入-----------------------------------*/
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
+  templateId: 1,
+  modalShow: false,
+  newProjectList: {},
+});
+const { templateId, modalShow, newProjectList } = toRefs(state);
+
+function moreClick() {
+  state.modalShow = true;
+}
+
+function handleSubmit(type) {
+  if (type === "importPrevious") {
+    projectApi()
+      .ProjectsWeekList({
+        startDate: proxy.$time.getCurrentWeekDate().startDate,
+        endDate: proxy.$time.getCurrentWeekDate().endDate,
+      })
+      .then((requset) => {
+        var newData = requset.data[0].newData[0];
+
+        state.newProjectList = {
+          tomorrowPlan: newData.tomorrowPlan,
+          coordinateWork: newData.coordinateWork,
+          workContents: newData.workContents,
+          sendDingTalk: newData.sendDingTalk,
+          ccTo: newData.ccTo,
+        };
+
+        state.modalShow = false;
+      });
+  }
+}
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+onLoad((options) => {
+  "templateId" in options ? (state.templateId = parseInt(options.templateId)) : "";
+});
+
+onUnload(() => {});
+</script>
+<style lang="scss" scoped>
+:deep(.u-modal__content) {
+  font-size: 14px;
+  justify-content: left;
+}
+</style>

+ 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();

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

@@ -1,12 +1,21 @@
 <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', fontSize: '14px' }"
+      :inactiveStyle="{ color: '#909399', fontSize: '14px' }"
+      :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 +28,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 +47,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 +89,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 +109,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 +124,7 @@ function load() {
  * @scrollView刷新数据
  */
 function refresh() {
-  pageSize.value = 20;
-  total.value = 0;
+  state.pageSize = 20;
   init();
 }
 
@@ -127,7 +132,7 @@ function refresh() {
  * @tabs点击事件
  */
 function tabsClick(e) {
-  tabsCurrent.value = e.index;
+  state.tabsCurrent = e.index;
   init();
 }
 
@@ -140,10 +145,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();
 }
 

+ 17 - 26
src/pages/common/customManage/index.vue → src/pages/business/fireIot/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>
@@ -66,14 +66,18 @@
 </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 { crmCustomInfo } from "@/api/business/fireIot/customManage.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
 import { useStores, commonStores } from "@/store/modules/index";
-
-import { crmCustomInfo } from "@/api/common/customManage.js";
-
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 const { proxy } = getCurrentInstance();
-
+/*----------------------------------变量声明-----------------------------------*/
 const dataList = ref([]);
 const pageSize = ref(20);
 const current = ref(1);
@@ -81,22 +85,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: "",
@@ -121,8 +113,8 @@ function selectListApi() {
     projectName: projectName.value,
     current: current.value,
     size: pageSize.value,
-    endTime: radioValue.value ? proxy.$common.getDays(-radioValue.value)[0] + " 00:00:00" : "",
-    startTime: radioValue.value ? proxy.$common.getDays(-radioValue.value)[1] + " 00:00:00" : "",
+    endTime: radioValue.value ? proxy.$time.getDays(-radioValue.value)[0] + " 00:00:00" : "",
+    startTime: radioValue.value ? proxy.$time.getDays(-radioValue.value)[1] + " 00:00:00" : "",
   }).then((requset) => {
     if (requset.status === "SUCCESS") {
       dataList.value = requset.data.records;
@@ -176,7 +168,6 @@ function load() {
 function refresh() {
   radioValue.value = "";
   pageSize.value = 20;
-  total.value = 0;
   selectListApi();
 }
 
@@ -230,7 +221,7 @@ onNavigationBarButtonTap((e) => {
         min-width: 50%;
         white-space: nowrap;
         > .iconfont {
-          font-size: 14px;
+          font-size: 16px;
           color: #909399;
           margin-left: 5px;
         }

+ 36 - 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">
@@ -80,6 +88,7 @@
                 checkboxChange(val);
               }
             "
+            :size="14"
             :activeColor="proxy.$settingStore.themeColor.color"
           >
             <u-checkbox class="mb10" v-for="option in checkboxDataList" :key="option" :label="option.attributeName" :name="option.attributeCode"> </u-checkbox>
@@ -88,42 +97,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 +163,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 +176,7 @@ function init() {
       });
 
       last({
-        deviceId: commonStore.$state.deviceDetailsArray.deviceId,
+        deviceId: commonStore.deviceDetailsArray.deviceId,
         metrics: array,
       }).then((requsets) => {
         if (requsets.status === "SUCCESS") {
@@ -217,8 +229,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();

+ 42 - 35
src/pages/business/fireIot/repairManage/repairDetailsList.vue

@@ -1,12 +1,21 @@
 <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="tabsList"
+      :current="tabsCurrent"
+      @click="tabsClick"
+      lineColor="#333"
+      :activeStyle="{ color: '#333', fontSize: '14px' }"
+      :inactiveStyle="{ color: '#909399', fontSize: '14px' }"
+      :scrollable="false"
+    ></u-tabs>
   </u-sticky>
 
   <oa-scroll
     customClass="repairManage-container scroll-height"
     :pageSize="pageSize"
     :total="total"
+    :isSticky="true"
     :refresherLoad="true"
     :refresherEnabled="true"
     :refresherDefaultStyle="'none'"
@@ -41,35 +50,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 +92,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 +114,7 @@ function handleToDetails(e) {
  * @scrollView加载数据
  */
 function load() {
-  pageSize.value += 10;
+  state.pageSize += 10;
   init();
 }
 
@@ -114,8 +122,7 @@ function load() {
  * @scrollView刷新数据
  */
 function refresh() {
-  pageSize.value = 20;
-  total.value = 0;
+  state.pageSize = 20;
   init();
 }
 
@@ -123,7 +130,7 @@ function refresh() {
  * @tabs点击事件
  */
 function tabsClick(e) {
-  tabsCurrent.value = e.index;
+  state.tabsCurrent = e.index;
   init();
 }
 

+ 19 - 52
src/pages/common/repairReport/index.vue → src/pages/business/fireIot/repairReport/index.vue

@@ -9,11 +9,11 @@
     :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 style="color: #149eff" @click="proxy.$tab.navigateTo(`/pages/business/fireIot/repairReport/record`)">报修历史</view>
         </view>
 
         <u--form :model="form" ref="uForm" :rules="rules" labelWidth="80">
@@ -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 { add, getAddHistoryInfo } from "@/api/business/fireIot/repairReport.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
 import { useStores, commonStores } from "@/store/modules/index";
-
-import { add, getAddHistoryInfo } from "@/api/common/repairReport.js";
-
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
 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);
 
 /**
  * @项目名称

+ 3 - 4
src/pages/common/repairReport/record.vue → src/pages/business/fireIot/repairReport/record.vue

@@ -42,7 +42,7 @@ import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue
 import { getToken, setToken, removeToken } from "@/utils/auth";
 import { useStores, commonStores } from "@/store/modules/index";
 
-import { getHistory } from "@/api/common/repairReport.js";
+import { getHistory } from "@/api/business/fireIot/repairReport.js";
 
 const { proxy } = getCurrentInstance();
 const useStore = useStores();
@@ -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();
 }
 
@@ -117,7 +116,7 @@ onLoad((options) => {
   }
 
   if (!getToken() && !dataStatus.value) {
-    proxy.$tab.redirectTo(`/pages/common/phoneVerify/index?path=${"/pages/common/repairReport/record"}`);
+    proxy.$tab.redirectTo(`/pages/common/phoneVerify/index?path=${"/pages/business/fireIot/repairReport/record"}`);
   } else {
     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>

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

@@ -1,116 +1,95 @@
 <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', fontSize: '14px' }"
+      :inactiveStyle="{ color: '#909399', fontSize: '14px' }"
+    ></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.$time.getFormatterDate(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 +97,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 +121,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 +195,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 +496,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 +508,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.$time.getFormatterDate(new Date());
   }, 1000);
 });
 
+onUnload(() => {
+  clearInterval(inter.interOperateDate); //销毁之前定时器
+});
+
 onShow(() => {
   //调用系统主题颜色
   proxy.$settingStore.systemThemeColor([1]);

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

@@ -1,27 +1,44 @@
 <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', fontSize: '14px' }"
+      :inactiveStyle="{ color: '#909399', fontSize: '14px' }"
+    ></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 +70,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 +100,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 +132,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 +177,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 +252,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 +267,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 +277,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 +327,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 +336,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 +356,7 @@ function touchChange(e) {
  * @tabs点击事件
  */
 function tabsClick(e) {
-  current.value = e.index;
+  state.current = e.index;
   goSearch();
 }
 
@@ -368,7 +367,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 +426,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;
+          }
+        }
       }
     }
   }

+ 79 - 310
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>
@@ -188,7 +197,7 @@
                 </view>
 
                 <u-form-item label="消防设施设置" :prop="`baseBuildList.${index}.baseBuild.fireFacilitySystem`" required :borderBottom="true">
-                  <u-checkbox-group v-model="li.baseBuild.fireFacilitySystem" placement="column" @change="checkboxChange">
+                  <u-checkbox-group v-model="li.baseBuild.fireFacilitySystem" placement="column" :size="14" @change="checkboxChange">
                     <u-checkbox :customStyle="{ marginBottom: '8px' }" label="自动喷水灭火系统" :name="1"> </u-checkbox>
                     <u-checkbox :customStyle="{ marginBottom: '8px' }" label="火灾自动报警系统" :name="2"> </u-checkbox>
                     <u-checkbox :customStyle="{ marginBottom: '8px' }" label="防排烟与排烟系统" :name="3"> </u-checkbox>
@@ -197,7 +206,7 @@
                 </u-form-item>
 
                 <u-form-item label="其他设施" :prop="`li.baseBuildList.baseBuild.otherSystem`" :borderBottom="true">
-                  <u-checkbox-group v-model="li.baseBuild.otherSystem" placement="column" @change="checkboxChange">
+                  <u-checkbox-group v-model="li.baseBuild.otherSystem" placement="column" :size="14" @change="checkboxChange">
                     <u-checkbox :customStyle="{ marginBottom: '8px' }" label="泡沫灭火系统" :name="1"> </u-checkbox>
                     <u-checkbox :customStyle="{ marginBottom: '8px' }" label="水喷雾、细水雾灭火系统" :name="2"> </u-checkbox>
                     <u-checkbox :customStyle="{ marginBottom: '8px' }" label="消防炮、自动跟踪定位射流灭火系统" :name="3"> </u-checkbox>
@@ -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.$time.getFormatterDate(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.$time.getFormatterDate(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.$time.getFormatterDate(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.$time.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 font18" @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>

+ 152 - 117
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 font12">
+        <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) => {});
 
@@ -205,42 +226,56 @@ onShow(() => {
   //调用系统主题颜色
   proxy.$settingStore.systemThemeColor([1]);
 
-  uni.$on("tagid", function (value) {
+  uni.$on("NFC_readID", function (value) {
     setTimeout(() => {
-      uni.navigateTo({
-        url: `/pages/business/zhaf/xunJian/collect/components/collectDetail?siteNubmber=${value}&siteType=${2}`,
-      });
-      uni.$off("tagid"); //将值删除监听器
+      proxy.$tab.navigateTo(`/pages/business/zhaf/xunJian/collect/components/collectDetail?siteNubmber=${value}&siteType=${2}`);
+      uni.$off("NFC_readID"); //将值删除监听器
     }, 0);
   });
 });
 
 onUnload(() => {
-  uni.$off("tagid"); //将值删除监听器
+  uni.$off("NFC_readID"); //将值删除监听器
 });
 
 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>

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

@@ -0,0 +1,172 @@
+<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', fontSize: '14px' }"
+      :inactiveStyle="{ color: '#909399', fontSize: '14px' }"
+      :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>

+ 51 - 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>
@@ -18,6 +27,7 @@
                   checkboxChange(val, index);
                 }
               "
+              :size="14"
               :disabled="xunJianStore.inspectionStatus == 2"
               :activeColor="proxy.$settingStore.themeColor.color"
             >
@@ -60,35 +70,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 +127,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 +138,7 @@ function confirm() {
 async function buttonClick(type) {
   if (type == 1) {
     //上一步
-    uni.navigateBack({
-      delta: 1,
-    });
+    proxy.$tab.navigateBack(1); //返回到需要执行方法的页面
   } else if (type == 2) {
     //提交
 
@@ -165,6 +174,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 +188,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);
+      });
   }
 }
 

+ 108 - 90
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) => {
@@ -184,13 +202,13 @@ onLoad((options) => {
 onShow(() => {
   //调用系统主题颜色
   proxy.$settingStore.systemThemeColor([1]);
-  uni.$on("tagid", function (value) {
+  uni.$on("NFC_readID", function (value) {
     siteDetailsApi(value);
   });
 });
 
 onUnload(() => {
-  uni.$off("tagid"); //将值删除监听器
+  uni.$off("NFC_readID"); //将值删除监听器
 });
 
 onMounted(() => {});

+ 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();
   }
 });
 

+ 112 - 74
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.$time.getDate().year + "-" + proxy.$time.getDate().month + "-" + proxy.$time.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", () => {
@@ -346,13 +384,13 @@ onShow(() => {
   //调用系统主题颜色
   proxy.$settingStore.systemThemeColor([1]);
 
-  uni.$on("tagid", function (value) {
+  uni.$on("NFC_readID", function (value) {
     planListApi(value);
   });
 });
 
 onUnload(() => {
-  uni.$off("tagid"); //将值删除监听器
+  uni.$off("NFC_readID"); //将值删除监听器
 });
 
 onMounted(() => {});

+ 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.$time.getDate().year + "-" + proxy.$time.getDate().month + "-" + proxy.$time.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();
 });

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

@@ -1,12 +1,21 @@
 <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', fontSize: '14px' }"
+      :inactiveStyle="{ color: '#909399', fontSize: '14px' }"
+      :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 +28,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 +53,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 +92,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 +120,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 +135,7 @@ function load() {
  * @scrollView刷新数据
  */
 function refresh() {
-  pageSize.value = 20;
-  total.value = 0;
+  state.pageSize = 20;
   init();
 }
 
@@ -137,7 +143,7 @@ function refresh() {
  * @tabs点击事件
  */
 function tabsClick(e) {
-  tabsCurrent.value = e.index;
+  state.tabsCurrent = e.index;
   init();
 }
 
@@ -151,10 +157,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.$time.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();
 }
 

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

@@ -0,0 +1,62 @@
+<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>
+  </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>

+ 156 - 120
src/pages/common/appMessage/index.vue

@@ -1,85 +1,84 @@
 <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>
+  <oa-scroll
+    customClass="appMessage-container scroll-height"
+    :pageSize="state.size"
+    :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>
+      <u-loading-page :loading="state.loading" fontSize="16" style="z-index: 99"></u-loading-page>
+
+      <view class="content-area" v-for="(group, date) in proxy.$common.groupedItems(state.noticeList, 'createTime')" :key="date">
+        <view class="content-area-time font14">{{ proxy.$time.jktTimes(date, "否") }}</view>
+        <view
+          class="content-area-center flex bg-white list-cell list-cell-arrow"
+          :id="ind == noticeList.length - 1 ? 'bottomInfo' : ''"
+          v-for="(el, ind) in group"
+          :key="ind"
+          v-show="noticeList.length > 0"
+          @click="goContentDetails(el)"
+        >
+          <view style="width: 100%; max-width: 100%">
+            <view class="content-area-center-title font16">{{ el.infoTitle }}</view>
+            <view class="content-area-center-cont font14">{{ el.infoContent }}</view>
           </view>
+          <view class="content-area-center-badge"><u-badge :isDot="el.readFlag == 0 ? true : false" type="error"></u-badge></view>
+          <view class="content-area-center-time font14">{{ proxy.$time.jktTimes(el.createTime.replace("T", " ")) }}</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>
-        <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>
-        </view>
-      </view>
-    </view>
-  </scroll-view>
+    </template>
+  </oa-scroll>
 </template>
 
 <script setup>
-import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, 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 data = reactive({
+/*----------------------------------变量声明-----------------------------------*/
+const state = reactive({
   scrollIntoView: "",
-
-  tabsList: [
-    {
-      name: "全部",
-    },
-    {
-      name: "通知公告",
-    },
-  ],
-  tabsCurrent: 0,
-
-  allInfoList: [],
+  loading: false,
   noticeList: [],
+  size: 10,
+  current: 1,
+  total: 0,
+  options: {
+    typeName: "",
+  },
 });
 
-const { scrollIntoView, scrollIntoViewBool, tabsList, tabsCurrent, allInfoList, noticeList } = toRefs(data);
+const { scrollIntoView, noticeList } = toRefs(state);
 
 /**
- * @初始化
- */
-function init() {
-  infoListApi();
-}
-
-/**
- * @tabs点击事件
- */
-function tabsClick(e) {
-  tabsCurrent.value = e.index;
-}
-
-/**
- * @跳转
+ * @跳转相应类型系统
  */
 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(() => {});
+  } else if (e.infoType == 5) {
+    proxy.$tab.navigateTo(`/pages/business/common/projectMange/record/details?reportId=${e.moduleId}`).then(() => {});
+  } else {
+    proxy.$tab.navigateTo(`/pages/common/appMessage/details?contentId=${e.contentId}`).then(() => {});
+  }
+
+  //是否已读
+  if (!e.readFlag) {
+    updateMceReceiveStatus({ id: e.id });
   }
 }
 
@@ -87,46 +86,63 @@ function goContentDetails(e) {
  * @通知公告列表
  * @api接口调用
  */
-function infoListApi() {
-  proxy.$modal.loading("加载中");
-  infoList({
-    pageNum: 1,
-    pageSize: 20000,
-  }).then((requset) => {
-    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,
-        });
-      });
+function init(obj) {
+  uni.setNavigationBarTitle({
+    title: obj.typeName ? obj.typeName : "消息列表",
+  });
 
+  state.loading = true;
+  getMceList({
+    size: state.size,
+    current: state.current,
+    infoType: obj?.type,
+  })
+    .then((requset) => {
+      if (requset.status === "SUCCESS") {
+        state.noticeList = requset.data.records;
+        state.total = requset.data.total;
+        state.loading = false;
+      }
       setTimeout(() => {
         scrollIntoView.value = "bottomInfo";
       }, 0);
 
-      setTimeout(() => {
-        proxy.$modal.closeLoading();
-      }, 100);
-    }
-  });
+      if ("id" in obj) {
+        state.noticeList.forEach((e) => {
+          if (e.id == obj.id) {
+            goContentDetails(e);
+          }
+        });
+      }
+    })
+    .catch((err) => {
+      state.loading = false;
+    });
+}
+
+/**
+ * @scrollView加载数据
+ */
+function load() {
+  state.size += 10;
+  init(state.options);
+}
+
+/**
+ * @scrollView刷新数据
+ */
+function refresh() {
+  state.size = 10;
+  init(state.options);
 }
 
 onLoad((options) => {
-  init();
+  state.options = options;
+  init(state.options);
+  uni.$on("projectMange_record", function (value) {
+    delete state.options.id;
+    init(state.options);
+  });
 });
 
 onReady(() => {});
@@ -136,6 +152,10 @@ onShow(() => {
   proxy.$settingStore.systemThemeColor([1]);
 });
 
+onUnload(() => {
+  uni.$off("projectMange_record"); //将值删除监听器
+});
+
 // 自定义导航事件
 onNavigationBarButtonTap((e) => {
   if (e.float == "right") {
@@ -149,35 +169,51 @@ onNavigationBarButtonTap((e) => {
   opacity: 1 !important;
 }
 
-.appMessage-container {
-  padding-bottom: 1px;
+.content-area {
+  padding: 0 10px;
 
-  .content-area {
-    &-time {
-      padding: 10px 0;
-      text-align: center;
-      color: #909399;
+  &-time {
+    padding: 10px;
+    text-align: left;
+    color: #000000;
+    font-weight: 600;
+  }
+
+  &-center {
+    margin: 0;
+    padding: 15px;
+    overflow: hidden;
+    border-bottom: 1px solid #eaeef1;
+
+    &:nth-child(2) {
+      border-radius: 10px 10px 0 0;
     }
 
-    &-center {
-      margin: 0 10px 20px 10px;
-      padding: 15px;
-      overflow: hidden;
+    &:last-child {
+      border-radius: 0 0 10px 10px;
+      border-bottom: 0px solid #eaeef1;
+    }
 
-      &-title {
-        margin: 0 0 15px 0;
-        color: #909399;
-      }
+    &-avatar {
+      margin: auto 0;
+    }
 
-      &-cont {
-        font-weight: 600;
-        color: #000000;
-      }
+    &-title {
+      margin: 0 0 10px 0;
+      font-weight: 600;
+      color: #000000;
+    }
 
-      &-buttom {
-        float: right;
-        color: #2a98ff;
-      }
+    &-cont {
+      color: #666666;
+    }
+
+    &-badge {
+      margin: auto 10px auto 0;
+    }
+
+    &-time {
+      margin: auto 0.9375rem auto 0;
     }
   }
 }

+ 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";

+ 40 - 106
src/pages/common/invoicing/index.vue

@@ -1,11 +1,20 @@
 <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="tabsList"
+      :current="tabsCurrent"
+      @click="tabsClick"
+      lineColor="#333"
+      :activeStyle="{ color: '#333', fontSize: '14px' }"
+      :inactiveStyle="{ color: '#909399', fontSize: '14px' }"
+      :scrollable="false"
+    ></u-tabs>
   </u-sticky>
 
   <oa-scroll
     customClass="invoicing-container scroll-height"
     :customStyle="{}"
+    :isSticky="true"
     :refresherLoad="false"
     :refresherEnabled="false"
     :refresherDefaultStyle="'none'"
@@ -33,15 +42,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 +108,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 +176,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 +207,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 +247,8 @@ function handleSubmit(value) {
         current: 1,
         size: 10,
         invoiceTitle: form.value.invoiceTitle,
-        startTime: commonStore.getYearLast(new Date()),
-        endTime: commonStore.formatterDateTime(new Date()),
+        startTime: proxy.$time.getYearLast(new Date()),
+        endTime: proxy.$time.getFormatterDate(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;
       }
     }

Some files were not shown because too many files changed in this diff